@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
|
@@ -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.NamedSchedules = 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");
|
|
6
7
|
class NamedSchedules extends resource_1.APIResource {
|
|
7
8
|
/**
|
|
8
9
|
* Get a named schedule for the given rate card. This endpoint's availability is
|
|
@@ -40,7 +41,7 @@ class NamedSchedules extends resource_1.APIResource {
|
|
|
40
41
|
return this._client.post('/v1/contract-pricing/rate-cards/updateNamedSchedule', {
|
|
41
42
|
body,
|
|
42
43
|
...options,
|
|
43
|
-
headers: { Accept: '*/*',
|
|
44
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"named-schedules.js","sourceRoot":"","sources":["../../../src/resources/v1/contracts/named-schedules.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"named-schedules.js","sourceRoot":"","sources":["../../../src/resources/v1/contracts/named-schedules.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAGzD,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;;;;;;;;;;;;OAaG;IACH,QAAQ,CACN,IAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kDAAkD,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAA+B,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qDAAqD,EAAE;YAC9E,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;AA5CD,wCA4CC"}
|
|
@@ -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 { buildHeaders } from "../../../internal/headers.mjs";
|
|
3
4
|
export class NamedSchedules extends APIResource {
|
|
4
5
|
/**
|
|
5
6
|
* Get a named schedule for the given rate card. This endpoint's availability is
|
|
@@ -37,7 +38,7 @@ export class NamedSchedules extends APIResource {
|
|
|
37
38
|
return this._client.post('/v1/contract-pricing/rate-cards/updateNamedSchedule', {
|
|
38
39
|
body,
|
|
39
40
|
...options,
|
|
40
|
-
headers: { Accept: '*/*',
|
|
41
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
41
42
|
});
|
|
42
43
|
}
|
|
43
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"named-schedules.mjs","sourceRoot":"","sources":["../../../src/resources/v1/contracts/named-schedules.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"named-schedules.mjs","sourceRoot":"","sources":["../../../src/resources/v1/contracts/named-schedules.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;;;;OAaG;IACH,QAAQ,CACN,IAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kDAAkD,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAA+B,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qDAAqD,EAAE;YAC9E,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,502 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as ProductsAPI from "./products.mjs";
|
|
3
|
+
import * as Shared from "../../shared.mjs";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
5
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../../../core/pagination.mjs";
|
|
6
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
7
|
+
export declare class Products extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new product object. Products in Metronome represent your company's
|
|
10
|
+
* individual product or service offerings. A Product can be thought of as the
|
|
11
|
+
* basic unit of a line item on the invoice. This is analogous to SKUs or items in
|
|
12
|
+
* an ERP system. Give the product a meaningful name as they will appear on
|
|
13
|
+
* customer invoices.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const product = await client.v1.contracts.products.create({
|
|
18
|
+
* name: 'My Product',
|
|
19
|
+
* type: 'USAGE',
|
|
20
|
+
* billable_metric_id:
|
|
21
|
+
* '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
create(body: ProductCreateParams, options?: RequestOptions): APIPromise<ProductCreateResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Retrieve a product by its ID, including all metadata and historical changes.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const product = await client.v1.contracts.products.retrieve(
|
|
32
|
+
* { id: 'd84e7f4e-7a70-4fe4-be02-7a5027beffcc' },
|
|
33
|
+
* );
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
retrieve(body: ProductRetrieveParams, options?: RequestOptions): APIPromise<ProductRetrieveResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* Updates a product's configuration while maintaining billing continuity for
|
|
39
|
+
* active customers. Use this endpoint to modify product names, metrics, pricing
|
|
40
|
+
* rules, and composite settings without disrupting ongoing billing cycles. Changes
|
|
41
|
+
* are scheduled using the starting_at timestamp, which must be on an hour
|
|
42
|
+
* boundary—set future dates to schedule updates ahead of time, or past dates for
|
|
43
|
+
* retroactive changes. Returns the updated product ID upon success.
|
|
44
|
+
*
|
|
45
|
+
* ### Usage guidance:
|
|
46
|
+
*
|
|
47
|
+
* - Product type cannot be changed after creation. For incorrect product types,
|
|
48
|
+
* create a new product and archive the original instead.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const product = await client.v1.contracts.products.update({
|
|
53
|
+
* product_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
54
|
+
* starting_at: '2020-01-01T00:00:00.000Z',
|
|
55
|
+
* name: 'My Updated Product',
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
update(body: ProductUpdateParams, options?: RequestOptions): APIPromise<ProductUpdateResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* Get a paginated list of all products in your organization with their complete
|
|
62
|
+
* configuration, version history, and metadata. By default excludes archived
|
|
63
|
+
* products unless explicitly requested via the `archive_filter` parameter.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* // Automatically fetches more pages as needed.
|
|
68
|
+
* for await (const productListResponse of client.v1.contracts.products.list(
|
|
69
|
+
* { archive_filter: 'NOT_ARCHIVED' },
|
|
70
|
+
* )) {
|
|
71
|
+
* // ...
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
list(params?: ProductListParams | null | undefined, options?: RequestOptions): PagePromise<ProductListResponsesCursorPage, ProductListResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* Archive a product. Any current rate cards associated with this product will
|
|
78
|
+
* continue to function as normal. However, it will no longer be available as an
|
|
79
|
+
* option for newly created rates. Once you archive a product, you can still
|
|
80
|
+
* retrieve it in the UI and API, but you cannot unarchive it.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const response = await client.v1.contracts.products.archive(
|
|
85
|
+
* { product_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' },
|
|
86
|
+
* );
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
archive(body: ProductArchiveParams, options?: RequestOptions): APIPromise<ProductArchiveResponse>;
|
|
90
|
+
}
|
|
91
|
+
export type ProductListResponsesCursorPage = CursorPage<ProductListResponse>;
|
|
92
|
+
export interface ProductListItemState {
|
|
93
|
+
created_at: string;
|
|
94
|
+
created_by: string;
|
|
95
|
+
name: string;
|
|
96
|
+
billable_metric_id?: string;
|
|
97
|
+
composite_product_ids?: Array<string>;
|
|
98
|
+
composite_tags?: Array<string>;
|
|
99
|
+
exclude_free_usage?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* This field's availability is dependent on your client's configuration.
|
|
102
|
+
*/
|
|
103
|
+
is_refundable?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* This field's availability is dependent on your client's configuration.
|
|
106
|
+
*/
|
|
107
|
+
netsuite_internal_item_id?: string;
|
|
108
|
+
/**
|
|
109
|
+
* This field's availability is dependent on your client's configuration.
|
|
110
|
+
*/
|
|
111
|
+
netsuite_overage_item_id?: string;
|
|
112
|
+
/**
|
|
113
|
+
* For USAGE products only. Groups usage line items on invoices. The superset of
|
|
114
|
+
* values in the pricing group key and presentation group key must be set as one
|
|
115
|
+
* compound group key on the billable metric.
|
|
116
|
+
*/
|
|
117
|
+
presentation_group_key?: Array<string>;
|
|
118
|
+
/**
|
|
119
|
+
* For USAGE products only. If set, pricing for this product will be determined for
|
|
120
|
+
* each pricing_group_key value, as opposed to the product as a whole. The superset
|
|
121
|
+
* of values in the pricing group key and presentation group key must be set as one
|
|
122
|
+
* compound group key on the billable metric.
|
|
123
|
+
*/
|
|
124
|
+
pricing_group_key?: Array<string>;
|
|
125
|
+
/**
|
|
126
|
+
* Optional. Only valid for USAGE products. If provided, the quantity will be
|
|
127
|
+
* converted using the provided conversion factor and operation. For example, if
|
|
128
|
+
* the operation is "multiply" and the conversion factor is 100, then the quantity
|
|
129
|
+
* will be multiplied by 100. This can be used in cases where data is sent in one
|
|
130
|
+
* unit and priced in another. For example, data could be sent in MB and priced in
|
|
131
|
+
* GB. In this case, the conversion factor would be 1024 and the operation would be
|
|
132
|
+
* "divide".
|
|
133
|
+
*/
|
|
134
|
+
quantity_conversion?: QuantityConversion | null;
|
|
135
|
+
/**
|
|
136
|
+
* Optional. Only valid for USAGE products. If provided, the quantity will be
|
|
137
|
+
* rounded using the provided rounding method and decimal places. For example, if
|
|
138
|
+
* the method is "round up" and the decimal places is 0, then the quantity will be
|
|
139
|
+
* rounded up to the nearest integer.
|
|
140
|
+
*/
|
|
141
|
+
quantity_rounding?: QuantityRounding | null;
|
|
142
|
+
starting_at?: string;
|
|
143
|
+
tags?: Array<string>;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Optional. Only valid for USAGE products. If provided, the quantity will be
|
|
147
|
+
* converted using the provided conversion factor and operation. For example, if
|
|
148
|
+
* the operation is "multiply" and the conversion factor is 100, then the quantity
|
|
149
|
+
* will be multiplied by 100. This can be used in cases where data is sent in one
|
|
150
|
+
* unit and priced in another. For example, data could be sent in MB and priced in
|
|
151
|
+
* GB. In this case, the conversion factor would be 1024 and the operation would be
|
|
152
|
+
* "divide".
|
|
153
|
+
*/
|
|
154
|
+
export interface QuantityConversion {
|
|
155
|
+
/**
|
|
156
|
+
* The factor to multiply or divide the quantity by.
|
|
157
|
+
*/
|
|
158
|
+
conversion_factor: number;
|
|
159
|
+
/**
|
|
160
|
+
* The operation to perform on the quantity
|
|
161
|
+
*/
|
|
162
|
+
operation: 'MULTIPLY' | 'DIVIDE';
|
|
163
|
+
/**
|
|
164
|
+
* Optional name for this conversion.
|
|
165
|
+
*/
|
|
166
|
+
name?: string;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Optional. Only valid for USAGE products. If provided, the quantity will be
|
|
170
|
+
* rounded using the provided rounding method and decimal places. For example, if
|
|
171
|
+
* the method is "round up" and the decimal places is 0, then the quantity will be
|
|
172
|
+
* rounded up to the nearest integer.
|
|
173
|
+
*/
|
|
174
|
+
export interface QuantityRounding {
|
|
175
|
+
decimal_places: number;
|
|
176
|
+
rounding_method: 'ROUND_UP' | 'ROUND_DOWN' | 'ROUND_HALF_UP';
|
|
177
|
+
}
|
|
178
|
+
export interface ProductCreateResponse {
|
|
179
|
+
data: Shared.ID;
|
|
180
|
+
}
|
|
181
|
+
export interface ProductRetrieveResponse {
|
|
182
|
+
data: ProductRetrieveResponse.Data;
|
|
183
|
+
}
|
|
184
|
+
export declare namespace ProductRetrieveResponse {
|
|
185
|
+
interface Data {
|
|
186
|
+
id: string;
|
|
187
|
+
current: ProductsAPI.ProductListItemState;
|
|
188
|
+
initial: ProductsAPI.ProductListItemState;
|
|
189
|
+
type: 'USAGE' | 'SUBSCRIPTION' | 'COMPOSITE' | 'FIXED' | 'PRO_SERVICE';
|
|
190
|
+
updates: Array<Data.Update>;
|
|
191
|
+
archived_at?: string | null;
|
|
192
|
+
/**
|
|
193
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
194
|
+
*/
|
|
195
|
+
custom_fields?: {
|
|
196
|
+
[key: string]: string;
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
namespace Data {
|
|
200
|
+
interface Update {
|
|
201
|
+
created_at: string;
|
|
202
|
+
created_by: string;
|
|
203
|
+
billable_metric_id?: string;
|
|
204
|
+
composite_product_ids?: Array<string>;
|
|
205
|
+
composite_tags?: Array<string>;
|
|
206
|
+
exclude_free_usage?: boolean;
|
|
207
|
+
is_refundable?: boolean;
|
|
208
|
+
name?: string;
|
|
209
|
+
/**
|
|
210
|
+
* This field's availability is dependent on your client's configuration.
|
|
211
|
+
*/
|
|
212
|
+
netsuite_internal_item_id?: string;
|
|
213
|
+
/**
|
|
214
|
+
* This field's availability is dependent on your client's configuration.
|
|
215
|
+
*/
|
|
216
|
+
netsuite_overage_item_id?: string;
|
|
217
|
+
/**
|
|
218
|
+
* For USAGE products only. Groups usage line items on invoices. The superset of
|
|
219
|
+
* values in the pricing group key and presentation group key must be set as one
|
|
220
|
+
* compound group key on the billable metric.
|
|
221
|
+
*/
|
|
222
|
+
presentation_group_key?: Array<string>;
|
|
223
|
+
/**
|
|
224
|
+
* For USAGE products only. If set, pricing for this product will be determined for
|
|
225
|
+
* each pricing_group_key value, as opposed to the product as a whole. The superset
|
|
226
|
+
* of values in the pricing group key and presentation group key must be set as one
|
|
227
|
+
* compound group key on the billable metric.
|
|
228
|
+
*/
|
|
229
|
+
pricing_group_key?: Array<string>;
|
|
230
|
+
/**
|
|
231
|
+
* Optional. Only valid for USAGE products. If provided, the quantity will be
|
|
232
|
+
* converted using the provided conversion factor and operation. For example, if
|
|
233
|
+
* the operation is "multiply" and the conversion factor is 100, then the quantity
|
|
234
|
+
* will be multiplied by 100. This can be used in cases where data is sent in one
|
|
235
|
+
* unit and priced in another. For example, data could be sent in MB and priced in
|
|
236
|
+
* GB. In this case, the conversion factor would be 1024 and the operation would be
|
|
237
|
+
* "divide".
|
|
238
|
+
*/
|
|
239
|
+
quantity_conversion?: ProductsAPI.QuantityConversion | null;
|
|
240
|
+
/**
|
|
241
|
+
* Optional. Only valid for USAGE products. If provided, the quantity will be
|
|
242
|
+
* rounded using the provided rounding method and decimal places. For example, if
|
|
243
|
+
* the method is "round up" and the decimal places is 0, then the quantity will be
|
|
244
|
+
* rounded up to the nearest integer.
|
|
245
|
+
*/
|
|
246
|
+
quantity_rounding?: ProductsAPI.QuantityRounding | null;
|
|
247
|
+
starting_at?: string;
|
|
248
|
+
tags?: Array<string>;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
export interface ProductUpdateResponse {
|
|
253
|
+
data: Shared.ID;
|
|
254
|
+
}
|
|
255
|
+
export interface ProductListResponse {
|
|
256
|
+
id: string;
|
|
257
|
+
current: ProductListItemState;
|
|
258
|
+
initial: ProductListItemState;
|
|
259
|
+
type: 'USAGE' | 'SUBSCRIPTION' | 'COMPOSITE' | 'FIXED' | 'PRO_SERVICE';
|
|
260
|
+
updates: Array<ProductListResponse.Update>;
|
|
261
|
+
archived_at?: string | null;
|
|
262
|
+
/**
|
|
263
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
264
|
+
*/
|
|
265
|
+
custom_fields?: {
|
|
266
|
+
[key: string]: string;
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
export declare namespace ProductListResponse {
|
|
270
|
+
interface Update {
|
|
271
|
+
created_at: string;
|
|
272
|
+
created_by: string;
|
|
273
|
+
billable_metric_id?: string;
|
|
274
|
+
composite_product_ids?: Array<string>;
|
|
275
|
+
composite_tags?: Array<string>;
|
|
276
|
+
exclude_free_usage?: boolean;
|
|
277
|
+
is_refundable?: boolean;
|
|
278
|
+
name?: string;
|
|
279
|
+
/**
|
|
280
|
+
* This field's availability is dependent on your client's configuration.
|
|
281
|
+
*/
|
|
282
|
+
netsuite_internal_item_id?: string;
|
|
283
|
+
/**
|
|
284
|
+
* This field's availability is dependent on your client's configuration.
|
|
285
|
+
*/
|
|
286
|
+
netsuite_overage_item_id?: string;
|
|
287
|
+
/**
|
|
288
|
+
* For USAGE products only. Groups usage line items on invoices. The superset of
|
|
289
|
+
* values in the pricing group key and presentation group key must be set as one
|
|
290
|
+
* compound group key on the billable metric.
|
|
291
|
+
*/
|
|
292
|
+
presentation_group_key?: Array<string>;
|
|
293
|
+
/**
|
|
294
|
+
* For USAGE products only. If set, pricing for this product will be determined for
|
|
295
|
+
* each pricing_group_key value, as opposed to the product as a whole. The superset
|
|
296
|
+
* of values in the pricing group key and presentation group key must be set as one
|
|
297
|
+
* compound group key on the billable metric.
|
|
298
|
+
*/
|
|
299
|
+
pricing_group_key?: Array<string>;
|
|
300
|
+
/**
|
|
301
|
+
* Optional. Only valid for USAGE products. If provided, the quantity will be
|
|
302
|
+
* converted using the provided conversion factor and operation. For example, if
|
|
303
|
+
* the operation is "multiply" and the conversion factor is 100, then the quantity
|
|
304
|
+
* will be multiplied by 100. This can be used in cases where data is sent in one
|
|
305
|
+
* unit and priced in another. For example, data could be sent in MB and priced in
|
|
306
|
+
* GB. In this case, the conversion factor would be 1024 and the operation would be
|
|
307
|
+
* "divide".
|
|
308
|
+
*/
|
|
309
|
+
quantity_conversion?: ProductsAPI.QuantityConversion | null;
|
|
310
|
+
/**
|
|
311
|
+
* Optional. Only valid for USAGE products. If provided, the quantity will be
|
|
312
|
+
* rounded using the provided rounding method and decimal places. For example, if
|
|
313
|
+
* the method is "round up" and the decimal places is 0, then the quantity will be
|
|
314
|
+
* rounded up to the nearest integer.
|
|
315
|
+
*/
|
|
316
|
+
quantity_rounding?: ProductsAPI.QuantityRounding | null;
|
|
317
|
+
starting_at?: string;
|
|
318
|
+
tags?: Array<string>;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
export interface ProductArchiveResponse {
|
|
322
|
+
data: Shared.ID;
|
|
323
|
+
}
|
|
324
|
+
export interface ProductCreateParams {
|
|
325
|
+
/**
|
|
326
|
+
* displayed on invoices
|
|
327
|
+
*/
|
|
328
|
+
name: string;
|
|
329
|
+
type: 'FIXED' | 'USAGE' | 'COMPOSITE' | 'SUBSCRIPTION' | 'PROFESSIONAL_SERVICE' | 'PRO_SERVICE';
|
|
330
|
+
/**
|
|
331
|
+
* Required for USAGE products
|
|
332
|
+
*/
|
|
333
|
+
billable_metric_id?: string;
|
|
334
|
+
/**
|
|
335
|
+
* Required for COMPOSITE products
|
|
336
|
+
*/
|
|
337
|
+
composite_product_ids?: Array<string>;
|
|
338
|
+
/**
|
|
339
|
+
* Required for COMPOSITE products
|
|
340
|
+
*/
|
|
341
|
+
composite_tags?: Array<string>;
|
|
342
|
+
/**
|
|
343
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
344
|
+
*/
|
|
345
|
+
custom_fields?: {
|
|
346
|
+
[key: string]: string;
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* Beta feature only available for composite products. If true, products with $0
|
|
350
|
+
* will not be included when computing composite usage. Defaults to false
|
|
351
|
+
*/
|
|
352
|
+
exclude_free_usage?: boolean;
|
|
353
|
+
/**
|
|
354
|
+
* This field's availability is dependent on your client's configuration. Defaults
|
|
355
|
+
* to true.
|
|
356
|
+
*/
|
|
357
|
+
is_refundable?: boolean;
|
|
358
|
+
/**
|
|
359
|
+
* This field's availability is dependent on your client's configuration.
|
|
360
|
+
*/
|
|
361
|
+
netsuite_internal_item_id?: string;
|
|
362
|
+
/**
|
|
363
|
+
* This field's availability is dependent on your client's configuration.
|
|
364
|
+
*/
|
|
365
|
+
netsuite_overage_item_id?: string;
|
|
366
|
+
/**
|
|
367
|
+
* For USAGE products only. Groups usage line items on invoices. The superset of
|
|
368
|
+
* values in the pricing group key and presentation group key must be set as one
|
|
369
|
+
* compound group key on the billable metric.
|
|
370
|
+
*/
|
|
371
|
+
presentation_group_key?: Array<string>;
|
|
372
|
+
/**
|
|
373
|
+
* For USAGE products only. If set, pricing for this product will be determined for
|
|
374
|
+
* each pricing_group_key value, as opposed to the product as a whole. The superset
|
|
375
|
+
* of values in the pricing group key and presentation group key must be set as one
|
|
376
|
+
* compound group key on the billable metric.
|
|
377
|
+
*/
|
|
378
|
+
pricing_group_key?: Array<string>;
|
|
379
|
+
/**
|
|
380
|
+
* Optional. Only valid for USAGE products. If provided, the quantity will be
|
|
381
|
+
* converted using the provided conversion factor and operation. For example, if
|
|
382
|
+
* the operation is "multiply" and the conversion factor is 100, then the quantity
|
|
383
|
+
* will be multiplied by 100. This can be used in cases where data is sent in one
|
|
384
|
+
* unit and priced in another. For example, data could be sent in MB and priced in
|
|
385
|
+
* GB. In this case, the conversion factor would be 1024 and the operation would be
|
|
386
|
+
* "divide".
|
|
387
|
+
*/
|
|
388
|
+
quantity_conversion?: QuantityConversion | null;
|
|
389
|
+
/**
|
|
390
|
+
* Optional. Only valid for USAGE products. If provided, the quantity will be
|
|
391
|
+
* rounded using the provided rounding method and decimal places. For example, if
|
|
392
|
+
* the method is "round up" and the decimal places is 0, then the quantity will be
|
|
393
|
+
* rounded up to the nearest integer.
|
|
394
|
+
*/
|
|
395
|
+
quantity_rounding?: QuantityRounding | null;
|
|
396
|
+
tags?: Array<string>;
|
|
397
|
+
}
|
|
398
|
+
export interface ProductRetrieveParams {
|
|
399
|
+
id: string;
|
|
400
|
+
}
|
|
401
|
+
export interface ProductUpdateParams {
|
|
402
|
+
/**
|
|
403
|
+
* ID of the product to update
|
|
404
|
+
*/
|
|
405
|
+
product_id: string;
|
|
406
|
+
/**
|
|
407
|
+
* Timestamp representing when the update should go into effect. It must be on an
|
|
408
|
+
* hour boundary (e.g. 1:00, not 1:30).
|
|
409
|
+
*/
|
|
410
|
+
starting_at: string;
|
|
411
|
+
/**
|
|
412
|
+
* Available for USAGE products only. If not provided, defaults to product's
|
|
413
|
+
* current billable metric.
|
|
414
|
+
*/
|
|
415
|
+
billable_metric_id?: string;
|
|
416
|
+
/**
|
|
417
|
+
* Available for COMPOSITE products only. If not provided, defaults to product's
|
|
418
|
+
* current composite_product_ids.
|
|
419
|
+
*/
|
|
420
|
+
composite_product_ids?: Array<string>;
|
|
421
|
+
/**
|
|
422
|
+
* Available for COMPOSITE products only. If not provided, defaults to product's
|
|
423
|
+
* current composite_tags.
|
|
424
|
+
*/
|
|
425
|
+
composite_tags?: Array<string>;
|
|
426
|
+
/**
|
|
427
|
+
* Beta feature only available for composite products. If true, products with $0
|
|
428
|
+
* will not be included when computing composite usage. Defaults to false
|
|
429
|
+
*/
|
|
430
|
+
exclude_free_usage?: boolean;
|
|
431
|
+
/**
|
|
432
|
+
* Defaults to product's current refundability status. This field's availability is
|
|
433
|
+
* dependent on your client's configuration.
|
|
434
|
+
*/
|
|
435
|
+
is_refundable?: boolean;
|
|
436
|
+
/**
|
|
437
|
+
* displayed on invoices. If not provided, defaults to product's current name.
|
|
438
|
+
*/
|
|
439
|
+
name?: string;
|
|
440
|
+
/**
|
|
441
|
+
* If not provided, defaults to product's current netsuite_internal_item_id. This
|
|
442
|
+
* field's availability is dependent on your client's configuration.
|
|
443
|
+
*/
|
|
444
|
+
netsuite_internal_item_id?: string;
|
|
445
|
+
/**
|
|
446
|
+
* Available for USAGE and COMPOSITE products only. If not provided, defaults to
|
|
447
|
+
* product's current netsuite_overage_item_id. This field's availability is
|
|
448
|
+
* dependent on your client's configuration.
|
|
449
|
+
*/
|
|
450
|
+
netsuite_overage_item_id?: string;
|
|
451
|
+
/**
|
|
452
|
+
* For USAGE products only. Groups usage line items on invoices. The superset of
|
|
453
|
+
* values in the pricing group key and presentation group key must be set as one
|
|
454
|
+
* compound group key on the billable metric.
|
|
455
|
+
*/
|
|
456
|
+
presentation_group_key?: Array<string>;
|
|
457
|
+
/**
|
|
458
|
+
* For USAGE products only. If set, pricing for this product will be determined for
|
|
459
|
+
* each pricing_group_key value, as opposed to the product as a whole. The superset
|
|
460
|
+
* of values in the pricing group key and presentation group key must be set as one
|
|
461
|
+
* compound group key on the billable metric.
|
|
462
|
+
*/
|
|
463
|
+
pricing_group_key?: Array<string>;
|
|
464
|
+
/**
|
|
465
|
+
* Optional. Only valid for USAGE products. If provided, the quantity will be
|
|
466
|
+
* converted using the provided conversion factor and operation. For example, if
|
|
467
|
+
* the operation is "multiply" and the conversion factor is 100, then the quantity
|
|
468
|
+
* will be multiplied by 100. This can be used in cases where data is sent in one
|
|
469
|
+
* unit and priced in another. For example, data could be sent in MB and priced in
|
|
470
|
+
* GB. In this case, the conversion factor would be 1024 and the operation would be
|
|
471
|
+
* "divide".
|
|
472
|
+
*/
|
|
473
|
+
quantity_conversion?: QuantityConversion | null;
|
|
474
|
+
/**
|
|
475
|
+
* Optional. Only valid for USAGE products. If provided, the quantity will be
|
|
476
|
+
* rounded using the provided rounding method and decimal places. For example, if
|
|
477
|
+
* the method is "round up" and the decimal places is 0, then the quantity will be
|
|
478
|
+
* rounded up to the nearest integer.
|
|
479
|
+
*/
|
|
480
|
+
quantity_rounding?: QuantityRounding | null;
|
|
481
|
+
/**
|
|
482
|
+
* If not provided, defaults to product's current tags
|
|
483
|
+
*/
|
|
484
|
+
tags?: Array<string>;
|
|
485
|
+
}
|
|
486
|
+
export interface ProductListParams extends CursorPageParams {
|
|
487
|
+
/**
|
|
488
|
+
* Body param: Filter options for the product list. If not provided, defaults to
|
|
489
|
+
* not archived.
|
|
490
|
+
*/
|
|
491
|
+
archive_filter?: 'ARCHIVED' | 'NOT_ARCHIVED' | 'ALL';
|
|
492
|
+
}
|
|
493
|
+
export interface ProductArchiveParams {
|
|
494
|
+
/**
|
|
495
|
+
* ID of the product to be archived
|
|
496
|
+
*/
|
|
497
|
+
product_id: string;
|
|
498
|
+
}
|
|
499
|
+
export declare namespace Products {
|
|
500
|
+
export { type ProductListItemState as ProductListItemState, type QuantityConversion as QuantityConversion, type QuantityRounding as QuantityRounding, type ProductCreateResponse as ProductCreateResponse, type ProductRetrieveResponse as ProductRetrieveResponse, type ProductUpdateResponse as ProductUpdateResponse, type ProductListResponse as ProductListResponse, type ProductArchiveResponse as ProductArchiveResponse, type ProductListResponsesCursorPage as ProductListResponsesCursorPage, type ProductCreateParams as ProductCreateParams, type ProductRetrieveParams as ProductRetrieveParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, type ProductArchiveParams as ProductArchiveParams, };
|
|
501
|
+
}
|
|
502
|
+
//# sourceMappingURL=products.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"products.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/contracts/products.ts"],"names":[],"mapp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