@metronome/sdk 0.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +113 -28
- package/README.md +123 -51
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/bin/cli +46 -0
- package/bin/migration-config.json +6 -0
- package/client.d.mts +232 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +232 -0
- package/client.d.ts.map +1 -0
- package/client.js +464 -0
- package/client.js.map +1 -0
- package/client.mjs +460 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +137 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +137 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +158 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +150 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +3 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +7 -144
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -143
- package/index.d.ts.map +1 -1
- package/index.js +14 -120
- package/index.js.map +1 -1
- package/index.mjs +6 -93
- 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 +26 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +26 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +120 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +112 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/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.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 +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +113 -64
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +1 -36
- package/pagination.d.ts.map +1 -1
- package/pagination.js +3 -40
- package/pagination.js.map +1 -1
- package/pagination.mjs +1 -38
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/index.d.mts +5 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -15
- package/resources/index.js.map +1 -1
- package/resources/shared.d.mts +2363 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +1470 -465
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.mts +207 -0
- package/resources/v1/alerts.d.mts.map +1 -0
- package/resources/v1/alerts.d.ts +107 -32
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/alerts.js +74 -3
- package/resources/v1/alerts.js.map +1 -1
- package/resources/v1/alerts.mjs +74 -3
- package/resources/v1/alerts.mjs.map +1 -1
- package/resources/v1/audit-logs.d.mts +108 -0
- package/resources/v1/audit-logs.d.mts.map +1 -0
- package/resources/v1/audit-logs.d.ts +45 -12
- package/resources/v1/audit-logs.d.ts.map +1 -1
- package/resources/v1/audit-logs.js +53 -12
- package/resources/v1/audit-logs.js.map +1 -1
- package/resources/v1/audit-logs.mjs +52 -10
- package/resources/v1/audit-logs.mjs.map +1 -1
- package/resources/v1/billable-metrics.d.mts +293 -0
- package/resources/v1/billable-metrics.d.mts.map +1 -0
- package/resources/v1/billable-metrics.d.ts +70 -15
- package/resources/v1/billable-metrics.d.ts.map +1 -1
- package/resources/v1/billable-metrics.js +70 -16
- package/resources/v1/billable-metrics.js.map +1 -1
- package/resources/v1/billable-metrics.mjs +69 -14
- package/resources/v1/billable-metrics.mjs.map +1 -1
- package/resources/v1/contracts/contracts.d.mts +3006 -0
- package/resources/v1/contracts/contracts.d.mts.map +1 -0
- package/resources/v1/contracts/contracts.d.ts +428 -1299
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js +269 -50
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs +267 -26
- package/resources/v1/contracts/contracts.mjs.map +1 -1
- package/resources/v1/contracts/index.d.mts +5 -0
- package/resources/v1/contracts/index.d.mts.map +1 -0
- package/resources/v1/contracts/index.d.ts +3 -3
- package/resources/v1/contracts/index.d.ts.map +1 -1
- package/resources/v1/contracts/index.js +1 -3
- package/resources/v1/contracts/index.js.map +1 -1
- package/resources/v1/contracts/index.mjs +2 -2
- package/resources/v1/contracts/index.mjs.map +1 -1
- package/resources/v1/contracts/named-schedules.d.mts +82 -0
- package/resources/v1/contracts/named-schedules.d.mts.map +1 -0
- package/resources/v1/contracts/named-schedules.d.ts +5 -4
- package/resources/v1/contracts/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/named-schedules.js +3 -2
- package/resources/v1/contracts/named-schedules.js.map +1 -1
- package/resources/v1/contracts/named-schedules.mjs +3 -2
- package/resources/v1/contracts/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/products.d.mts +502 -0
- package/resources/v1/contracts/products.d.mts.map +1 -0
- package/resources/v1/contracts/products.d.ts +44 -17
- package/resources/v1/contracts/products.d.ts.map +1 -1
- package/resources/v1/contracts/products.js +41 -17
- package/resources/v1/contracts/products.js.map +1 -1
- package/resources/v1/contracts/products.mjs +40 -15
- package/resources/v1/contracts/products.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/index.d.mts +5 -0
- package/resources/v1/contracts/rate-cards/index.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/index.d.ts +2 -2
- package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/index.js +1 -3
- package/resources/v1/contracts/rate-cards/index.js.map +1 -1
- package/resources/v1/contracts/rate-cards/index.mjs +2 -2
- package/resources/v1/contracts/rate-cards/index.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.d.mts +94 -0
- package/resources/v1/contracts/rate-cards/named-schedules.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts +5 -4
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.js +3 -2
- package/resources/v1/contracts/rate-cards/named-schedules.js.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.mjs +3 -2
- package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.d.mts +85 -0
- package/resources/v1/contracts/rate-cards/product-orders.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/product-orders.d.ts +12 -6
- package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.js +8 -3
- package/resources/v1/contracts/rate-cards/product-orders.js.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.mjs +8 -3
- package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.mts +452 -0
- package/resources/v1/contracts/rate-cards/rate-cards.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts +134 -41
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.js +127 -47
- package/resources/v1/contracts/rate-cards/rate-cards.js.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.mjs +123 -20
- package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.mts +382 -0
- package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/rates.d.ts +25 -82
- package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.js +13 -9
- package/resources/v1/contracts/rate-cards/rates.js.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.mjs +12 -7
- package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards.d.mts +2 -0
- package/resources/v1/contracts/rate-cards.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards.js +2 -15
- package/resources/v1/contracts/rate-cards.js.map +1 -1
- package/resources/v1/contracts.d.mts +2 -0
- package/resources/v1/contracts.d.mts.map +1 -0
- package/resources/v1/contracts.d.ts.map +1 -1
- package/resources/v1/contracts.js +2 -15
- package/resources/v1/contracts.js.map +1 -1
- package/resources/v1/credit-grants.d.mts +505 -0
- package/resources/v1/credit-grants.d.mts.map +1 -0
- package/resources/v1/credit-grants.d.ts +73 -74
- package/resources/v1/credit-grants.d.ts.map +1 -1
- package/resources/v1/credit-grants.js +52 -18
- package/resources/v1/credit-grants.js.map +1 -1
- package/resources/v1/credit-grants.mjs +51 -16
- package/resources/v1/credit-grants.mjs.map +1 -1
- package/resources/v1/custom-fields.d.mts +151 -0
- package/resources/v1/custom-fields.d.mts.map +1 -0
- package/resources/v1/custom-fields.d.ts +69 -38
- package/resources/v1/custom-fields.d.ts.map +1 -1
- package/resources/v1/custom-fields.js +66 -22
- package/resources/v1/custom-fields.js.map +1 -1
- package/resources/v1/custom-fields.mjs +66 -22
- package/resources/v1/custom-fields.mjs.map +1 -1
- package/resources/v1/customers/alerts.d.mts +309 -0
- package/resources/v1/customers/alerts.d.mts.map +1 -0
- package/resources/v1/customers/alerts.d.ts +176 -50
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/alerts.js +131 -10
- package/resources/v1/customers/alerts.js.map +1 -1
- package/resources/v1/customers/alerts.mjs +131 -10
- package/resources/v1/customers/alerts.mjs.map +1 -1
- package/resources/v1/customers/billing-config.d.mts +125 -0
- package/resources/v1/customers/billing-config.d.mts.map +1 -0
- package/resources/v1/customers/billing-config.d.ts +8 -7
- package/resources/v1/customers/billing-config.d.ts.map +1 -1
- package/resources/v1/customers/billing-config.js +8 -6
- package/resources/v1/customers/billing-config.js.map +1 -1
- package/resources/v1/customers/billing-config.mjs +8 -6
- package/resources/v1/customers/billing-config.mjs.map +1 -1
- package/resources/v1/customers/commits.d.mts +456 -0
- package/resources/v1/customers/commits.d.mts.map +1 -0
- package/resources/v1/customers/commits.d.ts +139 -47
- package/resources/v1/customers/commits.d.ts.map +1 -1
- package/resources/v1/customers/commits.js +131 -12
- package/resources/v1/customers/commits.js.map +1 -1
- package/resources/v1/customers/commits.mjs +131 -12
- package/resources/v1/customers/commits.mjs.map +1 -1
- package/resources/v1/customers/credits.d.mts +310 -0
- package/resources/v1/customers/credits.d.mts.map +1 -0
- package/resources/v1/customers/credits.d.ts +124 -46
- package/resources/v1/customers/credits.d.ts.map +1 -1
- package/resources/v1/customers/credits.js +116 -11
- package/resources/v1/customers/credits.js.map +1 -1
- package/resources/v1/customers/credits.mjs +116 -11
- package/resources/v1/customers/credits.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +819 -0
- package/resources/v1/customers/customers.d.mts.map +1 -0
- package/resources/v1/customers/customers.d.ts +319 -55
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +220 -76
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +213 -44
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +9 -0
- package/resources/v1/customers/index.d.mts.map +1 -0
- package/resources/v1/customers/index.d.ts +6 -6
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js +1 -8
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs +3 -3
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/invoices.d.mts +825 -0
- package/resources/v1/customers/invoices.d.mts.map +1 -0
- package/resources/v1/customers/invoices.d.ts +309 -25
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/customers/invoices.js +180 -22
- package/resources/v1/customers/invoices.js.map +1 -1
- package/resources/v1/customers/invoices.mjs +179 -19
- package/resources/v1/customers/invoices.mjs.map +1 -1
- package/resources/v1/customers/named-schedules.d.mts +82 -0
- package/resources/v1/customers/named-schedules.d.mts.map +1 -0
- package/resources/v1/customers/named-schedules.d.ts +5 -4
- package/resources/v1/customers/named-schedules.d.ts.map +1 -1
- package/resources/v1/customers/named-schedules.js +3 -2
- package/resources/v1/customers/named-schedules.js.map +1 -1
- package/resources/v1/customers/named-schedules.mjs +3 -2
- package/resources/v1/customers/named-schedules.mjs.map +1 -1
- package/resources/v1/customers/plans.d.mts +281 -0
- package/resources/v1/customers/plans.d.mts.map +1 -0
- package/resources/v1/customers/plans.d.ts +14 -12
- package/resources/v1/customers/plans.d.ts.map +1 -1
- package/resources/v1/customers/plans.js +8 -15
- package/resources/v1/customers/plans.js.map +1 -1
- package/resources/v1/customers/plans.mjs +7 -12
- package/resources/v1/customers/plans.mjs.map +1 -1
- package/resources/v1/customers.d.mts +2 -0
- package/resources/v1/customers.d.mts.map +1 -0
- package/resources/v1/customers.d.ts.map +1 -1
- package/resources/v1/customers.js +2 -15
- package/resources/v1/customers.js.map +1 -1
- package/resources/v1/dashboards.d.mts +133 -0
- package/resources/v1/dashboards.d.mts.map +1 -0
- package/resources/v1/dashboards.d.ts +33 -6
- package/resources/v1/dashboards.d.ts.map +1 -1
- package/resources/v1/dashboards.js +30 -4
- package/resources/v1/dashboards.js.map +1 -1
- package/resources/v1/dashboards.mjs +30 -4
- package/resources/v1/dashboards.mjs.map +1 -1
- package/resources/v1/index.d.mts +16 -0
- package/resources/v1/index.d.mts.map +1 -0
- package/resources/v1/index.d.ts +10 -9
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +3 -12
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +8 -7
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/invoices.d.mts +83 -0
- package/resources/v1/invoices.d.mts.map +1 -0
- package/resources/v1/invoices.d.ts +28 -6
- package/resources/v1/invoices.d.ts.map +1 -1
- package/resources/v1/invoices.js +24 -3
- package/resources/v1/invoices.js.map +1 -1
- package/resources/v1/invoices.mjs +24 -3
- package/resources/v1/invoices.mjs.map +1 -1
- package/resources/v1/payments.d.mts +116 -0
- package/resources/v1/payments.d.mts.map +1 -0
- package/resources/v1/payments.d.ts +116 -0
- package/resources/v1/payments.d.ts.map +1 -0
- package/resources/v1/payments.js +71 -0
- package/resources/v1/payments.js.map +1 -0
- package/resources/v1/payments.mjs +67 -0
- package/resources/v1/payments.mjs.map +1 -0
- package/resources/v1/plans.d.mts +240 -0
- package/resources/v1/plans.d.mts.map +1 -0
- package/resources/v1/plans.d.ts +24 -15
- package/resources/v1/plans.d.ts.map +1 -1
- package/resources/v1/plans.js +19 -26
- package/resources/v1/plans.js.map +1 -1
- package/resources/v1/plans.mjs +18 -22
- package/resources/v1/plans.mjs.map +1 -1
- package/resources/v1/pricing-units.d.mts +34 -0
- package/resources/v1/pricing-units.d.mts.map +1 -0
- package/resources/v1/pricing-units.d.ts +12 -9
- package/resources/v1/pricing-units.d.ts.map +1 -1
- package/resources/v1/pricing-units.js +20 -12
- package/resources/v1/pricing-units.js.map +1 -1
- package/resources/v1/pricing-units.mjs +19 -10
- package/resources/v1/pricing-units.mjs.map +1 -1
- package/resources/v1/services.d.mts +33 -0
- package/resources/v1/services.d.mts.map +1 -0
- package/resources/v1/services.d.ts +10 -7
- package/resources/v1/services.d.ts.map +1 -1
- package/resources/v1/services.js +7 -5
- package/resources/v1/services.js.map +1 -1
- package/resources/v1/services.mjs +7 -5
- package/resources/v1/services.mjs.map +1 -1
- package/resources/v1/usage.d.mts +490 -0
- package/resources/v1/usage.d.mts.map +1 -0
- package/resources/v1/usage.d.ts +223 -58
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +214 -26
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +213 -24
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +62 -0
- package/resources/v1/v1.d.mts.map +1 -0
- package/resources/v1/v1.d.ts +19 -15
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +19 -48
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +12 -19
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v1.d.mts +2 -0
- package/resources/v1.d.mts.map +1 -0
- package/resources/v1.d.ts.map +1 -1
- package/resources/v1.js +2 -15
- package/resources/v1.js.map +1 -1
- package/resources/v2/contracts.d.mts +2900 -0
- package/resources/v2/contracts.d.mts.map +1 -0
- package/resources/v2/contracts.d.ts +399 -3830
- package/resources/v2/contracts.d.ts.map +1 -1
- package/resources/v2/contracts.js +102 -12
- package/resources/v2/contracts.js.map +1 -1
- package/resources/v2/contracts.mjs +102 -12
- package/resources/v2/contracts.mjs.map +1 -1
- package/resources/v2/index.d.mts +3 -0
- package/resources/v2/index.d.mts.map +1 -0
- package/resources/v2/index.d.ts.map +1 -1
- package/resources/v2/v2.d.mts +10 -0
- package/resources/v2/v2.d.mts.map +1 -0
- package/resources/v2/v2.d.ts +1 -1
- package/resources/v2/v2.d.ts.map +1 -1
- package/resources/v2/v2.js +3 -25
- package/resources/v2/v2.js.map +1 -1
- package/resources/v2/v2.mjs +1 -1
- package/resources/v2.d.mts +2 -0
- package/resources/v2.d.mts.map +1 -0
- package/resources/v2.d.ts.map +1 -1
- package/resources/v2.js +2 -15
- package/resources/v2.js.map +1 -1
- package/resources/webhooks.d.mts +22 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +1 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +3 -3
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +1 -1
- 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/src/api-promise.ts +2 -0
- package/src/client.ts +809 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/pagination.ts +319 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -130
- package/src/index.ts +6 -221
- 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 +144 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/qs/formats.ts +3 -2
- package/src/internal/qs/index.ts +3 -3
- package/src/internal/qs/stringify.ts +18 -21
- package/src/internal/qs/utils.ts +16 -16
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/pagination.ts +2 -82
- package/src/resource.ts +2 -11
- package/src/resources/index.ts +4 -4
- package/src/resources/shared.ts +1921 -506
- package/src/resources/v1/alerts.ts +108 -33
- package/src/resources/v1/audit-logs.ts +48 -26
- package/src/resources/v1/billable-metrics.ts +79 -34
- package/src/resources/v1/contracts/contracts.ts +490 -1632
- package/src/resources/v1/contracts/index.ts +7 -6
- package/src/resources/v1/contracts/named-schedules.ts +8 -6
- package/src/resources/v1/contracts/products.ts +50 -38
- package/src/resources/v1/contracts/rate-cards/index.ts +6 -6
- package/src/resources/v1/contracts/rate-cards/named-schedules.ts +8 -6
- package/src/resources/v1/contracts/rate-cards/product-orders.ts +13 -10
- package/src/resources/v1/contracts/rate-cards/rate-cards.ts +145 -72
- package/src/resources/v1/contracts/rate-cards/rates.ts +28 -98
- package/src/resources/v1/contracts/rate-cards.ts +1 -1
- package/src/resources/v1/contracts.ts +1 -1
- package/src/resources/v1/credit-grants.ts +100 -112
- package/src/resources/v1/custom-fields.ts +106 -74
- package/src/resources/v1/customers/alerts.ts +195 -55
- package/src/resources/v1/customers/billing-config.ts +27 -13
- package/src/resources/v1/customers/commits.ts +146 -54
- package/src/resources/v1/customers/credits.ts +131 -53
- package/src/resources/v1/customers/customers.ts +407 -115
- package/src/resources/v1/customers/index.ts +20 -18
- package/src/resources/v1/customers/invoices.ts +343 -42
- package/src/resources/v1/customers/named-schedules.ts +8 -6
- package/src/resources/v1/customers/plans.ts +24 -22
- package/src/resources/v1/customers.ts +1 -1
- package/src/resources/v1/dashboards.ts +34 -7
- package/src/resources/v1/index.ts +43 -25
- package/src/resources/v1/invoices.ts +28 -9
- package/src/resources/v1/payments.ts +170 -0
- package/src/resources/v1/plans.ts +42 -43
- package/src/resources/v1/pricing-units.ts +15 -23
- package/src/resources/v1/services.ts +10 -7
- package/src/resources/v1/usage.ts +247 -73
- package/src/resources/v1/v1.ts +78 -49
- package/src/resources/v1.ts +1 -1
- package/src/resources/v2/contracts.ts +469 -4930
- package/src/resources/v2/index.ts +2 -2
- package/src/resources/v2/v2.ts +3 -3
- package/src/resources/v2.ts +1 -1
- package/src/resources/webhooks.ts +2 -2
- package/src/resources.ts +1 -1
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -157
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -255
- package/core.d.ts.map +0 -1
- package/core.js +0 -924
- package/core.js.map +0 -1
- package/core.mjs +0 -892
- package/core.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1236
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alerts.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/alerts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"alerts.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/alerts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;O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OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAErD;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;CAC5C;AAED,yBAAiB,mBAAmB,CAAC;IACnC;;;OAGG;IACH,UAAiB,UAAU;QACzB,GAAG,EAAE,MAAM,CAAC;QAEZ,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,WAAW,eAAgB,SAAQ,4BAA4B;IACnE;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC;CAC7D;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -2,11 +2,66 @@
|
|
|
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.Alerts = void 0;
|
|
5
|
-
const resource_1 = require("../../../resource.js");
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
6
8
|
class Alerts extends resource_1.APIResource {
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
+
* Retrieve the real-time evaluation status for a specific threshold
|
|
11
|
+
* notification-customer pair. This endpoint provides instant visibility into
|
|
12
|
+
* whether a customer has triggered a threshold notification condition, enabling
|
|
13
|
+
* you to monitor account health and take proactive action based on current
|
|
14
|
+
* threshold notification states.
|
|
15
|
+
*
|
|
16
|
+
* ### Use this endpoint to:
|
|
17
|
+
*
|
|
18
|
+
* - Check if a specific customer is currently violating an threshold notification
|
|
19
|
+
* (`in_alarm` status)
|
|
20
|
+
* - Verify threshold notification configuration details and threshold values for a
|
|
21
|
+
* customer
|
|
22
|
+
* - Monitor the evaluation state of newly created or recently modified threshold
|
|
23
|
+
* notification
|
|
24
|
+
* - Build dashboards or automated workflows that respond to specific threshold
|
|
25
|
+
* notification conditions
|
|
26
|
+
* - Validate threshold notification behavior before deploying to production
|
|
27
|
+
* customers
|
|
28
|
+
* - Integrate threshold notification status checks into customer support tools or
|
|
29
|
+
* admin interfaces
|
|
30
|
+
*
|
|
31
|
+
* ### Key response fields:
|
|
32
|
+
*
|
|
33
|
+
* A CustomerAlert object containing:
|
|
34
|
+
*
|
|
35
|
+
* - `customer_status`: The current evaluation state
|
|
36
|
+
*
|
|
37
|
+
* - `ok` - Customer is within acceptable thresholds
|
|
38
|
+
* - `in_alarm` - Customer has breached the threshold for the notification
|
|
39
|
+
* - `evaluating` - Notification is currently being evaluated (typically during
|
|
40
|
+
* initial setup)
|
|
41
|
+
* - `null` - Notification has been archived
|
|
42
|
+
* - `triggered_by`: Additional context about what caused the notification to
|
|
43
|
+
* trigger (when applicable)
|
|
44
|
+
* - alert: Complete threshold notification configuration including:
|
|
45
|
+
* - Notification ID, name, and type
|
|
46
|
+
* - Current threshold values and credit type information
|
|
47
|
+
* - Notification status (enabled, disabled, or archived)
|
|
48
|
+
* - Last update timestamp
|
|
49
|
+
* - Any applied filters (credit grant types, custom fields, group values)
|
|
50
|
+
*
|
|
51
|
+
* ### Usage guidelines:
|
|
52
|
+
*
|
|
53
|
+
* - Customer status: Returns the current evaluation state, not historical data.
|
|
54
|
+
* For threshold notification history, use webhook notifications or event logs
|
|
55
|
+
* - Required parameters: Both customer_id and alert_id must be valid UUIDs that
|
|
56
|
+
* exist in your organization
|
|
57
|
+
* - Archived notifications: Returns null for customer_status if the notification
|
|
58
|
+
* has been archived, but still includes the notification configuration details
|
|
59
|
+
* - Performance considerations: This endpoint queries live evaluation state,
|
|
60
|
+
* making it ideal for real-time monitoring but not for bulk status checks
|
|
61
|
+
* - Integration patterns: Best used for on-demand status checks in response to
|
|
62
|
+
* user actions or as part of targeted monitoring workflows
|
|
63
|
+
* - Error handling: Returns 404 if either the customer or alert_id doesn't exist
|
|
64
|
+
* or isn't accessible to your organization
|
|
10
65
|
*
|
|
11
66
|
* @example
|
|
12
67
|
* ```ts
|
|
@@ -20,21 +75,87 @@ class Alerts extends resource_1.APIResource {
|
|
|
20
75
|
return this._client.post('/v1/customer-alerts/get', { body, ...options });
|
|
21
76
|
}
|
|
22
77
|
/**
|
|
23
|
-
*
|
|
78
|
+
* Retrieve all threshold notification configurations and their current statuses
|
|
79
|
+
* for a specific customer in a single API call. This endpoint provides a
|
|
80
|
+
* comprehensive view of all threshold notification monitoring a customer account.
|
|
81
|
+
*
|
|
82
|
+
* ### Use this endpoint to:
|
|
83
|
+
*
|
|
84
|
+
* - Display all active threshold notifications for a customer in dashboards or
|
|
85
|
+
* admin panels
|
|
86
|
+
* - Quickly identify which threshold notifications a customer is currently
|
|
87
|
+
* triggering
|
|
88
|
+
* - Audit threshold notification coverage for specific accounts
|
|
89
|
+
* - Filter threshold notifications by status (enabled, disabled, or archived)
|
|
90
|
+
*
|
|
91
|
+
* ### Key response fields:
|
|
92
|
+
*
|
|
93
|
+
* - data: Array of CustomerAlert objects, each containing:
|
|
94
|
+
* - Current evaluation status (`ok`, `in_alarm`, `evaluating`, or `null`)
|
|
95
|
+
* - Complete threshold notification configuration and threshold details
|
|
96
|
+
* - Threshold notification metadata including type, name, and last update time
|
|
97
|
+
* - next_page: Pagination cursor for retrieving additional results
|
|
98
|
+
*
|
|
99
|
+
* ### Usage guidelines:
|
|
100
|
+
*
|
|
101
|
+
* - Default behavior: Returns only enabled threshold notifications unless
|
|
102
|
+
* `alert_statuses` filter is specified
|
|
103
|
+
* - Pagination: Use the `next_page` cursor to retrieve all results for customers
|
|
104
|
+
* with many notifications
|
|
105
|
+
* - Performance: Efficiently retrieves multiple threshold notification statuses in
|
|
106
|
+
* a single request instead of making individual calls
|
|
107
|
+
* - Filtering: Pass the `alert_statuses` array to include disabled or archived
|
|
108
|
+
* threshold notifications in results
|
|
24
109
|
*
|
|
25
110
|
* @example
|
|
26
111
|
* ```ts
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* }
|
|
112
|
+
* // Automatically fetches more pages as needed.
|
|
113
|
+
* for await (const customerAlert of client.v1.customers.alerts.list(
|
|
114
|
+
* { customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1' },
|
|
115
|
+
* )) {
|
|
116
|
+
* // ...
|
|
117
|
+
* }
|
|
30
118
|
* ```
|
|
31
119
|
*/
|
|
32
120
|
list(params, options) {
|
|
33
121
|
const { next_page, ...body } = params;
|
|
34
|
-
return this._client.
|
|
122
|
+
return this._client.getAPIList('/v1/customer-alerts/list', (pagination_1.CursorPageWithoutLimit), {
|
|
123
|
+
query: { next_page },
|
|
124
|
+
body,
|
|
125
|
+
method: 'post',
|
|
126
|
+
...options,
|
|
127
|
+
});
|
|
35
128
|
}
|
|
36
129
|
/**
|
|
37
|
-
*
|
|
130
|
+
* Force an immediate re-evaluation of a specific threshold notification for a
|
|
131
|
+
* customer, clearing any previous state and triggering a fresh assessment against
|
|
132
|
+
* current thresholds. This endpoint ensures threshold notification accuracy after
|
|
133
|
+
* configuration changes or data corrections.
|
|
134
|
+
*
|
|
135
|
+
* ### Use this endpoint to:
|
|
136
|
+
*
|
|
137
|
+
* - Clear false positive threshold notifications after fixing data issues
|
|
138
|
+
* - Re-evaluate threshold notifications after adjusting customer balances or
|
|
139
|
+
* credits
|
|
140
|
+
* - Test threshold notification behavior during development and debugging
|
|
141
|
+
* - Resolve stuck threshold notification that may be in an incorrect state
|
|
142
|
+
* - Trigger immediate evaluation after threshold modifications
|
|
143
|
+
*
|
|
144
|
+
* ### Key response fields:
|
|
145
|
+
*
|
|
146
|
+
* - 200 Success: Confirmation that the threshold notification has been reset and
|
|
147
|
+
* re-evaluation initiated
|
|
148
|
+
* - No response body is returned - the operation completes asynchronously
|
|
149
|
+
*
|
|
150
|
+
* ### Usage guidelines:
|
|
151
|
+
*
|
|
152
|
+
* - Immediate effect: Triggers re-evaluation instantly, which may result in new
|
|
153
|
+
* webhook notifications if thresholds are breached
|
|
154
|
+
* - State clearing: Removes any cached evaluation state, ensuring a fresh
|
|
155
|
+
* assessment
|
|
156
|
+
* - Use sparingly: Intended for exceptional cases, not routine operations
|
|
157
|
+
* - Asynchronous processing: The reset completes immediately, but re-evaluation
|
|
158
|
+
* happens in the background
|
|
38
159
|
*
|
|
39
160
|
* @example
|
|
40
161
|
* ```ts
|
|
@@ -48,7 +169,7 @@ class Alerts extends resource_1.APIResource {
|
|
|
48
169
|
return this._client.post('/v1/customer-alerts/reset', {
|
|
49
170
|
body,
|
|
50
171
|
...options,
|
|
51
|
-
headers: { Accept: '*/*',
|
|
172
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
52
173
|
});
|
|
53
174
|
}
|
|
54
175
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alerts.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/alerts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"alerts.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/alerts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,4DAIkC;AAClC,0DAAyD;AAGzD,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgEG;IACH,QAAQ,CAAC,IAAyB,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,IAAI,CACF,MAAuB,EACvB,OAAwB;QAExB,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,0BAA0B,EAAE,CAAA,mCAAqC,CAAA,EAAE;YAChG,KAAK,EAAE,EAAE,SAAS,EAAE;YACpB,IAAI;YACJ,MAAM,EAAE,MAAM;YACd,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,KAAK,CAAC,IAAsB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE;YACpD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AA5KD,wBA4KC"}
|
|
@@ -1,9 +1,64 @@
|
|
|
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 { CursorPageWithoutLimit, } from "../../../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
3
5
|
export class Alerts extends APIResource {
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
+
* Retrieve the real-time evaluation status for a specific threshold
|
|
8
|
+
* notification-customer pair. This endpoint provides instant visibility into
|
|
9
|
+
* whether a customer has triggered a threshold notification condition, enabling
|
|
10
|
+
* you to monitor account health and take proactive action based on current
|
|
11
|
+
* threshold notification states.
|
|
12
|
+
*
|
|
13
|
+
* ### Use this endpoint to:
|
|
14
|
+
*
|
|
15
|
+
* - Check if a specific customer is currently violating an threshold notification
|
|
16
|
+
* (`in_alarm` status)
|
|
17
|
+
* - Verify threshold notification configuration details and threshold values for a
|
|
18
|
+
* customer
|
|
19
|
+
* - Monitor the evaluation state of newly created or recently modified threshold
|
|
20
|
+
* notification
|
|
21
|
+
* - Build dashboards or automated workflows that respond to specific threshold
|
|
22
|
+
* notification conditions
|
|
23
|
+
* - Validate threshold notification behavior before deploying to production
|
|
24
|
+
* customers
|
|
25
|
+
* - Integrate threshold notification status checks into customer support tools or
|
|
26
|
+
* admin interfaces
|
|
27
|
+
*
|
|
28
|
+
* ### Key response fields:
|
|
29
|
+
*
|
|
30
|
+
* A CustomerAlert object containing:
|
|
31
|
+
*
|
|
32
|
+
* - `customer_status`: The current evaluation state
|
|
33
|
+
*
|
|
34
|
+
* - `ok` - Customer is within acceptable thresholds
|
|
35
|
+
* - `in_alarm` - Customer has breached the threshold for the notification
|
|
36
|
+
* - `evaluating` - Notification is currently being evaluated (typically during
|
|
37
|
+
* initial setup)
|
|
38
|
+
* - `null` - Notification has been archived
|
|
39
|
+
* - `triggered_by`: Additional context about what caused the notification to
|
|
40
|
+
* trigger (when applicable)
|
|
41
|
+
* - alert: Complete threshold notification configuration including:
|
|
42
|
+
* - Notification ID, name, and type
|
|
43
|
+
* - Current threshold values and credit type information
|
|
44
|
+
* - Notification status (enabled, disabled, or archived)
|
|
45
|
+
* - Last update timestamp
|
|
46
|
+
* - Any applied filters (credit grant types, custom fields, group values)
|
|
47
|
+
*
|
|
48
|
+
* ### Usage guidelines:
|
|
49
|
+
*
|
|
50
|
+
* - Customer status: Returns the current evaluation state, not historical data.
|
|
51
|
+
* For threshold notification history, use webhook notifications or event logs
|
|
52
|
+
* - Required parameters: Both customer_id and alert_id must be valid UUIDs that
|
|
53
|
+
* exist in your organization
|
|
54
|
+
* - Archived notifications: Returns null for customer_status if the notification
|
|
55
|
+
* has been archived, but still includes the notification configuration details
|
|
56
|
+
* - Performance considerations: This endpoint queries live evaluation state,
|
|
57
|
+
* making it ideal for real-time monitoring but not for bulk status checks
|
|
58
|
+
* - Integration patterns: Best used for on-demand status checks in response to
|
|
59
|
+
* user actions or as part of targeted monitoring workflows
|
|
60
|
+
* - Error handling: Returns 404 if either the customer or alert_id doesn't exist
|
|
61
|
+
* or isn't accessible to your organization
|
|
7
62
|
*
|
|
8
63
|
* @example
|
|
9
64
|
* ```ts
|
|
@@ -17,21 +72,87 @@ export class Alerts extends APIResource {
|
|
|
17
72
|
return this._client.post('/v1/customer-alerts/get', { body, ...options });
|
|
18
73
|
}
|
|
19
74
|
/**
|
|
20
|
-
*
|
|
75
|
+
* Retrieve all threshold notification configurations and their current statuses
|
|
76
|
+
* for a specific customer in a single API call. This endpoint provides a
|
|
77
|
+
* comprehensive view of all threshold notification monitoring a customer account.
|
|
78
|
+
*
|
|
79
|
+
* ### Use this endpoint to:
|
|
80
|
+
*
|
|
81
|
+
* - Display all active threshold notifications for a customer in dashboards or
|
|
82
|
+
* admin panels
|
|
83
|
+
* - Quickly identify which threshold notifications a customer is currently
|
|
84
|
+
* triggering
|
|
85
|
+
* - Audit threshold notification coverage for specific accounts
|
|
86
|
+
* - Filter threshold notifications by status (enabled, disabled, or archived)
|
|
87
|
+
*
|
|
88
|
+
* ### Key response fields:
|
|
89
|
+
*
|
|
90
|
+
* - data: Array of CustomerAlert objects, each containing:
|
|
91
|
+
* - Current evaluation status (`ok`, `in_alarm`, `evaluating`, or `null`)
|
|
92
|
+
* - Complete threshold notification configuration and threshold details
|
|
93
|
+
* - Threshold notification metadata including type, name, and last update time
|
|
94
|
+
* - next_page: Pagination cursor for retrieving additional results
|
|
95
|
+
*
|
|
96
|
+
* ### Usage guidelines:
|
|
97
|
+
*
|
|
98
|
+
* - Default behavior: Returns only enabled threshold notifications unless
|
|
99
|
+
* `alert_statuses` filter is specified
|
|
100
|
+
* - Pagination: Use the `next_page` cursor to retrieve all results for customers
|
|
101
|
+
* with many notifications
|
|
102
|
+
* - Performance: Efficiently retrieves multiple threshold notification statuses in
|
|
103
|
+
* a single request instead of making individual calls
|
|
104
|
+
* - Filtering: Pass the `alert_statuses` array to include disabled or archived
|
|
105
|
+
* threshold notifications in results
|
|
21
106
|
*
|
|
22
107
|
* @example
|
|
23
108
|
* ```ts
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* }
|
|
109
|
+
* // Automatically fetches more pages as needed.
|
|
110
|
+
* for await (const customerAlert of client.v1.customers.alerts.list(
|
|
111
|
+
* { customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1' },
|
|
112
|
+
* )) {
|
|
113
|
+
* // ...
|
|
114
|
+
* }
|
|
27
115
|
* ```
|
|
28
116
|
*/
|
|
29
117
|
list(params, options) {
|
|
30
118
|
const { next_page, ...body } = params;
|
|
31
|
-
return this._client.
|
|
119
|
+
return this._client.getAPIList('/v1/customer-alerts/list', (CursorPageWithoutLimit), {
|
|
120
|
+
query: { next_page },
|
|
121
|
+
body,
|
|
122
|
+
method: 'post',
|
|
123
|
+
...options,
|
|
124
|
+
});
|
|
32
125
|
}
|
|
33
126
|
/**
|
|
34
|
-
*
|
|
127
|
+
* Force an immediate re-evaluation of a specific threshold notification for a
|
|
128
|
+
* customer, clearing any previous state and triggering a fresh assessment against
|
|
129
|
+
* current thresholds. This endpoint ensures threshold notification accuracy after
|
|
130
|
+
* configuration changes or data corrections.
|
|
131
|
+
*
|
|
132
|
+
* ### Use this endpoint to:
|
|
133
|
+
*
|
|
134
|
+
* - Clear false positive threshold notifications after fixing data issues
|
|
135
|
+
* - Re-evaluate threshold notifications after adjusting customer balances or
|
|
136
|
+
* credits
|
|
137
|
+
* - Test threshold notification behavior during development and debugging
|
|
138
|
+
* - Resolve stuck threshold notification that may be in an incorrect state
|
|
139
|
+
* - Trigger immediate evaluation after threshold modifications
|
|
140
|
+
*
|
|
141
|
+
* ### Key response fields:
|
|
142
|
+
*
|
|
143
|
+
* - 200 Success: Confirmation that the threshold notification has been reset and
|
|
144
|
+
* re-evaluation initiated
|
|
145
|
+
* - No response body is returned - the operation completes asynchronously
|
|
146
|
+
*
|
|
147
|
+
* ### Usage guidelines:
|
|
148
|
+
*
|
|
149
|
+
* - Immediate effect: Triggers re-evaluation instantly, which may result in new
|
|
150
|
+
* webhook notifications if thresholds are breached
|
|
151
|
+
* - State clearing: Removes any cached evaluation state, ensuring a fresh
|
|
152
|
+
* assessment
|
|
153
|
+
* - Use sparingly: Intended for exceptional cases, not routine operations
|
|
154
|
+
* - Asynchronous processing: The reset completes immediately, but re-evaluation
|
|
155
|
+
* happens in the background
|
|
35
156
|
*
|
|
36
157
|
* @example
|
|
37
158
|
* ```ts
|
|
@@ -45,7 +166,7 @@ export class Alerts extends APIResource {
|
|
|
45
166
|
return this._client.post('/v1/customer-alerts/reset', {
|
|
46
167
|
body,
|
|
47
168
|
...options,
|
|
48
|
-
headers: { Accept: '*/*',
|
|
169
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
49
170
|
});
|
|
50
171
|
}
|
|
51
172
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alerts.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/alerts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"alerts.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/alerts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EACL,sBAAsB,GAGvB;OACM,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgEG;IACH,QAAQ,CAAC,IAAyB,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,IAAI,CACF,MAAuB,EACvB,OAAwB;QAExB,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,0BAA0B,EAAE,CAAA,sBAAqC,CAAA,EAAE;YAChG,KAAK,EAAE,EAAE,SAAS,EAAE;YACpB,IAAI;YACJ,MAAM,EAAE,MAAM;YACd,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,KAAK,CAAC,IAAsB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE;YACpD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
|
+
export declare class BillingConfig extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Set the billing configuration for a given customer.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* await client.v1.customers.billingConfig.create({
|
|
11
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
12
|
+
* billing_provider_type: 'stripe',
|
|
13
|
+
* billing_provider_customer_id: 'cus_AJ6y20bjkOOayM',
|
|
14
|
+
* stripe_collection_method: 'charge_automatically',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
create(params: BillingConfigCreateParams, options?: RequestOptions): APIPromise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Fetch the billing configuration for the given customer.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const billingConfig =
|
|
25
|
+
* await client.v1.customers.billingConfig.retrieve({
|
|
26
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
27
|
+
* billing_provider_type: 'stripe',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
retrieve(params: BillingConfigRetrieveParams, options?: RequestOptions): APIPromise<BillingConfigRetrieveResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Delete the billing configuration for a given customer. Note: this is unsupported
|
|
34
|
+
* for Azure and AWS Marketplace customers.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* await client.v1.customers.billingConfig.delete({
|
|
39
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
40
|
+
* billing_provider_type: 'stripe',
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
delete(params: BillingConfigDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
45
|
+
}
|
|
46
|
+
export interface BillingConfigRetrieveResponse {
|
|
47
|
+
data: BillingConfigRetrieveResponse.Data;
|
|
48
|
+
}
|
|
49
|
+
export declare namespace BillingConfigRetrieveResponse {
|
|
50
|
+
interface Data {
|
|
51
|
+
/**
|
|
52
|
+
* Contract expiration date for the customer. The expected format is RFC 3339 and
|
|
53
|
+
* can be retrieved from
|
|
54
|
+
* [AWS's GetEntitlements API](https://docs.aws.amazon.com/marketplaceentitlement/latest/APIReference/API_GetEntitlements.html).
|
|
55
|
+
*/
|
|
56
|
+
aws_expiration_date?: string;
|
|
57
|
+
/**
|
|
58
|
+
* True if the aws_product_code is a SAAS subscription product, false otherwise.
|
|
59
|
+
*/
|
|
60
|
+
aws_is_subscription_product?: boolean;
|
|
61
|
+
aws_product_code?: string;
|
|
62
|
+
aws_region?: 'af-south-1' | 'ap-east-1' | 'ap-northeast-1' | 'ap-northeast-2' | 'ap-northeast-3' | 'ap-south-1' | 'ap-southeast-1' | 'ap-southeast-2' | 'ca-central-1' | 'cn-north-1' | 'cn-northwest-1' | 'eu-central-1' | 'eu-north-1' | 'eu-south-1' | 'eu-west-1' | 'eu-west-2' | 'eu-west-3' | 'me-south-1' | 'sa-east-1' | 'us-east-1' | 'us-east-2' | 'us-gov-east-1' | 'us-gov-west-1' | 'us-west-1' | 'us-west-2';
|
|
63
|
+
/**
|
|
64
|
+
* Subscription term start/end date for the customer. The expected format is RFC
|
|
65
|
+
* 3339 and can be retrieved from
|
|
66
|
+
* [Azure's Get Subscription API](https://learn.microsoft.com/en-us/partner-center/marketplace/partner-center-portal/pc-saas-fulfillment-subscription-api#get-subscription).
|
|
67
|
+
*/
|
|
68
|
+
azure_expiration_date?: string;
|
|
69
|
+
azure_plan_id?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Subscription term start/end date for the customer. The expected format is RFC
|
|
72
|
+
* 3339 and can be retrieved from
|
|
73
|
+
* [Azure's Get Subscription API](https://learn.microsoft.com/en-us/partner-center/marketplace/partner-center-portal/pc-saas-fulfillment-subscription-api#get-subscription).
|
|
74
|
+
*/
|
|
75
|
+
azure_start_date?: string;
|
|
76
|
+
azure_subscription_status?: 'Subscribed' | 'Unsubscribed' | 'Suspended' | 'PendingFulfillmentStart';
|
|
77
|
+
billing_provider_customer_id?: string;
|
|
78
|
+
stripe_collection_method?: 'charge_automatically' | 'send_invoice' | 'auto_charge_payment_intent' | 'manually_charge_payment_intent';
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
export interface BillingConfigCreateParams {
|
|
82
|
+
/**
|
|
83
|
+
* Path param:
|
|
84
|
+
*/
|
|
85
|
+
customer_id: string;
|
|
86
|
+
/**
|
|
87
|
+
* Path param: The billing provider (e.g. stripe)
|
|
88
|
+
*/
|
|
89
|
+
billing_provider_type: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
90
|
+
/**
|
|
91
|
+
* Body param: The customer ID in the billing provider's system. For Azure, this is
|
|
92
|
+
* the subscription ID.
|
|
93
|
+
*/
|
|
94
|
+
billing_provider_customer_id: string;
|
|
95
|
+
/**
|
|
96
|
+
* Body param:
|
|
97
|
+
*/
|
|
98
|
+
aws_product_code?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Body param:
|
|
101
|
+
*/
|
|
102
|
+
aws_region?: 'af-south-1' | 'ap-east-1' | 'ap-northeast-1' | 'ap-northeast-2' | 'ap-northeast-3' | 'ap-south-1' | 'ap-southeast-1' | 'ap-southeast-2' | 'ca-central-1' | 'cn-north-1' | 'cn-northwest-1' | 'eu-central-1' | 'eu-north-1' | 'eu-south-1' | 'eu-west-1' | 'eu-west-2' | 'eu-west-3' | 'me-south-1' | 'sa-east-1' | 'us-east-1' | 'us-east-2' | 'us-gov-east-1' | 'us-gov-west-1' | 'us-west-1' | 'us-west-2';
|
|
103
|
+
/**
|
|
104
|
+
* Body param:
|
|
105
|
+
*/
|
|
106
|
+
stripe_collection_method?: 'charge_automatically' | 'send_invoice' | 'auto_charge_payment_intent' | 'manually_charge_payment_intent';
|
|
107
|
+
}
|
|
108
|
+
export interface BillingConfigRetrieveParams {
|
|
109
|
+
customer_id: string;
|
|
110
|
+
/**
|
|
111
|
+
* The billing provider (e.g. stripe)
|
|
112
|
+
*/
|
|
113
|
+
billing_provider_type: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
114
|
+
}
|
|
115
|
+
export interface BillingConfigDeleteParams {
|
|
116
|
+
customer_id: string;
|
|
117
|
+
/**
|
|
118
|
+
* The billing provider (e.g. stripe)
|
|
119
|
+
*/
|
|
120
|
+
billing_provider_type: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
121
|
+
}
|
|
122
|
+
export declare namespace BillingConfig {
|
|
123
|
+
export { type BillingConfigRetrieveResponse as BillingConfigRetrieveResponse, type BillingConfigCreateParams as BillingConfigCreateParams, type BillingConfigRetrieveParams as BillingConfigRetrieveParams, type BillingConfigDeleteParams as BillingConfigDeleteParams, };
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=billing-config.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-config.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/customers/billing-config.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IASrF;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,MAAM,EAAE,2BAA2B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAQ5C;;;;;;;;;;;OAWG;IACH,MAAM,C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
|
-
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 BillingConfig extends APIResource {
|
|
4
5
|
/**
|
|
5
6
|
* Set the billing configuration for a given customer.
|
|
@@ -14,7 +15,7 @@ export declare class BillingConfig extends APIResource {
|
|
|
14
15
|
* });
|
|
15
16
|
* ```
|
|
16
17
|
*/
|
|
17
|
-
create(params: BillingConfigCreateParams, options?:
|
|
18
|
+
create(params: BillingConfigCreateParams, options?: RequestOptions): APIPromise<void>;
|
|
18
19
|
/**
|
|
19
20
|
* Fetch the billing configuration for the given customer.
|
|
20
21
|
*
|
|
@@ -27,7 +28,7 @@ export declare class BillingConfig extends APIResource {
|
|
|
27
28
|
* });
|
|
28
29
|
* ```
|
|
29
30
|
*/
|
|
30
|
-
retrieve(params: BillingConfigRetrieveParams, options?:
|
|
31
|
+
retrieve(params: BillingConfigRetrieveParams, options?: RequestOptions): APIPromise<BillingConfigRetrieveResponse>;
|
|
31
32
|
/**
|
|
32
33
|
* Delete the billing configuration for a given customer. Note: this is unsupported
|
|
33
34
|
* for Azure and AWS Marketplace customers.
|
|
@@ -40,7 +41,7 @@ export declare class BillingConfig extends APIResource {
|
|
|
40
41
|
* });
|
|
41
42
|
* ```
|
|
42
43
|
*/
|
|
43
|
-
delete(params: BillingConfigDeleteParams, options?:
|
|
44
|
+
delete(params: BillingConfigDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
44
45
|
}
|
|
45
46
|
export interface BillingConfigRetrieveResponse {
|
|
46
47
|
data: BillingConfigRetrieveResponse.Data;
|
|
@@ -74,7 +75,7 @@ export declare namespace BillingConfigRetrieveResponse {
|
|
|
74
75
|
azure_start_date?: string;
|
|
75
76
|
azure_subscription_status?: 'Subscribed' | 'Unsubscribed' | 'Suspended' | 'PendingFulfillmentStart';
|
|
76
77
|
billing_provider_customer_id?: string;
|
|
77
|
-
stripe_collection_method?: 'charge_automatically' | 'send_invoice';
|
|
78
|
+
stripe_collection_method?: 'charge_automatically' | 'send_invoice' | 'auto_charge_payment_intent' | 'manually_charge_payment_intent';
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
export interface BillingConfigCreateParams {
|
|
@@ -102,7 +103,7 @@ export interface BillingConfigCreateParams {
|
|
|
102
103
|
/**
|
|
103
104
|
* Body param:
|
|
104
105
|
*/
|
|
105
|
-
stripe_collection_method?: 'charge_automatically' | 'send_invoice';
|
|
106
|
+
stripe_collection_method?: 'charge_automatically' | 'send_invoice' | 'auto_charge_payment_intent' | 'manually_charge_payment_intent';
|
|
106
107
|
}
|
|
107
108
|
export interface BillingConfigRetrieveParams {
|
|
108
109
|
customer_id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-config.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/billing-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"billing-config.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/billing-config.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IASrF;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,MAAM,EAAE,2BAA2B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAQ5C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAOtF;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,6BAA6B,CAAC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,YAAY,GACZ,WAAW,GACX,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,YAAY,GACZ,gBAAgB,GAChB,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,WAAW,GACX,WAAW,GACX,YAAY,GACZ,WAAW,GACX,WAAW,GACX,WAAW,GACX,eAAe,GACf,eAAe,GACf,WAAW,GACX,WAAW,CAAC;IAEhB;;OAEG;IACH,wBAAwB,CAAC,EACrB,sBAAsB,GACtB,cAAc,GACd,4BAA4B,GAC5B,gCAAgC,CAAC;CACtC;AAED,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,qBAAqB,EACjB,iBAAiB,GACjB,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,SAAS,GACT,iBAAiB,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,qBAAqB,EACjB,iBAAiB,GACjB,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,SAAS,GACT,iBAAiB,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -2,7 +2,9 @@
|
|
|
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.BillingConfig = void 0;
|
|
5
|
-
const resource_1 = require("../../../resource.js");
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
7
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
6
8
|
class BillingConfig extends resource_1.APIResource {
|
|
7
9
|
/**
|
|
8
10
|
* Set the billing configuration for a given customer.
|
|
@@ -19,10 +21,10 @@ class BillingConfig extends resource_1.APIResource {
|
|
|
19
21
|
*/
|
|
20
22
|
create(params, options) {
|
|
21
23
|
const { customer_id, billing_provider_type, ...body } = params;
|
|
22
|
-
return this._client.post(`/v1/customers/${customer_id}/billing-config/${billing_provider_type}`, {
|
|
24
|
+
return this._client.post((0, path_1.path) `/v1/customers/${customer_id}/billing-config/${billing_provider_type}`, {
|
|
23
25
|
body,
|
|
24
26
|
...options,
|
|
25
|
-
headers: { Accept: '*/*',
|
|
27
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
26
28
|
});
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
@@ -39,7 +41,7 @@ class BillingConfig extends resource_1.APIResource {
|
|
|
39
41
|
*/
|
|
40
42
|
retrieve(params, options) {
|
|
41
43
|
const { customer_id, billing_provider_type } = params;
|
|
42
|
-
return this._client.get(`/v1/customers/${customer_id}/billing-config/${billing_provider_type}`, options);
|
|
44
|
+
return this._client.get((0, path_1.path) `/v1/customers/${customer_id}/billing-config/${billing_provider_type}`, options);
|
|
43
45
|
}
|
|
44
46
|
/**
|
|
45
47
|
* Delete the billing configuration for a given customer. Note: this is unsupported
|
|
@@ -55,9 +57,9 @@ class BillingConfig extends resource_1.APIResource {
|
|
|
55
57
|
*/
|
|
56
58
|
delete(params, options) {
|
|
57
59
|
const { customer_id, billing_provider_type } = params;
|
|
58
|
-
return this._client.delete(`/v1/customers/${customer_id}/billing-config/${billing_provider_type}`, {
|
|
60
|
+
return this._client.delete((0, path_1.path) `/v1/customers/${customer_id}/billing-config/${billing_provider_type}`, {
|
|
59
61
|
...options,
|
|
60
|
-
headers: { Accept: '*/*',
|
|
62
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-config.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/billing-config.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"billing-config.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/billing-config.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,MAAiC,EAAE,OAAwB;QAChE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,iBAAiB,WAAW,mBAAmB,qBAAqB,EAAE,EAAE;YACnG,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,MAAmC,EACnC,OAAwB;QAExB,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAAC;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CACrB,IAAA,WAAI,EAAA,iBAAiB,WAAW,mBAAmB,qBAAqB,EAAE,EAC1E,OAAO,CACR,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAiC,EAAE,OAAwB;QAChE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAAC;QACtD,OA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