orb-billing 5.76.0 → 6.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 +23 -0
- package/README.md +118 -45
- package/api-promise.d.mts +3 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +3 -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 +3 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +474 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +474 -0
- package/client.d.ts.map +1 -0
- package/client.js +650 -0
- package/client.js.map +1 -0
- package/client.mjs +645 -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 +131 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +131 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +294 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +266 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +67 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +67 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +101 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +95 -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 +3 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -131
- package/error.d.ts.map +1 -1
- package/error.js +3 -291
- package/error.js.map +1 -1
- package/error.mjs +2 -265
- package/error.mjs.map +1 -1
- package/index.d.mts +7 -401
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -400
- package/index.d.ts.map +1 -1
- package/index.js +15 -286
- package/index.js.map +1 -1
- package/index.mjs +6 -259
- 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 +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +1 -0
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/formats.js +4 -2
- package/internal/qs/formats.js.map +1 -1
- package/internal/qs/formats.mjs +2 -1
- package/internal/qs/formats.mjs.map +1 -1
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.js +16 -19
- package/internal/qs/stringify.js.map +1 -1
- package/internal/qs/stringify.mjs +17 -19
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +1 -0
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.js +22 -21
- package/internal/qs/utils.js.map +1 -1
- package/internal/qs/utils.mjs +12 -12
- package/internal/qs/utils.mjs.map +1 -1
- 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 +26 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +26 -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 +87 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +81 -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/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.js +3 -26
- package/internal/utils/query.js.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- 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 +8 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +8 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +12 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +9 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +122 -65
- package/pagination.d.mts +3 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -30
- package/pagination.d.ts.map +1 -1
- package/pagination.js +3 -37
- package/pagination.js.map +1 -1
- package/pagination.mjs +2 -35
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +3 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +2 -6
- package/resource.mjs.map +1 -1
- package/resources/alerts.d.mts +430 -0
- package/resources/alerts.d.mts.map +1 -0
- package/resources/alerts.d.ts +14 -17
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js +37 -27
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs +36 -25
- package/resources/alerts.mjs.map +1 -1
- package/resources/beta/beta.d.mts +2826 -0
- package/resources/beta/beta.d.mts.map +1 -0
- package/resources/beta/beta.d.ts +13 -9
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +10 -30
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +8 -6
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/external-plan-id.d.mts +2713 -0
- package/resources/beta/external-plan-id.d.mts.map +1 -0
- package/resources/beta/external-plan-id.d.ts +10 -6
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/beta/external-plan-id.js +7 -5
- package/resources/beta/external-plan-id.js.map +1 -1
- package/resources/beta/external-plan-id.mjs +7 -5
- package/resources/beta/external-plan-id.mjs.map +1 -1
- package/resources/beta/index.d.mts +3 -0
- package/resources/beta/index.d.mts.map +1 -0
- package/resources/beta/index.d.ts +2 -2
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta.d.mts +2 -0
- package/resources/beta.d.mts.map +1 -0
- package/resources/beta.d.ts.map +1 -1
- package/resources/beta.js +2 -15
- package/resources/beta.js.map +1 -1
- package/resources/beta.mjs.map +1 -1
- package/resources/coupons/coupons.d.mts +148 -0
- package/resources/coupons/coupons.d.mts.map +1 -0
- package/resources/coupons/coupons.d.ts +10 -11
- package/resources/coupons/coupons.d.ts.map +1 -1
- package/resources/coupons/coupons.js +24 -38
- package/resources/coupons/coupons.js.map +1 -1
- package/resources/coupons/coupons.mjs +21 -12
- package/resources/coupons/coupons.mjs.map +1 -1
- package/resources/coupons/index.d.mts +3 -0
- package/resources/coupons/index.d.mts.map +1 -0
- package/resources/coupons/index.d.ts +1 -1
- package/resources/coupons/index.d.ts.map +1 -1
- package/resources/coupons/index.js +1 -2
- package/resources/coupons/index.js.map +1 -1
- package/resources/coupons/index.mjs +1 -1
- package/resources/coupons/index.mjs.map +1 -1
- package/resources/coupons/subscriptions.d.mts +34 -0
- package/resources/coupons/subscriptions.d.mts.map +1 -0
- package/resources/coupons/subscriptions.d.ts +5 -6
- package/resources/coupons/subscriptions.d.ts.map +1 -1
- package/resources/coupons/subscriptions.js +21 -12
- package/resources/coupons/subscriptions.js.map +1 -1
- package/resources/coupons/subscriptions.mjs +20 -11
- package/resources/coupons/subscriptions.mjs.map +1 -1
- package/resources/coupons.d.mts +2 -0
- package/resources/coupons.d.mts.map +1 -0
- package/resources/coupons.d.ts.map +1 -1
- package/resources/coupons.js +2 -15
- package/resources/coupons.js.map +1 -1
- package/resources/coupons.mjs.map +1 -1
- package/resources/credit-blocks.d.mts +275 -0
- package/resources/credit-blocks.d.mts.map +1 -0
- package/resources/credit-blocks.d.ts +6 -5
- package/resources/credit-blocks.d.ts.map +1 -1
- package/resources/credit-blocks.js +7 -5
- package/resources/credit-blocks.js.map +1 -1
- package/resources/credit-blocks.mjs +7 -5
- package/resources/credit-blocks.mjs.map +1 -1
- package/resources/credit-notes.d.mts +144 -0
- package/resources/credit-notes.d.mts.map +1 -0
- package/resources/credit-notes.d.ts +8 -8
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/credit-notes.js +19 -10
- package/resources/credit-notes.js.map +1 -1
- package/resources/credit-notes.mjs +18 -9
- package/resources/credit-notes.mjs.map +1 -1
- package/resources/customers/balance-transactions.d.mts +135 -0
- package/resources/customers/balance-transactions.d.mts.map +1 -0
- package/resources/customers/balance-transactions.d.ts +8 -9
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js +29 -13
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs +28 -11
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/costs.d.mts +314 -0
- package/resources/customers/costs.d.mts.map +1 -0
- package/resources/customers/costs.d.ts +5 -6
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/costs.js +243 -11
- package/resources/customers/costs.js.map +1 -1
- package/resources/customers/costs.mjs +243 -11
- package/resources/customers/costs.mjs.map +1 -1
- package/resources/customers/credits/credits.d.mts +287 -0
- package/resources/customers/credits/credits.d.mts.map +1 -0
- package/resources/customers/credits/credits.d.ts +11 -15
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js +38 -50
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs +36 -24
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/customers/credits/index.d.mts +4 -0
- package/resources/customers/credits/index.d.mts.map +1 -0
- package/resources/customers/credits/index.d.ts +3 -3
- package/resources/customers/credits/index.d.ts.map +1 -1
- package/resources/customers/credits/index.js +1 -7
- package/resources/customers/credits/index.js.map +1 -1
- package/resources/customers/credits/index.mjs +3 -3
- package/resources/customers/credits/index.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.mts +1202 -0
- package/resources/customers/credits/ledger.d.mts.map +1 -0
- package/resources/customers/credits/ledger.d.ts +11 -14
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js +172 -27
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs +171 -24
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/credits/top-ups.d.mts +357 -0
- package/resources/customers/credits/top-ups.d.mts.map +1 -0
- package/resources/customers/credits/top-ups.d.ts +19 -16
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js +24 -29
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs +23 -26
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/credits.d.mts +2 -0
- package/resources/customers/credits.d.mts.map +1 -0
- package/resources/customers/credits.d.ts.map +1 -1
- package/resources/customers/credits.js +2 -15
- package/resources/customers/credits.js.map +1 -1
- package/resources/customers/credits.mjs.map +1 -1
- package/resources/customers/customers.d.mts +1453 -0
- package/resources/customers/customers.d.mts.map +1 -0
- package/resources/customers/customers.d.ts +17 -18
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +30 -53
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +27 -27
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.mts +5 -0
- package/resources/customers/index.d.mts.map +1 -0
- package/resources/customers/index.d.ts +3 -3
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js +1 -5
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs +3 -3
- package/resources/customers/index.mjs.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/customers.mjs.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.mts +150 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.d.mts.map +1 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +11 -12
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.js +21 -39
- package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +18 -13
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts +53 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts.map +1 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +7 -6
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +6 -5
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +6 -5
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -1
- package/resources/dimensional-price-groups/index.d.mts +3 -0
- package/resources/dimensional-price-groups/index.d.mts.map +1 -0
- package/resources/dimensional-price-groups/index.d.ts +1 -1
- package/resources/dimensional-price-groups/index.d.ts.map +1 -1
- package/resources/dimensional-price-groups/index.js +1 -2
- package/resources/dimensional-price-groups/index.js.map +1 -1
- package/resources/dimensional-price-groups/index.mjs +1 -1
- package/resources/dimensional-price-groups/index.mjs.map +1 -1
- package/resources/dimensional-price-groups.d.mts +2 -0
- package/resources/dimensional-price-groups.d.mts.map +1 -0
- package/resources/dimensional-price-groups.d.ts.map +1 -1
- package/resources/dimensional-price-groups.js +2 -15
- package/resources/dimensional-price-groups.js.map +1 -1
- package/resources/dimensional-price-groups.mjs.map +1 -1
- package/resources/events/backfills.d.mts +389 -0
- package/resources/events/backfills.d.mts.map +1 -0
- package/resources/events/backfills.d.ts +11 -12
- package/resources/events/backfills.d.ts.map +1 -1
- package/resources/events/backfills.js +24 -15
- package/resources/events/backfills.js.map +1 -1
- package/resources/events/backfills.mjs +23 -13
- package/resources/events/backfills.mjs.map +1 -1
- package/resources/events/events.d.mts +536 -0
- package/resources/events/events.d.mts.map +1 -0
- package/resources/events/events.d.ts +10 -11
- package/resources/events/events.d.ts.map +1 -1
- package/resources/events/events.js +7 -29
- package/resources/events/events.js.map +1 -1
- package/resources/events/events.mjs +5 -5
- package/resources/events/events.mjs.map +1 -1
- package/resources/events/index.d.mts +4 -0
- package/resources/events/index.d.mts.map +1 -0
- package/resources/events/index.d.ts +1 -1
- package/resources/events/index.d.ts.map +1 -1
- package/resources/events/index.js +1 -2
- package/resources/events/index.js.map +1 -1
- package/resources/events/index.mjs +1 -1
- package/resources/events/index.mjs.map +1 -1
- package/resources/events/volume.d.mts +79 -0
- package/resources/events/volume.d.mts.map +1 -0
- package/resources/events/volume.d.ts +4 -3
- package/resources/events/volume.d.ts.map +1 -1
- package/resources/events/volume.js +1 -1
- package/resources/events/volume.js.map +1 -1
- package/resources/events/volume.mjs +1 -1
- package/resources/events/volume.mjs.map +1 -1
- package/resources/events.d.mts +2 -0
- package/resources/events.d.mts.map +1 -0
- package/resources/events.d.ts.map +1 -1
- package/resources/events.js +2 -15
- package/resources/events.js.map +1 -1
- package/resources/events.mjs.map +1 -1
- package/resources/index.d.mts +22 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +13 -13
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -33
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +12 -12
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.mts +245 -0
- package/resources/invoice-line-items.d.mts.map +1 -0
- package/resources/invoice-line-items.d.ts +4 -3
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoice-line-items.js +1 -1
- package/resources/invoice-line-items.js.map +1 -1
- package/resources/invoice-line-items.mjs +1 -1
- package/resources/invoice-line-items.mjs.map +1 -1
- package/resources/invoices.d.mts +1795 -0
- package/resources/invoices.d.mts.map +1 -0
- package/resources/invoices.d.ts +25 -27
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +105 -38
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +104 -36
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.mts +163 -0
- package/resources/items.d.mts.map +1 -0
- package/resources/items.d.ts +11 -12
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +20 -15
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +19 -13
- package/resources/items.mjs.map +1 -1
- package/resources/license-types.d.mts +112 -0
- package/resources/license-types.d.mts.map +1 -0
- package/resources/license-types.d.ts +9 -10
- package/resources/license-types.d.ts.map +1 -1
- package/resources/license-types.js +14 -13
- package/resources/license-types.js.map +1 -1
- package/resources/license-types.mjs +13 -11
- package/resources/license-types.mjs.map +1 -1
- package/resources/licenses/external-licenses.d.mts +127 -0
- package/resources/licenses/external-licenses.d.mts.map +1 -0
- package/resources/licenses/external-licenses.d.ts +4 -3
- package/resources/licenses/external-licenses.d.ts.map +1 -1
- package/resources/licenses/external-licenses.js +6 -2
- package/resources/licenses/external-licenses.js.map +1 -1
- package/resources/licenses/external-licenses.mjs +6 -2
- package/resources/licenses/external-licenses.mjs.map +1 -1
- package/resources/licenses/index.d.mts +4 -0
- package/resources/licenses/index.d.mts.map +1 -0
- package/resources/licenses/index.d.ts +1 -1
- package/resources/licenses/index.d.ts.map +1 -1
- package/resources/licenses/index.js +1 -2
- package/resources/licenses/index.js.map +1 -1
- package/resources/licenses/index.mjs +1 -1
- package/resources/licenses/index.mjs.map +1 -1
- package/resources/licenses/licenses.d.mts +177 -0
- package/resources/licenses/licenses.d.mts.map +1 -0
- package/resources/licenses/licenses.d.ts +12 -12
- package/resources/licenses/licenses.d.ts.map +1 -1
- package/resources/licenses/licenses.js +13 -38
- package/resources/licenses/licenses.js.map +1 -1
- package/resources/licenses/licenses.mjs +9 -11
- package/resources/licenses/licenses.mjs.map +1 -1
- package/resources/licenses/usage.d.mts +226 -0
- package/resources/licenses/usage.d.mts.map +1 -0
- package/resources/licenses/usage.d.ts +5 -5
- package/resources/licenses/usage.d.ts.map +1 -1
- package/resources/licenses/usage.js +15 -6
- package/resources/licenses/usage.js.map +1 -1
- package/resources/licenses/usage.mjs +15 -6
- package/resources/licenses/usage.mjs.map +1 -1
- package/resources/licenses.d.mts +2 -0
- package/resources/licenses.d.mts.map +1 -0
- package/resources/licenses.d.ts.map +1 -1
- package/resources/licenses.js +2 -15
- package/resources/licenses.js.map +1 -1
- package/resources/licenses.mjs.map +1 -1
- package/resources/metrics.d.mts +147 -0
- package/resources/metrics.d.mts.map +1 -0
- package/resources/metrics.d.ts +10 -11
- package/resources/metrics.d.ts.map +1 -1
- package/resources/metrics.js +19 -14
- package/resources/metrics.js.map +1 -1
- package/resources/metrics.mjs +18 -12
- package/resources/metrics.mjs.map +1 -1
- package/resources/plans/external-plan-id.d.mts +61 -0
- package/resources/plans/external-plan-id.d.mts.map +1 -0
- package/resources/plans/external-plan-id.d.ts +5 -4
- package/resources/plans/external-plan-id.d.ts.map +1 -1
- package/resources/plans/external-plan-id.js +4 -3
- package/resources/plans/external-plan-id.js.map +1 -1
- package/resources/plans/external-plan-id.mjs +4 -3
- package/resources/plans/external-plan-id.mjs.map +1 -1
- package/resources/plans/index.d.mts +4 -0
- package/resources/plans/index.d.mts.map +1 -0
- package/resources/plans/index.d.ts +2 -2
- package/resources/plans/index.d.ts.map +1 -1
- package/resources/plans/index.js +1 -3
- package/resources/plans/index.js.map +1 -1
- package/resources/plans/index.mjs +2 -2
- package/resources/plans/index.mjs.map +1 -1
- package/resources/plans/migrations.d.mts +99 -0
- package/resources/plans/migrations.d.mts.map +1 -0
- package/resources/plans/migrations.d.ts +15 -10
- package/resources/plans/migrations.d.ts.map +1 -1
- package/resources/plans/migrations.js +17 -16
- package/resources/plans/migrations.js.map +1 -1
- package/resources/plans/migrations.mjs +16 -14
- package/resources/plans/migrations.mjs.map +1 -1
- package/resources/plans/plans.d.mts +1682 -0
- package/resources/plans/plans.d.mts.map +1 -0
- package/resources/plans/plans.d.ts +13 -14
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js +18 -41
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs +15 -15
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/plans.d.mts +2 -0
- package/resources/plans.d.mts.map +1 -0
- package/resources/plans.d.ts.map +1 -1
- package/resources/plans.js +2 -15
- package/resources/plans.js.map +1 -1
- package/resources/plans.mjs.map +1 -1
- package/resources/prices/external-price-id.d.mts +55 -0
- package/resources/prices/external-price-id.d.mts.map +1 -0
- package/resources/prices/external-price-id.d.ts +7 -6
- package/resources/prices/external-price-id.d.ts.map +1 -1
- package/resources/prices/external-price-id.js +6 -5
- package/resources/prices/external-price-id.js.map +1 -1
- package/resources/prices/external-price-id.mjs +6 -5
- package/resources/prices/external-price-id.mjs.map +1 -1
- package/resources/prices/index.d.mts +3 -0
- package/resources/prices/index.d.mts.map +1 -0
- package/resources/prices/index.d.ts.map +1 -1
- package/resources/prices/index.mjs.map +1 -1
- package/resources/prices/prices.d.mts +5950 -0
- package/resources/prices/prices.d.mts.map +1 -0
- package/resources/prices/prices.d.ts +13 -13
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +23 -37
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +20 -12
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/prices.d.mts +2 -0
- package/resources/prices.d.mts.map +1 -0
- package/resources/prices.d.ts.map +1 -1
- package/resources/prices.js +2 -15
- package/resources/prices.js.map +1 -1
- package/resources/prices.mjs.map +1 -1
- package/resources/shared.d.mts +13354 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +4 -7
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js +0 -11
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs +1 -7
- package/resources/shared.mjs.map +1 -1
- package/resources/subscription-changes.d.mts +434 -0
- package/resources/subscription-changes.d.mts.map +1 -0
- package/resources/subscription-changes.d.ts +10 -12
- package/resources/subscription-changes.d.ts.map +1 -1
- package/resources/subscription-changes.js +18 -18
- package/resources/subscription-changes.js.map +1 -1
- package/resources/subscription-changes.mjs +17 -16
- package/resources/subscription-changes.mjs.map +1 -1
- package/resources/subscriptions.d.mts +10821 -0
- package/resources/subscriptions.d.mts.map +1 -0
- package/resources/subscriptions.d.ts +24 -29
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +284 -40
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +283 -37
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/top-level.d.mts +21 -0
- package/resources/top-level.d.mts.map +1 -0
- package/resources/top-level.d.ts +4 -3
- package/resources/top-level.d.ts.map +1 -1
- package/resources/top-level.js +1 -1
- package/resources/top-level.js.map +1 -1
- package/resources/top-level.mjs +1 -1
- package/resources/top-level.mjs.map +1 -1
- package/resources/webhooks.d.mts +24 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +2 -2
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +18 -5
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +16 -3
- package/resources/webhooks.mjs.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/resources.mjs.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +1499 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +456 -0
- package/src/core/pagination.ts +167 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -456
- package/src/index.ts +6 -923
- 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 +56 -0
- package/src/internal/qs/formats.ts +2 -1
- package/src/internal/qs/stringify.ts +17 -20
- package/src/internal/qs/utils.ts +14 -14
- 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 +93 -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 +128 -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 +9 -0
- package/src/pagination.ts +2 -70
- package/src/resource.ts +2 -11
- package/src/resources/alerts.ts +34 -62
- package/src/resources/beta/beta.ts +23 -13
- package/src/resources/beta/external-plan-id.ts +20 -12
- package/src/resources/beta/index.ts +2 -0
- package/src/resources/coupons/coupons.ts +16 -21
- package/src/resources/coupons/index.ts +7 -1
- package/src/resources/coupons/subscriptions.ts +13 -24
- package/src/resources/credit-blocks.ts +12 -12
- package/src/resources/credit-notes.ts +13 -20
- package/src/resources/customers/balance-transactions.ts +15 -28
- package/src/resources/customers/costs.ts +13 -33
- package/src/resources/customers/credits/credits.ts +26 -52
- package/src/resources/customers/credits/index.ts +8 -6
- package/src/resources/customers/credits/ledger.ts +29 -55
- package/src/resources/customers/credits/top-ups.ts +48 -61
- package/src/resources/customers/customers.ts +37 -48
- package/src/resources/customers/index.ts +4 -4
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +19 -30
- package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +12 -10
- package/src/resources/dimensional-price-groups/index.ts +1 -1
- package/src/resources/events/backfills.ts +18 -27
- package/src/resources/events/events.ts +14 -15
- package/src/resources/events/index.ts +1 -1
- package/src/resources/events/volume.ts +4 -3
- package/src/resources/index.ts +29 -28
- package/src/resources/invoice-line-items.ts +5 -4
- package/src/resources/invoices.ts +53 -95
- package/src/resources/items.ts +18 -24
- package/src/resources/license-types.ts +14 -31
- package/src/resources/licenses/external-licenses.ts +10 -5
- package/src/resources/licenses/index.ts +1 -1
- package/src/resources/licenses/licenses.ts +21 -20
- package/src/resources/licenses/usage.ts +9 -20
- package/src/resources/metrics.ts +16 -29
- package/src/resources/plans/external-plan-id.ts +9 -7
- package/src/resources/plans/index.ts +4 -2
- package/src/resources/plans/migrations.ts +30 -31
- package/src/resources/plans/plans.ts +22 -24
- package/src/resources/prices/external-price-id.ts +11 -9
- package/src/resources/prices/prices.ts +23 -31
- package/src/resources/shared.ts +4 -4
- package/src/resources/subscription-changes.ts +21 -44
- package/src/resources/subscriptions.ts +66 -106
- package/src/resources/top-level.ts +4 -3
- package/src/resources/webhooks.ts +17 -3
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +3 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +2 -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 -920
- package/core.js.map +0 -1
- package/core.mjs +0 -888
- 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 -1231
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../resource.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { Page } from "../core/pagination.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
5
|
export class Subscriptions extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* A subscription represents the purchase of a plan by a customer. The customer is
|
|
@@ -287,13 +287,34 @@ export class Subscriptions extends APIResource {
|
|
|
287
287
|
* ```
|
|
288
288
|
*/
|
|
289
289
|
update(subscriptionId, body, options) {
|
|
290
|
-
return this._client.put(`/subscriptions/${subscriptionId}`, { body, ...options });
|
|
290
|
+
return this._client.put(path `/subscriptions/${subscriptionId}`, { body, ...options });
|
|
291
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
* This endpoint returns a list of all subscriptions for an account as a
|
|
294
|
+
* [paginated](/api-reference/pagination) list, ordered starting from the most
|
|
295
|
+
* recently created subscription. For a full discussion of the subscription
|
|
296
|
+
* resource, see [Subscription](/core-concepts##subscription).
|
|
297
|
+
*
|
|
298
|
+
* Subscriptions can be filtered for a specific customer by using either the
|
|
299
|
+
* customer_id or external_customer_id query parameters. To filter subscriptions
|
|
300
|
+
* for multiple customers, use the customer_id[] or external_customer_id[] query
|
|
301
|
+
* parameters.
|
|
302
|
+
*
|
|
303
|
+
* Subscriptions can be filtered by status using the status query parameter (one of
|
|
304
|
+
* `active`, `ended`, or `upcoming`). To filter for multiple statuses in a single
|
|
305
|
+
* request, use the status[] query parameter, e.g.
|
|
306
|
+
* `status[]=active&status[]=ended`.
|
|
307
|
+
*
|
|
308
|
+
* @example
|
|
309
|
+
* ```ts
|
|
310
|
+
* // Automatically fetches more pages as needed.
|
|
311
|
+
* for await (const subscription of client.subscriptions.list()) {
|
|
312
|
+
* // ...
|
|
313
|
+
* }
|
|
314
|
+
* ```
|
|
315
|
+
*/
|
|
292
316
|
list(query = {}, options) {
|
|
293
|
-
|
|
294
|
-
return this.list({}, query);
|
|
295
|
-
}
|
|
296
|
-
return this._client.getAPIList('/subscriptions', SubscriptionsPage, { query, ...options });
|
|
317
|
+
return this._client.getAPIList('/subscriptions', (Page), { query, ...options });
|
|
297
318
|
}
|
|
298
319
|
/**
|
|
299
320
|
* This endpoint can be used to cancel an existing subscription. It returns the
|
|
@@ -367,7 +388,7 @@ export class Subscriptions extends APIResource {
|
|
|
367
388
|
* ```
|
|
368
389
|
*/
|
|
369
390
|
cancel(subscriptionId, body, options) {
|
|
370
|
-
return this._client.post(`/subscriptions/${subscriptionId}/cancel`, { body, ...options });
|
|
391
|
+
return this._client.post(path `/subscriptions/${subscriptionId}/cancel`, { body, ...options });
|
|
371
392
|
}
|
|
372
393
|
/**
|
|
373
394
|
* This endpoint is used to fetch a [Subscription](/core-concepts##subscription)
|
|
@@ -381,25 +402,253 @@ export class Subscriptions extends APIResource {
|
|
|
381
402
|
* ```
|
|
382
403
|
*/
|
|
383
404
|
fetch(subscriptionId, options) {
|
|
384
|
-
return this._client.get(`/subscriptions/${subscriptionId}`, options);
|
|
405
|
+
return this._client.get(path `/subscriptions/${subscriptionId}`, options);
|
|
385
406
|
}
|
|
407
|
+
/**
|
|
408
|
+
* This endpoint is used to fetch a day-by-day snapshot of a subscription's costs
|
|
409
|
+
* in Orb, calculated by applying pricing information to the underlying usage (see
|
|
410
|
+
* the [subscription usage endpoint](fetch-subscription-usage) to fetch usage per
|
|
411
|
+
* metric, in usage units rather than a currency).
|
|
412
|
+
*
|
|
413
|
+
* The semantics of this endpoint exactly mirror those of
|
|
414
|
+
* [fetching a customer's costs](/api-reference/customer/fetch-customer-costs). Use
|
|
415
|
+
* this endpoint to limit your analysis of costs to a specific subscription for the
|
|
416
|
+
* customer (e.g. to de-aggregate costs when a customer's subscription has started
|
|
417
|
+
* and stopped on the same day).
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* ```ts
|
|
421
|
+
* const response = await client.subscriptions.fetchCosts(
|
|
422
|
+
* 'subscription_id',
|
|
423
|
+
* );
|
|
424
|
+
* ```
|
|
425
|
+
*/
|
|
386
426
|
fetchCosts(subscriptionId, query = {}, options) {
|
|
387
|
-
|
|
388
|
-
return this.fetchCosts(subscriptionId, {}, query);
|
|
389
|
-
}
|
|
390
|
-
return this._client.get(`/subscriptions/${subscriptionId}/costs`, { query, ...options });
|
|
427
|
+
return this._client.get(path `/subscriptions/${subscriptionId}/costs`, { query, ...options });
|
|
391
428
|
}
|
|
429
|
+
/**
|
|
430
|
+
* This endpoint returns a [paginated](/api-reference/pagination) list of all plans
|
|
431
|
+
* associated with a subscription along with their start and end dates. This list
|
|
432
|
+
* contains the subscription's initial plan along with past and future plan
|
|
433
|
+
* changes.
|
|
434
|
+
*
|
|
435
|
+
* @example
|
|
436
|
+
* ```ts
|
|
437
|
+
* // Automatically fetches more pages as needed.
|
|
438
|
+
* for await (const subscriptionFetchScheduleResponse of client.subscriptions.fetchSchedule(
|
|
439
|
+
* 'subscription_id',
|
|
440
|
+
* )) {
|
|
441
|
+
* // ...
|
|
442
|
+
* }
|
|
443
|
+
* ```
|
|
444
|
+
*/
|
|
392
445
|
fetchSchedule(subscriptionId, query = {}, options) {
|
|
393
|
-
|
|
394
|
-
return this.fetchSchedule(subscriptionId, {}, query);
|
|
395
|
-
}
|
|
396
|
-
return this._client.getAPIList(`/subscriptions/${subscriptionId}/schedule`, SubscriptionFetchScheduleResponsesPage, { query, ...options });
|
|
446
|
+
return this._client.getAPIList(path `/subscriptions/${subscriptionId}/schedule`, (Page), { query, ...options });
|
|
397
447
|
}
|
|
448
|
+
/**
|
|
449
|
+
* This endpoint is used to fetch a subscription's usage in Orb. Especially when
|
|
450
|
+
* combined with optional query parameters, this endpoint is a powerful way to
|
|
451
|
+
* build visualizations on top of Orb's event data and metrics.
|
|
452
|
+
*
|
|
453
|
+
* With no query parameters specified, this endpoint returns usage for the
|
|
454
|
+
* subscription's _current billing period_ across each billable metric that
|
|
455
|
+
* participates in the subscription. Usage quantities returned are the result of
|
|
456
|
+
* evaluating the metric definition for the entirety of the customer's billing
|
|
457
|
+
* period.
|
|
458
|
+
*
|
|
459
|
+
* ### Default response shape
|
|
460
|
+
*
|
|
461
|
+
* Orb returns a `data` array with an object corresponding to each billable metric.
|
|
462
|
+
* Nested within this object is a `usage` array which has a `quantity` value and a
|
|
463
|
+
* corresponding `timeframe_start` and `timeframe_end`. The `quantity` value
|
|
464
|
+
* represents the calculated usage value for the billable metric over the specified
|
|
465
|
+
* timeframe (inclusive of the `timeframe_start` timestamp and exclusive of the
|
|
466
|
+
* `timeframe_end` timestamp).
|
|
467
|
+
*
|
|
468
|
+
* Orb will include _every_ window in the response starting from the beginning of
|
|
469
|
+
* the billing period, even when there were no events (and therefore no usage) in
|
|
470
|
+
* the window. This increases the size of the response but prevents the caller from
|
|
471
|
+
* filling in gaps and handling cumbersome time-based logic.
|
|
472
|
+
*
|
|
473
|
+
* The query parameters in this endpoint serve to override this behavior and
|
|
474
|
+
* provide some key functionality, as listed below. Note that this functionality
|
|
475
|
+
* can also be used _in conjunction_ with each other, e.g. to display grouped usage
|
|
476
|
+
* on a custom timeframe.
|
|
477
|
+
*
|
|
478
|
+
* ## Custom timeframe
|
|
479
|
+
*
|
|
480
|
+
* In order to view usage for a custom timeframe rather than the current billing
|
|
481
|
+
* period, specify a `timeframe_start` and `timeframe_end`. This will calculate
|
|
482
|
+
* quantities for usage incurred between timeframe_start (inclusive) and
|
|
483
|
+
* timeframe_end (exclusive), i.e. `[timeframe_start, timeframe_end)`.
|
|
484
|
+
*
|
|
485
|
+
* Note:
|
|
486
|
+
*
|
|
487
|
+
* - These timestamps must be specified in ISO 8601 format and UTC timezone, e.g.
|
|
488
|
+
* `2022-02-01T05:00:00Z`.
|
|
489
|
+
* - Both parameters must be specified if either is specified.
|
|
490
|
+
*
|
|
491
|
+
* ## Grouping by custom attributes
|
|
492
|
+
*
|
|
493
|
+
* In order to view a single metric grouped by a specific _attribute_ that each
|
|
494
|
+
* event is tagged with (e.g. `cluster`), you must additionally specify a
|
|
495
|
+
* `billable_metric_id` and a `group_by` key. The `group_by` key denotes the event
|
|
496
|
+
* property on which to group.
|
|
497
|
+
*
|
|
498
|
+
* When returning grouped usage, only usage for `billable_metric_id` is returned,
|
|
499
|
+
* and a separate object in the `data` array is returned for each value of the
|
|
500
|
+
* `group_by` key present in your events. The `quantity` value is the result of
|
|
501
|
+
* evaluating the billable metric for events filtered to a single value of the
|
|
502
|
+
* `group_by` key.
|
|
503
|
+
*
|
|
504
|
+
* Orb expects that events that match the billable metric will contain values in
|
|
505
|
+
* the `properties` dictionary that correspond to the `group_by` key specified. By
|
|
506
|
+
* default, Orb will not return a `null` group (i.e. events that match the metric
|
|
507
|
+
* but do not have the key set). Currently, it is only possible to view usage
|
|
508
|
+
* grouped by a single attribute at a time.
|
|
509
|
+
*
|
|
510
|
+
* When viewing grouped usage, Orb uses pagination to limit the response size to
|
|
511
|
+
* 1000 groups by default. If there are more groups for a given subscription,
|
|
512
|
+
* pagination metadata in the response can be used to fetch all of the data.
|
|
513
|
+
*
|
|
514
|
+
* The following example shows usage for an "API Requests" billable metric grouped
|
|
515
|
+
* by `region`. Note the extra `metric_group` dictionary in the response, which
|
|
516
|
+
* provides metadata about the group:
|
|
517
|
+
*
|
|
518
|
+
* ```json
|
|
519
|
+
* {
|
|
520
|
+
* "data": [
|
|
521
|
+
* {
|
|
522
|
+
* "usage": [
|
|
523
|
+
* {
|
|
524
|
+
* "quantity": 0.19291,
|
|
525
|
+
* "timeframe_start": "2021-10-01T07:00:00Z",
|
|
526
|
+
* "timeframe_end": "2021-10-02T07:00:00Z",
|
|
527
|
+
* },
|
|
528
|
+
* ...
|
|
529
|
+
* ],
|
|
530
|
+
* "metric_group": {
|
|
531
|
+
* "property_key": "region",
|
|
532
|
+
* "property_value": "asia/pacific"
|
|
533
|
+
* },
|
|
534
|
+
* "billable_metric": {
|
|
535
|
+
* "id": "Fe9pbpMk86xpwdGB",
|
|
536
|
+
* "name": "API Requests"
|
|
537
|
+
* },
|
|
538
|
+
* "view_mode": "periodic"
|
|
539
|
+
* },
|
|
540
|
+
* ...
|
|
541
|
+
* ]
|
|
542
|
+
* }
|
|
543
|
+
* ```
|
|
544
|
+
*
|
|
545
|
+
* ## Windowed usage
|
|
546
|
+
*
|
|
547
|
+
* The `granularity` parameter can be used to _window_ the usage `quantity` value
|
|
548
|
+
* into periods. When not specified, usage is returned for the entirety of the time
|
|
549
|
+
* range.
|
|
550
|
+
*
|
|
551
|
+
* When `granularity = day` is specified with a timeframe longer than a day, Orb
|
|
552
|
+
* will return a `quantity` value for each full day between `timeframe_start` and
|
|
553
|
+
* `timeframe_end`. Note that the days are demarcated by the _customer's local
|
|
554
|
+
* midnight_.
|
|
555
|
+
*
|
|
556
|
+
* For example, with `timeframe_start = 2022-02-01T05:00:00Z`,
|
|
557
|
+
* `timeframe_end = 2022-02-04T01:00:00Z` and `granularity=day`, the following
|
|
558
|
+
* windows will be returned for a customer in the `America/Los_Angeles` timezone
|
|
559
|
+
* since local midnight is `08:00` UTC:
|
|
560
|
+
*
|
|
561
|
+
* - `[2022-02-01T05:00:00Z, 2022-02-01T08:00:00Z)`
|
|
562
|
+
* - `[2022-02-01T08:00:00, 2022-02-02T08:00:00Z)`
|
|
563
|
+
* - `[2022-02-02T08:00:00, 2022-02-03T08:00:00Z)`
|
|
564
|
+
* - `[2022-02-03T08:00:00, 2022-02-04T01:00:00Z)`
|
|
565
|
+
*
|
|
566
|
+
* ```json
|
|
567
|
+
* {
|
|
568
|
+
* "data": [
|
|
569
|
+
* {
|
|
570
|
+
* "billable_metric": {
|
|
571
|
+
* "id": "Q8w89wjTtBdejXKsm",
|
|
572
|
+
* "name": "API Requests"
|
|
573
|
+
* },
|
|
574
|
+
* "usage": [
|
|
575
|
+
* {
|
|
576
|
+
* "quantity": 0,
|
|
577
|
+
* "timeframe_end": "2022-02-01T08:00:00+00:00",
|
|
578
|
+
* "timeframe_start": "2022-02-01T05:00:00+00:00"
|
|
579
|
+
* },
|
|
580
|
+
* {
|
|
581
|
+
*
|
|
582
|
+
* "quantity": 0,
|
|
583
|
+
* "timeframe_end": "2022-02-02T08:00:00+00:00",
|
|
584
|
+
* "timeframe_start": "2022-02-01T08:00:00+00:00"
|
|
585
|
+
* },
|
|
586
|
+
* {
|
|
587
|
+
* "quantity": 0,
|
|
588
|
+
* "timeframe_end": "2022-02-03T08:00:00+00:00",
|
|
589
|
+
* "timeframe_start": "2022-02-02T08:00:00+00:00"
|
|
590
|
+
* },
|
|
591
|
+
* {
|
|
592
|
+
* "quantity": 0,
|
|
593
|
+
* "timeframe_end": "2022-02-04T01:00:00+00:00",
|
|
594
|
+
* "timeframe_start": "2022-02-03T08:00:00+00:00"
|
|
595
|
+
* }
|
|
596
|
+
* ],
|
|
597
|
+
* "view_mode": "periodic"
|
|
598
|
+
* },
|
|
599
|
+
* ...
|
|
600
|
+
* ]
|
|
601
|
+
* }
|
|
602
|
+
* ```
|
|
603
|
+
*
|
|
604
|
+
* ## Decomposable vs. non-decomposable metrics
|
|
605
|
+
*
|
|
606
|
+
* Billable metrics fall into one of two categories: decomposable and
|
|
607
|
+
* non-decomposable. A decomposable billable metric, such as a sum or a count, can
|
|
608
|
+
* be displayed and aggregated across arbitrary timescales. On the other hand, a
|
|
609
|
+
* non-decomposable metric is not meaningful when only a slice of the billing
|
|
610
|
+
* window is considered.
|
|
611
|
+
*
|
|
612
|
+
* As an example, if we have a billable metric that's defined to count unique
|
|
613
|
+
* users, displaying a graph of unique users for each day is not representative of
|
|
614
|
+
* the billable metric value over the month (days could have an overlapping set of
|
|
615
|
+
* 'unique' users). Instead, what's useful for any given day is the number of
|
|
616
|
+
* unique users in the billing period so far, which are the _cumulative_ unique
|
|
617
|
+
* users.
|
|
618
|
+
*
|
|
619
|
+
* Accordingly, this endpoint returns treats these two types of metrics differently
|
|
620
|
+
* when `group_by` is specified:
|
|
621
|
+
*
|
|
622
|
+
* - Decomposable metrics can be grouped by any event property.
|
|
623
|
+
* - Non-decomposable metrics can only be grouped by the corresponding price's
|
|
624
|
+
* invoice grouping key. If no invoice grouping key is present, the metric does
|
|
625
|
+
* not support `group_by`.
|
|
626
|
+
*
|
|
627
|
+
* ## Matrix prices
|
|
628
|
+
*
|
|
629
|
+
* When a billable metric is attached to a price that uses matrix pricing, it's
|
|
630
|
+
* important to view usage grouped by those matrix dimensions. In this case, use
|
|
631
|
+
* the query parameters `first_dimension_key`, `first_dimension_value` and
|
|
632
|
+
* `second_dimension_key`, `second_dimension_value` while filtering to a specific
|
|
633
|
+
* `billable_metric_id`.
|
|
634
|
+
*
|
|
635
|
+
* For example, if your compute metric has a separate unit price (i.e. a matrix
|
|
636
|
+
* pricing model) per `region` and `provider`, your request might provide the
|
|
637
|
+
* following parameters:
|
|
638
|
+
*
|
|
639
|
+
* - `first_dimension_key`: `region`
|
|
640
|
+
* - `first_dimension_value`: `us-east-1`
|
|
641
|
+
* - `second_dimension_key`: `provider`
|
|
642
|
+
* - `second_dimension_value`: `aws`
|
|
643
|
+
*
|
|
644
|
+
* @example
|
|
645
|
+
* ```ts
|
|
646
|
+
* const subscriptionUsage =
|
|
647
|
+
* await client.subscriptions.fetchUsage('subscription_id');
|
|
648
|
+
* ```
|
|
649
|
+
*/
|
|
398
650
|
fetchUsage(subscriptionId, query = {}, options) {
|
|
399
|
-
|
|
400
|
-
return this.fetchUsage(subscriptionId, {}, query);
|
|
401
|
-
}
|
|
402
|
-
return this._client.get(`/subscriptions/${subscriptionId}/usage`, { query, ...options });
|
|
651
|
+
return this._client.get(path `/subscriptions/${subscriptionId}/usage`, { query, ...options });
|
|
403
652
|
}
|
|
404
653
|
/**
|
|
405
654
|
* This endpoint is used to add and edit subscription
|
|
@@ -484,7 +733,7 @@ export class Subscriptions extends APIResource {
|
|
|
484
733
|
* ```
|
|
485
734
|
*/
|
|
486
735
|
priceIntervals(subscriptionId, body, options) {
|
|
487
|
-
return this._client.post(`/subscriptions/${subscriptionId}/price_intervals`, { body, ...options });
|
|
736
|
+
return this._client.post(path `/subscriptions/${subscriptionId}/price_intervals`, { body, ...options });
|
|
488
737
|
}
|
|
489
738
|
/**
|
|
490
739
|
* Redeem a coupon effective at a given time.
|
|
@@ -499,7 +748,7 @@ export class Subscriptions extends APIResource {
|
|
|
499
748
|
* ```
|
|
500
749
|
*/
|
|
501
750
|
redeemCoupon(subscriptionId, body, options) {
|
|
502
|
-
return this._client.post(`/subscriptions/${subscriptionId}/redeem_coupon`, { body, ...options });
|
|
751
|
+
return this._client.post(path `/subscriptions/${subscriptionId}/redeem_coupon`, { body, ...options });
|
|
503
752
|
}
|
|
504
753
|
/**
|
|
505
754
|
* This endpoint can be used to change an existing subscription's plan. It returns
|
|
@@ -696,7 +945,10 @@ export class Subscriptions extends APIResource {
|
|
|
696
945
|
* ```
|
|
697
946
|
*/
|
|
698
947
|
schedulePlanChange(subscriptionId, body, options) {
|
|
699
|
-
return this._client.post(`/subscriptions/${subscriptionId}/schedule_plan_change`, {
|
|
948
|
+
return this._client.post(path `/subscriptions/${subscriptionId}/schedule_plan_change`, {
|
|
949
|
+
body,
|
|
950
|
+
...options,
|
|
951
|
+
});
|
|
700
952
|
}
|
|
701
953
|
/**
|
|
702
954
|
* Manually trigger a phase, effective the given date (or the current time, if not
|
|
@@ -711,7 +963,7 @@ export class Subscriptions extends APIResource {
|
|
|
711
963
|
* ```
|
|
712
964
|
*/
|
|
713
965
|
triggerPhase(subscriptionId, body, options) {
|
|
714
|
-
return this._client.post(`/subscriptions/${subscriptionId}/trigger_phase`, { body, ...options });
|
|
966
|
+
return this._client.post(path `/subscriptions/${subscriptionId}/trigger_phase`, { body, ...options });
|
|
715
967
|
}
|
|
716
968
|
/**
|
|
717
969
|
* This endpoint can be used to unschedule any pending cancellations for a
|
|
@@ -736,7 +988,7 @@ export class Subscriptions extends APIResource {
|
|
|
736
988
|
* ```
|
|
737
989
|
*/
|
|
738
990
|
unscheduleCancellation(subscriptionId, options) {
|
|
739
|
-
return this._client.post(`/subscriptions/${subscriptionId}/unschedule_cancellation`, options);
|
|
991
|
+
return this._client.post(path `/subscriptions/${subscriptionId}/unschedule_cancellation`, options);
|
|
740
992
|
}
|
|
741
993
|
/**
|
|
742
994
|
* This endpoint can be used to clear scheduled updates to the quantity for a fixed
|
|
@@ -755,7 +1007,7 @@ export class Subscriptions extends APIResource {
|
|
|
755
1007
|
* ```
|
|
756
1008
|
*/
|
|
757
1009
|
unscheduleFixedFeeQuantityUpdates(subscriptionId, body, options) {
|
|
758
|
-
return this._client.post(`/subscriptions/${subscriptionId}/unschedule_fixed_fee_quantity_updates`, {
|
|
1010
|
+
return this._client.post(path `/subscriptions/${subscriptionId}/unschedule_fixed_fee_quantity_updates`, {
|
|
759
1011
|
body,
|
|
760
1012
|
...options,
|
|
761
1013
|
});
|
|
@@ -773,7 +1025,7 @@ export class Subscriptions extends APIResource {
|
|
|
773
1025
|
* ```
|
|
774
1026
|
*/
|
|
775
1027
|
unschedulePendingPlanChanges(subscriptionId, options) {
|
|
776
|
-
return this._client.post(`/subscriptions/${subscriptionId}/unschedule_pending_plan_changes`, options);
|
|
1028
|
+
return this._client.post(path `/subscriptions/${subscriptionId}/unschedule_pending_plan_changes`, options);
|
|
777
1029
|
}
|
|
778
1030
|
/**
|
|
779
1031
|
* This endpoint can be used to update the quantity for a fixed fee.
|
|
@@ -801,7 +1053,7 @@ export class Subscriptions extends APIResource {
|
|
|
801
1053
|
* ```
|
|
802
1054
|
*/
|
|
803
1055
|
updateFixedFeeQuantity(subscriptionId, body, options) {
|
|
804
|
-
return this._client.post(`/subscriptions/${subscriptionId}/update_fixed_fee_quantity`, {
|
|
1056
|
+
return this._client.post(path `/subscriptions/${subscriptionId}/update_fixed_fee_quantity`, {
|
|
805
1057
|
body,
|
|
806
1058
|
...options,
|
|
807
1059
|
});
|
|
@@ -836,13 +1088,7 @@ export class Subscriptions extends APIResource {
|
|
|
836
1088
|
* ```
|
|
837
1089
|
*/
|
|
838
1090
|
updateTrial(subscriptionId, body, options) {
|
|
839
|
-
return this._client.post(`/subscriptions/${subscriptionId}/update_trial`, { body, ...options });
|
|
1091
|
+
return this._client.post(path `/subscriptions/${subscriptionId}/update_trial`, { body, ...options });
|
|
840
1092
|
}
|
|
841
1093
|
}
|
|
842
|
-
export class SubscriptionsPage extends Page {
|
|
843
|
-
}
|
|
844
|
-
export class SubscriptionFetchScheduleResponsesPage extends Page {
|
|
845
|
-
}
|
|
846
|
-
Subscriptions.SubscriptionsPage = SubscriptionsPage;
|
|
847
|
-
Subscriptions.SubscriptionFetchScheduleResponsesPage = SubscriptionFetchScheduleResponsesPage;
|
|
848
1094
|
//# sourceMappingURL=subscriptions.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.mjs","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"subscriptions.mjs","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"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promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class TopLevel extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* This endpoint allows you to test your connection to the Orb API and check the
|
|
7
|
+
* validity of your API key, passed in the Authorization header. This is
|
|
8
|
+
* particularly useful for checking that your environment is set up properly, and
|
|
9
|
+
* is a great choice for connectors and integrations.
|
|
10
|
+
*
|
|
11
|
+
* This API does not have any side-effects or return any Orb resources.
|
|
12
|
+
*/
|
|
13
|
+
ping(options?: RequestOptions): APIPromise<TopLevelPingResponse>;
|
|
14
|
+
}
|
|
15
|
+
export interface TopLevelPingResponse {
|
|
16
|
+
response: string;
|
|
17
|
+
}
|
|
18
|
+
export declare namespace TopLevel {
|
|
19
|
+
export { type TopLevelPingResponse as TopLevelPingResponse };
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=top-level.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"top-level.d.mts","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;OAOG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAGjE;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,oBAAoB,IAAI,oBAAoB,EAAE,CAAC;CAC9D"}
|
package/resources/top-level.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { APIResource } from "../resource.js";
|
|
2
|
-
import
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
3
4
|
export declare class TopLevel extends APIResource {
|
|
4
5
|
/**
|
|
5
6
|
* This endpoint allows you to test your connection to the Orb API and check the
|
|
@@ -9,7 +10,7 @@ export declare class TopLevel extends APIResource {
|
|
|
9
10
|
*
|
|
10
11
|
* This API does not have any side-effects or return any Orb resources.
|
|
11
12
|
*/
|
|
12
|
-
ping(options?:
|
|
13
|
+
ping(options?: RequestOptions): APIPromise<TopLevelPingResponse>;
|
|
13
14
|
}
|
|
14
15
|
export interface TopLevelPingResponse {
|
|
15
16
|
response: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-level.d.ts","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"top-level.d.ts","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;OAOG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAGjE;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,oBAAoB,IAAI,oBAAoB,EAAE,CAAC;CAC9D"}
|
package/resources/top-level.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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.TopLevel = void 0;
|
|
5
|
-
const resource_1 = require("../resource.js");
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
6
|
class TopLevel extends resource_1.APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* This endpoint allows you to test your connection to the Orb API and check the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-level.js","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"top-level.js","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;CACF;AAZD,4BAYC"}
|
package/resources/top-level.mjs
CHANGED
|
@@ -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 TopLevel extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* This endpoint allows you to test your connection to the Orb API and check the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-level.mjs","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"top-level.mjs","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type HeadersLike } from "../internal/headers.mjs";
|
|
2
|
+
import { APIResource } from "../resource.mjs";
|
|
3
|
+
export declare class Webhooks extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Validates that the given payload was sent by Orb and parses the payload.
|
|
6
|
+
*
|
|
7
|
+
* An error will be raised if the webhook payload was not sent by Orb.
|
|
8
|
+
*/
|
|
9
|
+
unwrap(payload: string, headers: HeadersLike, secret?: string | undefined | null): Object;
|
|
10
|
+
private parseSecret;
|
|
11
|
+
private signPayload;
|
|
12
|
+
/** Make an assertion, if not `true`, then throw. */
|
|
13
|
+
private assert;
|
|
14
|
+
/** Compare to array buffers or data views in a way that timing based attacks
|
|
15
|
+
* cannot gain information about the platform. */
|
|
16
|
+
private timingSafeEqual;
|
|
17
|
+
/**
|
|
18
|
+
* Validates whether or not the webhook payload was sent by Orb.
|
|
19
|
+
*
|
|
20
|
+
* An error will be raised if the webhook payload was not sent by Orb.
|
|
21
|
+
*/
|
|
22
|
+
verifySignature(body: string, headers: HeadersLike, secret?: string | undefined | null): void;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=webhooks.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks.d.mts","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,KAAK,WAAW,EAAE,gCAA4B;AACrE,OAAO,EAAE,WAAW,EAAE,wBAAoB;AAW1C,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;OAIG;IACH,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,WAAW,EACpB,MAAM,GAAE,MAAM,GAAG,SAAS,GAAG,IAAiC,GAC7D,MAAM;IAKT,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,WAAW;IAUnB,oDAAoD;IACpD,OAAO,CAAC,MAAM;IAMd;qDACiD;IACjD,OAAO,CAAC,eAAe;IAwBvB;;;;OAIG;IACH,eAAe,CACb,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,WAAW,EACpB,MAAM,GAAE,MAAM,GAAG,SAAS,GAAG,IAAiC,GAC7D,IAAI;CA0DR"}
|
package/resources/webhooks.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type HeadersLike } from "../internal/headers.js";
|
|
2
|
+
import { APIResource } from "../resource.js";
|
|
3
3
|
export declare class Webhooks extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* Validates that the given payload was sent by Orb and parses the payload.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,KAAK,WAAW,EAAE,+BAA4B;AACrE,OAAO,EAAE,WAAW,EAAE,uBAAoB;AAW1C,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;OAIG;IACH,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,WAAW,EACpB,MAAM,GAAE,MAAM,GAAG,SAAS,GAAG,IAAiC,GAC7D,MAAM;IAKT,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,WAAW;IAUnB,oDAAoD;IACpD,OAAO,CAAC,MAAM;IAMd;qDACiD;IACjD,OAAO,CAAC,eAAe;IAwBvB;;;;OAIG;IACH,eAAe,CACb,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,WAAW,EACpB,MAAM,GAAE,MAAM,GAAG,SAAS,GAAG,IAAiC,GAC7D,IAAI;CA0DR"}
|
package/resources/webhooks.js
CHANGED
|
@@ -2,9 +2,17 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Webhooks = void 0;
|
|
5
|
-
const
|
|
5
|
+
const utils_1 = require("../internal/utils.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
const resource_1 = require("../resource.js");
|
|
6
8
|
const node_crypto_1 = require("node:crypto");
|
|
7
|
-
|
|
9
|
+
function getRequiredHeader(headers, name) {
|
|
10
|
+
const value = (0, headers_1.buildHeaders)([headers]).values.get(name);
|
|
11
|
+
if (value === null || value === undefined) {
|
|
12
|
+
throw new Error(`Could not find ${name} header`);
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
8
16
|
class Webhooks extends resource_1.APIResource {
|
|
9
17
|
/**
|
|
10
18
|
* Validates that the given payload was sent by Orb and parses the payload.
|
|
@@ -67,8 +75,8 @@ class Webhooks extends resource_1.APIResource {
|
|
|
67
75
|
*/
|
|
68
76
|
verifySignature(body, headers, secret = this._client.webhookSecret) {
|
|
69
77
|
const whsecret = this.parseSecret(secret);
|
|
70
|
-
const msgTimestamp =
|
|
71
|
-
const msgSignature =
|
|
78
|
+
const msgTimestamp = getRequiredHeader(headers, 'X-Orb-Timestamp');
|
|
79
|
+
const msgSignature = getRequiredHeader(headers, 'X-Orb-Signature');
|
|
72
80
|
const nowSeconds = Math.floor(Date.now() / 1000);
|
|
73
81
|
// The timestamp header does not include a timezone (it is UTC by default)
|
|
74
82
|
const timezoneSuffix = msgTimestamp.includes('Z') || msgTimestamp.includes('+') ? '' : 'Z';
|
|
@@ -94,7 +102,12 @@ class Webhooks extends resource_1.APIResource {
|
|
|
94
102
|
const encoder = new globalThis.TextEncoder();
|
|
95
103
|
for (const versionedSignature of passedSignatures) {
|
|
96
104
|
const [version, signature] = versionedSignature.split('=');
|
|
97
|
-
(0,
|
|
105
|
+
(0, utils_1.loggerFor)(this._client).debug('verifySignature', {
|
|
106
|
+
version,
|
|
107
|
+
signature,
|
|
108
|
+
expectedSignature,
|
|
109
|
+
computedSignature,
|
|
110
|
+
});
|
|
98
111
|
if (version !== 'v1') {
|
|
99
112
|
continue;
|
|
100
113
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAErD,
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAErD,gDAA8C;AAC9C,oDAAqE;AACrE,6CAA0C;AAC1C,6CAAyC;AAEzC,SAAS,iBAAiB,CAAC,OAAoB,EAAE,IAAY;IAC3D,MAAM,KAAK,GAAG,IAAA,sBAAY,EAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACvD,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,kBAAkB,IAAI,SAAS,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;OAIG;IACH,MAAM,CACJ,OAAe,EACf,OAAoB,EACpB,SAAoC,IAAI,CAAC,OAAO,CAAC,aAAa;QAE9D,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAEO,WAAW,CAAC,MAAiC;QACnD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,6JAA6J,CAC9J,CAAC;QACJ,CAAC;QAED,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACzC,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,MAAM,EAAE,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