@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/src/resources/shared.ts
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Shared from
|
|
3
|
+
import * as Shared from './shared';
|
|
4
|
+
import { BodyCursorPage } from '../core/pagination';
|
|
5
|
+
|
|
6
|
+
export interface BaseThresholdCommit {
|
|
7
|
+
/**
|
|
8
|
+
* The commit product that will be used to generate the line item for commit
|
|
9
|
+
* payment.
|
|
10
|
+
*/
|
|
11
|
+
product_id: string;
|
|
12
|
+
|
|
13
|
+
description?: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
17
|
+
* will default to the commit product name.
|
|
18
|
+
*/
|
|
19
|
+
name?: string;
|
|
20
|
+
}
|
|
4
21
|
|
|
5
22
|
export interface BaseUsageFilter {
|
|
6
23
|
group_key: string;
|
|
@@ -13,6 +30,15 @@ export interface BaseUsageFilter {
|
|
|
13
30
|
export interface Commit {
|
|
14
31
|
id: string;
|
|
15
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Timestamp of when the commit was created.
|
|
35
|
+
*
|
|
36
|
+
* - Recurring commits: latter of commit service period date and parent commit
|
|
37
|
+
* start date
|
|
38
|
+
* - Rollover commits: when the new contract started
|
|
39
|
+
*/
|
|
40
|
+
created_at: string;
|
|
41
|
+
|
|
16
42
|
product: Commit.Product;
|
|
17
43
|
|
|
18
44
|
type: 'PREPAID' | 'POSTPAID';
|
|
@@ -54,6 +80,9 @@ export interface Commit {
|
|
|
54
80
|
|
|
55
81
|
contract?: Commit.Contract;
|
|
56
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
85
|
+
*/
|
|
57
86
|
custom_fields?: { [key: string]: string };
|
|
58
87
|
|
|
59
88
|
description?: string;
|
|
@@ -61,7 +90,7 @@ export interface Commit {
|
|
|
61
90
|
/**
|
|
62
91
|
* Optional configuration for commit hierarchy access control
|
|
63
92
|
*/
|
|
64
|
-
hierarchy_configuration?:
|
|
93
|
+
hierarchy_configuration?: CommitHierarchyConfiguration;
|
|
65
94
|
|
|
66
95
|
/**
|
|
67
96
|
* The contract that this commit will be billed on.
|
|
@@ -123,7 +152,7 @@ export interface Commit {
|
|
|
123
152
|
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
124
153
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
125
154
|
*/
|
|
126
|
-
specifiers?: Array<
|
|
155
|
+
specifiers?: Array<CommitSpecifier>;
|
|
127
156
|
|
|
128
157
|
/**
|
|
129
158
|
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
@@ -145,32 +174,6 @@ export namespace Commit {
|
|
|
145
174
|
id: string;
|
|
146
175
|
}
|
|
147
176
|
|
|
148
|
-
/**
|
|
149
|
-
* Optional configuration for commit hierarchy access control
|
|
150
|
-
*/
|
|
151
|
-
export interface HierarchyConfiguration {
|
|
152
|
-
child_access:
|
|
153
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessAll
|
|
154
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessNone
|
|
155
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export namespace HierarchyConfiguration {
|
|
159
|
-
export interface CommitHierarchyChildAccessAll {
|
|
160
|
-
type: 'ALL';
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export interface CommitHierarchyChildAccessNone {
|
|
164
|
-
type: 'NONE';
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export interface CommitHierarchyChildAccessContractIDs {
|
|
168
|
-
contract_ids: Array<string>;
|
|
169
|
-
|
|
170
|
-
type: 'CONTRACT_IDS';
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
177
|
/**
|
|
175
178
|
* The contract that this commit will be billed on.
|
|
176
179
|
*/
|
|
@@ -341,43 +344,275 @@ export namespace Commit {
|
|
|
341
344
|
|
|
342
345
|
contract_id: string;
|
|
343
346
|
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export interface CommitHierarchyConfiguration {
|
|
350
|
+
child_access:
|
|
351
|
+
| CommitHierarchyConfiguration.CommitHierarchyChildAccessAll
|
|
352
|
+
| CommitHierarchyConfiguration.CommitHierarchyChildAccessNone
|
|
353
|
+
| CommitHierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export namespace CommitHierarchyConfiguration {
|
|
357
|
+
export interface CommitHierarchyChildAccessAll {
|
|
358
|
+
type: 'ALL';
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export interface CommitHierarchyChildAccessNone {
|
|
362
|
+
type: 'NONE';
|
|
363
|
+
}
|
|
344
364
|
|
|
345
|
-
export interface
|
|
346
|
-
|
|
365
|
+
export interface CommitHierarchyChildAccessContractIDs {
|
|
366
|
+
contract_ids: Array<string>;
|
|
347
367
|
|
|
348
|
-
|
|
368
|
+
type: 'CONTRACT_IDS';
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* A distinct rate on the rate card. You can choose to use this rate rather than
|
|
374
|
+
* list rate when consuming a credit or commit.
|
|
375
|
+
*/
|
|
376
|
+
export interface CommitRate {
|
|
377
|
+
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Commit rate price. For FLAT rate_type, this must be >=0.
|
|
381
|
+
*/
|
|
382
|
+
price?: number;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Only set for TIERED rate_type.
|
|
386
|
+
*/
|
|
387
|
+
tiers?: Array<Tier>;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export interface CommitSpecifier {
|
|
391
|
+
presentation_group_values?: { [key: string]: string };
|
|
392
|
+
|
|
393
|
+
pricing_group_values?: { [key: string]: string };
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
397
|
+
*/
|
|
398
|
+
product_id?: string;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
402
|
+
* tags.
|
|
403
|
+
*/
|
|
404
|
+
product_tags?: Array<string>;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export interface CommitSpecifierInput {
|
|
408
|
+
presentation_group_values?: { [key: string]: string };
|
|
409
|
+
|
|
410
|
+
pricing_group_values?: { [key: string]: string };
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
414
|
+
*/
|
|
415
|
+
product_id?: string;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
419
|
+
* tags.
|
|
420
|
+
*/
|
|
421
|
+
product_tags?: Array<string>;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export interface Contract {
|
|
425
|
+
id: string;
|
|
426
|
+
|
|
427
|
+
amendments: Array<Contract.Amendment>;
|
|
428
|
+
|
|
429
|
+
current: ContractWithoutAmendments;
|
|
430
|
+
|
|
431
|
+
customer_id: string;
|
|
432
|
+
|
|
433
|
+
initial: ContractWithoutAmendments;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* RFC 3339 timestamp indicating when the contract was archived. If not returned,
|
|
437
|
+
* the contract is not archived.
|
|
438
|
+
*/
|
|
439
|
+
archived_at?: string;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
443
|
+
*/
|
|
444
|
+
custom_fields?: { [key: string]: string };
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* The billing provider configuration associated with a contract.
|
|
448
|
+
*/
|
|
449
|
+
customer_billing_provider_configuration?: Contract.CustomerBillingProviderConfiguration;
|
|
450
|
+
|
|
451
|
+
prepaid_balance_threshold_configuration?: PrepaidBalanceThresholdConfiguration;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Priority of the contract.
|
|
455
|
+
*/
|
|
456
|
+
priority?: number;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
460
|
+
* usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
461
|
+
* `ending_before` date for consolidation to occur. This field cannot be modified
|
|
462
|
+
* after a Contract has been created. If this field is omitted, charges will appear
|
|
463
|
+
* on a separate invoice from usage charges.
|
|
464
|
+
*/
|
|
465
|
+
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
466
|
+
|
|
467
|
+
spend_threshold_configuration?: SpendThresholdConfiguration;
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* List of subscriptions on the contract.
|
|
471
|
+
*/
|
|
472
|
+
subscriptions?: Array<Subscription>;
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Prevents the creation of duplicates. If a request to create a record is made
|
|
476
|
+
* with a previously used uniqueness key, a new record will not be created and the
|
|
477
|
+
* request will fail with a 409 error.
|
|
478
|
+
*/
|
|
479
|
+
uniqueness_key?: string;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export namespace Contract {
|
|
483
|
+
export interface Amendment {
|
|
484
|
+
id: string;
|
|
485
|
+
|
|
486
|
+
commits: Array<Shared.Commit>;
|
|
487
|
+
|
|
488
|
+
created_at: string;
|
|
489
|
+
|
|
490
|
+
created_by: string;
|
|
491
|
+
|
|
492
|
+
overrides: Array<Shared.Override>;
|
|
493
|
+
|
|
494
|
+
scheduled_charges: Array<Shared.ScheduledCharge>;
|
|
495
|
+
|
|
496
|
+
starting_at: string;
|
|
497
|
+
|
|
498
|
+
credits?: Array<Shared.Credit>;
|
|
349
499
|
|
|
350
500
|
/**
|
|
351
|
-
*
|
|
501
|
+
* This field's availability is dependent on your client's configuration.
|
|
352
502
|
*/
|
|
353
|
-
|
|
503
|
+
discounts?: Array<Shared.Discount>;
|
|
354
504
|
|
|
355
505
|
/**
|
|
356
|
-
*
|
|
357
|
-
* tags.
|
|
506
|
+
* This field's availability is dependent on your client's configuration.
|
|
358
507
|
*/
|
|
359
|
-
|
|
508
|
+
netsuite_sales_order_id?: string;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* This field's availability is dependent on your client's configuration.
|
|
512
|
+
*/
|
|
513
|
+
professional_services?: Array<Shared.ProService>;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* This field's availability is dependent on your client's configuration.
|
|
517
|
+
*/
|
|
518
|
+
reseller_royalties?: Array<Amendment.ResellerRoyalty>;
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* This field's availability is dependent on your client's configuration.
|
|
522
|
+
*/
|
|
523
|
+
salesforce_opportunity_id?: string;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export namespace Amendment {
|
|
527
|
+
export interface ResellerRoyalty {
|
|
528
|
+
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
529
|
+
|
|
530
|
+
aws_account_number?: string;
|
|
531
|
+
|
|
532
|
+
aws_offer_id?: string;
|
|
533
|
+
|
|
534
|
+
aws_payer_reference_id?: string;
|
|
535
|
+
|
|
536
|
+
ending_before?: string | null;
|
|
537
|
+
|
|
538
|
+
fraction?: number;
|
|
539
|
+
|
|
540
|
+
gcp_account_id?: string;
|
|
541
|
+
|
|
542
|
+
gcp_offer_id?: string;
|
|
543
|
+
|
|
544
|
+
netsuite_reseller_id?: string;
|
|
545
|
+
|
|
546
|
+
reseller_contract_value?: number;
|
|
547
|
+
|
|
548
|
+
starting_at?: string;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* The billing provider configuration associated with a contract.
|
|
554
|
+
*/
|
|
555
|
+
export interface CustomerBillingProviderConfiguration {
|
|
556
|
+
archived_at: string | null;
|
|
557
|
+
|
|
558
|
+
billing_provider:
|
|
559
|
+
| 'aws_marketplace'
|
|
560
|
+
| 'stripe'
|
|
561
|
+
| 'netsuite'
|
|
562
|
+
| 'custom'
|
|
563
|
+
| 'azure_marketplace'
|
|
564
|
+
| 'quickbooks_online'
|
|
565
|
+
| 'workday'
|
|
566
|
+
| 'gcp_marketplace';
|
|
567
|
+
|
|
568
|
+
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
569
|
+
|
|
570
|
+
id?: string;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Configuration for the billing provider. The structure of this object is specific
|
|
574
|
+
* to the billing provider.
|
|
575
|
+
*/
|
|
576
|
+
configuration?: { [key: string]: unknown };
|
|
360
577
|
}
|
|
361
578
|
}
|
|
362
579
|
|
|
363
|
-
export interface
|
|
364
|
-
|
|
580
|
+
export interface ContractV2 {
|
|
581
|
+
id: string;
|
|
582
|
+
|
|
583
|
+
commits: Array<ContractV2.Commit>;
|
|
365
584
|
|
|
366
585
|
created_at: string;
|
|
367
586
|
|
|
368
587
|
created_by: string;
|
|
369
588
|
|
|
370
|
-
|
|
589
|
+
customer_id: string;
|
|
590
|
+
|
|
591
|
+
overrides: Array<ContractV2.Override>;
|
|
371
592
|
|
|
372
593
|
scheduled_charges: Array<ScheduledCharge>;
|
|
373
594
|
|
|
374
595
|
starting_at: string;
|
|
375
596
|
|
|
376
|
-
transitions: Array<
|
|
597
|
+
transitions: Array<ContractV2.Transition>;
|
|
377
598
|
|
|
378
|
-
|
|
599
|
+
usage_filter: Array<ContractV2.UsageFilter>;
|
|
379
600
|
|
|
380
|
-
|
|
601
|
+
usage_statement_schedule: ContractV2.UsageStatementSchedule;
|
|
602
|
+
|
|
603
|
+
archived_at?: string;
|
|
604
|
+
|
|
605
|
+
credits?: Array<ContractV2.Credit>;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
609
|
+
*/
|
|
610
|
+
custom_fields?: { [key: string]: string };
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* This field's availability is dependent on your client's configuration.
|
|
614
|
+
*/
|
|
615
|
+
customer_billing_provider_configuration?: ContractV2.CustomerBillingProviderConfiguration;
|
|
381
616
|
|
|
382
617
|
/**
|
|
383
618
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -386,13 +621,25 @@ export interface ContractWithoutAmendments {
|
|
|
386
621
|
|
|
387
622
|
ending_before?: string;
|
|
388
623
|
|
|
624
|
+
/**
|
|
625
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
626
|
+
* respective list endpoints to get the full lists.
|
|
627
|
+
*/
|
|
628
|
+
has_more?: ContractV2.HasMore;
|
|
629
|
+
|
|
389
630
|
/**
|
|
390
631
|
* Either a **parent** configuration with a list of children or a **child**
|
|
391
632
|
* configuration with a single parent.
|
|
392
633
|
*/
|
|
393
|
-
hierarchy_configuration?:
|
|
394
|
-
|
|
395
|
-
|
|
634
|
+
hierarchy_configuration?: HierarchyConfiguration;
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
638
|
+
* prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
639
|
+
* each multiplier; the one with the lowest priority value will be prioritized
|
|
640
|
+
* first.
|
|
641
|
+
*/
|
|
642
|
+
multiplier_override_prioritization?: 'LOWEST_MULTIPLIER' | 'EXPLICIT';
|
|
396
643
|
|
|
397
644
|
name?: string;
|
|
398
645
|
|
|
@@ -403,7 +650,12 @@ export interface ContractWithoutAmendments {
|
|
|
403
650
|
*/
|
|
404
651
|
netsuite_sales_order_id?: string;
|
|
405
652
|
|
|
406
|
-
prepaid_balance_threshold_configuration?:
|
|
653
|
+
prepaid_balance_threshold_configuration?: PrepaidBalanceThresholdConfigurationV2;
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Priority of the contract.
|
|
657
|
+
*/
|
|
658
|
+
priority?: number;
|
|
407
659
|
|
|
408
660
|
/**
|
|
409
661
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -412,14 +664,14 @@ export interface ContractWithoutAmendments {
|
|
|
412
664
|
|
|
413
665
|
rate_card_id?: string;
|
|
414
666
|
|
|
415
|
-
recurring_commits?: Array<
|
|
667
|
+
recurring_commits?: Array<ContractV2.RecurringCommit>;
|
|
416
668
|
|
|
417
|
-
recurring_credits?: Array<
|
|
669
|
+
recurring_credits?: Array<ContractV2.RecurringCredit>;
|
|
418
670
|
|
|
419
671
|
/**
|
|
420
672
|
* This field's availability is dependent on your client's configuration.
|
|
421
673
|
*/
|
|
422
|
-
reseller_royalties?: Array<
|
|
674
|
+
reseller_royalties?: Array<ContractV2.ResellerRoyalty>;
|
|
423
675
|
|
|
424
676
|
/**
|
|
425
677
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -435,217 +687,1056 @@ export interface ContractWithoutAmendments {
|
|
|
435
687
|
*/
|
|
436
688
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
437
689
|
|
|
438
|
-
spend_threshold_configuration?:
|
|
690
|
+
spend_threshold_configuration?: SpendThresholdConfigurationV2;
|
|
439
691
|
|
|
440
692
|
/**
|
|
441
|
-
*
|
|
693
|
+
* List of subscriptions on the contract.
|
|
442
694
|
*/
|
|
695
|
+
subscriptions?: Array<Subscription>;
|
|
696
|
+
|
|
443
697
|
total_contract_value?: number;
|
|
444
698
|
|
|
445
|
-
|
|
699
|
+
/**
|
|
700
|
+
* Optional uniqueness key to prevent duplicate contract creations.
|
|
701
|
+
*/
|
|
702
|
+
uniqueness_key?: string;
|
|
446
703
|
}
|
|
447
704
|
|
|
448
|
-
export namespace
|
|
449
|
-
export interface
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
to_contract_id: string;
|
|
453
|
-
|
|
454
|
-
type: 'SUPERSEDE' | 'RENEWAL';
|
|
455
|
-
}
|
|
705
|
+
export namespace ContractV2 {
|
|
706
|
+
export interface Commit {
|
|
707
|
+
id: string;
|
|
456
708
|
|
|
457
|
-
export interface UsageStatementSchedule {
|
|
458
709
|
/**
|
|
459
|
-
*
|
|
710
|
+
* Timestamp of when the commit was created.
|
|
711
|
+
*
|
|
712
|
+
* - Recurring commits: latter of commit service period date and parent commit
|
|
713
|
+
* start date
|
|
714
|
+
* - Rollover commits: when the new contract started
|
|
460
715
|
*/
|
|
461
|
-
|
|
716
|
+
created_at: string;
|
|
462
717
|
|
|
463
|
-
|
|
464
|
-
|
|
718
|
+
product: Commit.Product;
|
|
719
|
+
|
|
720
|
+
type: 'PREPAID' | 'POSTPAID';
|
|
465
721
|
|
|
466
|
-
export interface ParentHierarchyConfiguration {
|
|
467
722
|
/**
|
|
468
|
-
*
|
|
723
|
+
* The schedule that the customer will gain access to the credits purposed with
|
|
724
|
+
* this commit.
|
|
469
725
|
*/
|
|
470
|
-
|
|
471
|
-
}
|
|
726
|
+
access_schedule?: Shared.ScheduleDuration;
|
|
472
727
|
|
|
473
|
-
|
|
474
|
-
export interface Child {
|
|
475
|
-
contract_id: string;
|
|
728
|
+
applicable_contract_ids?: Array<string>;
|
|
476
729
|
|
|
477
|
-
|
|
478
|
-
}
|
|
479
|
-
}
|
|
730
|
+
applicable_product_ids?: Array<string>;
|
|
480
731
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
*/
|
|
485
|
-
parent: ChildHierarchyConfiguration.Parent;
|
|
486
|
-
}
|
|
732
|
+
applicable_product_tags?: Array<string>;
|
|
733
|
+
|
|
734
|
+
archived_at?: string;
|
|
487
735
|
|
|
488
|
-
export namespace ChildHierarchyConfiguration {
|
|
489
736
|
/**
|
|
490
|
-
* The
|
|
737
|
+
* The current balance of the credit or commit. This balance reflects the amount of
|
|
738
|
+
* credit or commit that the customer has access to use at this moment - thus,
|
|
739
|
+
* expired and upcoming credit or commit segments contribute 0 to the balance. The
|
|
740
|
+
* balance will match the sum of all ledger entries with the exception of the case
|
|
741
|
+
* where the sum of negative manual ledger entries exceeds the positive amount
|
|
742
|
+
* remaining on the credit or commit - in that case, the balance will be 0. All
|
|
743
|
+
* manual ledger entries associated with active credit or commit segments are
|
|
744
|
+
* included in the balance, including future-dated manual ledger entries.
|
|
491
745
|
*/
|
|
492
|
-
|
|
493
|
-
contract_id: string;
|
|
494
|
-
|
|
495
|
-
customer_id: string;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
746
|
+
balance?: number;
|
|
498
747
|
|
|
499
|
-
|
|
500
|
-
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
748
|
+
contract?: Commit.Contract;
|
|
501
749
|
|
|
502
750
|
/**
|
|
503
|
-
*
|
|
504
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
505
|
-
* regardless of prior state.
|
|
751
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
506
752
|
*/
|
|
507
|
-
|
|
753
|
+
custom_fields?: { [key: string]: string };
|
|
508
754
|
|
|
509
|
-
|
|
755
|
+
description?: string;
|
|
510
756
|
|
|
511
757
|
/**
|
|
512
|
-
*
|
|
758
|
+
* Optional configuration for commit hierarchy access control
|
|
513
759
|
*/
|
|
514
|
-
|
|
760
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
515
761
|
|
|
516
762
|
/**
|
|
517
|
-
*
|
|
518
|
-
* balance lowers to this amount, a threshold charge will be initiated.
|
|
763
|
+
* The contract that this commit will be billed on.
|
|
519
764
|
*/
|
|
520
|
-
|
|
765
|
+
invoice_contract?: Commit.InvoiceContract;
|
|
521
766
|
|
|
522
767
|
/**
|
|
523
|
-
*
|
|
524
|
-
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
768
|
+
* The schedule that the customer will be invoiced for this commit.
|
|
525
769
|
*/
|
|
526
|
-
|
|
527
|
-
}
|
|
770
|
+
invoice_schedule?: Shared.SchedulePointInTime;
|
|
528
771
|
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
772
|
+
/**
|
|
773
|
+
* A list of ordered events that impact the balance of a commit. For example, an
|
|
774
|
+
* invoice deduction or a rollover.
|
|
775
|
+
*/
|
|
776
|
+
ledger?: Array<
|
|
777
|
+
| Commit.PrepaidCommitSegmentStartLedgerEntry
|
|
778
|
+
| Commit.PrepaidCommitAutomatedInvoiceDeductionLedgerEntry
|
|
779
|
+
| Commit.PrepaidCommitRolloverLedgerEntry
|
|
780
|
+
| Commit.PrepaidCommitExpirationLedgerEntry
|
|
781
|
+
| Commit.PrepaidCommitCanceledLedgerEntry
|
|
782
|
+
| Commit.PrepaidCommitCreditedLedgerEntry
|
|
783
|
+
| Commit.PrepaidCommitSeatBasedAdjustmentLedgerEntry
|
|
784
|
+
| Commit.PostpaidCommitInitialBalanceLedgerEntry
|
|
785
|
+
| Commit.PostpaidCommitAutomatedInvoiceDeductionLedgerEntry
|
|
786
|
+
| Commit.PostpaidCommitRolloverLedgerEntry
|
|
787
|
+
| Commit.PostpaidCommitTrueupLedgerEntry
|
|
788
|
+
| Commit.PrepaidCommitManualLedgerEntry
|
|
789
|
+
| Commit.PostpaidCommitManualLedgerEntry
|
|
790
|
+
| Commit.PostpaidCommitExpirationLedgerEntry
|
|
791
|
+
>;
|
|
536
792
|
|
|
537
|
-
|
|
538
|
-
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
539
|
-
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
540
|
-
* all products.
|
|
541
|
-
*/
|
|
542
|
-
applicable_product_ids?: Array<string>;
|
|
793
|
+
name?: string;
|
|
543
794
|
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
*/
|
|
549
|
-
applicable_product_tags?: Array<string>;
|
|
795
|
+
/**
|
|
796
|
+
* This field's availability is dependent on your client's configuration.
|
|
797
|
+
*/
|
|
798
|
+
netsuite_sales_order_id?: string;
|
|
550
799
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
*/
|
|
557
|
-
name?: string;
|
|
558
|
-
|
|
559
|
-
/**
|
|
560
|
-
* List of filters that determine what kind of customer usage draws down a commit
|
|
561
|
-
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
562
|
-
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
563
|
-
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
564
|
-
*/
|
|
565
|
-
specifiers?: Array<Commit.Specifier>;
|
|
566
|
-
}
|
|
800
|
+
/**
|
|
801
|
+
* If multiple credits or commits are applicable, the one with the lower priority
|
|
802
|
+
* will apply first.
|
|
803
|
+
*/
|
|
804
|
+
priority?: number;
|
|
567
805
|
|
|
568
|
-
|
|
569
|
-
export interface Specifier {
|
|
570
|
-
presentation_group_values?: { [key: string]: string };
|
|
806
|
+
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
571
807
|
|
|
572
|
-
|
|
808
|
+
rolled_over_from?: Commit.RolledOverFrom;
|
|
573
809
|
|
|
574
|
-
|
|
575
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
576
|
-
*/
|
|
577
|
-
product_id?: string;
|
|
810
|
+
rollover_fraction?: number;
|
|
578
811
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
product_tags?: Array<string>;
|
|
584
|
-
}
|
|
585
|
-
}
|
|
812
|
+
/**
|
|
813
|
+
* This field's availability is dependent on your client's configuration.
|
|
814
|
+
*/
|
|
815
|
+
salesforce_opportunity_id?: string;
|
|
586
816
|
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
817
|
+
/**
|
|
818
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
819
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
820
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
821
|
+
*/
|
|
822
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
export namespace Commit {
|
|
826
|
+
export interface Product {
|
|
827
|
+
id: string;
|
|
828
|
+
|
|
829
|
+
name: string;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
export interface Contract {
|
|
833
|
+
id: string;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* The contract that this commit will be billed on.
|
|
838
|
+
*/
|
|
839
|
+
export interface InvoiceContract {
|
|
840
|
+
id: string;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
export interface PrepaidCommitSegmentStartLedgerEntry {
|
|
844
|
+
amount: number;
|
|
845
|
+
|
|
846
|
+
segment_id: string;
|
|
847
|
+
|
|
848
|
+
timestamp: string;
|
|
849
|
+
|
|
850
|
+
type: 'PREPAID_COMMIT_SEGMENT_START';
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
export interface PrepaidCommitAutomatedInvoiceDeductionLedgerEntry {
|
|
854
|
+
amount: number;
|
|
855
|
+
|
|
856
|
+
invoice_id: string;
|
|
857
|
+
|
|
858
|
+
segment_id: string;
|
|
859
|
+
|
|
860
|
+
timestamp: string;
|
|
861
|
+
|
|
862
|
+
type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
863
|
+
|
|
864
|
+
contract_id?: string;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
export interface PrepaidCommitRolloverLedgerEntry {
|
|
868
|
+
amount: number;
|
|
869
|
+
|
|
870
|
+
new_contract_id: string;
|
|
871
|
+
|
|
872
|
+
segment_id: string;
|
|
873
|
+
|
|
874
|
+
timestamp: string;
|
|
875
|
+
|
|
876
|
+
type: 'PREPAID_COMMIT_ROLLOVER';
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
export interface PrepaidCommitExpirationLedgerEntry {
|
|
880
|
+
amount: number;
|
|
881
|
+
|
|
882
|
+
segment_id: string;
|
|
883
|
+
|
|
884
|
+
timestamp: string;
|
|
885
|
+
|
|
886
|
+
type: 'PREPAID_COMMIT_EXPIRATION';
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
export interface PrepaidCommitCanceledLedgerEntry {
|
|
890
|
+
amount: number;
|
|
891
|
+
|
|
892
|
+
invoice_id: string;
|
|
893
|
+
|
|
894
|
+
segment_id: string;
|
|
895
|
+
|
|
896
|
+
timestamp: string;
|
|
897
|
+
|
|
898
|
+
type: 'PREPAID_COMMIT_CANCELED';
|
|
899
|
+
|
|
900
|
+
contract_id?: string;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
export interface PrepaidCommitCreditedLedgerEntry {
|
|
904
|
+
amount: number;
|
|
905
|
+
|
|
906
|
+
invoice_id: string;
|
|
907
|
+
|
|
908
|
+
segment_id: string;
|
|
909
|
+
|
|
910
|
+
timestamp: string;
|
|
911
|
+
|
|
912
|
+
type: 'PREPAID_COMMIT_CREDITED';
|
|
913
|
+
|
|
914
|
+
contract_id?: string;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
export interface PrepaidCommitSeatBasedAdjustmentLedgerEntry {
|
|
918
|
+
amount: number;
|
|
919
|
+
|
|
920
|
+
segment_id: string;
|
|
921
|
+
|
|
922
|
+
timestamp: string;
|
|
923
|
+
|
|
924
|
+
type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT';
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
export interface PostpaidCommitInitialBalanceLedgerEntry {
|
|
928
|
+
amount: number;
|
|
929
|
+
|
|
930
|
+
timestamp: string;
|
|
931
|
+
|
|
932
|
+
type: 'POSTPAID_COMMIT_INITIAL_BALANCE';
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
export interface PostpaidCommitAutomatedInvoiceDeductionLedgerEntry {
|
|
936
|
+
amount: number;
|
|
937
|
+
|
|
938
|
+
invoice_id: string;
|
|
939
|
+
|
|
940
|
+
segment_id: string;
|
|
941
|
+
|
|
942
|
+
timestamp: string;
|
|
943
|
+
|
|
944
|
+
type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
945
|
+
|
|
946
|
+
contract_id?: string;
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
export interface PostpaidCommitRolloverLedgerEntry {
|
|
950
|
+
amount: number;
|
|
951
|
+
|
|
952
|
+
new_contract_id: string;
|
|
953
|
+
|
|
954
|
+
segment_id: string;
|
|
955
|
+
|
|
956
|
+
timestamp: string;
|
|
957
|
+
|
|
958
|
+
type: 'POSTPAID_COMMIT_ROLLOVER';
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
export interface PostpaidCommitTrueupLedgerEntry {
|
|
962
|
+
amount: number;
|
|
963
|
+
|
|
964
|
+
invoice_id: string;
|
|
965
|
+
|
|
966
|
+
timestamp: string;
|
|
967
|
+
|
|
968
|
+
type: 'POSTPAID_COMMIT_TRUEUP';
|
|
969
|
+
|
|
970
|
+
contract_id?: string;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
export interface PrepaidCommitManualLedgerEntry {
|
|
974
|
+
amount: number;
|
|
975
|
+
|
|
976
|
+
reason: string;
|
|
977
|
+
|
|
978
|
+
timestamp: string;
|
|
979
|
+
|
|
980
|
+
type: 'PREPAID_COMMIT_MANUAL';
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
export interface PostpaidCommitManualLedgerEntry {
|
|
984
|
+
amount: number;
|
|
985
|
+
|
|
986
|
+
reason: string;
|
|
987
|
+
|
|
988
|
+
timestamp: string;
|
|
989
|
+
|
|
990
|
+
type: 'POSTPAID_COMMIT_MANUAL';
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
export interface PostpaidCommitExpirationLedgerEntry {
|
|
994
|
+
amount: number;
|
|
995
|
+
|
|
996
|
+
timestamp: string;
|
|
997
|
+
|
|
998
|
+
type: 'POSTPAID_COMMIT_EXPIRATION';
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
export interface RolledOverFrom {
|
|
1002
|
+
commit_id: string;
|
|
1003
|
+
|
|
1004
|
+
contract_id: string;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
export interface Override {
|
|
1009
|
+
id: string;
|
|
1010
|
+
|
|
1011
|
+
starting_at: string;
|
|
1012
|
+
|
|
1013
|
+
applicable_product_tags?: Array<string>;
|
|
1014
|
+
|
|
1015
|
+
ending_before?: string;
|
|
1016
|
+
|
|
1017
|
+
entitled?: boolean;
|
|
1018
|
+
|
|
1019
|
+
is_commit_specific?: boolean;
|
|
1020
|
+
|
|
1021
|
+
multiplier?: number;
|
|
1022
|
+
|
|
1023
|
+
override_specifiers?: Array<Override.OverrideSpecifier>;
|
|
1024
|
+
|
|
1025
|
+
override_tiers?: Array<Shared.OverrideTier>;
|
|
1026
|
+
|
|
1027
|
+
overwrite_rate?: Shared.OverwriteRate;
|
|
1028
|
+
|
|
1029
|
+
priority?: number;
|
|
1030
|
+
|
|
1031
|
+
product?: Override.Product;
|
|
1032
|
+
|
|
1033
|
+
target?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1034
|
+
|
|
1035
|
+
type?: 'OVERWRITE' | 'MULTIPLIER' | 'TIERED';
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
export namespace Override {
|
|
1039
|
+
export interface OverrideSpecifier {
|
|
1040
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1041
|
+
|
|
1042
|
+
commit_ids?: Array<string>;
|
|
1043
|
+
|
|
1044
|
+
presentation_group_values?: { [key: string]: string | null };
|
|
1045
|
+
|
|
1046
|
+
pricing_group_values?: { [key: string]: string };
|
|
1047
|
+
|
|
1048
|
+
product_id?: string;
|
|
1049
|
+
|
|
1050
|
+
product_tags?: Array<string>;
|
|
1051
|
+
|
|
1052
|
+
recurring_commit_ids?: Array<string>;
|
|
1053
|
+
|
|
1054
|
+
recurring_credit_ids?: Array<string>;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
export interface Product {
|
|
1058
|
+
id: string;
|
|
1059
|
+
|
|
1060
|
+
name: string;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
export interface Transition {
|
|
1065
|
+
from_contract_id: string;
|
|
1066
|
+
|
|
1067
|
+
to_contract_id: string;
|
|
1068
|
+
|
|
1069
|
+
type: 'SUPERSEDE' | 'RENEWAL';
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
export interface UsageFilter {
|
|
1073
|
+
group_key: string;
|
|
1074
|
+
|
|
1075
|
+
group_values: Array<string>;
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* This will match contract starting_at value if usage filter is active from the
|
|
1079
|
+
* beginning of the contract.
|
|
1080
|
+
*/
|
|
1081
|
+
starting_at: string;
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* This will match contract ending_before value if usage filter is active until the
|
|
1085
|
+
* end of the contract. It will be undefined if the contract is open-ended.
|
|
1086
|
+
*/
|
|
1087
|
+
ending_before?: string;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
export interface UsageStatementSchedule {
|
|
1091
|
+
/**
|
|
1092
|
+
* Contract usage statements follow a selected cadence based on this date.
|
|
1093
|
+
*/
|
|
1094
|
+
billing_anchor_date: string;
|
|
1095
|
+
|
|
1096
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
export interface Credit {
|
|
1100
|
+
id: string;
|
|
1101
|
+
|
|
1102
|
+
product: Credit.Product;
|
|
1103
|
+
|
|
1104
|
+
type: 'CREDIT';
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* The schedule that the customer will gain access to the credits.
|
|
1108
|
+
*/
|
|
1109
|
+
access_schedule?: Shared.ScheduleDuration;
|
|
1110
|
+
|
|
1111
|
+
applicable_contract_ids?: Array<string>;
|
|
1112
|
+
|
|
1113
|
+
applicable_product_ids?: Array<string>;
|
|
1114
|
+
|
|
1115
|
+
applicable_product_tags?: Array<string>;
|
|
1116
|
+
|
|
1117
|
+
/**
|
|
1118
|
+
* The current balance of the credit or commit. This balance reflects the amount of
|
|
1119
|
+
* credit or commit that the customer has access to use at this moment - thus,
|
|
1120
|
+
* expired and upcoming credit or commit segments contribute 0 to the balance. The
|
|
1121
|
+
* balance will match the sum of all ledger entries with the exception of the case
|
|
1122
|
+
* where the sum of negative manual ledger entries exceeds the positive amount
|
|
1123
|
+
* remaining on the credit or commit - in that case, the balance will be 0. All
|
|
1124
|
+
* manual ledger entries associated with active credit or commit segments are
|
|
1125
|
+
* included in the balance, including future-dated manual ledger entries.
|
|
1126
|
+
*/
|
|
1127
|
+
balance?: number;
|
|
1128
|
+
|
|
1129
|
+
contract?: Credit.Contract;
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1133
|
+
*/
|
|
1134
|
+
custom_fields?: { [key: string]: string };
|
|
1135
|
+
|
|
1136
|
+
description?: string;
|
|
1137
|
+
|
|
1138
|
+
/**
|
|
1139
|
+
* Optional configuration for credit hierarchy access control
|
|
1140
|
+
*/
|
|
1141
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* A list of ordered events that impact the balance of a credit. For example, an
|
|
1145
|
+
* invoice deduction or an expiration.
|
|
1146
|
+
*/
|
|
1147
|
+
ledger?: Array<
|
|
1148
|
+
| Credit.CreditSegmentStartLedgerEntry
|
|
1149
|
+
| Credit.CreditAutomatedInvoiceDeductionLedgerEntry
|
|
1150
|
+
| Credit.CreditExpirationLedgerEntry
|
|
1151
|
+
| Credit.CreditCanceledLedgerEntry
|
|
1152
|
+
| Credit.CreditCreditedLedgerEntry
|
|
1153
|
+
| Credit.CreditManualLedgerEntry
|
|
1154
|
+
| Credit.CreditSeatBasedAdjustmentLedgerEntry
|
|
1155
|
+
>;
|
|
1156
|
+
|
|
1157
|
+
name?: string;
|
|
1158
|
+
|
|
1159
|
+
/**
|
|
1160
|
+
* This field's availability is dependent on your client's configuration.
|
|
1161
|
+
*/
|
|
1162
|
+
netsuite_sales_order_id?: string;
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* If multiple credits or commits are applicable, the one with the lower priority
|
|
1166
|
+
* will apply first.
|
|
1167
|
+
*/
|
|
1168
|
+
priority?: number;
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* This field's availability is dependent on your client's configuration.
|
|
1172
|
+
*/
|
|
1173
|
+
salesforce_opportunity_id?: string;
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1177
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1178
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1179
|
+
*/
|
|
1180
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
export namespace Credit {
|
|
1184
|
+
export interface Product {
|
|
1185
|
+
id: string;
|
|
1186
|
+
|
|
1187
|
+
name: string;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
export interface Contract {
|
|
1191
|
+
id: string;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
export interface CreditSegmentStartLedgerEntry {
|
|
1195
|
+
amount: number;
|
|
1196
|
+
|
|
1197
|
+
segment_id: string;
|
|
1198
|
+
|
|
1199
|
+
timestamp: string;
|
|
1200
|
+
|
|
1201
|
+
type: 'CREDIT_SEGMENT_START';
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
export interface CreditAutomatedInvoiceDeductionLedgerEntry {
|
|
1205
|
+
amount: number;
|
|
1206
|
+
|
|
1207
|
+
invoice_id: string;
|
|
1208
|
+
|
|
1209
|
+
segment_id: string;
|
|
1210
|
+
|
|
1211
|
+
timestamp: string;
|
|
1212
|
+
|
|
1213
|
+
type: 'CREDIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
1214
|
+
|
|
1215
|
+
contract_id?: string;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
export interface CreditExpirationLedgerEntry {
|
|
1219
|
+
amount: number;
|
|
1220
|
+
|
|
1221
|
+
segment_id: string;
|
|
1222
|
+
|
|
1223
|
+
timestamp: string;
|
|
1224
|
+
|
|
1225
|
+
type: 'CREDIT_EXPIRATION';
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
export interface CreditCanceledLedgerEntry {
|
|
1229
|
+
amount: number;
|
|
1230
|
+
|
|
1231
|
+
invoice_id: string;
|
|
1232
|
+
|
|
1233
|
+
segment_id: string;
|
|
1234
|
+
|
|
1235
|
+
timestamp: string;
|
|
1236
|
+
|
|
1237
|
+
type: 'CREDIT_CANCELED';
|
|
1238
|
+
|
|
1239
|
+
contract_id?: string;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
export interface CreditCreditedLedgerEntry {
|
|
1243
|
+
amount: number;
|
|
1244
|
+
|
|
1245
|
+
invoice_id: string;
|
|
1246
|
+
|
|
1247
|
+
segment_id: string;
|
|
1248
|
+
|
|
1249
|
+
timestamp: string;
|
|
1250
|
+
|
|
1251
|
+
type: 'CREDIT_CREDITED';
|
|
1252
|
+
|
|
1253
|
+
contract_id?: string;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
export interface CreditManualLedgerEntry {
|
|
1257
|
+
amount: number;
|
|
1258
|
+
|
|
1259
|
+
reason: string;
|
|
1260
|
+
|
|
1261
|
+
timestamp: string;
|
|
1262
|
+
|
|
1263
|
+
type: 'CREDIT_MANUAL';
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
export interface CreditSeatBasedAdjustmentLedgerEntry {
|
|
1267
|
+
amount: number;
|
|
1268
|
+
|
|
1269
|
+
segment_id: string;
|
|
1270
|
+
|
|
1271
|
+
timestamp: string;
|
|
1272
|
+
|
|
1273
|
+
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* This field's availability is dependent on your client's configuration.
|
|
1279
|
+
*/
|
|
1280
|
+
export interface CustomerBillingProviderConfiguration {
|
|
1281
|
+
/**
|
|
1282
|
+
* ID of Customer's billing provider configuration.
|
|
1283
|
+
*/
|
|
1284
|
+
id: string;
|
|
1285
|
+
|
|
1286
|
+
billing_provider:
|
|
1287
|
+
| 'aws_marketplace'
|
|
1288
|
+
| 'stripe'
|
|
1289
|
+
| 'netsuite'
|
|
1290
|
+
| 'custom'
|
|
1291
|
+
| 'azure_marketplace'
|
|
1292
|
+
| 'quickbooks_online'
|
|
1293
|
+
| 'workday'
|
|
1294
|
+
| 'gcp_marketplace';
|
|
1295
|
+
|
|
1296
|
+
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
1301
|
+
* respective list endpoints to get the full lists.
|
|
1302
|
+
*/
|
|
1303
|
+
export interface HasMore {
|
|
1304
|
+
/**
|
|
1305
|
+
* Whether there are more commits on this contract than the limit for this
|
|
1306
|
+
* endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
|
|
1307
|
+
* of commits.
|
|
1308
|
+
*/
|
|
1309
|
+
commits: boolean;
|
|
1310
|
+
|
|
1311
|
+
/**
|
|
1312
|
+
* Whether there are more credits on this contract than the limit for this
|
|
1313
|
+
* endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
|
|
1314
|
+
* of credits.
|
|
1315
|
+
*/
|
|
1316
|
+
credits: boolean;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
export interface RecurringCommit {
|
|
1320
|
+
id: string;
|
|
1321
|
+
|
|
1322
|
+
/**
|
|
1323
|
+
* The amount of commit to grant.
|
|
1324
|
+
*/
|
|
1325
|
+
access_amount: RecurringCommit.AccessAmount;
|
|
1326
|
+
|
|
1327
|
+
/**
|
|
1328
|
+
* The amount of time the created commits will be valid for
|
|
1329
|
+
*/
|
|
1330
|
+
commit_duration: RecurringCommit.CommitDuration;
|
|
1331
|
+
|
|
1332
|
+
/**
|
|
1333
|
+
* Will be passed down to the individual commits
|
|
1334
|
+
*/
|
|
1335
|
+
priority: number;
|
|
1336
|
+
|
|
1337
|
+
product: RecurringCommit.Product;
|
|
1338
|
+
|
|
1339
|
+
/**
|
|
1340
|
+
* Whether the created commits will use the commit rate or list rate
|
|
1341
|
+
*/
|
|
1342
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* Determines the start time for the first commit
|
|
1346
|
+
*/
|
|
1347
|
+
starting_at: string;
|
|
1348
|
+
|
|
1349
|
+
/**
|
|
1350
|
+
* Will be passed down to the individual commits
|
|
1351
|
+
*/
|
|
1352
|
+
applicable_product_ids?: Array<string>;
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* Will be passed down to the individual commits
|
|
1356
|
+
*/
|
|
1357
|
+
applicable_product_tags?: Array<string>;
|
|
1358
|
+
|
|
1359
|
+
contract?: RecurringCommit.Contract;
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* Will be passed down to the individual commits
|
|
1363
|
+
*/
|
|
1364
|
+
description?: string;
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
1368
|
+
*/
|
|
1369
|
+
ending_before?: string;
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
1373
|
+
*/
|
|
1374
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1375
|
+
|
|
1376
|
+
/**
|
|
1377
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
1378
|
+
*/
|
|
1379
|
+
invoice_amount?: RecurringCommit.InvoiceAmount;
|
|
1380
|
+
|
|
1381
|
+
/**
|
|
1382
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
1383
|
+
*/
|
|
1384
|
+
name?: string;
|
|
1385
|
+
|
|
1386
|
+
/**
|
|
1387
|
+
* Will be passed down to the individual commits
|
|
1388
|
+
*/
|
|
1389
|
+
netsuite_sales_order_id?: string;
|
|
1390
|
+
|
|
1391
|
+
/**
|
|
1392
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
1393
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1394
|
+
*/
|
|
1395
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1396
|
+
|
|
1397
|
+
/**
|
|
1398
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1399
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1400
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1401
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1402
|
+
* invoice dates.
|
|
1403
|
+
*/
|
|
1404
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
1408
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1409
|
+
* between 0 and 1.
|
|
1410
|
+
*/
|
|
1411
|
+
rollover_fraction?: number;
|
|
1412
|
+
|
|
1413
|
+
/**
|
|
1414
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1415
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1416
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1417
|
+
*/
|
|
1418
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1422
|
+
*/
|
|
1423
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
export namespace RecurringCommit {
|
|
1427
|
+
/**
|
|
1428
|
+
* The amount of commit to grant.
|
|
1429
|
+
*/
|
|
1430
|
+
export interface AccessAmount {
|
|
1431
|
+
credit_type_id: string;
|
|
1432
|
+
|
|
1433
|
+
unit_price: number;
|
|
1434
|
+
|
|
1435
|
+
quantity?: number;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
/**
|
|
1439
|
+
* The amount of time the created commits will be valid for
|
|
1440
|
+
*/
|
|
1441
|
+
export interface CommitDuration {
|
|
1442
|
+
value: number;
|
|
1443
|
+
|
|
1444
|
+
unit?: 'PERIODS';
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
export interface Product {
|
|
1448
|
+
id: string;
|
|
1449
|
+
|
|
1450
|
+
name: string;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
export interface Contract {
|
|
1454
|
+
id: string;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* The amount the customer should be billed for the commit. Not required.
|
|
1459
|
+
*/
|
|
1460
|
+
export interface InvoiceAmount {
|
|
1461
|
+
credit_type_id: string;
|
|
1462
|
+
|
|
1463
|
+
quantity: number;
|
|
1464
|
+
|
|
1465
|
+
unit_price: number;
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
export interface RecurringCredit {
|
|
1470
|
+
id: string;
|
|
1471
|
+
|
|
1472
|
+
/**
|
|
1473
|
+
* The amount of commit to grant.
|
|
1474
|
+
*/
|
|
1475
|
+
access_amount: RecurringCredit.AccessAmount;
|
|
1476
|
+
|
|
1477
|
+
/**
|
|
1478
|
+
* The amount of time the created commits will be valid for
|
|
1479
|
+
*/
|
|
1480
|
+
commit_duration: RecurringCredit.CommitDuration;
|
|
1481
|
+
|
|
1482
|
+
/**
|
|
1483
|
+
* Will be passed down to the individual commits
|
|
1484
|
+
*/
|
|
1485
|
+
priority: number;
|
|
1486
|
+
|
|
1487
|
+
product: RecurringCredit.Product;
|
|
1488
|
+
|
|
1489
|
+
/**
|
|
1490
|
+
* Whether the created commits will use the commit rate or list rate
|
|
1491
|
+
*/
|
|
1492
|
+
rate_type: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1493
|
+
|
|
1494
|
+
/**
|
|
1495
|
+
* Determines the start time for the first commit
|
|
1496
|
+
*/
|
|
1497
|
+
starting_at: string;
|
|
1498
|
+
|
|
1499
|
+
/**
|
|
1500
|
+
* Will be passed down to the individual commits
|
|
1501
|
+
*/
|
|
1502
|
+
applicable_product_ids?: Array<string>;
|
|
1503
|
+
|
|
1504
|
+
/**
|
|
1505
|
+
* Will be passed down to the individual commits
|
|
1506
|
+
*/
|
|
1507
|
+
applicable_product_tags?: Array<string>;
|
|
1508
|
+
|
|
1509
|
+
contract?: RecurringCredit.Contract;
|
|
1510
|
+
|
|
1511
|
+
/**
|
|
1512
|
+
* Will be passed down to the individual commits
|
|
1513
|
+
*/
|
|
1514
|
+
description?: string;
|
|
1515
|
+
|
|
1516
|
+
/**
|
|
1517
|
+
* Determines when the contract will stop creating recurring commits. Optional
|
|
1518
|
+
*/
|
|
1519
|
+
ending_before?: string;
|
|
1520
|
+
|
|
1521
|
+
/**
|
|
1522
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
1523
|
+
*/
|
|
1524
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
* Displayed on invoices. Will be passed through to the individual commits
|
|
1528
|
+
*/
|
|
1529
|
+
name?: string;
|
|
1530
|
+
|
|
1531
|
+
/**
|
|
1532
|
+
* Will be passed down to the individual commits
|
|
1533
|
+
*/
|
|
1534
|
+
netsuite_sales_order_id?: string;
|
|
1535
|
+
|
|
1536
|
+
/**
|
|
1537
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
1538
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1539
|
+
*/
|
|
1540
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
1541
|
+
|
|
1542
|
+
/**
|
|
1543
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1544
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1545
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1546
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1547
|
+
* invoice dates.
|
|
1548
|
+
*/
|
|
1549
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* Will be passed down to the individual commits. This controls how much of an
|
|
1553
|
+
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1554
|
+
* between 0 and 1.
|
|
1555
|
+
*/
|
|
1556
|
+
rollover_fraction?: number;
|
|
1557
|
+
|
|
1558
|
+
/**
|
|
1559
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1560
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1561
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1562
|
+
*/
|
|
1563
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1567
|
+
*/
|
|
1568
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
export namespace RecurringCredit {
|
|
1572
|
+
/**
|
|
1573
|
+
* The amount of commit to grant.
|
|
1574
|
+
*/
|
|
1575
|
+
export interface AccessAmount {
|
|
1576
|
+
credit_type_id: string;
|
|
1577
|
+
|
|
1578
|
+
unit_price: number;
|
|
1579
|
+
|
|
1580
|
+
quantity?: number;
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
/**
|
|
1584
|
+
* The amount of time the created commits will be valid for
|
|
1585
|
+
*/
|
|
1586
|
+
export interface CommitDuration {
|
|
1587
|
+
value: number;
|
|
1588
|
+
|
|
1589
|
+
unit?: 'PERIODS';
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
export interface Product {
|
|
1593
|
+
id: string;
|
|
1594
|
+
|
|
1595
|
+
name: string;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
export interface Contract {
|
|
1599
|
+
id: string;
|
|
612
1600
|
}
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
export interface ResellerRoyalty {
|
|
1604
|
+
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
1605
|
+
|
|
1606
|
+
segments: Array<ResellerRoyalty.Segment>;
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
export namespace ResellerRoyalty {
|
|
1610
|
+
export interface Segment {
|
|
1611
|
+
fraction: number;
|
|
1612
|
+
|
|
1613
|
+
netsuite_reseller_id: string;
|
|
1614
|
+
|
|
1615
|
+
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
1616
|
+
|
|
1617
|
+
starting_at: string;
|
|
1618
|
+
|
|
1619
|
+
applicable_product_ids?: Array<string>;
|
|
1620
|
+
|
|
1621
|
+
applicable_product_tags?: Array<string>;
|
|
1622
|
+
|
|
1623
|
+
aws_account_number?: string;
|
|
1624
|
+
|
|
1625
|
+
aws_offer_id?: string;
|
|
1626
|
+
|
|
1627
|
+
aws_payer_reference_id?: string;
|
|
613
1628
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
* denomination as the commit's invoice schedule
|
|
622
|
-
*/
|
|
623
|
-
tax_amount: number;
|
|
624
|
-
|
|
625
|
-
/**
|
|
626
|
-
* Name of the tax to be applied. This may be used in an invoice line item
|
|
627
|
-
* description.
|
|
628
|
-
*/
|
|
629
|
-
tax_name?: string;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
/**
|
|
633
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
634
|
-
*/
|
|
635
|
-
export interface StripeConfig {
|
|
636
|
-
/**
|
|
637
|
-
* If left blank, will default to INVOICE
|
|
638
|
-
*/
|
|
639
|
-
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
640
|
-
|
|
641
|
-
/**
|
|
642
|
-
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
643
|
-
* your payment type.
|
|
644
|
-
*/
|
|
645
|
-
invoice_metadata?: { [key: string]: string };
|
|
646
|
-
}
|
|
1629
|
+
ending_before?: string;
|
|
1630
|
+
|
|
1631
|
+
gcp_account_id?: string;
|
|
1632
|
+
|
|
1633
|
+
gcp_offer_id?: string;
|
|
1634
|
+
|
|
1635
|
+
reseller_contract_value?: number;
|
|
647
1636
|
}
|
|
648
1637
|
}
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
export interface ContractWithoutAmendments {
|
|
1641
|
+
commits: Array<Commit>;
|
|
1642
|
+
|
|
1643
|
+
created_at: string;
|
|
1644
|
+
|
|
1645
|
+
created_by: string;
|
|
1646
|
+
|
|
1647
|
+
overrides: Array<Override>;
|
|
1648
|
+
|
|
1649
|
+
scheduled_charges: Array<ScheduledCharge>;
|
|
1650
|
+
|
|
1651
|
+
starting_at: string;
|
|
1652
|
+
|
|
1653
|
+
transitions: Array<ContractWithoutAmendments.Transition>;
|
|
1654
|
+
|
|
1655
|
+
usage_statement_schedule: ContractWithoutAmendments.UsageStatementSchedule;
|
|
1656
|
+
|
|
1657
|
+
credits?: Array<Credit>;
|
|
1658
|
+
|
|
1659
|
+
/**
|
|
1660
|
+
* This field's availability is dependent on your client's configuration.
|
|
1661
|
+
*/
|
|
1662
|
+
discounts?: Array<Discount>;
|
|
1663
|
+
|
|
1664
|
+
ending_before?: string;
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
1668
|
+
* configuration with a single parent.
|
|
1669
|
+
*/
|
|
1670
|
+
hierarchy_configuration?: HierarchyConfiguration;
|
|
1671
|
+
|
|
1672
|
+
name?: string;
|
|
1673
|
+
|
|
1674
|
+
net_payment_terms_days?: number;
|
|
1675
|
+
|
|
1676
|
+
/**
|
|
1677
|
+
* This field's availability is dependent on your client's configuration.
|
|
1678
|
+
*/
|
|
1679
|
+
netsuite_sales_order_id?: string;
|
|
1680
|
+
|
|
1681
|
+
prepaid_balance_threshold_configuration?: PrepaidBalanceThresholdConfiguration;
|
|
1682
|
+
|
|
1683
|
+
/**
|
|
1684
|
+
* This field's availability is dependent on your client's configuration.
|
|
1685
|
+
*/
|
|
1686
|
+
professional_services?: Array<ProService>;
|
|
1687
|
+
|
|
1688
|
+
rate_card_id?: string;
|
|
1689
|
+
|
|
1690
|
+
recurring_commits?: Array<ContractWithoutAmendments.RecurringCommit>;
|
|
1691
|
+
|
|
1692
|
+
recurring_credits?: Array<ContractWithoutAmendments.RecurringCredit>;
|
|
1693
|
+
|
|
1694
|
+
/**
|
|
1695
|
+
* This field's availability is dependent on your client's configuration.
|
|
1696
|
+
*/
|
|
1697
|
+
reseller_royalties?: Array<ContractWithoutAmendments.ResellerRoyalty>;
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* This field's availability is dependent on your client's configuration.
|
|
1701
|
+
*/
|
|
1702
|
+
salesforce_opportunity_id?: string;
|
|
1703
|
+
|
|
1704
|
+
/**
|
|
1705
|
+
* Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
1706
|
+
* usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
1707
|
+
* `ending_before` date for consolidation to occur. This field cannot be modified
|
|
1708
|
+
* after a Contract has been created. If this field is omitted, charges will appear
|
|
1709
|
+
* on a separate invoice from usage charges.
|
|
1710
|
+
*/
|
|
1711
|
+
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
1712
|
+
|
|
1713
|
+
spend_threshold_configuration?: SpendThresholdConfiguration;
|
|
1714
|
+
|
|
1715
|
+
/**
|
|
1716
|
+
* This field's availability is dependent on your client's configuration.
|
|
1717
|
+
*/
|
|
1718
|
+
total_contract_value?: number;
|
|
1719
|
+
|
|
1720
|
+
usage_filter?: ContractWithoutAmendments.UsageFilter;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
export namespace ContractWithoutAmendments {
|
|
1724
|
+
export interface Transition {
|
|
1725
|
+
from_contract_id: string;
|
|
1726
|
+
|
|
1727
|
+
to_contract_id: string;
|
|
1728
|
+
|
|
1729
|
+
type: 'SUPERSEDE' | 'RENEWAL';
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
export interface UsageStatementSchedule {
|
|
1733
|
+
/**
|
|
1734
|
+
* Contract usage statements follow a selected cadence based on this date.
|
|
1735
|
+
*/
|
|
1736
|
+
billing_anchor_date: string;
|
|
1737
|
+
|
|
1738
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1739
|
+
}
|
|
649
1740
|
|
|
650
1741
|
export interface RecurringCommit {
|
|
651
1742
|
id: string;
|
|
@@ -702,7 +1793,7 @@ export namespace ContractWithoutAmendments {
|
|
|
702
1793
|
/**
|
|
703
1794
|
* Optional configuration for recurring commit/credit hierarchy access control
|
|
704
1795
|
*/
|
|
705
|
-
hierarchy_configuration?:
|
|
1796
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
706
1797
|
|
|
707
1798
|
/**
|
|
708
1799
|
* The amount the customer should be billed for the commit. Not required.
|
|
@@ -746,12 +1837,12 @@ export namespace ContractWithoutAmendments {
|
|
|
746
1837
|
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
747
1838
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
748
1839
|
*/
|
|
749
|
-
specifiers?: Array<
|
|
1840
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
750
1841
|
|
|
751
1842
|
/**
|
|
752
1843
|
* Attach a subscription to the recurring commit/credit.
|
|
753
1844
|
*/
|
|
754
|
-
subscription_config?:
|
|
1845
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
755
1846
|
}
|
|
756
1847
|
|
|
757
1848
|
export namespace RecurringCommit {
|
|
@@ -785,32 +1876,6 @@ export namespace ContractWithoutAmendments {
|
|
|
785
1876
|
id: string;
|
|
786
1877
|
}
|
|
787
1878
|
|
|
788
|
-
/**
|
|
789
|
-
* Optional configuration for recurring commit/credit hierarchy access control
|
|
790
|
-
*/
|
|
791
|
-
export interface HierarchyConfiguration {
|
|
792
|
-
child_access:
|
|
793
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessAll
|
|
794
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessNone
|
|
795
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
export namespace HierarchyConfiguration {
|
|
799
|
-
export interface CommitHierarchyChildAccessAll {
|
|
800
|
-
type: 'ALL';
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
export interface CommitHierarchyChildAccessNone {
|
|
804
|
-
type: 'NONE';
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
export interface CommitHierarchyChildAccessContractIDs {
|
|
808
|
-
contract_ids: Array<string>;
|
|
809
|
-
|
|
810
|
-
type: 'CONTRACT_IDS';
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
|
|
814
1879
|
/**
|
|
815
1880
|
* The amount the customer should be billed for the commit. Not required.
|
|
816
1881
|
*/
|
|
@@ -821,43 +1886,6 @@ export namespace ContractWithoutAmendments {
|
|
|
821
1886
|
|
|
822
1887
|
unit_price: number;
|
|
823
1888
|
}
|
|
824
|
-
|
|
825
|
-
export interface Specifier {
|
|
826
|
-
presentation_group_values?: { [key: string]: string };
|
|
827
|
-
|
|
828
|
-
pricing_group_values?: { [key: string]: string };
|
|
829
|
-
|
|
830
|
-
/**
|
|
831
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
832
|
-
*/
|
|
833
|
-
product_id?: string;
|
|
834
|
-
|
|
835
|
-
/**
|
|
836
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
837
|
-
* tags.
|
|
838
|
-
*/
|
|
839
|
-
product_tags?: Array<string>;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
/**
|
|
843
|
-
* Attach a subscription to the recurring commit/credit.
|
|
844
|
-
*/
|
|
845
|
-
export interface SubscriptionConfig {
|
|
846
|
-
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
847
|
-
|
|
848
|
-
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
849
|
-
|
|
850
|
-
subscription_id: string;
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
export namespace SubscriptionConfig {
|
|
854
|
-
export interface ApplySeatIncreaseConfig {
|
|
855
|
-
/**
|
|
856
|
-
* Indicates whether a mid-period seat increase should be prorated.
|
|
857
|
-
*/
|
|
858
|
-
is_prorated: boolean;
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
1889
|
}
|
|
862
1890
|
|
|
863
1891
|
export interface RecurringCredit {
|
|
@@ -915,7 +1943,7 @@ export namespace ContractWithoutAmendments {
|
|
|
915
1943
|
/**
|
|
916
1944
|
* Optional configuration for recurring commit/credit hierarchy access control
|
|
917
1945
|
*/
|
|
918
|
-
hierarchy_configuration?:
|
|
1946
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
919
1947
|
|
|
920
1948
|
/**
|
|
921
1949
|
* Displayed on invoices. Will be passed through to the individual commits
|
|
@@ -954,12 +1982,12 @@ export namespace ContractWithoutAmendments {
|
|
|
954
1982
|
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
955
1983
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
956
1984
|
*/
|
|
957
|
-
specifiers?: Array<
|
|
1985
|
+
specifiers?: Array<Shared.CommitSpecifier>;
|
|
958
1986
|
|
|
959
1987
|
/**
|
|
960
1988
|
* Attach a subscription to the recurring commit/credit.
|
|
961
1989
|
*/
|
|
962
|
-
subscription_config?:
|
|
1990
|
+
subscription_config?: Shared.RecurringCommitSubscriptionConfig;
|
|
963
1991
|
}
|
|
964
1992
|
|
|
965
1993
|
export namespace RecurringCredit {
|
|
@@ -992,69 +2020,6 @@ export namespace ContractWithoutAmendments {
|
|
|
992
2020
|
export interface Contract {
|
|
993
2021
|
id: string;
|
|
994
2022
|
}
|
|
995
|
-
|
|
996
|
-
/**
|
|
997
|
-
* Optional configuration for recurring commit/credit hierarchy access control
|
|
998
|
-
*/
|
|
999
|
-
export interface HierarchyConfiguration {
|
|
1000
|
-
child_access:
|
|
1001
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessAll
|
|
1002
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessNone
|
|
1003
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
export namespace HierarchyConfiguration {
|
|
1007
|
-
export interface CommitHierarchyChildAccessAll {
|
|
1008
|
-
type: 'ALL';
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
export interface CommitHierarchyChildAccessNone {
|
|
1012
|
-
type: 'NONE';
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
export interface CommitHierarchyChildAccessContractIDs {
|
|
1016
|
-
contract_ids: Array<string>;
|
|
1017
|
-
|
|
1018
|
-
type: 'CONTRACT_IDS';
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
export interface Specifier {
|
|
1023
|
-
presentation_group_values?: { [key: string]: string };
|
|
1024
|
-
|
|
1025
|
-
pricing_group_values?: { [key: string]: string };
|
|
1026
|
-
|
|
1027
|
-
/**
|
|
1028
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1029
|
-
*/
|
|
1030
|
-
product_id?: string;
|
|
1031
|
-
|
|
1032
|
-
/**
|
|
1033
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
1034
|
-
* tags.
|
|
1035
|
-
*/
|
|
1036
|
-
product_tags?: Array<string>;
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
/**
|
|
1040
|
-
* Attach a subscription to the recurring commit/credit.
|
|
1041
|
-
*/
|
|
1042
|
-
export interface SubscriptionConfig {
|
|
1043
|
-
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
1044
|
-
|
|
1045
|
-
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
1046
|
-
|
|
1047
|
-
subscription_id: string;
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
export namespace SubscriptionConfig {
|
|
1051
|
-
export interface ApplySeatIncreaseConfig {
|
|
1052
|
-
/**
|
|
1053
|
-
* Indicates whether a mid-period seat increase should be prorated.
|
|
1054
|
-
*/
|
|
1055
|
-
is_prorated: boolean;
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
1058
2023
|
}
|
|
1059
2024
|
|
|
1060
2025
|
export interface ResellerRoyalty {
|
|
@@ -1085,105 +2050,6 @@ export namespace ContractWithoutAmendments {
|
|
|
1085
2050
|
reseller_contract_value?: number;
|
|
1086
2051
|
}
|
|
1087
2052
|
|
|
1088
|
-
export interface SpendThresholdConfiguration {
|
|
1089
|
-
commit: SpendThresholdConfiguration.Commit;
|
|
1090
|
-
|
|
1091
|
-
/**
|
|
1092
|
-
* When set to false, the contract will not be evaluated against the
|
|
1093
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1094
|
-
* regardless of prior state.
|
|
1095
|
-
*/
|
|
1096
|
-
is_enabled: boolean;
|
|
1097
|
-
|
|
1098
|
-
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
1099
|
-
|
|
1100
|
-
/**
|
|
1101
|
-
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
1102
|
-
* hits this amount, a threshold charge will be initiated.
|
|
1103
|
-
*/
|
|
1104
|
-
threshold_amount: number;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
export namespace SpendThresholdConfiguration {
|
|
1108
|
-
export interface Commit {
|
|
1109
|
-
/**
|
|
1110
|
-
* The commit product that will be used to generate the line item for commit
|
|
1111
|
-
* payment.
|
|
1112
|
-
*/
|
|
1113
|
-
product_id: string;
|
|
1114
|
-
|
|
1115
|
-
description?: string;
|
|
1116
|
-
|
|
1117
|
-
/**
|
|
1118
|
-
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
1119
|
-
* will default to the commit product name.
|
|
1120
|
-
*/
|
|
1121
|
-
name?: string;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
export interface PaymentGateConfig {
|
|
1125
|
-
/**
|
|
1126
|
-
* Gate access to the commit balance based on successful collection of payment.
|
|
1127
|
-
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1128
|
-
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
1129
|
-
* wish to payment gate the commit balance.
|
|
1130
|
-
*/
|
|
1131
|
-
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
1132
|
-
|
|
1133
|
-
/**
|
|
1134
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
1135
|
-
*/
|
|
1136
|
-
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
1137
|
-
|
|
1138
|
-
/**
|
|
1139
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
1140
|
-
*/
|
|
1141
|
-
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
1142
|
-
|
|
1143
|
-
/**
|
|
1144
|
-
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1145
|
-
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1146
|
-
* will default to NONE.
|
|
1147
|
-
*/
|
|
1148
|
-
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
export namespace PaymentGateConfig {
|
|
1152
|
-
/**
|
|
1153
|
-
* Only applicable if using PRECALCULATED as your tax type.
|
|
1154
|
-
*/
|
|
1155
|
-
export interface PrecalculatedTaxConfig {
|
|
1156
|
-
/**
|
|
1157
|
-
* Amount of tax to be applied. This should be in the same currency and
|
|
1158
|
-
* denomination as the commit's invoice schedule
|
|
1159
|
-
*/
|
|
1160
|
-
tax_amount: number;
|
|
1161
|
-
|
|
1162
|
-
/**
|
|
1163
|
-
* Name of the tax to be applied. This may be used in an invoice line item
|
|
1164
|
-
* description.
|
|
1165
|
-
*/
|
|
1166
|
-
tax_name?: string;
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
/**
|
|
1170
|
-
* Only applicable if using STRIPE as your payment gate type.
|
|
1171
|
-
*/
|
|
1172
|
-
export interface StripeConfig {
|
|
1173
|
-
/**
|
|
1174
|
-
* If left blank, will default to INVOICE
|
|
1175
|
-
*/
|
|
1176
|
-
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1177
|
-
|
|
1178
|
-
/**
|
|
1179
|
-
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
1180
|
-
* your payment type.
|
|
1181
|
-
*/
|
|
1182
|
-
invoice_metadata?: { [key: string]: string };
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
2053
|
export interface UsageFilter {
|
|
1188
2054
|
current: Shared.BaseUsageFilter | null;
|
|
1189
2055
|
|
|
@@ -1235,6 +2101,9 @@ export interface Credit {
|
|
|
1235
2101
|
|
|
1236
2102
|
contract?: Credit.Contract;
|
|
1237
2103
|
|
|
2104
|
+
/**
|
|
2105
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2106
|
+
*/
|
|
1238
2107
|
custom_fields?: { [key: string]: string };
|
|
1239
2108
|
|
|
1240
2109
|
description?: string;
|
|
@@ -1242,7 +2111,7 @@ export interface Credit {
|
|
|
1242
2111
|
/**
|
|
1243
2112
|
* Optional configuration for credit hierarchy access control
|
|
1244
2113
|
*/
|
|
1245
|
-
hierarchy_configuration?:
|
|
2114
|
+
hierarchy_configuration?: CommitHierarchyConfiguration;
|
|
1246
2115
|
|
|
1247
2116
|
/**
|
|
1248
2117
|
* A list of ordered events that impact the balance of a credit. For example, an
|
|
@@ -1283,7 +2152,7 @@ export interface Credit {
|
|
|
1283
2152
|
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1284
2153
|
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1285
2154
|
*/
|
|
1286
|
-
specifiers?: Array<
|
|
2155
|
+
specifiers?: Array<CommitSpecifier>;
|
|
1287
2156
|
|
|
1288
2157
|
/**
|
|
1289
2158
|
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
@@ -1305,32 +2174,6 @@ export namespace Credit {
|
|
|
1305
2174
|
id: string;
|
|
1306
2175
|
}
|
|
1307
2176
|
|
|
1308
|
-
/**
|
|
1309
|
-
* Optional configuration for credit hierarchy access control
|
|
1310
|
-
*/
|
|
1311
|
-
export interface HierarchyConfiguration {
|
|
1312
|
-
child_access:
|
|
1313
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessAll
|
|
1314
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessNone
|
|
1315
|
-
| HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
export namespace HierarchyConfiguration {
|
|
1319
|
-
export interface CommitHierarchyChildAccessAll {
|
|
1320
|
-
type: 'ALL';
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
export interface CommitHierarchyChildAccessNone {
|
|
1324
|
-
type: 'NONE';
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
export interface CommitHierarchyChildAccessContractIDs {
|
|
1328
|
-
contract_ids: Array<string>;
|
|
1329
|
-
|
|
1330
|
-
type: 'CONTRACT_IDS';
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
2177
|
export interface CreditSegmentStartLedgerEntry {
|
|
1335
2178
|
amount: number;
|
|
1336
2179
|
|
|
@@ -1412,23 +2255,6 @@ export namespace Credit {
|
|
|
1412
2255
|
|
|
1413
2256
|
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
1414
2257
|
}
|
|
1415
|
-
|
|
1416
|
-
export interface Specifier {
|
|
1417
|
-
presentation_group_values?: { [key: string]: string };
|
|
1418
|
-
|
|
1419
|
-
pricing_group_values?: { [key: string]: string };
|
|
1420
|
-
|
|
1421
|
-
/**
|
|
1422
|
-
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1423
|
-
*/
|
|
1424
|
-
product_id?: string;
|
|
1425
|
-
|
|
1426
|
-
/**
|
|
1427
|
-
* If provided, the specifier will only apply to products with all the specified
|
|
1428
|
-
* tags.
|
|
1429
|
-
*/
|
|
1430
|
-
product_tags?: Array<string>;
|
|
1431
|
-
}
|
|
1432
2258
|
}
|
|
1433
2259
|
|
|
1434
2260
|
export interface CreditTypeData {
|
|
@@ -1444,6 +2270,9 @@ export interface Discount {
|
|
|
1444
2270
|
|
|
1445
2271
|
schedule: SchedulePointInTime;
|
|
1446
2272
|
|
|
2273
|
+
/**
|
|
2274
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2275
|
+
*/
|
|
1447
2276
|
custom_fields?: { [key: string]: string };
|
|
1448
2277
|
|
|
1449
2278
|
name?: string;
|
|
@@ -1473,12 +2302,55 @@ export interface EventTypeFilter {
|
|
|
1473
2302
|
*/
|
|
1474
2303
|
in_values?: Array<string>;
|
|
1475
2304
|
|
|
1476
|
-
/**
|
|
1477
|
-
* A list of event types that are explicitly excluded from the billable metric. If
|
|
1478
|
-
* specified, events of these types will not match the billable metric. Must be
|
|
1479
|
-
* non-empty if present.
|
|
1480
|
-
*/
|
|
1481
|
-
not_in_values?: Array<string>;
|
|
2305
|
+
/**
|
|
2306
|
+
* A list of event types that are explicitly excluded from the billable metric. If
|
|
2307
|
+
* specified, events of these types will not match the billable metric. Must be
|
|
2308
|
+
* non-empty if present.
|
|
2309
|
+
*/
|
|
2310
|
+
not_in_values?: Array<string>;
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
/**
|
|
2314
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
2315
|
+
* configuration with a single parent.
|
|
2316
|
+
*/
|
|
2317
|
+
export type HierarchyConfiguration =
|
|
2318
|
+
| HierarchyConfiguration.ParentHierarchyConfiguration
|
|
2319
|
+
| HierarchyConfiguration.ChildHierarchyConfiguration;
|
|
2320
|
+
|
|
2321
|
+
export namespace HierarchyConfiguration {
|
|
2322
|
+
export interface ParentHierarchyConfiguration {
|
|
2323
|
+
/**
|
|
2324
|
+
* List of contracts that belong to this parent.
|
|
2325
|
+
*/
|
|
2326
|
+
children: Array<ParentHierarchyConfiguration.Child>;
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
export namespace ParentHierarchyConfiguration {
|
|
2330
|
+
export interface Child {
|
|
2331
|
+
contract_id: string;
|
|
2332
|
+
|
|
2333
|
+
customer_id: string;
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
export interface ChildHierarchyConfiguration {
|
|
2338
|
+
/**
|
|
2339
|
+
* The single parent contract/customer for this child.
|
|
2340
|
+
*/
|
|
2341
|
+
parent: ChildHierarchyConfiguration.Parent;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
export namespace ChildHierarchyConfiguration {
|
|
2345
|
+
/**
|
|
2346
|
+
* The single parent contract/customer for this child.
|
|
2347
|
+
*/
|
|
2348
|
+
export interface Parent {
|
|
2349
|
+
contract_id: string;
|
|
2350
|
+
|
|
2351
|
+
customer_id: string;
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
1482
2354
|
}
|
|
1483
2355
|
|
|
1484
2356
|
export interface ID {
|
|
@@ -1510,9 +2382,9 @@ export interface Override {
|
|
|
1510
2382
|
|
|
1511
2383
|
override_specifiers?: Array<Override.OverrideSpecifier>;
|
|
1512
2384
|
|
|
1513
|
-
override_tiers?: Array<
|
|
2385
|
+
override_tiers?: Array<OverrideTier>;
|
|
1514
2386
|
|
|
1515
|
-
overwrite_rate?:
|
|
2387
|
+
overwrite_rate?: OverwriteRate;
|
|
1516
2388
|
|
|
1517
2389
|
/**
|
|
1518
2390
|
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
@@ -1566,50 +2438,288 @@ export namespace Override {
|
|
|
1566
2438
|
recurring_credit_ids?: Array<string>;
|
|
1567
2439
|
}
|
|
1568
2440
|
|
|
1569
|
-
export interface
|
|
1570
|
-
|
|
2441
|
+
export interface Product {
|
|
2442
|
+
id: string;
|
|
1571
2443
|
|
|
1572
|
-
|
|
2444
|
+
name: string;
|
|
1573
2445
|
}
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2448
|
+
export interface OverrideTier {
|
|
2449
|
+
multiplier: number;
|
|
2450
|
+
|
|
2451
|
+
size?: number;
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2454
|
+
export interface OverwriteRate {
|
|
2455
|
+
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
2456
|
+
|
|
2457
|
+
credit_type?: CreditTypeData;
|
|
2458
|
+
|
|
2459
|
+
/**
|
|
2460
|
+
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
2461
|
+
* processors.
|
|
2462
|
+
*/
|
|
2463
|
+
custom_rate?: { [key: string]: unknown };
|
|
2464
|
+
|
|
2465
|
+
/**
|
|
2466
|
+
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
2467
|
+
* set to true.
|
|
2468
|
+
*/
|
|
2469
|
+
is_prorated?: boolean;
|
|
2470
|
+
|
|
2471
|
+
/**
|
|
2472
|
+
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
2473
|
+
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
2474
|
+
*/
|
|
2475
|
+
price?: number;
|
|
2476
|
+
|
|
2477
|
+
/**
|
|
2478
|
+
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
2479
|
+
*/
|
|
2480
|
+
quantity?: number;
|
|
2481
|
+
|
|
2482
|
+
/**
|
|
2483
|
+
* Only set for TIERED rate_type.
|
|
2484
|
+
*/
|
|
2485
|
+
tiers?: Array<Tier>;
|
|
2486
|
+
}
|
|
2487
|
+
|
|
2488
|
+
export interface PaymentGateConfig {
|
|
2489
|
+
/**
|
|
2490
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
2491
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
2492
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
2493
|
+
* wish to payment gate the commit balance.
|
|
2494
|
+
*/
|
|
2495
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
2496
|
+
|
|
2497
|
+
/**
|
|
2498
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2499
|
+
*/
|
|
2500
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
2501
|
+
|
|
2502
|
+
/**
|
|
2503
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
2504
|
+
*/
|
|
2505
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
2506
|
+
|
|
2507
|
+
/**
|
|
2508
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
2509
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
2510
|
+
* will default to NONE.
|
|
2511
|
+
*/
|
|
2512
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
export namespace PaymentGateConfig {
|
|
2516
|
+
/**
|
|
2517
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2518
|
+
*/
|
|
2519
|
+
export interface PrecalculatedTaxConfig {
|
|
2520
|
+
/**
|
|
2521
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
2522
|
+
* denomination as the commit's invoice schedule
|
|
2523
|
+
*/
|
|
2524
|
+
tax_amount: number;
|
|
1574
2525
|
|
|
1575
|
-
|
|
1576
|
-
|
|
2526
|
+
/**
|
|
2527
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
2528
|
+
* description.
|
|
2529
|
+
*/
|
|
2530
|
+
tax_name?: string;
|
|
2531
|
+
}
|
|
1577
2532
|
|
|
1578
|
-
|
|
2533
|
+
/**
|
|
2534
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
2535
|
+
*/
|
|
2536
|
+
export interface StripeConfig {
|
|
2537
|
+
/**
|
|
2538
|
+
* If left blank, will default to INVOICE
|
|
2539
|
+
*/
|
|
2540
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1579
2541
|
|
|
1580
2542
|
/**
|
|
1581
|
-
*
|
|
1582
|
-
*
|
|
2543
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
2544
|
+
* your payment type.
|
|
1583
2545
|
*/
|
|
1584
|
-
|
|
2546
|
+
invoice_metadata?: { [key: string]: string };
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2549
|
+
|
|
2550
|
+
export interface PaymentGateConfigV2 {
|
|
2551
|
+
/**
|
|
2552
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
2553
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
2554
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
2555
|
+
* wish to payment gate the commit balance.
|
|
2556
|
+
*/
|
|
2557
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
2558
|
+
|
|
2559
|
+
/**
|
|
2560
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2561
|
+
*/
|
|
2562
|
+
precalculated_tax_config?: PaymentGateConfigV2.PrecalculatedTaxConfig;
|
|
2563
|
+
|
|
2564
|
+
/**
|
|
2565
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2566
|
+
*/
|
|
2567
|
+
stripe_config?: PaymentGateConfigV2.StripeConfig;
|
|
1585
2568
|
|
|
2569
|
+
/**
|
|
2570
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
2571
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
2572
|
+
* will default to NONE.
|
|
2573
|
+
*/
|
|
2574
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
export namespace PaymentGateConfigV2 {
|
|
2578
|
+
/**
|
|
2579
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2580
|
+
*/
|
|
2581
|
+
export interface PrecalculatedTaxConfig {
|
|
1586
2582
|
/**
|
|
1587
|
-
*
|
|
1588
|
-
*
|
|
2583
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
2584
|
+
* denomination as the commit's invoice schedule
|
|
1589
2585
|
*/
|
|
1590
|
-
|
|
2586
|
+
tax_amount: number;
|
|
1591
2587
|
|
|
1592
2588
|
/**
|
|
1593
|
-
*
|
|
1594
|
-
*
|
|
2589
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
2590
|
+
* description.
|
|
1595
2591
|
*/
|
|
1596
|
-
|
|
2592
|
+
tax_name?: string;
|
|
2593
|
+
}
|
|
1597
2594
|
|
|
2595
|
+
/**
|
|
2596
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2597
|
+
*/
|
|
2598
|
+
export interface StripeConfig {
|
|
1598
2599
|
/**
|
|
1599
|
-
*
|
|
2600
|
+
* If left blank, will default to INVOICE
|
|
1600
2601
|
*/
|
|
1601
|
-
|
|
2602
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1602
2603
|
|
|
1603
2604
|
/**
|
|
1604
|
-
* Only
|
|
2605
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
2606
|
+
* your payment type.
|
|
1605
2607
|
*/
|
|
1606
|
-
|
|
2608
|
+
invoice_metadata?: { [key: string]: string };
|
|
1607
2609
|
}
|
|
2610
|
+
}
|
|
1608
2611
|
|
|
1609
|
-
|
|
1610
|
-
|
|
2612
|
+
export interface PrepaidBalanceThresholdConfiguration {
|
|
2613
|
+
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
1611
2614
|
|
|
1612
|
-
|
|
2615
|
+
/**
|
|
2616
|
+
* When set to false, the contract will not be evaluated against the
|
|
2617
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2618
|
+
* regardless of prior state.
|
|
2619
|
+
*/
|
|
2620
|
+
is_enabled: boolean;
|
|
2621
|
+
|
|
2622
|
+
payment_gate_config: PaymentGateConfig;
|
|
2623
|
+
|
|
2624
|
+
/**
|
|
2625
|
+
* Specify the amount the balance should be recharged to.
|
|
2626
|
+
*/
|
|
2627
|
+
recharge_to_amount: number;
|
|
2628
|
+
|
|
2629
|
+
/**
|
|
2630
|
+
* Specify the threshold amount for the contract. Each time the contract's prepaid
|
|
2631
|
+
* balance lowers to this amount, a threshold charge will be initiated.
|
|
2632
|
+
*/
|
|
2633
|
+
threshold_amount: number;
|
|
2634
|
+
|
|
2635
|
+
/**
|
|
2636
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
2637
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
2638
|
+
*/
|
|
2639
|
+
custom_credit_type_id?: string;
|
|
2640
|
+
}
|
|
2641
|
+
|
|
2642
|
+
export namespace PrepaidBalanceThresholdConfiguration {
|
|
2643
|
+
export interface Commit extends Shared.BaseThresholdCommit {
|
|
2644
|
+
/**
|
|
2645
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
2646
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2647
|
+
* all products.
|
|
2648
|
+
*/
|
|
2649
|
+
applicable_product_ids?: Array<string>;
|
|
2650
|
+
|
|
2651
|
+
/**
|
|
2652
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
2653
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2654
|
+
* all products.
|
|
2655
|
+
*/
|
|
2656
|
+
applicable_product_tags?: Array<string>;
|
|
2657
|
+
|
|
2658
|
+
/**
|
|
2659
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2660
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2661
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2662
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2663
|
+
*/
|
|
2664
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
|
|
2668
|
+
export interface PrepaidBalanceThresholdConfigurationV2 {
|
|
2669
|
+
commit: PrepaidBalanceThresholdConfigurationV2.Commit;
|
|
2670
|
+
|
|
2671
|
+
/**
|
|
2672
|
+
* When set to false, the contract will not be evaluated against the
|
|
2673
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2674
|
+
* regardless of prior state.
|
|
2675
|
+
*/
|
|
2676
|
+
is_enabled: boolean;
|
|
2677
|
+
|
|
2678
|
+
payment_gate_config: PaymentGateConfigV2;
|
|
2679
|
+
|
|
2680
|
+
/**
|
|
2681
|
+
* Specify the amount the balance should be recharged to.
|
|
2682
|
+
*/
|
|
2683
|
+
recharge_to_amount: number;
|
|
2684
|
+
|
|
2685
|
+
/**
|
|
2686
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
2687
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
2688
|
+
*/
|
|
2689
|
+
threshold_amount: number;
|
|
2690
|
+
|
|
2691
|
+
/**
|
|
2692
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
2693
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
2694
|
+
*/
|
|
2695
|
+
custom_credit_type_id?: string;
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
export namespace PrepaidBalanceThresholdConfigurationV2 {
|
|
2699
|
+
export interface Commit extends Shared.UpdateBaseThresholdCommit {
|
|
2700
|
+
/**
|
|
2701
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
2702
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2703
|
+
* all products.
|
|
2704
|
+
*/
|
|
2705
|
+
applicable_product_ids?: Array<string>;
|
|
2706
|
+
|
|
2707
|
+
/**
|
|
2708
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
2709
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2710
|
+
* all products.
|
|
2711
|
+
*/
|
|
2712
|
+
applicable_product_tags?: Array<string>;
|
|
2713
|
+
|
|
2714
|
+
/**
|
|
2715
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2716
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2717
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2718
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2719
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
2720
|
+
* body of `specifiers`.
|
|
2721
|
+
*/
|
|
2722
|
+
specifiers?: Array<Shared.CommitSpecifierInput>;
|
|
1613
2723
|
}
|
|
1614
2724
|
}
|
|
1615
2725
|
|
|
@@ -1666,6 +2776,9 @@ export interface ProService {
|
|
|
1666
2776
|
*/
|
|
1667
2777
|
unit_price: number;
|
|
1668
2778
|
|
|
2779
|
+
/**
|
|
2780
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2781
|
+
*/
|
|
1669
2782
|
custom_fields?: { [key: string]: string };
|
|
1670
2783
|
|
|
1671
2784
|
description?: string;
|
|
@@ -1723,6 +2836,23 @@ export interface Rate {
|
|
|
1723
2836
|
use_list_prices?: boolean;
|
|
1724
2837
|
}
|
|
1725
2838
|
|
|
2839
|
+
export interface RecurringCommitSubscriptionConfig {
|
|
2840
|
+
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
2841
|
+
|
|
2842
|
+
apply_seat_increase_config: RecurringCommitSubscriptionConfig.ApplySeatIncreaseConfig;
|
|
2843
|
+
|
|
2844
|
+
subscription_id: string;
|
|
2845
|
+
}
|
|
2846
|
+
|
|
2847
|
+
export namespace RecurringCommitSubscriptionConfig {
|
|
2848
|
+
export interface ApplySeatIncreaseConfig {
|
|
2849
|
+
/**
|
|
2850
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
2851
|
+
*/
|
|
2852
|
+
is_prorated: boolean;
|
|
2853
|
+
}
|
|
2854
|
+
}
|
|
2855
|
+
|
|
1726
2856
|
export interface ScheduledCharge {
|
|
1727
2857
|
id: string;
|
|
1728
2858
|
|
|
@@ -1732,6 +2862,9 @@ export interface ScheduledCharge {
|
|
|
1732
2862
|
|
|
1733
2863
|
archived_at?: string;
|
|
1734
2864
|
|
|
2865
|
+
/**
|
|
2866
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2867
|
+
*/
|
|
1735
2868
|
custom_fields?: { [key: string]: string };
|
|
1736
2869
|
|
|
1737
2870
|
/**
|
|
@@ -1774,6 +2907,12 @@ export namespace ScheduleDuration {
|
|
|
1774
2907
|
export interface SchedulePointInTime {
|
|
1775
2908
|
credit_type?: CreditTypeData;
|
|
1776
2909
|
|
|
2910
|
+
/**
|
|
2911
|
+
* This field is only applicable to commit invoice schedules. If true, this
|
|
2912
|
+
* schedule will not generate an invoice.
|
|
2913
|
+
*/
|
|
2914
|
+
do_not_invoice?: boolean;
|
|
2915
|
+
|
|
1777
2916
|
schedule_items?: Array<SchedulePointInTime.ScheduleItem>;
|
|
1778
2917
|
}
|
|
1779
2918
|
|
|
@@ -1793,8 +2932,135 @@ export namespace SchedulePointInTime {
|
|
|
1793
2932
|
}
|
|
1794
2933
|
}
|
|
1795
2934
|
|
|
2935
|
+
export interface SpendThresholdConfiguration {
|
|
2936
|
+
commit: BaseThresholdCommit;
|
|
2937
|
+
|
|
2938
|
+
/**
|
|
2939
|
+
* When set to false, the contract will not be evaluated against the
|
|
2940
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2941
|
+
* regardless of prior state.
|
|
2942
|
+
*/
|
|
2943
|
+
is_enabled: boolean;
|
|
2944
|
+
|
|
2945
|
+
payment_gate_config: PaymentGateConfig;
|
|
2946
|
+
|
|
2947
|
+
/**
|
|
2948
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
2949
|
+
* hits this amount, a threshold charge will be initiated.
|
|
2950
|
+
*/
|
|
2951
|
+
threshold_amount: number;
|
|
2952
|
+
}
|
|
2953
|
+
|
|
2954
|
+
export interface SpendThresholdConfigurationV2 {
|
|
2955
|
+
commit: UpdateBaseThresholdCommit;
|
|
2956
|
+
|
|
2957
|
+
/**
|
|
2958
|
+
* When set to false, the contract will not be evaluated against the
|
|
2959
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2960
|
+
* regardless of prior state.
|
|
2961
|
+
*/
|
|
2962
|
+
is_enabled: boolean;
|
|
2963
|
+
|
|
2964
|
+
payment_gate_config: PaymentGateConfigV2;
|
|
2965
|
+
|
|
2966
|
+
/**
|
|
2967
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
2968
|
+
* hits this amount, a threshold charge will be initiated.
|
|
2969
|
+
*/
|
|
2970
|
+
threshold_amount: number;
|
|
2971
|
+
}
|
|
2972
|
+
|
|
2973
|
+
export interface Subscription {
|
|
2974
|
+
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
2975
|
+
|
|
2976
|
+
proration: Subscription.Proration;
|
|
2977
|
+
|
|
2978
|
+
/**
|
|
2979
|
+
* Determines how the subscription's quantity is controlled. Defaults to
|
|
2980
|
+
* QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
|
|
2981
|
+
* directly on the subscription. `initial_quantity` must be provided with this
|
|
2982
|
+
* option. Compatible with recurring commits/credits that use POOLED allocation.
|
|
2983
|
+
*/
|
|
2984
|
+
quantity_management_mode: 'SEAT_BASED' | 'QUANTITY_ONLY';
|
|
2985
|
+
|
|
2986
|
+
/**
|
|
2987
|
+
* List of quantity schedule items for the subscription. Only includes the current
|
|
2988
|
+
* quantity and future quantity changes.
|
|
2989
|
+
*/
|
|
2990
|
+
quantity_schedule: Array<Subscription.QuantitySchedule>;
|
|
2991
|
+
|
|
2992
|
+
starting_at: string;
|
|
2993
|
+
|
|
2994
|
+
subscription_rate: Subscription.SubscriptionRate;
|
|
2995
|
+
|
|
2996
|
+
id?: string;
|
|
2997
|
+
|
|
2998
|
+
/**
|
|
2999
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
3000
|
+
*/
|
|
3001
|
+
custom_fields?: { [key: string]: string };
|
|
3002
|
+
|
|
3003
|
+
description?: string;
|
|
3004
|
+
|
|
3005
|
+
ending_before?: string;
|
|
3006
|
+
|
|
3007
|
+
fiat_credit_type_id?: string;
|
|
3008
|
+
|
|
3009
|
+
name?: string;
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
export namespace Subscription {
|
|
3013
|
+
export interface Proration {
|
|
3014
|
+
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
3015
|
+
|
|
3016
|
+
is_prorated: boolean;
|
|
3017
|
+
}
|
|
3018
|
+
|
|
3019
|
+
export interface QuantitySchedule {
|
|
3020
|
+
quantity: number;
|
|
3021
|
+
|
|
3022
|
+
starting_at: string;
|
|
3023
|
+
|
|
3024
|
+
ending_before?: string;
|
|
3025
|
+
}
|
|
3026
|
+
|
|
3027
|
+
export interface SubscriptionRate {
|
|
3028
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
3029
|
+
|
|
3030
|
+
product: SubscriptionRate.Product;
|
|
3031
|
+
}
|
|
3032
|
+
|
|
3033
|
+
export namespace SubscriptionRate {
|
|
3034
|
+
export interface Product {
|
|
3035
|
+
id: string;
|
|
3036
|
+
|
|
3037
|
+
name: string;
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
3040
|
+
}
|
|
3041
|
+
|
|
1796
3042
|
export interface Tier {
|
|
1797
3043
|
price: number;
|
|
1798
3044
|
|
|
1799
3045
|
size?: number;
|
|
1800
3046
|
}
|
|
3047
|
+
|
|
3048
|
+
export interface UpdateBaseThresholdCommit {
|
|
3049
|
+
description?: string;
|
|
3050
|
+
|
|
3051
|
+
/**
|
|
3052
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
3053
|
+
* will default to the commit product name.
|
|
3054
|
+
*/
|
|
3055
|
+
name?: string;
|
|
3056
|
+
|
|
3057
|
+
/**
|
|
3058
|
+
* The commit product that will be used to generate the line item for commit
|
|
3059
|
+
* payment.
|
|
3060
|
+
*/
|
|
3061
|
+
product_id?: string;
|
|
3062
|
+
}
|
|
3063
|
+
|
|
3064
|
+
export type CommitsBodyCursorPage = BodyCursorPage<Commit>;
|
|
3065
|
+
|
|
3066
|
+
export type CreditsBodyCursorPage = BodyCursorPage<Credit>;
|