Complete Email Sortierer implementation with Appwrite and Stripe integration
This commit is contained in:
176
server/node_modules/stripe/cjs/Error.js
generated
vendored
Normal file
176
server/node_modules/stripe/cjs/Error.js
generated
vendored
Normal file
@@ -0,0 +1,176 @@
|
||||
"use strict";
|
||||
/* eslint-disable camelcase */
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.StripeUnknownError = exports.StripeInvalidGrantError = exports.StripeIdempotencyError = exports.StripeSignatureVerificationError = exports.StripeConnectionError = exports.StripeRateLimitError = exports.StripePermissionError = exports.StripeAuthenticationError = exports.StripeAPIError = exports.StripeInvalidRequestError = exports.StripeCardError = exports.StripeError = exports.generate = void 0;
|
||||
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);
|
||||
}
|
||||
};
|
||||
exports.generate = generate;
|
||||
/**
|
||||
* StripeError is the base error from which all other more specific Stripe errors derive.
|
||||
* Specifically for errors returned from Stripe's REST API.
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
||||
exports.StripeError = StripeError;
|
||||
/**
|
||||
* Helper factory which takes raw stripe errors and outputs wrapping instances
|
||||
*/
|
||||
StripeError.generate = exports.generate;
|
||||
// Specific Stripe Error types:
|
||||
/**
|
||||
* CardError is raised when a user enters a card that can't be charged for
|
||||
* some reason.
|
||||
*/
|
||||
class StripeCardError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeCardError');
|
||||
}
|
||||
}
|
||||
exports.StripeCardError = StripeCardError;
|
||||
/**
|
||||
* InvalidRequestError is raised when a request is initiated with invalid
|
||||
* parameters.
|
||||
*/
|
||||
class StripeInvalidRequestError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeInvalidRequestError');
|
||||
}
|
||||
}
|
||||
exports.StripeInvalidRequestError = 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.
|
||||
*/
|
||||
class StripeAPIError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeAPIError');
|
||||
}
|
||||
}
|
||||
exports.StripeAPIError = StripeAPIError;
|
||||
/**
|
||||
* AuthenticationError is raised when invalid credentials are used to connect
|
||||
* to Stripe's servers.
|
||||
*/
|
||||
class StripeAuthenticationError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeAuthenticationError');
|
||||
}
|
||||
}
|
||||
exports.StripeAuthenticationError = StripeAuthenticationError;
|
||||
/**
|
||||
* PermissionError is raised in cases where access was attempted on a resource
|
||||
* that wasn't allowed.
|
||||
*/
|
||||
class StripePermissionError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripePermissionError');
|
||||
}
|
||||
}
|
||||
exports.StripePermissionError = 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.
|
||||
*/
|
||||
class StripeRateLimitError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeRateLimitError');
|
||||
}
|
||||
}
|
||||
exports.StripeRateLimitError = 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.
|
||||
*/
|
||||
class StripeConnectionError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeConnectionError');
|
||||
}
|
||||
}
|
||||
exports.StripeConnectionError = StripeConnectionError;
|
||||
/**
|
||||
* SignatureVerificationError is raised when the signature verification for a
|
||||
* webhook fails
|
||||
*/
|
||||
class StripeSignatureVerificationError extends StripeError {
|
||||
constructor(header, payload, raw = {}) {
|
||||
super(raw, 'StripeSignatureVerificationError');
|
||||
this.header = header;
|
||||
this.payload = payload;
|
||||
}
|
||||
}
|
||||
exports.StripeSignatureVerificationError = StripeSignatureVerificationError;
|
||||
/**
|
||||
* IdempotencyError is raised in cases where an idempotency key was used
|
||||
* improperly.
|
||||
*/
|
||||
class StripeIdempotencyError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeIdempotencyError');
|
||||
}
|
||||
}
|
||||
exports.StripeIdempotencyError = 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.
|
||||
*/
|
||||
class StripeInvalidGrantError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeInvalidGrantError');
|
||||
}
|
||||
}
|
||||
exports.StripeInvalidGrantError = StripeInvalidGrantError;
|
||||
/**
|
||||
* Any other error from Stripe not specifically captured above
|
||||
*/
|
||||
class StripeUnknownError extends StripeError {
|
||||
constructor(raw = {}) {
|
||||
super(raw, 'StripeUnknownError');
|
||||
}
|
||||
}
|
||||
exports.StripeUnknownError = StripeUnknownError;
|
||||
356
server/node_modules/stripe/cjs/RequestSender.js
generated
vendored
Normal file
356
server/node_modules/stripe/cjs/RequestSender.js
generated
vendored
Normal file
@@ -0,0 +1,356 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.RequestSender = void 0;
|
||||
const Error_js_1 = require("./Error.js");
|
||||
const utils_js_1 = require("./utils.js");
|
||||
const HttpClient_js_1 = require("./net/HttpClient.js");
|
||||
const MAX_RETRY_AFTER_WAIT = 60;
|
||||
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 (0, utils_js_1.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 Error_js_1.StripeAuthenticationError(jsonResponse.error);
|
||||
}
|
||||
else if (statusCode === 403) {
|
||||
err = new Error_js_1.StripePermissionError(jsonResponse.error);
|
||||
}
|
||||
else if (statusCode === 429) {
|
||||
err = new Error_js_1.StripeRateLimitError(jsonResponse.error);
|
||||
}
|
||||
else {
|
||||
err = Error_js_1.StripeError.generate(jsonResponse.error);
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
return jsonResponse;
|
||||
}, (e) => {
|
||||
throw new Error_js_1.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_js_1.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) {
|
||||
(0, utils_js_1.emitWarning)(`${method} method had non-zero contentLength but no payload is expected for this verb`);
|
||||
}
|
||||
defaultHeaders['Content-Length'] = contentLength;
|
||||
}
|
||||
return Object.assign((0, utils_js_1.removeNullish)(defaultHeaders),
|
||||
// If the user supplied, say 'idempotency-key', override instead of appending by ensuring caps are the same.
|
||||
(0, utils_js_1.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) {
|
||||
(0, utils_js_1.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 = (0, utils_js_1.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_js_1.HttpClient.TIMEOUT_ERROR_CODE;
|
||||
return callback(new Error_js_1.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, (0, utils_js_1.stringifyRequestData)(data || {}));
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.RequestSender = RequestSender;
|
||||
18
server/node_modules/stripe/cjs/ResourceNamespace.js
generated
vendored
Normal file
18
server/node_modules/stripe/cjs/ResourceNamespace.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
// ResourceNamespace allows you to create nested resources, i.e. `stripe.issuing.cards`.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resourceNamespace = void 0;
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
function resourceNamespace(namespace, resources) {
|
||||
return function (stripe) {
|
||||
return new ResourceNamespace(stripe, resources);
|
||||
};
|
||||
}
|
||||
exports.resourceNamespace = resourceNamespace;
|
||||
46
server/node_modules/stripe/cjs/StripeEmitter.js
generated
vendored
Normal file
46
server/node_modules/stripe/cjs/StripeEmitter.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.StripeEmitter = void 0;
|
||||
/**
|
||||
* @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. */
|
||||
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));
|
||||
}
|
||||
}
|
||||
exports.StripeEmitter = StripeEmitter;
|
||||
36
server/node_modules/stripe/cjs/StripeMethod.js
generated
vendored
Normal file
36
server/node_modules/stripe/cjs/StripeMethod.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.stripeMethod = void 0;
|
||||
const utils_js_1 = require("./utils.js");
|
||||
const autoPagination_js_1 = require("./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 -->
|
||||
*/
|
||||
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 = (0, utils_js_1.extractUrlParams)(spec.fullPath || this.createResourcePathWithSymbols(spec.path || ''));
|
||||
const requestPromise = (0, utils_js_1.callbackifyPromiseWithTimeout)(this._makeRequest(args, spec, {}), callback);
|
||||
Object.assign(requestPromise, (0, autoPagination_js_1.makeAutoPaginationMethods)(this, args, spec, requestPromise));
|
||||
return requestPromise;
|
||||
};
|
||||
}
|
||||
exports.stripeMethod = stripeMethod;
|
||||
171
server/node_modules/stripe/cjs/StripeResource.js
generated
vendored
Normal file
171
server/node_modules/stripe/cjs/StripeResource.js
generated
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.StripeResource = void 0;
|
||||
const utils_js_1 = require("./utils.js");
|
||||
const StripeMethod_js_1 = require("./StripeMethod.js");
|
||||
// Provide extension mechanism for Stripe Resource Sub-Classes
|
||||
StripeResource.extend = utils_js_1.protoExtend;
|
||||
// Expose method-creator
|
||||
StripeResource.method = StripeMethod_js_1.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 = (0, utils_js_1.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 = (0, utils_js_1.makeURLInterpolator)(this.path);
|
||||
this.initialize(...arguments);
|
||||
}
|
||||
exports.StripeResource = StripeResource;
|
||||
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 = (0, utils_js_1.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 = (0, utils_js_1.getDataFromArgs)(args);
|
||||
const data = encode(Object.assign({}, dataFromArgs, overrideData));
|
||||
const options = (0, utils_js_1.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 ? '' : '?',
|
||||
(0, utils_js_1.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));
|
||||
});
|
||||
},
|
||||
};
|
||||
200
server/node_modules/stripe/cjs/Webhooks.js
generated
vendored
Normal file
200
server/node_modules/stripe/cjs/Webhooks.js
generated
vendored
Normal file
@@ -0,0 +1,200 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createWebhooks = void 0;
|
||||
const Error_js_1 = require("./Error.js");
|
||||
const CryptoProvider_js_1 = require("./crypto/CryptoProvider.js");
|
||||
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 CryptoProvider_js_1.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 Error_js_1.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 Error_js_1.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 Error_js_1.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 Error_js_1.StripeSignatureVerificationError(decodedHeader, decodedPayload, {
|
||||
message: 'Unable to extract timestamp and signatures from header',
|
||||
});
|
||||
}
|
||||
if (!details.signatures.length) {
|
||||
throw new Error_js_1.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 Error_js_1.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 Error_js_1.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 Error_js_1.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;
|
||||
}
|
||||
exports.createWebhooks = createWebhooks;
|
||||
5
server/node_modules/stripe/cjs/apiVersion.js
generated
vendored
Normal file
5
server/node_modules/stripe/cjs/apiVersion.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ApiVersion = void 0;
|
||||
exports.ApiVersion = '2023-10-16';
|
||||
247
server/node_modules/stripe/cjs/autoPagination.js
generated
vendored
Normal file
247
server/node_modules/stripe/cjs/autoPagination.js
generated
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.makeAutoPaginationMethods = void 0;
|
||||
const utils_js_1 = require("./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,
|
||||
});
|
||||
}
|
||||
}
|
||||
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;
|
||||
};
|
||||
exports.makeAutoPaginationMethods = makeAutoPaginationMethods;
|
||||
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 (0, utils_js_1.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 (0, utils_js_1.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 = (0, utils_js_1.getDataFromArgs)(args);
|
||||
return !!dataFromArgs.ending_before;
|
||||
}
|
||||
45
server/node_modules/stripe/cjs/crypto/CryptoProvider.js
generated
vendored
Normal file
45
server/node_modules/stripe/cjs/crypto/CryptoProvider.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CryptoProviderOnlySupportsAsyncError = exports.CryptoProvider = void 0;
|
||||
/**
|
||||
* Interface encapsulating the various crypto computations used by the library,
|
||||
* allowing pluggable underlying crypto implementations.
|
||||
*/
|
||||
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.');
|
||||
}
|
||||
}
|
||||
exports.CryptoProvider = CryptoProvider;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
class CryptoProviderOnlySupportsAsyncError extends Error {
|
||||
}
|
||||
exports.CryptoProviderOnlySupportsAsyncError = CryptoProviderOnlySupportsAsyncError;
|
||||
23
server/node_modules/stripe/cjs/crypto/NodeCryptoProvider.js
generated
vendored
Normal file
23
server/node_modules/stripe/cjs/crypto/NodeCryptoProvider.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.NodeCryptoProvider = void 0;
|
||||
const crypto = require("crypto");
|
||||
const CryptoProvider_js_1 = require("./CryptoProvider.js");
|
||||
/**
|
||||
* `CryptoProvider which uses the Node `crypto` package for its computations.
|
||||
*/
|
||||
class NodeCryptoProvider extends CryptoProvider_js_1.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;
|
||||
}
|
||||
}
|
||||
exports.NodeCryptoProvider = NodeCryptoProvider;
|
||||
47
server/node_modules/stripe/cjs/crypto/SubtleCryptoProvider.js
generated
vendored
Normal file
47
server/node_modules/stripe/cjs/crypto/SubtleCryptoProvider.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SubtleCryptoProvider = void 0;
|
||||
const CryptoProvider_js_1 = require("./CryptoProvider.js");
|
||||
/**
|
||||
* `CryptoProvider which uses the SubtleCrypto interface of the Web Crypto API.
|
||||
*
|
||||
* This only supports asynchronous operations.
|
||||
*/
|
||||
class SubtleCryptoProvider extends CryptoProvider_js_1.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 CryptoProvider_js_1.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('');
|
||||
}
|
||||
}
|
||||
exports.SubtleCryptoProvider = SubtleCryptoProvider;
|
||||
// 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');
|
||||
}
|
||||
58
server/node_modules/stripe/cjs/multipart.js
generated
vendored
Normal file
58
server/node_modules/stripe/cjs/multipart.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.multipartRequestDataProcessor = void 0;
|
||||
const utils_js_1 = require("./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 = (0, utils_js_1.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;
|
||||
};
|
||||
function multipartRequestDataProcessor(method, data, headers, callback) {
|
||||
data = data || {};
|
||||
if (method !== 'POST') {
|
||||
return callback(null, (0, utils_js_1.stringifyRequestData)(data));
|
||||
}
|
||||
this._stripe._platformFunctions
|
||||
.tryBufferData(data)
|
||||
.then((bufferedData) => {
|
||||
const buffer = multipartDataGenerator(method, bufferedData, headers);
|
||||
return callback(null, buffer);
|
||||
})
|
||||
.catch((err) => callback(err, null));
|
||||
}
|
||||
exports.multipartRequestDataProcessor = multipartRequestDataProcessor;
|
||||
143
server/node_modules/stripe/cjs/net/FetchHttpClient.js
generated
vendored
Normal file
143
server/node_modules/stripe/cjs/net/FetchHttpClient.js
generated
vendored
Normal file
@@ -0,0 +1,143 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.FetchHttpClientResponse = exports.FetchHttpClient = void 0;
|
||||
const HttpClient_js_1 = require("./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).
|
||||
*/
|
||||
class FetchHttpClient extends HttpClient_js_1.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_js_1.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_js_1.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_js_1.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);
|
||||
}
|
||||
}
|
||||
exports.FetchHttpClient = FetchHttpClient;
|
||||
class FetchHttpClientResponse extends HttpClient_js_1.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;
|
||||
}
|
||||
}
|
||||
exports.FetchHttpClientResponse = FetchHttpClientResponse;
|
||||
53
server/node_modules/stripe/cjs/net/HttpClient.js
generated
vendored
Normal file
53
server/node_modules/stripe/cjs/net/HttpClient.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.HttpClientResponse = exports.HttpClient = void 0;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
||||
exports.HttpClient = HttpClient;
|
||||
// Public API accessible via Stripe.HttpClient
|
||||
HttpClient.CONNECTION_CLOSED_ERROR_CODES = ['ECONNRESET', 'EPIPE'];
|
||||
HttpClient.TIMEOUT_ERROR_CODE = 'ETIMEDOUT';
|
||||
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.');
|
||||
}
|
||||
}
|
||||
exports.HttpClientResponse = HttpClientResponse;
|
||||
108
server/node_modules/stripe/cjs/net/NodeHttpClient.js
generated
vendored
Normal file
108
server/node_modules/stripe/cjs/net/NodeHttpClient.js
generated
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.NodeHttpClientResponse = exports.NodeHttpClient = void 0;
|
||||
const http_ = require("http");
|
||||
const https_ = require("https");
|
||||
const HttpClient_js_1 = require("./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.`
|
||||
*/
|
||||
class NodeHttpClient extends HttpClient_js_1.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_js_1.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;
|
||||
}
|
||||
}
|
||||
exports.NodeHttpClient = NodeHttpClient;
|
||||
class NodeHttpClientResponse extends HttpClient_js_1.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);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.NodeHttpClientResponse = NodeHttpClientResponse;
|
||||
1
server/node_modules/stripe/cjs/package.json
generated
vendored
Normal file
1
server/node_modules/stripe/cjs/package.json
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"type":"commonjs"}
|
||||
126
server/node_modules/stripe/cjs/platform/NodePlatformFunctions.js
generated
vendored
Normal file
126
server/node_modules/stripe/cjs/platform/NodePlatformFunctions.js
generated
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.NodePlatformFunctions = void 0;
|
||||
const crypto = require("crypto");
|
||||
const events_1 = require("events");
|
||||
const NodeCryptoProvider_js_1 = require("../crypto/NodeCryptoProvider.js");
|
||||
const NodeHttpClient_js_1 = require("../net/NodeHttpClient.js");
|
||||
const PlatformFunctions_js_1 = require("./PlatformFunctions.js");
|
||||
const Error_js_1 = require("../Error.js");
|
||||
const utils_js_1 = require("../utils.js");
|
||||
const child_process_1 = require("child_process");
|
||||
class StreamProcessingError extends Error_js_1.StripeError {
|
||||
}
|
||||
/**
|
||||
* Specializes WebPlatformFunctions using APIs available in Node.js.
|
||||
*/
|
||||
class NodePlatformFunctions extends PlatformFunctions_js_1.PlatformFunctions {
|
||||
constructor() {
|
||||
super();
|
||||
this._exec = child_process_1.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 events_1.EventEmitter();
|
||||
}
|
||||
/** @override */
|
||||
tryBufferData(data) {
|
||||
if (!(data.file.data instanceof events_1.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 = (0, utils_js_1.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_js_1.NodeHttpClient(agent);
|
||||
}
|
||||
/** @override */
|
||||
createDefaultHttpClient() {
|
||||
return new NodeHttpClient_js_1.NodeHttpClient();
|
||||
}
|
||||
/** @override */
|
||||
createNodeCryptoProvider() {
|
||||
return new NodeCryptoProvider_js_1.NodeCryptoProvider();
|
||||
}
|
||||
/** @override */
|
||||
createDefaultCryptoProvider() {
|
||||
return this.createNodeCryptoProvider();
|
||||
}
|
||||
}
|
||||
exports.NodePlatformFunctions = NodePlatformFunctions;
|
||||
98
server/node_modules/stripe/cjs/platform/PlatformFunctions.js
generated
vendored
Normal file
98
server/node_modules/stripe/cjs/platform/PlatformFunctions.js
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PlatformFunctions = void 0;
|
||||
const FetchHttpClient_js_1 = require("../net/FetchHttpClient.js");
|
||||
const SubtleCryptoProvider_js_1 = require("../crypto/SubtleCryptoProvider.js");
|
||||
/**
|
||||
* Interface encapsulating various utility functions whose
|
||||
* implementations depend on the platform / JS runtime.
|
||||
*/
|
||||
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_js_1.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_js_1.SubtleCryptoProvider(subtleCrypto);
|
||||
}
|
||||
createDefaultCryptoProvider() {
|
||||
throw new Error('createDefaultCryptoProvider not implemented.');
|
||||
}
|
||||
}
|
||||
exports.PlatformFunctions = PlatformFunctions;
|
||||
42
server/node_modules/stripe/cjs/platform/WebPlatformFunctions.js
generated
vendored
Normal file
42
server/node_modules/stripe/cjs/platform/WebPlatformFunctions.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.WebPlatformFunctions = void 0;
|
||||
const PlatformFunctions_js_1 = require("./PlatformFunctions.js");
|
||||
const StripeEmitter_js_1 = require("../StripeEmitter.js");
|
||||
/**
|
||||
* Specializes WebPlatformFunctions using APIs available in Web workers.
|
||||
*/
|
||||
class WebPlatformFunctions extends PlatformFunctions_js_1.PlatformFunctions {
|
||||
/** @override */
|
||||
getUname() {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
/** @override */
|
||||
createEmitter() {
|
||||
return new StripeEmitter_js_1.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();
|
||||
}
|
||||
}
|
||||
exports.WebPlatformFunctions = WebPlatformFunctions;
|
||||
276
server/node_modules/stripe/cjs/resources.js
generated
vendored
Normal file
276
server/node_modules/stripe/cjs/resources.js
generated
vendored
Normal file
@@ -0,0 +1,276 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Topups = exports.Tokens = exports.TaxRates = exports.TaxIds = exports.TaxCodes = exports.Subscriptions = exports.SubscriptionSchedules = exports.SubscriptionItems = exports.Sources = exports.ShippingRates = exports.SetupIntents = exports.SetupAttempts = exports.Reviews = exports.Refunds = exports.Quotes = exports.PromotionCodes = exports.Products = exports.Prices = exports.Plans = exports.Payouts = exports.PaymentMethods = exports.PaymentMethodDomains = exports.PaymentMethodConfigurations = exports.PaymentLinks = exports.PaymentIntents = exports.OAuth = exports.Mandates = exports.Invoices = exports.InvoiceItems = exports.Files = exports.FileLinks = exports.ExchangeRates = exports.Events = exports.EphemeralKeys = exports.Disputes = exports.Customers = exports.CustomerSessions = exports.CreditNotes = exports.Coupons = exports.CountrySpecs = exports.ConfirmationTokens = exports.Charges = exports.BalanceTransactions = exports.Balance = exports.ApplicationFees = exports.ApplePayDomains = exports.Accounts = exports.AccountSessions = exports.AccountLinks = exports.Account = void 0;
|
||||
exports.Treasury = exports.TestHelpers = exports.Terminal = exports.Tax = exports.Sigma = exports.Reporting = exports.Radar = exports.Issuing = exports.Identity = exports.Forwarding = exports.FinancialConnections = exports.Entitlements = exports.Climate = exports.Checkout = exports.BillingPortal = exports.Billing = exports.Apps = exports.WebhookEndpoints = exports.Transfers = void 0;
|
||||
const ResourceNamespace_js_1 = require("./ResourceNamespace.js");
|
||||
const Accounts_js_1 = require("./resources/FinancialConnections/Accounts.js");
|
||||
const ActiveEntitlements_js_1 = require("./resources/Entitlements/ActiveEntitlements.js");
|
||||
const Authorizations_js_1 = require("./resources/TestHelpers/Issuing/Authorizations.js");
|
||||
const Authorizations_js_2 = require("./resources/Issuing/Authorizations.js");
|
||||
const Calculations_js_1 = require("./resources/Tax/Calculations.js");
|
||||
const Cardholders_js_1 = require("./resources/Issuing/Cardholders.js");
|
||||
const Cards_js_1 = require("./resources/TestHelpers/Issuing/Cards.js");
|
||||
const Cards_js_2 = require("./resources/Issuing/Cards.js");
|
||||
const Configurations_js_1 = require("./resources/BillingPortal/Configurations.js");
|
||||
const Configurations_js_2 = require("./resources/Terminal/Configurations.js");
|
||||
const ConfirmationTokens_js_1 = require("./resources/TestHelpers/ConfirmationTokens.js");
|
||||
const ConnectionTokens_js_1 = require("./resources/Terminal/ConnectionTokens.js");
|
||||
const CreditReversals_js_1 = require("./resources/Treasury/CreditReversals.js");
|
||||
const Customers_js_1 = require("./resources/TestHelpers/Customers.js");
|
||||
const DebitReversals_js_1 = require("./resources/Treasury/DebitReversals.js");
|
||||
const Disputes_js_1 = require("./resources/Issuing/Disputes.js");
|
||||
const EarlyFraudWarnings_js_1 = require("./resources/Radar/EarlyFraudWarnings.js");
|
||||
const Features_js_1 = require("./resources/Entitlements/Features.js");
|
||||
const FinancialAccounts_js_1 = require("./resources/Treasury/FinancialAccounts.js");
|
||||
const InboundTransfers_js_1 = require("./resources/TestHelpers/Treasury/InboundTransfers.js");
|
||||
const InboundTransfers_js_2 = require("./resources/Treasury/InboundTransfers.js");
|
||||
const Locations_js_1 = require("./resources/Terminal/Locations.js");
|
||||
const MeterEventAdjustments_js_1 = require("./resources/Billing/MeterEventAdjustments.js");
|
||||
const MeterEvents_js_1 = require("./resources/Billing/MeterEvents.js");
|
||||
const Meters_js_1 = require("./resources/Billing/Meters.js");
|
||||
const Orders_js_1 = require("./resources/Climate/Orders.js");
|
||||
const OutboundPayments_js_1 = require("./resources/TestHelpers/Treasury/OutboundPayments.js");
|
||||
const OutboundPayments_js_2 = require("./resources/Treasury/OutboundPayments.js");
|
||||
const OutboundTransfers_js_1 = require("./resources/TestHelpers/Treasury/OutboundTransfers.js");
|
||||
const OutboundTransfers_js_2 = require("./resources/Treasury/OutboundTransfers.js");
|
||||
const PersonalizationDesigns_js_1 = require("./resources/TestHelpers/Issuing/PersonalizationDesigns.js");
|
||||
const PersonalizationDesigns_js_2 = require("./resources/Issuing/PersonalizationDesigns.js");
|
||||
const PhysicalBundles_js_1 = require("./resources/Issuing/PhysicalBundles.js");
|
||||
const Products_js_1 = require("./resources/Climate/Products.js");
|
||||
const Readers_js_1 = require("./resources/TestHelpers/Terminal/Readers.js");
|
||||
const Readers_js_2 = require("./resources/Terminal/Readers.js");
|
||||
const ReceivedCredits_js_1 = require("./resources/TestHelpers/Treasury/ReceivedCredits.js");
|
||||
const ReceivedCredits_js_2 = require("./resources/Treasury/ReceivedCredits.js");
|
||||
const ReceivedDebits_js_1 = require("./resources/TestHelpers/Treasury/ReceivedDebits.js");
|
||||
const ReceivedDebits_js_2 = require("./resources/Treasury/ReceivedDebits.js");
|
||||
const Refunds_js_1 = require("./resources/TestHelpers/Refunds.js");
|
||||
const Registrations_js_1 = require("./resources/Tax/Registrations.js");
|
||||
const ReportRuns_js_1 = require("./resources/Reporting/ReportRuns.js");
|
||||
const ReportTypes_js_1 = require("./resources/Reporting/ReportTypes.js");
|
||||
const Requests_js_1 = require("./resources/Forwarding/Requests.js");
|
||||
const ScheduledQueryRuns_js_1 = require("./resources/Sigma/ScheduledQueryRuns.js");
|
||||
const Secrets_js_1 = require("./resources/Apps/Secrets.js");
|
||||
const Sessions_js_1 = require("./resources/BillingPortal/Sessions.js");
|
||||
const Sessions_js_2 = require("./resources/Checkout/Sessions.js");
|
||||
const Sessions_js_3 = require("./resources/FinancialConnections/Sessions.js");
|
||||
const Settings_js_1 = require("./resources/Tax/Settings.js");
|
||||
const Suppliers_js_1 = require("./resources/Climate/Suppliers.js");
|
||||
const TestClocks_js_1 = require("./resources/TestHelpers/TestClocks.js");
|
||||
const Tokens_js_1 = require("./resources/Issuing/Tokens.js");
|
||||
const TransactionEntries_js_1 = require("./resources/Treasury/TransactionEntries.js");
|
||||
const Transactions_js_1 = require("./resources/TestHelpers/Issuing/Transactions.js");
|
||||
const Transactions_js_2 = require("./resources/FinancialConnections/Transactions.js");
|
||||
const Transactions_js_3 = require("./resources/Issuing/Transactions.js");
|
||||
const Transactions_js_4 = require("./resources/Tax/Transactions.js");
|
||||
const Transactions_js_5 = require("./resources/Treasury/Transactions.js");
|
||||
const ValueListItems_js_1 = require("./resources/Radar/ValueListItems.js");
|
||||
const ValueLists_js_1 = require("./resources/Radar/ValueLists.js");
|
||||
const VerificationReports_js_1 = require("./resources/Identity/VerificationReports.js");
|
||||
const VerificationSessions_js_1 = require("./resources/Identity/VerificationSessions.js");
|
||||
var Accounts_js_2 = require("./resources/Accounts.js");
|
||||
Object.defineProperty(exports, "Account", { enumerable: true, get: function () { return Accounts_js_2.Accounts; } });
|
||||
var AccountLinks_js_1 = require("./resources/AccountLinks.js");
|
||||
Object.defineProperty(exports, "AccountLinks", { enumerable: true, get: function () { return AccountLinks_js_1.AccountLinks; } });
|
||||
var AccountSessions_js_1 = require("./resources/AccountSessions.js");
|
||||
Object.defineProperty(exports, "AccountSessions", { enumerable: true, get: function () { return AccountSessions_js_1.AccountSessions; } });
|
||||
var Accounts_js_3 = require("./resources/Accounts.js");
|
||||
Object.defineProperty(exports, "Accounts", { enumerable: true, get: function () { return Accounts_js_3.Accounts; } });
|
||||
var ApplePayDomains_js_1 = require("./resources/ApplePayDomains.js");
|
||||
Object.defineProperty(exports, "ApplePayDomains", { enumerable: true, get: function () { return ApplePayDomains_js_1.ApplePayDomains; } });
|
||||
var ApplicationFees_js_1 = require("./resources/ApplicationFees.js");
|
||||
Object.defineProperty(exports, "ApplicationFees", { enumerable: true, get: function () { return ApplicationFees_js_1.ApplicationFees; } });
|
||||
var Balance_js_1 = require("./resources/Balance.js");
|
||||
Object.defineProperty(exports, "Balance", { enumerable: true, get: function () { return Balance_js_1.Balance; } });
|
||||
var BalanceTransactions_js_1 = require("./resources/BalanceTransactions.js");
|
||||
Object.defineProperty(exports, "BalanceTransactions", { enumerable: true, get: function () { return BalanceTransactions_js_1.BalanceTransactions; } });
|
||||
var Charges_js_1 = require("./resources/Charges.js");
|
||||
Object.defineProperty(exports, "Charges", { enumerable: true, get: function () { return Charges_js_1.Charges; } });
|
||||
var ConfirmationTokens_js_2 = require("./resources/ConfirmationTokens.js");
|
||||
Object.defineProperty(exports, "ConfirmationTokens", { enumerable: true, get: function () { return ConfirmationTokens_js_2.ConfirmationTokens; } });
|
||||
var CountrySpecs_js_1 = require("./resources/CountrySpecs.js");
|
||||
Object.defineProperty(exports, "CountrySpecs", { enumerable: true, get: function () { return CountrySpecs_js_1.CountrySpecs; } });
|
||||
var Coupons_js_1 = require("./resources/Coupons.js");
|
||||
Object.defineProperty(exports, "Coupons", { enumerable: true, get: function () { return Coupons_js_1.Coupons; } });
|
||||
var CreditNotes_js_1 = require("./resources/CreditNotes.js");
|
||||
Object.defineProperty(exports, "CreditNotes", { enumerable: true, get: function () { return CreditNotes_js_1.CreditNotes; } });
|
||||
var CustomerSessions_js_1 = require("./resources/CustomerSessions.js");
|
||||
Object.defineProperty(exports, "CustomerSessions", { enumerable: true, get: function () { return CustomerSessions_js_1.CustomerSessions; } });
|
||||
var Customers_js_2 = require("./resources/Customers.js");
|
||||
Object.defineProperty(exports, "Customers", { enumerable: true, get: function () { return Customers_js_2.Customers; } });
|
||||
var Disputes_js_2 = require("./resources/Disputes.js");
|
||||
Object.defineProperty(exports, "Disputes", { enumerable: true, get: function () { return Disputes_js_2.Disputes; } });
|
||||
var EphemeralKeys_js_1 = require("./resources/EphemeralKeys.js");
|
||||
Object.defineProperty(exports, "EphemeralKeys", { enumerable: true, get: function () { return EphemeralKeys_js_1.EphemeralKeys; } });
|
||||
var Events_js_1 = require("./resources/Events.js");
|
||||
Object.defineProperty(exports, "Events", { enumerable: true, get: function () { return Events_js_1.Events; } });
|
||||
var ExchangeRates_js_1 = require("./resources/ExchangeRates.js");
|
||||
Object.defineProperty(exports, "ExchangeRates", { enumerable: true, get: function () { return ExchangeRates_js_1.ExchangeRates; } });
|
||||
var FileLinks_js_1 = require("./resources/FileLinks.js");
|
||||
Object.defineProperty(exports, "FileLinks", { enumerable: true, get: function () { return FileLinks_js_1.FileLinks; } });
|
||||
var Files_js_1 = require("./resources/Files.js");
|
||||
Object.defineProperty(exports, "Files", { enumerable: true, get: function () { return Files_js_1.Files; } });
|
||||
var InvoiceItems_js_1 = require("./resources/InvoiceItems.js");
|
||||
Object.defineProperty(exports, "InvoiceItems", { enumerable: true, get: function () { return InvoiceItems_js_1.InvoiceItems; } });
|
||||
var Invoices_js_1 = require("./resources/Invoices.js");
|
||||
Object.defineProperty(exports, "Invoices", { enumerable: true, get: function () { return Invoices_js_1.Invoices; } });
|
||||
var Mandates_js_1 = require("./resources/Mandates.js");
|
||||
Object.defineProperty(exports, "Mandates", { enumerable: true, get: function () { return Mandates_js_1.Mandates; } });
|
||||
var OAuth_js_1 = require("./resources/OAuth.js");
|
||||
Object.defineProperty(exports, "OAuth", { enumerable: true, get: function () { return OAuth_js_1.OAuth; } });
|
||||
var PaymentIntents_js_1 = require("./resources/PaymentIntents.js");
|
||||
Object.defineProperty(exports, "PaymentIntents", { enumerable: true, get: function () { return PaymentIntents_js_1.PaymentIntents; } });
|
||||
var PaymentLinks_js_1 = require("./resources/PaymentLinks.js");
|
||||
Object.defineProperty(exports, "PaymentLinks", { enumerable: true, get: function () { return PaymentLinks_js_1.PaymentLinks; } });
|
||||
var PaymentMethodConfigurations_js_1 = require("./resources/PaymentMethodConfigurations.js");
|
||||
Object.defineProperty(exports, "PaymentMethodConfigurations", { enumerable: true, get: function () { return PaymentMethodConfigurations_js_1.PaymentMethodConfigurations; } });
|
||||
var PaymentMethodDomains_js_1 = require("./resources/PaymentMethodDomains.js");
|
||||
Object.defineProperty(exports, "PaymentMethodDomains", { enumerable: true, get: function () { return PaymentMethodDomains_js_1.PaymentMethodDomains; } });
|
||||
var PaymentMethods_js_1 = require("./resources/PaymentMethods.js");
|
||||
Object.defineProperty(exports, "PaymentMethods", { enumerable: true, get: function () { return PaymentMethods_js_1.PaymentMethods; } });
|
||||
var Payouts_js_1 = require("./resources/Payouts.js");
|
||||
Object.defineProperty(exports, "Payouts", { enumerable: true, get: function () { return Payouts_js_1.Payouts; } });
|
||||
var Plans_js_1 = require("./resources/Plans.js");
|
||||
Object.defineProperty(exports, "Plans", { enumerable: true, get: function () { return Plans_js_1.Plans; } });
|
||||
var Prices_js_1 = require("./resources/Prices.js");
|
||||
Object.defineProperty(exports, "Prices", { enumerable: true, get: function () { return Prices_js_1.Prices; } });
|
||||
var Products_js_2 = require("./resources/Products.js");
|
||||
Object.defineProperty(exports, "Products", { enumerable: true, get: function () { return Products_js_2.Products; } });
|
||||
var PromotionCodes_js_1 = require("./resources/PromotionCodes.js");
|
||||
Object.defineProperty(exports, "PromotionCodes", { enumerable: true, get: function () { return PromotionCodes_js_1.PromotionCodes; } });
|
||||
var Quotes_js_1 = require("./resources/Quotes.js");
|
||||
Object.defineProperty(exports, "Quotes", { enumerable: true, get: function () { return Quotes_js_1.Quotes; } });
|
||||
var Refunds_js_2 = require("./resources/Refunds.js");
|
||||
Object.defineProperty(exports, "Refunds", { enumerable: true, get: function () { return Refunds_js_2.Refunds; } });
|
||||
var Reviews_js_1 = require("./resources/Reviews.js");
|
||||
Object.defineProperty(exports, "Reviews", { enumerable: true, get: function () { return Reviews_js_1.Reviews; } });
|
||||
var SetupAttempts_js_1 = require("./resources/SetupAttempts.js");
|
||||
Object.defineProperty(exports, "SetupAttempts", { enumerable: true, get: function () { return SetupAttempts_js_1.SetupAttempts; } });
|
||||
var SetupIntents_js_1 = require("./resources/SetupIntents.js");
|
||||
Object.defineProperty(exports, "SetupIntents", { enumerable: true, get: function () { return SetupIntents_js_1.SetupIntents; } });
|
||||
var ShippingRates_js_1 = require("./resources/ShippingRates.js");
|
||||
Object.defineProperty(exports, "ShippingRates", { enumerable: true, get: function () { return ShippingRates_js_1.ShippingRates; } });
|
||||
var Sources_js_1 = require("./resources/Sources.js");
|
||||
Object.defineProperty(exports, "Sources", { enumerable: true, get: function () { return Sources_js_1.Sources; } });
|
||||
var SubscriptionItems_js_1 = require("./resources/SubscriptionItems.js");
|
||||
Object.defineProperty(exports, "SubscriptionItems", { enumerable: true, get: function () { return SubscriptionItems_js_1.SubscriptionItems; } });
|
||||
var SubscriptionSchedules_js_1 = require("./resources/SubscriptionSchedules.js");
|
||||
Object.defineProperty(exports, "SubscriptionSchedules", { enumerable: true, get: function () { return SubscriptionSchedules_js_1.SubscriptionSchedules; } });
|
||||
var Subscriptions_js_1 = require("./resources/Subscriptions.js");
|
||||
Object.defineProperty(exports, "Subscriptions", { enumerable: true, get: function () { return Subscriptions_js_1.Subscriptions; } });
|
||||
var TaxCodes_js_1 = require("./resources/TaxCodes.js");
|
||||
Object.defineProperty(exports, "TaxCodes", { enumerable: true, get: function () { return TaxCodes_js_1.TaxCodes; } });
|
||||
var TaxIds_js_1 = require("./resources/TaxIds.js");
|
||||
Object.defineProperty(exports, "TaxIds", { enumerable: true, get: function () { return TaxIds_js_1.TaxIds; } });
|
||||
var TaxRates_js_1 = require("./resources/TaxRates.js");
|
||||
Object.defineProperty(exports, "TaxRates", { enumerable: true, get: function () { return TaxRates_js_1.TaxRates; } });
|
||||
var Tokens_js_2 = require("./resources/Tokens.js");
|
||||
Object.defineProperty(exports, "Tokens", { enumerable: true, get: function () { return Tokens_js_2.Tokens; } });
|
||||
var Topups_js_1 = require("./resources/Topups.js");
|
||||
Object.defineProperty(exports, "Topups", { enumerable: true, get: function () { return Topups_js_1.Topups; } });
|
||||
var Transfers_js_1 = require("./resources/Transfers.js");
|
||||
Object.defineProperty(exports, "Transfers", { enumerable: true, get: function () { return Transfers_js_1.Transfers; } });
|
||||
var WebhookEndpoints_js_1 = require("./resources/WebhookEndpoints.js");
|
||||
Object.defineProperty(exports, "WebhookEndpoints", { enumerable: true, get: function () { return WebhookEndpoints_js_1.WebhookEndpoints; } });
|
||||
exports.Apps = (0, ResourceNamespace_js_1.resourceNamespace)('apps', { Secrets: Secrets_js_1.Secrets });
|
||||
exports.Billing = (0, ResourceNamespace_js_1.resourceNamespace)('billing', {
|
||||
MeterEventAdjustments: MeterEventAdjustments_js_1.MeterEventAdjustments,
|
||||
MeterEvents: MeterEvents_js_1.MeterEvents,
|
||||
Meters: Meters_js_1.Meters,
|
||||
});
|
||||
exports.BillingPortal = (0, ResourceNamespace_js_1.resourceNamespace)('billingPortal', {
|
||||
Configurations: Configurations_js_1.Configurations,
|
||||
Sessions: Sessions_js_1.Sessions,
|
||||
});
|
||||
exports.Checkout = (0, ResourceNamespace_js_1.resourceNamespace)('checkout', {
|
||||
Sessions: Sessions_js_2.Sessions,
|
||||
});
|
||||
exports.Climate = (0, ResourceNamespace_js_1.resourceNamespace)('climate', {
|
||||
Orders: Orders_js_1.Orders,
|
||||
Products: Products_js_1.Products,
|
||||
Suppliers: Suppliers_js_1.Suppliers,
|
||||
});
|
||||
exports.Entitlements = (0, ResourceNamespace_js_1.resourceNamespace)('entitlements', {
|
||||
ActiveEntitlements: ActiveEntitlements_js_1.ActiveEntitlements,
|
||||
Features: Features_js_1.Features,
|
||||
});
|
||||
exports.FinancialConnections = (0, ResourceNamespace_js_1.resourceNamespace)('financialConnections', {
|
||||
Accounts: Accounts_js_1.Accounts,
|
||||
Sessions: Sessions_js_3.Sessions,
|
||||
Transactions: Transactions_js_2.Transactions,
|
||||
});
|
||||
exports.Forwarding = (0, ResourceNamespace_js_1.resourceNamespace)('forwarding', {
|
||||
Requests: Requests_js_1.Requests,
|
||||
});
|
||||
exports.Identity = (0, ResourceNamespace_js_1.resourceNamespace)('identity', {
|
||||
VerificationReports: VerificationReports_js_1.VerificationReports,
|
||||
VerificationSessions: VerificationSessions_js_1.VerificationSessions,
|
||||
});
|
||||
exports.Issuing = (0, ResourceNamespace_js_1.resourceNamespace)('issuing', {
|
||||
Authorizations: Authorizations_js_2.Authorizations,
|
||||
Cardholders: Cardholders_js_1.Cardholders,
|
||||
Cards: Cards_js_2.Cards,
|
||||
Disputes: Disputes_js_1.Disputes,
|
||||
PersonalizationDesigns: PersonalizationDesigns_js_2.PersonalizationDesigns,
|
||||
PhysicalBundles: PhysicalBundles_js_1.PhysicalBundles,
|
||||
Tokens: Tokens_js_1.Tokens,
|
||||
Transactions: Transactions_js_3.Transactions,
|
||||
});
|
||||
exports.Radar = (0, ResourceNamespace_js_1.resourceNamespace)('radar', {
|
||||
EarlyFraudWarnings: EarlyFraudWarnings_js_1.EarlyFraudWarnings,
|
||||
ValueListItems: ValueListItems_js_1.ValueListItems,
|
||||
ValueLists: ValueLists_js_1.ValueLists,
|
||||
});
|
||||
exports.Reporting = (0, ResourceNamespace_js_1.resourceNamespace)('reporting', {
|
||||
ReportRuns: ReportRuns_js_1.ReportRuns,
|
||||
ReportTypes: ReportTypes_js_1.ReportTypes,
|
||||
});
|
||||
exports.Sigma = (0, ResourceNamespace_js_1.resourceNamespace)('sigma', {
|
||||
ScheduledQueryRuns: ScheduledQueryRuns_js_1.ScheduledQueryRuns,
|
||||
});
|
||||
exports.Tax = (0, ResourceNamespace_js_1.resourceNamespace)('tax', {
|
||||
Calculations: Calculations_js_1.Calculations,
|
||||
Registrations: Registrations_js_1.Registrations,
|
||||
Settings: Settings_js_1.Settings,
|
||||
Transactions: Transactions_js_4.Transactions,
|
||||
});
|
||||
exports.Terminal = (0, ResourceNamespace_js_1.resourceNamespace)('terminal', {
|
||||
Configurations: Configurations_js_2.Configurations,
|
||||
ConnectionTokens: ConnectionTokens_js_1.ConnectionTokens,
|
||||
Locations: Locations_js_1.Locations,
|
||||
Readers: Readers_js_2.Readers,
|
||||
});
|
||||
exports.TestHelpers = (0, ResourceNamespace_js_1.resourceNamespace)('testHelpers', {
|
||||
ConfirmationTokens: ConfirmationTokens_js_1.ConfirmationTokens,
|
||||
Customers: Customers_js_1.Customers,
|
||||
Refunds: Refunds_js_1.Refunds,
|
||||
TestClocks: TestClocks_js_1.TestClocks,
|
||||
Issuing: (0, ResourceNamespace_js_1.resourceNamespace)('issuing', {
|
||||
Authorizations: Authorizations_js_1.Authorizations,
|
||||
Cards: Cards_js_1.Cards,
|
||||
PersonalizationDesigns: PersonalizationDesigns_js_1.PersonalizationDesigns,
|
||||
Transactions: Transactions_js_1.Transactions,
|
||||
}),
|
||||
Terminal: (0, ResourceNamespace_js_1.resourceNamespace)('terminal', {
|
||||
Readers: Readers_js_1.Readers,
|
||||
}),
|
||||
Treasury: (0, ResourceNamespace_js_1.resourceNamespace)('treasury', {
|
||||
InboundTransfers: InboundTransfers_js_1.InboundTransfers,
|
||||
OutboundPayments: OutboundPayments_js_1.OutboundPayments,
|
||||
OutboundTransfers: OutboundTransfers_js_1.OutboundTransfers,
|
||||
ReceivedCredits: ReceivedCredits_js_1.ReceivedCredits,
|
||||
ReceivedDebits: ReceivedDebits_js_1.ReceivedDebits,
|
||||
}),
|
||||
});
|
||||
exports.Treasury = (0, ResourceNamespace_js_1.resourceNamespace)('treasury', {
|
||||
CreditReversals: CreditReversals_js_1.CreditReversals,
|
||||
DebitReversals: DebitReversals_js_1.DebitReversals,
|
||||
FinancialAccounts: FinancialAccounts_js_1.FinancialAccounts,
|
||||
InboundTransfers: InboundTransfers_js_2.InboundTransfers,
|
||||
OutboundPayments: OutboundPayments_js_2.OutboundPayments,
|
||||
OutboundTransfers: OutboundTransfers_js_2.OutboundTransfers,
|
||||
ReceivedCredits: ReceivedCredits_js_2.ReceivedCredits,
|
||||
ReceivedDebits: ReceivedDebits_js_2.ReceivedDebits,
|
||||
TransactionEntries: TransactionEntries_js_1.TransactionEntries,
|
||||
Transactions: Transactions_js_5.Transactions,
|
||||
});
|
||||
9
server/node_modules/stripe/cjs/resources/AccountLinks.js
generated
vendored
Normal file
9
server/node_modules/stripe/cjs/resources/AccountLinks.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AccountLinks = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.AccountLinks = StripeResource_js_1.StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/account_links' }),
|
||||
});
|
||||
9
server/node_modules/stripe/cjs/resources/AccountSessions.js
generated
vendored
Normal file
9
server/node_modules/stripe/cjs/resources/AccountSessions.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AccountSessions = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.AccountSessions = StripeResource_js_1.StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/account_sessions' }),
|
||||
});
|
||||
101
server/node_modules/stripe/cjs/resources/Accounts.js
generated
vendored
Normal file
101
server/node_modules/stripe/cjs/resources/Accounts.js
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Accounts = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
// Since path can either be `account` or `accounts`, support both through stripeMethod path
|
||||
exports.Accounts = StripeResource_js_1.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}',
|
||||
}),
|
||||
});
|
||||
22
server/node_modules/stripe/cjs/resources/ApplePayDomains.js
generated
vendored
Normal file
22
server/node_modules/stripe/cjs/resources/ApplePayDomains.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ApplePayDomains = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.ApplePayDomains = StripeResource_js_1.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}',
|
||||
}),
|
||||
});
|
||||
34
server/node_modules/stripe/cjs/resources/ApplicationFees.js
generated
vendored
Normal file
34
server/node_modules/stripe/cjs/resources/ApplicationFees.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ApplicationFees = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.ApplicationFees = StripeResource_js_1.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}',
|
||||
}),
|
||||
});
|
||||
19
server/node_modules/stripe/cjs/resources/Apps/Secrets.js
generated
vendored
Normal file
19
server/node_modules/stripe/cjs/resources/Apps/Secrets.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Secrets = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Secrets = StripeResource_js_1.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' }),
|
||||
});
|
||||
9
server/node_modules/stripe/cjs/resources/Balance.js
generated
vendored
Normal file
9
server/node_modules/stripe/cjs/resources/Balance.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Balance = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Balance = StripeResource_js_1.StripeResource.extend({
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/balance' }),
|
||||
});
|
||||
17
server/node_modules/stripe/cjs/resources/BalanceTransactions.js
generated
vendored
Normal file
17
server/node_modules/stripe/cjs/resources/BalanceTransactions.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.BalanceTransactions = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.BalanceTransactions = StripeResource_js_1.StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/balance_transactions/{id}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/balance_transactions',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
12
server/node_modules/stripe/cjs/resources/Billing/MeterEventAdjustments.js
generated
vendored
Normal file
12
server/node_modules/stripe/cjs/resources/Billing/MeterEventAdjustments.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.MeterEventAdjustments = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.MeterEventAdjustments = StripeResource_js_1.StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/billing/meter_event_adjustments',
|
||||
}),
|
||||
});
|
||||
9
server/node_modules/stripe/cjs/resources/Billing/MeterEvents.js
generated
vendored
Normal file
9
server/node_modules/stripe/cjs/resources/Billing/MeterEvents.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.MeterEvents = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.MeterEvents = StripeResource_js_1.StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/billing/meter_events' }),
|
||||
});
|
||||
29
server/node_modules/stripe/cjs/resources/Billing/Meters.js
generated
vendored
Normal file
29
server/node_modules/stripe/cjs/resources/Billing/Meters.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Meters = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Meters = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
25
server/node_modules/stripe/cjs/resources/BillingPortal/Configurations.js
generated
vendored
Normal file
25
server/node_modules/stripe/cjs/resources/BillingPortal/Configurations.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Configurations = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Configurations = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
12
server/node_modules/stripe/cjs/resources/BillingPortal/Sessions.js
generated
vendored
Normal file
12
server/node_modules/stripe/cjs/resources/BillingPortal/Sessions.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Sessions = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Sessions = StripeResource_js_1.StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/billing_portal/sessions',
|
||||
}),
|
||||
});
|
||||
25
server/node_modules/stripe/cjs/resources/Charges.js
generated
vendored
Normal file
25
server/node_modules/stripe/cjs/resources/Charges.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Charges = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Charges = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
27
server/node_modules/stripe/cjs/resources/Checkout/Sessions.js
generated
vendored
Normal file
27
server/node_modules/stripe/cjs/resources/Checkout/Sessions.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Sessions = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Sessions = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
26
server/node_modules/stripe/cjs/resources/Climate/Orders.js
generated
vendored
Normal file
26
server/node_modules/stripe/cjs/resources/Climate/Orders.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Orders = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Orders = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/cjs/resources/Climate/Products.js
generated
vendored
Normal file
17
server/node_modules/stripe/cjs/resources/Climate/Products.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Products = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Products = StripeResource_js_1.StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/climate/products/{product}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/climate/products',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/cjs/resources/Climate/Suppliers.js
generated
vendored
Normal file
17
server/node_modules/stripe/cjs/resources/Climate/Suppliers.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Suppliers = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Suppliers = StripeResource_js_1.StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/climate/suppliers/{supplier}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/climate/suppliers',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
12
server/node_modules/stripe/cjs/resources/ConfirmationTokens.js
generated
vendored
Normal file
12
server/node_modules/stripe/cjs/resources/ConfirmationTokens.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ConfirmationTokens = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.ConfirmationTokens = StripeResource_js_1.StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/confirmation_tokens/{confirmation_token}',
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/cjs/resources/CountrySpecs.js
generated
vendored
Normal file
17
server/node_modules/stripe/cjs/resources/CountrySpecs.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CountrySpecs = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.CountrySpecs = StripeResource_js_1.StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/country_specs/{country}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/country_specs',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/cjs/resources/Coupons.js
generated
vendored
Normal file
17
server/node_modules/stripe/cjs/resources/Coupons.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Coupons = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Coupons = StripeResource_js_1.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}' }),
|
||||
});
|
||||
31
server/node_modules/stripe/cjs/resources/CreditNotes.js
generated
vendored
Normal file
31
server/node_modules/stripe/cjs/resources/CreditNotes.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CreditNotes = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.CreditNotes = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
9
server/node_modules/stripe/cjs/resources/CustomerSessions.js
generated
vendored
Normal file
9
server/node_modules/stripe/cjs/resources/CustomerSessions.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CustomerSessions = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.CustomerSessions = StripeResource_js_1.StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/customer_sessions' }),
|
||||
});
|
||||
115
server/node_modules/stripe/cjs/resources/Customers.js
generated
vendored
Normal file
115
server/node_modules/stripe/cjs/resources/Customers.js
generated
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Customers = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Customers = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
19
server/node_modules/stripe/cjs/resources/Disputes.js
generated
vendored
Normal file
19
server/node_modules/stripe/cjs/resources/Disputes.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Disputes = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Disputes = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/cjs/resources/Entitlements/ActiveEntitlements.js
generated
vendored
Normal file
17
server/node_modules/stripe/cjs/resources/Entitlements/ActiveEntitlements.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ActiveEntitlements = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.ActiveEntitlements = StripeResource_js_1.StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/entitlements/active_entitlements/{id}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/entitlements/active_entitlements',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
22
server/node_modules/stripe/cjs/resources/Entitlements/Features.js
generated
vendored
Normal file
22
server/node_modules/stripe/cjs/resources/Entitlements/Features.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Features = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Features = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
18
server/node_modules/stripe/cjs/resources/EphemeralKeys.js
generated
vendored
Normal file
18
server/node_modules/stripe/cjs/resources/EphemeralKeys.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.EphemeralKeys = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.EphemeralKeys = StripeResource_js_1.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}' }),
|
||||
});
|
||||
14
server/node_modules/stripe/cjs/resources/Events.js
generated
vendored
Normal file
14
server/node_modules/stripe/cjs/resources/Events.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Events = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Events = StripeResource_js_1.StripeResource.extend({
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/events/{id}' }),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/events',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/cjs/resources/ExchangeRates.js
generated
vendored
Normal file
17
server/node_modules/stripe/cjs/resources/ExchangeRates.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ExchangeRates = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.ExchangeRates = StripeResource_js_1.StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/exchange_rates/{rate_id}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/exchange_rates',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
16
server/node_modules/stripe/cjs/resources/FileLinks.js
generated
vendored
Normal file
16
server/node_modules/stripe/cjs/resources/FileLinks.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.FileLinks = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.FileLinks = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
24
server/node_modules/stripe/cjs/resources/Files.js
generated
vendored
Normal file
24
server/node_modules/stripe/cjs/resources/Files.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Files = void 0;
|
||||
const multipart_js_1 = require("../multipart.js");
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Files = StripeResource_js_1.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: multipart_js_1.multipartRequestDataProcessor,
|
||||
});
|
||||
38
server/node_modules/stripe/cjs/resources/FinancialConnections/Accounts.js
generated
vendored
Normal file
38
server/node_modules/stripe/cjs/resources/FinancialConnections/Accounts.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Accounts = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Accounts = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
16
server/node_modules/stripe/cjs/resources/FinancialConnections/Sessions.js
generated
vendored
Normal file
16
server/node_modules/stripe/cjs/resources/FinancialConnections/Sessions.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Sessions = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Sessions = StripeResource_js_1.StripeResource.extend({
|
||||
create: stripeMethod({
|
||||
method: 'POST',
|
||||
fullPath: '/v1/financial_connections/sessions',
|
||||
}),
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/financial_connections/sessions/{session}',
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/cjs/resources/FinancialConnections/Transactions.js
generated
vendored
Normal file
17
server/node_modules/stripe/cjs/resources/FinancialConnections/Transactions.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Transactions = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Transactions = StripeResource_js_1.StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/financial_connections/transactions/{transaction}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/financial_connections/transactions',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
18
server/node_modules/stripe/cjs/resources/Forwarding/Requests.js
generated
vendored
Normal file
18
server/node_modules/stripe/cjs/resources/Forwarding/Requests.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Requests = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Requests = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/cjs/resources/Identity/VerificationReports.js
generated
vendored
Normal file
17
server/node_modules/stripe/cjs/resources/Identity/VerificationReports.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.VerificationReports = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.VerificationReports = StripeResource_js_1.StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/identity/verification_reports/{report}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/identity/verification_reports',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
33
server/node_modules/stripe/cjs/resources/Identity/VerificationSessions.js
generated
vendored
Normal file
33
server/node_modules/stripe/cjs/resources/Identity/VerificationSessions.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.VerificationSessions = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.VerificationSessions = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
26
server/node_modules/stripe/cjs/resources/InvoiceItems.js
generated
vendored
Normal file
26
server/node_modules/stripe/cjs/resources/InvoiceItems.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.InvoiceItems = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.InvoiceItems = StripeResource_js_1.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}',
|
||||
}),
|
||||
});
|
||||
57
server/node_modules/stripe/cjs/resources/Invoices.js
generated
vendored
Normal file
57
server/node_modules/stripe/cjs/resources/Invoices.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Invoices = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Invoices = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
29
server/node_modules/stripe/cjs/resources/Issuing/Authorizations.js
generated
vendored
Normal file
29
server/node_modules/stripe/cjs/resources/Issuing/Authorizations.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Authorizations = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Authorizations = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
22
server/node_modules/stripe/cjs/resources/Issuing/Cardholders.js
generated
vendored
Normal file
22
server/node_modules/stripe/cjs/resources/Issuing/Cardholders.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Cardholders = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Cardholders = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
16
server/node_modules/stripe/cjs/resources/Issuing/Cards.js
generated
vendored
Normal file
16
server/node_modules/stripe/cjs/resources/Issuing/Cards.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Cards = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Cards = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
26
server/node_modules/stripe/cjs/resources/Issuing/Disputes.js
generated
vendored
Normal file
26
server/node_modules/stripe/cjs/resources/Issuing/Disputes.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Disputes = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Disputes = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
25
server/node_modules/stripe/cjs/resources/Issuing/PersonalizationDesigns.js
generated
vendored
Normal file
25
server/node_modules/stripe/cjs/resources/Issuing/PersonalizationDesigns.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PersonalizationDesigns = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.PersonalizationDesigns = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/cjs/resources/Issuing/PhysicalBundles.js
generated
vendored
Normal file
17
server/node_modules/stripe/cjs/resources/Issuing/PhysicalBundles.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PhysicalBundles = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.PhysicalBundles = StripeResource_js_1.StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/physical_bundles/{physical_bundle}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/issuing/physical_bundles',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
21
server/node_modules/stripe/cjs/resources/Issuing/Tokens.js
generated
vendored
Normal file
21
server/node_modules/stripe/cjs/resources/Issuing/Tokens.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Tokens = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Tokens = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
21
server/node_modules/stripe/cjs/resources/Issuing/Transactions.js
generated
vendored
Normal file
21
server/node_modules/stripe/cjs/resources/Issuing/Transactions.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Transactions = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Transactions = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
9
server/node_modules/stripe/cjs/resources/Mandates.js
generated
vendored
Normal file
9
server/node_modules/stripe/cjs/resources/Mandates.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Mandates = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Mandates = StripeResource_js_1.StripeResource.extend({
|
||||
retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/mandates/{mandate}' }),
|
||||
});
|
||||
44
server/node_modules/stripe/cjs/resources/OAuth.js
generated
vendored
Normal file
44
server/node_modules/stripe/cjs/resources/OAuth.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
'use strict';
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.OAuth = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const utils_js_1 = require("../utils.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
const oAuthHost = 'connect.stripe.com';
|
||||
exports.OAuth = StripeResource_js_1.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}?${(0, utils_js_1.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]);
|
||||
},
|
||||
});
|
||||
51
server/node_modules/stripe/cjs/resources/PaymentIntents.js
generated
vendored
Normal file
51
server/node_modules/stripe/cjs/resources/PaymentIntents.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PaymentIntents = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.PaymentIntents = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
27
server/node_modules/stripe/cjs/resources/PaymentLinks.js
generated
vendored
Normal file
27
server/node_modules/stripe/cjs/resources/PaymentLinks.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PaymentLinks = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.PaymentLinks = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
25
server/node_modules/stripe/cjs/resources/PaymentMethodConfigurations.js
generated
vendored
Normal file
25
server/node_modules/stripe/cjs/resources/PaymentMethodConfigurations.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PaymentMethodConfigurations = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.PaymentMethodConfigurations = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
29
server/node_modules/stripe/cjs/resources/PaymentMethodDomains.js
generated
vendored
Normal file
29
server/node_modules/stripe/cjs/resources/PaymentMethodDomains.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PaymentMethodDomains = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.PaymentMethodDomains = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
30
server/node_modules/stripe/cjs/resources/PaymentMethods.js
generated
vendored
Normal file
30
server/node_modules/stripe/cjs/resources/PaymentMethods.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PaymentMethods = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.PaymentMethods = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
24
server/node_modules/stripe/cjs/resources/Payouts.js
generated
vendored
Normal file
24
server/node_modules/stripe/cjs/resources/Payouts.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Payouts = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Payouts = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/cjs/resources/Plans.js
generated
vendored
Normal file
17
server/node_modules/stripe/cjs/resources/Plans.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Plans = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Plans = StripeResource_js_1.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}' }),
|
||||
});
|
||||
21
server/node_modules/stripe/cjs/resources/Prices.js
generated
vendored
Normal file
21
server/node_modules/stripe/cjs/resources/Prices.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Prices = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Prices = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
39
server/node_modules/stripe/cjs/resources/Products.js
generated
vendored
Normal file
39
server/node_modules/stripe/cjs/resources/Products.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Products = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Products = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
22
server/node_modules/stripe/cjs/resources/PromotionCodes.js
generated
vendored
Normal file
22
server/node_modules/stripe/cjs/resources/PromotionCodes.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PromotionCodes = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.PromotionCodes = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
38
server/node_modules/stripe/cjs/resources/Quotes.js
generated
vendored
Normal file
38
server/node_modules/stripe/cjs/resources/Quotes.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Quotes = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Quotes = StripeResource_js_1.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,
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/cjs/resources/Radar/EarlyFraudWarnings.js
generated
vendored
Normal file
17
server/node_modules/stripe/cjs/resources/Radar/EarlyFraudWarnings.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.EarlyFraudWarnings = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.EarlyFraudWarnings = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
25
server/node_modules/stripe/cjs/resources/Radar/ValueListItems.js
generated
vendored
Normal file
25
server/node_modules/stripe/cjs/resources/Radar/ValueListItems.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ValueListItems = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.ValueListItems = StripeResource_js_1.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}',
|
||||
}),
|
||||
});
|
||||
26
server/node_modules/stripe/cjs/resources/Radar/ValueLists.js
generated
vendored
Normal file
26
server/node_modules/stripe/cjs/resources/Radar/ValueLists.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ValueLists = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.ValueLists = StripeResource_js_1.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}',
|
||||
}),
|
||||
});
|
||||
20
server/node_modules/stripe/cjs/resources/Refunds.js
generated
vendored
Normal file
20
server/node_modules/stripe/cjs/resources/Refunds.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Refunds = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Refunds = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
18
server/node_modules/stripe/cjs/resources/Reporting/ReportRuns.js
generated
vendored
Normal file
18
server/node_modules/stripe/cjs/resources/Reporting/ReportRuns.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ReportRuns = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.ReportRuns = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/cjs/resources/Reporting/ReportTypes.js
generated
vendored
Normal file
17
server/node_modules/stripe/cjs/resources/Reporting/ReportTypes.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ReportTypes = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.ReportTypes = StripeResource_js_1.StripeResource.extend({
|
||||
retrieve: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/reporting/report_types/{report_type}',
|
||||
}),
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/reporting/report_types',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
18
server/node_modules/stripe/cjs/resources/Reviews.js
generated
vendored
Normal file
18
server/node_modules/stripe/cjs/resources/Reviews.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Reviews = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Reviews = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
13
server/node_modules/stripe/cjs/resources/SetupAttempts.js
generated
vendored
Normal file
13
server/node_modules/stripe/cjs/resources/SetupAttempts.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SetupAttempts = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.SetupAttempts = StripeResource_js_1.StripeResource.extend({
|
||||
list: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/setup_attempts',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
34
server/node_modules/stripe/cjs/resources/SetupIntents.js
generated
vendored
Normal file
34
server/node_modules/stripe/cjs/resources/SetupIntents.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SetupIntents = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.SetupIntents = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
22
server/node_modules/stripe/cjs/resources/ShippingRates.js
generated
vendored
Normal file
22
server/node_modules/stripe/cjs/resources/ShippingRates.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ShippingRates = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.ShippingRates = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
17
server/node_modules/stripe/cjs/resources/Sigma/ScheduledQueryRuns.js
generated
vendored
Normal file
17
server/node_modules/stripe/cjs/resources/Sigma/ScheduledQueryRuns.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ScheduledQueryRuns = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.ScheduledQueryRuns = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
20
server/node_modules/stripe/cjs/resources/Sources.js
generated
vendored
Normal file
20
server/node_modules/stripe/cjs/resources/Sources.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Sources = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Sources = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
35
server/node_modules/stripe/cjs/resources/SubscriptionItems.js
generated
vendored
Normal file
35
server/node_modules/stripe/cjs/resources/SubscriptionItems.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SubscriptionItems = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.SubscriptionItems = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
33
server/node_modules/stripe/cjs/resources/SubscriptionSchedules.js
generated
vendored
Normal file
33
server/node_modules/stripe/cjs/resources/SubscriptionSchedules.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SubscriptionSchedules = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.SubscriptionSchedules = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
39
server/node_modules/stripe/cjs/resources/Subscriptions.js
generated
vendored
Normal file
39
server/node_modules/stripe/cjs/resources/Subscriptions.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Subscriptions = void 0;
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Subscriptions = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
14
server/node_modules/stripe/cjs/resources/Tax/Calculations.js
generated
vendored
Normal file
14
server/node_modules/stripe/cjs/resources/Tax/Calculations.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Calculations = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Calculations = StripeResource_js_1.StripeResource.extend({
|
||||
create: stripeMethod({ method: 'POST', fullPath: '/v1/tax/calculations' }),
|
||||
listLineItems: stripeMethod({
|
||||
method: 'GET',
|
||||
fullPath: '/v1/tax/calculations/{calculation}/line_items',
|
||||
methodType: 'list',
|
||||
}),
|
||||
});
|
||||
22
server/node_modules/stripe/cjs/resources/Tax/Registrations.js
generated
vendored
Normal file
22
server/node_modules/stripe/cjs/resources/Tax/Registrations.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Registrations = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Registrations = StripeResource_js_1.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',
|
||||
}),
|
||||
});
|
||||
10
server/node_modules/stripe/cjs/resources/Tax/Settings.js
generated
vendored
Normal file
10
server/node_modules/stripe/cjs/resources/Tax/Settings.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Settings = void 0;
|
||||
const StripeResource_js_1 = require("../../StripeResource.js");
|
||||
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
||||
exports.Settings = StripeResource_js_1.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