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
package/resources/metrics.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
const resource_1 = require("../resource.js");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
exports.Metrics = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
8
|
/**
|
|
9
9
|
* The Metric resource represents a calculation of a quantity based on events.
|
|
10
10
|
* Metrics are defined by the query that transforms raw usage events into meaningful values for your customers.
|
|
@@ -41,13 +41,22 @@ class Metrics extends resource_1.APIResource {
|
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
43
|
update(metricId, body, options) {
|
|
44
|
-
return this._client.put(`/metrics/${metricId}`, { body, ...options });
|
|
44
|
+
return this._client.put((0, path_1.path) `/metrics/${metricId}`, { body, ...options });
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* This endpoint is used to list [metrics](/core-concepts#metric). It returns
|
|
48
|
+
* information about the metrics including its name, description, and item.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* // Automatically fetches more pages as needed.
|
|
53
|
+
* for await (const billableMetric of client.metrics.list()) {
|
|
54
|
+
* // ...
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
46
58
|
list(query = {}, options) {
|
|
47
|
-
|
|
48
|
-
return this.list({}, query);
|
|
49
|
-
}
|
|
50
|
-
return this._client.getAPIList('/metrics', BillableMetricsPage, { query, ...options });
|
|
59
|
+
return this._client.getAPIList('/metrics', (pagination_1.Page), { query, ...options });
|
|
51
60
|
}
|
|
52
61
|
/**
|
|
53
62
|
* This endpoint is used to fetch [metric](/core-concepts#metric) details given a
|
|
@@ -62,12 +71,8 @@ class Metrics extends resource_1.APIResource {
|
|
|
62
71
|
* ```
|
|
63
72
|
*/
|
|
64
73
|
fetch(metricId, options) {
|
|
65
|
-
return this._client.get(`/metrics/${metricId}`, options);
|
|
74
|
+
return this._client.get((0, path_1.path) `/metrics/${metricId}`, options);
|
|
66
75
|
}
|
|
67
76
|
}
|
|
68
77
|
exports.Metrics = Metrics;
|
|
69
|
-
class BillableMetricsPage extends pagination_1.Page {
|
|
70
|
-
}
|
|
71
|
-
exports.BillableMetricsPage = BillableMetricsPage;
|
|
72
|
-
Metrics.BillableMetricsPage = BillableMetricsPage;
|
|
73
78
|
//# sourceMappingURL=metrics.js.map
|
package/resources/metrics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../src/resources/metrics.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../src/resources/metrics.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAwE;AAExE,oDAA8C;AAE9C;;;GAGG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,QAAgB,EAAE,IAAwB,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAAA,iBAAoB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,QAAgB,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF;AAtED,0BAsEC"}
|
package/resources/metrics.mjs
CHANGED
|
@@ -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
|
/**
|
|
6
6
|
* The Metric resource represents a calculation of a quantity based on events.
|
|
7
7
|
* Metrics are defined by the query that transforms raw usage events into meaningful values for your customers.
|
|
@@ -38,13 +38,22 @@ export class Metrics extends APIResource {
|
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
40
|
update(metricId, body, options) {
|
|
41
|
-
return this._client.put(`/metrics/${metricId}`, { body, ...options });
|
|
41
|
+
return this._client.put(path `/metrics/${metricId}`, { body, ...options });
|
|
42
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* This endpoint is used to list [metrics](/core-concepts#metric). It returns
|
|
45
|
+
* information about the metrics including its name, description, and item.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* // Automatically fetches more pages as needed.
|
|
50
|
+
* for await (const billableMetric of client.metrics.list()) {
|
|
51
|
+
* // ...
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
43
55
|
list(query = {}, options) {
|
|
44
|
-
|
|
45
|
-
return this.list({}, query);
|
|
46
|
-
}
|
|
47
|
-
return this._client.getAPIList('/metrics', BillableMetricsPage, { query, ...options });
|
|
56
|
+
return this._client.getAPIList('/metrics', (Page), { query, ...options });
|
|
48
57
|
}
|
|
49
58
|
/**
|
|
50
59
|
* This endpoint is used to fetch [metric](/core-concepts#metric) details given a
|
|
@@ -59,10 +68,7 @@ export class Metrics extends APIResource {
|
|
|
59
68
|
* ```
|
|
60
69
|
*/
|
|
61
70
|
fetch(metricId, options) {
|
|
62
|
-
return this._client.get(`/metrics/${metricId}`, options);
|
|
71
|
+
return this._client.get(path `/metrics/${metricId}`, options);
|
|
63
72
|
}
|
|
64
73
|
}
|
|
65
|
-
export class BillableMetricsPage extends Page {
|
|
66
|
-
}
|
|
67
|
-
Metrics.BillableMetricsPage = BillableMetricsPage;
|
|
68
74
|
//# sourceMappingURL=metrics.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.mjs","sourceRoot":"","sources":["../src/resources/metrics.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"metrics.mjs","sourceRoot":"","sources":["../src/resources/metrics.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAgC,+BAA2B;AAExE,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;;GAGG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,QAAgB,EAAE,IAAwB,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAAA,IAAoB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,QAAgB,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as PlansAPI from "./plans.mjs";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
|
|
7
|
+
* customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
|
|
8
|
+
* in the [Price resource](/reference/price).
|
|
9
|
+
*/
|
|
10
|
+
export declare class ExternalPlanID extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* This endpoint can be used to update the `external_plan_id`, `description`, and
|
|
13
|
+
* `metadata` of an existing plan.
|
|
14
|
+
*
|
|
15
|
+
* Other fields on a plan are currently immutable.
|
|
16
|
+
*/
|
|
17
|
+
update(otherExternalPlanId: string, body: ExternalPlanIDUpdateParams, options?: RequestOptions): APIPromise<PlansAPI.Plan>;
|
|
18
|
+
/**
|
|
19
|
+
* This endpoint is used to fetch [plan](/core-concepts##plan-and-price) details
|
|
20
|
+
* given an external_plan_id identifier. It returns information about the prices
|
|
21
|
+
* included in the plan and their configuration, as well as the product that the
|
|
22
|
+
* plan is attached to.
|
|
23
|
+
*
|
|
24
|
+
* If multiple plans are found to contain the specified external_plan_id, the
|
|
25
|
+
* active plans will take priority over archived ones, and among those, the
|
|
26
|
+
* endpoint will return the most recently created plan.
|
|
27
|
+
*
|
|
28
|
+
* ## Serialized prices
|
|
29
|
+
*
|
|
30
|
+
* Orb supports a few different pricing models out of the box. Each of these models
|
|
31
|
+
* is serialized differently in a given [Price](/core-concepts#plan-and-price)
|
|
32
|
+
* object. The `model_type` field determines the key for the configuration object
|
|
33
|
+
* that is present. A detailed explanation of price types can be found in the
|
|
34
|
+
* [Price schema](/core-concepts#plan-and-price). "
|
|
35
|
+
*/
|
|
36
|
+
fetch(externalPlanId: string, options?: RequestOptions): APIPromise<PlansAPI.Plan>;
|
|
37
|
+
}
|
|
38
|
+
export interface ExternalPlanIDUpdateParams {
|
|
39
|
+
/**
|
|
40
|
+
* An optional user-defined description of the plan.
|
|
41
|
+
*/
|
|
42
|
+
description?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* An optional user-defined ID for this plan resource, used throughout the system
|
|
45
|
+
* as an alias for this Plan. Use this field to identify a plan by an existing
|
|
46
|
+
* identifier in your system.
|
|
47
|
+
*/
|
|
48
|
+
external_plan_id?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
51
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
52
|
+
* by setting `metadata` to `null`.
|
|
53
|
+
*/
|
|
54
|
+
metadata?: {
|
|
55
|
+
[key: string]: string | null;
|
|
56
|
+
} | null;
|
|
57
|
+
}
|
|
58
|
+
export declare namespace ExternalPlanID {
|
|
59
|
+
export { type ExternalPlanIDUpdateParams as ExternalPlanIDUpdateParams };
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=external-plan-id.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-plan-id.d.mts","sourceRoot":"","sources":["../../src/resources/plans/external-plan-id.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;;;;OAKG;IACH,MAAM,CACJ,mBAAmB,EAAE,MAAM,EAC3B,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;IAI5B;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;CAGnF;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;;;OAIG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EAAE,KAAK,0BAA0B,IAAI,0BAA0B,EAAE,CAAC;CAC1E"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { APIResource } from "../../resource.js";
|
|
2
|
-
import * as Core from "../../core.js";
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
3
2
|
import * as PlansAPI from "./plans.js";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
5
|
/**
|
|
5
6
|
* The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
|
|
6
7
|
* customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
|
|
@@ -13,7 +14,7 @@ export declare class ExternalPlanID extends APIResource {
|
|
|
13
14
|
*
|
|
14
15
|
* Other fields on a plan are currently immutable.
|
|
15
16
|
*/
|
|
16
|
-
update(otherExternalPlanId: string, body: ExternalPlanIDUpdateParams, options?:
|
|
17
|
+
update(otherExternalPlanId: string, body: ExternalPlanIDUpdateParams, options?: RequestOptions): APIPromise<PlansAPI.Plan>;
|
|
17
18
|
/**
|
|
18
19
|
* This endpoint is used to fetch [plan](/core-concepts##plan-and-price) details
|
|
19
20
|
* given an external_plan_id identifier. It returns information about the prices
|
|
@@ -32,7 +33,7 @@ export declare class ExternalPlanID extends APIResource {
|
|
|
32
33
|
* that is present. A detailed explanation of price types can be found in the
|
|
33
34
|
* [Price schema](/core-concepts#plan-and-price). "
|
|
34
35
|
*/
|
|
35
|
-
fetch(externalPlanId: string, options?:
|
|
36
|
+
fetch(externalPlanId: string, options?: RequestOptions): APIPromise<PlansAPI.Plan>;
|
|
36
37
|
}
|
|
37
38
|
export interface ExternalPlanIDUpdateParams {
|
|
38
39
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-plan-id.d.ts","sourceRoot":"","sources":["../../src/resources/plans/external-plan-id.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"external-plan-id.d.ts","sourceRoot":"","sources":["../../src/resources/plans/external-plan-id.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;;;;OAKG;IACH,MAAM,CACJ,mBAAmB,EAAE,MAAM,EAC3B,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;IAI5B;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;CAGnF;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;;;OAIG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EAAE,KAAK,0BAA0B,IAAI,0BAA0B,EAAE,CAAC;CAC1E"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.ExternalPlanID = void 0;
|
|
5
|
-
const resource_1 = require("../../resource.js");
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
6
7
|
/**
|
|
7
8
|
* The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
|
|
8
9
|
* customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
|
|
@@ -16,7 +17,7 @@ class ExternalPlanID extends resource_1.APIResource {
|
|
|
16
17
|
* Other fields on a plan are currently immutable.
|
|
17
18
|
*/
|
|
18
19
|
update(otherExternalPlanId, body, options) {
|
|
19
|
-
return this._client.put(`/plans/external_plan_id/${otherExternalPlanId}`, { body, ...options });
|
|
20
|
+
return this._client.put((0, path_1.path) `/plans/external_plan_id/${otherExternalPlanId}`, { body, ...options });
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* This endpoint is used to fetch [plan](/core-concepts##plan-and-price) details
|
|
@@ -37,7 +38,7 @@ class ExternalPlanID extends resource_1.APIResource {
|
|
|
37
38
|
* [Price schema](/core-concepts#plan-and-price). "
|
|
38
39
|
*/
|
|
39
40
|
fetch(externalPlanId, options) {
|
|
40
|
-
return this._client.get(`/plans/external_plan_id/${externalPlanId}`, options);
|
|
41
|
+
return this._client.get((0, path_1.path) `/plans/external_plan_id/${externalPlanId}`, options);
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
exports.ExternalPlanID = ExternalPlanID;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-plan-id.js","sourceRoot":"","sources":["../../src/resources/plans/external-plan-id.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"external-plan-id.js","sourceRoot":"","sources":["../../src/resources/plans/external-plan-id.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAiD;AAEjD;;;;GAIG;AACH,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;;;;OAKG;IACH,MAAM,CACJ,mBAA2B,EAC3B,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,2BAA2B,mBAAmB,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,cAAsB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,2BAA2B,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;CACF;AApCD,wCAoCC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../resource.mjs";
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
3
4
|
/**
|
|
4
5
|
* The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
|
|
5
6
|
* customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
|
|
@@ -13,7 +14,7 @@ export class ExternalPlanID extends APIResource {
|
|
|
13
14
|
* Other fields on a plan are currently immutable.
|
|
14
15
|
*/
|
|
15
16
|
update(otherExternalPlanId, body, options) {
|
|
16
|
-
return this._client.put(`/plans/external_plan_id/${otherExternalPlanId}`, { body, ...options });
|
|
17
|
+
return this._client.put(path `/plans/external_plan_id/${otherExternalPlanId}`, { body, ...options });
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* This endpoint is used to fetch [plan](/core-concepts##plan-and-price) details
|
|
@@ -34,7 +35,7 @@ export class ExternalPlanID extends APIResource {
|
|
|
34
35
|
* [Price schema](/core-concepts#plan-and-price). "
|
|
35
36
|
*/
|
|
36
37
|
fetch(externalPlanId, options) {
|
|
37
|
-
return this._client.get(`/plans/external_plan_id/${externalPlanId}`, options);
|
|
38
|
+
return this._client.get(path `/plans/external_plan_id/${externalPlanId}`, options);
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
//# sourceMappingURL=external-plan-id.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-plan-id.mjs","sourceRoot":"","sources":["../../src/resources/plans/external-plan-id.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"external-plan-id.mjs","sourceRoot":"","sources":["../../src/resources/plans/external-plan-id.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;GAIG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;;;;;OAKG;IACH,MAAM,CACJ,mBAA2B,EAC3B,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,2BAA2B,mBAAmB,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,cAAsB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,2BAA2B,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;CACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ExternalPlanID, type ExternalPlanIDUpdateParams } from "./external-plan-id.mjs";
|
|
2
|
+
export { Migrations, type MigrationRetrieveResponse, type MigrationListResponse, type MigrationCancelResponse, type MigrationRetrieveParams, type MigrationListParams, type MigrationCancelParams, type MigrationListResponsesPage, } from "./migrations.mjs";
|
|
3
|
+
export { Plans, type Plan, type PlanCreateParams, type PlanUpdateParams, type PlanListParams, type PlansPage, } from "./plans.mjs";
|
|
4
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/plans/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,KAAK,0BAA0B,EAAE,+BAA2B;AACrF,OAAO,EACL,UAAU,EACV,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,GAChC,yBAAqB;AACtB,OAAO,EACL,KAAK,EACL,KAAK,IAAI,EACT,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,SAAS,GACf,oBAAgB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ExternalPlanID, type ExternalPlanIDUpdateParams } from "./external-plan-id.js";
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
2
|
+
export { Migrations, type MigrationRetrieveResponse, type MigrationListResponse, type MigrationCancelResponse, type MigrationRetrieveParams, type MigrationListParams, type MigrationCancelParams, type MigrationListResponsesPage, } from "./migrations.js";
|
|
3
|
+
export { Plans, type Plan, type PlanCreateParams, type PlanUpdateParams, type PlanListParams, type PlansPage, } from "./plans.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/plans/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,KAAK,0BAA0B,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/plans/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,KAAK,0BAA0B,EAAE,8BAA2B;AACrF,OAAO,EACL,UAAU,EACV,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,GAChC,wBAAqB;AACtB,OAAO,EACL,KAAK,EACL,KAAK,IAAI,EACT,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,SAAS,GACf,mBAAgB"}
|
package/resources/plans/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Plans = exports.
|
|
4
|
+
exports.Plans = exports.Migrations = exports.ExternalPlanID = void 0;
|
|
5
5
|
var external_plan_id_1 = require("./external-plan-id.js");
|
|
6
6
|
Object.defineProperty(exports, "ExternalPlanID", { enumerable: true, get: function () { return external_plan_id_1.ExternalPlanID; } });
|
|
7
7
|
var migrations_1 = require("./migrations.js");
|
|
8
|
-
Object.defineProperty(exports, "MigrationListResponsesPage", { enumerable: true, get: function () { return migrations_1.MigrationListResponsesPage; } });
|
|
9
8
|
Object.defineProperty(exports, "Migrations", { enumerable: true, get: function () { return migrations_1.Migrations; } });
|
|
10
9
|
var plans_1 = require("./plans.js");
|
|
11
|
-
Object.defineProperty(exports, "PlansPage", { enumerable: true, get: function () { return plans_1.PlansPage; } });
|
|
12
10
|
Object.defineProperty(exports, "Plans", { enumerable: true, get: function () { return plans_1.Plans; } });
|
|
13
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/plans/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAAqF;AAA5E,kHAAA,cAAc,OAAA;AACvB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/plans/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAAqF;AAA5E,kHAAA,cAAc,OAAA;AACvB,8CASsB;AARpB,wGAAA,UAAU,OAAA;AASZ,oCAOiB;AANf,8FAAA,KAAK,OAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
export { ExternalPlanID } from "./external-plan-id.mjs";
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
3
|
+
export { Migrations, } from "./migrations.mjs";
|
|
4
|
+
export { Plans, } from "./plans.mjs";
|
|
5
5
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/plans/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/plans/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,cAAc,EAAmC,+BAA2B;AACrF,OAAO,EACL,UAAU,GAQX,yBAAqB;AACtB,OAAO,EACL,KAAK,GAMN,oBAAgB"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { Page, type PageParams, PagePromise } from "../../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
|
|
7
|
+
* customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
|
|
8
|
+
* in the [Price resource](/reference/price).
|
|
9
|
+
*/
|
|
10
|
+
export declare class Migrations extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Fetch migration
|
|
13
|
+
*/
|
|
14
|
+
retrieve(migrationId: string, params: MigrationRetrieveParams, options?: RequestOptions): APIPromise<MigrationRetrieveResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* This endpoint returns a list of all migrations for a plan. The list of
|
|
17
|
+
* migrations is ordered starting from the most recently created migration. The
|
|
18
|
+
* response also includes pagination_metadata, which lets the caller retrieve the
|
|
19
|
+
* next page of results if they exist.
|
|
20
|
+
*/
|
|
21
|
+
list(planId: string, query?: MigrationListParams | null | undefined, options?: RequestOptions): PagePromise<MigrationListResponsesPage, MigrationListResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* This endpoint cancels a migration.
|
|
24
|
+
*/
|
|
25
|
+
cancel(migrationId: string, params: MigrationCancelParams, options?: RequestOptions): APIPromise<MigrationCancelResponse>;
|
|
26
|
+
}
|
|
27
|
+
export type MigrationListResponsesPage = Page<MigrationListResponse>;
|
|
28
|
+
export interface MigrationRetrieveResponse {
|
|
29
|
+
/**
|
|
30
|
+
* Unique identifier for this plan version change.
|
|
31
|
+
*/
|
|
32
|
+
id: string;
|
|
33
|
+
/**
|
|
34
|
+
* When the migration takes effect. Can be a specific date/time, or 'end_of_term'
|
|
35
|
+
* when scheduled to be at the end of the current billing period.
|
|
36
|
+
*/
|
|
37
|
+
effective_time: (string & {}) | (string & {}) | 'end_of_term' | null;
|
|
38
|
+
/**
|
|
39
|
+
* The ID of the plan being migrated.
|
|
40
|
+
*/
|
|
41
|
+
plan_id: string;
|
|
42
|
+
/**
|
|
43
|
+
* Current status of the migration: 'not_started', 'in_progress', 'completed',
|
|
44
|
+
* 'action_needed', or 'canceled'.
|
|
45
|
+
*/
|
|
46
|
+
status: 'not_started' | 'in_progress' | 'completed' | 'action_needed' | 'canceled';
|
|
47
|
+
}
|
|
48
|
+
export interface MigrationListResponse {
|
|
49
|
+
/**
|
|
50
|
+
* Unique identifier for this plan version change.
|
|
51
|
+
*/
|
|
52
|
+
id: string;
|
|
53
|
+
/**
|
|
54
|
+
* When the migration takes effect. Can be a specific date/time, or 'end_of_term'
|
|
55
|
+
* when scheduled to be at the end of the current billing period.
|
|
56
|
+
*/
|
|
57
|
+
effective_time: (string & {}) | (string & {}) | 'end_of_term' | null;
|
|
58
|
+
/**
|
|
59
|
+
* The ID of the plan being migrated.
|
|
60
|
+
*/
|
|
61
|
+
plan_id: string;
|
|
62
|
+
/**
|
|
63
|
+
* Current status of the migration: 'not_started', 'in_progress', 'completed',
|
|
64
|
+
* 'action_needed', or 'canceled'.
|
|
65
|
+
*/
|
|
66
|
+
status: 'not_started' | 'in_progress' | 'completed' | 'action_needed' | 'canceled';
|
|
67
|
+
}
|
|
68
|
+
export interface MigrationCancelResponse {
|
|
69
|
+
/**
|
|
70
|
+
* Unique identifier for this plan version change.
|
|
71
|
+
*/
|
|
72
|
+
id: string;
|
|
73
|
+
/**
|
|
74
|
+
* When the migration takes effect. Can be a specific date/time, or 'end_of_term'
|
|
75
|
+
* when scheduled to be at the end of the current billing period.
|
|
76
|
+
*/
|
|
77
|
+
effective_time: (string & {}) | (string & {}) | 'end_of_term' | null;
|
|
78
|
+
/**
|
|
79
|
+
* The ID of the plan being migrated.
|
|
80
|
+
*/
|
|
81
|
+
plan_id: string;
|
|
82
|
+
/**
|
|
83
|
+
* Current status of the migration: 'not_started', 'in_progress', 'completed',
|
|
84
|
+
* 'action_needed', or 'canceled'.
|
|
85
|
+
*/
|
|
86
|
+
status: 'not_started' | 'in_progress' | 'completed' | 'action_needed' | 'canceled';
|
|
87
|
+
}
|
|
88
|
+
export interface MigrationRetrieveParams {
|
|
89
|
+
plan_id: string;
|
|
90
|
+
}
|
|
91
|
+
export interface MigrationListParams extends PageParams {
|
|
92
|
+
}
|
|
93
|
+
export interface MigrationCancelParams {
|
|
94
|
+
plan_id: string;
|
|
95
|
+
}
|
|
96
|
+
export declare namespace Migrations {
|
|
97
|
+
export { type MigrationRetrieveResponse as MigrationRetrieveResponse, type MigrationListResponse as MigrationListResponse, type MigrationCancelResponse as MigrationCancelResponse, type MigrationListResponsesPage as MigrationListResponsesPage, type MigrationRetrieveParams as MigrationRetrieveParams, type MigrationListParams as MigrationListParams, type MigrationCancelParams as MigrationCancelParams, };
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=migrations.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrations.d.mts","sourceRoot":"","sources":["../../src/resources/plans/migrations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE,kCAA8B;AAC3E,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;;;GAIG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,QAAQ,CACN,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,uBAAuB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,yBAAyB,CAAC;IAKxC;;;;;OAKG;IACH,IAAI,CACF,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,0BAA0B,EAAE,qBAAqB,CAAC;IAOjE;;OAEG;IACH,MAAM,CACJ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAIvC;AAED,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,qBAAqB,CAAC,CAAC;AAErE,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,cAAc,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,aAAa,GAAG,IAAI,CAAC;IAErE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,MAAM,EAAE,aAAa,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,GAAG,UAAU,CAAC;CACpF;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,cAAc,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,aAAa,GAAG,IAAI,CAAC;IAErE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,MAAM,EAAE,aAAa,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,GAAG,UAAU,CAAC;CACpF;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,cAAc,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,aAAa,GAAG,IAAI,CAAC;IAErE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,MAAM,EAAE,aAAa,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,GAAG,UAAU,CAAC;CACpF;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAoB,SAAQ,UAAU;CAAG;AAE1D,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { APIResource } from "../../resource.js";
|
|
2
|
-
import
|
|
3
|
-
import { Page, type PageParams } from "../../pagination.js";
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { Page, type PageParams, PagePromise } from "../../core/pagination.js";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
5
|
/**
|
|
5
6
|
* The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
|
|
6
7
|
* customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
|
|
@@ -10,22 +11,20 @@ export declare class Migrations extends APIResource {
|
|
|
10
11
|
/**
|
|
11
12
|
* Fetch migration
|
|
12
13
|
*/
|
|
13
|
-
retrieve(
|
|
14
|
+
retrieve(migrationId: string, params: MigrationRetrieveParams, options?: RequestOptions): APIPromise<MigrationRetrieveResponse>;
|
|
14
15
|
/**
|
|
15
16
|
* This endpoint returns a list of all migrations for a plan. The list of
|
|
16
17
|
* migrations is ordered starting from the most recently created migration. The
|
|
17
18
|
* response also includes pagination_metadata, which lets the caller retrieve the
|
|
18
19
|
* next page of results if they exist.
|
|
19
20
|
*/
|
|
20
|
-
list(planId: string, query?: MigrationListParams, options?:
|
|
21
|
-
list(planId: string, options?: Core.RequestOptions): Core.PagePromise<MigrationListResponsesPage, MigrationListResponse>;
|
|
21
|
+
list(planId: string, query?: MigrationListParams | null | undefined, options?: RequestOptions): PagePromise<MigrationListResponsesPage, MigrationListResponse>;
|
|
22
22
|
/**
|
|
23
23
|
* This endpoint cancels a migration.
|
|
24
24
|
*/
|
|
25
|
-
cancel(
|
|
26
|
-
}
|
|
27
|
-
export declare class MigrationListResponsesPage extends Page<MigrationListResponse> {
|
|
25
|
+
cancel(migrationId: string, params: MigrationCancelParams, options?: RequestOptions): APIPromise<MigrationCancelResponse>;
|
|
28
26
|
}
|
|
27
|
+
export type MigrationListResponsesPage = Page<MigrationListResponse>;
|
|
29
28
|
export interface MigrationRetrieveResponse {
|
|
30
29
|
/**
|
|
31
30
|
* Unique identifier for this plan version change.
|
|
@@ -86,9 +85,15 @@ export interface MigrationCancelResponse {
|
|
|
86
85
|
*/
|
|
87
86
|
status: 'not_started' | 'in_progress' | 'completed' | 'action_needed' | 'canceled';
|
|
88
87
|
}
|
|
88
|
+
export interface MigrationRetrieveParams {
|
|
89
|
+
plan_id: string;
|
|
90
|
+
}
|
|
89
91
|
export interface MigrationListParams extends PageParams {
|
|
90
92
|
}
|
|
93
|
+
export interface MigrationCancelParams {
|
|
94
|
+
plan_id: string;
|
|
95
|
+
}
|
|
91
96
|
export declare namespace Migrations {
|
|
92
|
-
export { type MigrationRetrieveResponse as MigrationRetrieveResponse, type MigrationListResponse as MigrationListResponse, type MigrationCancelResponse as MigrationCancelResponse, MigrationListResponsesPage as MigrationListResponsesPage, type MigrationListParams as MigrationListParams, };
|
|
97
|
+
export { type MigrationRetrieveResponse as MigrationRetrieveResponse, type MigrationListResponse as MigrationListResponse, type MigrationCancelResponse as MigrationCancelResponse, type MigrationListResponsesPage as MigrationListResponsesPage, type MigrationRetrieveParams as MigrationRetrieveParams, type MigrationListParams as MigrationListParams, type MigrationCancelParams as MigrationCancelParams, };
|
|
93
98
|
}
|
|
94
99
|
//# sourceMappingURL=migrations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/resources/plans/migrations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/resources/plans/migrations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,WAAW,EAAE,iCAA8B;AAC3E,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;;;GAIG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,QAAQ,CACN,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,uBAAuB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,yBAAyB,CAAC;IAKxC;;;;;OAKG;IACH,IAAI,CACF,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,0BAA0B,EAAE,qBAAqB,CAAC;IAOjE;;OAEG;IACH,MAAM,CACJ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAIvC;AAED,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,qBAAqB,CAAC,CAAC;AAErE,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,cAAc,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,aAAa,GAAG,IAAI,CAAC;IAErE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,MAAM,EAAE,aAAa,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,GAAG,UAAU,CAAC;CACpF;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,cAAc,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,aAAa,GAAG,IAAI,CAAC;IAErE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,MAAM,EAAE,aAAa,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,GAAG,UAAU,CAAC;CACpF;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,cAAc,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,aAAa,GAAG,IAAI,CAAC;IAErE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,MAAM,EAAE,aAAa,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,GAAG,UAAU,CAAC;CACpF;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAoB,SAAQ,UAAU;CAAG;AAE1D,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
const resource_1 = require("../../resource.js");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
exports.Migrations = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
8
8
|
/**
|
|
9
9
|
* The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
|
|
10
10
|
* customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
|
|
@@ -14,14 +14,18 @@ class Migrations extends resource_1.APIResource {
|
|
|
14
14
|
/**
|
|
15
15
|
* Fetch migration
|
|
16
16
|
*/
|
|
17
|
-
retrieve(
|
|
18
|
-
|
|
17
|
+
retrieve(migrationId, params, options) {
|
|
18
|
+
const { plan_id: planId } = params;
|
|
19
|
+
return this._client.get((0, path_1.path) `/plans/${planId}/migrations/${migrationId}`, options);
|
|
19
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* This endpoint returns a list of all migrations for a plan. The list of
|
|
23
|
+
* migrations is ordered starting from the most recently created migration. The
|
|
24
|
+
* response also includes pagination_metadata, which lets the caller retrieve the
|
|
25
|
+
* next page of results if they exist.
|
|
26
|
+
*/
|
|
20
27
|
list(planId, query = {}, options) {
|
|
21
|
-
|
|
22
|
-
return this.list(planId, {}, query);
|
|
23
|
-
}
|
|
24
|
-
return this._client.getAPIList(`/plans/${planId}/migrations`, MigrationListResponsesPage, {
|
|
28
|
+
return this._client.getAPIList((0, path_1.path) `/plans/${planId}/migrations`, (pagination_1.Page), {
|
|
25
29
|
query,
|
|
26
30
|
...options,
|
|
27
31
|
});
|
|
@@ -29,13 +33,10 @@ class Migrations extends resource_1.APIResource {
|
|
|
29
33
|
/**
|
|
30
34
|
* This endpoint cancels a migration.
|
|
31
35
|
*/
|
|
32
|
-
cancel(
|
|
33
|
-
|
|
36
|
+
cancel(migrationId, params, options) {
|
|
37
|
+
const { plan_id: planId } = params;
|
|
38
|
+
return this._client.post((0, path_1.path) `/plans/${planId}/migrations/${migrationId}/cancel`, options);
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
41
|
exports.Migrations = Migrations;
|
|
37
|
-
class MigrationListResponsesPage extends pagination_1.Page {
|
|
38
|
-
}
|
|
39
|
-
exports.MigrationListResponsesPage = MigrationListResponsesPage;
|
|
40
|
-
Migrations.MigrationListResponsesPage = MigrationListResponsesPage;
|
|
41
42
|
//# sourceMappingURL=migrations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../src/resources/plans/migrations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../src/resources/plans/migrations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAA2E;AAE3E,uDAAiD;AAEjD;;;;GAIG;AACH,MAAa,UAAW,SAAQ,sBAAW;IACzC;;OAEG;IACH,QAAQ,CACN,WAAmB,EACnB,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,MAAM,eAAe,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED;;;;;OAKG;IACH,IAAI,CACF,MAAc,EACd,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,UAAU,MAAM,aAAa,EAAE,CAAA,iBAA2B,CAAA,EAAE;YAC7F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,WAAmB,EACnB,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,UAAU,MAAM,eAAe,WAAW,SAAS,EAAE,OAAO,CAAC,CAAC;IAC7F,CAAC;CACF;AAzCD,gCAyCC"}
|