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
package/src/index.ts
CHANGED
|
@@ -1,661 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import * as Core from "./core.js";
|
|
5
|
-
import * as Errors from "./error.js";
|
|
6
|
-
import * as Pagination from "./pagination.js";
|
|
7
|
-
import {
|
|
8
|
-
type CursorPagePaginationParams,
|
|
9
|
-
CursorPagePaginationResponse,
|
|
10
|
-
type DefaultPageNumberPaginationParams,
|
|
11
|
-
DefaultPageNumberPaginationResponse,
|
|
12
|
-
} from "./pagination.js";
|
|
13
|
-
import * as Uploads from "./uploads.js";
|
|
14
|
-
import * as API from "./resources/index.js";
|
|
15
|
-
import {
|
|
16
|
-
AddonCreateParams,
|
|
17
|
-
AddonListParams,
|
|
18
|
-
AddonResponse,
|
|
19
|
-
AddonResponsesDefaultPageNumberPagination,
|
|
20
|
-
AddonUpdateImagesResponse,
|
|
21
|
-
AddonUpdateParams,
|
|
22
|
-
Addons,
|
|
23
|
-
} from "./resources/addons.js";
|
|
24
|
-
import {
|
|
25
|
-
Brand,
|
|
26
|
-
BrandCreateParams,
|
|
27
|
-
BrandListResponse,
|
|
28
|
-
BrandUpdateImagesResponse,
|
|
29
|
-
BrandUpdateParams,
|
|
30
|
-
Brands,
|
|
31
|
-
} from "./resources/brands.js";
|
|
32
|
-
import {
|
|
33
|
-
CheckoutSessionCreateParams,
|
|
34
|
-
CheckoutSessionRequest,
|
|
35
|
-
CheckoutSessionResponse,
|
|
36
|
-
CheckoutSessions,
|
|
37
|
-
} from "./resources/checkout-sessions.js";
|
|
38
|
-
import {
|
|
39
|
-
Discount,
|
|
40
|
-
DiscountCreateParams,
|
|
41
|
-
DiscountListParams,
|
|
42
|
-
DiscountType,
|
|
43
|
-
DiscountUpdateParams,
|
|
44
|
-
Discounts,
|
|
45
|
-
DiscountsDefaultPageNumberPagination,
|
|
46
|
-
} from "./resources/discounts.js";
|
|
47
|
-
import {
|
|
48
|
-
Dispute,
|
|
49
|
-
DisputeListParams,
|
|
50
|
-
DisputeListResponse,
|
|
51
|
-
DisputeListResponsesDefaultPageNumberPagination,
|
|
52
|
-
DisputeStage,
|
|
53
|
-
DisputeStatus,
|
|
54
|
-
Disputes,
|
|
55
|
-
GetDispute,
|
|
56
|
-
} from "./resources/disputes.js";
|
|
57
|
-
import {
|
|
58
|
-
LicenseKeyInstance,
|
|
59
|
-
LicenseKeyInstanceListParams,
|
|
60
|
-
LicenseKeyInstanceUpdateParams,
|
|
61
|
-
LicenseKeyInstances,
|
|
62
|
-
LicenseKeyInstancesDefaultPageNumberPagination,
|
|
63
|
-
} from "./resources/license-key-instances.js";
|
|
64
|
-
import {
|
|
65
|
-
LicenseKey,
|
|
66
|
-
LicenseKeyListParams,
|
|
67
|
-
LicenseKeyStatus,
|
|
68
|
-
LicenseKeyUpdateParams,
|
|
69
|
-
LicenseKeys,
|
|
70
|
-
LicenseKeysDefaultPageNumberPagination,
|
|
71
|
-
} from "./resources/license-keys.js";
|
|
72
|
-
import {
|
|
73
|
-
LicenseActivateParams,
|
|
74
|
-
LicenseActivateResponse,
|
|
75
|
-
LicenseDeactivateParams,
|
|
76
|
-
LicenseValidateParams,
|
|
77
|
-
LicenseValidateResponse,
|
|
78
|
-
Licenses,
|
|
79
|
-
} from "./resources/licenses.js";
|
|
80
|
-
import {
|
|
81
|
-
Meter,
|
|
82
|
-
MeterAggregation,
|
|
83
|
-
MeterCreateParams,
|
|
84
|
-
MeterFilter,
|
|
85
|
-
MeterListParams,
|
|
86
|
-
Meters,
|
|
87
|
-
MetersDefaultPageNumberPagination,
|
|
88
|
-
} from "./resources/meters.js";
|
|
89
|
-
import {
|
|
90
|
-
CountryCode,
|
|
91
|
-
Currency,
|
|
92
|
-
Misc,
|
|
93
|
-
MiscListSupportedCountriesResponse,
|
|
94
|
-
TaxCategory,
|
|
95
|
-
} from "./resources/misc.js";
|
|
96
|
-
import {
|
|
97
|
-
AttachExistingCustomer,
|
|
98
|
-
BillingAddress,
|
|
99
|
-
CreateNewCustomer,
|
|
100
|
-
CustomerLimitedDetails,
|
|
101
|
-
CustomerRequest,
|
|
102
|
-
IntentStatus,
|
|
103
|
-
NewCustomer,
|
|
104
|
-
OneTimeProductCartItem,
|
|
105
|
-
Payment,
|
|
106
|
-
PaymentCreateParams,
|
|
107
|
-
PaymentCreateResponse,
|
|
108
|
-
PaymentListParams,
|
|
109
|
-
PaymentListResponse,
|
|
110
|
-
PaymentListResponsesDefaultPageNumberPagination,
|
|
111
|
-
PaymentMethodTypes,
|
|
112
|
-
PaymentRetrieveLineItemsResponse,
|
|
113
|
-
Payments,
|
|
114
|
-
} from "./resources/payments.js";
|
|
115
|
-
import {
|
|
116
|
-
PayoutListParams,
|
|
117
|
-
PayoutListResponse,
|
|
118
|
-
PayoutListResponsesDefaultPageNumberPagination,
|
|
119
|
-
Payouts,
|
|
120
|
-
} from "./resources/payouts.js";
|
|
121
|
-
import {
|
|
122
|
-
Refund,
|
|
123
|
-
RefundCreateParams,
|
|
124
|
-
RefundListParams,
|
|
125
|
-
RefundListResponse,
|
|
126
|
-
RefundListResponsesDefaultPageNumberPagination,
|
|
127
|
-
RefundStatus,
|
|
128
|
-
Refunds,
|
|
129
|
-
} from "./resources/refunds.js";
|
|
130
|
-
import {
|
|
131
|
-
AddonCartResponseItem,
|
|
132
|
-
AttachAddon,
|
|
133
|
-
OnDemandSubscription,
|
|
134
|
-
Subscription,
|
|
135
|
-
SubscriptionChangePlanParams,
|
|
136
|
-
SubscriptionChargeParams,
|
|
137
|
-
SubscriptionChargeResponse,
|
|
138
|
-
SubscriptionCreateParams,
|
|
139
|
-
SubscriptionCreateResponse,
|
|
140
|
-
SubscriptionListParams,
|
|
141
|
-
SubscriptionListResponse,
|
|
142
|
-
SubscriptionListResponsesDefaultPageNumberPagination,
|
|
143
|
-
SubscriptionRetrieveUsageHistoryParams,
|
|
144
|
-
SubscriptionRetrieveUsageHistoryResponse,
|
|
145
|
-
SubscriptionRetrieveUsageHistoryResponsesDefaultPageNumberPagination,
|
|
146
|
-
SubscriptionStatus,
|
|
147
|
-
SubscriptionUpdateParams,
|
|
148
|
-
Subscriptions,
|
|
149
|
-
TimeInterval,
|
|
150
|
-
} from "./resources/subscriptions.js";
|
|
151
|
-
import {
|
|
152
|
-
Event,
|
|
153
|
-
EventInput,
|
|
154
|
-
EventsDefaultPageNumberPagination,
|
|
155
|
-
UsageEventIngestParams,
|
|
156
|
-
UsageEventIngestResponse,
|
|
157
|
-
UsageEventListParams,
|
|
158
|
-
UsageEvents,
|
|
159
|
-
} from "./resources/usage-events.js";
|
|
160
|
-
import { WebhookEventType, WebhookEvents, WebhookPayload } from "./resources/webhook-events.js";
|
|
161
|
-
import {
|
|
162
|
-
Customer,
|
|
163
|
-
CustomerCreateParams,
|
|
164
|
-
CustomerListParams,
|
|
165
|
-
CustomerPortalSession,
|
|
166
|
-
CustomerUpdateParams,
|
|
167
|
-
Customers,
|
|
168
|
-
CustomersDefaultPageNumberPagination,
|
|
169
|
-
} from "./resources/customers/customers.js";
|
|
170
|
-
import { Invoices } from "./resources/invoices/invoices.js";
|
|
171
|
-
import {
|
|
172
|
-
AddMeterToPrice,
|
|
173
|
-
LicenseKeyDuration,
|
|
174
|
-
Price,
|
|
175
|
-
Product,
|
|
176
|
-
ProductCreateParams,
|
|
177
|
-
ProductListParams,
|
|
178
|
-
ProductListResponse,
|
|
179
|
-
ProductListResponsesDefaultPageNumberPagination,
|
|
180
|
-
ProductUpdateFilesParams,
|
|
181
|
-
ProductUpdateFilesResponse,
|
|
182
|
-
ProductUpdateParams,
|
|
183
|
-
Products,
|
|
184
|
-
} from "./resources/products/products.js";
|
|
185
|
-
import {
|
|
186
|
-
WebhookCreateParams,
|
|
187
|
-
WebhookDetails,
|
|
188
|
-
WebhookDetailsCursorPagePagination,
|
|
189
|
-
WebhookListParams,
|
|
190
|
-
WebhookRetrieveSecretResponse,
|
|
191
|
-
WebhookUpdateParams,
|
|
192
|
-
Webhooks,
|
|
193
|
-
} from "./resources/webhooks/webhooks.js";
|
|
3
|
+
export { DodoPayments as default } from './client';
|
|
194
4
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
};
|
|
199
|
-
type Environment = keyof typeof environments;
|
|
200
|
-
|
|
201
|
-
export interface ClientOptions {
|
|
202
|
-
/**
|
|
203
|
-
* Bearer Token for API authentication
|
|
204
|
-
*/
|
|
205
|
-
bearerToken?: string | undefined;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Specifies the environment to use for the API.
|
|
209
|
-
*
|
|
210
|
-
* Each environment maps to a different base URL:
|
|
211
|
-
* - `live_mode` corresponds to `https://live.dodopayments.com`
|
|
212
|
-
* - `test_mode` corresponds to `https://test.dodopayments.com`
|
|
213
|
-
*/
|
|
214
|
-
environment?: Environment | undefined;
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
218
|
-
*
|
|
219
|
-
* Defaults to process.env['DODO_PAYMENTS_BASE_URL'].
|
|
220
|
-
*/
|
|
221
|
-
baseURL?: string | null | undefined;
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* The maximum amount of time (in milliseconds) that the client should wait for a response
|
|
225
|
-
* from the server before timing out a single request.
|
|
226
|
-
*
|
|
227
|
-
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
228
|
-
* much longer than this timeout before the promise succeeds or fails.
|
|
229
|
-
*
|
|
230
|
-
* @unit milliseconds
|
|
231
|
-
*/
|
|
232
|
-
timeout?: number | undefined;
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* An HTTP agent used to manage HTTP(S) connections.
|
|
236
|
-
*
|
|
237
|
-
* If not provided, an agent will be constructed by default in the Node.js environment,
|
|
238
|
-
* otherwise no agent is used.
|
|
239
|
-
*/
|
|
240
|
-
httpAgent?: Agent | undefined;
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Specify a custom `fetch` function implementation.
|
|
244
|
-
*
|
|
245
|
-
* If not provided, we use `node-fetch` on Node.js and otherwise expect that `fetch` is
|
|
246
|
-
* defined globally.
|
|
247
|
-
*/
|
|
248
|
-
fetch?: Core.Fetch | undefined;
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* The maximum number of times that the client will retry a request in case of a
|
|
252
|
-
* temporary failure, like a network error or a 5XX error from the server.
|
|
253
|
-
*
|
|
254
|
-
* @default 2
|
|
255
|
-
*/
|
|
256
|
-
maxRetries?: number | undefined;
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* Default headers to include with every request to the API.
|
|
260
|
-
*
|
|
261
|
-
* These can be removed in individual requests by explicitly setting the
|
|
262
|
-
* header to `undefined` or `null` in request options.
|
|
263
|
-
*/
|
|
264
|
-
defaultHeaders?: Core.Headers | undefined;
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Default query parameters to include with every request to the API.
|
|
268
|
-
*
|
|
269
|
-
* These can be removed in individual requests by explicitly setting the
|
|
270
|
-
* param to `undefined` in request options.
|
|
271
|
-
*/
|
|
272
|
-
defaultQuery?: Core.DefaultQuery | undefined;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* API Client for interfacing with the Dodo Payments API.
|
|
277
|
-
*/
|
|
278
|
-
export class DodoPayments extends Core.APIClient {
|
|
279
|
-
bearerToken: string;
|
|
280
|
-
|
|
281
|
-
private _options: ClientOptions;
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* API Client for interfacing with the Dodo Payments API.
|
|
285
|
-
*
|
|
286
|
-
* @param {string | undefined} [opts.bearerToken=process.env['DODO_PAYMENTS_API_KEY'] ?? undefined]
|
|
287
|
-
* @param {Environment} [opts.environment=live_mode] - Specifies the environment URL to use for the API.
|
|
288
|
-
* @param {string} [opts.baseURL=process.env['DODO_PAYMENTS_BASE_URL'] ?? https://live.dodopayments.com] - Override the default base URL for the API.
|
|
289
|
-
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
290
|
-
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
291
|
-
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
292
|
-
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
293
|
-
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
294
|
-
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
295
|
-
*/
|
|
296
|
-
constructor({
|
|
297
|
-
baseURL = Core.readEnv('DODO_PAYMENTS_BASE_URL'),
|
|
298
|
-
bearerToken = Core.readEnv('DODO_PAYMENTS_API_KEY'),
|
|
299
|
-
...opts
|
|
300
|
-
}: ClientOptions = {}) {
|
|
301
|
-
if (bearerToken === undefined) {
|
|
302
|
-
throw new Errors.DodoPaymentsError(
|
|
303
|
-
"The DODO_PAYMENTS_API_KEY environment variable is missing or empty; either provide it, or instantiate the DodoPayments client with an bearerToken option, like new DodoPayments({ bearerToken: 'My Bearer Token' }).",
|
|
304
|
-
);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
const options: ClientOptions = {
|
|
308
|
-
bearerToken,
|
|
309
|
-
...opts,
|
|
310
|
-
baseURL,
|
|
311
|
-
environment: opts.environment ?? 'live_mode',
|
|
312
|
-
};
|
|
313
|
-
|
|
314
|
-
if (baseURL && opts.environment) {
|
|
315
|
-
throw new Errors.DodoPaymentsError(
|
|
316
|
-
'Ambiguous URL; The `baseURL` option (or DODO_PAYMENTS_BASE_URL env var) and the `environment` option are given. If you want to use the environment you must pass baseURL: null',
|
|
317
|
-
);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
super({
|
|
321
|
-
baseURL: options.baseURL || environments[options.environment || 'live_mode'],
|
|
322
|
-
baseURLOverridden: baseURL ? baseURL !== environments[options.environment || 'live_mode'] : false,
|
|
323
|
-
timeout: options.timeout ?? 60000 /* 1 minute */,
|
|
324
|
-
httpAgent: options.httpAgent,
|
|
325
|
-
maxRetries: options.maxRetries,
|
|
326
|
-
fetch: options.fetch,
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
this._options = options;
|
|
330
|
-
|
|
331
|
-
this.bearerToken = bearerToken;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
checkoutSessions: API.CheckoutSessions = new API.CheckoutSessions(this);
|
|
335
|
-
payments: API.Payments = new API.Payments(this);
|
|
336
|
-
subscriptions: API.Subscriptions = new API.Subscriptions(this);
|
|
337
|
-
invoices: API.Invoices = new API.Invoices(this);
|
|
338
|
-
licenses: API.Licenses = new API.Licenses(this);
|
|
339
|
-
licenseKeys: API.LicenseKeys = new API.LicenseKeys(this);
|
|
340
|
-
licenseKeyInstances: API.LicenseKeyInstances = new API.LicenseKeyInstances(this);
|
|
341
|
-
customers: API.Customers = new API.Customers(this);
|
|
342
|
-
refunds: API.Refunds = new API.Refunds(this);
|
|
343
|
-
disputes: API.Disputes = new API.Disputes(this);
|
|
344
|
-
payouts: API.Payouts = new API.Payouts(this);
|
|
345
|
-
webhookEvents: API.WebhookEvents = new API.WebhookEvents(this);
|
|
346
|
-
products: API.Products = new API.Products(this);
|
|
347
|
-
misc: API.Misc = new API.Misc(this);
|
|
348
|
-
discounts: API.Discounts = new API.Discounts(this);
|
|
349
|
-
addons: API.Addons = new API.Addons(this);
|
|
350
|
-
brands: API.Brands = new API.Brands(this);
|
|
351
|
-
webhooks: API.Webhooks = new API.Webhooks(this);
|
|
352
|
-
usageEvents: API.UsageEvents = new API.UsageEvents(this);
|
|
353
|
-
meters: API.Meters = new API.Meters(this);
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* Check whether the base URL is set to its default.
|
|
357
|
-
*/
|
|
358
|
-
#baseURLOverridden(): boolean {
|
|
359
|
-
return this.baseURL !== environments[this._options.environment || 'live_mode'];
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
protected override defaultQuery(): Core.DefaultQuery | undefined {
|
|
363
|
-
return this._options.defaultQuery;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
protected override defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers {
|
|
367
|
-
return {
|
|
368
|
-
...super.defaultHeaders(opts),
|
|
369
|
-
...this._options.defaultHeaders,
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
protected override authHeaders(opts: Core.FinalRequestOptions): Core.Headers {
|
|
374
|
-
return { Authorization: `Bearer ${this.bearerToken}` };
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
static DodoPayments = this;
|
|
378
|
-
static DEFAULT_TIMEOUT = 60000; // 1 minute
|
|
379
|
-
|
|
380
|
-
static DodoPaymentsError = Errors.DodoPaymentsError;
|
|
381
|
-
static APIError = Errors.APIError;
|
|
382
|
-
static APIConnectionError = Errors.APIConnectionError;
|
|
383
|
-
static APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
384
|
-
static APIUserAbortError = Errors.APIUserAbortError;
|
|
385
|
-
static NotFoundError = Errors.NotFoundError;
|
|
386
|
-
static ConflictError = Errors.ConflictError;
|
|
387
|
-
static RateLimitError = Errors.RateLimitError;
|
|
388
|
-
static BadRequestError = Errors.BadRequestError;
|
|
389
|
-
static AuthenticationError = Errors.AuthenticationError;
|
|
390
|
-
static InternalServerError = Errors.InternalServerError;
|
|
391
|
-
static PermissionDeniedError = Errors.PermissionDeniedError;
|
|
392
|
-
static UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
393
|
-
|
|
394
|
-
static toFile = Uploads.toFile;
|
|
395
|
-
static fileFromPath = Uploads.fileFromPath;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
DodoPayments.CheckoutSessions = CheckoutSessions;
|
|
399
|
-
DodoPayments.Payments = Payments;
|
|
400
|
-
DodoPayments.PaymentListResponsesDefaultPageNumberPagination =
|
|
401
|
-
PaymentListResponsesDefaultPageNumberPagination;
|
|
402
|
-
DodoPayments.Subscriptions = Subscriptions;
|
|
403
|
-
DodoPayments.SubscriptionListResponsesDefaultPageNumberPagination =
|
|
404
|
-
SubscriptionListResponsesDefaultPageNumberPagination;
|
|
405
|
-
DodoPayments.SubscriptionRetrieveUsageHistoryResponsesDefaultPageNumberPagination =
|
|
406
|
-
SubscriptionRetrieveUsageHistoryResponsesDefaultPageNumberPagination;
|
|
407
|
-
DodoPayments.Invoices = Invoices;
|
|
408
|
-
DodoPayments.Licenses = Licenses;
|
|
409
|
-
DodoPayments.LicenseKeys = LicenseKeys;
|
|
410
|
-
DodoPayments.LicenseKeysDefaultPageNumberPagination = LicenseKeysDefaultPageNumberPagination;
|
|
411
|
-
DodoPayments.LicenseKeyInstances = LicenseKeyInstances;
|
|
412
|
-
DodoPayments.LicenseKeyInstancesDefaultPageNumberPagination = LicenseKeyInstancesDefaultPageNumberPagination;
|
|
413
|
-
DodoPayments.Customers = Customers;
|
|
414
|
-
DodoPayments.CustomersDefaultPageNumberPagination = CustomersDefaultPageNumberPagination;
|
|
415
|
-
DodoPayments.Refunds = Refunds;
|
|
416
|
-
DodoPayments.RefundListResponsesDefaultPageNumberPagination = RefundListResponsesDefaultPageNumberPagination;
|
|
417
|
-
DodoPayments.Disputes = Disputes;
|
|
418
|
-
DodoPayments.DisputeListResponsesDefaultPageNumberPagination =
|
|
419
|
-
DisputeListResponsesDefaultPageNumberPagination;
|
|
420
|
-
DodoPayments.Payouts = Payouts;
|
|
421
|
-
DodoPayments.PayoutListResponsesDefaultPageNumberPagination = PayoutListResponsesDefaultPageNumberPagination;
|
|
422
|
-
DodoPayments.WebhookEvents = WebhookEvents;
|
|
423
|
-
DodoPayments.Products = Products;
|
|
424
|
-
DodoPayments.ProductListResponsesDefaultPageNumberPagination =
|
|
425
|
-
ProductListResponsesDefaultPageNumberPagination;
|
|
426
|
-
DodoPayments.Misc = Misc;
|
|
427
|
-
DodoPayments.Discounts = Discounts;
|
|
428
|
-
DodoPayments.DiscountsDefaultPageNumberPagination = DiscountsDefaultPageNumberPagination;
|
|
429
|
-
DodoPayments.Addons = Addons;
|
|
430
|
-
DodoPayments.AddonResponsesDefaultPageNumberPagination = AddonResponsesDefaultPageNumberPagination;
|
|
431
|
-
DodoPayments.Brands = Brands;
|
|
432
|
-
DodoPayments.Webhooks = Webhooks;
|
|
433
|
-
DodoPayments.WebhookDetailsCursorPagePagination = WebhookDetailsCursorPagePagination;
|
|
434
|
-
DodoPayments.UsageEvents = UsageEvents;
|
|
435
|
-
DodoPayments.EventsDefaultPageNumberPagination = EventsDefaultPageNumberPagination;
|
|
436
|
-
DodoPayments.Meters = Meters;
|
|
437
|
-
DodoPayments.MetersDefaultPageNumberPagination = MetersDefaultPageNumberPagination;
|
|
438
|
-
|
|
439
|
-
export declare namespace DodoPayments {
|
|
440
|
-
export type RequestOptions = Core.RequestOptions;
|
|
441
|
-
|
|
442
|
-
export import DefaultPageNumberPagination = Pagination.DefaultPageNumberPagination;
|
|
443
|
-
export {
|
|
444
|
-
type DefaultPageNumberPaginationParams as DefaultPageNumberPaginationParams,
|
|
445
|
-
type DefaultPageNumberPaginationResponse as DefaultPageNumberPaginationResponse,
|
|
446
|
-
};
|
|
447
|
-
|
|
448
|
-
export import CursorPagePagination = Pagination.CursorPagePagination;
|
|
449
|
-
export {
|
|
450
|
-
type CursorPagePaginationParams as CursorPagePaginationParams,
|
|
451
|
-
type CursorPagePaginationResponse as CursorPagePaginationResponse,
|
|
452
|
-
};
|
|
453
|
-
|
|
454
|
-
export {
|
|
455
|
-
CheckoutSessions as CheckoutSessions,
|
|
456
|
-
type CheckoutSessionRequest as CheckoutSessionRequest,
|
|
457
|
-
type CheckoutSessionResponse as CheckoutSessionResponse,
|
|
458
|
-
type CheckoutSessionCreateParams as CheckoutSessionCreateParams,
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
export {
|
|
462
|
-
Payments as Payments,
|
|
463
|
-
type AttachExistingCustomer as AttachExistingCustomer,
|
|
464
|
-
type BillingAddress as BillingAddress,
|
|
465
|
-
type CreateNewCustomer as CreateNewCustomer,
|
|
466
|
-
type CustomerLimitedDetails as CustomerLimitedDetails,
|
|
467
|
-
type CustomerRequest as CustomerRequest,
|
|
468
|
-
type IntentStatus as IntentStatus,
|
|
469
|
-
type NewCustomer as NewCustomer,
|
|
470
|
-
type OneTimeProductCartItem as OneTimeProductCartItem,
|
|
471
|
-
type Payment as Payment,
|
|
472
|
-
type PaymentMethodTypes as PaymentMethodTypes,
|
|
473
|
-
type PaymentCreateResponse as PaymentCreateResponse,
|
|
474
|
-
type PaymentListResponse as PaymentListResponse,
|
|
475
|
-
type PaymentRetrieveLineItemsResponse as PaymentRetrieveLineItemsResponse,
|
|
476
|
-
PaymentListResponsesDefaultPageNumberPagination as PaymentListResponsesDefaultPageNumberPagination,
|
|
477
|
-
type PaymentCreateParams as PaymentCreateParams,
|
|
478
|
-
type PaymentListParams as PaymentListParams,
|
|
479
|
-
};
|
|
480
|
-
|
|
481
|
-
export {
|
|
482
|
-
Subscriptions as Subscriptions,
|
|
483
|
-
type AddonCartResponseItem as AddonCartResponseItem,
|
|
484
|
-
type AttachAddon as AttachAddon,
|
|
485
|
-
type OnDemandSubscription as OnDemandSubscription,
|
|
486
|
-
type Subscription as Subscription,
|
|
487
|
-
type SubscriptionStatus as SubscriptionStatus,
|
|
488
|
-
type TimeInterval as TimeInterval,
|
|
489
|
-
type SubscriptionCreateResponse as SubscriptionCreateResponse,
|
|
490
|
-
type SubscriptionListResponse as SubscriptionListResponse,
|
|
491
|
-
type SubscriptionChargeResponse as SubscriptionChargeResponse,
|
|
492
|
-
type SubscriptionRetrieveUsageHistoryResponse as SubscriptionRetrieveUsageHistoryResponse,
|
|
493
|
-
SubscriptionListResponsesDefaultPageNumberPagination as SubscriptionListResponsesDefaultPageNumberPagination,
|
|
494
|
-
SubscriptionRetrieveUsageHistoryResponsesDefaultPageNumberPagination as SubscriptionRetrieveUsageHistoryResponsesDefaultPageNumberPagination,
|
|
495
|
-
type SubscriptionCreateParams as SubscriptionCreateParams,
|
|
496
|
-
type SubscriptionUpdateParams as SubscriptionUpdateParams,
|
|
497
|
-
type SubscriptionListParams as SubscriptionListParams,
|
|
498
|
-
type SubscriptionChangePlanParams as SubscriptionChangePlanParams,
|
|
499
|
-
type SubscriptionChargeParams as SubscriptionChargeParams,
|
|
500
|
-
type SubscriptionRetrieveUsageHistoryParams as SubscriptionRetrieveUsageHistoryParams,
|
|
501
|
-
};
|
|
502
|
-
|
|
503
|
-
export { Invoices as Invoices };
|
|
504
|
-
|
|
505
|
-
export {
|
|
506
|
-
Licenses as Licenses,
|
|
507
|
-
type LicenseActivateResponse as LicenseActivateResponse,
|
|
508
|
-
type LicenseValidateResponse as LicenseValidateResponse,
|
|
509
|
-
type LicenseActivateParams as LicenseActivateParams,
|
|
510
|
-
type LicenseDeactivateParams as LicenseDeactivateParams,
|
|
511
|
-
type LicenseValidateParams as LicenseValidateParams,
|
|
512
|
-
};
|
|
513
|
-
|
|
514
|
-
export {
|
|
515
|
-
LicenseKeys as LicenseKeys,
|
|
516
|
-
type LicenseKey as LicenseKey,
|
|
517
|
-
type LicenseKeyStatus as LicenseKeyStatus,
|
|
518
|
-
LicenseKeysDefaultPageNumberPagination as LicenseKeysDefaultPageNumberPagination,
|
|
519
|
-
type LicenseKeyUpdateParams as LicenseKeyUpdateParams,
|
|
520
|
-
type LicenseKeyListParams as LicenseKeyListParams,
|
|
521
|
-
};
|
|
522
|
-
|
|
523
|
-
export {
|
|
524
|
-
LicenseKeyInstances as LicenseKeyInstances,
|
|
525
|
-
type LicenseKeyInstance as LicenseKeyInstance,
|
|
526
|
-
LicenseKeyInstancesDefaultPageNumberPagination as LicenseKeyInstancesDefaultPageNumberPagination,
|
|
527
|
-
type LicenseKeyInstanceUpdateParams as LicenseKeyInstanceUpdateParams,
|
|
528
|
-
type LicenseKeyInstanceListParams as LicenseKeyInstanceListParams,
|
|
529
|
-
};
|
|
530
|
-
|
|
531
|
-
export {
|
|
532
|
-
Customers as Customers,
|
|
533
|
-
type Customer as Customer,
|
|
534
|
-
type CustomerPortalSession as CustomerPortalSession,
|
|
535
|
-
CustomersDefaultPageNumberPagination as CustomersDefaultPageNumberPagination,
|
|
536
|
-
type CustomerCreateParams as CustomerCreateParams,
|
|
537
|
-
type CustomerUpdateParams as CustomerUpdateParams,
|
|
538
|
-
type CustomerListParams as CustomerListParams,
|
|
539
|
-
};
|
|
540
|
-
|
|
541
|
-
export {
|
|
542
|
-
Refunds as Refunds,
|
|
543
|
-
type Refund as Refund,
|
|
544
|
-
type RefundStatus as RefundStatus,
|
|
545
|
-
type RefundListResponse as RefundListResponse,
|
|
546
|
-
RefundListResponsesDefaultPageNumberPagination as RefundListResponsesDefaultPageNumberPagination,
|
|
547
|
-
type RefundCreateParams as RefundCreateParams,
|
|
548
|
-
type RefundListParams as RefundListParams,
|
|
549
|
-
};
|
|
550
|
-
|
|
551
|
-
export {
|
|
552
|
-
Disputes as Disputes,
|
|
553
|
-
type Dispute as Dispute,
|
|
554
|
-
type DisputeStage as DisputeStage,
|
|
555
|
-
type DisputeStatus as DisputeStatus,
|
|
556
|
-
type GetDispute as GetDispute,
|
|
557
|
-
type DisputeListResponse as DisputeListResponse,
|
|
558
|
-
DisputeListResponsesDefaultPageNumberPagination as DisputeListResponsesDefaultPageNumberPagination,
|
|
559
|
-
type DisputeListParams as DisputeListParams,
|
|
560
|
-
};
|
|
561
|
-
|
|
562
|
-
export {
|
|
563
|
-
Payouts as Payouts,
|
|
564
|
-
type PayoutListResponse as PayoutListResponse,
|
|
565
|
-
PayoutListResponsesDefaultPageNumberPagination as PayoutListResponsesDefaultPageNumberPagination,
|
|
566
|
-
type PayoutListParams as PayoutListParams,
|
|
567
|
-
};
|
|
568
|
-
|
|
569
|
-
export {
|
|
570
|
-
WebhookEvents as WebhookEvents,
|
|
571
|
-
type WebhookEventType as WebhookEventType,
|
|
572
|
-
type WebhookPayload as WebhookPayload,
|
|
573
|
-
};
|
|
574
|
-
|
|
575
|
-
export {
|
|
576
|
-
Products as Products,
|
|
577
|
-
type AddMeterToPrice as AddMeterToPrice,
|
|
578
|
-
type LicenseKeyDuration as LicenseKeyDuration,
|
|
579
|
-
type Price as Price,
|
|
580
|
-
type Product as Product,
|
|
581
|
-
type ProductListResponse as ProductListResponse,
|
|
582
|
-
type ProductUpdateFilesResponse as ProductUpdateFilesResponse,
|
|
583
|
-
ProductListResponsesDefaultPageNumberPagination as ProductListResponsesDefaultPageNumberPagination,
|
|
584
|
-
type ProductCreateParams as ProductCreateParams,
|
|
585
|
-
type ProductUpdateParams as ProductUpdateParams,
|
|
586
|
-
type ProductListParams as ProductListParams,
|
|
587
|
-
type ProductUpdateFilesParams as ProductUpdateFilesParams,
|
|
588
|
-
};
|
|
589
|
-
|
|
590
|
-
export {
|
|
591
|
-
Misc as Misc,
|
|
592
|
-
type CountryCode as CountryCode,
|
|
593
|
-
type Currency as Currency,
|
|
594
|
-
type TaxCategory as TaxCategory,
|
|
595
|
-
type MiscListSupportedCountriesResponse as MiscListSupportedCountriesResponse,
|
|
596
|
-
};
|
|
597
|
-
|
|
598
|
-
export {
|
|
599
|
-
Discounts as Discounts,
|
|
600
|
-
type Discount as Discount,
|
|
601
|
-
type DiscountType as DiscountType,
|
|
602
|
-
DiscountsDefaultPageNumberPagination as DiscountsDefaultPageNumberPagination,
|
|
603
|
-
type DiscountCreateParams as DiscountCreateParams,
|
|
604
|
-
type DiscountUpdateParams as DiscountUpdateParams,
|
|
605
|
-
type DiscountListParams as DiscountListParams,
|
|
606
|
-
};
|
|
607
|
-
|
|
608
|
-
export {
|
|
609
|
-
Addons as Addons,
|
|
610
|
-
type AddonResponse as AddonResponse,
|
|
611
|
-
type AddonUpdateImagesResponse as AddonUpdateImagesResponse,
|
|
612
|
-
AddonResponsesDefaultPageNumberPagination as AddonResponsesDefaultPageNumberPagination,
|
|
613
|
-
type AddonCreateParams as AddonCreateParams,
|
|
614
|
-
type AddonUpdateParams as AddonUpdateParams,
|
|
615
|
-
type AddonListParams as AddonListParams,
|
|
616
|
-
};
|
|
617
|
-
|
|
618
|
-
export {
|
|
619
|
-
Brands as Brands,
|
|
620
|
-
type Brand as Brand,
|
|
621
|
-
type BrandListResponse as BrandListResponse,
|
|
622
|
-
type BrandUpdateImagesResponse as BrandUpdateImagesResponse,
|
|
623
|
-
type BrandCreateParams as BrandCreateParams,
|
|
624
|
-
type BrandUpdateParams as BrandUpdateParams,
|
|
625
|
-
};
|
|
626
|
-
|
|
627
|
-
export {
|
|
628
|
-
Webhooks as Webhooks,
|
|
629
|
-
type WebhookDetails as WebhookDetails,
|
|
630
|
-
type WebhookRetrieveSecretResponse as WebhookRetrieveSecretResponse,
|
|
631
|
-
WebhookDetailsCursorPagePagination as WebhookDetailsCursorPagePagination,
|
|
632
|
-
type WebhookCreateParams as WebhookCreateParams,
|
|
633
|
-
type WebhookUpdateParams as WebhookUpdateParams,
|
|
634
|
-
type WebhookListParams as WebhookListParams,
|
|
635
|
-
};
|
|
636
|
-
|
|
637
|
-
export {
|
|
638
|
-
UsageEvents as UsageEvents,
|
|
639
|
-
type Event as Event,
|
|
640
|
-
type EventInput as EventInput,
|
|
641
|
-
type UsageEventIngestResponse as UsageEventIngestResponse,
|
|
642
|
-
EventsDefaultPageNumberPagination as EventsDefaultPageNumberPagination,
|
|
643
|
-
type UsageEventListParams as UsageEventListParams,
|
|
644
|
-
type UsageEventIngestParams as UsageEventIngestParams,
|
|
645
|
-
};
|
|
646
|
-
|
|
647
|
-
export {
|
|
648
|
-
Meters as Meters,
|
|
649
|
-
type Meter as Meter,
|
|
650
|
-
type MeterAggregation as MeterAggregation,
|
|
651
|
-
type MeterFilter as MeterFilter,
|
|
652
|
-
MetersDefaultPageNumberPagination as MetersDefaultPageNumberPagination,
|
|
653
|
-
type MeterCreateParams as MeterCreateParams,
|
|
654
|
-
type MeterListParams as MeterListParams,
|
|
655
|
-
};
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
export { toFile, fileFromPath } from "./uploads.js";
|
|
5
|
+
export { type Uploadable, toFile } from './core/uploads';
|
|
6
|
+
export { APIPromise } from './core/api-promise';
|
|
7
|
+
export { DodoPayments, type ClientOptions } from './client';
|
|
8
|
+
export { PagePromise } from './core/pagination';
|
|
659
9
|
export {
|
|
660
10
|
DodoPaymentsError,
|
|
661
11
|
APIError,
|
|
@@ -670,6 +20,4 @@ export {
|
|
|
670
20
|
InternalServerError,
|
|
671
21
|
PermissionDeniedError,
|
|
672
22
|
UnprocessableEntityError,
|
|
673
|
-
} from
|
|
674
|
-
|
|
675
|
-
export default DodoPayments;
|
|
23
|
+
} from './core/error';
|