@crvouga/mockingbird-service-stripe 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +254 -0
- package/dist/account.d.ts +8 -0
- package/dist/account.d.ts.map +1 -0
- package/dist/account.js +13 -0
- package/dist/account.js.map +1 -0
- package/dist/charges.d.ts +4 -0
- package/dist/charges.d.ts.map +1 -0
- package/dist/charges.js +89 -0
- package/dist/charges.js.map +1 -0
- package/dist/checkout-sessions.d.ts +5 -0
- package/dist/checkout-sessions.d.ts.map +1 -0
- package/dist/checkout-sessions.js +303 -0
- package/dist/checkout-sessions.js.map +1 -0
- package/dist/constants.d.ts +3 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +3 -0
- package/dist/constants.js.map +1 -0
- package/dist/coupons.d.ts +4 -0
- package/dist/coupons.d.ts.map +1 -0
- package/dist/coupons.js +158 -0
- package/dist/coupons.js.map +1 -0
- package/dist/customers.d.ts +4 -0
- package/dist/customers.d.ts.map +1 -0
- package/dist/customers.js +218 -0
- package/dist/customers.js.map +1 -0
- package/dist/disputes.d.ts +4 -0
- package/dist/disputes.d.ts.map +1 -0
- package/dist/disputes.js +36 -0
- package/dist/disputes.js.map +1 -0
- package/dist/errors.d.ts +29 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +74 -0
- package/dist/errors.js.map +1 -0
- package/dist/events.d.ts +4 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +76 -0
- package/dist/events.js.map +1 -0
- package/dist/expand.d.ts +11 -0
- package/dist/expand.d.ts.map +1 -0
- package/dist/expand.js +45 -0
- package/dist/expand.js.map +1 -0
- package/dist/fields.d.ts +25 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +117 -0
- package/dist/fields.js.map +1 -0
- package/dist/generated/openapi.d.ts +7 -0
- package/dist/generated/openapi.d.ts.map +1 -0
- package/dist/generated/openapi.js +5 -0
- package/dist/generated/openapi.js.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +172 -0
- package/dist/index.js.map +1 -0
- package/dist/internal.d.ts +134 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +460 -0
- package/dist/internal.js.map +1 -0
- package/dist/invoice-items.d.ts +4 -0
- package/dist/invoice-items.d.ts.map +1 -0
- package/dist/invoice-items.js +179 -0
- package/dist/invoice-items.js.map +1 -0
- package/dist/invoices.d.ts +4 -0
- package/dist/invoices.d.ts.map +1 -0
- package/dist/invoices.js +312 -0
- package/dist/invoices.js.map +1 -0
- package/dist/list.d.ts +24 -0
- package/dist/list.d.ts.map +1 -0
- package/dist/list.js +68 -0
- package/dist/list.js.map +1 -0
- package/dist/params.d.ts +29 -0
- package/dist/params.d.ts.map +1 -0
- package/dist/params.js +165 -0
- package/dist/params.js.map +1 -0
- package/dist/payment-intents.d.ts +4 -0
- package/dist/payment-intents.d.ts.map +1 -0
- package/dist/payment-intents.js +232 -0
- package/dist/payment-intents.js.map +1 -0
- package/dist/payment-methods.d.ts +4 -0
- package/dist/payment-methods.d.ts.map +1 -0
- package/dist/payment-methods.js +99 -0
- package/dist/payment-methods.js.map +1 -0
- package/dist/prices.d.ts +4 -0
- package/dist/prices.d.ts.map +1 -0
- package/dist/prices.js +176 -0
- package/dist/prices.js.map +1 -0
- package/dist/products.d.ts +6 -0
- package/dist/products.d.ts.map +1 -0
- package/dist/products.js +202 -0
- package/dist/products.js.map +1 -0
- package/dist/promotion-codes.d.ts +4 -0
- package/dist/promotion-codes.d.ts.map +1 -0
- package/dist/promotion-codes.js +193 -0
- package/dist/promotion-codes.js.map +1 -0
- package/dist/qa-corpus.d.ts +26 -0
- package/dist/qa-corpus.d.ts.map +1 -0
- package/dist/qa-corpus.js +42 -0
- package/dist/qa-corpus.js.map +1 -0
- package/dist/refunds.d.ts +4 -0
- package/dist/refunds.d.ts.map +1 -0
- package/dist/refunds.js +125 -0
- package/dist/refunds.js.map +1 -0
- package/dist/render.d.ts +60 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +426 -0
- package/dist/render.js.map +1 -0
- package/dist/reshape-qa.d.ts +8 -0
- package/dist/reshape-qa.d.ts.map +1 -0
- package/dist/reshape-qa.js +102 -0
- package/dist/reshape-qa.js.map +1 -0
- package/dist/search.d.ts +32 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +64 -0
- package/dist/search.js.map +1 -0
- package/dist/setup-intents.d.ts +4 -0
- package/dist/setup-intents.d.ts.map +1 -0
- package/dist/setup-intents.js +129 -0
- package/dist/setup-intents.js.map +1 -0
- package/dist/state.d.ts +485 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +143 -0
- package/dist/state.js.map +1 -0
- package/dist/subscription-schedules.d.ts +4 -0
- package/dist/subscription-schedules.d.ts.map +1 -0
- package/dist/subscription-schedules.js +122 -0
- package/dist/subscription-schedules.js.map +1 -0
- package/dist/subscriptions.d.ts +23 -0
- package/dist/subscriptions.d.ts.map +1 -0
- package/dist/subscriptions.js +260 -0
- package/dist/subscriptions.js.map +1 -0
- package/dist/test-tokens.d.ts +27 -0
- package/dist/test-tokens.d.ts.map +1 -0
- package/dist/test-tokens.js +61 -0
- package/dist/test-tokens.js.map +1 -0
- package/dist/url.d.ts +6 -0
- package/dist/url.d.ts.map +1 -0
- package/dist/url.js +38 -0
- package/dist/url.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/package.json +72 -0
package/dist/fields.js
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { invalidRequest, parameterInvalidEmpty } from "./errors.js";
|
|
2
|
+
const METADATA_MAX_KEYS = 50;
|
|
3
|
+
const METADATA_MAX_KEY_LENGTH = 40;
|
|
4
|
+
const METADATA_MAX_VALUE_LENGTH = 500;
|
|
5
|
+
const length = (value) => [...value].length;
|
|
6
|
+
/**
|
|
7
|
+
* Apply Stripe's metadata semantics: `""` clears everything, a key with `""` deletes it, other
|
|
8
|
+
* keys merge; then enforce the documented limits on the result.
|
|
9
|
+
*/
|
|
10
|
+
export const mergeMetadata = (current, incoming) => {
|
|
11
|
+
if (incoming === undefined)
|
|
12
|
+
return current;
|
|
13
|
+
if (incoming === "")
|
|
14
|
+
return {};
|
|
15
|
+
const next = { ...current };
|
|
16
|
+
for (const [key, value] of Object.entries(incoming)) {
|
|
17
|
+
if (length(key) > METADATA_MAX_KEY_LENGTH)
|
|
18
|
+
throw invalidRequest(`Metadata keys can have up to ${METADATA_MAX_KEY_LENGTH} characters, but you passed in a key that is ${length(key)} characters. Invalid key: ${key}`);
|
|
19
|
+
if (length(value) > METADATA_MAX_VALUE_LENGTH)
|
|
20
|
+
throw invalidRequest(`Metadata values can have up to ${METADATA_MAX_VALUE_LENGTH} characters, but you passed in a value that is ${length(value)} characters. Invalid value: ${value}`);
|
|
21
|
+
if (value === "")
|
|
22
|
+
delete next[key];
|
|
23
|
+
else
|
|
24
|
+
next[key] = value;
|
|
25
|
+
}
|
|
26
|
+
const count = Object.keys(next).length;
|
|
27
|
+
if (count > METADATA_MAX_KEYS)
|
|
28
|
+
throw invalidRequest(`Metadata can have up to ${METADATA_MAX_KEYS} keys, but you've set ${count}.`);
|
|
29
|
+
return next;
|
|
30
|
+
};
|
|
31
|
+
/** Optional string: absent keeps `current`, `""` unsets to null. */
|
|
32
|
+
export const optionalString = (params, key, current) => {
|
|
33
|
+
const value = params[key];
|
|
34
|
+
if (value === undefined)
|
|
35
|
+
return current;
|
|
36
|
+
if (value === "")
|
|
37
|
+
return null;
|
|
38
|
+
return value;
|
|
39
|
+
};
|
|
40
|
+
/** Ruby's `String#strip`: leading and trailing ASCII whitespace and NULs. */
|
|
41
|
+
export const strip = (value) => value.replace(/^[\s\0]+|[\s\0]+$/g, "");
|
|
42
|
+
/** Optional string that Stripe strips: absent keeps `current`, blank unsets to null. */
|
|
43
|
+
export const strippedString = (params, key, current) => {
|
|
44
|
+
const value = params[key];
|
|
45
|
+
if (value === undefined)
|
|
46
|
+
return current;
|
|
47
|
+
const stripped = strip(value);
|
|
48
|
+
return stripped === "" ? null : stripped;
|
|
49
|
+
};
|
|
50
|
+
/** Required string: `""` is rejected because the field cannot be unset. */
|
|
51
|
+
export const requiredString = (params, key, current) => {
|
|
52
|
+
const value = params[key];
|
|
53
|
+
if (value === undefined)
|
|
54
|
+
return current;
|
|
55
|
+
if (value === "")
|
|
56
|
+
throw parameterInvalidEmpty(key);
|
|
57
|
+
return value;
|
|
58
|
+
};
|
|
59
|
+
export const optionalBoolean = (params, key, current) => {
|
|
60
|
+
const value = params[key];
|
|
61
|
+
return value === undefined ? current : value;
|
|
62
|
+
};
|
|
63
|
+
const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
64
|
+
export const validateEmail = (value) => {
|
|
65
|
+
if (!EMAIL.test(value))
|
|
66
|
+
throw invalidRequest(`Invalid email address: ${value}`, "email", "email_invalid");
|
|
67
|
+
return value;
|
|
68
|
+
};
|
|
69
|
+
const STATEMENT_DESCRIPTOR_FORBIDDEN = ["<", ">", "\\", '"', "'"];
|
|
70
|
+
export const validateStatementDescriptor = (value) => {
|
|
71
|
+
for (const char of STATEMENT_DESCRIPTOR_FORBIDDEN) {
|
|
72
|
+
if (value.includes(char))
|
|
73
|
+
throw invalidRequest(`The statement descriptor cannot include ${char}.`, "statement_descriptor");
|
|
74
|
+
}
|
|
75
|
+
if (!/[A-Za-z]/.test(value))
|
|
76
|
+
throw invalidRequest("The statement descriptor must contain at least one Latin character.", "statement_descriptor");
|
|
77
|
+
return value;
|
|
78
|
+
};
|
|
79
|
+
/** Stripe echoes decimals back the way Ruby's BigDecimal#to_s prints them (`0.15e1`). */
|
|
80
|
+
export const rubyBigDecimal = (raw) => {
|
|
81
|
+
const negative = raw.startsWith("-");
|
|
82
|
+
const unsigned = negative ? raw.slice(1) : raw;
|
|
83
|
+
const [intPart = "", fracPart = ""] = unsigned.split(".");
|
|
84
|
+
const digits = `${intPart}${fracPart}`.replace(/^0+/, "");
|
|
85
|
+
if (digits === "")
|
|
86
|
+
return "0.0";
|
|
87
|
+
const leadingZeros = `${intPart}${fracPart}`.length - digits.length;
|
|
88
|
+
const exponent = intPart.length - leadingZeros;
|
|
89
|
+
const significant = digits.replace(/0+$/, "");
|
|
90
|
+
return `${negative ? "-" : ""}0.${significant}e${exponent}`;
|
|
91
|
+
};
|
|
92
|
+
const DECIMAL = /^-?\d+(\.\d+)?$/;
|
|
93
|
+
const MAX_DECIMAL_PLACES = 12;
|
|
94
|
+
/** Normalise a decimal string: strip trailing fraction zeros and the sign of zero. */
|
|
95
|
+
export const normalizeDecimal = (raw) => {
|
|
96
|
+
const negative = raw.startsWith("-");
|
|
97
|
+
const unsigned = negative ? raw.slice(1) : raw;
|
|
98
|
+
const [intRaw = "0", fracRaw = ""] = unsigned.split(".");
|
|
99
|
+
const intPart = intRaw.replace(/^0+(?=\d)/, "");
|
|
100
|
+
const frac = fracRaw.replace(/0+$/, "");
|
|
101
|
+
const text = frac === "" ? intPart : `${intPart}.${frac}`;
|
|
102
|
+
return negative && text !== "0" ? `-${text}` : text;
|
|
103
|
+
};
|
|
104
|
+
export const parseUnitAmountDecimal = (raw, param) => {
|
|
105
|
+
if (!DECIMAL.test(raw))
|
|
106
|
+
throw invalidRequest(`Invalid decimal: ${raw}`, param);
|
|
107
|
+
const places = raw.split(".")[1]?.length ?? 0;
|
|
108
|
+
if (places > MAX_DECIMAL_PLACES)
|
|
109
|
+
throw invalidRequest(`Invalid decimal: ${rubyBigDecimal(raw)}; must contain at most ${MAX_DECIMAL_PLACES} decimal places.`, param);
|
|
110
|
+
const normalized = normalizeDecimal(raw);
|
|
111
|
+
if (normalized.startsWith("-"))
|
|
112
|
+
throw invalidRequest(`This value must be greater than or equal to 0 (it currently is '${rubyBigDecimal(raw)}').`, param);
|
|
113
|
+
return normalized;
|
|
114
|
+
};
|
|
115
|
+
/** `unit_amount` is the integer view of the decimal, or null when it has a fraction. */
|
|
116
|
+
export const unitAmountOf = (decimal) => (decimal.includes(".") ? null : Number(decimal));
|
|
117
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../src/fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAGnE,MAAM,iBAAiB,GAAG,EAAE,CAAA;AAC5B,MAAM,uBAAuB,GAAG,EAAE,CAAA;AAClC,MAAM,yBAAyB,GAAG,GAAG,CAAA;AAErC,MAAM,MAAM,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,MAAM,CAAA;AAEnD;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,OAA+B,EAC/B,QAAiB,EACO,EAAE;IAC1B,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,OAAO,CAAA;IAC1C,IAAI,QAAQ,KAAK,EAAE;QAAE,OAAO,EAAE,CAAA;IAC9B,MAAM,IAAI,GAA2B,EAAE,GAAG,OAAO,EAAE,CAAA;IACnD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAkC,CAAC,EAAE,CAAC;QAC9E,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,uBAAuB;YACvC,MAAM,cAAc,CAClB,gCAAgC,uBAAuB,gDAAgD,MAAM,CAAC,GAAG,CAAC,6BAA6B,GAAG,EAAE,CACrJ,CAAA;QACH,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,yBAAyB;YAC3C,MAAM,cAAc,CAClB,kCAAkC,yBAAyB,kDAAkD,MAAM,CAAC,KAAK,CAAC,+BAA+B,KAAK,EAAE,CACjK,CAAA;QACH,IAAI,KAAK,KAAK,EAAE;YAAE,OAAO,IAAI,CAAC,GAAG,CAA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AG,CAAC,OAAe,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { OpenAPIDocument } from "@crvouga/mockingbird-openapi";
|
|
2
|
+
export declare const document: OpenAPIDocument;
|
|
3
|
+
export type OperationId = "GetBalanceTransactions" | "GetBalanceTransactionsId" | "GetCharges" | "PostCharges" | "GetChargesCharge" | "PostChargesCharge" | "GetCheckoutSessions" | "PostCheckoutSessions" | "GetCheckoutSessionsSession" | "PostCheckoutSessionsSession" | "PostCheckoutSessionsSessionExpire" | "GetCheckoutSessionsSessionLineItems" | "GetCoupons" | "PostCoupons" | "GetCouponsCoupon" | "PostCouponsCoupon" | "DeleteCouponsCoupon" | "GetCustomers" | "PostCustomers" | "GetCustomersCustomer" | "PostCustomersCustomer" | "DeleteCustomersCustomer" | "GetCustomersCustomerBalanceTransactions" | "PostCustomersCustomerBalanceTransactions" | "GetCustomersSearch" | "GetDisputes" | "GetDisputesDispute" | "PostDisputesDispute" | "GetEvents" | "GetEventsId" | "GetInvoiceitems" | "PostInvoiceitems" | "GetInvoiceitemsInvoiceitem" | "PostInvoiceitemsInvoiceitem" | "DeleteInvoiceitemsInvoiceitem" | "GetInvoices" | "PostInvoices" | "GetInvoicesInvoice" | "PostInvoicesInvoice" | "DeleteInvoicesInvoice" | "PostInvoicesInvoiceFinalize" | "GetInvoicesInvoiceLines" | "PostInvoicesInvoicePay" | "GetInvoicesUpcoming" | "GetPaymentIntents" | "PostPaymentIntents" | "GetPaymentIntentsIntent" | "PostPaymentIntentsIntent" | "PostPaymentIntentsIntentCancel" | "PostPaymentIntentsIntentCapture" | "PostPaymentIntentsIntentConfirm" | "GetPaymentIntentsSearch" | "GetPaymentMethods" | "PostPaymentMethods" | "GetPaymentMethodsPaymentMethod" | "PostPaymentMethodsPaymentMethod" | "PostPaymentMethodsPaymentMethodAttach" | "PostPaymentMethodsPaymentMethodDetach" | "GetPrices" | "PostPrices" | "GetPricesPrice" | "PostPricesPrice" | "GetProducts" | "PostProducts" | "GetProductsId" | "PostProductsId" | "DeleteProductsId" | "GetProductsSearch" | "GetPromotionCodes" | "PostPromotionCodes" | "GetPromotionCodesPromotionCode" | "PostPromotionCodesPromotionCode" | "GetRefunds" | "PostRefunds" | "GetRefundsRefund" | "PostRefundsRefund" | "GetSetupIntents" | "PostSetupIntents" | "GetSetupIntentsIntent" | "PostSetupIntentsIntent" | "PostSetupIntentsIntentCancel" | "PostSetupIntentsIntentConfirm" | "GetSubscriptionItems" | "PostSubscriptionItems" | "GetSubscriptionItemsItem" | "PostSubscriptionItemsItem" | "DeleteSubscriptionItemsItem" | "GetSubscriptionSchedules" | "PostSubscriptionSchedules" | "GetSubscriptionSchedulesSchedule" | "PostSubscriptionSchedulesSchedule" | "PostSubscriptionSchedulesScheduleCancel" | "PostSubscriptionSchedulesScheduleRelease" | "GetSubscriptions" | "PostSubscriptions" | "GetSubscriptionsSubscriptionExposedId" | "PostSubscriptionsSubscriptionExposedId" | "DeleteSubscriptionsSubscriptionExposedId" | "GetTestHelpersTestClocks" | "PostTestHelpersTestClocks" | "GetTestHelpersTestClocksTestClock" | "DeleteTestHelpersTestClocksTestClock" | "PostTestHelpersTestClocksTestClockAdvance" | "GetWebhookEndpoints" | "PostWebhookEndpoints" | "GetWebhookEndpointsWebhookEndpoint" | "PostWebhookEndpointsWebhookEndpoint" | "DeleteWebhookEndpointsWebhookEndpoint";
|
|
4
|
+
export type SupportedOperationId = "GetCharges" | "GetChargesCharge" | "GetCheckoutSessions" | "PostCheckoutSessions" | "GetCheckoutSessionsSession" | "PostCheckoutSessionsSessionExpire" | "GetCheckoutSessionsSessionLineItems" | "GetCoupons" | "PostCoupons" | "GetCouponsCoupon" | "PostCouponsCoupon" | "GetCustomers" | "PostCustomers" | "GetCustomersCustomer" | "PostCustomersCustomer" | "DeleteCustomersCustomer" | "GetCustomersCustomerBalanceTransactions" | "PostCustomersCustomerBalanceTransactions" | "GetCustomersSearch" | "GetDisputes" | "GetDisputesDispute" | "GetEvents" | "GetEventsId" | "GetInvoiceitems" | "PostInvoiceitems" | "GetInvoiceitemsInvoiceitem" | "PostInvoiceitemsInvoiceitem" | "DeleteInvoiceitemsInvoiceitem" | "GetInvoices" | "PostInvoices" | "GetInvoicesInvoice" | "PostInvoicesInvoice" | "DeleteInvoicesInvoice" | "PostInvoicesInvoiceFinalize" | "GetInvoicesInvoiceLines" | "PostInvoicesInvoicePay" | "GetInvoicesUpcoming" | "GetPaymentIntents" | "PostPaymentIntents" | "GetPaymentIntentsIntent" | "PostPaymentIntentsIntent" | "PostPaymentIntentsIntentCancel" | "PostPaymentIntentsIntentCapture" | "PostPaymentIntentsIntentConfirm" | "GetPaymentIntentsSearch" | "GetPaymentMethods" | "PostPaymentMethods" | "GetPaymentMethodsPaymentMethod" | "PostPaymentMethodsPaymentMethod" | "PostPaymentMethodsPaymentMethodAttach" | "PostPaymentMethodsPaymentMethodDetach" | "GetPrices" | "PostPrices" | "GetPricesPrice" | "PostPricesPrice" | "GetProducts" | "PostProducts" | "GetProductsId" | "PostProductsId" | "DeleteProductsId" | "GetProductsSearch" | "GetPromotionCodes" | "PostPromotionCodes" | "GetPromotionCodesPromotionCode" | "PostPromotionCodesPromotionCode" | "GetRefunds" | "PostRefunds" | "GetRefundsRefund" | "PostRefundsRefund" | "GetSetupIntents" | "PostSetupIntents" | "GetSetupIntentsIntent" | "PostSetupIntentsIntent" | "PostSetupIntentsIntentCancel" | "PostSetupIntentsIntentConfirm" | "GetSubscriptionItems" | "GetSubscriptionItemsItem" | "GetSubscriptionSchedules" | "PostSubscriptionSchedules" | "GetSubscriptionSchedulesSchedule" | "PostSubscriptionSchedulesSchedule" | "PostSubscriptionSchedulesScheduleCancel" | "PostSubscriptionSchedulesScheduleRelease" | "GetSubscriptions" | "PostSubscriptions" | "GetSubscriptionsSubscriptionExposedId" | "PostSubscriptionsSubscriptionExposedId" | "DeleteSubscriptionsSubscriptionExposedId";
|
|
5
|
+
export declare const operationIds: readonly ["GetBalanceTransactions", "GetBalanceTransactionsId", "GetCharges", "PostCharges", "GetChargesCharge", "PostChargesCharge", "GetCheckoutSessions", "PostCheckoutSessions", "GetCheckoutSessionsSession", "PostCheckoutSessionsSession", "PostCheckoutSessionsSessionExpire", "GetCheckoutSessionsSessionLineItems", "GetCoupons", "PostCoupons", "GetCouponsCoupon", "PostCouponsCoupon", "DeleteCouponsCoupon", "GetCustomers", "PostCustomers", "GetCustomersCustomer", "PostCustomersCustomer", "DeleteCustomersCustomer", "GetCustomersCustomerBalanceTransactions", "PostCustomersCustomerBalanceTransactions", "GetCustomersSearch", "GetDisputes", "GetDisputesDispute", "PostDisputesDispute", "GetEvents", "GetEventsId", "GetInvoiceitems", "PostInvoiceitems", "GetInvoiceitemsInvoiceitem", "PostInvoiceitemsInvoiceitem", "DeleteInvoiceitemsInvoiceitem", "GetInvoices", "PostInvoices", "GetInvoicesInvoice", "PostInvoicesInvoice", "DeleteInvoicesInvoice", "PostInvoicesInvoiceFinalize", "GetInvoicesInvoiceLines", "PostInvoicesInvoicePay", "GetInvoicesUpcoming", "GetPaymentIntents", "PostPaymentIntents", "GetPaymentIntentsIntent", "PostPaymentIntentsIntent", "PostPaymentIntentsIntentCancel", "PostPaymentIntentsIntentCapture", "PostPaymentIntentsIntentConfirm", "GetPaymentIntentsSearch", "GetPaymentMethods", "PostPaymentMethods", "GetPaymentMethodsPaymentMethod", "PostPaymentMethodsPaymentMethod", "PostPaymentMethodsPaymentMethodAttach", "PostPaymentMethodsPaymentMethodDetach", "GetPrices", "PostPrices", "GetPricesPrice", "PostPricesPrice", "GetProducts", "PostProducts", "GetProductsId", "PostProductsId", "DeleteProductsId", "GetProductsSearch", "GetPromotionCodes", "PostPromotionCodes", "GetPromotionCodesPromotionCode", "PostPromotionCodesPromotionCode", "GetRefunds", "PostRefunds", "GetRefundsRefund", "PostRefundsRefund", "GetSetupIntents", "PostSetupIntents", "GetSetupIntentsIntent", "PostSetupIntentsIntent", "PostSetupIntentsIntentCancel", "PostSetupIntentsIntentConfirm", "GetSubscriptionItems", "PostSubscriptionItems", "GetSubscriptionItemsItem", "PostSubscriptionItemsItem", "DeleteSubscriptionItemsItem", "GetSubscriptionSchedules", "PostSubscriptionSchedules", "GetSubscriptionSchedulesSchedule", "PostSubscriptionSchedulesSchedule", "PostSubscriptionSchedulesScheduleCancel", "PostSubscriptionSchedulesScheduleRelease", "GetSubscriptions", "PostSubscriptions", "GetSubscriptionsSubscriptionExposedId", "PostSubscriptionsSubscriptionExposedId", "DeleteSubscriptionsSubscriptionExposedId", "GetTestHelpersTestClocks", "PostTestHelpersTestClocks", "GetTestHelpersTestClocksTestClock", "DeleteTestHelpersTestClocksTestClock", "PostTestHelpersTestClocksTestClockAdvance", "GetWebhookEndpoints", "PostWebhookEndpoints", "GetWebhookEndpointsWebhookEndpoint", "PostWebhookEndpointsWebhookEndpoint", "DeleteWebhookEndpointsWebhookEndpoint"];
|
|
6
|
+
export declare const supportedOperationIds: readonly ["GetCharges", "GetChargesCharge", "GetCheckoutSessions", "PostCheckoutSessions", "GetCheckoutSessionsSession", "PostCheckoutSessionsSessionExpire", "GetCheckoutSessionsSessionLineItems", "GetCoupons", "PostCoupons", "GetCouponsCoupon", "PostCouponsCoupon", "GetCustomers", "PostCustomers", "GetCustomersCustomer", "PostCustomersCustomer", "DeleteCustomersCustomer", "GetCustomersCustomerBalanceTransactions", "PostCustomersCustomerBalanceTransactions", "GetCustomersSearch", "GetDisputes", "GetDisputesDispute", "GetEvents", "GetEventsId", "GetInvoiceitems", "PostInvoiceitems", "GetInvoiceitemsInvoiceitem", "PostInvoiceitemsInvoiceitem", "DeleteInvoiceitemsInvoiceitem", "GetInvoices", "PostInvoices", "GetInvoicesInvoice", "PostInvoicesInvoice", "DeleteInvoicesInvoice", "PostInvoicesInvoiceFinalize", "GetInvoicesInvoiceLines", "PostInvoicesInvoicePay", "GetInvoicesUpcoming", "GetPaymentIntents", "PostPaymentIntents", "GetPaymentIntentsIntent", "PostPaymentIntentsIntent", "PostPaymentIntentsIntentCancel", "PostPaymentIntentsIntentCapture", "PostPaymentIntentsIntentConfirm", "GetPaymentIntentsSearch", "GetPaymentMethods", "PostPaymentMethods", "GetPaymentMethodsPaymentMethod", "PostPaymentMethodsPaymentMethod", "PostPaymentMethodsPaymentMethodAttach", "PostPaymentMethodsPaymentMethodDetach", "GetPrices", "PostPrices", "GetPricesPrice", "PostPricesPrice", "GetProducts", "PostProducts", "GetProductsId", "PostProductsId", "DeleteProductsId", "GetProductsSearch", "GetPromotionCodes", "PostPromotionCodes", "GetPromotionCodesPromotionCode", "PostPromotionCodesPromotionCode", "GetRefunds", "PostRefunds", "GetRefundsRefund", "PostRefundsRefund", "GetSetupIntents", "PostSetupIntents", "GetSetupIntentsIntent", "PostSetupIntentsIntent", "PostSetupIntentsIntentCancel", "PostSetupIntentsIntentConfirm", "GetSubscriptionItems", "GetSubscriptionItemsItem", "GetSubscriptionSchedules", "PostSubscriptionSchedules", "GetSubscriptionSchedulesSchedule", "PostSubscriptionSchedulesSchedule", "PostSubscriptionSchedulesScheduleCancel", "PostSubscriptionSchedulesScheduleRelease", "GetSubscriptions", "PostSubscriptions", "GetSubscriptionsSubscriptionExposedId", "PostSubscriptionsSubscriptionExposedId", "DeleteSubscriptionsSubscriptionExposedId"];
|
|
7
|
+
//# sourceMappingURL=openapi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/generated/openapi.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAEnE,eAAO,MAAM,QAAQ,EAAE,eAAq7niC,CAAA;AAE58niC,MAAM,MAAM,WAAW,GAAG,wBAAwB,GAAG,0BAA0B,GAAG,YAAY,GAAG,aA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