dodopayments 1.53.2 → 2.0.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/CHANGELOG.md +10 -0
- package/README.md +114 -44
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/bin/cli +53 -0
- package/bin/migration-config.json +6 -0
- package/client.d.mts +259 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +259 -0
- package/client.d.ts.map +1 -0
- package/client.js +536 -0
- package/client.js.map +1 -0
- package/client.mjs +532 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +70 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +70 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +129 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +122 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +3 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +7 -190
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -189
- package/index.d.ts.map +1 -1
- package/index.js +14 -195
- package/index.js.map +1 -1
- package/index.mjs +6 -168
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +115 -66
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +1 -34
- package/pagination.d.ts.map +1 -1
- package/pagination.js +3 -71
- package/pagination.js.map +1 -1
- package/pagination.mjs +1 -68
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/addons.d.mts +113 -0
- package/resources/addons.d.mts.map +1 -0
- package/resources/addons.d.ts +11 -12
- package/resources/addons.d.ts.map +1 -1
- package/resources/addons.js +8 -15
- package/resources/addons.js.map +1 -1
- package/resources/addons.mjs +7 -13
- package/resources/addons.mjs.map +1 -1
- package/resources/brands.d.mts +66 -0
- package/resources/brands.d.mts.map +1 -0
- package/resources/brands.d.ts +8 -7
- package/resources/brands.d.ts.map +1 -1
- package/resources/brands.js +5 -4
- package/resources/brands.js.map +1 -1
- package/resources/brands.mjs +5 -4
- package/resources/brands.mjs.map +1 -1
- package/resources/checkout-sessions.d.mts +349 -0
- package/resources/checkout-sessions.d.mts.map +1 -0
- package/resources/checkout-sessions.d.ts +4 -3
- package/resources/checkout-sessions.d.ts.map +1 -1
- package/resources/checkout-sessions.js +1 -1
- package/resources/checkout-sessions.js.map +1 -1
- package/resources/checkout-sessions.mjs +1 -1
- package/resources/checkout-sessions.mjs.map +1 -1
- package/resources/customers/customer-portal.d.mts +17 -0
- package/resources/customers/customer-portal.d.mts.map +1 -0
- package/resources/customers/customer-portal.d.ts +4 -4
- package/resources/customers/customer-portal.d.ts.map +1 -1
- package/resources/customers/customer-portal.js +5 -8
- package/resources/customers/customer-portal.js.map +1 -1
- package/resources/customers/customer-portal.mjs +5 -8
- package/resources/customers/customer-portal.mjs.map +1 -1
- package/resources/customers/customers.d.mts +49 -0
- package/resources/customers/customers.d.mts.map +1 -0
- package/resources/customers/customers.d.ts +10 -11
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +15 -41
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +11 -14
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.mts +4 -0
- package/resources/customers/index.d.mts.map +1 -0
- package/resources/customers/index.d.ts +1 -1
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js +1 -2
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs +1 -1
- package/resources/customers/index.mjs.map +1 -1
- package/resources/customers/wallets/index.d.mts +3 -0
- package/resources/customers/wallets/index.d.mts.map +1 -0
- package/resources/customers/wallets/index.d.ts +1 -1
- package/resources/customers/wallets/index.d.ts.map +1 -1
- package/resources/customers/wallets/index.js +1 -2
- package/resources/customers/wallets/index.js.map +1 -1
- package/resources/customers/wallets/index.mjs +1 -1
- package/resources/customers/wallets/index.mjs.map +1 -1
- package/resources/customers/wallets/ledger-entries.d.mts +51 -0
- package/resources/customers/wallets/ledger-entries.d.mts.map +1 -0
- package/resources/customers/wallets/ledger-entries.d.ts +8 -9
- package/resources/customers/wallets/ledger-entries.d.ts.map +1 -1
- package/resources/customers/wallets/ledger-entries.js +8 -16
- package/resources/customers/wallets/ledger-entries.js.map +1 -1
- package/resources/customers/wallets/ledger-entries.mjs +7 -14
- package/resources/customers/wallets/ledger-entries.mjs.map +1 -1
- package/resources/customers/wallets/wallets.d.mts +29 -0
- package/resources/customers/wallets/wallets.d.mts.map +1 -0
- package/resources/customers/wallets/wallets.d.ts +5 -4
- package/resources/customers/wallets/wallets.d.ts.map +1 -1
- package/resources/customers/wallets/wallets.js +6 -29
- package/resources/customers/wallets/wallets.js.map +1 -1
- package/resources/customers/wallets/wallets.mjs +5 -6
- package/resources/customers/wallets/wallets.mjs.map +1 -1
- package/resources/customers/wallets.d.mts +2 -0
- package/resources/customers/wallets.d.mts.map +1 -0
- package/resources/customers/wallets.d.ts.map +1 -1
- package/resources/customers/wallets.js +2 -15
- package/resources/customers/wallets.js.map +1 -1
- package/resources/customers.d.mts +2 -0
- package/resources/customers.d.mts.map +1 -0
- package/resources/customers.d.ts.map +1 -1
- package/resources/customers.js +2 -15
- package/resources/customers.js.map +1 -1
- package/resources/discounts.d.mts +168 -0
- package/resources/discounts.d.mts.map +1 -0
- package/resources/discounts.d.ts +11 -12
- package/resources/discounts.d.ts.map +1 -1
- package/resources/discounts.js +19 -19
- package/resources/discounts.js.map +1 -1
- package/resources/discounts.mjs +18 -17
- package/resources/discounts.mjs.map +1 -1
- package/resources/disputes.d.mts +159 -0
- package/resources/disputes.d.mts.map +1 -0
- package/resources/disputes.d.ts +8 -9
- package/resources/disputes.d.ts.map +1 -1
- package/resources/disputes.js +7 -14
- package/resources/disputes.js.map +1 -1
- package/resources/disputes.mjs +6 -12
- package/resources/disputes.mjs.map +1 -1
- package/resources/index.d.mts +21 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +14 -14
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -20
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +14 -14
- package/resources/index.mjs.map +1 -1
- package/resources/invoices/index.d.mts +3 -0
- package/resources/invoices/index.d.mts.map +1 -0
- package/resources/invoices/index.d.ts.map +1 -1
- package/resources/invoices/invoices.d.mts +10 -0
- package/resources/invoices/invoices.d.mts.map +1 -0
- package/resources/invoices/invoices.d.ts +1 -1
- package/resources/invoices/invoices.d.ts.map +1 -1
- package/resources/invoices/invoices.js +3 -25
- package/resources/invoices/invoices.js.map +1 -1
- package/resources/invoices/invoices.mjs +1 -1
- package/resources/invoices/payments.d.mts +8 -0
- package/resources/invoices/payments.d.mts.map +1 -0
- package/resources/invoices/payments.d.ts +5 -5
- package/resources/invoices/payments.d.ts.map +1 -1
- package/resources/invoices/payments.js +9 -7
- package/resources/invoices/payments.js.map +1 -1
- package/resources/invoices/payments.mjs +9 -7
- package/resources/invoices/payments.mjs.map +1 -1
- package/resources/invoices.d.mts +2 -0
- package/resources/invoices.d.mts.map +1 -0
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +2 -15
- package/resources/invoices.js.map +1 -1
- package/resources/license-key-instances.d.mts +55 -0
- package/resources/license-key-instances.d.mts.map +1 -0
- package/resources/license-key-instances.d.ts +9 -10
- package/resources/license-key-instances.d.ts.map +1 -1
- package/resources/license-key-instances.js +16 -18
- package/resources/license-key-instances.js.map +1 -1
- package/resources/license-key-instances.mjs +15 -16
- package/resources/license-key-instances.mjs.map +1 -1
- package/resources/license-keys.d.mts +122 -0
- package/resources/license-keys.d.mts.map +1 -0
- package/resources/license-keys.d.ts +9 -10
- package/resources/license-keys.d.ts.map +1 -1
- package/resources/license-keys.js +16 -14
- package/resources/license-keys.js.map +1 -1
- package/resources/license-keys.mjs +15 -12
- package/resources/license-keys.mjs.map +1 -1
- package/resources/licenses.d.mts +99 -0
- package/resources/licenses.d.mts.map +1 -0
- package/resources/licenses.d.ts +6 -5
- package/resources/licenses.d.ts.map +1 -1
- package/resources/licenses.js +3 -2
- package/resources/licenses.js.map +1 -1
- package/resources/licenses.mjs +3 -2
- package/resources/licenses.mjs.map +1 -1
- package/resources/meters.d.mts +191 -0
- package/resources/meters.d.mts.map +1 -0
- package/resources/meters.d.ts +11 -12
- package/resources/meters.d.ts.map +1 -1
- package/resources/meters.js +11 -17
- package/resources/meters.js.map +1 -1
- package/resources/meters.mjs +10 -15
- package/resources/meters.mjs.map +1 -1
- package/resources/misc.d.mts +21 -0
- package/resources/misc.d.mts.map +1 -0
- package/resources/misc.d.ts +4 -3
- package/resources/misc.d.ts.map +1 -1
- package/resources/misc.js +1 -1
- package/resources/misc.js.map +1 -1
- package/resources/misc.mjs +1 -1
- package/resources/misc.mjs.map +1 -1
- package/resources/payments.d.mts +420 -0
- package/resources/payments.d.mts.map +1 -0
- package/resources/payments.d.ts +10 -11
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +9 -16
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +8 -14
- package/resources/payments.mjs.map +1 -1
- package/resources/payouts.d.mts +76 -0
- package/resources/payouts.d.mts.map +1 -0
- package/resources/payouts.d.ts +6 -8
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.js +4 -12
- package/resources/payouts.js.map +1 -1
- package/resources/payouts.mjs +3 -10
- package/resources/payouts.mjs.map +1 -1
- package/resources/products/images.d.mts +17 -0
- package/resources/products/images.d.mts.map +1 -0
- package/resources/products/images.d.ts +4 -4
- package/resources/products/images.d.ts.map +1 -1
- package/resources/products/images.js +4 -7
- package/resources/products/images.js.map +1 -1
- package/resources/products/images.mjs +4 -7
- package/resources/products/images.mjs.map +1 -1
- package/resources/products/index.d.mts +3 -0
- package/resources/products/index.d.mts.map +1 -0
- package/resources/products/index.d.ts +1 -1
- package/resources/products/index.d.ts.map +1 -1
- package/resources/products/index.js +1 -2
- package/resources/products/index.js.map +1 -1
- package/resources/products/index.mjs +1 -1
- package/resources/products/index.mjs.map +1 -1
- package/resources/products/products.d.mts +535 -0
- package/resources/products/products.d.mts.map +1 -0
- package/resources/products/products.d.ts +13 -14
- package/resources/products/products.d.ts.map +1 -1
- package/resources/products/products.js +16 -44
- package/resources/products/products.js.map +1 -1
- package/resources/products/products.mjs +13 -18
- package/resources/products/products.mjs.map +1 -1
- package/resources/products.d.mts +2 -0
- package/resources/products.d.mts.map +1 -0
- package/resources/products.d.ts.map +1 -1
- package/resources/products.js +2 -15
- package/resources/products.js.map +1 -1
- package/resources/refunds.d.mts +145 -0
- package/resources/refunds.d.mts.map +1 -0
- package/resources/refunds.d.ts +9 -10
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +7 -14
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +6 -12
- package/resources/refunds.mjs.map +1 -1
- package/resources/subscriptions.d.mts +626 -0
- package/resources/subscriptions.d.mts.map +1 -0
- package/resources/subscriptions.d.ts +14 -17
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +61 -32
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +60 -29
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/usage-events.d.mts +192 -0
- package/resources/usage-events.d.mts.map +1 -0
- package/resources/usage-events.d.ts +9 -10
- package/resources/usage-events.d.ts.map +1 -1
- package/resources/usage-events.js +42 -14
- package/resources/usage-events.js.map +1 -1
- package/resources/usage-events.mjs +41 -12
- package/resources/usage-events.mjs.map +1 -1
- package/resources/webhook-events.d.mts +52 -0
- package/resources/webhook-events.d.mts.map +1 -0
- package/resources/webhook-events.d.ts +1 -1
- package/resources/webhook-events.d.ts.map +1 -1
- package/resources/webhook-events.js +1 -1
- package/resources/webhook-events.js.map +1 -1
- package/resources/webhook-events.mjs +1 -1
- package/resources/webhooks/headers.d.mts +42 -0
- package/resources/webhooks/headers.d.mts.map +1 -0
- package/resources/webhooks/headers.d.ts +5 -4
- package/resources/webhooks/headers.d.ts.map +1 -1
- package/resources/webhooks/headers.js +8 -6
- package/resources/webhooks/headers.js.map +1 -1
- package/resources/webhooks/headers.mjs +8 -6
- package/resources/webhooks/headers.mjs.map +1 -1
- package/resources/webhooks/index.d.mts +3 -0
- package/resources/webhooks/index.d.mts.map +1 -0
- package/resources/webhooks/index.d.ts +1 -1
- package/resources/webhooks/index.d.ts.map +1 -1
- package/resources/webhooks/index.js +1 -2
- package/resources/webhooks/index.js.map +1 -1
- package/resources/webhooks/index.mjs +1 -1
- package/resources/webhooks/index.mjs.map +1 -1
- package/resources/webhooks/webhooks.d.mts +155 -0
- package/resources/webhooks/webhooks.d.mts.map +1 -0
- package/resources/webhooks/webhooks.d.ts +12 -13
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js +20 -45
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs +17 -19
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/resources/webhooks.d.mts +2 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +2 -15
- package/resources/webhooks.js.map +1 -1
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +1206 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/pagination.ts +218 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -130
- package/src/index.ts +6 -658
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/pagination.ts +2 -125
- package/src/resource.ts +2 -11
- package/src/resources/addons.ts +23 -30
- package/src/resources/brands.ts +12 -10
- package/src/resources/checkout-sessions.ts +7 -9
- package/src/resources/customers/customer-portal.ts +11 -22
- package/src/resources/customers/customers.ts +27 -32
- package/src/resources/customers/index.ts +4 -4
- package/src/resources/customers/wallets/index.ts +3 -3
- package/src/resources/customers/wallets/ledger-entries.ts +24 -33
- package/src/resources/customers/wallets/wallets.ts +10 -10
- package/src/resources/customers/wallets.ts +1 -1
- package/src/resources/customers.ts +1 -1
- package/src/resources/discounts.ts +27 -32
- package/src/resources/disputes.ts +19 -25
- package/src/resources/index.ts +42 -42
- package/src/resources/invoices/index.ts +2 -2
- package/src/resources/invoices/invoices.ts +3 -3
- package/src/resources/invoices/payments.ts +11 -9
- package/src/resources/invoices.ts +1 -1
- package/src/resources/license-key-instances.ts +24 -31
- package/src/resources/license-keys.ts +19 -28
- package/src/resources/licenses.ts +9 -13
- package/src/resources/meters.ts +25 -29
- package/src/resources/misc.ts +4 -3
- package/src/resources/payments.ts +26 -32
- package/src/resources/payouts.ts +14 -23
- package/src/resources/products/images.ts +9 -17
- package/src/resources/products/index.ts +3 -3
- package/src/resources/products/products.ts +37 -41
- package/src/resources/products.ts +1 -1
- package/src/resources/refunds.ts +20 -27
- package/src/resources/subscriptions.ts +44 -72
- package/src/resources/usage-events.ts +18 -26
- package/src/resources/webhook-events.ts +6 -6
- package/src/resources/webhooks/headers.ts +10 -7
- package/src/resources/webhooks/index.ts +3 -3
- package/src/resources/webhooks/webhooks.ts +25 -39
- package/src/resources/webhooks.ts +1 -1
- package/src/resources.ts +1 -1
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -157
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -255
- package/core.d.ts.map +0 -1
- package/core.js +0 -924
- package/core.js.map +0 -1
- package/core.mjs +0 -892
- package/core.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1237
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brands.d.ts","sourceRoot":"","sources":["../src/resources/brands.ts"],"names":[],"mappings":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EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/brands.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Brands = void 0;
|
|
5
|
-
const resource_1 = require("../resource.js");
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const path_1 = require("../internal/utils/path.js");
|
|
6
7
|
class Brands extends resource_1.APIResource {
|
|
7
8
|
create(body, options) {
|
|
8
9
|
return this._client.post('/brands', { body, ...options });
|
|
@@ -11,16 +12,16 @@ class Brands extends resource_1.APIResource {
|
|
|
11
12
|
* Thin handler just calls `get_brand` and wraps in `Json(...)`
|
|
12
13
|
*/
|
|
13
14
|
retrieve(id, options) {
|
|
14
|
-
return this._client.get(`/brands/${id}`, options);
|
|
15
|
+
return this._client.get((0, path_1.path) `/brands/${id}`, options);
|
|
15
16
|
}
|
|
16
17
|
update(id, body, options) {
|
|
17
|
-
return this._client.patch(`/brands/${id}`, { body, ...options });
|
|
18
|
+
return this._client.patch((0, path_1.path) `/brands/${id}`, { body, ...options });
|
|
18
19
|
}
|
|
19
20
|
list(options) {
|
|
20
21
|
return this._client.get('/brands', options);
|
|
21
22
|
}
|
|
22
23
|
updateImages(id, options) {
|
|
23
|
-
return this._client.put(`/brands/${id}/images`, options);
|
|
24
|
+
return this._client.put((0, path_1.path) `/brands/${id}/images`, options);
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
exports.Brands = Brands;
|
package/resources/brands.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brands.js","sourceRoot":"","sources":["../src/resources/brands.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"brands.js","sourceRoot":"","sources":["../src/resources/brands.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IACrC,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,IAAuB,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,YAAY,CAAC,EAAU,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,WAAW,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF;AAvBD,wBAuBC"}
|
package/resources/brands.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../resource.mjs";
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { path } from "../internal/utils/path.mjs";
|
|
3
4
|
export class Brands extends APIResource {
|
|
4
5
|
create(body, options) {
|
|
5
6
|
return this._client.post('/brands', { body, ...options });
|
|
@@ -8,16 +9,16 @@ export class Brands extends APIResource {
|
|
|
8
9
|
* Thin handler just calls `get_brand` and wraps in `Json(...)`
|
|
9
10
|
*/
|
|
10
11
|
retrieve(id, options) {
|
|
11
|
-
return this._client.get(`/brands/${id}`, options);
|
|
12
|
+
return this._client.get(path `/brands/${id}`, options);
|
|
12
13
|
}
|
|
13
14
|
update(id, body, options) {
|
|
14
|
-
return this._client.patch(`/brands/${id}`, { body, ...options });
|
|
15
|
+
return this._client.patch(path `/brands/${id}`, { body, ...options });
|
|
15
16
|
}
|
|
16
17
|
list(options) {
|
|
17
18
|
return this._client.get('/brands', options);
|
|
18
19
|
}
|
|
19
20
|
updateImages(id, options) {
|
|
20
|
-
return this._client.put(`/brands/${id}/images`, options);
|
|
21
|
+
return this._client.put(path `/brands/${id}/images`, options);
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
//# sourceMappingURL=brands.mjs.map
|
package/resources/brands.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brands.mjs","sourceRoot":"","sources":["../src/resources/brands.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"brands.mjs","sourceRoot":"","sources":["../src/resources/brands.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,IAAuB,EAAE,OAAwB;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,WAAW,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,YAAY,CAAC,EAAU,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF"}
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as MiscAPI from "./misc.mjs";
|
|
3
|
+
import * as PaymentsAPI from "./payments.mjs";
|
|
4
|
+
import * as SubscriptionsAPI from "./subscriptions.mjs";
|
|
5
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
6
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
7
|
+
export declare class CheckoutSessions extends APIResource {
|
|
8
|
+
create(body: CheckoutSessionCreateParams, options?: RequestOptions): APIPromise<CheckoutSessionResponse>;
|
|
9
|
+
}
|
|
10
|
+
export interface CheckoutSessionRequest {
|
|
11
|
+
product_cart: Array<CheckoutSessionRequest.ProductCart>;
|
|
12
|
+
/**
|
|
13
|
+
* Customers will never see payment methods that are not in this list. However,
|
|
14
|
+
* adding a method here does not guarantee customers will see it. Availability
|
|
15
|
+
* still depends on other factors (e.g., customer location, merchant settings).
|
|
16
|
+
*
|
|
17
|
+
* Disclaimar: Always provide 'credit' and 'debit' as a fallback. If all payment
|
|
18
|
+
* methods are unavailable, checkout session will fail.
|
|
19
|
+
*/
|
|
20
|
+
allowed_payment_method_types?: Array<PaymentsAPI.PaymentMethodTypes> | null;
|
|
21
|
+
/**
|
|
22
|
+
* Billing address information for the session
|
|
23
|
+
*/
|
|
24
|
+
billing_address?: CheckoutSessionRequest.BillingAddress | null;
|
|
25
|
+
/**
|
|
26
|
+
* This field is ingored if adaptive pricing is disabled
|
|
27
|
+
*/
|
|
28
|
+
billing_currency?: MiscAPI.Currency | null;
|
|
29
|
+
/**
|
|
30
|
+
* If confirm is true, all the details will be finalized. If required data is
|
|
31
|
+
* missing, an API error is thrown.
|
|
32
|
+
*/
|
|
33
|
+
confirm?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Customer details for the session
|
|
36
|
+
*/
|
|
37
|
+
customer?: PaymentsAPI.CustomerRequest | null;
|
|
38
|
+
/**
|
|
39
|
+
* Customization for the checkout session page
|
|
40
|
+
*/
|
|
41
|
+
customization?: CheckoutSessionRequest.Customization;
|
|
42
|
+
discount_code?: string | null;
|
|
43
|
+
feature_flags?: CheckoutSessionRequest.FeatureFlags;
|
|
44
|
+
/**
|
|
45
|
+
* Additional metadata associated with the payment. Defaults to empty if not
|
|
46
|
+
* provided.
|
|
47
|
+
*/
|
|
48
|
+
metadata?: {
|
|
49
|
+
[key: string]: string;
|
|
50
|
+
} | null;
|
|
51
|
+
/**
|
|
52
|
+
* The url to redirect after payment failure or success.
|
|
53
|
+
*/
|
|
54
|
+
return_url?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* Display saved payment methods of a returning customer False by default
|
|
57
|
+
*/
|
|
58
|
+
show_saved_payment_methods?: boolean;
|
|
59
|
+
subscription_data?: CheckoutSessionRequest.SubscriptionData | null;
|
|
60
|
+
}
|
|
61
|
+
export declare namespace CheckoutSessionRequest {
|
|
62
|
+
interface ProductCart {
|
|
63
|
+
/**
|
|
64
|
+
* unique id of the product
|
|
65
|
+
*/
|
|
66
|
+
product_id: string;
|
|
67
|
+
quantity: number;
|
|
68
|
+
/**
|
|
69
|
+
* only valid if product is a subscription
|
|
70
|
+
*/
|
|
71
|
+
addons?: Array<SubscriptionsAPI.AttachAddon> | null;
|
|
72
|
+
/**
|
|
73
|
+
* Amount the customer pays if pay_what_you_want is enabled. If disabled then
|
|
74
|
+
* amount will be ignored Represented in the lowest denomination of the currency
|
|
75
|
+
* (e.g., cents for USD). For example, to charge $1.00, pass `100`. Only applicable
|
|
76
|
+
* for one time payments
|
|
77
|
+
*
|
|
78
|
+
* If amount is not set for pay_what_you_want product, customer is allowed to
|
|
79
|
+
* select the amount.
|
|
80
|
+
*/
|
|
81
|
+
amount?: number | null;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Billing address information for the session
|
|
85
|
+
*/
|
|
86
|
+
interface BillingAddress {
|
|
87
|
+
/**
|
|
88
|
+
* Two-letter ISO country code (ISO 3166-1 alpha-2)
|
|
89
|
+
*/
|
|
90
|
+
country: MiscAPI.CountryCode;
|
|
91
|
+
/**
|
|
92
|
+
* City name
|
|
93
|
+
*/
|
|
94
|
+
city?: string | null;
|
|
95
|
+
/**
|
|
96
|
+
* State or province name
|
|
97
|
+
*/
|
|
98
|
+
state?: string | null;
|
|
99
|
+
/**
|
|
100
|
+
* Street address including house number and unit/apartment if applicable
|
|
101
|
+
*/
|
|
102
|
+
street?: string | null;
|
|
103
|
+
/**
|
|
104
|
+
* Postal code or ZIP code
|
|
105
|
+
*/
|
|
106
|
+
zipcode?: string | null;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Customization for the checkout session page
|
|
110
|
+
*/
|
|
111
|
+
interface Customization {
|
|
112
|
+
/**
|
|
113
|
+
* Show on demand tag
|
|
114
|
+
*
|
|
115
|
+
* Default is true
|
|
116
|
+
*/
|
|
117
|
+
show_on_demand_tag?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Show order details by default
|
|
120
|
+
*
|
|
121
|
+
* Default is true
|
|
122
|
+
*/
|
|
123
|
+
show_order_details?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Theme of the page
|
|
126
|
+
*
|
|
127
|
+
* Default is `System`.
|
|
128
|
+
*/
|
|
129
|
+
theme?: 'dark' | 'light' | 'system';
|
|
130
|
+
}
|
|
131
|
+
interface FeatureFlags {
|
|
132
|
+
/**
|
|
133
|
+
* if customer is allowed to change currency, set it to true
|
|
134
|
+
*
|
|
135
|
+
* Default is true
|
|
136
|
+
*/
|
|
137
|
+
allow_currency_selection?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* If the customer is allowed to apply discount code, set it to true.
|
|
140
|
+
*
|
|
141
|
+
* Default is true
|
|
142
|
+
*/
|
|
143
|
+
allow_discount_code?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* If phone number is collected from customer, set it to rue
|
|
146
|
+
*
|
|
147
|
+
* Default is true
|
|
148
|
+
*/
|
|
149
|
+
allow_phone_number_collection?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* If the customer is allowed to add tax id, set it to true
|
|
152
|
+
*
|
|
153
|
+
* Default is true
|
|
154
|
+
*/
|
|
155
|
+
allow_tax_id?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Set to true if a new customer object should be created. By default email is used
|
|
158
|
+
* to find an existing customer to attach the session to
|
|
159
|
+
*
|
|
160
|
+
* Default is false
|
|
161
|
+
*/
|
|
162
|
+
always_create_new_customer?: boolean;
|
|
163
|
+
}
|
|
164
|
+
interface SubscriptionData {
|
|
165
|
+
on_demand?: SubscriptionsAPI.OnDemandSubscription | null;
|
|
166
|
+
/**
|
|
167
|
+
* Optional trial period in days If specified, this value overrides the trial
|
|
168
|
+
* period set in the product's price Must be between 0 and 10000 days
|
|
169
|
+
*/
|
|
170
|
+
trial_period_days?: number | null;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
export interface CheckoutSessionResponse {
|
|
174
|
+
/**
|
|
175
|
+
* Checkout url
|
|
176
|
+
*/
|
|
177
|
+
checkout_url: string;
|
|
178
|
+
/**
|
|
179
|
+
* The ID of the created checkout session
|
|
180
|
+
*/
|
|
181
|
+
session_id: string;
|
|
182
|
+
}
|
|
183
|
+
export interface CheckoutSessionCreateParams {
|
|
184
|
+
product_cart: Array<CheckoutSessionCreateParams.ProductCart>;
|
|
185
|
+
/**
|
|
186
|
+
* Customers will never see payment methods that are not in this list. However,
|
|
187
|
+
* adding a method here does not guarantee customers will see it. Availability
|
|
188
|
+
* still depends on other factors (e.g., customer location, merchant settings).
|
|
189
|
+
*
|
|
190
|
+
* Disclaimar: Always provide 'credit' and 'debit' as a fallback. If all payment
|
|
191
|
+
* methods are unavailable, checkout session will fail.
|
|
192
|
+
*/
|
|
193
|
+
allowed_payment_method_types?: Array<PaymentsAPI.PaymentMethodTypes> | null;
|
|
194
|
+
/**
|
|
195
|
+
* Billing address information for the session
|
|
196
|
+
*/
|
|
197
|
+
billing_address?: CheckoutSessionCreateParams.BillingAddress | null;
|
|
198
|
+
/**
|
|
199
|
+
* This field is ingored if adaptive pricing is disabled
|
|
200
|
+
*/
|
|
201
|
+
billing_currency?: MiscAPI.Currency | null;
|
|
202
|
+
/**
|
|
203
|
+
* If confirm is true, all the details will be finalized. If required data is
|
|
204
|
+
* missing, an API error is thrown.
|
|
205
|
+
*/
|
|
206
|
+
confirm?: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Customer details for the session
|
|
209
|
+
*/
|
|
210
|
+
customer?: PaymentsAPI.CustomerRequest | null;
|
|
211
|
+
/**
|
|
212
|
+
* Customization for the checkout session page
|
|
213
|
+
*/
|
|
214
|
+
customization?: CheckoutSessionCreateParams.Customization;
|
|
215
|
+
discount_code?: string | null;
|
|
216
|
+
feature_flags?: CheckoutSessionCreateParams.FeatureFlags;
|
|
217
|
+
/**
|
|
218
|
+
* Additional metadata associated with the payment. Defaults to empty if not
|
|
219
|
+
* provided.
|
|
220
|
+
*/
|
|
221
|
+
metadata?: {
|
|
222
|
+
[key: string]: string;
|
|
223
|
+
} | null;
|
|
224
|
+
/**
|
|
225
|
+
* The url to redirect after payment failure or success.
|
|
226
|
+
*/
|
|
227
|
+
return_url?: string | null;
|
|
228
|
+
/**
|
|
229
|
+
* Display saved payment methods of a returning customer False by default
|
|
230
|
+
*/
|
|
231
|
+
show_saved_payment_methods?: boolean;
|
|
232
|
+
subscription_data?: CheckoutSessionCreateParams.SubscriptionData | null;
|
|
233
|
+
}
|
|
234
|
+
export declare namespace CheckoutSessionCreateParams {
|
|
235
|
+
interface ProductCart {
|
|
236
|
+
/**
|
|
237
|
+
* unique id of the product
|
|
238
|
+
*/
|
|
239
|
+
product_id: string;
|
|
240
|
+
quantity: number;
|
|
241
|
+
/**
|
|
242
|
+
* only valid if product is a subscription
|
|
243
|
+
*/
|
|
244
|
+
addons?: Array<SubscriptionsAPI.AttachAddon> | null;
|
|
245
|
+
/**
|
|
246
|
+
* Amount the customer pays if pay_what_you_want is enabled. If disabled then
|
|
247
|
+
* amount will be ignored Represented in the lowest denomination of the currency
|
|
248
|
+
* (e.g., cents for USD). For example, to charge $1.00, pass `100`. Only applicable
|
|
249
|
+
* for one time payments
|
|
250
|
+
*
|
|
251
|
+
* If amount is not set for pay_what_you_want product, customer is allowed to
|
|
252
|
+
* select the amount.
|
|
253
|
+
*/
|
|
254
|
+
amount?: number | null;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Billing address information for the session
|
|
258
|
+
*/
|
|
259
|
+
interface BillingAddress {
|
|
260
|
+
/**
|
|
261
|
+
* Two-letter ISO country code (ISO 3166-1 alpha-2)
|
|
262
|
+
*/
|
|
263
|
+
country: MiscAPI.CountryCode;
|
|
264
|
+
/**
|
|
265
|
+
* City name
|
|
266
|
+
*/
|
|
267
|
+
city?: string | null;
|
|
268
|
+
/**
|
|
269
|
+
* State or province name
|
|
270
|
+
*/
|
|
271
|
+
state?: string | null;
|
|
272
|
+
/**
|
|
273
|
+
* Street address including house number and unit/apartment if applicable
|
|
274
|
+
*/
|
|
275
|
+
street?: string | null;
|
|
276
|
+
/**
|
|
277
|
+
* Postal code or ZIP code
|
|
278
|
+
*/
|
|
279
|
+
zipcode?: string | null;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Customization for the checkout session page
|
|
283
|
+
*/
|
|
284
|
+
interface Customization {
|
|
285
|
+
/**
|
|
286
|
+
* Show on demand tag
|
|
287
|
+
*
|
|
288
|
+
* Default is true
|
|
289
|
+
*/
|
|
290
|
+
show_on_demand_tag?: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Show order details by default
|
|
293
|
+
*
|
|
294
|
+
* Default is true
|
|
295
|
+
*/
|
|
296
|
+
show_order_details?: boolean;
|
|
297
|
+
/**
|
|
298
|
+
* Theme of the page
|
|
299
|
+
*
|
|
300
|
+
* Default is `System`.
|
|
301
|
+
*/
|
|
302
|
+
theme?: 'dark' | 'light' | 'system';
|
|
303
|
+
}
|
|
304
|
+
interface FeatureFlags {
|
|
305
|
+
/**
|
|
306
|
+
* if customer is allowed to change currency, set it to true
|
|
307
|
+
*
|
|
308
|
+
* Default is true
|
|
309
|
+
*/
|
|
310
|
+
allow_currency_selection?: boolean;
|
|
311
|
+
/**
|
|
312
|
+
* If the customer is allowed to apply discount code, set it to true.
|
|
313
|
+
*
|
|
314
|
+
* Default is true
|
|
315
|
+
*/
|
|
316
|
+
allow_discount_code?: boolean;
|
|
317
|
+
/**
|
|
318
|
+
* If phone number is collected from customer, set it to rue
|
|
319
|
+
*
|
|
320
|
+
* Default is true
|
|
321
|
+
*/
|
|
322
|
+
allow_phone_number_collection?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* If the customer is allowed to add tax id, set it to true
|
|
325
|
+
*
|
|
326
|
+
* Default is true
|
|
327
|
+
*/
|
|
328
|
+
allow_tax_id?: boolean;
|
|
329
|
+
/**
|
|
330
|
+
* Set to true if a new customer object should be created. By default email is used
|
|
331
|
+
* to find an existing customer to attach the session to
|
|
332
|
+
*
|
|
333
|
+
* Default is false
|
|
334
|
+
*/
|
|
335
|
+
always_create_new_customer?: boolean;
|
|
336
|
+
}
|
|
337
|
+
interface SubscriptionData {
|
|
338
|
+
on_demand?: SubscriptionsAPI.OnDemandSubscription | null;
|
|
339
|
+
/**
|
|
340
|
+
* Optional trial period in days If specified, this value overrides the trial
|
|
341
|
+
* period set in the product's price Must be between 0 and 10000 days
|
|
342
|
+
*/
|
|
343
|
+
trial_period_days?: number | null;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
export declare namespace CheckoutSessions {
|
|
347
|
+
export { type CheckoutSessionRequest as CheckoutSessionRequest, type CheckoutSessionResponse as CheckoutSessionResponse, type CheckoutSessionCreateParams as CheckoutSessionCreateParams, };
|
|
348
|
+
}
|
|
349
|
+
//# sourceMappingURL=checkout-sessions.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkout-sessions.d.mts","sourceRoot":"","sources":["../src/resources/checkout-sessions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,KAAK,gBAAgB;OACrB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,CAAC,IAAI,EAAE,2BAA2B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAGzG;AAED,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,KAAK,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC;IAExD;;;;;;;OAOG;IACH,4BAA4B,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;IAE5E;;OAEG;IACH,eAAe,CAAC,EAAE,sBAAsB,CAAC,cAAc,GAAG,IAAI,CAAC;IAE/D;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAE3C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,eAAe,GAAG,IAAI,CAAC;IAE9C;;OAEG;IACH,aAAa,CAAC,EAAE,sBAAsB,CAAC,aAAa,CAAC;IAErD,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,aAAa,CAAC,EAAE,sBAAsB,CAAC,YAAY,CAAC;IAEpD;;;OAGG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAE5C;;OAEG;IACH,UAAU,CAA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BAAgB,CAAC,oBAAoB,GAAG,IAAI,CAAC;QAEzD;;;WAGG;QACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACnC;CACF;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { APIResource } from "../resource.js";
|
|
2
|
-
import * as Core from "../core.js";
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
3
2
|
import * as MiscAPI from "./misc.js";
|
|
4
3
|
import * as PaymentsAPI from "./payments.js";
|
|
5
4
|
import * as SubscriptionsAPI from "./subscriptions.js";
|
|
5
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
6
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
6
7
|
export declare class CheckoutSessions extends APIResource {
|
|
7
|
-
create(body: CheckoutSessionCreateParams, options?:
|
|
8
|
+
create(body: CheckoutSessionCreateParams, options?: RequestOptions): APIPromise<CheckoutSessionResponse>;
|
|
8
9
|
}
|
|
9
10
|
export interface CheckoutSessionRequest {
|
|
10
11
|
product_cart: Array<CheckoutSessionRequest.ProductCart>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-sessions.d.ts","sourceRoot":"","sources":["../src/resources/checkout-sessions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkout-sessions.d.ts","sourceRoot":"","sources":["../src/resources/checkout-sessions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,KAAK,gBAAgB;OACrB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,CAAC,IAAI,EAAE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3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.CheckoutSessions = void 0;
|
|
5
|
-
const resource_1 = require("../resource.js");
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
6
|
class CheckoutSessions extends resource_1.APIResource {
|
|
7
7
|
create(body, options) {
|
|
8
8
|
return this._client.post('/checkouts', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-sessions.js","sourceRoot":"","sources":["../src/resources/checkout-sessions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"checkout-sessions.js","sourceRoot":"","sources":["../src/resources/checkout-sessions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAO/C,MAAa,gBAAiB,SAAQ,sBAAW;IAC/C,MAAM,CAAC,IAAiC,EAAE,OAAwB;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;CACF;AAJD,4CAIC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../resource.mjs";
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
3
|
export class CheckoutSessions extends APIResource {
|
|
4
4
|
create(body, options) {
|
|
5
5
|
return this._client.post('/checkouts', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-sessions.mjs","sourceRoot":"","sources":["../src/resources/checkout-sessions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"checkout-sessions.mjs","sourceRoot":"","sources":["../src/resources/checkout-sessions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAOtB,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,CAAC,IAAiC,EAAE,OAAwB;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as CustomersAPI from "./customers.mjs";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
|
+
export declare class CustomerPortal extends APIResource {
|
|
6
|
+
create(customerID: string, params?: CustomerPortalCreateParams | null | undefined, options?: RequestOptions): APIPromise<CustomersAPI.CustomerPortalSession>;
|
|
7
|
+
}
|
|
8
|
+
export interface CustomerPortalCreateParams {
|
|
9
|
+
/**
|
|
10
|
+
* If true, will send link to user.
|
|
11
|
+
*/
|
|
12
|
+
send_email?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace CustomerPortal {
|
|
15
|
+
export { type CustomerPortalCreateParams as CustomerPortalCreateParams };
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=customer-portal.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer-portal.d.mts","sourceRoot":"","sources":["../../src/resources/customers/customer-portal.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,cAAe,SAAQ,WAAW;IAC7C,MAAM,CACJ,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,0BAA0B,GAAG,IAAI,GAAG,SAAc,EAC1D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC,qBAAqB,CAAC;CAOlD;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EAAE,KAAK,0BAA0B,IAAI,0BAA0B,EAAE,CAAC;CAC1E"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { APIResource } from "../../resource.js";
|
|
2
|
-
import * as Core from "../../core.js";
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
3
2
|
import * as CustomersAPI from "./customers.js";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
5
|
export declare class CustomerPortal extends APIResource {
|
|
5
|
-
create(
|
|
6
|
-
create(customerId: string, options?: Core.RequestOptions): Core.APIPromise<CustomersAPI.CustomerPortalSession>;
|
|
6
|
+
create(customerID: string, params?: CustomerPortalCreateParams | null | undefined, options?: RequestOptions): APIPromise<CustomersAPI.CustomerPortalSession>;
|
|
7
7
|
}
|
|
8
8
|
export interface CustomerPortalCreateParams {
|
|
9
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-portal.d.ts","sourceRoot":"","sources":["../../src/resources/customers/customer-portal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"customer-portal.d.ts","sourceRoot":"","sources":["../../src/resources/customers/customer-portal.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,cAAe,SAAQ,WAAW;IAC7C,MAAM,CACJ,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,0BAA0B,GAAG,IAAI,GAAG,SAAc,EAC1D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC,qBAAqB,CAAC;CAOlD;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EAAE,KAAK,0BAA0B,IAAI,0BAA0B,EAAE,CAAC;CAC1E"}
|
|
@@ -2,15 +2,12 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.CustomerPortal = void 0;
|
|
5
|
-
const resource_1 = require("../../resource.js");
|
|
6
|
-
const
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
7
|
class CustomerPortal extends resource_1.APIResource {
|
|
8
|
-
create(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
const { send_email } = params;
|
|
13
|
-
return this._client.post(`/customers/${customerId}/customer-portal/session`, {
|
|
8
|
+
create(customerID, params = {}, options) {
|
|
9
|
+
const { send_email } = params ?? {};
|
|
10
|
+
return this._client.post((0, path_1.path) `/customers/${customerID}/customer-portal/session`, {
|
|
14
11
|
query: { send_email },
|
|
15
12
|
...options,
|
|
16
13
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-portal.js","sourceRoot":"","sources":["../../src/resources/customers/customer-portal.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"customer-portal.js","sourceRoot":"","sources":["../../src/resources/customers/customer-portal.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAiD;AAEjD,MAAa,cAAe,SAAQ,sBAAW;IAC7C,MAAM,CACJ,UAAkB,EAClB,SAAwD,EAAE,EAC1D,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,cAAc,UAAU,0BAA0B,EAAE;YAC/E,KAAK,EAAE,EAAE,UAAU,EAAE;YACrB,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAZD,wCAYC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../resource.mjs";
|
|
3
|
-
import {
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
4
|
export class CustomerPortal extends APIResource {
|
|
5
|
-
create(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
const { send_email } = params;
|
|
10
|
-
return this._client.post(`/customers/${customerId}/customer-portal/session`, {
|
|
5
|
+
create(customerID, params = {}, options) {
|
|
6
|
+
const { send_email } = params ?? {};
|
|
7
|
+
return this._client.post(path `/customers/${customerID}/customer-portal/session`, {
|
|
11
8
|
query: { send_email },
|
|
12
9
|
...options,
|
|
13
10
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-portal.mjs","sourceRoot":"","sources":["../../src/resources/customers/customer-portal.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"customer-portal.mjs","sourceRoot":"","sources":["../../src/resources/customers/customer-portal.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C,MAAM,CACJ,UAAkB,EAClB,SAAwD,EAAE,EAC1D,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,cAAc,UAAU,0BAA0B,EAAE;YAC/E,KAAK,EAAE,EAAE,UAAU,EAAE;YACrB,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|