Email Sorter Beta
Ich habe soweit automatisiert the Emails sortieren aber ich muss noch schauen was es fur bugs es gibt wenn die app online ist deswegen wurde ich mit diesen Commit die website veroffentlichen obwohjl es sein konnte das es noch nicht fertig ist und verkaufs bereit
This commit is contained in:
114
server/node_modules/stripe/README.md
generated
vendored
114
server/node_modules/stripe/README.md
generated
vendored
@@ -2,7 +2,6 @@
|
||||
|
||||
[](https://www.npmjs.org/package/stripe)
|
||||
[](https://github.com/stripe/stripe-node/actions?query=branch%3Amaster)
|
||||
[](https://coveralls.io/github/stripe/stripe-node?branch=master)
|
||||
[](https://www.npmjs.com/package/stripe)
|
||||
[](https://runkit.com/npm/stripe)
|
||||
|
||||
@@ -61,6 +60,39 @@ const customer = await stripe.customers.create({
|
||||
console.log(customer.id);
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
> If you're using `v17.x.x` or later and getting an error about a missing API key despite being sure it's available, it's likely you're importing the file that instantiates `Stripe` while the key isn't present (for instance, during a build step).
|
||||
> If that's the case, consider instantiating the client lazily:
|
||||
>
|
||||
> ```ts
|
||||
> import Stripe from 'stripe';
|
||||
>
|
||||
> let _stripe: Stripe | null = null;
|
||||
> const getStripe = (): Stripe => {
|
||||
> if (!_stripe) {
|
||||
> _stripe = new Stripe(process.env.STRIPE_SECRET_KEY as string, {
|
||||
> // ...
|
||||
> });
|
||||
> }
|
||||
> return _stripe;
|
||||
> };
|
||||
>
|
||||
> const getCustomers = () => getStripe().customers.list();
|
||||
> ```
|
||||
>
|
||||
> Alternatively, you can provide a placeholder for the real key (which will be enough to get the code through a build step):
|
||||
>
|
||||
> ```ts
|
||||
> import Stripe from 'stripe';
|
||||
>
|
||||
> export const stripe = new Stripe(
|
||||
> process.env.STRIPE_SECRET_KEY || 'api_key_placeholder',
|
||||
> {
|
||||
> // ...
|
||||
> }
|
||||
> );
|
||||
> ```
|
||||
|
||||
### Usage with TypeScript
|
||||
|
||||
As of 8.0.1, Stripe maintains types for the latest [API version][api-versions].
|
||||
@@ -197,7 +229,7 @@ const stripe = Stripe('sk_test_...', {
|
||||
| `host` | `'api.stripe.com'` | Host that requests are made to. |
|
||||
| `port` | 443 | Port that requests are made to. |
|
||||
| `protocol` | `'https'` | `'https'` or `'http'`. `http` is never appropriate for sending requests to Stripe servers, and we strongly discourage `http`, even in local testing scenarios, as this can result in your credentials being transmitted over an insecure channel. |
|
||||
| `telemetry` | `true` | Allow Stripe to send [telemetry](#telemetry). |
|
||||
| `telemetry` | `true` | Allow Stripe to send [telemetry](#telemetry). |
|
||||
|
||||
> **Note**
|
||||
> Both `maxNetworkRetries` and `timeout` can be overridden on a per-request basis.
|
||||
@@ -467,14 +499,15 @@ stripe.customers
|
||||
|
||||
This is a convenience for cases where you expect the number of items
|
||||
to be relatively small; accordingly, you must pass a `limit` option
|
||||
to prevent runaway list growth from consuming too much memory.
|
||||
to prevent runaway list growth from consuming too much memory. Once the
|
||||
`limit` number of items have been fetched, auto-pagination will stop.
|
||||
|
||||
Returns a promise of an array of all items across pages for a list request.
|
||||
|
||||
```js
|
||||
const allNewCustomers = await stripe.customers
|
||||
.list({created: {gt: lastMonth}})
|
||||
.autoPagingToArray({limit: 10000});
|
||||
.list({created: {gt: lastMonth}, limit: 100}) // 100 items per page
|
||||
.autoPagingToArray({limit: 10000}); // Stop after 10000 items total
|
||||
```
|
||||
|
||||
### Telemetry
|
||||
@@ -516,6 +549,39 @@ const stripe = new Stripe('sk_test_...', {
|
||||
});
|
||||
```
|
||||
|
||||
### Custom requests
|
||||
|
||||
If you would like to send a request to an undocumented API (for example you are in a private beta), or if you prefer to bypass the method definitions in the library and specify your request details directly, you can use the `rawRequest` method on the StripeClient object.
|
||||
|
||||
```javascript
|
||||
const client = new Stripe('sk_test_...');
|
||||
|
||||
client.rawRequest(
|
||||
'POST',
|
||||
'/v1/beta_endpoint',
|
||||
{ param: 123 },
|
||||
{ apiVersion: '2022-11-15; feature_beta=v3' }
|
||||
)
|
||||
.then((response) => /* handle response */ )
|
||||
.catch((error) => console.error(error));
|
||||
```
|
||||
|
||||
Or using ES modules and `async`/`await`:
|
||||
|
||||
```javascript
|
||||
import Stripe from 'stripe';
|
||||
const stripe = new Stripe('sk_test_...');
|
||||
|
||||
const response = await stripe.rawRequest(
|
||||
'POST',
|
||||
'/v1/beta_endpoint',
|
||||
{param: 123},
|
||||
{apiVersion: '2022-11-15; feature_beta=v3'}
|
||||
);
|
||||
|
||||
// handle response
|
||||
```
|
||||
|
||||
## Support
|
||||
|
||||
New features and bug fixes are released on the latest major version of the `stripe` package. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
|
||||
@@ -529,16 +595,9 @@ New features and bug fixes are released on the latest major version of the `stri
|
||||
|
||||
## Development
|
||||
|
||||
Run all tests:
|
||||
[Contribution guidelines for this project](CONTRIBUTING.md)
|
||||
|
||||
```bash
|
||||
$ yarn install
|
||||
$ yarn test
|
||||
```
|
||||
|
||||
If you do not have `yarn` installed, you can get it with `npm install --global yarn`.
|
||||
|
||||
The tests also depends on [stripe-mock][stripe-mock], so make sure to fetch and
|
||||
The tests depend on [stripe-mock][stripe-mock], so make sure to fetch and
|
||||
run it from a background terminal ([stripe-mock's README][stripe-mock-usage]
|
||||
also contains instructions for installing via Homebrew and other methods):
|
||||
|
||||
@@ -547,24 +606,38 @@ go get -u github.com/stripe/stripe-mock
|
||||
stripe-mock
|
||||
```
|
||||
|
||||
Run a single test suite without a coverage report:
|
||||
We use [just](https://github.com/casey/just) for conveniently running development tasks. You can use them directly, or copy the commands out of the `justfile`. To our help docs, run `just`.
|
||||
|
||||
Run all tests (installing the dependencies first, if needed)
|
||||
|
||||
```bash
|
||||
$ yarn mocha-only test/Error.spec.ts
|
||||
just test
|
||||
# or: yarn && yarn test
|
||||
```
|
||||
|
||||
If you do not have `yarn` installed, consult its [installation instructions](https://classic.yarnpkg.com/lang/en/docs/install/).
|
||||
|
||||
Run a single test suite:
|
||||
|
||||
```bash
|
||||
just test test/Error.spec.ts
|
||||
# or: yarn test test/Error.spec.ts
|
||||
```
|
||||
|
||||
Run a single test (case sensitive) in watch mode:
|
||||
|
||||
```bash
|
||||
$ yarn mocha-only test/Error.spec.ts --grep 'Populates with type' --watch
|
||||
just test test/Error.spec.ts --grep 'StripeError' --watch
|
||||
# or: yarn test test/Error.spec.ts --grep 'StripeError' --watch
|
||||
```
|
||||
|
||||
If you wish, you may run tests using your Stripe _Test_ API key by setting the
|
||||
environment variable `STRIPE_TEST_API_KEY` before running the tests:
|
||||
|
||||
```bash
|
||||
$ export STRIPE_TEST_API_KEY='sk_test....'
|
||||
$ yarn test
|
||||
export STRIPE_TEST_API_KEY='sk_test....'
|
||||
just test
|
||||
# or: yarn test
|
||||
```
|
||||
|
||||
Run prettier:
|
||||
@@ -572,7 +645,8 @@ Run prettier:
|
||||
Add an [editor integration](https://prettier.io/docs/en/editors.html) or:
|
||||
|
||||
```bash
|
||||
$ yarn fix
|
||||
just format
|
||||
# or: yarn prettier src/**/*.ts --write
|
||||
```
|
||||
|
||||
[api-keys]: https://dashboard.stripe.com/account/apikeys
|
||||
|
||||
Reference in New Issue
Block a user