@metronome/sdk 0.2.0 → 1.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 +62 -0
- 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 +53 -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 +116 -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 +2239 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +1409 -523
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.mts +203 -0
- package/resources/v1/alerts.d.mts.map +1 -0
- package/resources/v1/alerts.d.ts +78 -7
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/alerts.js +73 -3
- package/resources/v1/alerts.js.map +1 -1
- package/resources/v1/alerts.mjs +73 -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 +2984 -0
- package/resources/v1/contracts/contracts.d.mts.map +1 -0
- package/resources/v1/contracts/contracts.d.ts +450 -1285
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js +268 -50
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs +266 -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 +47 -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 +288 -0
- package/resources/v1/customers/alerts.d.mts.map +1 -0
- package/resources/v1/customers/alerts.d.ts +128 -23
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/alerts.js +112 -10
- package/resources/v1/customers/alerts.js.map +1 -1
- package/resources/v1/customers/alerts.mjs +112 -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 +145 -47
- package/resources/v1/customers/commits.d.ts.map +1 -1
- package/resources/v1/customers/commits.js +132 -12
- package/resources/v1/customers/commits.js.map +1 -1
- package/resources/v1/customers/commits.mjs +132 -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 +818 -0
- package/resources/v1/customers/customers.d.mts.map +1 -0
- package/resources/v1/customers/customers.d.ts +304 -41
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +214 -73
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +207 -41
- 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 +710 -0
- package/resources/v1/customers/invoices.d.mts.map +1 -0
- package/resources/v1/customers/invoices.d.ts +196 -19
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/customers/invoices.js +131 -22
- package/resources/v1/customers/invoices.js.map +1 -1
- package/resources/v1/customers/invoices.mjs +130 -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 +15 -0
- package/resources/v1/index.d.mts.map +1 -0
- package/resources/v1/index.d.ts +9 -9
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +1 -12
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +7 -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/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 +488 -0
- package/resources/v1/usage.d.mts.map +1 -0
- package/resources/v1/usage.d.ts +220 -57
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +212 -26
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +211 -24
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +58 -0
- package/resources/v1/v1.d.mts.map +1 -0
- package/resources/v1/v1.d.ts +15 -15
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +15 -48
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +8 -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 +2794 -0
- package/resources/v2/contracts.d.mts.map +1 -0
- package/resources/v2/contracts.d.ts +381 -3862
- 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 -220
- 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 +1786 -520
- package/src/resources/v1/alerts.ts +79 -8
- 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 +518 -1622
- 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 +52 -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 +147 -28
- package/src/resources/v1/customers/billing-config.ts +27 -13
- package/src/resources/v1/customers/commits.ts +153 -54
- package/src/resources/v1/customers/credits.ts +131 -53
- package/src/resources/v1/customers/customers.ts +390 -101
- package/src/resources/v1/customers/index.ts +19 -18
- package/src/resources/v1/customers/invoices.ts +206 -37
- 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 +32 -25
- package/src/resources/v1/invoices.ts +28 -9
- 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 +244 -72
- package/src/resources/v1/v1.ts +52 -49
- package/src/resources/v1.ts +1 -1
- package/src/resources/v2/contracts.ts +431 -4967
- 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
package/resources/shared.d.ts
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import * as Shared from "./shared.js";
|
|
2
|
+
import { BodyCursorPage } from "../core/pagination.js";
|
|
3
|
+
export interface BaseThresholdCommit {
|
|
4
|
+
/**
|
|
5
|
+
* The commit product that will be used to generate the line item for commit
|
|
6
|
+
* payment.
|
|
7
|
+
*/
|
|
8
|
+
product_id: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
12
|
+
* will default to the commit product name.
|
|
13
|
+
*/
|
|
14
|
+
name?: string;
|
|
15
|
+
}
|
|
2
16
|
export interface BaseUsageFilter {
|
|
3
17
|
group_key: string;
|
|
4
18
|
group_values: Array<string>;
|
|
@@ -6,6 +20,14 @@ export interface BaseUsageFilter {
|
|
|
6
20
|
}
|
|
7
21
|
export interface Commit {
|
|
8
22
|
id: string;
|
|
23
|
+
/**
|
|
24
|
+
* Timestamp of when the commit was created.
|
|
25
|
+
*
|
|
26
|
+
* - Recurring commits: latter of commit service period date and parent commit
|
|
27
|
+
* start date
|
|
28
|
+
* - Rollover commits: when the new contract started
|
|
29
|
+
*/
|
|
30
|
+
created_at: string;
|
|
9
31
|
product: Commit.Product;
|
|
10
32
|
type: 'PREPAID' | 'POSTPAID';
|
|
11
33
|
/**
|
|
@@ -37,6 +59,9 @@ export interface Commit {
|
|
|
37
59
|
*/
|
|
38
60
|
balance?: number;
|
|
39
61
|
contract?: Commit.Contract;
|
|
62
|
+
/**
|
|
63
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
64
|
+
*/
|
|
40
65
|
custom_fields?: {
|
|
41
66
|
[key: string]: string;
|
|
42
67
|
};
|
|
@@ -44,7 +69,7 @@ export interface Commit {
|
|
|
44
69
|
/**
|
|
45
70
|
* Optional configuration for commit hierarchy access control
|
|
46
71
|
*/
|
|
47
|
-
hierarchy_configuration?:
|
|
72
|
+
hierarchy_configuration?: CommitHierarchyConfiguration;
|
|
48
73
|
/**
|
|
49
74
|
* The contract that this commit will be billed on.
|
|
50
75
|
*/
|
|
@@ -80,7 +105,7 @@ export interface Commit {
|
|
|
80
105
|
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
81
106
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
82
107
|
*/
|
|
83
|
-
specifiers?: Array<
|
|
108
|
+
specifiers?: Array<CommitSpecifier>;
|
|
84
109
|
/**
|
|
85
110
|
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
86
111
|
* is made with a uniqueness key that was previously used to create a commit or
|
|
@@ -97,24 +122,6 @@ export declare namespace Commit {
|
|
|
97
122
|
interface Contract {
|
|
98
123
|
id: string;
|
|
99
124
|
}
|
|
100
|
-
/**
|
|
101
|
-
* Optional configuration for commit hierarchy access control
|
|
102
|
-
*/
|
|
103
|
-
interface HierarchyConfiguration {
|
|
104
|
-
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
105
|
-
}
|
|
106
|
-
namespace HierarchyConfiguration {
|
|
107
|
-
interface CommitHierarchyChildAccessAll {
|
|
108
|
-
type: 'ALL';
|
|
109
|
-
}
|
|
110
|
-
interface CommitHierarchyChildAccessNone {
|
|
111
|
-
type: 'NONE';
|
|
112
|
-
}
|
|
113
|
-
interface CommitHierarchyChildAccessContractIDs {
|
|
114
|
-
contract_ids: Array<string>;
|
|
115
|
-
type: 'CONTRACT_IDS';
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
125
|
/**
|
|
119
126
|
* The contract that this commit will be billed on.
|
|
120
127
|
*/
|
|
@@ -218,62 +225,248 @@ export declare namespace Commit {
|
|
|
218
225
|
commit_id: string;
|
|
219
226
|
contract_id: string;
|
|
220
227
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
+
}
|
|
229
|
+
export interface CommitHierarchyConfiguration {
|
|
230
|
+
child_access: CommitHierarchyConfiguration.CommitHierarchyChildAccessAll | CommitHierarchyConfiguration.CommitHierarchyChildAccessNone | CommitHierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
231
|
+
}
|
|
232
|
+
export declare namespace CommitHierarchyConfiguration {
|
|
233
|
+
interface CommitHierarchyChildAccessAll {
|
|
234
|
+
type: 'ALL';
|
|
235
|
+
}
|
|
236
|
+
interface CommitHierarchyChildAccessNone {
|
|
237
|
+
type: 'NONE';
|
|
238
|
+
}
|
|
239
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
240
|
+
contract_ids: Array<string>;
|
|
241
|
+
type: 'CONTRACT_IDS';
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* A distinct rate on the rate card. You can choose to use this rate rather than
|
|
246
|
+
* list rate when consuming a credit or commit.
|
|
247
|
+
*/
|
|
248
|
+
export interface CommitRate {
|
|
249
|
+
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
250
|
+
/**
|
|
251
|
+
* Commit rate price. For FLAT rate_type, this must be >=0.
|
|
252
|
+
*/
|
|
253
|
+
price?: number;
|
|
254
|
+
/**
|
|
255
|
+
* Only set for TIERED rate_type.
|
|
256
|
+
*/
|
|
257
|
+
tiers?: Array<Tier>;
|
|
258
|
+
}
|
|
259
|
+
export interface CommitSpecifier {
|
|
260
|
+
presentation_group_values?: {
|
|
261
|
+
[key: string]: string;
|
|
262
|
+
};
|
|
263
|
+
pricing_group_values?: {
|
|
264
|
+
[key: string]: string;
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
268
|
+
*/
|
|
269
|
+
product_id?: string;
|
|
270
|
+
/**
|
|
271
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
272
|
+
* tags.
|
|
273
|
+
*/
|
|
274
|
+
product_tags?: Array<string>;
|
|
275
|
+
}
|
|
276
|
+
export interface CommitSpecifierInput {
|
|
277
|
+
presentation_group_values?: {
|
|
278
|
+
[key: string]: string;
|
|
279
|
+
};
|
|
280
|
+
pricing_group_values?: {
|
|
281
|
+
[key: string]: string;
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
285
|
+
*/
|
|
286
|
+
product_id?: string;
|
|
287
|
+
/**
|
|
288
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
289
|
+
* tags.
|
|
290
|
+
*/
|
|
291
|
+
product_tags?: Array<string>;
|
|
292
|
+
}
|
|
293
|
+
export interface Contract {
|
|
294
|
+
id: string;
|
|
295
|
+
amendments: Array<Contract.Amendment>;
|
|
296
|
+
current: ContractWithoutAmendments;
|
|
297
|
+
customer_id: string;
|
|
298
|
+
initial: ContractWithoutAmendments;
|
|
299
|
+
/**
|
|
300
|
+
* RFC 3339 timestamp indicating when the contract was archived. If not returned,
|
|
301
|
+
* the contract is not archived.
|
|
302
|
+
*/
|
|
303
|
+
archived_at?: string;
|
|
304
|
+
/**
|
|
305
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
306
|
+
*/
|
|
307
|
+
custom_fields?: {
|
|
308
|
+
[key: string]: string;
|
|
309
|
+
};
|
|
310
|
+
/**
|
|
311
|
+
* The billing provider configuration associated with a contract.
|
|
312
|
+
*/
|
|
313
|
+
customer_billing_provider_configuration?: Contract.CustomerBillingProviderConfiguration;
|
|
314
|
+
prepaid_balance_threshold_configuration?: PrepaidBalanceThresholdConfiguration;
|
|
315
|
+
/**
|
|
316
|
+
* Priority of the contract.
|
|
317
|
+
*/
|
|
318
|
+
priority?: number;
|
|
319
|
+
/**
|
|
320
|
+
* Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
321
|
+
* usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
322
|
+
* `ending_before` date for consolidation to occur. This field cannot be modified
|
|
323
|
+
* after a Contract has been created. If this field is omitted, charges will appear
|
|
324
|
+
* on a separate invoice from usage charges.
|
|
325
|
+
*/
|
|
326
|
+
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
327
|
+
spend_threshold_configuration?: SpendThresholdConfiguration;
|
|
328
|
+
/**
|
|
329
|
+
* List of subscriptions on the contract.
|
|
330
|
+
*/
|
|
331
|
+
subscriptions?: Array<Subscription>;
|
|
332
|
+
/**
|
|
333
|
+
* Prevents the creation of duplicates. If a request to create a record is made
|
|
334
|
+
* with a previously used uniqueness key, a new record will not be created and the
|
|
335
|
+
* request will fail with a 409 error.
|
|
336
|
+
*/
|
|
337
|
+
uniqueness_key?: string;
|
|
338
|
+
}
|
|
339
|
+
export declare namespace Contract {
|
|
340
|
+
interface Amendment {
|
|
341
|
+
id: string;
|
|
342
|
+
commits: Array<Shared.Commit>;
|
|
343
|
+
created_at: string;
|
|
344
|
+
created_by: string;
|
|
345
|
+
overrides: Array<Shared.Override>;
|
|
346
|
+
scheduled_charges: Array<Shared.ScheduledCharge>;
|
|
347
|
+
starting_at: string;
|
|
348
|
+
credits?: Array<Shared.Credit>;
|
|
228
349
|
/**
|
|
229
|
-
*
|
|
350
|
+
* This field's availability is dependent on your client's configuration.
|
|
230
351
|
*/
|
|
231
|
-
|
|
352
|
+
discounts?: Array<Shared.Discount>;
|
|
232
353
|
/**
|
|
233
|
-
*
|
|
234
|
-
* tags.
|
|
354
|
+
* This field's availability is dependent on your client's configuration.
|
|
235
355
|
*/
|
|
236
|
-
|
|
356
|
+
netsuite_sales_order_id?: string;
|
|
357
|
+
/**
|
|
358
|
+
* This field's availability is dependent on your client's configuration.
|
|
359
|
+
*/
|
|
360
|
+
professional_services?: Array<Shared.ProService>;
|
|
361
|
+
/**
|
|
362
|
+
* This field's availability is dependent on your client's configuration.
|
|
363
|
+
*/
|
|
364
|
+
reseller_royalties?: Array<Amendment.ResellerRoyalty>;
|
|
365
|
+
/**
|
|
366
|
+
* This field's availability is dependent on your client's configuration.
|
|
367
|
+
*/
|
|
368
|
+
salesforce_opportunity_id?: string;
|
|
369
|
+
}
|
|
370
|
+
namespace Amendment {
|
|
371
|
+
interface ResellerRoyalty {
|
|
372
|
+
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
373
|
+
aws_account_number?: string;
|
|
374
|
+
aws_offer_id?: string;
|
|
375
|
+
aws_payer_reference_id?: string;
|
|
376
|
+
ending_before?: string | null;
|
|
377
|
+
fraction?: number;
|
|
378
|
+
gcp_account_id?: string;
|
|
379
|
+
gcp_offer_id?: string;
|
|
380
|
+
netsuite_reseller_id?: string;
|
|
381
|
+
reseller_contract_value?: number;
|
|
382
|
+
starting_at?: string;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* The billing provider configuration associated with a contract.
|
|
387
|
+
*/
|
|
388
|
+
interface CustomerBillingProviderConfiguration {
|
|
389
|
+
archived_at: string | null;
|
|
390
|
+
billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
391
|
+
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
392
|
+
id?: string;
|
|
393
|
+
/**
|
|
394
|
+
* Configuration for the billing provider. The structure of this object is specific
|
|
395
|
+
* to the billing provider.
|
|
396
|
+
*/
|
|
397
|
+
configuration?: {
|
|
398
|
+
[key: string]: unknown;
|
|
399
|
+
};
|
|
237
400
|
}
|
|
238
401
|
}
|
|
239
|
-
export interface
|
|
240
|
-
|
|
402
|
+
export interface ContractV2 {
|
|
403
|
+
id: string;
|
|
404
|
+
commits: Array<ContractV2.Commit>;
|
|
241
405
|
created_at: string;
|
|
242
406
|
created_by: string;
|
|
243
|
-
|
|
407
|
+
customer_id: string;
|
|
408
|
+
overrides: Array<ContractV2.Override>;
|
|
244
409
|
scheduled_charges: Array<ScheduledCharge>;
|
|
245
410
|
starting_at: string;
|
|
246
|
-
transitions: Array<
|
|
247
|
-
|
|
248
|
-
|
|
411
|
+
transitions: Array<ContractV2.Transition>;
|
|
412
|
+
usage_filter: Array<ContractV2.UsageFilter>;
|
|
413
|
+
usage_statement_schedule: ContractV2.UsageStatementSchedule;
|
|
414
|
+
archived_at?: string;
|
|
415
|
+
credits?: Array<ContractV2.Credit>;
|
|
416
|
+
/**
|
|
417
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
418
|
+
*/
|
|
419
|
+
custom_fields?: {
|
|
420
|
+
[key: string]: string;
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* This field's availability is dependent on your client's configuration.
|
|
424
|
+
*/
|
|
425
|
+
customer_billing_provider_configuration?: ContractV2.CustomerBillingProviderConfiguration;
|
|
249
426
|
/**
|
|
250
427
|
* This field's availability is dependent on your client's configuration.
|
|
251
428
|
*/
|
|
252
429
|
discounts?: Array<Discount>;
|
|
253
430
|
ending_before?: string;
|
|
431
|
+
/**
|
|
432
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
433
|
+
* respective list endpoints to get the full lists.
|
|
434
|
+
*/
|
|
435
|
+
has_more?: ContractV2.HasMore;
|
|
254
436
|
/**
|
|
255
437
|
* Either a **parent** configuration with a list of children or a **child**
|
|
256
438
|
* configuration with a single parent.
|
|
257
439
|
*/
|
|
258
|
-
hierarchy_configuration?:
|
|
440
|
+
hierarchy_configuration?: HierarchyConfiguration;
|
|
441
|
+
/**
|
|
442
|
+
* Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
443
|
+
* prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
444
|
+
* each multiplier; the one with the lowest priority value will be prioritized
|
|
445
|
+
* first.
|
|
446
|
+
*/
|
|
447
|
+
multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT';
|
|
259
448
|
name?: string;
|
|
260
449
|
net_payment_terms_days?: number;
|
|
261
450
|
/**
|
|
262
451
|
* This field's availability is dependent on your client's configuration.
|
|
263
452
|
*/
|
|
264
453
|
netsuite_sales_order_id?: string;
|
|
265
|
-
prepaid_balance_threshold_configuration?:
|
|
454
|
+
prepaid_balance_threshold_configuration?: PrepaidBalanceThresholdConfigurationV2;
|
|
455
|
+
/**
|
|
456
|
+
* Priority of the contract.
|
|
457
|
+
*/
|
|
458
|
+
priority?: number;
|
|
266
459
|
/**
|
|
267
460
|
* This field's availability is dependent on your client's configuration.
|
|
268
461
|
*/
|
|
269
462
|
professional_services?: Array<ProService>;
|
|
270
463
|
rate_card_id?: string;
|
|
271
|
-
recurring_commits?: Array<
|
|
272
|
-
recurring_credits?: Array<
|
|
464
|
+
recurring_commits?: Array<ContractV2.RecurringCommit>;
|
|
465
|
+
recurring_credits?: Array<ContractV2.RecurringCredit>;
|
|
273
466
|
/**
|
|
274
467
|
* This field's availability is dependent on your client's configuration.
|
|
275
468
|
*/
|
|
276
|
-
reseller_royalties?: Array<
|
|
469
|
+
reseller_royalties?: Array<ContractV2.ResellerRoyalty>;
|
|
277
470
|
/**
|
|
278
471
|
* This field's availability is dependent on your client's configuration.
|
|
279
472
|
*/
|
|
@@ -286,276 +479,509 @@ export interface ContractWithoutAmendments {
|
|
|
286
479
|
* on a separate invoice from usage charges.
|
|
287
480
|
*/
|
|
288
481
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
289
|
-
spend_threshold_configuration?:
|
|
482
|
+
spend_threshold_configuration?: SpendThresholdConfigurationV2;
|
|
290
483
|
/**
|
|
291
|
-
*
|
|
484
|
+
* List of subscriptions on the contract.
|
|
292
485
|
*/
|
|
486
|
+
subscriptions?: Array<Subscription>;
|
|
293
487
|
total_contract_value?: number;
|
|
294
|
-
|
|
488
|
+
/**
|
|
489
|
+
* Optional uniqueness key to prevent duplicate contract creations.
|
|
490
|
+
*/
|
|
491
|
+
uniqueness_key?: string;
|
|
295
492
|
}
|
|
296
|
-
export declare namespace
|
|
297
|
-
interface
|
|
298
|
-
from_contract_id: string;
|
|
299
|
-
to_contract_id: string;
|
|
300
|
-
type: 'SUPERSEDE' | 'RENEWAL';
|
|
301
|
-
}
|
|
302
|
-
interface UsageStatementSchedule {
|
|
303
|
-
/**
|
|
304
|
-
* Contract usage statements follow a selected cadence based on this date.
|
|
305
|
-
*/
|
|
306
|
-
billing_anchor_date: string;
|
|
307
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
308
|
-
}
|
|
309
|
-
interface ParentHierarchyConfiguration {
|
|
310
|
-
/**
|
|
311
|
-
* List of contracts that belong to this parent.
|
|
312
|
-
*/
|
|
313
|
-
children: Array<ParentHierarchyConfiguration.Child>;
|
|
314
|
-
}
|
|
315
|
-
namespace ParentHierarchyConfiguration {
|
|
316
|
-
interface Child {
|
|
317
|
-
contract_id: string;
|
|
318
|
-
customer_id: string;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
interface ChildHierarchyConfiguration {
|
|
322
|
-
/**
|
|
323
|
-
* The single parent contract/customer for this child.
|
|
324
|
-
*/
|
|
325
|
-
parent: ChildHierarchyConfiguration.Parent;
|
|
326
|
-
}
|
|
327
|
-
namespace ChildHierarchyConfiguration {
|
|
328
|
-
/**
|
|
329
|
-
* The single parent contract/customer for this child.
|
|
330
|
-
*/
|
|
331
|
-
interface Parent {
|
|
332
|
-
contract_id: string;
|
|
333
|
-
customer_id: string;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
interface PrepaidBalanceThresholdConfiguration {
|
|
337
|
-
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
338
|
-
/**
|
|
339
|
-
* When set to false, the contract will not be evaluated against the
|
|
340
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
341
|
-
* regardless of prior state.
|
|
342
|
-
*/
|
|
343
|
-
is_enabled: boolean;
|
|
344
|
-
payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
345
|
-
/**
|
|
346
|
-
* Specify the amount the balance should be recharged to.
|
|
347
|
-
*/
|
|
348
|
-
recharge_to_amount: number;
|
|
349
|
-
/**
|
|
350
|
-
* Specify the threshold amount for the contract. Each time the contract's prepaid
|
|
351
|
-
* balance lowers to this amount, a threshold charge will be initiated.
|
|
352
|
-
*/
|
|
353
|
-
threshold_amount: number;
|
|
354
|
-
/**
|
|
355
|
-
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
356
|
-
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
357
|
-
*/
|
|
358
|
-
custom_credit_type_id?: string;
|
|
359
|
-
}
|
|
360
|
-
namespace PrepaidBalanceThresholdConfiguration {
|
|
361
|
-
interface Commit {
|
|
362
|
-
/**
|
|
363
|
-
* The commit product that will be used to generate the line item for commit
|
|
364
|
-
* payment.
|
|
365
|
-
*/
|
|
366
|
-
product_id: string;
|
|
367
|
-
/**
|
|
368
|
-
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
369
|
-
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
370
|
-
* all products.
|
|
371
|
-
*/
|
|
372
|
-
applicable_product_ids?: Array<string>;
|
|
373
|
-
/**
|
|
374
|
-
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
375
|
-
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
376
|
-
* all products.
|
|
377
|
-
*/
|
|
378
|
-
applicable_product_tags?: Array<string>;
|
|
379
|
-
description?: string;
|
|
380
|
-
/**
|
|
381
|
-
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
382
|
-
* will default to the commit product name.
|
|
383
|
-
*/
|
|
384
|
-
name?: string;
|
|
385
|
-
/**
|
|
386
|
-
* List of filters that determine what kind of customer usage draws down a commit
|
|
387
|
-
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
388
|
-
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
389
|
-
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
390
|
-
*/
|
|
391
|
-
specifiers?: Array<Commit.Specifier>;
|
|
392
|
-
}
|
|
393
|
-
namespace Commit {
|
|
394
|
-
interface Specifier {
|
|
395
|
-
presentation_group_values?: {
|
|
396
|
-
[key: string]: string;
|
|
397
|
-
};
|
|
398
|
-
pricing_group_values?: {
|
|
399
|
-
[key: string]: string;
|
|
400
|
-
};
|
|
401
|
-
/**
|
|
402
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
403
|
-
*/
|
|
404
|
-
product_id?: string;
|
|
405
|
-
/**
|
|
406
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
407
|
-
* tags.
|
|
408
|
-
*/
|
|
409
|
-
product_tags?: Array<string>;
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
interface PaymentGateConfig {
|
|
413
|
-
/**
|
|
414
|
-
* Gate access to the commit balance based on successful collection of payment.
|
|
415
|
-
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
416
|
-
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
417
|
-
* wish to payment gate the commit balance.
|
|
418
|
-
*/
|
|
419
|
-
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
420
|
-
/**
|
|
421
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
422
|
-
*/
|
|
423
|
-
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
424
|
-
/**
|
|
425
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
426
|
-
*/
|
|
427
|
-
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
428
|
-
/**
|
|
429
|
-
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
430
|
-
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
431
|
-
* will default to NONE.
|
|
432
|
-
*/
|
|
433
|
-
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
434
|
-
}
|
|
435
|
-
namespace PaymentGateConfig {
|
|
436
|
-
/**
|
|
437
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
438
|
-
*/
|
|
439
|
-
interface PrecalculatedTaxConfig {
|
|
440
|
-
/**
|
|
441
|
-
* Amount of tax to be applied. This should be in the same currency and
|
|
442
|
-
* denomination as the commit's invoice schedule
|
|
443
|
-
*/
|
|
444
|
-
tax_amount: number;
|
|
445
|
-
/**
|
|
446
|
-
* Name of the tax to be applied. This may be used in an invoice line item
|
|
447
|
-
* description.
|
|
448
|
-
*/
|
|
449
|
-
tax_name?: string;
|
|
450
|
-
}
|
|
451
|
-
/**
|
|
452
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
453
|
-
*/
|
|
454
|
-
interface StripeConfig {
|
|
455
|
-
/**
|
|
456
|
-
* If left blank, will default to INVOICE
|
|
457
|
-
*/
|
|
458
|
-
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
459
|
-
/**
|
|
460
|
-
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
461
|
-
* your payment type.
|
|
462
|
-
*/
|
|
463
|
-
invoice_metadata?: {
|
|
464
|
-
[key: string]: string;
|
|
465
|
-
};
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
interface RecurringCommit {
|
|
493
|
+
export declare namespace ContractV2 {
|
|
494
|
+
interface Commit {
|
|
470
495
|
id: string;
|
|
471
496
|
/**
|
|
472
|
-
*
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
*
|
|
477
|
-
*/
|
|
478
|
-
commit_duration: RecurringCommit.CommitDuration;
|
|
479
|
-
/**
|
|
480
|
-
* Will be passed down to the individual commits
|
|
481
|
-
*/
|
|
482
|
-
priority: number;
|
|
483
|
-
product: RecurringCommit.Product;
|
|
484
|
-
/**
|
|
485
|
-
* Whether the created commits will use the commit rate or list rate
|
|
486
|
-
*/
|
|
487
|
-
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
488
|
-
/**
|
|
489
|
-
* Determines the start time for the first commit
|
|
497
|
+
* Timestamp of when the commit was created.
|
|
498
|
+
*
|
|
499
|
+
* - Recurring commits: latter of commit service period date and parent commit
|
|
500
|
+
* start date
|
|
501
|
+
* - Rollover commits: when the new contract started
|
|
490
502
|
*/
|
|
491
|
-
|
|
503
|
+
created_at: string;
|
|
504
|
+
product: Commit.Product;
|
|
505
|
+
type: 'PREPAID' | 'POSTPAID';
|
|
492
506
|
/**
|
|
493
|
-
*
|
|
507
|
+
* The schedule that the customer will gain access to the credits purposed with
|
|
508
|
+
* this commit.
|
|
494
509
|
*/
|
|
510
|
+
access_schedule?: Shared.ScheduleDuration;
|
|
511
|
+
applicable_contract_ids?: Array<string>;
|
|
495
512
|
applicable_product_ids?: Array<string>;
|
|
513
|
+
applicable_product_tags?: Array<string>;
|
|
514
|
+
archived_at?: string;
|
|
496
515
|
/**
|
|
497
|
-
*
|
|
516
|
+
* The current balance of the credit or commit. This balance reflects the amount of
|
|
517
|
+
* credit or commit that the customer has access to use at this moment - thus,
|
|
518
|
+
* expired and upcoming credit or commit segments contribute 0 to the balance. The
|
|
519
|
+
* balance will match the sum of all ledger entries with the exception of the case
|
|
520
|
+
* where the sum of negative manual ledger entries exceeds the positive amount
|
|
521
|
+
* remaining on the credit or commit - in that case, the balance will be 0. All
|
|
522
|
+
* manual ledger entries associated with active credit or commit segments are
|
|
523
|
+
* included in the balance, including future-dated manual ledger entries.
|
|
498
524
|
*/
|
|
499
|
-
|
|
500
|
-
contract?:
|
|
525
|
+
balance?: number;
|
|
526
|
+
contract?: Commit.Contract;
|
|
501
527
|
/**
|
|
502
|
-
*
|
|
528
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
503
529
|
*/
|
|
530
|
+
custom_fields?: {
|
|
531
|
+
[key: string]: string;
|
|
532
|
+
};
|
|
504
533
|
description?: string;
|
|
505
534
|
/**
|
|
506
|
-
*
|
|
535
|
+
* Optional configuration for commit hierarchy access control
|
|
507
536
|
*/
|
|
508
|
-
|
|
537
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
509
538
|
/**
|
|
510
|
-
*
|
|
539
|
+
* The contract that this commit will be billed on.
|
|
511
540
|
*/
|
|
512
|
-
|
|
541
|
+
invoice_contract?: Commit.InvoiceContract;
|
|
513
542
|
/**
|
|
514
|
-
* The
|
|
543
|
+
* The schedule that the customer will be invoiced for this commit.
|
|
515
544
|
*/
|
|
516
|
-
|
|
545
|
+
invoice_schedule?: Shared.SchedulePointInTime;
|
|
517
546
|
/**
|
|
518
|
-
*
|
|
547
|
+
* A list of ordered events that impact the balance of a commit. For example, an
|
|
548
|
+
* invoice deduction or a rollover.
|
|
519
549
|
*/
|
|
550
|
+
ledger?: Array<Commit.PrepaidCommitSegmentStartLedgerEntry | Commit.PrepaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PrepaidCommitRolloverLedgerEntry | Commit.PrepaidCommitExpirationLedgerEntry | Commit.PrepaidCommitCanceledLedgerEntry | Commit.PrepaidCommitCreditedLedgerEntry | Commit.PrepaidCommitSeatBasedAdjustmentLedgerEntry | Commit.PostpaidCommitInitialBalanceLedgerEntry | Commit.PostpaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PostpaidCommitRolloverLedgerEntry | Commit.PostpaidCommitTrueupLedgerEntry | Commit.PrepaidCommitManualLedgerEntry | Commit.PostpaidCommitManualLedgerEntry | Commit.PostpaidCommitExpirationLedgerEntry>;
|
|
520
551
|
name?: string;
|
|
521
552
|
/**
|
|
522
|
-
*
|
|
553
|
+
* This field's availability is dependent on your client's configuration.
|
|
523
554
|
*/
|
|
524
555
|
netsuite_sales_order_id?: string;
|
|
525
556
|
/**
|
|
526
|
-
*
|
|
527
|
-
*
|
|
528
|
-
*/
|
|
529
|
-
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
530
|
-
/**
|
|
531
|
-
* The frequency at which the recurring commits will be created. If not provided: -
|
|
532
|
-
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
533
|
-
* period defined in the duration will correspond to this frequency. - Commits will
|
|
534
|
-
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
535
|
-
* invoice dates.
|
|
557
|
+
* If multiple credits or commits are applicable, the one with the lower priority
|
|
558
|
+
* will apply first.
|
|
536
559
|
*/
|
|
537
|
-
|
|
560
|
+
priority?: number;
|
|
561
|
+
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
562
|
+
rolled_over_from?: Commit.RolledOverFrom;
|
|
563
|
+
rollover_fraction?: number;
|
|
538
564
|
/**
|
|
539
|
-
*
|
|
540
|
-
* individual unexpired commit will roll over upon contract transition. Must be
|
|
541
|
-
* between 0 and 1.
|
|
565
|
+
* This field's availability is dependent on your client's configuration.
|
|
542
566
|
*/
|
|
543
|
-
|
|
567
|
+
salesforce_opportunity_id?: string;
|
|
544
568
|
/**
|
|
545
569
|
* List of filters that determine what kind of customer usage draws down a commit
|
|
546
570
|
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
547
571
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
548
572
|
*/
|
|
549
|
-
specifiers?: Array<
|
|
550
|
-
/**
|
|
551
|
-
* Attach a subscription to the recurring commit/credit.
|
|
552
|
-
*/
|
|
553
|
-
subscription_config?: RecurringCommit.SubscriptionConfig;
|
|
573
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
554
574
|
}
|
|
555
|
-
namespace
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
575
|
+
namespace Commit {
|
|
576
|
+
interface Product {
|
|
577
|
+
id: string;
|
|
578
|
+
name: string;
|
|
579
|
+
}
|
|
580
|
+
interface Contract {
|
|
581
|
+
id: string;
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* The contract that this commit will be billed on.
|
|
585
|
+
*/
|
|
586
|
+
interface InvoiceContract {
|
|
587
|
+
id: string;
|
|
588
|
+
}
|
|
589
|
+
interface PrepaidCommitSegmentStartLedgerEntry {
|
|
590
|
+
amount: number;
|
|
591
|
+
segment_id: string;
|
|
592
|
+
timestamp: string;
|
|
593
|
+
type: 'PREPAID_COMMIT_SEGMENT_START';
|
|
594
|
+
}
|
|
595
|
+
interface PrepaidCommitAutomatedInvoiceDeductionLedgerEntry {
|
|
596
|
+
amount: number;
|
|
597
|
+
invoice_id: string;
|
|
598
|
+
segment_id: string;
|
|
599
|
+
timestamp: string;
|
|
600
|
+
type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
601
|
+
contract_id?: string;
|
|
602
|
+
}
|
|
603
|
+
interface PrepaidCommitRolloverLedgerEntry {
|
|
604
|
+
amount: number;
|
|
605
|
+
new_contract_id: string;
|
|
606
|
+
segment_id: string;
|
|
607
|
+
timestamp: string;
|
|
608
|
+
type: 'PREPAID_COMMIT_ROLLOVER';
|
|
609
|
+
}
|
|
610
|
+
interface PrepaidCommitExpirationLedgerEntry {
|
|
611
|
+
amount: number;
|
|
612
|
+
segment_id: string;
|
|
613
|
+
timestamp: string;
|
|
614
|
+
type: 'PREPAID_COMMIT_EXPIRATION';
|
|
615
|
+
}
|
|
616
|
+
interface PrepaidCommitCanceledLedgerEntry {
|
|
617
|
+
amount: number;
|
|
618
|
+
invoice_id: string;
|
|
619
|
+
segment_id: string;
|
|
620
|
+
timestamp: string;
|
|
621
|
+
type: 'PREPAID_COMMIT_CANCELED';
|
|
622
|
+
contract_id?: string;
|
|
623
|
+
}
|
|
624
|
+
interface PrepaidCommitCreditedLedgerEntry {
|
|
625
|
+
amount: number;
|
|
626
|
+
invoice_id: string;
|
|
627
|
+
segment_id: string;
|
|
628
|
+
timestamp: string;
|
|
629
|
+
type: 'PREPAID_COMMIT_CREDITED';
|
|
630
|
+
contract_id?: string;
|
|
631
|
+
}
|
|
632
|
+
interface PrepaidCommitSeatBasedAdjustmentLedgerEntry {
|
|
633
|
+
amount: number;
|
|
634
|
+
segment_id: string;
|
|
635
|
+
timestamp: string;
|
|
636
|
+
type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT';
|
|
637
|
+
}
|
|
638
|
+
interface PostpaidCommitInitialBalanceLedgerEntry {
|
|
639
|
+
amount: number;
|
|
640
|
+
timestamp: string;
|
|
641
|
+
type: 'POSTPAID_COMMIT_INITIAL_BALANCE';
|
|
642
|
+
}
|
|
643
|
+
interface PostpaidCommitAutomatedInvoiceDeductionLedgerEntry {
|
|
644
|
+
amount: number;
|
|
645
|
+
invoice_id: string;
|
|
646
|
+
segment_id: string;
|
|
647
|
+
timestamp: string;
|
|
648
|
+
type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
649
|
+
contract_id?: string;
|
|
650
|
+
}
|
|
651
|
+
interface PostpaidCommitRolloverLedgerEntry {
|
|
652
|
+
amount: number;
|
|
653
|
+
new_contract_id: string;
|
|
654
|
+
segment_id: string;
|
|
655
|
+
timestamp: string;
|
|
656
|
+
type: 'POSTPAID_COMMIT_ROLLOVER';
|
|
657
|
+
}
|
|
658
|
+
interface PostpaidCommitTrueupLedgerEntry {
|
|
659
|
+
amount: number;
|
|
660
|
+
invoice_id: string;
|
|
661
|
+
timestamp: string;
|
|
662
|
+
type: 'POSTPAID_COMMIT_TRUEUP';
|
|
663
|
+
contract_id?: string;
|
|
664
|
+
}
|
|
665
|
+
interface PrepaidCommitManualLedgerEntry {
|
|
666
|
+
amount: number;
|
|
667
|
+
reason: string;
|
|
668
|
+
timestamp: string;
|
|
669
|
+
type: 'PREPAID_COMMIT_MANUAL';
|
|
670
|
+
}
|
|
671
|
+
interface PostpaidCommitManualLedgerEntry {
|
|
672
|
+
amount: number;
|
|
673
|
+
reason: string;
|
|
674
|
+
timestamp: string;
|
|
675
|
+
type: 'POSTPAID_COMMIT_MANUAL';
|
|
676
|
+
}
|
|
677
|
+
interface PostpaidCommitExpirationLedgerEntry {
|
|
678
|
+
amount: number;
|
|
679
|
+
timestamp: string;
|
|
680
|
+
type: 'POSTPAID_COMMIT_EXPIRATION';
|
|
681
|
+
}
|
|
682
|
+
interface RolledOverFrom {
|
|
683
|
+
commit_id: string;
|
|
684
|
+
contract_id: string;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
interface Override {
|
|
688
|
+
id: string;
|
|
689
|
+
starting_at: string;
|
|
690
|
+
applicable_product_tags?: Array<string>;
|
|
691
|
+
ending_before?: string;
|
|
692
|
+
entitled?: boolean;
|
|
693
|
+
is_commit_specific?: boolean;
|
|
694
|
+
multiplier?: number;
|
|
695
|
+
override_specifiers?: Array<Override.OverrideSpecifier>;
|
|
696
|
+
override_tiers?: Array<Shared.OverrideTier>;
|
|
697
|
+
overwrite_rate?: Shared.OverwriteRate;
|
|
698
|
+
priority?: number;
|
|
699
|
+
product?: Override.Product;
|
|
700
|
+
target?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
701
|
+
type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED';
|
|
702
|
+
}
|
|
703
|
+
namespace Override {
|
|
704
|
+
interface OverrideSpecifier {
|
|
705
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
706
|
+
commit_ids?: Array<string>;
|
|
707
|
+
presentation_group_values?: {
|
|
708
|
+
[key: string]: string | null;
|
|
709
|
+
};
|
|
710
|
+
pricing_group_values?: {
|
|
711
|
+
[key: string]: string;
|
|
712
|
+
};
|
|
713
|
+
product_id?: string;
|
|
714
|
+
product_tags?: Array<string>;
|
|
715
|
+
recurring_commit_ids?: Array<string>;
|
|
716
|
+
recurring_credit_ids?: Array<string>;
|
|
717
|
+
}
|
|
718
|
+
interface Product {
|
|
719
|
+
id: string;
|
|
720
|
+
name: string;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
interface Transition {
|
|
724
|
+
from_contract_id: string;
|
|
725
|
+
to_contract_id: string;
|
|
726
|
+
type: 'SUPERSEDE' | 'RENEWAL';
|
|
727
|
+
}
|
|
728
|
+
interface UsageFilter {
|
|
729
|
+
group_key: string;
|
|
730
|
+
group_values: Array<string>;
|
|
731
|
+
/**
|
|
732
|
+
* This will match contract starting_at value if usage filter is active from the
|
|
733
|
+
* beginning of the contract.
|
|
734
|
+
*/
|
|
735
|
+
starting_at: string;
|
|
736
|
+
/**
|
|
737
|
+
* This will match contract ending_before value if usage filter is active until the
|
|
738
|
+
* end of the contract. It will be undefined if the contract is open-ended.
|
|
739
|
+
*/
|
|
740
|
+
ending_before?: string;
|
|
741
|
+
}
|
|
742
|
+
interface UsageStatementSchedule {
|
|
743
|
+
/**
|
|
744
|
+
* Contract usage statements follow a selected cadence based on this date.
|
|
745
|
+
*/
|
|
746
|
+
billing_anchor_date: string;
|
|
747
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
748
|
+
}
|
|
749
|
+
interface Credit {
|
|
750
|
+
id: string;
|
|
751
|
+
product: Credit.Product;
|
|
752
|
+
type: 'CREDIT';
|
|
753
|
+
/**
|
|
754
|
+
* The schedule that the customer will gain access to the credits.
|
|
755
|
+
*/
|
|
756
|
+
access_schedule?: Shared.ScheduleDuration;
|
|
757
|
+
applicable_contract_ids?: Array<string>;
|
|
758
|
+
applicable_product_ids?: Array<string>;
|
|
759
|
+
applicable_product_tags?: Array<string>;
|
|
760
|
+
/**
|
|
761
|
+
* The current balance of the credit or commit. This balance reflects the amount of
|
|
762
|
+
* credit or commit that the customer has access to use at this moment - thus,
|
|
763
|
+
* expired and upcoming credit or commit segments contribute 0 to the balance. The
|
|
764
|
+
* balance will match the sum of all ledger entries with the exception of the case
|
|
765
|
+
* where the sum of negative manual ledger entries exceeds the positive amount
|
|
766
|
+
* remaining on the credit or commit - in that case, the balance will be 0. All
|
|
767
|
+
* manual ledger entries associated with active credit or commit segments are
|
|
768
|
+
* included in the balance, including future-dated manual ledger entries.
|
|
769
|
+
*/
|
|
770
|
+
balance?: number;
|
|
771
|
+
contract?: Credit.Contract;
|
|
772
|
+
/**
|
|
773
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
774
|
+
*/
|
|
775
|
+
custom_fields?: {
|
|
776
|
+
[key: string]: string;
|
|
777
|
+
};
|
|
778
|
+
description?: string;
|
|
779
|
+
/**
|
|
780
|
+
* Optional configuration for credit hierarchy access control
|
|
781
|
+
*/
|
|
782
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
783
|
+
/**
|
|
784
|
+
* A list of ordered events that impact the balance of a credit. For example, an
|
|
785
|
+
* invoice deduction or an expiration.
|
|
786
|
+
*/
|
|
787
|
+
ledger?: Array<Credit.CreditSegmentStartLedgerEntry | Credit.CreditAutomatedInvoiceDeductionLedgerEntry | Credit.CreditExpirationLedgerEntry | Credit.CreditCanceledLedgerEntry | Credit.CreditCreditedLedgerEntry | Credit.CreditManualLedgerEntry | Credit.CreditSeatBasedAdjustmentLedgerEntry>;
|
|
788
|
+
name?: string;
|
|
789
|
+
/**
|
|
790
|
+
* This field's availability is dependent on your client's configuration.
|
|
791
|
+
*/
|
|
792
|
+
netsuite_sales_order_id?: string;
|
|
793
|
+
/**
|
|
794
|
+
* If multiple credits or commits are applicable, the one with the lower priority
|
|
795
|
+
* will apply first.
|
|
796
|
+
*/
|
|
797
|
+
priority?: number;
|
|
798
|
+
/**
|
|
799
|
+
* This field's availability is dependent on your client's configuration.
|
|
800
|
+
*/
|
|
801
|
+
salesforce_opportunity_id?: string;
|
|
802
|
+
/**
|
|
803
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
804
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
805
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
806
|
+
*/
|
|
807
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
808
|
+
}
|
|
809
|
+
namespace Credit {
|
|
810
|
+
interface Product {
|
|
811
|
+
id: string;
|
|
812
|
+
name: string;
|
|
813
|
+
}
|
|
814
|
+
interface Contract {
|
|
815
|
+
id: string;
|
|
816
|
+
}
|
|
817
|
+
interface CreditSegmentStartLedgerEntry {
|
|
818
|
+
amount: number;
|
|
819
|
+
segment_id: string;
|
|
820
|
+
timestamp: string;
|
|
821
|
+
type: 'CREDIT_SEGMENT_START';
|
|
822
|
+
}
|
|
823
|
+
interface CreditAutomatedInvoiceDeductionLedgerEntry {
|
|
824
|
+
amount: number;
|
|
825
|
+
invoice_id: string;
|
|
826
|
+
segment_id: string;
|
|
827
|
+
timestamp: string;
|
|
828
|
+
type: 'CREDIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
829
|
+
contract_id?: string;
|
|
830
|
+
}
|
|
831
|
+
interface CreditExpirationLedgerEntry {
|
|
832
|
+
amount: number;
|
|
833
|
+
segment_id: string;
|
|
834
|
+
timestamp: string;
|
|
835
|
+
type: 'CREDIT_EXPIRATION';
|
|
836
|
+
}
|
|
837
|
+
interface CreditCanceledLedgerEntry {
|
|
838
|
+
amount: number;
|
|
839
|
+
invoice_id: string;
|
|
840
|
+
segment_id: string;
|
|
841
|
+
timestamp: string;
|
|
842
|
+
type: 'CREDIT_CANCELED';
|
|
843
|
+
contract_id?: string;
|
|
844
|
+
}
|
|
845
|
+
interface CreditCreditedLedgerEntry {
|
|
846
|
+
amount: number;
|
|
847
|
+
invoice_id: string;
|
|
848
|
+
segment_id: string;
|
|
849
|
+
timestamp: string;
|
|
850
|
+
type: 'CREDIT_CREDITED';
|
|
851
|
+
contract_id?: string;
|
|
852
|
+
}
|
|
853
|
+
interface CreditManualLedgerEntry {
|
|
854
|
+
amount: number;
|
|
855
|
+
reason: string;
|
|
856
|
+
timestamp: string;
|
|
857
|
+
type: 'CREDIT_MANUAL';
|
|
858
|
+
}
|
|
859
|
+
interface CreditSeatBasedAdjustmentLedgerEntry {
|
|
860
|
+
amount: number;
|
|
861
|
+
segment_id: string;
|
|
862
|
+
timestamp: string;
|
|
863
|
+
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
/**
|
|
867
|
+
* This field's availability is dependent on your client's configuration.
|
|
868
|
+
*/
|
|
869
|
+
interface CustomerBillingProviderConfiguration {
|
|
870
|
+
/**
|
|
871
|
+
* ID of Customer's billing provider configuration.
|
|
872
|
+
*/
|
|
873
|
+
id: string;
|
|
874
|
+
billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
875
|
+
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
879
|
+
* respective list endpoints to get the full lists.
|
|
880
|
+
*/
|
|
881
|
+
interface HasMore {
|
|
882
|
+
/**
|
|
883
|
+
* Whether there are more commits on this contract than the limit for this
|
|
884
|
+
* endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
|
|
885
|
+
* of commits.
|
|
886
|
+
*/
|
|
887
|
+
commits: boolean;
|
|
888
|
+
/**
|
|
889
|
+
* Whether there are more credits on this contract than the limit for this
|
|
890
|
+
* endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
|
|
891
|
+
* of credits.
|
|
892
|
+
*/
|
|
893
|
+
credits: boolean;
|
|
894
|
+
}
|
|
895
|
+
interface RecurringCommit {
|
|
896
|
+
id: string;
|
|
897
|
+
/**
|
|
898
|
+
* The amount of commit to grant.
|
|
899
|
+
*/
|
|
900
|
+
access_amount: RecurringCommit.AccessAmount;
|
|
901
|
+
/**
|
|
902
|
+
* The amount of time the created commits will be valid for
|
|
903
|
+
*/
|
|
904
|
+
commit_duration: RecurringCommit.CommitDuration;
|
|
905
|
+
/**
|
|
906
|
+
* Will be passed down to the individual commits
|
|
907
|
+
*/
|
|
908
|
+
priority: number;
|
|
909
|
+
product: RecurringCommit.Product;
|
|
910
|
+
/**
|
|
911
|
+
* Whether the created commits will use the commit rate or list rate
|
|
912
|
+
*/
|
|
913
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
914
|
+
/**
|
|
915
|
+
* Determines the start time for the first commit
|
|
916
|
+
*/
|
|
917
|
+
starting_at: string;
|
|
918
|
+
/**
|
|
919
|
+
* Will be passed down to the individual commits
|
|
920
|
+
*/
|
|
921
|
+
applicable_product_ids?: Array<string>;
|
|
922
|
+
/**
|
|
923
|
+
* Will be passed down to the individual commits
|
|
924
|
+
*/
|
|
925
|
+
applicable_product_tags?: Array<string>;
|
|
926
|
+
contract?: RecurringCommit.Contract;
|
|
927
|
+
/**
|
|
928
|
+
* Will be passed down to the individual commits
|
|
929
|
+
*/
|
|
930
|
+
description?: string;
|
|
931
|
+
/**
|
|
932
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
933
|
+
*/
|
|
934
|
+
ending_before?: string;
|
|
935
|
+
/**
|
|
936
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
937
|
+
*/
|
|
938
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
939
|
+
/**
|
|
940
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
941
|
+
*/
|
|
942
|
+
invoice_amount?: RecurringCommit.InvoiceAmount;
|
|
943
|
+
/**
|
|
944
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
945
|
+
*/
|
|
946
|
+
name?: string;
|
|
947
|
+
/**
|
|
948
|
+
* Will be passed down to the individual commits
|
|
949
|
+
*/
|
|
950
|
+
netsuite_sales_order_id?: string;
|
|
951
|
+
/**
|
|
952
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
953
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
954
|
+
*/
|
|
955
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
956
|
+
/**
|
|
957
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
958
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
959
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
960
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
961
|
+
* invoice dates.
|
|
962
|
+
*/
|
|
963
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
964
|
+
/**
|
|
965
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
966
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
967
|
+
* between 0 and 1.
|
|
968
|
+
*/
|
|
969
|
+
rollover_fraction?: number;
|
|
970
|
+
/**
|
|
971
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
972
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
973
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
974
|
+
*/
|
|
975
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
976
|
+
/**
|
|
977
|
+
* Attach a subscription to the recurring commit/credit.
|
|
978
|
+
*/
|
|
979
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
980
|
+
}
|
|
981
|
+
namespace RecurringCommit {
|
|
982
|
+
/**
|
|
983
|
+
* The amount of commit to grant.
|
|
984
|
+
*/
|
|
559
985
|
interface AccessAmount {
|
|
560
986
|
credit_type_id: string;
|
|
561
987
|
unit_price: number;
|
|
@@ -576,63 +1002,328 @@ export declare namespace ContractWithoutAmendments {
|
|
|
576
1002
|
id: string;
|
|
577
1003
|
}
|
|
578
1004
|
/**
|
|
579
|
-
*
|
|
1005
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
1006
|
+
*/
|
|
1007
|
+
interface InvoiceAmount {
|
|
1008
|
+
credit_type_id: string;
|
|
1009
|
+
quantity: number;
|
|
1010
|
+
unit_price: number;
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
interface RecurringCredit {
|
|
1014
|
+
id: string;
|
|
1015
|
+
/**
|
|
1016
|
+
* The amount of commit to grant.
|
|
1017
|
+
*/
|
|
1018
|
+
access_amount: RecurringCredit.AccessAmount;
|
|
1019
|
+
/**
|
|
1020
|
+
* The amount of time the created commits will be valid for
|
|
1021
|
+
*/
|
|
1022
|
+
commit_duration: RecurringCredit.CommitDuration;
|
|
1023
|
+
/**
|
|
1024
|
+
* Will be passed down to the individual commits
|
|
1025
|
+
*/
|
|
1026
|
+
priority: number;
|
|
1027
|
+
product: RecurringCredit.Product;
|
|
1028
|
+
/**
|
|
1029
|
+
* Whether the created commits will use the commit rate or list rate
|
|
1030
|
+
*/
|
|
1031
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1032
|
+
/**
|
|
1033
|
+
* Determines the start time for the first commit
|
|
1034
|
+
*/
|
|
1035
|
+
starting_at: string;
|
|
1036
|
+
/**
|
|
1037
|
+
* Will be passed down to the individual commits
|
|
1038
|
+
*/
|
|
1039
|
+
applicable_product_ids?: Array<string>;
|
|
1040
|
+
/**
|
|
1041
|
+
* Will be passed down to the individual commits
|
|
1042
|
+
*/
|
|
1043
|
+
applicable_product_tags?: Array<string>;
|
|
1044
|
+
contract?: RecurringCredit.Contract;
|
|
1045
|
+
/**
|
|
1046
|
+
* Will be passed down to the individual commits
|
|
1047
|
+
*/
|
|
1048
|
+
description?: string;
|
|
1049
|
+
/**
|
|
1050
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
1051
|
+
*/
|
|
1052
|
+
ending_before?: string;
|
|
1053
|
+
/**
|
|
1054
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
1055
|
+
*/
|
|
1056
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1057
|
+
/**
|
|
1058
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
1059
|
+
*/
|
|
1060
|
+
name?: string;
|
|
1061
|
+
/**
|
|
1062
|
+
* Will be passed down to the individual commits
|
|
580
1063
|
*/
|
|
581
|
-
|
|
582
|
-
|
|
1064
|
+
netsuite_sales_order_id?: string;
|
|
1065
|
+
/**
|
|
1066
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
1067
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1068
|
+
*/
|
|
1069
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1070
|
+
/**
|
|
1071
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1072
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1073
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1074
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1075
|
+
* invoice dates.
|
|
1076
|
+
*/
|
|
1077
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1078
|
+
/**
|
|
1079
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
1080
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1081
|
+
* between 0 and 1.
|
|
1082
|
+
*/
|
|
1083
|
+
rollover_fraction?: number;
|
|
1084
|
+
/**
|
|
1085
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1086
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1087
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1088
|
+
*/
|
|
1089
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
1090
|
+
/**
|
|
1091
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1092
|
+
*/
|
|
1093
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
1094
|
+
}
|
|
1095
|
+
namespace RecurringCredit {
|
|
1096
|
+
/**
|
|
1097
|
+
* The amount of commit to grant.
|
|
1098
|
+
*/
|
|
1099
|
+
interface AccessAmount {
|
|
1100
|
+
credit_type_id: string;
|
|
1101
|
+
unit_price: number;
|
|
1102
|
+
quantity?: number;
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* The amount of time the created commits will be valid for
|
|
1106
|
+
*/
|
|
1107
|
+
interface CommitDuration {
|
|
1108
|
+
value: number;
|
|
1109
|
+
unit?: 'PERIODS';
|
|
1110
|
+
}
|
|
1111
|
+
interface Product {
|
|
1112
|
+
id: string;
|
|
1113
|
+
name: string;
|
|
1114
|
+
}
|
|
1115
|
+
interface Contract {
|
|
1116
|
+
id: string;
|
|
583
1117
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
1118
|
+
}
|
|
1119
|
+
interface ResellerRoyalty {
|
|
1120
|
+
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
1121
|
+
segments: Array<ResellerRoyalty.Segment>;
|
|
1122
|
+
}
|
|
1123
|
+
namespace ResellerRoyalty {
|
|
1124
|
+
interface Segment {
|
|
1125
|
+
fraction: number;
|
|
1126
|
+
netsuite_reseller_id: string;
|
|
1127
|
+
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
1128
|
+
starting_at: string;
|
|
1129
|
+
applicable_product_ids?: Array<string>;
|
|
1130
|
+
applicable_product_tags?: Array<string>;
|
|
1131
|
+
aws_account_number?: string;
|
|
1132
|
+
aws_offer_id?: string;
|
|
1133
|
+
aws_payer_reference_id?: string;
|
|
1134
|
+
ending_before?: string;
|
|
1135
|
+
gcp_account_id?: string;
|
|
1136
|
+
gcp_offer_id?: string;
|
|
1137
|
+
reseller_contract_value?: number;
|
|
595
1138
|
}
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
export interface ContractWithoutAmendments {
|
|
1142
|
+
commits: Array<Commit>;
|
|
1143
|
+
created_at: string;
|
|
1144
|
+
created_by: string;
|
|
1145
|
+
overrides: Array<Override>;
|
|
1146
|
+
scheduled_charges: Array<ScheduledCharge>;
|
|
1147
|
+
starting_at: string;
|
|
1148
|
+
transitions: Array<ContractWithoutAmendments.Transition>;
|
|
1149
|
+
usage_statement_schedule: ContractWithoutAmendments.UsageStatementSchedule;
|
|
1150
|
+
credits?: Array<Credit>;
|
|
1151
|
+
/**
|
|
1152
|
+
* This field's availability is dependent on your client's configuration.
|
|
1153
|
+
*/
|
|
1154
|
+
discounts?: Array<Discount>;
|
|
1155
|
+
ending_before?: string;
|
|
1156
|
+
/**
|
|
1157
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
1158
|
+
* configuration with a single parent.
|
|
1159
|
+
*/
|
|
1160
|
+
hierarchy_configuration?: HierarchyConfiguration;
|
|
1161
|
+
name?: string;
|
|
1162
|
+
net_payment_terms_days?: number;
|
|
1163
|
+
/**
|
|
1164
|
+
* This field's availability is dependent on your client's configuration.
|
|
1165
|
+
*/
|
|
1166
|
+
netsuite_sales_order_id?: string;
|
|
1167
|
+
prepaid_balance_threshold_configuration?: PrepaidBalanceThresholdConfiguration;
|
|
1168
|
+
/**
|
|
1169
|
+
* This field's availability is dependent on your client's configuration.
|
|
1170
|
+
*/
|
|
1171
|
+
professional_services?: Array<ProService>;
|
|
1172
|
+
rate_card_id?: string;
|
|
1173
|
+
recurring_commits?: Array<ContractWithoutAmendments.RecurringCommit>;
|
|
1174
|
+
recurring_credits?: Array<ContractWithoutAmendments.RecurringCredit>;
|
|
1175
|
+
/**
|
|
1176
|
+
* This field's availability is dependent on your client's configuration.
|
|
1177
|
+
*/
|
|
1178
|
+
reseller_royalties?: Array<ContractWithoutAmendments.ResellerRoyalty>;
|
|
1179
|
+
/**
|
|
1180
|
+
* This field's availability is dependent on your client's configuration.
|
|
1181
|
+
*/
|
|
1182
|
+
salesforce_opportunity_id?: string;
|
|
1183
|
+
/**
|
|
1184
|
+
* Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
1185
|
+
* usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
1186
|
+
* `ending_before` date for consolidation to occur. This field cannot be modified
|
|
1187
|
+
* after a Contract has been created. If this field is omitted, charges will appear
|
|
1188
|
+
* on a separate invoice from usage charges.
|
|
1189
|
+
*/
|
|
1190
|
+
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
1191
|
+
spend_threshold_configuration?: SpendThresholdConfiguration;
|
|
1192
|
+
/**
|
|
1193
|
+
* This field's availability is dependent on your client's configuration.
|
|
1194
|
+
*/
|
|
1195
|
+
total_contract_value?: number;
|
|
1196
|
+
usage_filter?: ContractWithoutAmendments.UsageFilter;
|
|
1197
|
+
}
|
|
1198
|
+
export declare namespace ContractWithoutAmendments {
|
|
1199
|
+
interface Transition {
|
|
1200
|
+
from_contract_id: string;
|
|
1201
|
+
to_contract_id: string;
|
|
1202
|
+
type: 'SUPERSEDE' | 'RENEWAL';
|
|
1203
|
+
}
|
|
1204
|
+
interface UsageStatementSchedule {
|
|
1205
|
+
/**
|
|
1206
|
+
* Contract usage statements follow a selected cadence based on this date.
|
|
1207
|
+
*/
|
|
1208
|
+
billing_anchor_date: string;
|
|
1209
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1210
|
+
}
|
|
1211
|
+
interface RecurringCommit {
|
|
1212
|
+
id: string;
|
|
1213
|
+
/**
|
|
1214
|
+
* The amount of commit to grant.
|
|
1215
|
+
*/
|
|
1216
|
+
access_amount: RecurringCommit.AccessAmount;
|
|
1217
|
+
/**
|
|
1218
|
+
* The amount of time the created commits will be valid for
|
|
1219
|
+
*/
|
|
1220
|
+
commit_duration: RecurringCommit.CommitDuration;
|
|
1221
|
+
/**
|
|
1222
|
+
* Will be passed down to the individual commits
|
|
1223
|
+
*/
|
|
1224
|
+
priority: number;
|
|
1225
|
+
product: RecurringCommit.Product;
|
|
1226
|
+
/**
|
|
1227
|
+
* Whether the created commits will use the commit rate or list rate
|
|
1228
|
+
*/
|
|
1229
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1230
|
+
/**
|
|
1231
|
+
* Determines the start time for the first commit
|
|
1232
|
+
*/
|
|
1233
|
+
starting_at: string;
|
|
1234
|
+
/**
|
|
1235
|
+
* Will be passed down to the individual commits
|
|
1236
|
+
*/
|
|
1237
|
+
applicable_product_ids?: Array<string>;
|
|
1238
|
+
/**
|
|
1239
|
+
* Will be passed down to the individual commits
|
|
1240
|
+
*/
|
|
1241
|
+
applicable_product_tags?: Array<string>;
|
|
1242
|
+
contract?: RecurringCommit.Contract;
|
|
1243
|
+
/**
|
|
1244
|
+
* Will be passed down to the individual commits
|
|
1245
|
+
*/
|
|
1246
|
+
description?: string;
|
|
1247
|
+
/**
|
|
1248
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
1249
|
+
*/
|
|
1250
|
+
ending_before?: string;
|
|
1251
|
+
/**
|
|
1252
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
1253
|
+
*/
|
|
1254
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
596
1255
|
/**
|
|
597
1256
|
* The amount the customer should be billed for the commit. Not required.
|
|
598
1257
|
*/
|
|
599
|
-
|
|
1258
|
+
invoice_amount?: RecurringCommit.InvoiceAmount;
|
|
1259
|
+
/**
|
|
1260
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
1261
|
+
*/
|
|
1262
|
+
name?: string;
|
|
1263
|
+
/**
|
|
1264
|
+
* Will be passed down to the individual commits
|
|
1265
|
+
*/
|
|
1266
|
+
netsuite_sales_order_id?: string;
|
|
1267
|
+
/**
|
|
1268
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
1269
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1270
|
+
*/
|
|
1271
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1272
|
+
/**
|
|
1273
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1274
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1275
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1276
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1277
|
+
* invoice dates.
|
|
1278
|
+
*/
|
|
1279
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1280
|
+
/**
|
|
1281
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
1282
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1283
|
+
* between 0 and 1.
|
|
1284
|
+
*/
|
|
1285
|
+
rollover_fraction?: number;
|
|
1286
|
+
/**
|
|
1287
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1288
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1289
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1290
|
+
*/
|
|
1291
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
1292
|
+
/**
|
|
1293
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1294
|
+
*/
|
|
1295
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
1296
|
+
}
|
|
1297
|
+
namespace RecurringCommit {
|
|
1298
|
+
/**
|
|
1299
|
+
* The amount of commit to grant.
|
|
1300
|
+
*/
|
|
1301
|
+
interface AccessAmount {
|
|
600
1302
|
credit_type_id: string;
|
|
601
|
-
quantity: number;
|
|
602
1303
|
unit_price: number;
|
|
1304
|
+
quantity?: number;
|
|
603
1305
|
}
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
* tags.
|
|
618
|
-
*/
|
|
619
|
-
product_tags?: Array<string>;
|
|
1306
|
+
/**
|
|
1307
|
+
* The amount of time the created commits will be valid for
|
|
1308
|
+
*/
|
|
1309
|
+
interface CommitDuration {
|
|
1310
|
+
value: number;
|
|
1311
|
+
unit?: 'PERIODS';
|
|
1312
|
+
}
|
|
1313
|
+
interface Product {
|
|
1314
|
+
id: string;
|
|
1315
|
+
name: string;
|
|
1316
|
+
}
|
|
1317
|
+
interface Contract {
|
|
1318
|
+
id: string;
|
|
620
1319
|
}
|
|
621
1320
|
/**
|
|
622
|
-
*
|
|
1321
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
623
1322
|
*/
|
|
624
|
-
interface
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
}
|
|
629
|
-
namespace SubscriptionConfig {
|
|
630
|
-
interface ApplySeatIncreaseConfig {
|
|
631
|
-
/**
|
|
632
|
-
* Indicates whether a mid-period seat increase should be prorated.
|
|
633
|
-
*/
|
|
634
|
-
is_prorated: boolean;
|
|
635
|
-
}
|
|
1323
|
+
interface InvoiceAmount {
|
|
1324
|
+
credit_type_id: string;
|
|
1325
|
+
quantity: number;
|
|
1326
|
+
unit_price: number;
|
|
636
1327
|
}
|
|
637
1328
|
}
|
|
638
1329
|
interface RecurringCredit {
|
|
@@ -678,7 +1369,7 @@ export declare namespace ContractWithoutAmendments {
|
|
|
678
1369
|
/**
|
|
679
1370
|
* Optional configuration for recurring commit/credit hierarchy access control
|
|
680
1371
|
*/
|
|
681
|
-
hierarchy_configuration?:
|
|
1372
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
682
1373
|
/**
|
|
683
1374
|
* Displayed on invoices. Will be passed through to the individual commits
|
|
684
1375
|
*/
|
|
@@ -711,11 +1402,11 @@ export declare namespace ContractWithoutAmendments {
|
|
|
711
1402
|
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
712
1403
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
713
1404
|
*/
|
|
714
|
-
specifiers?: Array<
|
|
1405
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
715
1406
|
/**
|
|
716
1407
|
* Attach a subscription to the recurring commit/credit.
|
|
717
1408
|
*/
|
|
718
|
-
subscription_config?:
|
|
1409
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
719
1410
|
}
|
|
720
1411
|
namespace RecurringCredit {
|
|
721
1412
|
/**
|
|
@@ -740,57 +1431,6 @@ export declare namespace ContractWithoutAmendments {
|
|
|
740
1431
|
interface Contract {
|
|
741
1432
|
id: string;
|
|
742
1433
|
}
|
|
743
|
-
/**
|
|
744
|
-
* Optional configuration for recurring commit/credit hierarchy access control
|
|
745
|
-
*/
|
|
746
|
-
interface HierarchyConfiguration {
|
|
747
|
-
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
748
|
-
}
|
|
749
|
-
namespace HierarchyConfiguration {
|
|
750
|
-
interface CommitHierarchyChildAccessAll {
|
|
751
|
-
type: 'ALL';
|
|
752
|
-
}
|
|
753
|
-
interface CommitHierarchyChildAccessNone {
|
|
754
|
-
type: 'NONE';
|
|
755
|
-
}
|
|
756
|
-
interface CommitHierarchyChildAccessContractIDs {
|
|
757
|
-
contract_ids: Array<string>;
|
|
758
|
-
type: 'CONTRACT_IDS';
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
interface Specifier {
|
|
762
|
-
presentation_group_values?: {
|
|
763
|
-
[key: string]: string;
|
|
764
|
-
};
|
|
765
|
-
pricing_group_values?: {
|
|
766
|
-
[key: string]: string;
|
|
767
|
-
};
|
|
768
|
-
/**
|
|
769
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
770
|
-
*/
|
|
771
|
-
product_id?: string;
|
|
772
|
-
/**
|
|
773
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
774
|
-
* tags.
|
|
775
|
-
*/
|
|
776
|
-
product_tags?: Array<string>;
|
|
777
|
-
}
|
|
778
|
-
/**
|
|
779
|
-
* Attach a subscription to the recurring commit/credit.
|
|
780
|
-
*/
|
|
781
|
-
interface SubscriptionConfig {
|
|
782
|
-
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
783
|
-
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
784
|
-
subscription_id: string;
|
|
785
|
-
}
|
|
786
|
-
namespace SubscriptionConfig {
|
|
787
|
-
interface ApplySeatIncreaseConfig {
|
|
788
|
-
/**
|
|
789
|
-
* Indicates whether a mid-period seat increase should be prorated.
|
|
790
|
-
*/
|
|
791
|
-
is_prorated: boolean;
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
1434
|
}
|
|
795
1435
|
interface ResellerRoyalty {
|
|
796
1436
|
fraction: number;
|
|
@@ -807,92 +1447,6 @@ export declare namespace ContractWithoutAmendments {
|
|
|
807
1447
|
gcp_offer_id?: string;
|
|
808
1448
|
reseller_contract_value?: number;
|
|
809
1449
|
}
|
|
810
|
-
interface SpendThresholdConfiguration {
|
|
811
|
-
commit: SpendThresholdConfiguration.Commit;
|
|
812
|
-
/**
|
|
813
|
-
* When set to false, the contract will not be evaluated against the
|
|
814
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
815
|
-
* regardless of prior state.
|
|
816
|
-
*/
|
|
817
|
-
is_enabled: boolean;
|
|
818
|
-
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
819
|
-
/**
|
|
820
|
-
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
821
|
-
* hits this amount, a threshold charge will be initiated.
|
|
822
|
-
*/
|
|
823
|
-
threshold_amount: number;
|
|
824
|
-
}
|
|
825
|
-
namespace SpendThresholdConfiguration {
|
|
826
|
-
interface Commit {
|
|
827
|
-
/**
|
|
828
|
-
* The commit product that will be used to generate the line item for commit
|
|
829
|
-
* payment.
|
|
830
|
-
*/
|
|
831
|
-
product_id: string;
|
|
832
|
-
description?: string;
|
|
833
|
-
/**
|
|
834
|
-
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
835
|
-
* will default to the commit product name.
|
|
836
|
-
*/
|
|
837
|
-
name?: string;
|
|
838
|
-
}
|
|
839
|
-
interface PaymentGateConfig {
|
|
840
|
-
/**
|
|
841
|
-
* Gate access to the commit balance based on successful collection of payment.
|
|
842
|
-
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
843
|
-
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
844
|
-
* wish to payment gate the commit balance.
|
|
845
|
-
*/
|
|
846
|
-
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
847
|
-
/**
|
|
848
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
849
|
-
*/
|
|
850
|
-
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
851
|
-
/**
|
|
852
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
853
|
-
*/
|
|
854
|
-
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
855
|
-
/**
|
|
856
|
-
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
857
|
-
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
858
|
-
* will default to NONE.
|
|
859
|
-
*/
|
|
860
|
-
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
861
|
-
}
|
|
862
|
-
namespace PaymentGateConfig {
|
|
863
|
-
/**
|
|
864
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
865
|
-
*/
|
|
866
|
-
interface PrecalculatedTaxConfig {
|
|
867
|
-
/**
|
|
868
|
-
* Amount of tax to be applied. This should be in the same currency and
|
|
869
|
-
* denomination as the commit's invoice schedule
|
|
870
|
-
*/
|
|
871
|
-
tax_amount: number;
|
|
872
|
-
/**
|
|
873
|
-
* Name of the tax to be applied. This may be used in an invoice line item
|
|
874
|
-
* description.
|
|
875
|
-
*/
|
|
876
|
-
tax_name?: string;
|
|
877
|
-
}
|
|
878
|
-
/**
|
|
879
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
880
|
-
*/
|
|
881
|
-
interface StripeConfig {
|
|
882
|
-
/**
|
|
883
|
-
* If left blank, will default to INVOICE
|
|
884
|
-
*/
|
|
885
|
-
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
886
|
-
/**
|
|
887
|
-
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
888
|
-
* your payment type.
|
|
889
|
-
*/
|
|
890
|
-
invoice_metadata?: {
|
|
891
|
-
[key: string]: string;
|
|
892
|
-
};
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
1450
|
interface UsageFilter {
|
|
897
1451
|
current: Shared.BaseUsageFilter | null;
|
|
898
1452
|
initial: Shared.BaseUsageFilter;
|
|
@@ -929,6 +1483,9 @@ export interface Credit {
|
|
|
929
1483
|
*/
|
|
930
1484
|
balance?: number;
|
|
931
1485
|
contract?: Credit.Contract;
|
|
1486
|
+
/**
|
|
1487
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1488
|
+
*/
|
|
932
1489
|
custom_fields?: {
|
|
933
1490
|
[key: string]: string;
|
|
934
1491
|
};
|
|
@@ -936,7 +1493,7 @@ export interface Credit {
|
|
|
936
1493
|
/**
|
|
937
1494
|
* Optional configuration for credit hierarchy access control
|
|
938
1495
|
*/
|
|
939
|
-
hierarchy_configuration?:
|
|
1496
|
+
hierarchy_configuration?: CommitHierarchyConfiguration;
|
|
940
1497
|
/**
|
|
941
1498
|
* A list of ordered events that impact the balance of a credit. For example, an
|
|
942
1499
|
* invoice deduction or an expiration.
|
|
@@ -962,7 +1519,7 @@ export interface Credit {
|
|
|
962
1519
|
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
963
1520
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
964
1521
|
*/
|
|
965
|
-
specifiers?: Array<
|
|
1522
|
+
specifiers?: Array<CommitSpecifier>;
|
|
966
1523
|
/**
|
|
967
1524
|
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
968
1525
|
* is made with a uniqueness key that was previously used to create a commit or
|
|
@@ -979,24 +1536,6 @@ export declare namespace Credit {
|
|
|
979
1536
|
interface Contract {
|
|
980
1537
|
id: string;
|
|
981
1538
|
}
|
|
982
|
-
/**
|
|
983
|
-
* Optional configuration for credit hierarchy access control
|
|
984
|
-
*/
|
|
985
|
-
interface HierarchyConfiguration {
|
|
986
|
-
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
987
|
-
}
|
|
988
|
-
namespace HierarchyConfiguration {
|
|
989
|
-
interface CommitHierarchyChildAccessAll {
|
|
990
|
-
type: 'ALL';
|
|
991
|
-
}
|
|
992
|
-
interface CommitHierarchyChildAccessNone {
|
|
993
|
-
type: 'NONE';
|
|
994
|
-
}
|
|
995
|
-
interface CommitHierarchyChildAccessContractIDs {
|
|
996
|
-
contract_ids: Array<string>;
|
|
997
|
-
type: 'CONTRACT_IDS';
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
1539
|
interface CreditSegmentStartLedgerEntry {
|
|
1001
1540
|
amount: number;
|
|
1002
1541
|
segment_id: string;
|
|
@@ -1045,23 +1584,6 @@ export declare namespace Credit {
|
|
|
1045
1584
|
timestamp: string;
|
|
1046
1585
|
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
1047
1586
|
}
|
|
1048
|
-
interface Specifier {
|
|
1049
|
-
presentation_group_values?: {
|
|
1050
|
-
[key: string]: string;
|
|
1051
|
-
};
|
|
1052
|
-
pricing_group_values?: {
|
|
1053
|
-
[key: string]: string;
|
|
1054
|
-
};
|
|
1055
|
-
/**
|
|
1056
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1057
|
-
*/
|
|
1058
|
-
product_id?: string;
|
|
1059
|
-
/**
|
|
1060
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
1061
|
-
* tags.
|
|
1062
|
-
*/
|
|
1063
|
-
product_tags?: Array<string>;
|
|
1064
|
-
}
|
|
1065
1587
|
}
|
|
1066
1588
|
export interface CreditTypeData {
|
|
1067
1589
|
id: string;
|
|
@@ -1071,6 +1593,9 @@ export interface Discount {
|
|
|
1071
1593
|
id: string;
|
|
1072
1594
|
product: Discount.Product;
|
|
1073
1595
|
schedule: SchedulePointInTime;
|
|
1596
|
+
/**
|
|
1597
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1598
|
+
*/
|
|
1074
1599
|
custom_fields?: {
|
|
1075
1600
|
[key: string]: string;
|
|
1076
1601
|
};
|
|
@@ -1103,6 +1628,40 @@ export interface EventTypeFilter {
|
|
|
1103
1628
|
*/
|
|
1104
1629
|
not_in_values?: Array<string>;
|
|
1105
1630
|
}
|
|
1631
|
+
/**
|
|
1632
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
1633
|
+
* configuration with a single parent.
|
|
1634
|
+
*/
|
|
1635
|
+
export type HierarchyConfiguration = HierarchyConfiguration.ParentHierarchyConfiguration | HierarchyConfiguration.ChildHierarchyConfiguration;
|
|
1636
|
+
export declare namespace HierarchyConfiguration {
|
|
1637
|
+
interface ParentHierarchyConfiguration {
|
|
1638
|
+
/**
|
|
1639
|
+
* List of contracts that belong to this parent.
|
|
1640
|
+
*/
|
|
1641
|
+
children: Array<ParentHierarchyConfiguration.Child>;
|
|
1642
|
+
}
|
|
1643
|
+
namespace ParentHierarchyConfiguration {
|
|
1644
|
+
interface Child {
|
|
1645
|
+
contract_id: string;
|
|
1646
|
+
customer_id: string;
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
interface ChildHierarchyConfiguration {
|
|
1650
|
+
/**
|
|
1651
|
+
* The single parent contract/customer for this child.
|
|
1652
|
+
*/
|
|
1653
|
+
parent: ChildHierarchyConfiguration.Parent;
|
|
1654
|
+
}
|
|
1655
|
+
namespace ChildHierarchyConfiguration {
|
|
1656
|
+
/**
|
|
1657
|
+
* The single parent contract/customer for this child.
|
|
1658
|
+
*/
|
|
1659
|
+
interface Parent {
|
|
1660
|
+
contract_id: string;
|
|
1661
|
+
customer_id: string;
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1106
1665
|
export interface ID {
|
|
1107
1666
|
id: string;
|
|
1108
1667
|
}
|
|
@@ -1121,8 +1680,8 @@ export interface Override {
|
|
|
1121
1680
|
is_prorated?: boolean;
|
|
1122
1681
|
multiplier?: number;
|
|
1123
1682
|
override_specifiers?: Array<Override.OverrideSpecifier>;
|
|
1124
|
-
override_tiers?: Array<
|
|
1125
|
-
overwrite_rate?:
|
|
1683
|
+
override_tiers?: Array<OverrideTier>;
|
|
1684
|
+
overwrite_rate?: OverwriteRate;
|
|
1126
1685
|
/**
|
|
1127
1686
|
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
1128
1687
|
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
@@ -1164,42 +1723,250 @@ export declare namespace Override {
|
|
|
1164
1723
|
recurring_commit_ids?: Array<string>;
|
|
1165
1724
|
recurring_credit_ids?: Array<string>;
|
|
1166
1725
|
}
|
|
1167
|
-
interface
|
|
1168
|
-
|
|
1169
|
-
|
|
1726
|
+
interface Product {
|
|
1727
|
+
id: string;
|
|
1728
|
+
name: string;
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
export interface OverrideTier {
|
|
1732
|
+
multiplier: number;
|
|
1733
|
+
size?: number;
|
|
1734
|
+
}
|
|
1735
|
+
export interface OverwriteRate {
|
|
1736
|
+
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
1737
|
+
credit_type?: CreditTypeData;
|
|
1738
|
+
/**
|
|
1739
|
+
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
1740
|
+
* processors.
|
|
1741
|
+
*/
|
|
1742
|
+
custom_rate?: {
|
|
1743
|
+
[key: string]: unknown;
|
|
1744
|
+
};
|
|
1745
|
+
/**
|
|
1746
|
+
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
1747
|
+
* set to true.
|
|
1748
|
+
*/
|
|
1749
|
+
is_prorated?: boolean;
|
|
1750
|
+
/**
|
|
1751
|
+
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
1752
|
+
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
1753
|
+
*/
|
|
1754
|
+
price?: number;
|
|
1755
|
+
/**
|
|
1756
|
+
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
1757
|
+
*/
|
|
1758
|
+
quantity?: number;
|
|
1759
|
+
/**
|
|
1760
|
+
* Only set for TIERED rate_type.
|
|
1761
|
+
*/
|
|
1762
|
+
tiers?: Array<Tier>;
|
|
1763
|
+
}
|
|
1764
|
+
export interface PaymentGateConfig {
|
|
1765
|
+
/**
|
|
1766
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
1767
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1768
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
1769
|
+
* wish to payment gate the commit balance.
|
|
1770
|
+
*/
|
|
1771
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
1772
|
+
/**
|
|
1773
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1774
|
+
*/
|
|
1775
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
1776
|
+
/**
|
|
1777
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
1778
|
+
*/
|
|
1779
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
1780
|
+
/**
|
|
1781
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1782
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1783
|
+
* will default to NONE.
|
|
1784
|
+
*/
|
|
1785
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
1786
|
+
}
|
|
1787
|
+
export declare namespace PaymentGateConfig {
|
|
1788
|
+
/**
|
|
1789
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1790
|
+
*/
|
|
1791
|
+
interface PrecalculatedTaxConfig {
|
|
1792
|
+
/**
|
|
1793
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
1794
|
+
* denomination as the commit's invoice schedule
|
|
1795
|
+
*/
|
|
1796
|
+
tax_amount: number;
|
|
1797
|
+
/**
|
|
1798
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
1799
|
+
* description.
|
|
1800
|
+
*/
|
|
1801
|
+
tax_name?: string;
|
|
1170
1802
|
}
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1803
|
+
/**
|
|
1804
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
1805
|
+
*/
|
|
1806
|
+
interface StripeConfig {
|
|
1174
1807
|
/**
|
|
1175
|
-
*
|
|
1176
|
-
* processors.
|
|
1808
|
+
* If left blank, will default to INVOICE
|
|
1177
1809
|
*/
|
|
1178
|
-
|
|
1179
|
-
|
|
1810
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1811
|
+
/**
|
|
1812
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
1813
|
+
* your payment type.
|
|
1814
|
+
*/
|
|
1815
|
+
invoice_metadata?: {
|
|
1816
|
+
[key: string]: string;
|
|
1180
1817
|
};
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
export interface PaymentGateConfigV2 {
|
|
1821
|
+
/**
|
|
1822
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
1823
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1824
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
1825
|
+
* wish to payment gate the commit balance.
|
|
1826
|
+
*/
|
|
1827
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
1828
|
+
/**
|
|
1829
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1830
|
+
*/
|
|
1831
|
+
precalculated_tax_config?: PaymentGateConfigV2.PrecalculatedTaxConfig;
|
|
1832
|
+
/**
|
|
1833
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
1834
|
+
*/
|
|
1835
|
+
stripe_config?: PaymentGateConfigV2.StripeConfig;
|
|
1836
|
+
/**
|
|
1837
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1838
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1839
|
+
* will default to NONE.
|
|
1840
|
+
*/
|
|
1841
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
1842
|
+
}
|
|
1843
|
+
export declare namespace PaymentGateConfigV2 {
|
|
1844
|
+
/**
|
|
1845
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1846
|
+
*/
|
|
1847
|
+
interface PrecalculatedTaxConfig {
|
|
1181
1848
|
/**
|
|
1182
|
-
*
|
|
1183
|
-
*
|
|
1849
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
1850
|
+
* denomination as the commit's invoice schedule
|
|
1184
1851
|
*/
|
|
1185
|
-
|
|
1852
|
+
tax_amount: number;
|
|
1186
1853
|
/**
|
|
1187
|
-
*
|
|
1188
|
-
*
|
|
1854
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
1855
|
+
* description.
|
|
1189
1856
|
*/
|
|
1190
|
-
|
|
1857
|
+
tax_name?: string;
|
|
1858
|
+
}
|
|
1859
|
+
/**
|
|
1860
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
1861
|
+
*/
|
|
1862
|
+
interface StripeConfig {
|
|
1191
1863
|
/**
|
|
1192
|
-
*
|
|
1864
|
+
* If left blank, will default to INVOICE
|
|
1193
1865
|
*/
|
|
1194
|
-
|
|
1866
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1195
1867
|
/**
|
|
1196
|
-
* Only
|
|
1868
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
1869
|
+
* your payment type.
|
|
1197
1870
|
*/
|
|
1198
|
-
|
|
1871
|
+
invoice_metadata?: {
|
|
1872
|
+
[key: string]: string;
|
|
1873
|
+
};
|
|
1199
1874
|
}
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1875
|
+
}
|
|
1876
|
+
export interface PrepaidBalanceThresholdConfiguration {
|
|
1877
|
+
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
1878
|
+
/**
|
|
1879
|
+
* When set to false, the contract will not be evaluated against the
|
|
1880
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1881
|
+
* regardless of prior state.
|
|
1882
|
+
*/
|
|
1883
|
+
is_enabled: boolean;
|
|
1884
|
+
payment_gate_config: PaymentGateConfig;
|
|
1885
|
+
/**
|
|
1886
|
+
* Specify the amount the balance should be recharged to.
|
|
1887
|
+
*/
|
|
1888
|
+
recharge_to_amount: number;
|
|
1889
|
+
/**
|
|
1890
|
+
* Specify the threshold amount for the contract. Each time the contract's prepaid
|
|
1891
|
+
* balance lowers to this amount, a threshold charge will be initiated.
|
|
1892
|
+
*/
|
|
1893
|
+
threshold_amount: number;
|
|
1894
|
+
/**
|
|
1895
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
1896
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
1897
|
+
*/
|
|
1898
|
+
custom_credit_type_id?: string;
|
|
1899
|
+
}
|
|
1900
|
+
export declare namespace PrepaidBalanceThresholdConfiguration {
|
|
1901
|
+
interface Commit extends Shared.BaseThresholdCommit {
|
|
1902
|
+
/**
|
|
1903
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
1904
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
1905
|
+
* all products.
|
|
1906
|
+
*/
|
|
1907
|
+
applicable_product_ids?: Array<string>;
|
|
1908
|
+
/**
|
|
1909
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
1910
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
1911
|
+
* all products.
|
|
1912
|
+
*/
|
|
1913
|
+
applicable_product_tags?: Array<string>;
|
|
1914
|
+
/**
|
|
1915
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1916
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1917
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
1918
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1919
|
+
*/
|
|
1920
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
export interface PrepaidBalanceThresholdConfigurationV2 {
|
|
1924
|
+
commit: PrepaidBalanceThresholdConfigurationV2.Commit;
|
|
1925
|
+
/**
|
|
1926
|
+
* When set to false, the contract will not be evaluated against the
|
|
1927
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1928
|
+
* regardless of prior state.
|
|
1929
|
+
*/
|
|
1930
|
+
is_enabled: boolean;
|
|
1931
|
+
payment_gate_config: PaymentGateConfigV2;
|
|
1932
|
+
/**
|
|
1933
|
+
* Specify the amount the balance should be recharged to.
|
|
1934
|
+
*/
|
|
1935
|
+
recharge_to_amount: number;
|
|
1936
|
+
/**
|
|
1937
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
1938
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
1939
|
+
*/
|
|
1940
|
+
threshold_amount: number;
|
|
1941
|
+
/**
|
|
1942
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
1943
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
1944
|
+
*/
|
|
1945
|
+
custom_credit_type_id?: string;
|
|
1946
|
+
}
|
|
1947
|
+
export declare namespace PrepaidBalanceThresholdConfigurationV2 {
|
|
1948
|
+
interface Commit extends Shared.UpdateBaseThresholdCommit {
|
|
1949
|
+
/**
|
|
1950
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
1951
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
1952
|
+
* all products.
|
|
1953
|
+
*/
|
|
1954
|
+
applicable_product_ids?: Array<string>;
|
|
1955
|
+
/**
|
|
1956
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
1957
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
1958
|
+
* all products.
|
|
1959
|
+
*/
|
|
1960
|
+
applicable_product_tags?: Array<string>;
|
|
1961
|
+
/**
|
|
1962
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1963
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1964
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
1965
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1966
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
1967
|
+
* body of `specifiers`.
|
|
1968
|
+
*/
|
|
1969
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
1203
1970
|
}
|
|
1204
1971
|
}
|
|
1205
1972
|
export interface PropertyFilter {
|
|
@@ -1246,6 +2013,9 @@ export interface ProService {
|
|
|
1246
2013
|
* amount and must be specified.
|
|
1247
2014
|
*/
|
|
1248
2015
|
unit_price: number;
|
|
2016
|
+
/**
|
|
2017
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2018
|
+
*/
|
|
1249
2019
|
custom_fields?: {
|
|
1250
2020
|
[key: string]: string;
|
|
1251
2021
|
};
|
|
@@ -1297,11 +2067,27 @@ export interface Rate {
|
|
|
1297
2067
|
*/
|
|
1298
2068
|
use_list_prices?: boolean;
|
|
1299
2069
|
}
|
|
2070
|
+
export interface RecurringCommitSubscriptionConfig {
|
|
2071
|
+
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
2072
|
+
apply_seat_increase_config: RecurringCommitSubscriptionConfig.ApplySeatIncreaseConfig;
|
|
2073
|
+
subscription_id: string;
|
|
2074
|
+
}
|
|
2075
|
+
export declare namespace RecurringCommitSubscriptionConfig {
|
|
2076
|
+
interface ApplySeatIncreaseConfig {
|
|
2077
|
+
/**
|
|
2078
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
2079
|
+
*/
|
|
2080
|
+
is_prorated: boolean;
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
1300
2083
|
export interface ScheduledCharge {
|
|
1301
2084
|
id: string;
|
|
1302
2085
|
product: ScheduledCharge.Product;
|
|
1303
2086
|
schedule: SchedulePointInTime;
|
|
1304
2087
|
archived_at?: string;
|
|
2088
|
+
/**
|
|
2089
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2090
|
+
*/
|
|
1305
2091
|
custom_fields?: {
|
|
1306
2092
|
[key: string]: string;
|
|
1307
2093
|
};
|
|
@@ -1334,6 +2120,11 @@ export declare namespace ScheduleDuration {
|
|
|
1334
2120
|
}
|
|
1335
2121
|
export interface SchedulePointInTime {
|
|
1336
2122
|
credit_type?: CreditTypeData;
|
|
2123
|
+
/**
|
|
2124
|
+
* This field is only applicable to commit invoice schedules. If true, this
|
|
2125
|
+
* schedule will not generate an invoice.
|
|
2126
|
+
*/
|
|
2127
|
+
do_not_invoice?: boolean;
|
|
1337
2128
|
schedule_items?: Array<SchedulePointInTime.ScheduleItem>;
|
|
1338
2129
|
}
|
|
1339
2130
|
export declare namespace SchedulePointInTime {
|
|
@@ -1346,8 +2137,103 @@ export declare namespace SchedulePointInTime {
|
|
|
1346
2137
|
invoice_id?: string | null;
|
|
1347
2138
|
}
|
|
1348
2139
|
}
|
|
2140
|
+
export interface SpendThresholdConfiguration {
|
|
2141
|
+
commit: BaseThresholdCommit;
|
|
2142
|
+
/**
|
|
2143
|
+
* When set to false, the contract will not be evaluated against the
|
|
2144
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2145
|
+
* regardless of prior state.
|
|
2146
|
+
*/
|
|
2147
|
+
is_enabled: boolean;
|
|
2148
|
+
payment_gate_config: PaymentGateConfig;
|
|
2149
|
+
/**
|
|
2150
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
2151
|
+
* hits this amount, a threshold charge will be initiated.
|
|
2152
|
+
*/
|
|
2153
|
+
threshold_amount: number;
|
|
2154
|
+
}
|
|
2155
|
+
export interface SpendThresholdConfigurationV2 {
|
|
2156
|
+
commit: UpdateBaseThresholdCommit;
|
|
2157
|
+
/**
|
|
2158
|
+
* When set to false, the contract will not be evaluated against the
|
|
2159
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2160
|
+
* regardless of prior state.
|
|
2161
|
+
*/
|
|
2162
|
+
is_enabled: boolean;
|
|
2163
|
+
payment_gate_config: PaymentGateConfigV2;
|
|
2164
|
+
/**
|
|
2165
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
2166
|
+
* hits this amount, a threshold charge will be initiated.
|
|
2167
|
+
*/
|
|
2168
|
+
threshold_amount: number;
|
|
2169
|
+
}
|
|
2170
|
+
export interface Subscription {
|
|
2171
|
+
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
2172
|
+
proration: Subscription.Proration;
|
|
2173
|
+
/**
|
|
2174
|
+
* Determines how the subscription's quantity is controlled. Defaults to
|
|
2175
|
+
* QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
|
|
2176
|
+
* directly on the subscription. `initial_quantity` must be provided with this
|
|
2177
|
+
* option. Compatible with recurring commits/credits that use POOLED allocation.
|
|
2178
|
+
*/
|
|
2179
|
+
quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY';
|
|
2180
|
+
/**
|
|
2181
|
+
* List of quantity schedule items for the subscription. Only includes the current
|
|
2182
|
+
* quantity and future quantity changes.
|
|
2183
|
+
*/
|
|
2184
|
+
quantity_schedule: Array<Subscription.QuantitySchedule>;
|
|
2185
|
+
starting_at: string;
|
|
2186
|
+
subscription_rate: Subscription.SubscriptionRate;
|
|
2187
|
+
id?: string;
|
|
2188
|
+
/**
|
|
2189
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2190
|
+
*/
|
|
2191
|
+
custom_fields?: {
|
|
2192
|
+
[key: string]: string;
|
|
2193
|
+
};
|
|
2194
|
+
description?: string;
|
|
2195
|
+
ending_before?: string;
|
|
2196
|
+
fiat_credit_type_id?: string;
|
|
2197
|
+
name?: string;
|
|
2198
|
+
}
|
|
2199
|
+
export declare namespace Subscription {
|
|
2200
|
+
interface Proration {
|
|
2201
|
+
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
2202
|
+
is_prorated: boolean;
|
|
2203
|
+
}
|
|
2204
|
+
interface QuantitySchedule {
|
|
2205
|
+
quantity: number;
|
|
2206
|
+
starting_at: string;
|
|
2207
|
+
ending_before?: string;
|
|
2208
|
+
}
|
|
2209
|
+
interface SubscriptionRate {
|
|
2210
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2211
|
+
product: SubscriptionRate.Product;
|
|
2212
|
+
}
|
|
2213
|
+
namespace SubscriptionRate {
|
|
2214
|
+
interface Product {
|
|
2215
|
+
id: string;
|
|
2216
|
+
name: string;
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
1349
2220
|
export interface Tier {
|
|
1350
2221
|
price: number;
|
|
1351
2222
|
size?: number;
|
|
1352
2223
|
}
|
|
2224
|
+
export interface UpdateBaseThresholdCommit {
|
|
2225
|
+
description?: string;
|
|
2226
|
+
/**
|
|
2227
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
2228
|
+
* will default to the commit product name.
|
|
2229
|
+
*/
|
|
2230
|
+
name?: string;
|
|
2231
|
+
/**
|
|
2232
|
+
* The commit product that will be used to generate the line item for commit
|
|
2233
|
+
* payment.
|
|
2234
|
+
*/
|
|
2235
|
+
product_id?: string;
|
|
2236
|
+
}
|
|
2237
|
+
export type CommitsBodyCursorPage = BodyCursorPage<Commit>;
|
|
2238
|
+
export type CreditsBodyCursorPage = BodyCursorPage<Credit>;
|
|
1353
2239
|
//# sourceMappingURL=shared.d.ts.map
|