Complete Email Sortierer implementation with Appwrite and Stripe integration
This commit is contained in:
160
server/node_modules/stripe/esm/Error.js
generated
vendored
Normal file
160
server/node_modules/stripe/esm/Error.js
generated
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
/* eslint-disable camelcase */
|
||||
export const generate = (rawStripeError) => {
|
||||
switch (rawStripeError.type) {
|
||||
case 'card_error':
|
||||
return new StripeCardError(rawStripeError);
|
||||
case 'invalid_request_error':
|
||||
return new StripeInvalidRequestError(rawStripeError);
|
||||
case 'api_error':
|
||||
return new StripeAPIError(rawStripeError);
|
||||
case 'authentication_error':
|
||||
return new StripeAuthenticationError(rawStripeError);
|
||||
case 'rate_limit_error':
|
||||
return new StripeRateLimitError(rawStripeError);
|
||||
case 'idempotency_error':
|
||||
return new StripeIdempotencyError(rawStripeError);
|
||||
case 'invalid_grant':
|
||||
return new StripeInvalidGrantError(rawStripeError);
|
||||
default:
|
||||
return new StripeUnknownError(rawStripeError);
|
||||
}
|
||||
};
|
||||
/**
|
||||
* StripeError is the base error from which all other more specific Stripe errors derive.
|
||||
* Specifically for errors returned from Stripe's REST API.
|
||||
*/
|
||||
export class StripeError extends Error {
|
||||
constructor(raw = {}, type = null) {
|
||||
super(raw.message);
|
||||
this.type = type || this.constructor.name;
|
||||
this.raw = raw;
|
||||
this.rawType = raw.type;
|
||||
this.code = raw.code;
|
||||
this.doc_url = raw.doc_url;
|
||||
this.param = raw.param;
|
||||
this.detail = raw.detail;
|
||||
this.headers = raw.headers;
|
||||
this.requestId = raw.requestId;
|
||||
this.statusCode = raw.statusCode;
|
||||
// @ts-ignore
|
||||
this.message = raw.message;
|
||||
this.charge = raw.charge;
|
||||
this.decline_code = raw.decline_code;
|
||||
this.payment_intent = raw.payment_intent;
|
||||
this.payment_method = raw.payment_method;
|
||||
this.payment_method_type = raw.payment_method_type;
|
||||
this.setup_intent = raw.setup_intent;
|
||||
this.source = raw.source;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Helper factory which takes raw stripe errors and outputs wrapping instances
|
||||
*/
|
||||
StripeError.generate = generate;
|
||||
// Specific Stripe Error types:
|
||||
/**
|
||||
* CardError is raised when a user enters a card that can't be charged for
|
||||
* some reason.
|
||||
*/
|
||||
export class StripeCardError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeCardError');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* InvalidRequestError is raised when a request is initiated with invalid
|
||||
* parameters.
|
||||
*/
|
||||
export class StripeInvalidRequestError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeInvalidRequestError');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* APIError is a generic error that may be raised in cases where none of the
|
||||
* other named errors cover the problem. It could also be raised in the case
|
||||
* that a new error has been introduced in the API, but this version of the
|
||||
* Node.JS SDK doesn't know how to handle it.
|
||||
*/
|
||||
export class StripeAPIError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeAPIError');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* AuthenticationError is raised when invalid credentials are used to connect
|
||||
* to Stripe's servers.
|
||||
*/
|
||||
export class StripeAuthenticationError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeAuthenticationError');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* PermissionError is raised in cases where access was attempted on a resource
|
||||
* that wasn't allowed.
|
||||
*/
|
||||
export class StripePermissionError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripePermissionError');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* RateLimitError is raised in cases where an account is putting too much load
|
||||
* on Stripe's API servers (usually by performing too many requests). Please
|
||||
* back off on request rate.
|
||||
*/
|
||||
export class StripeRateLimitError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeRateLimitError');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* StripeConnectionError is raised in the event that the SDK can't connect to
|
||||
* Stripe's servers. That can be for a variety of different reasons from a
|
||||
* downed network to a bad TLS certificate.
|
||||
*/
|
||||
export class StripeConnectionError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeConnectionError');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* SignatureVerificationError is raised when the signature verification for a
|
||||
* webhook fails
|
||||
*/
|
||||
export class StripeSignatureVerificationError extends StripeError {
|
||||
constructor(header, payload, raw = {}) {
|
||||
super(raw, 'StripeSignatureVerificationError');
|
||||
this.header = header;
|
||||
this.payload = payload;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* IdempotencyError is raised in cases where an idempotency key was used
|
||||
* improperly.
|
||||
*/
|
||||
export class StripeIdempotencyError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeIdempotencyError');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* InvalidGrantError is raised when a specified code doesn't exist, is
|
||||
* expired, has been used, or doesn't belong to you; a refresh token doesn't
|
||||
* exist, or doesn't belong to you; or if an API key's mode (live or test)
|
||||
* doesn't match the mode of a code or refresh token.
|
||||
*/
|
||||
export class StripeInvalidGrantError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeInvalidGrantError');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Any other error from Stripe not specifically captured above
|
||||
*/
|
||||
export class StripeUnknownError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeUnknownError');
|
||||
}
|
||||
}
|
||||
352
server/node_modules/stripe/esm/RequestSender.js
generated
vendored
Normal file
352
server/node_modules/stripe/esm/RequestSender.js
generated
vendored
Normal file
@@ -0,0 +1,352 @@
|
||||
import { StripeAPIError, StripeAuthenticationError, StripeConnectionError, StripeError, StripePermissionError, StripeRateLimitError, } from './Error.js';
|
||||
import { emitWarning, normalizeHeaders, removeNullish, stringifyRequestData, } from './utils.js';
|
||||
import { HttpClient } from './net/HttpClient.js';
|
||||
const MAX_RETRY_AFTER_WAIT = 60;
|
||||
export class RequestSender {
|
||||
constructor(stripe, maxBufferedRequestMetric) {
|
||||
this._stripe = stripe;
|
||||
this._maxBufferedRequestMetric = maxBufferedRequestMetric;
|
||||
}
|
||||
_addHeadersDirectlyToObject(obj, headers) {
|
||||
// For convenience, make some headers easily accessible on
|
||||
// lastResponse.
|
||||
// NOTE: Stripe responds with lowercase header names/keys.
|
||||
obj.requestId = headers['request-id'];
|
||||
obj.stripeAccount = obj.stripeAccount || headers['stripe-account'];
|
||||
obj.apiVersion = obj.apiVersion || headers['stripe-version'];
|
||||
obj.idempotencyKey = obj.idempotencyKey || headers['idempotency-key'];
|
||||
}
|
||||
_makeResponseEvent(requestEvent, statusCode, headers) {
|
||||
const requestEndTime = Date.now();
|
||||
const requestDurationMs = requestEndTime - requestEvent.request_start_time;
|
||||
return removeNullish({
|
||||
api_version: headers['stripe-version'],
|
||||
account: headers['stripe-account'],
|
||||
idempotency_key: headers['idempotency-key'],
|
||||
method: requestEvent.method,
|
||||
path: requestEvent.path,
|
||||
status: statusCode,
|
||||
request_id: this._getRequestId(headers),
|
||||
elapsed: requestDurationMs,
|
||||
request_start_time: requestEvent.request_start_time,
|
||||
request_end_time: requestEndTime,
|
||||
});
|
||||
}
|
||||
_getRequestId(headers) {
|
||||
return headers['request-id'];
|
||||
}
|
||||
/**
|
||||
* Used by methods with spec.streaming === true. For these methods, we do not
|
||||
* buffer successful responses into memory or do parse them into stripe
|
||||
* objects, we delegate that all of that to the user and pass back the raw
|
||||
* http.Response object to the callback.
|
||||
*
|
||||
* (Unsuccessful responses shouldn't make it here, they should
|
||||
* still be buffered/parsed and handled by _jsonResponseHandler -- see
|
||||
* makeRequest)
|
||||
*/
|
||||
_streamingResponseHandler(requestEvent, usage, callback) {
|
||||
return (res) => {
|
||||
const headers = res.getHeaders();
|
||||
const streamCompleteCallback = () => {
|
||||
const responseEvent = this._makeResponseEvent(requestEvent, res.getStatusCode(), headers);
|
||||
this._stripe._emitter.emit('response', responseEvent);
|
||||
this._recordRequestMetrics(this._getRequestId(headers), responseEvent.elapsed, usage);
|
||||
};
|
||||
const stream = res.toStream(streamCompleteCallback);
|
||||
// This is here for backwards compatibility, as the stream is a raw
|
||||
// HTTP response in Node and the legacy behavior was to mutate this
|
||||
// response.
|
||||
this._addHeadersDirectlyToObject(stream, headers);
|
||||
return callback(null, stream);
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Default handler for Stripe responses. Buffers the response into memory,
|
||||
* parses the JSON and returns it (i.e. passes it to the callback) if there
|
||||
* is no "error" field. Otherwise constructs/passes an appropriate Error.
|
||||
*/
|
||||
_jsonResponseHandler(requestEvent, usage, callback) {
|
||||
return (res) => {
|
||||
const headers = res.getHeaders();
|
||||
const requestId = this._getRequestId(headers);
|
||||
const statusCode = res.getStatusCode();
|
||||
const responseEvent = this._makeResponseEvent(requestEvent, statusCode, headers);
|
||||
this._stripe._emitter.emit('response', responseEvent);
|
||||
res
|
||||
.toJSON()
|
||||
.then((jsonResponse) => {
|
||||
if (jsonResponse.error) {
|
||||
let err;
|
||||
// Convert OAuth error responses into a standard format
|
||||
// so that the rest of the error logic can be shared
|
||||
if (typeof jsonResponse.error === 'string') {
|
||||
jsonResponse.error = {
|
||||
type: jsonResponse.error,
|
||||
message: jsonResponse.error_description,
|
||||
};
|
||||
}
|
||||
jsonResponse.error.headers = headers;
|
||||
jsonResponse.error.statusCode = statusCode;
|
||||
jsonResponse.error.requestId = requestId;
|
||||
if (statusCode === 401) {
|
||||
err = new StripeAuthenticationError(jsonResponse.error);
|
||||
}
|
||||
else if (statusCode === 403) {
|
||||
err = new StripePermissionError(jsonResponse.error);
|
||||
}
|
||||
else if (statusCode === 429) {
|
||||
err = new StripeRateLimitError(jsonResponse.error);
|
||||
}
|
||||
else {
|
||||
err = StripeError.generate(jsonResponse.error);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
return jsonResponse;
|
||||
}, (e) => {
|
||||
throw new StripeAPIError({
|
||||
message: 'Invalid JSON received from the Stripe API',
|
||||
exception: e,
|
||||
requestId: headers['request-id'],
|
||||
});
|
||||
})
|
||||
.then((jsonResponse) => {
|
||||
this._recordRequestMetrics(requestId, responseEvent.elapsed, usage);
|
||||
// Expose raw response object.
|
||||
const rawResponse = res.getRawResponse();
|
||||
this._addHeadersDirectlyToObject(rawResponse, headers);
|
||||
Object.defineProperty(jsonResponse, 'lastResponse', {
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
value: rawResponse,
|
||||
});
|
||||
callback(null, jsonResponse);
|
||||
}, (e) => callback(e, null));
|
||||
};
|
||||
}
|
||||
static _generateConnectionErrorMessage(requestRetries) {
|
||||
return `An error occurred with our connection to Stripe.${requestRetries > 0 ? ` Request was retried ${requestRetries} times.` : ''}`;
|
||||
}
|
||||
// For more on when and how to retry API requests, see https://stripe.com/docs/error-handling#safely-retrying-requests-with-idempotency
|
||||
static _shouldRetry(res, numRetries, maxRetries, error) {
|
||||
if (error &&
|
||||
numRetries === 0 &&
|
||||
HttpClient.CONNECTION_CLOSED_ERROR_CODES.includes(error.code)) {
|
||||
return true;
|
||||
}
|
||||
// Do not retry if we are out of retries.
|
||||
if (numRetries >= maxRetries) {
|
||||
return false;
|
||||
}
|
||||
// Retry on connection error.
|
||||
if (!res) {
|
||||
return true;
|
||||
}
|
||||
// The API may ask us not to retry (e.g., if doing so would be a no-op)
|
||||
// or advise us to retry (e.g., in cases of lock timeouts); we defer to that.
|
||||
if (res.getHeaders()['stripe-should-retry'] === 'false') {
|
||||
return false;
|
||||
}
|
||||
if (res.getHeaders()['stripe-should-retry'] === 'true') {
|
||||
return true;
|
||||
}
|
||||
// Retry on conflict errors.
|
||||
if (res.getStatusCode() === 409) {
|
||||
return true;
|
||||
}
|
||||
// Retry on 500, 503, and other internal errors.
|
||||
//
|
||||
// Note that we expect the stripe-should-retry header to be false
|
||||
// in most cases when a 500 is returned, since our idempotency framework
|
||||
// would typically replay it anyway.
|
||||
if (res.getStatusCode() >= 500) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
_getSleepTimeInMS(numRetries, retryAfter = null) {
|
||||
const initialNetworkRetryDelay = this._stripe.getInitialNetworkRetryDelay();
|
||||
const maxNetworkRetryDelay = this._stripe.getMaxNetworkRetryDelay();
|
||||
// Apply exponential backoff with initialNetworkRetryDelay on the
|
||||
// number of numRetries so far as inputs. Do not allow the number to exceed
|
||||
// maxNetworkRetryDelay.
|
||||
let sleepSeconds = Math.min(initialNetworkRetryDelay * Math.pow(numRetries - 1, 2), maxNetworkRetryDelay);
|
||||
// Apply some jitter by randomizing the value in the range of
|
||||
// (sleepSeconds / 2) to (sleepSeconds).
|
||||
sleepSeconds *= 0.5 * (1 + Math.random());
|
||||
// But never sleep less than the base sleep seconds.
|
||||
sleepSeconds = Math.max(initialNetworkRetryDelay, sleepSeconds);
|
||||
// And never sleep less than the time the API asks us to wait, assuming it's a reasonable ask.
|
||||
if (Number.isInteger(retryAfter) && retryAfter <= MAX_RETRY_AFTER_WAIT) {
|
||||
sleepSeconds = Math.max(sleepSeconds, retryAfter);
|
||||
}
|
||||
return sleepSeconds * 1000;
|
||||
}
|
||||
// Max retries can be set on a per request basis. Favor those over the global setting
|
||||
_getMaxNetworkRetries(settings = {}) {
|
||||
return settings.maxNetworkRetries !== undefined &&
|
||||
Number.isInteger(settings.maxNetworkRetries)
|
||||
? settings.maxNetworkRetries
|
||||
: this._stripe.getMaxNetworkRetries();
|
||||
}
|
||||
_defaultIdempotencyKey(method, settings) {
|
||||
// If this is a POST and we allow multiple retries, ensure an idempotency key.
|
||||
const maxRetries = this._getMaxNetworkRetries(settings);
|
||||
if (method === 'POST' && maxRetries > 0) {
|
||||
return `stripe-node-retry-${this._stripe._platformFunctions.uuid4()}`;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
_makeHeaders(auth, contentLength, apiVersion, clientUserAgent, method, userSuppliedHeaders, userSuppliedSettings) {
|
||||
const defaultHeaders = {
|
||||
// Use specified auth token or use default from this stripe instance:
|
||||
Authorization: auth ? `Bearer ${auth}` : this._stripe.getApiField('auth'),
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'User-Agent': this._getUserAgentString(),
|
||||
'X-Stripe-Client-User-Agent': clientUserAgent,
|
||||
'X-Stripe-Client-Telemetry': this._getTelemetryHeader(),
|
||||
'Stripe-Version': apiVersion,
|
||||
'Stripe-Account': this._stripe.getApiField('stripeAccount'),
|
||||
'Idempotency-Key': this._defaultIdempotencyKey(method, userSuppliedSettings),
|
||||
};
|
||||
// As per https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.2:
|
||||
// A user agent SHOULD send a Content-Length in a request message when
|
||||
// no Transfer-Encoding is sent and the request method defines a meaning
|
||||
// for an enclosed payload body. For example, a Content-Length header
|
||||
// field is normally sent in a POST request even when the value is 0
|
||||
// (indicating an empty payload body). A user agent SHOULD NOT send a
|
||||
// Content-Length header field when the request message does not contain
|
||||
// a payload body and the method semantics do not anticipate such a
|
||||
// body.
|
||||
//
|
||||
// These method types are expected to have bodies and so we should always
|
||||
// include a Content-Length.
|
||||
const methodHasPayload = method == 'POST' || method == 'PUT' || method == 'PATCH';
|
||||
// If a content length was specified, we always include it regardless of
|
||||
// whether the method semantics anticipate such a body. This keeps us
|
||||
// consistent with historical behavior. We do however want to warn on this
|
||||
// and fix these cases as they are semantically incorrect.
|
||||
if (methodHasPayload || contentLength) {
|
||||
if (!methodHasPayload) {
|
||||
emitWarning(`${method} method had non-zero contentLength but no payload is expected for this verb`);
|
||||
}
|
||||
defaultHeaders['Content-Length'] = contentLength;
|
||||
}
|
||||
return Object.assign(removeNullish(defaultHeaders),
|
||||
// If the user supplied, say 'idempotency-key', override instead of appending by ensuring caps are the same.
|
||||
normalizeHeaders(userSuppliedHeaders));
|
||||
}
|
||||
_getUserAgentString() {
|
||||
const packageVersion = this._stripe.getConstant('PACKAGE_VERSION');
|
||||
const appInfo = this._stripe._appInfo
|
||||
? this._stripe.getAppInfoAsString()
|
||||
: '';
|
||||
return `Stripe/v1 NodeBindings/${packageVersion} ${appInfo}`.trim();
|
||||
}
|
||||
_getTelemetryHeader() {
|
||||
if (this._stripe.getTelemetryEnabled() &&
|
||||
this._stripe._prevRequestMetrics.length > 0) {
|
||||
const metrics = this._stripe._prevRequestMetrics.shift();
|
||||
return JSON.stringify({
|
||||
last_request_metrics: metrics,
|
||||
});
|
||||
}
|
||||
}
|
||||
_recordRequestMetrics(requestId, requestDurationMs, usage) {
|
||||
if (this._stripe.getTelemetryEnabled() && requestId) {
|
||||
if (this._stripe._prevRequestMetrics.length > this._maxBufferedRequestMetric) {
|
||||
emitWarning('Request metrics buffer is full, dropping telemetry message.');
|
||||
}
|
||||
else {
|
||||
const m = {
|
||||
request_id: requestId,
|
||||
request_duration_ms: requestDurationMs,
|
||||
};
|
||||
if (usage && usage.length > 0) {
|
||||
m.usage = usage;
|
||||
}
|
||||
this._stripe._prevRequestMetrics.push(m);
|
||||
}
|
||||
}
|
||||
}
|
||||
_request(method, host, path, data, auth, options = {}, usage = [], callback, requestDataProcessor = null) {
|
||||
let requestData;
|
||||
const retryRequest = (requestFn, apiVersion, headers, requestRetries, retryAfter) => {
|
||||
return setTimeout(requestFn, this._getSleepTimeInMS(requestRetries, retryAfter), apiVersion, headers, requestRetries + 1);
|
||||
};
|
||||
const makeRequest = (apiVersion, headers, numRetries) => {
|
||||
// timeout can be set on a per-request basis. Favor that over the global setting
|
||||
const timeout = options.settings &&
|
||||
options.settings.timeout &&
|
||||
Number.isInteger(options.settings.timeout) &&
|
||||
options.settings.timeout >= 0
|
||||
? options.settings.timeout
|
||||
: this._stripe.getApiField('timeout');
|
||||
const req = this._stripe
|
||||
.getApiField('httpClient')
|
||||
.makeRequest(host || this._stripe.getApiField('host'), this._stripe.getApiField('port'), path, method, headers, requestData, this._stripe.getApiField('protocol'), timeout);
|
||||
const requestStartTime = Date.now();
|
||||
// @ts-ignore
|
||||
const requestEvent = removeNullish({
|
||||
api_version: apiVersion,
|
||||
account: headers['Stripe-Account'],
|
||||
idempotency_key: headers['Idempotency-Key'],
|
||||
method,
|
||||
path,
|
||||
request_start_time: requestStartTime,
|
||||
});
|
||||
const requestRetries = numRetries || 0;
|
||||
const maxRetries = this._getMaxNetworkRetries(options.settings || {});
|
||||
this._stripe._emitter.emit('request', requestEvent);
|
||||
req
|
||||
.then((res) => {
|
||||
if (RequestSender._shouldRetry(res, requestRetries, maxRetries)) {
|
||||
return retryRequest(makeRequest, apiVersion, headers, requestRetries,
|
||||
// @ts-ignore
|
||||
res.getHeaders()['retry-after']);
|
||||
}
|
||||
else if (options.streaming && res.getStatusCode() < 400) {
|
||||
return this._streamingResponseHandler(requestEvent, usage, callback)(res);
|
||||
}
|
||||
else {
|
||||
return this._jsonResponseHandler(requestEvent, usage, callback)(res);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
if (RequestSender._shouldRetry(null, requestRetries, maxRetries, error)) {
|
||||
return retryRequest(makeRequest, apiVersion, headers, requestRetries, null);
|
||||
}
|
||||
else {
|
||||
const isTimeoutError = error.code && error.code === HttpClient.TIMEOUT_ERROR_CODE;
|
||||
return callback(new StripeConnectionError({
|
||||
message: isTimeoutError
|
||||
? `Request aborted due to timeout being reached (${timeout}ms)`
|
||||
: RequestSender._generateConnectionErrorMessage(requestRetries),
|
||||
// @ts-ignore
|
||||
detail: error,
|
||||
}));
|
||||
}
|
||||
});
|
||||
};
|
||||
const prepareAndMakeRequest = (error, data) => {
|
||||
if (error) {
|
||||
return callback(error);
|
||||
}
|
||||
requestData = data;
|
||||
this._stripe.getClientUserAgent((clientUserAgent) => {
|
||||
var _a, _b;
|
||||
const apiVersion = this._stripe.getApiField('version');
|
||||
const headers = this._makeHeaders(auth, requestData.length, apiVersion, clientUserAgent, method, (_a = options.headers) !== null && _a !== void 0 ? _a : null, (_b = options.settings) !== null && _b !== void 0 ? _b : {});
|
||||
makeRequest(apiVersion, headers, 0);
|
||||
});
|
||||
};
|
||||
if (requestDataProcessor) {
|
||||
requestDataProcessor(method, data, options.headers, prepareAndMakeRequest);
|
||||
}
|
||||
else {
|
||||
prepareAndMakeRequest(null, stringifyRequestData(data || {}));
|
||||
}
|
||||
}
|
||||
}
|
||||
14
server/node_modules/stripe/esm/ResourceNamespace.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/ResourceNamespace.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// ResourceNamespace allows you to create nested resources, i.e. `stripe.issuing.cards`.
|
||||
// It also works recursively, so you could do i.e. `stripe.billing.invoicing.pay`.
|
||||
function ResourceNamespace(stripe, resources) {
|
||||
for (const name in resources) {
|
||||
const camelCaseName = name[0].toLowerCase() + name.substring(1);
|
||||
const resource = new resources[name](stripe);
|
||||
this[camelCaseName] = resource;
|
||||
}
|
||||
}
|
||||
export function resourceNamespace(namespace, resources) {
|
||||
return function (stripe) {
|
||||
return new ResourceNamespace(stripe, resources);
|
||||
};
|
||||
}
|
||||
42
server/node_modules/stripe/esm/StripeEmitter.js
generated
vendored
Normal file
42
server/node_modules/stripe/esm/StripeEmitter.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @private
|
||||
* (For internal use in stripe-node.)
|
||||
* Wrapper around the Event Web API.
|
||||
*/
|
||||
class _StripeEvent extends Event {
|
||||
constructor(eventName, data) {
|
||||
super(eventName);
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
/** Minimal EventEmitter wrapper around EventTarget. */
|
||||
export class StripeEmitter {
|
||||
constructor() {
|
||||
this.eventTarget = new EventTarget();
|
||||
this.listenerMapping = new Map();
|
||||
}
|
||||
on(eventName, listener) {
|
||||
const listenerWrapper = (event) => {
|
||||
listener(event.data);
|
||||
};
|
||||
this.listenerMapping.set(listener, listenerWrapper);
|
||||
return this.eventTarget.addEventListener(eventName, listenerWrapper);
|
||||
}
|
||||
removeListener(eventName, listener) {
|
||||
const listenerWrapper = this.listenerMapping.get(listener);
|
||||
this.listenerMapping.delete(listener);
|
||||
return this.eventTarget.removeEventListener(eventName, listenerWrapper);
|
||||
}
|
||||
once(eventName, listener) {
|
||||
const listenerWrapper = (event) => {
|
||||
listener(event.data);
|
||||
};
|
||||
this.listenerMapping.set(listener, listenerWrapper);
|
||||
return this.eventTarget.addEventListener(eventName, listenerWrapper, {
|
||||
once: true,
|
||||
});
|
||||
}
|
||||
emit(eventName, data) {
|
||||
return this.eventTarget.dispatchEvent(new _StripeEvent(eventName, data));
|
||||
}
|
||||
}
|
||||
32
server/node_modules/stripe/esm/StripeMethod.js
generated
vendored
Normal file
32
server/node_modules/stripe/esm/StripeMethod.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import { callbackifyPromiseWithTimeout, extractUrlParams } from './utils.js';
|
||||
import { makeAutoPaginationMethods } from './autoPagination.js';
|
||||
/**
|
||||
* Create an API method from the declared spec.
|
||||
*
|
||||
* @param [spec.method='GET'] Request Method (POST, GET, DELETE, PUT)
|
||||
* @param [spec.path=''] Path to be appended to the API BASE_PATH, joined with
|
||||
* the instance's path (e.g. 'charges' or 'customers')
|
||||
* @param [spec.fullPath=''] Fully qualified path to the method (eg. /v1/a/b/c).
|
||||
* If this is specified, path should not be specified.
|
||||
* @param [spec.urlParams=[]] Array of required arguments in the order that they
|
||||
* must be passed by the consumer of the API. Subsequent optional arguments are
|
||||
* optionally passed through a hash (Object) as the penultimate argument
|
||||
* (preceding the also-optional callback argument
|
||||
* @param [spec.encode] Function for mutating input parameters to a method.
|
||||
* Usefully for applying transforms to data on a per-method basis.
|
||||
* @param [spec.host] Hostname for the request.
|
||||
*
|
||||
* <!-- Public API accessible via Stripe.StripeResource.method -->
|
||||
*/
|
||||
export function stripeMethod(spec) {
|
||||
if (spec.path !== undefined && spec.fullPath !== undefined) {
|
||||
throw new Error(`Method spec specified both a 'path' (${spec.path}) and a 'fullPath' (${spec.fullPath}).`);
|
||||
}
|
||||
return function (...args) {
|
||||
const callback = typeof args[args.length - 1] == 'function' && args.pop();
|
||||
spec.urlParams = extractUrlParams(spec.fullPath || this.createResourcePathWithSymbols(spec.path || ''));
|
||||
const requestPromise = callbackifyPromiseWithTimeout(this._makeRequest(args, spec, {}), callback);
|
||||
Object.assign(requestPromise, makeAutoPaginationMethods(this, args, spec, requestPromise));
|
||||
return requestPromise;
|
||||
};
|
||||
}
|
||||
168
server/node_modules/stripe/esm/StripeResource.js
generated
vendored
Normal file
168
server/node_modules/stripe/esm/StripeResource.js
generated
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
import { getDataFromArgs, getOptionsFromArgs, makeURLInterpolator, protoExtend, stringifyRequestData, } from './utils.js';
|
||||
import { stripeMethod } from './StripeMethod.js';
|
||||
// Provide extension mechanism for Stripe Resource Sub-Classes
|
||||
StripeResource.extend = protoExtend;
|
||||
// Expose method-creator
|
||||
StripeResource.method = stripeMethod;
|
||||
StripeResource.MAX_BUFFERED_REQUEST_METRICS = 100;
|
||||
/**
|
||||
* Encapsulates request logic for a Stripe Resource
|
||||
*/
|
||||
function StripeResource(stripe, deprecatedUrlData) {
|
||||
this._stripe = stripe;
|
||||
if (deprecatedUrlData) {
|
||||
throw new Error('Support for curried url params was dropped in stripe-node v7.0.0. Instead, pass two ids.');
|
||||
}
|
||||
this.basePath = makeURLInterpolator(
|
||||
// @ts-ignore changing type of basePath
|
||||
this.basePath || stripe.getApiField('basePath'));
|
||||
// @ts-ignore changing type of path
|
||||
this.resourcePath = this.path;
|
||||
// @ts-ignore changing type of path
|
||||
this.path = makeURLInterpolator(this.path);
|
||||
this.initialize(...arguments);
|
||||
}
|
||||
StripeResource.prototype = {
|
||||
_stripe: null,
|
||||
// @ts-ignore the type of path changes in ctor
|
||||
path: '',
|
||||
resourcePath: '',
|
||||
// Methods that don't use the API's default '/v1' path can override it with this setting.
|
||||
basePath: null,
|
||||
initialize() { },
|
||||
// Function to override the default data processor. This allows full control
|
||||
// over how a StripeResource's request data will get converted into an HTTP
|
||||
// body. This is useful for non-standard HTTP requests. The function should
|
||||
// take method name, data, and headers as arguments.
|
||||
requestDataProcessor: null,
|
||||
// Function to add a validation checks before sending the request, errors should
|
||||
// be thrown, and they will be passed to the callback/promise.
|
||||
validateRequest: null,
|
||||
createFullPath(commandPath, urlData) {
|
||||
const urlParts = [this.basePath(urlData), this.path(urlData)];
|
||||
if (typeof commandPath === 'function') {
|
||||
const computedCommandPath = commandPath(urlData);
|
||||
// If we have no actual command path, we just omit it to avoid adding a
|
||||
// trailing slash. This is important for top-level listing requests, which
|
||||
// do not have a command path.
|
||||
if (computedCommandPath) {
|
||||
urlParts.push(computedCommandPath);
|
||||
}
|
||||
}
|
||||
else {
|
||||
urlParts.push(commandPath);
|
||||
}
|
||||
return this._joinUrlParts(urlParts);
|
||||
},
|
||||
// Creates a relative resource path with symbols left in (unlike
|
||||
// createFullPath which takes some data to replace them with). For example it
|
||||
// might produce: /invoices/{id}
|
||||
createResourcePathWithSymbols(pathWithSymbols) {
|
||||
// If there is no path beyond the resource path, we want to produce just
|
||||
// /<resource path> rather than /<resource path>/.
|
||||
if (pathWithSymbols) {
|
||||
return `/${this._joinUrlParts([this.resourcePath, pathWithSymbols])}`;
|
||||
}
|
||||
else {
|
||||
return `/${this.resourcePath}`;
|
||||
}
|
||||
},
|
||||
_joinUrlParts(parts) {
|
||||
// Replace any accidentally doubled up slashes. This previously used
|
||||
// path.join, which would do this as well. Unfortunately we need to do this
|
||||
// as the functions for creating paths are technically part of the public
|
||||
// interface and so we need to preserve backwards compatibility.
|
||||
return parts.join('/').replace(/\/{2,}/g, '/');
|
||||
},
|
||||
_getRequestOpts(requestArgs, spec, overrideData) {
|
||||
// Extract spec values with defaults.
|
||||
const requestMethod = (spec.method || 'GET').toUpperCase();
|
||||
const usage = spec.usage || [];
|
||||
const urlParams = spec.urlParams || [];
|
||||
const encode = spec.encode || ((data) => data);
|
||||
const isUsingFullPath = !!spec.fullPath;
|
||||
const commandPath = makeURLInterpolator(isUsingFullPath ? spec.fullPath : spec.path || '');
|
||||
// When using fullPath, we ignore the resource path as it should already be
|
||||
// fully qualified.
|
||||
const path = isUsingFullPath
|
||||
? spec.fullPath
|
||||
: this.createResourcePathWithSymbols(spec.path);
|
||||
// Don't mutate args externally.
|
||||
const args = [].slice.call(requestArgs);
|
||||
// Generate and validate url params.
|
||||
const urlData = urlParams.reduce((urlData, param) => {
|
||||
const arg = args.shift();
|
||||
if (typeof arg !== 'string') {
|
||||
throw new Error(`Stripe: Argument "${param}" must be a string, but got: ${arg} (on API request to \`${requestMethod} ${path}\`)`);
|
||||
}
|
||||
urlData[param] = arg;
|
||||
return urlData;
|
||||
}, {});
|
||||
// Pull request data and options (headers, auth) from args.
|
||||
const dataFromArgs = getDataFromArgs(args);
|
||||
const data = encode(Object.assign({}, dataFromArgs, overrideData));
|
||||
const options = getOptionsFromArgs(args);
|
||||
const host = options.host || spec.host;
|
||||
const streaming = !!spec.streaming;
|
||||
// Validate that there are no more args.
|
||||
if (args.filter((x) => x != null).length) {
|
||||
throw new Error(`Stripe: Unknown arguments (${args}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${requestMethod} \`${path}\`)`);
|
||||
}
|
||||
// When using full path, we can just invoke the URL interpolator directly
|
||||
// as we don't need to use the resource to create a full path.
|
||||
const requestPath = isUsingFullPath
|
||||
? commandPath(urlData)
|
||||
: this.createFullPath(commandPath, urlData);
|
||||
const headers = Object.assign(options.headers, spec.headers);
|
||||
if (spec.validator) {
|
||||
spec.validator(data, { headers });
|
||||
}
|
||||
const dataInQuery = spec.method === 'GET' || spec.method === 'DELETE';
|
||||
const bodyData = dataInQuery ? {} : data;
|
||||
const queryData = dataInQuery ? data : {};
|
||||
return {
|
||||
requestMethod,
|
||||
requestPath,
|
||||
bodyData,
|
||||
queryData,
|
||||
auth: options.auth,
|
||||
headers,
|
||||
host: host !== null && host !== void 0 ? host : null,
|
||||
streaming,
|
||||
settings: options.settings,
|
||||
usage,
|
||||
};
|
||||
},
|
||||
_makeRequest(requestArgs, spec, overrideData) {
|
||||
return new Promise((resolve, reject) => {
|
||||
var _a;
|
||||
let opts;
|
||||
try {
|
||||
opts = this._getRequestOpts(requestArgs, spec, overrideData);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
function requestCallback(err, response) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
}
|
||||
else {
|
||||
resolve(spec.transformResponseData
|
||||
? spec.transformResponseData(response)
|
||||
: response);
|
||||
}
|
||||
}
|
||||
const emptyQuery = Object.keys(opts.queryData).length === 0;
|
||||
const path = [
|
||||
opts.requestPath,
|
||||
emptyQuery ? '' : '?',
|
||||
stringifyRequestData(opts.queryData),
|
||||
].join('');
|
||||
const { headers, settings } = opts;
|
||||
this._stripe._requestSender._request(opts.requestMethod, opts.host, path, opts.bodyData, opts.auth, { headers, settings, streaming: opts.streaming }, opts.usage, requestCallback, (_a = this.requestDataProcessor) === null || _a === void 0 ? void 0 : _a.bind(this));
|
||||
});
|
||||
},
|
||||
};
|
||||
export { StripeResource };
|
||||
196
server/node_modules/stripe/esm/Webhooks.js
generated
vendored
Normal file
196
server/node_modules/stripe/esm/Webhooks.js
generated
vendored
Normal file
@@ -0,0 +1,196 @@
|
||||
import { StripeError, StripeSignatureVerificationError } from './Error.js';
|
||||
import { CryptoProviderOnlySupportsAsyncError, } from './crypto/CryptoProvider.js';
|
||||
export function createWebhooks(platformFunctions) {
|
||||
const Webhook = {
|
||||
DEFAULT_TOLERANCE: 300,
|
||||
// @ts-ignore
|
||||
signature: null,
|
||||
constructEvent(payload, header, secret, tolerance, cryptoProvider, receivedAt) {
|
||||
try {
|
||||
this.signature.verifyHeader(payload, header, secret, tolerance || Webhook.DEFAULT_TOLERANCE, cryptoProvider, receivedAt);
|
||||
}
|
||||
catch (e) {
|
||||
if (e instanceof CryptoProviderOnlySupportsAsyncError) {
|
||||
e.message +=
|
||||
'\nUse `await constructEventAsync(...)` instead of `constructEvent(...)`';
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
const jsonPayload = payload instanceof Uint8Array
|
||||
? JSON.parse(new TextDecoder('utf8').decode(payload))
|
||||
: JSON.parse(payload);
|
||||
return jsonPayload;
|
||||
},
|
||||
async constructEventAsync(payload, header, secret, tolerance, cryptoProvider, receivedAt) {
|
||||
await this.signature.verifyHeaderAsync(payload, header, secret, tolerance || Webhook.DEFAULT_TOLERANCE, cryptoProvider, receivedAt);
|
||||
const jsonPayload = payload instanceof Uint8Array
|
||||
? JSON.parse(new TextDecoder('utf8').decode(payload))
|
||||
: JSON.parse(payload);
|
||||
return jsonPayload;
|
||||
},
|
||||
/**
|
||||
* Generates a header to be used for webhook mocking
|
||||
*
|
||||
* @typedef {object} opts
|
||||
* @property {number} timestamp - Timestamp of the header. Defaults to Date.now()
|
||||
* @property {string} payload - JSON stringified payload object, containing the 'id' and 'object' parameters
|
||||
* @property {string} secret - Stripe webhook secret 'whsec_...'
|
||||
* @property {string} scheme - Version of API to hit. Defaults to 'v1'.
|
||||
* @property {string} signature - Computed webhook signature
|
||||
* @property {CryptoProvider} cryptoProvider - Crypto provider to use for computing the signature if none was provided. Defaults to NodeCryptoProvider.
|
||||
*/
|
||||
generateTestHeaderString: function (opts) {
|
||||
if (!opts) {
|
||||
throw new StripeError({
|
||||
message: 'Options are required',
|
||||
});
|
||||
}
|
||||
opts.timestamp =
|
||||
Math.floor(opts.timestamp) || Math.floor(Date.now() / 1000);
|
||||
opts.scheme = opts.scheme || signature.EXPECTED_SCHEME;
|
||||
opts.cryptoProvider = opts.cryptoProvider || getCryptoProvider();
|
||||
opts.signature =
|
||||
opts.signature ||
|
||||
opts.cryptoProvider.computeHMACSignature(opts.timestamp + '.' + opts.payload, opts.secret);
|
||||
const generatedHeader = [
|
||||
't=' + opts.timestamp,
|
||||
opts.scheme + '=' + opts.signature,
|
||||
].join(',');
|
||||
return generatedHeader;
|
||||
},
|
||||
};
|
||||
const signature = {
|
||||
EXPECTED_SCHEME: 'v1',
|
||||
verifyHeader(encodedPayload, encodedHeader, secret, tolerance, cryptoProvider, receivedAt) {
|
||||
const { decodedHeader: header, decodedPayload: payload, details, suspectPayloadType, } = parseEventDetails(encodedPayload, encodedHeader, this.EXPECTED_SCHEME);
|
||||
const secretContainsWhitespace = /\s/.test(secret);
|
||||
cryptoProvider = cryptoProvider || getCryptoProvider();
|
||||
const expectedSignature = cryptoProvider.computeHMACSignature(makeHMACContent(payload, details), secret);
|
||||
validateComputedSignature(payload, header, details, expectedSignature, tolerance, suspectPayloadType, secretContainsWhitespace, receivedAt);
|
||||
return true;
|
||||
},
|
||||
async verifyHeaderAsync(encodedPayload, encodedHeader, secret, tolerance, cryptoProvider, receivedAt) {
|
||||
const { decodedHeader: header, decodedPayload: payload, details, suspectPayloadType, } = parseEventDetails(encodedPayload, encodedHeader, this.EXPECTED_SCHEME);
|
||||
const secretContainsWhitespace = /\s/.test(secret);
|
||||
cryptoProvider = cryptoProvider || getCryptoProvider();
|
||||
const expectedSignature = await cryptoProvider.computeHMACSignatureAsync(makeHMACContent(payload, details), secret);
|
||||
return validateComputedSignature(payload, header, details, expectedSignature, tolerance, suspectPayloadType, secretContainsWhitespace, receivedAt);
|
||||
},
|
||||
};
|
||||
function makeHMACContent(payload, details) {
|
||||
return `${details.timestamp}.${payload}`;
|
||||
}
|
||||
function parseEventDetails(encodedPayload, encodedHeader, expectedScheme) {
|
||||
if (!encodedPayload) {
|
||||
throw new StripeSignatureVerificationError(encodedHeader, encodedPayload, {
|
||||
message: 'No webhook payload was provided.',
|
||||
});
|
||||
}
|
||||
const suspectPayloadType = typeof encodedPayload != 'string' &&
|
||||
!(encodedPayload instanceof Uint8Array);
|
||||
const textDecoder = new TextDecoder('utf8');
|
||||
const decodedPayload = encodedPayload instanceof Uint8Array
|
||||
? textDecoder.decode(encodedPayload)
|
||||
: encodedPayload;
|
||||
// Express's type for `Request#headers` is `string | []string`
|
||||
// which is because the `set-cookie` header is an array,
|
||||
// but no other headers are an array (docs: https://nodejs.org/api/http.html#http_message_headers)
|
||||
// (Express's Request class is an extension of http.IncomingMessage, and doesn't appear to be relevantly modified: https://github.com/expressjs/express/blob/master/lib/request.js#L31)
|
||||
if (Array.isArray(encodedHeader)) {
|
||||
throw new Error('Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.');
|
||||
}
|
||||
if (encodedHeader == null || encodedHeader == '') {
|
||||
throw new StripeSignatureVerificationError(encodedHeader, encodedPayload, {
|
||||
message: 'No stripe-signature header value was provided.',
|
||||
});
|
||||
}
|
||||
const decodedHeader = encodedHeader instanceof Uint8Array
|
||||
? textDecoder.decode(encodedHeader)
|
||||
: encodedHeader;
|
||||
const details = parseHeader(decodedHeader, expectedScheme);
|
||||
if (!details || details.timestamp === -1) {
|
||||
throw new StripeSignatureVerificationError(decodedHeader, decodedPayload, {
|
||||
message: 'Unable to extract timestamp and signatures from header',
|
||||
});
|
||||
}
|
||||
if (!details.signatures.length) {
|
||||
throw new StripeSignatureVerificationError(decodedHeader, decodedPayload, {
|
||||
message: 'No signatures found with expected scheme',
|
||||
});
|
||||
}
|
||||
return {
|
||||
decodedPayload,
|
||||
decodedHeader,
|
||||
details,
|
||||
suspectPayloadType,
|
||||
};
|
||||
}
|
||||
function validateComputedSignature(payload, header, details, expectedSignature, tolerance, suspectPayloadType, secretContainsWhitespace, receivedAt) {
|
||||
const signatureFound = !!details.signatures.filter(platformFunctions.secureCompare.bind(platformFunctions, expectedSignature)).length;
|
||||
const docsLocation = '\nLearn more about webhook signing and explore webhook integration examples for various frameworks at ' +
|
||||
'https://github.com/stripe/stripe-node#webhook-signing';
|
||||
const whitespaceMessage = secretContainsWhitespace
|
||||
? '\n\nNote: The provided signing secret contains whitespace. This often indicates an extra newline or space is in the value'
|
||||
: '';
|
||||
if (!signatureFound) {
|
||||
if (suspectPayloadType) {
|
||||
throw new StripeSignatureVerificationError(header, payload, {
|
||||
message: 'Webhook payload must be provided as a string or a Buffer (https://nodejs.org/api/buffer.html) instance representing the _raw_ request body.' +
|
||||
'Payload was provided as a parsed JavaScript object instead. \n' +
|
||||
'Signature verification is impossible without access to the original signed material. \n' +
|
||||
docsLocation +
|
||||
'\n' +
|
||||
whitespaceMessage,
|
||||
});
|
||||
}
|
||||
throw new StripeSignatureVerificationError(header, payload, {
|
||||
message: 'No signatures found matching the expected signature for payload.' +
|
||||
' Are you passing the raw request body you received from Stripe? \n' +
|
||||
' If a webhook request is being forwarded by a third-party tool,' +
|
||||
' ensure that the exact request body, including JSON formatting and new line style, is preserved.\n' +
|
||||
docsLocation +
|
||||
'\n' +
|
||||
whitespaceMessage,
|
||||
});
|
||||
}
|
||||
const timestampAge = Math.floor((typeof receivedAt === 'number' ? receivedAt : Date.now()) / 1000) - details.timestamp;
|
||||
if (tolerance > 0 && timestampAge > tolerance) {
|
||||
// @ts-ignore
|
||||
throw new StripeSignatureVerificationError(header, payload, {
|
||||
message: 'Timestamp outside the tolerance zone',
|
||||
});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function parseHeader(header, scheme) {
|
||||
if (typeof header !== 'string') {
|
||||
return null;
|
||||
}
|
||||
return header.split(',').reduce((accum, item) => {
|
||||
const kv = item.split('=');
|
||||
if (kv[0] === 't') {
|
||||
accum.timestamp = parseInt(kv[1], 10);
|
||||
}
|
||||
if (kv[0] === scheme) {
|
||||
accum.signatures.push(kv[1]);
|
||||
}
|
||||
return accum;
|
||||
}, {
|
||||
timestamp: -1,
|
||||
signatures: [],
|
||||
});
|
||||
}
|
||||
let webhooksCryptoProviderInstance = null;
|
||||
/**
|
||||
* Lazily instantiate a CryptoProvider instance. This is a stateless object
|
||||
* so a singleton can be used here.
|
||||
*/
|
||||
function getCryptoProvider() {
|
||||
if (!webhooksCryptoProviderInstance) {
|
||||
webhooksCryptoProviderInstance = platformFunctions.createDefaultCryptoProvider();
|
||||
}
|
||||
return webhooksCryptoProviderInstance;
|
||||
}
|
||||
Webhook.signature = signature;
|
||||
return Webhook;
|
||||
}
|
||||
2
server/node_modules/stripe/esm/apiVersion.js
generated
vendored
Normal file
2
server/node_modules/stripe/esm/apiVersion.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
// File generated from our OpenAPI spec
|
||||
export const ApiVersion = '2023-10-16';
|
||||
243
server/node_modules/stripe/esm/autoPagination.js
generated
vendored
Normal file
243
server/node_modules/stripe/esm/autoPagination.js
generated
vendored
Normal file
@@ -0,0 +1,243 @@
|
||||
import { callbackifyPromiseWithTimeout, getDataFromArgs } from './utils.js';
|
||||
class StripeIterator {
|
||||
constructor(firstPagePromise, requestArgs, spec, stripeResource) {
|
||||
this.index = 0;
|
||||
this.pagePromise = firstPagePromise;
|
||||
this.promiseCache = { currentPromise: null };
|
||||
this.requestArgs = requestArgs;
|
||||
this.spec = spec;
|
||||
this.stripeResource = stripeResource;
|
||||
}
|
||||
async iterate(pageResult) {
|
||||
if (!(pageResult &&
|
||||
pageResult.data &&
|
||||
typeof pageResult.data.length === 'number')) {
|
||||
throw Error('Unexpected: Stripe API response does not have a well-formed `data` array.');
|
||||
}
|
||||
const reverseIteration = isReverseIteration(this.requestArgs);
|
||||
if (this.index < pageResult.data.length) {
|
||||
const idx = reverseIteration
|
||||
? pageResult.data.length - 1 - this.index
|
||||
: this.index;
|
||||
const value = pageResult.data[idx];
|
||||
this.index += 1;
|
||||
return { value, done: false };
|
||||
}
|
||||
else if (pageResult.has_more) {
|
||||
// Reset counter, request next page, and recurse.
|
||||
this.index = 0;
|
||||
this.pagePromise = this.getNextPage(pageResult);
|
||||
const nextPageResult = await this.pagePromise;
|
||||
return this.iterate(nextPageResult);
|
||||
}
|
||||
return { done: true, value: undefined };
|
||||
}
|
||||
/** @abstract */
|
||||
getNextPage(_pageResult) {
|
||||
throw new Error('Unimplemented');
|
||||
}
|
||||
async _next() {
|
||||
return this.iterate(await this.pagePromise);
|
||||
}
|
||||
next() {
|
||||
/**
|
||||
* If a user calls `.next()` multiple times in parallel,
|
||||
* return the same result until something has resolved
|
||||
* to prevent page-turning race conditions.
|
||||
*/
|
||||
if (this.promiseCache.currentPromise) {
|
||||
return this.promiseCache.currentPromise;
|
||||
}
|
||||
const nextPromise = (async () => {
|
||||
const ret = await this._next();
|
||||
this.promiseCache.currentPromise = null;
|
||||
return ret;
|
||||
})();
|
||||
this.promiseCache.currentPromise = nextPromise;
|
||||
return nextPromise;
|
||||
}
|
||||
}
|
||||
class ListIterator extends StripeIterator {
|
||||
getNextPage(pageResult) {
|
||||
const reverseIteration = isReverseIteration(this.requestArgs);
|
||||
const lastId = getLastId(pageResult, reverseIteration);
|
||||
return this.stripeResource._makeRequest(this.requestArgs, this.spec, {
|
||||
[reverseIteration ? 'ending_before' : 'starting_after']: lastId,
|
||||
});
|
||||
}
|
||||
}
|
||||
class SearchIterator extends StripeIterator {
|
||||
getNextPage(pageResult) {
|
||||
if (!pageResult.next_page) {
|
||||
throw Error('Unexpected: Stripe API response does not have a well-formed `next_page` field, but `has_more` was true.');
|
||||
}
|
||||
return this.stripeResource._makeRequest(this.requestArgs, this.spec, {
|
||||
page: pageResult.next_page,
|
||||
});
|
||||
}
|
||||
}
|
||||
export const makeAutoPaginationMethods = (stripeResource, requestArgs, spec, firstPagePromise) => {
|
||||
if (spec.methodType === 'search') {
|
||||
return makeAutoPaginationMethodsFromIterator(new SearchIterator(firstPagePromise, requestArgs, spec, stripeResource));
|
||||
}
|
||||
if (spec.methodType === 'list') {
|
||||
return makeAutoPaginationMethodsFromIterator(new ListIterator(firstPagePromise, requestArgs, spec, stripeResource));
|
||||
}
|
||||
return null;
|
||||
};
|
||||
const makeAutoPaginationMethodsFromIterator = (iterator) => {
|
||||
const autoPagingEach = makeAutoPagingEach((...args) => iterator.next(...args));
|
||||
const autoPagingToArray = makeAutoPagingToArray(autoPagingEach);
|
||||
const autoPaginationMethods = {
|
||||
autoPagingEach,
|
||||
autoPagingToArray,
|
||||
// Async iterator functions:
|
||||
next: () => iterator.next(),
|
||||
return: () => {
|
||||
// This is required for `break`.
|
||||
return {};
|
||||
},
|
||||
[getAsyncIteratorSymbol()]: () => {
|
||||
return autoPaginationMethods;
|
||||
},
|
||||
};
|
||||
return autoPaginationMethods;
|
||||
};
|
||||
/**
|
||||
* ----------------
|
||||
* Private Helpers:
|
||||
* ----------------
|
||||
*/
|
||||
function getAsyncIteratorSymbol() {
|
||||
if (typeof Symbol !== 'undefined' && Symbol.asyncIterator) {
|
||||
return Symbol.asyncIterator;
|
||||
}
|
||||
// Follow the convention from libraries like iterall: https://github.com/leebyron/iterall#asynciterator-1
|
||||
return '@@asyncIterator';
|
||||
}
|
||||
function getDoneCallback(args) {
|
||||
if (args.length < 2) {
|
||||
return null;
|
||||
}
|
||||
const onDone = args[1];
|
||||
if (typeof onDone !== 'function') {
|
||||
throw Error(`The second argument to autoPagingEach, if present, must be a callback function; received ${typeof onDone}`);
|
||||
}
|
||||
return onDone;
|
||||
}
|
||||
/**
|
||||
* We allow four forms of the `onItem` callback (the middle two being equivalent),
|
||||
*
|
||||
* 1. `.autoPagingEach((item) => { doSomething(item); return false; });`
|
||||
* 2. `.autoPagingEach(async (item) => { await doSomething(item); return false; });`
|
||||
* 3. `.autoPagingEach((item) => doSomething(item).then(() => false));`
|
||||
* 4. `.autoPagingEach((item, next) => { doSomething(item); next(false); });`
|
||||
*
|
||||
* In addition to standard validation, this helper
|
||||
* coalesces the former forms into the latter form.
|
||||
*/
|
||||
function getItemCallback(args) {
|
||||
if (args.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
const onItem = args[0];
|
||||
if (typeof onItem !== 'function') {
|
||||
throw Error(`The first argument to autoPagingEach, if present, must be a callback function; received ${typeof onItem}`);
|
||||
}
|
||||
// 4. `.autoPagingEach((item, next) => { doSomething(item); next(false); });`
|
||||
if (onItem.length === 2) {
|
||||
return onItem;
|
||||
}
|
||||
if (onItem.length > 2) {
|
||||
throw Error(`The \`onItem\` callback function passed to autoPagingEach must accept at most two arguments; got ${onItem}`);
|
||||
}
|
||||
// This magically handles all three of these usecases (the latter two being functionally identical):
|
||||
// 1. `.autoPagingEach((item) => { doSomething(item); return false; });`
|
||||
// 2. `.autoPagingEach(async (item) => { await doSomething(item); return false; });`
|
||||
// 3. `.autoPagingEach((item) => doSomething(item).then(() => false));`
|
||||
return function _onItem(item, next) {
|
||||
const shouldContinue = onItem(item);
|
||||
next(shouldContinue);
|
||||
};
|
||||
}
|
||||
function getLastId(listResult, reverseIteration) {
|
||||
const lastIdx = reverseIteration ? 0 : listResult.data.length - 1;
|
||||
const lastItem = listResult.data[lastIdx];
|
||||
const lastId = lastItem && lastItem.id;
|
||||
if (!lastId) {
|
||||
throw Error('Unexpected: No `id` found on the last item while auto-paging a list.');
|
||||
}
|
||||
return lastId;
|
||||
}
|
||||
function makeAutoPagingEach(asyncIteratorNext) {
|
||||
return function autoPagingEach( /* onItem?, onDone? */) {
|
||||
const args = [].slice.call(arguments);
|
||||
const onItem = getItemCallback(args);
|
||||
const onDone = getDoneCallback(args);
|
||||
if (args.length > 2) {
|
||||
throw Error(`autoPagingEach takes up to two arguments; received ${args}`);
|
||||
}
|
||||
const autoPagePromise = wrapAsyncIteratorWithCallback(asyncIteratorNext,
|
||||
// @ts-ignore we might need a null check
|
||||
onItem);
|
||||
return callbackifyPromiseWithTimeout(autoPagePromise, onDone);
|
||||
};
|
||||
}
|
||||
function makeAutoPagingToArray(autoPagingEach) {
|
||||
return function autoPagingToArray(opts, onDone) {
|
||||
const limit = opts && opts.limit;
|
||||
if (!limit) {
|
||||
throw Error('You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.');
|
||||
}
|
||||
if (limit > 10000) {
|
||||
throw Error('You cannot specify a limit of more than 10,000 items to fetch in `autoPagingToArray`; use `autoPagingEach` to iterate through longer lists.');
|
||||
}
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
const items = [];
|
||||
autoPagingEach((item) => {
|
||||
items.push(item);
|
||||
if (items.length >= limit) {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
resolve(items);
|
||||
})
|
||||
.catch(reject);
|
||||
});
|
||||
// @ts-ignore
|
||||
return callbackifyPromiseWithTimeout(promise, onDone);
|
||||
};
|
||||
}
|
||||
function wrapAsyncIteratorWithCallback(asyncIteratorNext, onItem) {
|
||||
return new Promise((resolve, reject) => {
|
||||
function handleIteration(iterResult) {
|
||||
if (iterResult.done) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
const item = iterResult.value;
|
||||
return new Promise((next) => {
|
||||
// Bit confusing, perhaps; we pass a `resolve` fn
|
||||
// to the user, so they can decide when and if to continue.
|
||||
// They can return false, or a promise which resolves to false, to break.
|
||||
onItem(item, next);
|
||||
}).then((shouldContinue) => {
|
||||
if (shouldContinue === false) {
|
||||
return handleIteration({ done: true, value: undefined });
|
||||
}
|
||||
else {
|
||||
return asyncIteratorNext().then(handleIteration);
|
||||
}
|
||||
});
|
||||
}
|
||||
asyncIteratorNext()
|
||||
.then(handleIteration)
|
||||
.catch(reject);
|
||||
});
|
||||
}
|
||||
function isReverseIteration(requestArgs) {
|
||||
const args = [].slice.call(requestArgs);
|
||||
const dataFromArgs = getDataFromArgs(args);
|
||||
return !!dataFromArgs.ending_before;
|
||||
}
|
||||
40
server/node_modules/stripe/esm/crypto/CryptoProvider.js
generated
vendored
Normal file
40
server/node_modules/stripe/esm/crypto/CryptoProvider.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Interface encapsulating the various crypto computations used by the library,
|
||||
* allowing pluggable underlying crypto implementations.
|
||||
*/
|
||||
export class CryptoProvider {
|
||||
/**
|
||||
* Computes a SHA-256 HMAC given a secret and a payload (encoded in UTF-8).
|
||||
* The output HMAC should be encoded in hexadecimal.
|
||||
*
|
||||
* Sample values for implementations:
|
||||
* - computeHMACSignature('', 'test_secret') => 'f7f9bd47fb987337b5796fdc1fdb9ba221d0d5396814bfcaf9521f43fd8927fd'
|
||||
* - computeHMACSignature('\ud83d\ude00', 'test_secret') => '837da296d05c4fe31f61d5d7ead035099d9585a5bcde87de952012a78f0b0c43
|
||||
*/
|
||||
computeHMACSignature(payload, secret) {
|
||||
throw new Error('computeHMACSignature not implemented.');
|
||||
}
|
||||
/**
|
||||
* Asynchronous version of `computeHMACSignature`. Some implementations may
|
||||
* only allow support async signature computation.
|
||||
*
|
||||
* Computes a SHA-256 HMAC given a secret and a payload (encoded in UTF-8).
|
||||
* The output HMAC should be encoded in hexadecimal.
|
||||
*
|
||||
* Sample values for implementations:
|
||||
* - computeHMACSignature('', 'test_secret') => 'f7f9bd47fb987337b5796fdc1fdb9ba221d0d5396814bfcaf9521f43fd8927fd'
|
||||
* - computeHMACSignature('\ud83d\ude00', 'test_secret') => '837da296d05c4fe31f61d5d7ead035099d9585a5bcde87de952012a78f0b0c43
|
||||
*/
|
||||
computeHMACSignatureAsync(payload, secret) {
|
||||
throw new Error('computeHMACSignatureAsync not implemented.');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* If the crypto provider only supports asynchronous operations,
|
||||
* throw CryptoProviderOnlySupportsAsyncError instead of
|
||||
* a generic error so that the caller can choose to provide
|
||||
* a more helpful error message to direct the user to use
|
||||
* an asynchronous pathway.
|
||||
*/
|
||||
export class CryptoProviderOnlySupportsAsyncError extends Error {
|
||||
}
|
||||
19
server/node_modules/stripe/esm/crypto/NodeCryptoProvider.js
generated
vendored
Normal file
19
server/node_modules/stripe/esm/crypto/NodeCryptoProvider.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import * as crypto from 'crypto';
|
||||
import { CryptoProvider } from './CryptoProvider.js';
|
||||
/**
|
||||
* `CryptoProvider which uses the Node `crypto` package for its computations.
|
||||
*/
|
||||
export class NodeCryptoProvider extends CryptoProvider {
|
||||
/** @override */
|
||||
computeHMACSignature(payload, secret) {
|
||||
return crypto
|
||||
.createHmac('sha256', secret)
|
||||
.update(payload, 'utf8')
|
||||
.digest('hex');
|
||||
}
|
||||
/** @override */
|
||||
async computeHMACSignatureAsync(payload, secret) {
|
||||
const signature = await this.computeHMACSignature(payload, secret);
|
||||
return signature;
|
||||
}
|
||||
}
|
||||
43
server/node_modules/stripe/esm/crypto/SubtleCryptoProvider.js
generated
vendored
Normal file
43
server/node_modules/stripe/esm/crypto/SubtleCryptoProvider.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
import { CryptoProvider, CryptoProviderOnlySupportsAsyncError, } from './CryptoProvider.js';
|
||||
/**
|
||||
* `CryptoProvider which uses the SubtleCrypto interface of the Web Crypto API.
|
||||
*
|
||||
* This only supports asynchronous operations.
|
||||
*/
|
||||
export class SubtleCryptoProvider extends CryptoProvider {
|
||||
constructor(subtleCrypto) {
|
||||
super();
|
||||
// If no subtle crypto is interface, default to the global namespace. This
|
||||
// is to allow custom interfaces (eg. using the Node webcrypto interface in
|
||||
// tests).
|
||||
this.subtleCrypto = subtleCrypto || crypto.subtle;
|
||||
}
|
||||
/** @override */
|
||||
computeHMACSignature(payload, secret) {
|
||||
throw new CryptoProviderOnlySupportsAsyncError('SubtleCryptoProvider cannot be used in a synchronous context.');
|
||||
}
|
||||
/** @override */
|
||||
async computeHMACSignatureAsync(payload, secret) {
|
||||
const encoder = new TextEncoder();
|
||||
const key = await this.subtleCrypto.importKey('raw', encoder.encode(secret), {
|
||||
name: 'HMAC',
|
||||
hash: { name: 'SHA-256' },
|
||||
}, false, ['sign']);
|
||||
const signatureBuffer = await this.subtleCrypto.sign('hmac', key, encoder.encode(payload));
|
||||
// crypto.subtle returns the signature in base64 format. This must be
|
||||
// encoded in hex to match the CryptoProvider contract. We map each byte in
|
||||
// the buffer to its corresponding hex octet and then combine into a string.
|
||||
const signatureBytes = new Uint8Array(signatureBuffer);
|
||||
const signatureHexCodes = new Array(signatureBytes.length);
|
||||
for (let i = 0; i < signatureBytes.length; i++) {
|
||||
signatureHexCodes[i] = byteHexMapping[signatureBytes[i]];
|
||||
}
|
||||
return signatureHexCodes.join('');
|
||||
}
|
||||
}
|
||||
// Cached mapping of byte to hex representation. We do this once to avoid re-
|
||||
// computing every time we need to convert the result of a signature to hex.
|
||||
const byteHexMapping = new Array(256);
|
||||
for (let i = 0; i < byteHexMapping.length; i++) {
|
||||
byteHexMapping[i] = i.toString(16).padStart(2, '0');
|
||||
}
|
||||
54
server/node_modules/stripe/esm/multipart.js
generated
vendored
Normal file
54
server/node_modules/stripe/esm/multipart.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
import { flattenAndStringify, stringifyRequestData } from './utils.js';
|
||||
// Method for formatting HTTP body for the multipart/form-data specification
|
||||
// Mostly taken from Fermata.js
|
||||
// https://github.com/natevw/fermata/blob/5d9732a33d776ce925013a265935facd1626cc88/fermata.js#L315-L343
|
||||
const multipartDataGenerator = (method, data, headers) => {
|
||||
const segno = (Math.round(Math.random() * 1e16) + Math.round(Math.random() * 1e16)).toString();
|
||||
headers['Content-Type'] = `multipart/form-data; boundary=${segno}`;
|
||||
const textEncoder = new TextEncoder();
|
||||
let buffer = new Uint8Array(0);
|
||||
const endBuffer = textEncoder.encode('\r\n');
|
||||
function push(l) {
|
||||
const prevBuffer = buffer;
|
||||
const newBuffer = l instanceof Uint8Array ? l : new Uint8Array(textEncoder.encode(l));
|
||||
buffer = new Uint8Array(prevBuffer.length + newBuffer.length + 2);
|
||||
buffer.set(prevBuffer);
|
||||
buffer.set(newBuffer, prevBuffer.length);
|
||||
buffer.set(endBuffer, buffer.length - 2);
|
||||
}
|
||||
function q(s) {
|
||||
return `"${s.replace(/"|"/g, '%22').replace(/\r\n|\r|\n/g, ' ')}"`;
|
||||
}
|
||||
const flattenedData = flattenAndStringify(data);
|
||||
for (const k in flattenedData) {
|
||||
const v = flattenedData[k];
|
||||
push(`--${segno}`);
|
||||
if (Object.prototype.hasOwnProperty.call(v, 'data')) {
|
||||
const typedEntry = v;
|
||||
push(`Content-Disposition: form-data; name=${q(k)}; filename=${q(typedEntry.name || 'blob')}`);
|
||||
push(`Content-Type: ${typedEntry.type || 'application/octet-stream'}`);
|
||||
push('');
|
||||
push(typedEntry.data);
|
||||
}
|
||||
else {
|
||||
push(`Content-Disposition: form-data; name=${q(k)}`);
|
||||
push('');
|
||||
push(v);
|
||||
}
|
||||
}
|
||||
push(`--${segno}--`);
|
||||
return buffer;
|
||||
};
|
||||
export function multipartRequestDataProcessor(method, data, headers, callback) {
|
||||
data = data || {};
|
||||
if (method !== 'POST') {
|
||||
return callback(null, stringifyRequestData(data));
|
||||
}
|
||||
this._stripe._platformFunctions
|
||||
.tryBufferData(data)
|
||||
.then((bufferedData) => {
|
||||
const buffer = multipartDataGenerator(method, bufferedData, headers);
|
||||
return callback(null, buffer);
|
||||
})
|
||||
.catch((err) => callback(err, null));
|
||||
}
|
||||
138
server/node_modules/stripe/esm/net/FetchHttpClient.js
generated
vendored
Normal file
138
server/node_modules/stripe/esm/net/FetchHttpClient.js
generated
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
import { HttpClient, HttpClientResponse, } from './HttpClient.js';
|
||||
/**
|
||||
* HTTP client which uses a `fetch` function to issue requests.
|
||||
*
|
||||
* By default relies on the global `fetch` function, but an optional function
|
||||
* can be passed in. If passing in a function, it is expected to match the Web
|
||||
* Fetch API. As an example, this could be the function provided by the
|
||||
* node-fetch package (https://github.com/node-fetch/node-fetch).
|
||||
*/
|
||||
export class FetchHttpClient extends HttpClient {
|
||||
constructor(fetchFn) {
|
||||
super();
|
||||
// Default to global fetch if available
|
||||
if (!fetchFn) {
|
||||
if (!globalThis.fetch) {
|
||||
throw new Error('fetch() function not provided and is not defined in the global scope. ' +
|
||||
'You must provide a fetch implementation.');
|
||||
}
|
||||
fetchFn = globalThis.fetch;
|
||||
}
|
||||
// Both timeout behaviors differs from Node:
|
||||
// - Fetch uses a single timeout for the entire length of the request.
|
||||
// - Node is more fine-grained and resets the timeout after each stage of the request.
|
||||
if (globalThis.AbortController) {
|
||||
// Utilise native AbortController if available
|
||||
// AbortController was added in Node v15.0.0, v14.17.0
|
||||
this._fetchFn = FetchHttpClient.makeFetchWithAbortTimeout(fetchFn);
|
||||
}
|
||||
else {
|
||||
// Fall back to racing against a timeout promise if not available in the runtime
|
||||
// This does not actually cancel the underlying fetch operation or resources
|
||||
this._fetchFn = FetchHttpClient.makeFetchWithRaceTimeout(fetchFn);
|
||||
}
|
||||
}
|
||||
static makeFetchWithRaceTimeout(fetchFn) {
|
||||
return (url, init, timeout) => {
|
||||
let pendingTimeoutId;
|
||||
const timeoutPromise = new Promise((_, reject) => {
|
||||
pendingTimeoutId = setTimeout(() => {
|
||||
pendingTimeoutId = null;
|
||||
reject(HttpClient.makeTimeoutError());
|
||||
}, timeout);
|
||||
});
|
||||
const fetchPromise = fetchFn(url, init);
|
||||
return Promise.race([fetchPromise, timeoutPromise]).finally(() => {
|
||||
if (pendingTimeoutId) {
|
||||
clearTimeout(pendingTimeoutId);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
static makeFetchWithAbortTimeout(fetchFn) {
|
||||
return async (url, init, timeout) => {
|
||||
// Use AbortController because AbortSignal.timeout() was added later in Node v17.3.0, v16.14.0
|
||||
const abort = new AbortController();
|
||||
let timeoutId = setTimeout(() => {
|
||||
timeoutId = null;
|
||||
abort.abort(HttpClient.makeTimeoutError());
|
||||
}, timeout);
|
||||
try {
|
||||
return await fetchFn(url, Object.assign(Object.assign({}, init), { signal: abort.signal }));
|
||||
}
|
||||
catch (err) {
|
||||
// Some implementations, like node-fetch, do not respect the reason passed to AbortController.abort()
|
||||
// and instead it always throws an AbortError
|
||||
// We catch this case to normalise all timeout errors
|
||||
if (err.name === 'AbortError') {
|
||||
throw HttpClient.makeTimeoutError();
|
||||
}
|
||||
else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
finally {
|
||||
if (timeoutId) {
|
||||
clearTimeout(timeoutId);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
/** @override. */
|
||||
getClientName() {
|
||||
return 'fetch';
|
||||
}
|
||||
async makeRequest(host, port, path, method, headers, requestData, protocol, timeout) {
|
||||
const isInsecureConnection = protocol === 'http';
|
||||
const url = new URL(path, `${isInsecureConnection ? 'http' : 'https'}://${host}`);
|
||||
url.port = port;
|
||||
// For methods which expect payloads, we should always pass a body value
|
||||
// even when it is empty. Without this, some JS runtimes (eg. Deno) will
|
||||
// inject a second Content-Length header. See https://github.com/stripe/stripe-node/issues/1519
|
||||
// for more details.
|
||||
const methodHasPayload = method == 'POST' || method == 'PUT' || method == 'PATCH';
|
||||
const body = requestData || (methodHasPayload ? '' : undefined);
|
||||
const res = await this._fetchFn(url.toString(), {
|
||||
method,
|
||||
// @ts-ignore
|
||||
headers,
|
||||
// @ts-ignore
|
||||
body,
|
||||
}, timeout);
|
||||
return new FetchHttpClientResponse(res);
|
||||
}
|
||||
}
|
||||
export class FetchHttpClientResponse extends HttpClientResponse {
|
||||
constructor(res) {
|
||||
super(res.status, FetchHttpClientResponse._transformHeadersToObject(res.headers));
|
||||
this._res = res;
|
||||
}
|
||||
getRawResponse() {
|
||||
return this._res;
|
||||
}
|
||||
toStream(streamCompleteCallback) {
|
||||
// Unfortunately `fetch` does not have event handlers for when the stream is
|
||||
// completely read. We therefore invoke the streamCompleteCallback right
|
||||
// away. This callback emits a response event with metadata and completes
|
||||
// metrics, so it's ok to do this without waiting for the stream to be
|
||||
// completely read.
|
||||
streamCompleteCallback();
|
||||
// Fetch's `body` property is expected to be a readable stream of the body.
|
||||
return this._res.body;
|
||||
}
|
||||
toJSON() {
|
||||
return this._res.json();
|
||||
}
|
||||
static _transformHeadersToObject(headers) {
|
||||
// Fetch uses a Headers instance so this must be converted to a barebones
|
||||
// JS object to meet the HttpClient interface.
|
||||
const headersObj = {};
|
||||
for (const entry of headers) {
|
||||
if (!Array.isArray(entry) || entry.length != 2) {
|
||||
throw new Error('Response objects produced by the fetch function given to FetchHttpClient do not have an iterable headers map. Response#headers should be an iterable object.');
|
||||
}
|
||||
headersObj[entry[0]] = entry[1];
|
||||
}
|
||||
return headersObj;
|
||||
}
|
||||
}
|
||||
48
server/node_modules/stripe/esm/net/HttpClient.js
generated
vendored
Normal file
48
server/node_modules/stripe/esm/net/HttpClient.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Encapsulates the logic for issuing a request to the Stripe API.
|
||||
*
|
||||
* A custom HTTP client should should implement:
|
||||
* 1. A response class which extends HttpClientResponse and wraps around their
|
||||
* own internal representation of a response.
|
||||
* 2. A client class which extends HttpClient and implements all methods,
|
||||
* returning their own response class when making requests.
|
||||
*/
|
||||
export class HttpClient {
|
||||
/** The client name used for diagnostics. */
|
||||
getClientName() {
|
||||
throw new Error('getClientName not implemented.');
|
||||
}
|
||||
makeRequest(host, port, path, method, headers, requestData, protocol, timeout) {
|
||||
throw new Error('makeRequest not implemented.');
|
||||
}
|
||||
/** Helper to make a consistent timeout error across implementations. */
|
||||
static makeTimeoutError() {
|
||||
const timeoutErr = new TypeError(HttpClient.TIMEOUT_ERROR_CODE);
|
||||
timeoutErr.code = HttpClient.TIMEOUT_ERROR_CODE;
|
||||
return timeoutErr;
|
||||
}
|
||||
}
|
||||
// Public API accessible via Stripe.HttpClient
|
||||
HttpClient.CONNECTION_CLOSED_ERROR_CODES = ['ECONNRESET', 'EPIPE'];
|
||||
HttpClient.TIMEOUT_ERROR_CODE = 'ETIMEDOUT';
|
||||
export class HttpClientResponse {
|
||||
constructor(statusCode, headers) {
|
||||
this._statusCode = statusCode;
|
||||
this._headers = headers;
|
||||
}
|
||||
getStatusCode() {
|
||||
return this._statusCode;
|
||||
}
|
||||
getHeaders() {
|
||||
return this._headers;
|
||||
}
|
||||
getRawResponse() {
|
||||
throw new Error('getRawResponse not implemented.');
|
||||
}
|
||||
toStream(streamCompleteCallback) {
|
||||
throw new Error('toStream not implemented.');
|
||||
}
|
||||
toJSON() {
|
||||
throw new Error('toJSON not implemented.');
|
||||
}
|
||||
}
|
||||
103
server/node_modules/stripe/esm/net/NodeHttpClient.js
generated
vendored
Normal file
103
server/node_modules/stripe/esm/net/NodeHttpClient.js
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
import * as http_ from 'http';
|
||||
import * as https_ from 'https';
|
||||
import { HttpClient, HttpClientResponse, } from './HttpClient.js';
|
||||
// `import * as http_ from 'http'` creates a "Module Namespace Exotic Object"
|
||||
// which is immune to monkey-patching, whereas http_.default (in an ES Module context)
|
||||
// will resolve to the same thing as require('http'), which is
|
||||
// monkey-patchable. We care about this because users in their test
|
||||
// suites might be using a library like "nock" which relies on the ability
|
||||
// to monkey-patch and intercept calls to http.request.
|
||||
const http = http_.default || http_;
|
||||
const https = https_.default || https_;
|
||||
const defaultHttpAgent = new http.Agent({ keepAlive: true });
|
||||
const defaultHttpsAgent = new https.Agent({ keepAlive: true });
|
||||
/**
|
||||
* HTTP client which uses the Node `http` and `https` packages to issue
|
||||
* requests.`
|
||||
*/
|
||||
export class NodeHttpClient extends HttpClient {
|
||||
constructor(agent) {
|
||||
super();
|
||||
this._agent = agent;
|
||||
}
|
||||
/** @override. */
|
||||
getClientName() {
|
||||
return 'node';
|
||||
}
|
||||
makeRequest(host, port, path, method, headers, requestData, protocol, timeout) {
|
||||
const isInsecureConnection = protocol === 'http';
|
||||
let agent = this._agent;
|
||||
if (!agent) {
|
||||
agent = isInsecureConnection ? defaultHttpAgent : defaultHttpsAgent;
|
||||
}
|
||||
const requestPromise = new Promise((resolve, reject) => {
|
||||
const req = (isInsecureConnection ? http : https).request({
|
||||
host: host,
|
||||
port: port,
|
||||
path,
|
||||
method,
|
||||
agent,
|
||||
headers,
|
||||
ciphers: 'DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:!MD5',
|
||||
});
|
||||
req.setTimeout(timeout, () => {
|
||||
req.destroy(HttpClient.makeTimeoutError());
|
||||
});
|
||||
req.on('response', (res) => {
|
||||
resolve(new NodeHttpClientResponse(res));
|
||||
});
|
||||
req.on('error', (error) => {
|
||||
reject(error);
|
||||
});
|
||||
req.once('socket', (socket) => {
|
||||
if (socket.connecting) {
|
||||
socket.once(isInsecureConnection ? 'connect' : 'secureConnect', () => {
|
||||
// Send payload; we're safe:
|
||||
req.write(requestData);
|
||||
req.end();
|
||||
});
|
||||
}
|
||||
else {
|
||||
// we're already connected
|
||||
req.write(requestData);
|
||||
req.end();
|
||||
}
|
||||
});
|
||||
});
|
||||
return requestPromise;
|
||||
}
|
||||
}
|
||||
export class NodeHttpClientResponse extends HttpClientResponse {
|
||||
constructor(res) {
|
||||
// @ts-ignore
|
||||
super(res.statusCode, res.headers || {});
|
||||
this._res = res;
|
||||
}
|
||||
getRawResponse() {
|
||||
return this._res;
|
||||
}
|
||||
toStream(streamCompleteCallback) {
|
||||
// The raw response is itself the stream, so we just return that. To be
|
||||
// backwards compatible, we should invoke the streamCompleteCallback only
|
||||
// once the stream has been fully consumed.
|
||||
this._res.once('end', () => streamCompleteCallback());
|
||||
return this._res;
|
||||
}
|
||||
toJSON() {
|
||||
return new Promise((resolve, reject) => {
|
||||
let response = '';
|
||||
this._res.setEncoding('utf8');
|
||||
this._res.on('data', (chunk) => {
|
||||
response += chunk;
|
||||
});
|
||||
this._res.once('end', () => {
|
||||
try {
|
||||
resolve(JSON.parse(response));
|
||||
}
|
||||
catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
1
server/node_modules/stripe/esm/package.json
generated
vendored
Normal file
1
server/node_modules/stripe/esm/package.json
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"type":"module"}
|
||||
122
server/node_modules/stripe/esm/platform/NodePlatformFunctions.js
generated
vendored
Normal file
122
server/node_modules/stripe/esm/platform/NodePlatformFunctions.js
generated
vendored
Normal file
@@ -0,0 +1,122 @@
|
||||
import * as crypto from 'crypto';
|
||||
import { EventEmitter } from 'events';
|
||||
import { NodeCryptoProvider } from '../crypto/NodeCryptoProvider.js';
|
||||
import { NodeHttpClient } from '../net/NodeHttpClient.js';
|
||||
import { PlatformFunctions } from './PlatformFunctions.js';
|
||||
import { StripeError } from '../Error.js';
|
||||
import { concat } from '../utils.js';
|
||||
import { exec } from 'child_process';
|
||||
class StreamProcessingError extends StripeError {
|
||||
}
|
||||
/**
|
||||
* Specializes WebPlatformFunctions using APIs available in Node.js.
|
||||
*/
|
||||
export class NodePlatformFunctions extends PlatformFunctions {
|
||||
constructor() {
|
||||
super();
|
||||
this._exec = exec;
|
||||
this._UNAME_CACHE = null;
|
||||
}
|
||||
/** @override */
|
||||
uuid4() {
|
||||
// available in: v14.17.x+
|
||||
if (crypto.randomUUID) {
|
||||
return crypto.randomUUID();
|
||||
}
|
||||
return super.uuid4();
|
||||
}
|
||||
/**
|
||||
* @override
|
||||
* Node's built in `exec` function sometimes throws outright,
|
||||
* and sometimes has a callback with an error,
|
||||
* depending on the type of error.
|
||||
*
|
||||
* This unifies that interface by resolving with a null uname
|
||||
* if an error is encountered.
|
||||
*/
|
||||
getUname() {
|
||||
if (!this._UNAME_CACHE) {
|
||||
this._UNAME_CACHE = new Promise((resolve, reject) => {
|
||||
try {
|
||||
this._exec('uname -a', (err, uname) => {
|
||||
if (err) {
|
||||
return resolve(null);
|
||||
}
|
||||
resolve(uname);
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
resolve(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
return this._UNAME_CACHE;
|
||||
}
|
||||
/**
|
||||
* @override
|
||||
* Secure compare, from https://github.com/freewil/scmp
|
||||
*/
|
||||
secureCompare(a, b) {
|
||||
if (!a || !b) {
|
||||
throw new Error('secureCompare must receive two arguments');
|
||||
}
|
||||
// return early here if buffer lengths are not equal since timingSafeEqual
|
||||
// will throw if buffer lengths are not equal
|
||||
if (a.length !== b.length) {
|
||||
return false;
|
||||
}
|
||||
// use crypto.timingSafeEqual if available (since Node.js v6.6.0),
|
||||
// otherwise use our own scmp-internal function.
|
||||
if (crypto.timingSafeEqual) {
|
||||
const textEncoder = new TextEncoder();
|
||||
const aEncoded = textEncoder.encode(a);
|
||||
const bEncoded = textEncoder.encode(b);
|
||||
return crypto.timingSafeEqual(aEncoded, bEncoded);
|
||||
}
|
||||
return super.secureCompare(a, b);
|
||||
}
|
||||
createEmitter() {
|
||||
return new EventEmitter();
|
||||
}
|
||||
/** @override */
|
||||
tryBufferData(data) {
|
||||
if (!(data.file.data instanceof EventEmitter)) {
|
||||
return Promise.resolve(data);
|
||||
}
|
||||
const bufferArray = [];
|
||||
return new Promise((resolve, reject) => {
|
||||
data.file.data
|
||||
.on('data', (line) => {
|
||||
bufferArray.push(line);
|
||||
})
|
||||
.once('end', () => {
|
||||
// @ts-ignore
|
||||
const bufferData = Object.assign({}, data);
|
||||
bufferData.file.data = concat(bufferArray);
|
||||
resolve(bufferData);
|
||||
})
|
||||
.on('error', (err) => {
|
||||
reject(new StreamProcessingError({
|
||||
message: 'An error occurred while attempting to process the file for upload.',
|
||||
detail: err,
|
||||
}));
|
||||
});
|
||||
});
|
||||
}
|
||||
/** @override */
|
||||
createNodeHttpClient(agent) {
|
||||
return new NodeHttpClient(agent);
|
||||
}
|
||||
/** @override */
|
||||
createDefaultHttpClient() {
|
||||
return new NodeHttpClient();
|
||||
}
|
||||
/** @override */
|
||||
createNodeCryptoProvider() {
|
||||
return new NodeCryptoProvider();
|
||||
}
|
||||
/** @override */
|
||||
createDefaultCryptoProvider() {
|
||||
return this.createNodeCryptoProvider();
|
||||
}
|
||||
}
|
||||
94
server/node_modules/stripe/esm/platform/PlatformFunctions.js
generated
vendored
Normal file
94
server/node_modules/stripe/esm/platform/PlatformFunctions.js
generated
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
import { FetchHttpClient } from '../net/FetchHttpClient.js';
|
||||
import { SubtleCryptoProvider } from '../crypto/SubtleCryptoProvider.js';
|
||||
/**
|
||||
* Interface encapsulating various utility functions whose
|
||||
* implementations depend on the platform / JS runtime.
|
||||
*/
|
||||
export class PlatformFunctions {
|
||||
constructor() {
|
||||
this._fetchFn = null;
|
||||
this._agent = null;
|
||||
}
|
||||
/**
|
||||
* Gets uname with Node's built-in `exec` function, if available.
|
||||
*/
|
||||
getUname() {
|
||||
throw new Error('getUname not implemented.');
|
||||
}
|
||||
/**
|
||||
* Generates a v4 UUID. See https://stackoverflow.com/a/2117523
|
||||
*/
|
||||
uuid4() {
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
||||
const r = (Math.random() * 16) | 0;
|
||||
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
||||
return v.toString(16);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Compares strings in constant time.
|
||||
*/
|
||||
secureCompare(a, b) {
|
||||
// return early here if buffer lengths are not equal
|
||||
if (a.length !== b.length) {
|
||||
return false;
|
||||
}
|
||||
const len = a.length;
|
||||
let result = 0;
|
||||
for (let i = 0; i < len; ++i) {
|
||||
result |= a.charCodeAt(i) ^ b.charCodeAt(i);
|
||||
}
|
||||
return result === 0;
|
||||
}
|
||||
/**
|
||||
* Creates an event emitter.
|
||||
*/
|
||||
createEmitter() {
|
||||
throw new Error('createEmitter not implemented.');
|
||||
}
|
||||
/**
|
||||
* Checks if the request data is a stream. If so, read the entire stream
|
||||
* to a buffer and return the buffer.
|
||||
*/
|
||||
tryBufferData(data) {
|
||||
throw new Error('tryBufferData not implemented.');
|
||||
}
|
||||
/**
|
||||
* Creates an HTTP client which uses the Node `http` and `https` packages
|
||||
* to issue requests.
|
||||
*/
|
||||
createNodeHttpClient(agent) {
|
||||
throw new Error('createNodeHttpClient not implemented.');
|
||||
}
|
||||
/**
|
||||
* Creates an HTTP client for issuing Stripe API requests which uses the Web
|
||||
* Fetch API.
|
||||
*
|
||||
* A fetch function can optionally be passed in as a parameter. If none is
|
||||
* passed, will default to the default `fetch` function in the global scope.
|
||||
*/
|
||||
createFetchHttpClient(fetchFn) {
|
||||
return new FetchHttpClient(fetchFn);
|
||||
}
|
||||
/**
|
||||
* Creates an HTTP client using runtime-specific APIs.
|
||||
*/
|
||||
createDefaultHttpClient() {
|
||||
throw new Error('createDefaultHttpClient not implemented.');
|
||||
}
|
||||
/**
|
||||
* Creates a CryptoProvider which uses the Node `crypto` package for its computations.
|
||||
*/
|
||||
createNodeCryptoProvider() {
|
||||
throw new Error('createNodeCryptoProvider not implemented.');
|
||||
}
|
||||
/**
|
||||
* Creates a CryptoProvider which uses the SubtleCrypto interface of the Web Crypto API.
|
||||
*/
|
||||
createSubtleCryptoProvider(subtleCrypto) {
|
||||
return new SubtleCryptoProvider(subtleCrypto);
|
||||
}
|
||||
createDefaultCryptoProvider() {
|
||||
throw new Error('createDefaultCryptoProvider not implemented.');
|
||||
}
|
||||
}
|
||||
38
server/node_modules/stripe/esm/platform/WebPlatformFunctions.js
generated
vendored
Normal file
38
server/node_modules/stripe/esm/platform/WebPlatformFunctions.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import { PlatformFunctions } from './PlatformFunctions.js';
|
||||
import { StripeEmitter } from '../StripeEmitter.js';
|
||||
/**
|
||||
* Specializes WebPlatformFunctions using APIs available in Web workers.
|
||||
*/
|
||||
export class WebPlatformFunctions extends PlatformFunctions {
|
||||
/** @override */
|
||||
getUname() {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
/** @override */
|
||||
createEmitter() {
|
||||
return new StripeEmitter();
|
||||
}
|
||||
/** @override */
|
||||
tryBufferData(data) {
|
||||
if (data.file.data instanceof ReadableStream) {
|
||||
throw new Error('Uploading a file as a stream is not supported in non-Node environments. Please open or upvote an issue at github.com/stripe/stripe-node if you use this, detailing your use-case.');
|
||||
}
|
||||
return Promise.resolve(data);
|
||||
}
|
||||
/** @override */
|
||||
createNodeHttpClient() {
|
||||
throw new Error('Stripe: `createNodeHttpClient()` is not available in non-Node environments. Please use `createFetchHttpClient()` instead.');
|
||||
}
|
||||
/** @override */
|
||||
createDefaultHttpClient() {
|
||||
return super.createFetchHttpClient();
|
||||
}
|
||||
/** @override */
|
||||
createNodeCryptoProvider() {
|
||||
throw new Error('Stripe: `createNodeCryptoProvider()` is not available in non-Node environments. Please use `createSubtleCryptoProvider()` instead.');
|
||||
}
|
||||
/** @override */
|
||||
createDefaultCryptoProvider() {
|
||||
return this.createSubtleCryptoProvider();
|
||||
}
|
||||
}
|
||||
220
server/node_modules/stripe/esm/resources.js
generated
vendored
Normal file
220
server/node_modules/stripe/esm/resources.js
generated
vendored
Normal file
@@ -0,0 +1,220 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { resourceNamespace } from './ResourceNamespace.js';
|
||||
import { Accounts as FinancialConnectionsAccounts } from './resources/FinancialConnections/Accounts.js';
|
||||
import { ActiveEntitlements as EntitlementsActiveEntitlements } from './resources/Entitlements/ActiveEntitlements.js';
|
||||
import { Authorizations as TestHelpersIssuingAuthorizations } from './resources/TestHelpers/Issuing/Authorizations.js';
|
||||
import { Authorizations as IssuingAuthorizations } from './resources/Issuing/Authorizations.js';
|
||||
import { Calculations as TaxCalculations } from './resources/Tax/Calculations.js';
|
||||
import { Cardholders as IssuingCardholders } from './resources/Issuing/Cardholders.js';
|
||||
import { Cards as TestHelpersIssuingCards } from './resources/TestHelpers/Issuing/Cards.js';
|
||||
import { Cards as IssuingCards } from './resources/Issuing/Cards.js';
|
||||
import { Configurations as BillingPortalConfigurations } from './resources/BillingPortal/Configurations.js';
|
||||
import { Configurations as TerminalConfigurations } from './resources/Terminal/Configurations.js';
|
||||
import { ConfirmationTokens as TestHelpersConfirmationTokens } from './resources/TestHelpers/ConfirmationTokens.js';
|
||||
import { ConnectionTokens as TerminalConnectionTokens } from './resources/Terminal/ConnectionTokens.js';
|
||||
import { CreditReversals as TreasuryCreditReversals } from './resources/Treasury/CreditReversals.js';
|
||||
import { Customers as TestHelpersCustomers } from './resources/TestHelpers/Customers.js';
|
||||
import { DebitReversals as TreasuryDebitReversals } from './resources/Treasury/DebitReversals.js';
|
||||
import { Disputes as IssuingDisputes } from './resources/Issuing/Disputes.js';
|
||||
import { EarlyFraudWarnings as RadarEarlyFraudWarnings } from './resources/Radar/EarlyFraudWarnings.js';
|
||||
import { Features as EntitlementsFeatures } from './resources/Entitlements/Features.js';
|
||||
import { FinancialAccounts as TreasuryFinancialAccounts } from './resources/Treasury/FinancialAccounts.js';
|
||||
import { InboundTransfers as TestHelpersTreasuryInboundTransfers } from './resources/TestHelpers/Treasury/InboundTransfers.js';
|
||||
import { InboundTransfers as TreasuryInboundTransfers } from './resources/Treasury/InboundTransfers.js';
|
||||
import { Locations as TerminalLocations } from './resources/Terminal/Locations.js';
|
||||
import { MeterEventAdjustments as BillingMeterEventAdjustments } from './resources/Billing/MeterEventAdjustments.js';
|
||||
import { MeterEvents as BillingMeterEvents } from './resources/Billing/MeterEvents.js';
|
||||
import { Meters as BillingMeters } from './resources/Billing/Meters.js';
|
||||
import { Orders as ClimateOrders } from './resources/Climate/Orders.js';
|
||||
import { OutboundPayments as TestHelpersTreasuryOutboundPayments } from './resources/TestHelpers/Treasury/OutboundPayments.js';
|
||||
import { OutboundPayments as TreasuryOutboundPayments } from './resources/Treasury/OutboundPayments.js';
|
||||
import { OutboundTransfers as TestHelpersTreasuryOutboundTransfers } from './resources/TestHelpers/Treasury/OutboundTransfers.js';
|
||||
import { OutboundTransfers as TreasuryOutboundTransfers } from './resources/Treasury/OutboundTransfers.js';
|
||||
import { PersonalizationDesigns as TestHelpersIssuingPersonalizationDesigns } from './resources/TestHelpers/Issuing/PersonalizationDesigns.js';
|
||||
import { PersonalizationDesigns as IssuingPersonalizationDesigns } from './resources/Issuing/PersonalizationDesigns.js';
|
||||
import { PhysicalBundles as IssuingPhysicalBundles } from './resources/Issuing/PhysicalBundles.js';
|
||||
import { Products as ClimateProducts } from './resources/Climate/Products.js';
|
||||
import { Readers as TestHelpersTerminalReaders } from './resources/TestHelpers/Terminal/Readers.js';
|
||||
import { Readers as TerminalReaders } from './resources/Terminal/Readers.js';
|
||||
import { ReceivedCredits as TestHelpersTreasuryReceivedCredits } from './resources/TestHelpers/Treasury/ReceivedCredits.js';
|
||||
import { ReceivedCredits as TreasuryReceivedCredits } from './resources/Treasury/ReceivedCredits.js';
|
||||
import { ReceivedDebits as TestHelpersTreasuryReceivedDebits } from './resources/TestHelpers/Treasury/ReceivedDebits.js';
|
||||
import { ReceivedDebits as TreasuryReceivedDebits } from './resources/Treasury/ReceivedDebits.js';
|
||||
import { Refunds as TestHelpersRefunds } from './resources/TestHelpers/Refunds.js';
|
||||
import { Registrations as TaxRegistrations } from './resources/Tax/Registrations.js';
|
||||
import { ReportRuns as ReportingReportRuns } from './resources/Reporting/ReportRuns.js';
|
||||
import { ReportTypes as ReportingReportTypes } from './resources/Reporting/ReportTypes.js';
|
||||
import { Requests as ForwardingRequests } from './resources/Forwarding/Requests.js';
|
||||
import { ScheduledQueryRuns as SigmaScheduledQueryRuns } from './resources/Sigma/ScheduledQueryRuns.js';
|
||||
import { Secrets as AppsSecrets } from './resources/Apps/Secrets.js';
|
||||
import { Sessions as BillingPortalSessions } from './resources/BillingPortal/Sessions.js';
|
||||
import { Sessions as CheckoutSessions } from './resources/Checkout/Sessions.js';
|
||||
import { Sessions as FinancialConnectionsSessions } from './resources/FinancialConnections/Sessions.js';
|
||||
import { Settings as TaxSettings } from './resources/Tax/Settings.js';
|
||||
import { Suppliers as ClimateSuppliers } from './resources/Climate/Suppliers.js';
|
||||
import { TestClocks as TestHelpersTestClocks } from './resources/TestHelpers/TestClocks.js';
|
||||
import { Tokens as IssuingTokens } from './resources/Issuing/Tokens.js';
|
||||
import { TransactionEntries as TreasuryTransactionEntries } from './resources/Treasury/TransactionEntries.js';
|
||||
import { Transactions as TestHelpersIssuingTransactions } from './resources/TestHelpers/Issuing/Transactions.js';
|
||||
import { Transactions as FinancialConnectionsTransactions } from './resources/FinancialConnections/Transactions.js';
|
||||
import { Transactions as IssuingTransactions } from './resources/Issuing/Transactions.js';
|
||||
import { Transactions as TaxTransactions } from './resources/Tax/Transactions.js';
|
||||
import { Transactions as TreasuryTransactions } from './resources/Treasury/Transactions.js';
|
||||
import { ValueListItems as RadarValueListItems } from './resources/Radar/ValueListItems.js';
|
||||
import { ValueLists as RadarValueLists } from './resources/Radar/ValueLists.js';
|
||||
import { VerificationReports as IdentityVerificationReports } from './resources/Identity/VerificationReports.js';
|
||||
import { VerificationSessions as IdentityVerificationSessions } from './resources/Identity/VerificationSessions.js';
|
||||
export { Accounts as Account } from './resources/Accounts.js';
|
||||
export { AccountLinks } from './resources/AccountLinks.js';
|
||||
export { AccountSessions } from './resources/AccountSessions.js';
|
||||
export { Accounts } from './resources/Accounts.js';
|
||||
export { ApplePayDomains } from './resources/ApplePayDomains.js';
|
||||
export { ApplicationFees } from './resources/ApplicationFees.js';
|
||||
export { Balance } from './resources/Balance.js';
|
||||
export { BalanceTransactions } from './resources/BalanceTransactions.js';
|
||||
export { Charges } from './resources/Charges.js';
|
||||
export { ConfirmationTokens } from './resources/ConfirmationTokens.js';
|
||||
export { CountrySpecs } from './resources/CountrySpecs.js';
|
||||
export { Coupons } from './resources/Coupons.js';
|
||||
export { CreditNotes } from './resources/CreditNotes.js';
|
||||
export { CustomerSessions } from './resources/CustomerSessions.js';
|
||||
export { Customers } from './resources/Customers.js';
|
||||
export { Disputes } from './resources/Disputes.js';
|
||||
export { EphemeralKeys } from './resources/EphemeralKeys.js';
|
||||
export { Events } from './resources/Events.js';
|
||||
export { ExchangeRates } from './resources/ExchangeRates.js';
|
||||
export { FileLinks } from './resources/FileLinks.js';
|
||||
export { Files } from './resources/Files.js';
|
||||
export { InvoiceItems } from './resources/InvoiceItems.js';
|
||||
export { Invoices } from './resources/Invoices.js';
|
||||
export { Mandates } from './resources/Mandates.js';
|
||||
export { OAuth } from './resources/OAuth.js';
|
||||
export { PaymentIntents } from './resources/PaymentIntents.js';
|
||||
export { PaymentLinks } from './resources/PaymentLinks.js';
|
||||
export { PaymentMethodConfigurations } from './resources/PaymentMethodConfigurations.js';
|
||||
export { PaymentMethodDomains } from './resources/PaymentMethodDomains.js';
|
||||
export { PaymentMethods } from './resources/PaymentMethods.js';
|
||||
export { Payouts } from './resources/Payouts.js';
|
||||
export { Plans } from './resources/Plans.js';
|
||||
export { Prices } from './resources/Prices.js';
|
||||
export { Products } from './resources/Products.js';
|
||||
export { PromotionCodes } from './resources/PromotionCodes.js';
|
||||
export { Quotes } from './resources/Quotes.js';
|
||||
export { Refunds } from './resources/Refunds.js';
|
||||
export { Reviews } from './resources/Reviews.js';
|
||||
export { SetupAttempts } from './resources/SetupAttempts.js';
|
||||
export { SetupIntents } from './resources/SetupIntents.js';
|
||||
export { ShippingRates } from './resources/ShippingRates.js';
|
||||
export { Sources } from './resources/Sources.js';
|
||||
export { SubscriptionItems } from './resources/SubscriptionItems.js';
|
||||
export { SubscriptionSchedules } from './resources/SubscriptionSchedules.js';
|
||||
export { Subscriptions } from './resources/Subscriptions.js';
|
||||
export { TaxCodes } from './resources/TaxCodes.js';
|
||||
export { TaxIds } from './resources/TaxIds.js';
|
||||
export { TaxRates } from './resources/TaxRates.js';
|
||||
export { Tokens } from './resources/Tokens.js';
|
||||
export { Topups } from './resources/Topups.js';
|
||||
export { Transfers } from './resources/Transfers.js';
|
||||
export { WebhookEndpoints } from './resources/WebhookEndpoints.js';
|
||||
export const Apps = resourceNamespace('apps', { Secrets: AppsSecrets });
|
||||
export const Billing = resourceNamespace('billing', {
|
||||
MeterEventAdjustments: BillingMeterEventAdjustments,
|
||||
MeterEvents: BillingMeterEvents,
|
||||
Meters: BillingMeters,
|
||||
});
|
||||
export const BillingPortal = resourceNamespace('billingPortal', {
|
||||
Configurations: BillingPortalConfigurations,
|
||||
Sessions: BillingPortalSessions,
|
||||
});
|
||||
export const Checkout = resourceNamespace('checkout', {
|
||||
Sessions: CheckoutSessions,
|
||||
});
|
||||
export const Climate = resourceNamespace('climate', {
|
||||
Orders: ClimateOrders,
|
||||
Products: ClimateProducts,
|
||||
Suppliers: ClimateSuppliers,
|
||||
});
|
||||
export const Entitlements = resourceNamespace('entitlements', {
|
||||
ActiveEntitlements: EntitlementsActiveEntitlements,
|
||||
Features: EntitlementsFeatures,
|
||||
});
|
||||
export const FinancialConnections = resourceNamespace('financialConnections', {
|
||||
Accounts: FinancialConnectionsAccounts,
|
||||
Sessions: FinancialConnectionsSessions,
|
||||
Transactions: FinancialConnectionsTransactions,
|
||||
});
|
||||
export const Forwarding = resourceNamespace('forwarding', {
|
||||
Requests: ForwardingRequests,
|
||||
});
|
||||
export const Identity = resourceNamespace('identity', {
|
||||
VerificationReports: IdentityVerificationReports,
|
||||
VerificationSessions: IdentityVerificationSessions,
|
||||
});
|
||||
export const Issuing = resourceNamespace('issuing', {
|
||||
Authorizations: IssuingAuthorizations,
|
||||
Cardholders: IssuingCardholders,
|
||||
Cards: IssuingCards,
|
||||
Disputes: IssuingDisputes,
|
||||
PersonalizationDesigns: IssuingPersonalizationDesigns,
|
||||
PhysicalBundles: IssuingPhysicalBundles,
|
||||
Tokens: IssuingTokens,
|
||||
Transactions: IssuingTransactions,
|
||||
});
|
||||
export const Radar = resourceNamespace('radar', {
|
||||
EarlyFraudWarnings: RadarEarlyFraudWarnings,
|
||||
ValueListItems: RadarValueListItems,
|
||||
ValueLists: RadarValueLists,
|
||||
});
|
||||
export const Reporting = resourceNamespace('reporting', {
|
||||
ReportRuns: ReportingReportRuns,
|
||||
ReportTypes: ReportingReportTypes,
|
||||
});
|
||||
export const Sigma = resourceNamespace('sigma', {
|
||||
ScheduledQueryRuns: SigmaScheduledQueryRuns,
|
||||
});
|
||||
export const Tax = resourceNamespace('tax', {
|
||||
Calculations: TaxCalculations,
|
||||
Registrations: TaxRegistrations,
|
||||
Settings: TaxSettings,
|
||||
Transactions: TaxTransactions,
|
||||
});
|
||||
export const Terminal = resourceNamespace('terminal', {
|
||||
Configurations: TerminalConfigurations,
|
||||
ConnectionTokens: TerminalConnectionTokens,
|
||||
Locations: TerminalLocations,
|
||||
Readers: TerminalReaders,
|
||||
});
|
||||
export const TestHelpers = resourceNamespace('testHelpers', {
|
||||
ConfirmationTokens: TestHelpersConfirmationTokens,
|
||||
Customers: TestHelpersCustomers,
|
||||
Refunds: TestHelpersRefunds,
|
||||
TestClocks: TestHelpersTestClocks,
|
||||
Issuing: resourceNamespace('issuing', {
|
||||
Authorizations: TestHelpersIssuingAuthorizations,
|
||||
Cards: TestHelpersIssuingCards,
|
||||
PersonalizationDesigns: TestHelpersIssuingPersonalizationDesigns,
|
||||
Transactions: TestHelpersIssuingTransactions,
|
||||
}),
|
||||
Terminal: resourceNamespace('terminal', {
|
||||
Readers: TestHelpersTerminalReaders,
|
||||
}),
|
||||
Treasury: resourceNamespace('treasury', {
|
||||
InboundTransfers: TestHelpersTreasuryInboundTransfers,
|
||||
OutboundPayments: TestHelpersTreasuryOutboundPayments,
|
||||
OutboundTransfers: TestHelpersTreasuryOutboundTransfers,
|
||||
ReceivedCredits: TestHelpersTreasuryReceivedCredits,
|
||||
ReceivedDebits: TestHelpersTreasuryReceivedDebits,
|
||||
}),
|
||||
});
|
||||
export const Treasury = resourceNamespace('treasury', {
|
||||
CreditReversals: TreasuryCreditReversals,
|
||||
DebitReversals: TreasuryDebitReversals,
|
||||
FinancialAccounts: TreasuryFinancialAccounts,
|
||||
InboundTransfers: TreasuryInboundTransfers,
|
||||
OutboundPayments: TreasuryOutboundPayments,
|
||||
OutboundTransfers: TreasuryOutboundTransfers,
|
||||
ReceivedCredits: TreasuryReceivedCredits,
|
||||
ReceivedDebits: TreasuryReceivedDebits,
|
||||
TransactionEntries: TreasuryTransactionEntries,
|
||||
Transactions: TreasuryTransactions,
|
||||
});
|
||||
6
server/node_modules/stripe/esm/resources/AccountLinks.js
generated
vendored
Normal file
6
server/node_modules/stripe/esm/resources/AccountLinks.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const AccountLinks = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/account_links' }),
|
||||
});
|
||||
6
server/node_modules/stripe/esm/resources/AccountSessions.js
generated
vendored
Normal file
6
server/node_modules/stripe/esm/resources/AccountSessions.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const AccountSessions = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/account_sessions' }),
|
||||
});
|
||||
98
server/node_modules/stripe/esm/resources/Accounts.js
generated
vendored
Normal file
98
server/node_modules/stripe/esm/resources/Accounts.js
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
// Since path can either be `account` or `accounts`, support both through stripeMethod path
|
||||
export const Accounts = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/accounts' }),
|
||||
retrieve(id, ...args) {
|
||||
// No longer allow an api key to be passed as the first string to this function due to ambiguity between
|
||||
// old account ids and api keys. To request the account for an api key, send null as the id
|
||||
if (typeof id === 'string') {
|
||||
return stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/accounts/{id}',
|
||||
}).apply(this, [id, ...args]);
|
||||
}
|
||||
else {
|
||||
if (id === null || id === undefined) {
|
||||
// Remove id as stripeMethod would complain of unexpected argument
|
||||
[].shift.apply([id, ...args]);
|
||||
}
|
||||
return stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/account',
|
||||
}).apply(this, [id, ...args]);
|
||||
}
|
||||
},
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/accounts/{account}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/accounts',
|
||||
methodType: 'list',
|
||||
}),
|
||||
del: stripeMethod({ method: 'DELETE', fullPath: '/v1/accounts/{account}' }),
|
||||
createExternalAccount: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/accounts/{account}/external_accounts',
|
||||
}),
|
||||
createLoginLink: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/accounts/{account}/login_links',
|
||||
}),
|
||||
createPerson: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/accounts/{account}/persons',
|
||||
}),
|
||||
deleteExternalAccount: stripeMethod({
|
||||
method: 'DELETE',
|
||||
fullPath: '/v1/accounts/{account}/external_accounts/{id}',
|
||||
}),
|
||||
deletePerson: stripeMethod({
|
||||
method: 'DELETE',
|
||||
fullPath: '/v1/accounts/{account}/persons/{person}',
|
||||
}),
|
||||
listCapabilities: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/accounts/{account}/capabilities',
|
||||
methodType: 'list',
|
||||
}),
|
||||
listExternalAccounts: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/accounts/{account}/external_accounts',
|
||||
methodType: 'list',
|
||||
}),
|
||||
listPersons: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/accounts/{account}/persons',
|
||||
methodType: 'list',
|
||||
}),
|
||||
reject: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/accounts/{account}/reject',
|
||||
}),
|
||||
retrieveCurrent: stripeMethod({ method: 'GET', fullPath: '/v1/account' }),
|
||||
retrieveCapability: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/accounts/{account}/capabilities/{capability}',
|
||||
}),
|
||||
retrieveExternalAccount: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/accounts/{account}/external_accounts/{id}',
|
||||
}),
|
||||
retrievePerson: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/accounts/{account}/persons/{person}',
|
||||
}),
|
||||
updateCapability: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/accounts/{account}/capabilities/{capability}',
|
||||
}),
|
||||
updateExternalAccount: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/accounts/{account}/external_accounts/{id}',
|
||||
}),
|
||||
updatePerson: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/accounts/{account}/persons/{person}',
|
||||
}),
|
||||
});
|
||||
19
server/node_modules/stripe/esm/resources/ApplePayDomains.js
generated
vendored
Normal file
19
server/node_modules/stripe/esm/resources/ApplePayDomains.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const ApplePayDomains = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/apple_pay/domains' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/apple_pay/domains/{domain}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/apple_pay/domains',
|
||||
methodType: 'list',
|
||||
}),
|
||||
del: stripeMethod({
|
||||
method: 'DELETE',
|
||||
fullPath: '/v1/apple_pay/domains/{domain}',
|
||||
}),
|
||||
});
|
||||
31
server/node_modules/stripe/esm/resources/ApplicationFees.js
generated
vendored
Normal file
31
server/node_modules/stripe/esm/resources/ApplicationFees.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const ApplicationFees = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/application_fees/{id}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/application_fees',
|
||||
methodType: 'list',
|
||||
}),
|
||||
createRefund: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/application_fees/{id}/refunds',
|
||||
}),
|
||||
listRefunds: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/application_fees/{id}/refunds',
|
||||
methodType: 'list',
|
||||
}),
|
||||
retrieveRefund: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/application_fees/{fee}/refunds/{id}',
|
||||
}),
|
||||
updateRefund: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/application_fees/{fee}/refunds/{id}',
|
||||
}),
|
||||
});
|
||||
16
server/node_modules/stripe/esm/resources/Apps/Secrets.js
generated
vendored
Normal file
16
server/node_modules/stripe/esm/resources/Apps/Secrets.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Secrets = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/apps/secrets' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/apps/secrets',
|
||||
methodType: 'list',
|
||||
}),
|
||||
deleteWhere: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/apps/secrets/delete',
|
||||
}),
|
||||
find: stripeMethod({ method: 'GET', fullPath: '/v1/apps/secrets/find' }),
|
||||
});
|
||||
6
server/node_modules/stripe/esm/resources/Balance.js
generated
vendored
Normal file
6
server/node_modules/stripe/esm/resources/Balance.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Balance = StripeResource.extend({
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/balance' }),
|
||||
});
|
||||
14
server/node_modules/stripe/esm/resources/BalanceTransactions.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/resources/BalanceTransactions.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const BalanceTransactions = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/balance_transactions/{id}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/balance_transactions',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
9
server/node_modules/stripe/esm/resources/Billing/MeterEventAdjustments.js
generated
vendored
Normal file
9
server/node_modules/stripe/esm/resources/Billing/MeterEventAdjustments.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const MeterEventAdjustments = StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/billing/meter_event_adjustments',
|
||||
}),
|
||||
});
|
||||
6
server/node_modules/stripe/esm/resources/Billing/MeterEvents.js
generated
vendored
Normal file
6
server/node_modules/stripe/esm/resources/Billing/MeterEvents.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const MeterEvents = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/billing/meter_events' }),
|
||||
});
|
||||
26
server/node_modules/stripe/esm/resources/Billing/Meters.js
generated
vendored
Normal file
26
server/node_modules/stripe/esm/resources/Billing/Meters.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Meters = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/billing/meters' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/billing/meters/{id}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/billing/meters/{id}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/billing/meters',
|
||||
methodType: 'list',
|
||||
}),
|
||||
deactivate: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/billing/meters/{id}/deactivate',
|
||||
}),
|
||||
listEventSummaries: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/billing/meters/{id}/event_summaries',
|
||||
methodType: 'list',
|
||||
}),
|
||||
reactivate: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/billing/meters/{id}/reactivate',
|
||||
}),
|
||||
});
|
||||
22
server/node_modules/stripe/esm/resources/BillingPortal/Configurations.js
generated
vendored
Normal file
22
server/node_modules/stripe/esm/resources/BillingPortal/Configurations.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Configurations = StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/billing_portal/configurations',
|
||||
}),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/billing_portal/configurations/{configuration}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/billing_portal/configurations/{configuration}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/billing_portal/configurations',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
9
server/node_modules/stripe/esm/resources/BillingPortal/Sessions.js
generated
vendored
Normal file
9
server/node_modules/stripe/esm/resources/BillingPortal/Sessions.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Sessions = StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/billing_portal/sessions',
|
||||
}),
|
||||
});
|
||||
22
server/node_modules/stripe/esm/resources/Charges.js
generated
vendored
Normal file
22
server/node_modules/stripe/esm/resources/Charges.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Charges = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/charges' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/charges/{charge}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/charges/{charge}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/charges',
|
||||
methodType: 'list',
|
||||
}),
|
||||
capture: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/charges/{charge}/capture',
|
||||
}),
|
||||
search: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/charges/search',
|
||||
methodType: 'search',
|
||||
}),
|
||||
});
|
||||
24
server/node_modules/stripe/esm/resources/Checkout/Sessions.js
generated
vendored
Normal file
24
server/node_modules/stripe/esm/resources/Checkout/Sessions.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Sessions = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/checkout/sessions' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/checkout/sessions/{session}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/checkout/sessions',
|
||||
methodType: 'list',
|
||||
}),
|
||||
expire: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/checkout/sessions/{session}/expire',
|
||||
}),
|
||||
listLineItems: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/checkout/sessions/{session}/line_items',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
23
server/node_modules/stripe/esm/resources/Climate/Orders.js
generated
vendored
Normal file
23
server/node_modules/stripe/esm/resources/Climate/Orders.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Orders = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/climate/orders' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/climate/orders/{order}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/climate/orders/{order}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/climate/orders',
|
||||
methodType: 'list',
|
||||
}),
|
||||
cancel: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/climate/orders/{order}/cancel',
|
||||
}),
|
||||
});
|
||||
14
server/node_modules/stripe/esm/resources/Climate/Products.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/resources/Climate/Products.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Products = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/climate/products/{product}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/climate/products',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
14
server/node_modules/stripe/esm/resources/Climate/Suppliers.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/resources/Climate/Suppliers.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Suppliers = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/climate/suppliers/{supplier}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/climate/suppliers',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
9
server/node_modules/stripe/esm/resources/ConfirmationTokens.js
generated
vendored
Normal file
9
server/node_modules/stripe/esm/resources/ConfirmationTokens.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const ConfirmationTokens = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/confirmation_tokens/{confirmation_token}',
|
||||
}),
|
||||
});
|
||||
14
server/node_modules/stripe/esm/resources/CountrySpecs.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/resources/CountrySpecs.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const CountrySpecs = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/country_specs/{country}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/country_specs',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
14
server/node_modules/stripe/esm/resources/Coupons.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/resources/Coupons.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Coupons = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/coupons' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/coupons/{coupon}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/coupons/{coupon}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/coupons',
|
||||
methodType: 'list',
|
||||
}),
|
||||
del: stripeMethod({ method: 'DELETE', fullPath: '/v1/coupons/{coupon}' }),
|
||||
});
|
||||
28
server/node_modules/stripe/esm/resources/CreditNotes.js
generated
vendored
Normal file
28
server/node_modules/stripe/esm/resources/CreditNotes.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const CreditNotes = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/credit_notes' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/credit_notes/{id}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/credit_notes/{id}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/credit_notes',
|
||||
methodType: 'list',
|
||||
}),
|
||||
listLineItems: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/credit_notes/{credit_note}/lines',
|
||||
methodType: 'list',
|
||||
}),
|
||||
listPreviewLineItems: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/credit_notes/preview/lines',
|
||||
methodType: 'list',
|
||||
}),
|
||||
preview: stripeMethod({ method: 'GET', fullPath: '/v1/credit_notes/preview' }),
|
||||
voidCreditNote: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/credit_notes/{id}/void',
|
||||
}),
|
||||
});
|
||||
6
server/node_modules/stripe/esm/resources/CustomerSessions.js
generated
vendored
Normal file
6
server/node_modules/stripe/esm/resources/CustomerSessions.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const CustomerSessions = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/customer_sessions' }),
|
||||
});
|
||||
112
server/node_modules/stripe/esm/resources/Customers.js
generated
vendored
Normal file
112
server/node_modules/stripe/esm/resources/Customers.js
generated
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Customers = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/customers' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/customers/{customer}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/customers/{customer}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/customers',
|
||||
methodType: 'list',
|
||||
}),
|
||||
del: stripeMethod({ method: 'DELETE', fullPath: '/v1/customers/{customer}' }),
|
||||
createBalanceTransaction: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/customers/{customer}/balance_transactions',
|
||||
}),
|
||||
createFundingInstructions: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/customers/{customer}/funding_instructions',
|
||||
}),
|
||||
createSource: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/customers/{customer}/sources',
|
||||
}),
|
||||
createTaxId: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/customers/{customer}/tax_ids',
|
||||
}),
|
||||
deleteDiscount: stripeMethod({
|
||||
method: 'DELETE',
|
||||
fullPath: '/v1/customers/{customer}/discount',
|
||||
}),
|
||||
deleteSource: stripeMethod({
|
||||
method: 'DELETE',
|
||||
fullPath: '/v1/customers/{customer}/sources/{id}',
|
||||
}),
|
||||
deleteTaxId: stripeMethod({
|
||||
method: 'DELETE',
|
||||
fullPath: '/v1/customers/{customer}/tax_ids/{id}',
|
||||
}),
|
||||
listBalanceTransactions: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/customers/{customer}/balance_transactions',
|
||||
methodType: 'list',
|
||||
}),
|
||||
listCashBalanceTransactions: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/customers/{customer}/cash_balance_transactions',
|
||||
methodType: 'list',
|
||||
}),
|
||||
listPaymentMethods: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/customers/{customer}/payment_methods',
|
||||
methodType: 'list',
|
||||
}),
|
||||
listSources: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/customers/{customer}/sources',
|
||||
methodType: 'list',
|
||||
}),
|
||||
listTaxIds: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/customers/{customer}/tax_ids',
|
||||
methodType: 'list',
|
||||
}),
|
||||
retrieveBalanceTransaction: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/customers/{customer}/balance_transactions/{transaction}',
|
||||
}),
|
||||
retrieveCashBalance: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/customers/{customer}/cash_balance',
|
||||
}),
|
||||
retrieveCashBalanceTransaction: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/customers/{customer}/cash_balance_transactions/{transaction}',
|
||||
}),
|
||||
retrievePaymentMethod: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/customers/{customer}/payment_methods/{payment_method}',
|
||||
}),
|
||||
retrieveSource: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/customers/{customer}/sources/{id}',
|
||||
}),
|
||||
retrieveTaxId: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/customers/{customer}/tax_ids/{id}',
|
||||
}),
|
||||
search: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/customers/search',
|
||||
methodType: 'search',
|
||||
}),
|
||||
updateBalanceTransaction: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/customers/{customer}/balance_transactions/{transaction}',
|
||||
}),
|
||||
updateCashBalance: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/customers/{customer}/cash_balance',
|
||||
}),
|
||||
updateSource: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/customers/{customer}/sources/{id}',
|
||||
}),
|
||||
verifySource: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/customers/{customer}/sources/{id}/verify',
|
||||
}),
|
||||
});
|
||||
16
server/node_modules/stripe/esm/resources/Disputes.js
generated
vendored
Normal file
16
server/node_modules/stripe/esm/resources/Disputes.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Disputes = StripeResource.extend({
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/disputes/{dispute}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/disputes/{dispute}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/disputes',
|
||||
methodType: 'list',
|
||||
}),
|
||||
close: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/disputes/{dispute}/close',
|
||||
}),
|
||||
});
|
||||
14
server/node_modules/stripe/esm/resources/Entitlements/ActiveEntitlements.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/resources/Entitlements/ActiveEntitlements.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const ActiveEntitlements = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/entitlements/active_entitlements/{id}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/entitlements/active_entitlements',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
19
server/node_modules/stripe/esm/resources/Entitlements/Features.js
generated
vendored
Normal file
19
server/node_modules/stripe/esm/resources/Entitlements/Features.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Features = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/entitlements/features' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/entitlements/features/{id}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/entitlements/features/{id}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/entitlements/features',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
15
server/node_modules/stripe/esm/resources/EphemeralKeys.js
generated
vendored
Normal file
15
server/node_modules/stripe/esm/resources/EphemeralKeys.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const EphemeralKeys = StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/ephemeral_keys',
|
||||
validator: (data, options) => {
|
||||
if (!options.headers || !options.headers['Stripe-Version']) {
|
||||
throw new Error('Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node');
|
||||
}
|
||||
},
|
||||
}),
|
||||
del: stripeMethod({ method: 'DELETE', fullPath: '/v1/ephemeral_keys/{key}' }),
|
||||
});
|
||||
11
server/node_modules/stripe/esm/resources/Events.js
generated
vendored
Normal file
11
server/node_modules/stripe/esm/resources/Events.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Events = StripeResource.extend({
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/events/{id}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/events',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
14
server/node_modules/stripe/esm/resources/ExchangeRates.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/resources/ExchangeRates.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const ExchangeRates = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/exchange_rates/{rate_id}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/exchange_rates',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
13
server/node_modules/stripe/esm/resources/FileLinks.js
generated
vendored
Normal file
13
server/node_modules/stripe/esm/resources/FileLinks.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const FileLinks = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/file_links' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/file_links/{link}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/file_links/{link}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/file_links',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
21
server/node_modules/stripe/esm/resources/Files.js
generated
vendored
Normal file
21
server/node_modules/stripe/esm/resources/Files.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { multipartRequestDataProcessor } from '../multipart.js';
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Files = StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/files',
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
host: 'files.stripe.com',
|
||||
}),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/files/{file}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/files',
|
||||
methodType: 'list',
|
||||
}),
|
||||
requestDataProcessor: multipartRequestDataProcessor,
|
||||
});
|
||||
35
server/node_modules/stripe/esm/resources/FinancialConnections/Accounts.js
generated
vendored
Normal file
35
server/node_modules/stripe/esm/resources/FinancialConnections/Accounts.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Accounts = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/financial_connections/accounts/{account}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/financial_connections/accounts',
|
||||
methodType: 'list',
|
||||
}),
|
||||
disconnect: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/financial_connections/accounts/{account}/disconnect',
|
||||
}),
|
||||
listOwners: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/financial_connections/accounts/{account}/owners',
|
||||
methodType: 'list',
|
||||
}),
|
||||
refresh: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/financial_connections/accounts/{account}/refresh',
|
||||
}),
|
||||
subscribe: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/financial_connections/accounts/{account}/subscribe',
|
||||
}),
|
||||
unsubscribe: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/financial_connections/accounts/{account}/unsubscribe',
|
||||
}),
|
||||
});
|
||||
13
server/node_modules/stripe/esm/resources/FinancialConnections/Sessions.js
generated
vendored
Normal file
13
server/node_modules/stripe/esm/resources/FinancialConnections/Sessions.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Sessions = StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/financial_connections/sessions',
|
||||
}),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/financial_connections/sessions/{session}',
|
||||
}),
|
||||
});
|
||||
14
server/node_modules/stripe/esm/resources/FinancialConnections/Transactions.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/resources/FinancialConnections/Transactions.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Transactions = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/financial_connections/transactions/{transaction}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/financial_connections/transactions',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
15
server/node_modules/stripe/esm/resources/Forwarding/Requests.js
generated
vendored
Normal file
15
server/node_modules/stripe/esm/resources/Forwarding/Requests.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Requests = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/forwarding/requests' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/forwarding/requests/{id}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/forwarding/requests',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
14
server/node_modules/stripe/esm/resources/Identity/VerificationReports.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/resources/Identity/VerificationReports.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const VerificationReports = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/identity/verification_reports/{report}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/identity/verification_reports',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
30
server/node_modules/stripe/esm/resources/Identity/VerificationSessions.js
generated
vendored
Normal file
30
server/node_modules/stripe/esm/resources/Identity/VerificationSessions.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const VerificationSessions = StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/identity/verification_sessions',
|
||||
}),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/identity/verification_sessions/{session}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/identity/verification_sessions/{session}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/identity/verification_sessions',
|
||||
methodType: 'list',
|
||||
}),
|
||||
cancel: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/identity/verification_sessions/{session}/cancel',
|
||||
}),
|
||||
redact: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/identity/verification_sessions/{session}/redact',
|
||||
}),
|
||||
});
|
||||
23
server/node_modules/stripe/esm/resources/InvoiceItems.js
generated
vendored
Normal file
23
server/node_modules/stripe/esm/resources/InvoiceItems.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const InvoiceItems = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/invoiceitems' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/invoiceitems/{invoiceitem}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/invoiceitems/{invoiceitem}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/invoiceitems',
|
||||
methodType: 'list',
|
||||
}),
|
||||
del: stripeMethod({
|
||||
method: 'DELETE',
|
||||
fullPath: '/v1/invoiceitems/{invoiceitem}',
|
||||
}),
|
||||
});
|
||||
54
server/node_modules/stripe/esm/resources/Invoices.js
generated
vendored
Normal file
54
server/node_modules/stripe/esm/resources/Invoices.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Invoices = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/invoices' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/invoices/{invoice}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/invoices/{invoice}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/invoices',
|
||||
methodType: 'list',
|
||||
}),
|
||||
del: stripeMethod({ method: 'DELETE', fullPath: '/v1/invoices/{invoice}' }),
|
||||
finalizeInvoice: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/invoices/{invoice}/finalize',
|
||||
}),
|
||||
listLineItems: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/invoices/{invoice}/lines',
|
||||
methodType: 'list',
|
||||
}),
|
||||
listUpcomingLines: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/invoices/upcoming/lines',
|
||||
methodType: 'list',
|
||||
}),
|
||||
markUncollectible: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/invoices/{invoice}/mark_uncollectible',
|
||||
}),
|
||||
pay: stripeMethod({ method: 'POST', fullPath: '/v1/invoices/{invoice}/pay' }),
|
||||
retrieveUpcoming: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/invoices/upcoming',
|
||||
}),
|
||||
search: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/invoices/search',
|
||||
methodType: 'search',
|
||||
}),
|
||||
sendInvoice: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/invoices/{invoice}/send',
|
||||
}),
|
||||
updateLineItem: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/invoices/{invoice}/lines/{line_item_id}',
|
||||
}),
|
||||
voidInvoice: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/invoices/{invoice}/void',
|
||||
}),
|
||||
});
|
||||
26
server/node_modules/stripe/esm/resources/Issuing/Authorizations.js
generated
vendored
Normal file
26
server/node_modules/stripe/esm/resources/Issuing/Authorizations.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Authorizations = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/authorizations/{authorization}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/issuing/authorizations/{authorization}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/authorizations',
|
||||
methodType: 'list',
|
||||
}),
|
||||
approve: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/issuing/authorizations/{authorization}/approve',
|
||||
}),
|
||||
decline: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/issuing/authorizations/{authorization}/decline',
|
||||
}),
|
||||
});
|
||||
19
server/node_modules/stripe/esm/resources/Issuing/Cardholders.js
generated
vendored
Normal file
19
server/node_modules/stripe/esm/resources/Issuing/Cardholders.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Cardholders = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/issuing/cardholders' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/cardholders/{cardholder}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/issuing/cardholders/{cardholder}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/cardholders',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
13
server/node_modules/stripe/esm/resources/Issuing/Cards.js
generated
vendored
Normal file
13
server/node_modules/stripe/esm/resources/Issuing/Cards.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Cards = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/issuing/cards' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/issuing/cards/{card}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/issuing/cards/{card}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/cards',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
23
server/node_modules/stripe/esm/resources/Issuing/Disputes.js
generated
vendored
Normal file
23
server/node_modules/stripe/esm/resources/Issuing/Disputes.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Disputes = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/issuing/disputes' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/disputes/{dispute}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/issuing/disputes/{dispute}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/disputes',
|
||||
methodType: 'list',
|
||||
}),
|
||||
submit: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/issuing/disputes/{dispute}/submit',
|
||||
}),
|
||||
});
|
||||
22
server/node_modules/stripe/esm/resources/Issuing/PersonalizationDesigns.js
generated
vendored
Normal file
22
server/node_modules/stripe/esm/resources/Issuing/PersonalizationDesigns.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const PersonalizationDesigns = StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/issuing/personalization_designs',
|
||||
}),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/personalization_designs/{personalization_design}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/issuing/personalization_designs/{personalization_design}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/personalization_designs',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
14
server/node_modules/stripe/esm/resources/Issuing/PhysicalBundles.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/resources/Issuing/PhysicalBundles.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const PhysicalBundles = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/physical_bundles/{physical_bundle}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/physical_bundles',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
18
server/node_modules/stripe/esm/resources/Issuing/Tokens.js
generated
vendored
Normal file
18
server/node_modules/stripe/esm/resources/Issuing/Tokens.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Tokens = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/tokens/{token}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/issuing/tokens/{token}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/tokens',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
18
server/node_modules/stripe/esm/resources/Issuing/Transactions.js
generated
vendored
Normal file
18
server/node_modules/stripe/esm/resources/Issuing/Transactions.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Transactions = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/transactions/{transaction}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/issuing/transactions/{transaction}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/transactions',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
6
server/node_modules/stripe/esm/resources/Mandates.js
generated
vendored
Normal file
6
server/node_modules/stripe/esm/resources/Mandates.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Mandates = StripeResource.extend({
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/mandates/{mandate}' }),
|
||||
});
|
||||
42
server/node_modules/stripe/esm/resources/OAuth.js
generated
vendored
Normal file
42
server/node_modules/stripe/esm/resources/OAuth.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
'use strict';
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
import { stringifyRequestData } from '../utils.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
const oAuthHost = 'connect.stripe.com';
|
||||
export const OAuth = StripeResource.extend({
|
||||
basePath: '/',
|
||||
authorizeUrl(params, options) {
|
||||
params = params || {};
|
||||
options = options || {};
|
||||
let path = 'oauth/authorize';
|
||||
// For Express accounts, the path changes
|
||||
if (options.express) {
|
||||
path = `express/${path}`;
|
||||
}
|
||||
if (!params.response_type) {
|
||||
params.response_type = 'code';
|
||||
}
|
||||
if (!params.client_id) {
|
||||
params.client_id = this._stripe.getClientId();
|
||||
}
|
||||
if (!params.scope) {
|
||||
params.scope = 'read_write';
|
||||
}
|
||||
return `https://${oAuthHost}/${path}?${stringifyRequestData(params)}`;
|
||||
},
|
||||
token: stripeMethod({
|
||||
method: 'POST',
|
||||
path: 'oauth/token',
|
||||
host: oAuthHost,
|
||||
}),
|
||||
deauthorize(spec, ...args) {
|
||||
if (!spec.client_id) {
|
||||
spec.client_id = this._stripe.getClientId();
|
||||
}
|
||||
return stripeMethod({
|
||||
method: 'POST',
|
||||
path: 'oauth/deauthorize',
|
||||
host: oAuthHost,
|
||||
}).apply(this, [spec, ...args]);
|
||||
},
|
||||
});
|
||||
48
server/node_modules/stripe/esm/resources/PaymentIntents.js
generated
vendored
Normal file
48
server/node_modules/stripe/esm/resources/PaymentIntents.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const PaymentIntents = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/payment_intents' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/payment_intents/{intent}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_intents/{intent}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/payment_intents',
|
||||
methodType: 'list',
|
||||
}),
|
||||
applyCustomerBalance: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_intents/{intent}/apply_customer_balance',
|
||||
}),
|
||||
cancel: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_intents/{intent}/cancel',
|
||||
}),
|
||||
capture: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_intents/{intent}/capture',
|
||||
}),
|
||||
confirm: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_intents/{intent}/confirm',
|
||||
}),
|
||||
incrementAuthorization: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_intents/{intent}/increment_authorization',
|
||||
}),
|
||||
search: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/payment_intents/search',
|
||||
methodType: 'search',
|
||||
}),
|
||||
verifyMicrodeposits: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_intents/{intent}/verify_microdeposits',
|
||||
}),
|
||||
});
|
||||
24
server/node_modules/stripe/esm/resources/PaymentLinks.js
generated
vendored
Normal file
24
server/node_modules/stripe/esm/resources/PaymentLinks.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const PaymentLinks = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/payment_links' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/payment_links/{payment_link}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_links/{payment_link}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/payment_links',
|
||||
methodType: 'list',
|
||||
}),
|
||||
listLineItems: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/payment_links/{payment_link}/line_items',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
22
server/node_modules/stripe/esm/resources/PaymentMethodConfigurations.js
generated
vendored
Normal file
22
server/node_modules/stripe/esm/resources/PaymentMethodConfigurations.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const PaymentMethodConfigurations = StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_method_configurations',
|
||||
}),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/payment_method_configurations/{configuration}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_method_configurations/{configuration}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/payment_method_configurations',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
26
server/node_modules/stripe/esm/resources/PaymentMethodDomains.js
generated
vendored
Normal file
26
server/node_modules/stripe/esm/resources/PaymentMethodDomains.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const PaymentMethodDomains = StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_method_domains',
|
||||
}),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/payment_method_domains/{payment_method_domain}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_method_domains/{payment_method_domain}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/payment_method_domains',
|
||||
methodType: 'list',
|
||||
}),
|
||||
validate: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_method_domains/{payment_method_domain}/validate',
|
||||
}),
|
||||
});
|
||||
27
server/node_modules/stripe/esm/resources/PaymentMethods.js
generated
vendored
Normal file
27
server/node_modules/stripe/esm/resources/PaymentMethods.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const PaymentMethods = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/payment_methods' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/payment_methods/{payment_method}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_methods/{payment_method}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/payment_methods',
|
||||
methodType: 'list',
|
||||
}),
|
||||
attach: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_methods/{payment_method}/attach',
|
||||
}),
|
||||
detach: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payment_methods/{payment_method}/detach',
|
||||
}),
|
||||
});
|
||||
21
server/node_modules/stripe/esm/resources/Payouts.js
generated
vendored
Normal file
21
server/node_modules/stripe/esm/resources/Payouts.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Payouts = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/payouts' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/payouts/{payout}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/payouts/{payout}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/payouts',
|
||||
methodType: 'list',
|
||||
}),
|
||||
cancel: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payouts/{payout}/cancel',
|
||||
}),
|
||||
reverse: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/payouts/{payout}/reverse',
|
||||
}),
|
||||
});
|
||||
14
server/node_modules/stripe/esm/resources/Plans.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/resources/Plans.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Plans = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/plans' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/plans/{plan}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/plans/{plan}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/plans',
|
||||
methodType: 'list',
|
||||
}),
|
||||
del: stripeMethod({ method: 'DELETE', fullPath: '/v1/plans/{plan}' }),
|
||||
});
|
||||
18
server/node_modules/stripe/esm/resources/Prices.js
generated
vendored
Normal file
18
server/node_modules/stripe/esm/resources/Prices.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Prices = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/prices' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/prices/{price}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/prices/{price}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/prices',
|
||||
methodType: 'list',
|
||||
}),
|
||||
search: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/prices/search',
|
||||
methodType: 'search',
|
||||
}),
|
||||
});
|
||||
36
server/node_modules/stripe/esm/resources/Products.js
generated
vendored
Normal file
36
server/node_modules/stripe/esm/resources/Products.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Products = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/products' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/products/{id}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/products/{id}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/products',
|
||||
methodType: 'list',
|
||||
}),
|
||||
del: stripeMethod({ method: 'DELETE', fullPath: '/v1/products/{id}' }),
|
||||
createFeature: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/products/{product}/features',
|
||||
}),
|
||||
deleteFeature: stripeMethod({
|
||||
method: 'DELETE',
|
||||
fullPath: '/v1/products/{product}/features/{id}',
|
||||
}),
|
||||
listFeatures: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/products/{product}/features',
|
||||
methodType: 'list',
|
||||
}),
|
||||
retrieveFeature: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/products/{product}/features/{id}',
|
||||
}),
|
||||
search: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/products/search',
|
||||
methodType: 'search',
|
||||
}),
|
||||
});
|
||||
19
server/node_modules/stripe/esm/resources/PromotionCodes.js
generated
vendored
Normal file
19
server/node_modules/stripe/esm/resources/PromotionCodes.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const PromotionCodes = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/promotion_codes' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/promotion_codes/{promotion_code}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/promotion_codes/{promotion_code}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/promotion_codes',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
35
server/node_modules/stripe/esm/resources/Quotes.js
generated
vendored
Normal file
35
server/node_modules/stripe/esm/resources/Quotes.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Quotes = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/quotes' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/quotes/{quote}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/quotes/{quote}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/quotes',
|
||||
methodType: 'list',
|
||||
}),
|
||||
accept: stripeMethod({ method: 'POST', fullPath: '/v1/quotes/{quote}/accept' }),
|
||||
cancel: stripeMethod({ method: 'POST', fullPath: '/v1/quotes/{quote}/cancel' }),
|
||||
finalizeQuote: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/quotes/{quote}/finalize',
|
||||
}),
|
||||
listComputedUpfrontLineItems: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/quotes/{quote}/computed_upfront_line_items',
|
||||
methodType: 'list',
|
||||
}),
|
||||
listLineItems: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/quotes/{quote}/line_items',
|
||||
methodType: 'list',
|
||||
}),
|
||||
pdf: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/quotes/{quote}/pdf',
|
||||
host: 'files.stripe.com',
|
||||
streaming: true,
|
||||
}),
|
||||
});
|
||||
14
server/node_modules/stripe/esm/resources/Radar/EarlyFraudWarnings.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/resources/Radar/EarlyFraudWarnings.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const EarlyFraudWarnings = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/radar/early_fraud_warnings/{early_fraud_warning}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/radar/early_fraud_warnings',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
22
server/node_modules/stripe/esm/resources/Radar/ValueListItems.js
generated
vendored
Normal file
22
server/node_modules/stripe/esm/resources/Radar/ValueListItems.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const ValueListItems = StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/radar/value_list_items',
|
||||
}),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/radar/value_list_items/{item}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/radar/value_list_items',
|
||||
methodType: 'list',
|
||||
}),
|
||||
del: stripeMethod({
|
||||
method: 'DELETE',
|
||||
fullPath: '/v1/radar/value_list_items/{item}',
|
||||
}),
|
||||
});
|
||||
23
server/node_modules/stripe/esm/resources/Radar/ValueLists.js
generated
vendored
Normal file
23
server/node_modules/stripe/esm/resources/Radar/ValueLists.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const ValueLists = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/radar/value_lists' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/radar/value_lists/{value_list}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/radar/value_lists/{value_list}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/radar/value_lists',
|
||||
methodType: 'list',
|
||||
}),
|
||||
del: stripeMethod({
|
||||
method: 'DELETE',
|
||||
fullPath: '/v1/radar/value_lists/{value_list}',
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/esm/resources/Refunds.js
generated
vendored
Normal file
17
server/node_modules/stripe/esm/resources/Refunds.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Refunds = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/refunds' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/refunds/{refund}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/refunds/{refund}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/refunds',
|
||||
methodType: 'list',
|
||||
}),
|
||||
cancel: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/refunds/{refund}/cancel',
|
||||
}),
|
||||
});
|
||||
15
server/node_modules/stripe/esm/resources/Reporting/ReportRuns.js
generated
vendored
Normal file
15
server/node_modules/stripe/esm/resources/Reporting/ReportRuns.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const ReportRuns = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/reporting/report_runs' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/reporting/report_runs/{report_run}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/reporting/report_runs',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
14
server/node_modules/stripe/esm/resources/Reporting/ReportTypes.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/resources/Reporting/ReportTypes.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const ReportTypes = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/reporting/report_types/{report_type}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/reporting/report_types',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
15
server/node_modules/stripe/esm/resources/Reviews.js
generated
vendored
Normal file
15
server/node_modules/stripe/esm/resources/Reviews.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Reviews = StripeResource.extend({
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/reviews/{review}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/reviews',
|
||||
methodType: 'list',
|
||||
}),
|
||||
approve: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/reviews/{review}/approve',
|
||||
}),
|
||||
});
|
||||
10
server/node_modules/stripe/esm/resources/SetupAttempts.js
generated
vendored
Normal file
10
server/node_modules/stripe/esm/resources/SetupAttempts.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const SetupAttempts = StripeResource.extend({
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/setup_attempts',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
31
server/node_modules/stripe/esm/resources/SetupIntents.js
generated
vendored
Normal file
31
server/node_modules/stripe/esm/resources/SetupIntents.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const SetupIntents = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/setup_intents' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/setup_intents/{intent}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/setup_intents/{intent}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/setup_intents',
|
||||
methodType: 'list',
|
||||
}),
|
||||
cancel: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/setup_intents/{intent}/cancel',
|
||||
}),
|
||||
confirm: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/setup_intents/{intent}/confirm',
|
||||
}),
|
||||
verifyMicrodeposits: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/setup_intents/{intent}/verify_microdeposits',
|
||||
}),
|
||||
});
|
||||
19
server/node_modules/stripe/esm/resources/ShippingRates.js
generated
vendored
Normal file
19
server/node_modules/stripe/esm/resources/ShippingRates.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const ShippingRates = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/shipping_rates' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/shipping_rates/{shipping_rate_token}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/shipping_rates/{shipping_rate_token}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/shipping_rates',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
14
server/node_modules/stripe/esm/resources/Sigma/ScheduledQueryRuns.js
generated
vendored
Normal file
14
server/node_modules/stripe/esm/resources/Sigma/ScheduledQueryRuns.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const ScheduledQueryRuns = StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/sigma/scheduled_query_runs/{scheduled_query_run}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/sigma/scheduled_query_runs',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/esm/resources/Sources.js
generated
vendored
Normal file
17
server/node_modules/stripe/esm/resources/Sources.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Sources = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/sources' }),
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/sources/{source}' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/sources/{source}' }),
|
||||
listSourceTransactions: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/sources/{source}/source_transactions',
|
||||
methodType: 'list',
|
||||
}),
|
||||
verify: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/sources/{source}/verify',
|
||||
}),
|
||||
});
|
||||
32
server/node_modules/stripe/esm/resources/SubscriptionItems.js
generated
vendored
Normal file
32
server/node_modules/stripe/esm/resources/SubscriptionItems.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const SubscriptionItems = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/subscription_items' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/subscription_items/{item}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/subscription_items/{item}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/subscription_items',
|
||||
methodType: 'list',
|
||||
}),
|
||||
del: stripeMethod({
|
||||
method: 'DELETE',
|
||||
fullPath: '/v1/subscription_items/{item}',
|
||||
}),
|
||||
createUsageRecord: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/subscription_items/{subscription_item}/usage_records',
|
||||
}),
|
||||
listUsageRecordSummaries: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/subscription_items/{subscription_item}/usage_record_summaries',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
30
server/node_modules/stripe/esm/resources/SubscriptionSchedules.js
generated
vendored
Normal file
30
server/node_modules/stripe/esm/resources/SubscriptionSchedules.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const SubscriptionSchedules = StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/subscription_schedules',
|
||||
}),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/subscription_schedules/{schedule}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/subscription_schedules/{schedule}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/subscription_schedules',
|
||||
methodType: 'list',
|
||||
}),
|
||||
cancel: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/subscription_schedules/{schedule}/cancel',
|
||||
}),
|
||||
release: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/subscription_schedules/{schedule}/release',
|
||||
}),
|
||||
});
|
||||
36
server/node_modules/stripe/esm/resources/Subscriptions.js
generated
vendored
Normal file
36
server/node_modules/stripe/esm/resources/Subscriptions.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Subscriptions = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/subscriptions' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/subscriptions/{subscription_exposed_id}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/subscriptions/{subscription_exposed_id}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/subscriptions',
|
||||
methodType: 'list',
|
||||
}),
|
||||
cancel: stripeMethod({
|
||||
method: 'DELETE',
|
||||
fullPath: '/v1/subscriptions/{subscription_exposed_id}',
|
||||
}),
|
||||
deleteDiscount: stripeMethod({
|
||||
method: 'DELETE',
|
||||
fullPath: '/v1/subscriptions/{subscription_exposed_id}/discount',
|
||||
}),
|
||||
resume: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/subscriptions/{subscription}/resume',
|
||||
}),
|
||||
search: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/subscriptions/search',
|
||||
methodType: 'search',
|
||||
}),
|
||||
});
|
||||
11
server/node_modules/stripe/esm/resources/Tax/Calculations.js
generated
vendored
Normal file
11
server/node_modules/stripe/esm/resources/Tax/Calculations.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Calculations = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/tax/calculations' }),
|
||||
listLineItems: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/tax/calculations/{calculation}/line_items',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
19
server/node_modules/stripe/esm/resources/Tax/Registrations.js
generated
vendored
Normal file
19
server/node_modules/stripe/esm/resources/Tax/Registrations.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Registrations = StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/tax/registrations' }),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/tax/registrations/{id}',
|
||||
}),
|
||||
update: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/tax/registrations/{id}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/tax/registrations',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
7
server/node_modules/stripe/esm/resources/Tax/Settings.js
generated
vendored
Normal file
7
server/node_modules/stripe/esm/resources/Tax/Settings.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// File generated from our OpenAPI spec
|
||||
import { StripeResource } from '../../StripeResource.js';
|
||||
const stripeMethod = StripeResource.method;
|
||||
export const Settings = StripeResource.extend({
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/tax/settings' }),
|
||||
update: stripeMethod({ method: 'POST', fullPath: '/v1/tax/settings' }),
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user