@metronome/sdk 0.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +113 -28
- package/README.md +123 -51
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/bin/cli +46 -0
- package/bin/migration-config.json +6 -0
- package/client.d.mts +232 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +232 -0
- package/client.d.ts.map +1 -0
- package/client.js +464 -0
- package/client.js.map +1 -0
- package/client.mjs +460 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +137 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +137 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +158 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +150 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +3 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +7 -144
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -143
- package/index.d.ts.map +1 -1
- package/index.js +14 -120
- package/index.js.map +1 -1
- package/index.mjs +6 -93
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +26 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +26 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +120 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +112 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +1 -0
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/formats.js +4 -2
- package/internal/qs/formats.js.map +1 -1
- package/internal/qs/formats.mjs +2 -1
- package/internal/qs/formats.mjs.map +1 -1
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.js +16 -19
- package/internal/qs/stringify.js.map +1 -1
- package/internal/qs/stringify.mjs +17 -19
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +1 -0
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.js +22 -21
- package/internal/qs/utils.js.map +1 -1
- package/internal/qs/utils.mjs +12 -12
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +113 -64
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +1 -36
- package/pagination.d.ts.map +1 -1
- package/pagination.js +3 -40
- package/pagination.js.map +1 -1
- package/pagination.mjs +1 -38
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/index.d.mts +5 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -15
- package/resources/index.js.map +1 -1
- package/resources/shared.d.mts +2363 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +1470 -465
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.mts +207 -0
- package/resources/v1/alerts.d.mts.map +1 -0
- package/resources/v1/alerts.d.ts +107 -32
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/alerts.js +74 -3
- package/resources/v1/alerts.js.map +1 -1
- package/resources/v1/alerts.mjs +74 -3
- package/resources/v1/alerts.mjs.map +1 -1
- package/resources/v1/audit-logs.d.mts +108 -0
- package/resources/v1/audit-logs.d.mts.map +1 -0
- package/resources/v1/audit-logs.d.ts +45 -12
- package/resources/v1/audit-logs.d.ts.map +1 -1
- package/resources/v1/audit-logs.js +53 -12
- package/resources/v1/audit-logs.js.map +1 -1
- package/resources/v1/audit-logs.mjs +52 -10
- package/resources/v1/audit-logs.mjs.map +1 -1
- package/resources/v1/billable-metrics.d.mts +293 -0
- package/resources/v1/billable-metrics.d.mts.map +1 -0
- package/resources/v1/billable-metrics.d.ts +70 -15
- package/resources/v1/billable-metrics.d.ts.map +1 -1
- package/resources/v1/billable-metrics.js +70 -16
- package/resources/v1/billable-metrics.js.map +1 -1
- package/resources/v1/billable-metrics.mjs +69 -14
- package/resources/v1/billable-metrics.mjs.map +1 -1
- package/resources/v1/contracts/contracts.d.mts +3006 -0
- package/resources/v1/contracts/contracts.d.mts.map +1 -0
- package/resources/v1/contracts/contracts.d.ts +428 -1299
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js +269 -50
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs +267 -26
- package/resources/v1/contracts/contracts.mjs.map +1 -1
- package/resources/v1/contracts/index.d.mts +5 -0
- package/resources/v1/contracts/index.d.mts.map +1 -0
- package/resources/v1/contracts/index.d.ts +3 -3
- package/resources/v1/contracts/index.d.ts.map +1 -1
- package/resources/v1/contracts/index.js +1 -3
- package/resources/v1/contracts/index.js.map +1 -1
- package/resources/v1/contracts/index.mjs +2 -2
- package/resources/v1/contracts/index.mjs.map +1 -1
- package/resources/v1/contracts/named-schedules.d.mts +82 -0
- package/resources/v1/contracts/named-schedules.d.mts.map +1 -0
- package/resources/v1/contracts/named-schedules.d.ts +5 -4
- package/resources/v1/contracts/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/named-schedules.js +3 -2
- package/resources/v1/contracts/named-schedules.js.map +1 -1
- package/resources/v1/contracts/named-schedules.mjs +3 -2
- package/resources/v1/contracts/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/products.d.mts +502 -0
- package/resources/v1/contracts/products.d.mts.map +1 -0
- package/resources/v1/contracts/products.d.ts +44 -17
- package/resources/v1/contracts/products.d.ts.map +1 -1
- package/resources/v1/contracts/products.js +41 -17
- package/resources/v1/contracts/products.js.map +1 -1
- package/resources/v1/contracts/products.mjs +40 -15
- package/resources/v1/contracts/products.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/index.d.mts +5 -0
- package/resources/v1/contracts/rate-cards/index.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/index.d.ts +2 -2
- package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/index.js +1 -3
- package/resources/v1/contracts/rate-cards/index.js.map +1 -1
- package/resources/v1/contracts/rate-cards/index.mjs +2 -2
- package/resources/v1/contracts/rate-cards/index.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.d.mts +94 -0
- package/resources/v1/contracts/rate-cards/named-schedules.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts +5 -4
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.js +3 -2
- package/resources/v1/contracts/rate-cards/named-schedules.js.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.mjs +3 -2
- package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.d.mts +85 -0
- package/resources/v1/contracts/rate-cards/product-orders.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/product-orders.d.ts +12 -6
- package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.js +8 -3
- package/resources/v1/contracts/rate-cards/product-orders.js.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.mjs +8 -3
- package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.mts +452 -0
- package/resources/v1/contracts/rate-cards/rate-cards.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts +134 -41
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.js +127 -47
- package/resources/v1/contracts/rate-cards/rate-cards.js.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.mjs +123 -20
- package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.mts +382 -0
- package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards/rates.d.ts +25 -82
- package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.js +13 -9
- package/resources/v1/contracts/rate-cards/rates.js.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.mjs +12 -7
- package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards.d.mts +2 -0
- package/resources/v1/contracts/rate-cards.d.mts.map +1 -0
- package/resources/v1/contracts/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards.js +2 -15
- package/resources/v1/contracts/rate-cards.js.map +1 -1
- package/resources/v1/contracts.d.mts +2 -0
- package/resources/v1/contracts.d.mts.map +1 -0
- package/resources/v1/contracts.d.ts.map +1 -1
- package/resources/v1/contracts.js +2 -15
- package/resources/v1/contracts.js.map +1 -1
- package/resources/v1/credit-grants.d.mts +505 -0
- package/resources/v1/credit-grants.d.mts.map +1 -0
- package/resources/v1/credit-grants.d.ts +73 -74
- package/resources/v1/credit-grants.d.ts.map +1 -1
- package/resources/v1/credit-grants.js +52 -18
- package/resources/v1/credit-grants.js.map +1 -1
- package/resources/v1/credit-grants.mjs +51 -16
- package/resources/v1/credit-grants.mjs.map +1 -1
- package/resources/v1/custom-fields.d.mts +151 -0
- package/resources/v1/custom-fields.d.mts.map +1 -0
- package/resources/v1/custom-fields.d.ts +69 -38
- package/resources/v1/custom-fields.d.ts.map +1 -1
- package/resources/v1/custom-fields.js +66 -22
- package/resources/v1/custom-fields.js.map +1 -1
- package/resources/v1/custom-fields.mjs +66 -22
- package/resources/v1/custom-fields.mjs.map +1 -1
- package/resources/v1/customers/alerts.d.mts +309 -0
- package/resources/v1/customers/alerts.d.mts.map +1 -0
- package/resources/v1/customers/alerts.d.ts +176 -50
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/alerts.js +131 -10
- package/resources/v1/customers/alerts.js.map +1 -1
- package/resources/v1/customers/alerts.mjs +131 -10
- package/resources/v1/customers/alerts.mjs.map +1 -1
- package/resources/v1/customers/billing-config.d.mts +125 -0
- package/resources/v1/customers/billing-config.d.mts.map +1 -0
- package/resources/v1/customers/billing-config.d.ts +8 -7
- package/resources/v1/customers/billing-config.d.ts.map +1 -1
- package/resources/v1/customers/billing-config.js +8 -6
- package/resources/v1/customers/billing-config.js.map +1 -1
- package/resources/v1/customers/billing-config.mjs +8 -6
- package/resources/v1/customers/billing-config.mjs.map +1 -1
- package/resources/v1/customers/commits.d.mts +456 -0
- package/resources/v1/customers/commits.d.mts.map +1 -0
- package/resources/v1/customers/commits.d.ts +139 -47
- package/resources/v1/customers/commits.d.ts.map +1 -1
- package/resources/v1/customers/commits.js +131 -12
- package/resources/v1/customers/commits.js.map +1 -1
- package/resources/v1/customers/commits.mjs +131 -12
- package/resources/v1/customers/commits.mjs.map +1 -1
- package/resources/v1/customers/credits.d.mts +310 -0
- package/resources/v1/customers/credits.d.mts.map +1 -0
- package/resources/v1/customers/credits.d.ts +124 -46
- package/resources/v1/customers/credits.d.ts.map +1 -1
- package/resources/v1/customers/credits.js +116 -11
- package/resources/v1/customers/credits.js.map +1 -1
- package/resources/v1/customers/credits.mjs +116 -11
- package/resources/v1/customers/credits.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +819 -0
- package/resources/v1/customers/customers.d.mts.map +1 -0
- package/resources/v1/customers/customers.d.ts +319 -55
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +220 -76
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +213 -44
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +9 -0
- package/resources/v1/customers/index.d.mts.map +1 -0
- package/resources/v1/customers/index.d.ts +6 -6
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js +1 -8
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs +3 -3
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/invoices.d.mts +825 -0
- package/resources/v1/customers/invoices.d.mts.map +1 -0
- package/resources/v1/customers/invoices.d.ts +309 -25
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/customers/invoices.js +180 -22
- package/resources/v1/customers/invoices.js.map +1 -1
- package/resources/v1/customers/invoices.mjs +179 -19
- package/resources/v1/customers/invoices.mjs.map +1 -1
- package/resources/v1/customers/named-schedules.d.mts +82 -0
- package/resources/v1/customers/named-schedules.d.mts.map +1 -0
- package/resources/v1/customers/named-schedules.d.ts +5 -4
- package/resources/v1/customers/named-schedules.d.ts.map +1 -1
- package/resources/v1/customers/named-schedules.js +3 -2
- package/resources/v1/customers/named-schedules.js.map +1 -1
- package/resources/v1/customers/named-schedules.mjs +3 -2
- package/resources/v1/customers/named-schedules.mjs.map +1 -1
- package/resources/v1/customers/plans.d.mts +281 -0
- package/resources/v1/customers/plans.d.mts.map +1 -0
- package/resources/v1/customers/plans.d.ts +14 -12
- package/resources/v1/customers/plans.d.ts.map +1 -1
- package/resources/v1/customers/plans.js +8 -15
- package/resources/v1/customers/plans.js.map +1 -1
- package/resources/v1/customers/plans.mjs +7 -12
- package/resources/v1/customers/plans.mjs.map +1 -1
- package/resources/v1/customers.d.mts +2 -0
- package/resources/v1/customers.d.mts.map +1 -0
- package/resources/v1/customers.d.ts.map +1 -1
- package/resources/v1/customers.js +2 -15
- package/resources/v1/customers.js.map +1 -1
- package/resources/v1/dashboards.d.mts +133 -0
- package/resources/v1/dashboards.d.mts.map +1 -0
- package/resources/v1/dashboards.d.ts +33 -6
- package/resources/v1/dashboards.d.ts.map +1 -1
- package/resources/v1/dashboards.js +30 -4
- package/resources/v1/dashboards.js.map +1 -1
- package/resources/v1/dashboards.mjs +30 -4
- package/resources/v1/dashboards.mjs.map +1 -1
- package/resources/v1/index.d.mts +16 -0
- package/resources/v1/index.d.mts.map +1 -0
- package/resources/v1/index.d.ts +10 -9
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +3 -12
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +8 -7
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/invoices.d.mts +83 -0
- package/resources/v1/invoices.d.mts.map +1 -0
- package/resources/v1/invoices.d.ts +28 -6
- package/resources/v1/invoices.d.ts.map +1 -1
- package/resources/v1/invoices.js +24 -3
- package/resources/v1/invoices.js.map +1 -1
- package/resources/v1/invoices.mjs +24 -3
- package/resources/v1/invoices.mjs.map +1 -1
- package/resources/v1/payments.d.mts +116 -0
- package/resources/v1/payments.d.mts.map +1 -0
- package/resources/v1/payments.d.ts +116 -0
- package/resources/v1/payments.d.ts.map +1 -0
- package/resources/v1/payments.js +71 -0
- package/resources/v1/payments.js.map +1 -0
- package/resources/v1/payments.mjs +67 -0
- package/resources/v1/payments.mjs.map +1 -0
- package/resources/v1/plans.d.mts +240 -0
- package/resources/v1/plans.d.mts.map +1 -0
- package/resources/v1/plans.d.ts +24 -15
- package/resources/v1/plans.d.ts.map +1 -1
- package/resources/v1/plans.js +19 -26
- package/resources/v1/plans.js.map +1 -1
- package/resources/v1/plans.mjs +18 -22
- package/resources/v1/plans.mjs.map +1 -1
- package/resources/v1/pricing-units.d.mts +34 -0
- package/resources/v1/pricing-units.d.mts.map +1 -0
- package/resources/v1/pricing-units.d.ts +12 -9
- package/resources/v1/pricing-units.d.ts.map +1 -1
- package/resources/v1/pricing-units.js +20 -12
- package/resources/v1/pricing-units.js.map +1 -1
- package/resources/v1/pricing-units.mjs +19 -10
- package/resources/v1/pricing-units.mjs.map +1 -1
- package/resources/v1/services.d.mts +33 -0
- package/resources/v1/services.d.mts.map +1 -0
- package/resources/v1/services.d.ts +10 -7
- package/resources/v1/services.d.ts.map +1 -1
- package/resources/v1/services.js +7 -5
- package/resources/v1/services.js.map +1 -1
- package/resources/v1/services.mjs +7 -5
- package/resources/v1/services.mjs.map +1 -1
- package/resources/v1/usage.d.mts +490 -0
- package/resources/v1/usage.d.mts.map +1 -0
- package/resources/v1/usage.d.ts +223 -58
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +214 -26
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +213 -24
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +62 -0
- package/resources/v1/v1.d.mts.map +1 -0
- package/resources/v1/v1.d.ts +19 -15
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +19 -48
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +12 -19
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v1.d.mts +2 -0
- package/resources/v1.d.mts.map +1 -0
- package/resources/v1.d.ts.map +1 -1
- package/resources/v1.js +2 -15
- package/resources/v1.js.map +1 -1
- package/resources/v2/contracts.d.mts +2900 -0
- package/resources/v2/contracts.d.mts.map +1 -0
- package/resources/v2/contracts.d.ts +399 -3830
- package/resources/v2/contracts.d.ts.map +1 -1
- package/resources/v2/contracts.js +102 -12
- package/resources/v2/contracts.js.map +1 -1
- package/resources/v2/contracts.mjs +102 -12
- package/resources/v2/contracts.mjs.map +1 -1
- package/resources/v2/index.d.mts +3 -0
- package/resources/v2/index.d.mts.map +1 -0
- package/resources/v2/index.d.ts.map +1 -1
- package/resources/v2/v2.d.mts +10 -0
- package/resources/v2/v2.d.mts.map +1 -0
- package/resources/v2/v2.d.ts +1 -1
- package/resources/v2/v2.d.ts.map +1 -1
- package/resources/v2/v2.js +3 -25
- package/resources/v2/v2.js.map +1 -1
- package/resources/v2/v2.mjs +1 -1
- package/resources/v2.d.mts +2 -0
- package/resources/v2.d.mts.map +1 -0
- package/resources/v2.d.ts.map +1 -1
- package/resources/v2.js +2 -15
- package/resources/v2.js.map +1 -1
- package/resources/webhooks.d.mts +22 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +1 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +3 -3
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +809 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/pagination.ts +319 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -130
- package/src/index.ts +6 -221
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +144 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/qs/formats.ts +3 -2
- package/src/internal/qs/index.ts +3 -3
- package/src/internal/qs/stringify.ts +18 -21
- package/src/internal/qs/utils.ts +16 -16
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/pagination.ts +2 -82
- package/src/resource.ts +2 -11
- package/src/resources/index.ts +4 -4
- package/src/resources/shared.ts +1921 -506
- package/src/resources/v1/alerts.ts +108 -33
- package/src/resources/v1/audit-logs.ts +48 -26
- package/src/resources/v1/billable-metrics.ts +79 -34
- package/src/resources/v1/contracts/contracts.ts +490 -1632
- package/src/resources/v1/contracts/index.ts +7 -6
- package/src/resources/v1/contracts/named-schedules.ts +8 -6
- package/src/resources/v1/contracts/products.ts +50 -38
- package/src/resources/v1/contracts/rate-cards/index.ts +6 -6
- package/src/resources/v1/contracts/rate-cards/named-schedules.ts +8 -6
- package/src/resources/v1/contracts/rate-cards/product-orders.ts +13 -10
- package/src/resources/v1/contracts/rate-cards/rate-cards.ts +145 -72
- package/src/resources/v1/contracts/rate-cards/rates.ts +28 -98
- package/src/resources/v1/contracts/rate-cards.ts +1 -1
- package/src/resources/v1/contracts.ts +1 -1
- package/src/resources/v1/credit-grants.ts +100 -112
- package/src/resources/v1/custom-fields.ts +106 -74
- package/src/resources/v1/customers/alerts.ts +195 -55
- package/src/resources/v1/customers/billing-config.ts +27 -13
- package/src/resources/v1/customers/commits.ts +146 -54
- package/src/resources/v1/customers/credits.ts +131 -53
- package/src/resources/v1/customers/customers.ts +407 -115
- package/src/resources/v1/customers/index.ts +20 -18
- package/src/resources/v1/customers/invoices.ts +343 -42
- package/src/resources/v1/customers/named-schedules.ts +8 -6
- package/src/resources/v1/customers/plans.ts +24 -22
- package/src/resources/v1/customers.ts +1 -1
- package/src/resources/v1/dashboards.ts +34 -7
- package/src/resources/v1/index.ts +43 -25
- package/src/resources/v1/invoices.ts +28 -9
- package/src/resources/v1/payments.ts +170 -0
- package/src/resources/v1/plans.ts +42 -43
- package/src/resources/v1/pricing-units.ts +15 -23
- package/src/resources/v1/services.ts +10 -7
- package/src/resources/v1/usage.ts +247 -73
- package/src/resources/v1/v1.ts +78 -49
- package/src/resources/v1.ts +1 -1
- package/src/resources/v2/contracts.ts +469 -4930
- package/src/resources/v2/index.ts +2 -2
- package/src/resources/v2/v2.ts +3 -3
- package/src/resources/v2.ts +1 -1
- package/src/resources/webhooks.ts +2 -2
- package/src/resources.ts +1 -1
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -157
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -255
- package/core.d.ts.map +0 -1
- package/core.js +0 -924
- package/core.js.map +0 -1
- package/core.mjs +0 -892
- package/core.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1236
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
|
@@ -1,48 +1,44 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from
|
|
4
|
-
import
|
|
5
|
-
import * as
|
|
6
|
-
import * as Shared from "../../shared.js";
|
|
7
|
-
import * as AlertsAPI from "./alerts.js";
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as Shared from '../../shared';
|
|
5
|
+
import * as AlertsAPI from './alerts';
|
|
8
6
|
import {
|
|
9
7
|
AlertListParams,
|
|
10
|
-
AlertListResponse,
|
|
11
8
|
AlertResetParams,
|
|
12
9
|
AlertRetrieveParams,
|
|
13
10
|
AlertRetrieveResponse,
|
|
14
11
|
Alerts,
|
|
15
12
|
CustomerAlert,
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
CustomerAlertsCursorPageWithoutLimit,
|
|
14
|
+
} from './alerts';
|
|
15
|
+
import * as BillingConfigAPI from './billing-config';
|
|
18
16
|
import {
|
|
19
17
|
BillingConfig as BillingConfigAPIBillingConfig,
|
|
20
18
|
BillingConfigCreateParams,
|
|
21
19
|
BillingConfigDeleteParams,
|
|
22
20
|
BillingConfigRetrieveParams,
|
|
23
21
|
BillingConfigRetrieveResponse,
|
|
24
|
-
} from
|
|
25
|
-
import * as CommitsAPI from
|
|
22
|
+
} from './billing-config';
|
|
23
|
+
import * as CommitsAPI from './commits';
|
|
26
24
|
import {
|
|
27
25
|
CommitCreateParams,
|
|
28
26
|
CommitCreateResponse,
|
|
29
27
|
CommitListParams,
|
|
30
|
-
CommitListResponse,
|
|
31
28
|
CommitUpdateEndDateParams,
|
|
32
29
|
CommitUpdateEndDateResponse,
|
|
33
30
|
Commits,
|
|
34
|
-
} from
|
|
35
|
-
import * as CreditsAPI from
|
|
31
|
+
} from './commits';
|
|
32
|
+
import * as CreditsAPI from './credits';
|
|
36
33
|
import {
|
|
37
34
|
CreditCreateParams,
|
|
38
35
|
CreditCreateResponse,
|
|
39
36
|
CreditListParams,
|
|
40
|
-
CreditListResponse,
|
|
41
37
|
CreditUpdateEndDateParams,
|
|
42
38
|
CreditUpdateEndDateResponse,
|
|
43
39
|
Credits,
|
|
44
|
-
} from
|
|
45
|
-
import * as InvoicesAPI from
|
|
40
|
+
} from './credits';
|
|
41
|
+
import * as InvoicesAPI from './invoices';
|
|
46
42
|
import {
|
|
47
43
|
Invoice,
|
|
48
44
|
InvoiceAddChargeParams,
|
|
@@ -52,18 +48,19 @@ import {
|
|
|
52
48
|
InvoiceListBreakdownsResponsesCursorPage,
|
|
53
49
|
InvoiceListParams,
|
|
54
50
|
InvoiceRetrieveParams,
|
|
51
|
+
InvoiceRetrievePdfParams,
|
|
55
52
|
InvoiceRetrieveResponse,
|
|
56
53
|
Invoices,
|
|
57
54
|
InvoicesCursorPage,
|
|
58
|
-
} from
|
|
59
|
-
import * as NamedSchedulesAPI from
|
|
55
|
+
} from './invoices';
|
|
56
|
+
import * as NamedSchedulesAPI from './named-schedules';
|
|
60
57
|
import {
|
|
61
58
|
NamedScheduleRetrieveParams,
|
|
62
59
|
NamedScheduleRetrieveResponse,
|
|
63
60
|
NamedScheduleUpdateParams,
|
|
64
61
|
NamedSchedules,
|
|
65
|
-
} from
|
|
66
|
-
import * as PlansAPI from
|
|
62
|
+
} from './named-schedules';
|
|
63
|
+
import * as PlansAPI from './plans';
|
|
67
64
|
import {
|
|
68
65
|
PlanAddParams,
|
|
69
66
|
PlanAddResponse,
|
|
@@ -76,8 +73,12 @@ import {
|
|
|
76
73
|
PlanListResponse,
|
|
77
74
|
PlanListResponsesCursorPage,
|
|
78
75
|
Plans,
|
|
79
|
-
} from
|
|
80
|
-
import {
|
|
76
|
+
} from './plans';
|
|
77
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
78
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../../../core/pagination';
|
|
79
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
80
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
81
|
+
import { path } from '../../../internal/utils/path';
|
|
81
82
|
|
|
82
83
|
export class Customers extends APIResource {
|
|
83
84
|
alerts: AlertsAPI.Alerts = new AlertsAPI.Alerts(this._client);
|
|
@@ -89,7 +90,40 @@ export class Customers extends APIResource {
|
|
|
89
90
|
namedSchedules: NamedSchedulesAPI.NamedSchedules = new NamedSchedulesAPI.NamedSchedules(this._client);
|
|
90
91
|
|
|
91
92
|
/**
|
|
92
|
-
* Create a new customer
|
|
93
|
+
* Create a new customer in Metronome and optionally the billing configuration
|
|
94
|
+
* (recommended) which dictates where invoices for the customer will be sent or
|
|
95
|
+
* where payment will be collected.
|
|
96
|
+
*
|
|
97
|
+
* ### Use this endpoint to:
|
|
98
|
+
*
|
|
99
|
+
* Execute your customer provisioning workflows for either PLG motions, where
|
|
100
|
+
* customers originate in your platform, or SLG motions, where customers originate
|
|
101
|
+
* in your sales system.
|
|
102
|
+
*
|
|
103
|
+
* ### Key response fields:
|
|
104
|
+
*
|
|
105
|
+
* This end-point returns the `customer_id` created by the request. This id can be
|
|
106
|
+
* used to fetch relevant billing configurations and create contracts.
|
|
107
|
+
*
|
|
108
|
+
* ### Example workflow:
|
|
109
|
+
*
|
|
110
|
+
* - Generally, Metronome recommends first creating the customer in the downstream
|
|
111
|
+
* payment / ERP system when payment method is collected and then creating the
|
|
112
|
+
* customer in Metronome using the response (i.e. `customer_id`) from the
|
|
113
|
+
* downstream system. If you do not create a billing configuration on customer
|
|
114
|
+
* creation, you can add it later.
|
|
115
|
+
* - Once a customer is created, you can then create a contract for the customer.
|
|
116
|
+
* In the contract creation process, you will need to add the customer billing
|
|
117
|
+
* configuration to the contract to ensure Metronome invoices the customer
|
|
118
|
+
* correctly. This is because a customer can have multiple configurations.
|
|
119
|
+
* - As part of the customer creation process, set the ingest alias for the
|
|
120
|
+
* customer which will ensure usage is accurately mapped to the customer. Ingest
|
|
121
|
+
* aliases can be added or changed after the creation process as well.
|
|
122
|
+
*
|
|
123
|
+
* ### Usage guidelines:
|
|
124
|
+
*
|
|
125
|
+
* For details on different billing configurations for different systems, review
|
|
126
|
+
* the `/setCustomerBillingConfiguration` end-point.
|
|
93
127
|
*
|
|
94
128
|
* @example
|
|
95
129
|
* ```ts
|
|
@@ -109,12 +143,18 @@ export class Customers extends APIResource {
|
|
|
109
143
|
* });
|
|
110
144
|
* ```
|
|
111
145
|
*/
|
|
112
|
-
create(body: CustomerCreateParams, options?:
|
|
146
|
+
create(body: CustomerCreateParams, options?: RequestOptions): APIPromise<CustomerCreateResponse> {
|
|
113
147
|
return this._client.post('/v1/customers', { body, ...options });
|
|
114
148
|
}
|
|
115
149
|
|
|
116
150
|
/**
|
|
117
|
-
* Get a customer by Metronome ID.
|
|
151
|
+
* Get detailed information for a specific customer by their Metronome ID. Returns
|
|
152
|
+
* customer profile data including name, creation date, ingest aliases,
|
|
153
|
+
* configuration settings, and custom fields. Use this endpoint to fetch complete
|
|
154
|
+
* customer details for billing operations or account management.
|
|
155
|
+
*
|
|
156
|
+
* Note: If searching for a customer billing configuration, use the
|
|
157
|
+
* `/getCustomerBillingConfigurations` endpoint.
|
|
118
158
|
*
|
|
119
159
|
* @example
|
|
120
160
|
* ```ts
|
|
@@ -123,16 +163,17 @@ export class Customers extends APIResource {
|
|
|
123
163
|
* });
|
|
124
164
|
* ```
|
|
125
165
|
*/
|
|
126
|
-
retrieve(
|
|
127
|
-
params: CustomerRetrieveParams,
|
|
128
|
-
options?: Core.RequestOptions,
|
|
129
|
-
): Core.APIPromise<CustomerRetrieveResponse> {
|
|
166
|
+
retrieve(params: CustomerRetrieveParams, options?: RequestOptions): APIPromise<CustomerRetrieveResponse> {
|
|
130
167
|
const { customer_id } = params;
|
|
131
|
-
return this._client.get(`/v1/customers/${customer_id}`, options);
|
|
168
|
+
return this._client.get(path`/v1/customers/${customer_id}`, options);
|
|
132
169
|
}
|
|
133
170
|
|
|
134
171
|
/**
|
|
135
|
-
*
|
|
172
|
+
* Gets a paginated list of all customers in your Metronome account. Use this
|
|
173
|
+
* endpoint to browse your customer base, implement customer search functionality,
|
|
174
|
+
* or sync customer data with external systems. Returns customer details including
|
|
175
|
+
* IDs, names, and configuration settings. Supports filtering and pagination
|
|
176
|
+
* parameters for efficient data retrieval.
|
|
136
177
|
*
|
|
137
178
|
* @example
|
|
138
179
|
* ```ts
|
|
@@ -143,23 +184,27 @@ export class Customers extends APIResource {
|
|
|
143
184
|
* ```
|
|
144
185
|
*/
|
|
145
186
|
list(
|
|
146
|
-
query
|
|
147
|
-
options?:
|
|
148
|
-
):
|
|
149
|
-
|
|
150
|
-
list(
|
|
151
|
-
query: CustomerListParams | Core.RequestOptions = {},
|
|
152
|
-
options?: Core.RequestOptions,
|
|
153
|
-
): Core.PagePromise<CustomerDetailsCursorPage, CustomerDetail> {
|
|
154
|
-
if (isRequestOptions(query)) {
|
|
155
|
-
return this.list({}, query);
|
|
156
|
-
}
|
|
157
|
-
return this._client.getAPIList('/v1/customers', CustomerDetailsCursorPage, { query, ...options });
|
|
187
|
+
query: CustomerListParams | null | undefined = {},
|
|
188
|
+
options?: RequestOptions,
|
|
189
|
+
): PagePromise<CustomerDetailsCursorPage, CustomerDetail> {
|
|
190
|
+
return this._client.getAPIList('/v1/customers', CursorPage<CustomerDetail>, { query, ...options });
|
|
158
191
|
}
|
|
159
192
|
|
|
160
193
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
194
|
+
* Use this endpoint to archive a customer while preserving auditability. Archiving
|
|
195
|
+
* a customer will automatically archive all contracts as of the current date and
|
|
196
|
+
* void all corresponding invoices. Use this endpoint if a customer is onboarded by
|
|
197
|
+
* mistake.
|
|
198
|
+
*
|
|
199
|
+
* ### Usage guidelines:
|
|
200
|
+
*
|
|
201
|
+
* - Once a customer is archived, it cannot be unarchived.
|
|
202
|
+
* - Archived customers can still be viewed through the API or the UI for audit
|
|
203
|
+
* purposes.
|
|
204
|
+
* - Ingest aliases remain idempotent for archived customers. In order to reuse an
|
|
205
|
+
* ingest alias, first remove the ingest alias from the customer prior to
|
|
206
|
+
* archiving.
|
|
207
|
+
* - Any notifications associated with the customer will no longer be triggered.
|
|
163
208
|
*
|
|
164
209
|
* @example
|
|
165
210
|
* ```ts
|
|
@@ -168,15 +213,15 @@ export class Customers extends APIResource {
|
|
|
168
213
|
* });
|
|
169
214
|
* ```
|
|
170
215
|
*/
|
|
171
|
-
archive(
|
|
172
|
-
body: CustomerArchiveParams,
|
|
173
|
-
options?: Core.RequestOptions,
|
|
174
|
-
): Core.APIPromise<CustomerArchiveResponse> {
|
|
216
|
+
archive(body: CustomerArchiveParams, options?: RequestOptions): APIPromise<CustomerArchiveResponse> {
|
|
175
217
|
return this._client.post('/v1/customers/archive', { body, ...options });
|
|
176
218
|
}
|
|
177
219
|
|
|
178
220
|
/**
|
|
179
|
-
* Get all billable metrics for a
|
|
221
|
+
* Get all billable metrics available for a specific customer. Supports pagination
|
|
222
|
+
* and filtering by current plan status or archived metrics. Use this endpoint to
|
|
223
|
+
* see which metrics are being tracked for billing calculations for a given
|
|
224
|
+
* customer.
|
|
180
225
|
*
|
|
181
226
|
* @example
|
|
182
227
|
* ```ts
|
|
@@ -190,12 +235,12 @@ export class Customers extends APIResource {
|
|
|
190
235
|
*/
|
|
191
236
|
listBillableMetrics(
|
|
192
237
|
params: CustomerListBillableMetricsParams,
|
|
193
|
-
options?:
|
|
194
|
-
):
|
|
238
|
+
options?: RequestOptions,
|
|
239
|
+
): PagePromise<CustomerListBillableMetricsResponsesCursorPage, CustomerListBillableMetricsResponse> {
|
|
195
240
|
const { customer_id, ...query } = params;
|
|
196
241
|
return this._client.getAPIList(
|
|
197
|
-
`/v1/customers/${customer_id}/billable-metrics`,
|
|
198
|
-
|
|
242
|
+
path`/v1/customers/${customer_id}/billable-metrics`,
|
|
243
|
+
CursorPage<CustomerListBillableMetricsResponse>,
|
|
199
244
|
{ query, ...options },
|
|
200
245
|
);
|
|
201
246
|
}
|
|
@@ -221,21 +266,21 @@ export class Customers extends APIResource {
|
|
|
221
266
|
*/
|
|
222
267
|
listCosts(
|
|
223
268
|
params: CustomerListCostsParams,
|
|
224
|
-
options?:
|
|
225
|
-
):
|
|
269
|
+
options?: RequestOptions,
|
|
270
|
+
): PagePromise<CustomerListCostsResponsesCursorPage, CustomerListCostsResponse> {
|
|
226
271
|
const { customer_id, ...query } = params;
|
|
227
272
|
return this._client.getAPIList(
|
|
228
|
-
`/v1/customers/${customer_id}/costs`,
|
|
229
|
-
|
|
273
|
+
path`/v1/customers/${customer_id}/costs`,
|
|
274
|
+
CursorPage<CustomerListCostsResponse>,
|
|
230
275
|
{ query, ...options },
|
|
231
276
|
);
|
|
232
277
|
}
|
|
233
278
|
|
|
234
279
|
/**
|
|
235
|
-
* Preview how a set of events will affect a customer's
|
|
236
|
-
*
|
|
280
|
+
* Preview how a set of events will affect a customer's invoices. Generates draft
|
|
281
|
+
* invoices for a customer using their current contract configuration and the
|
|
237
282
|
* provided events. This is useful for testing how new events will affect the
|
|
238
|
-
* customer's
|
|
283
|
+
* customer's invoices before they are actually processed.
|
|
239
284
|
*
|
|
240
285
|
* @example
|
|
241
286
|
* ```ts
|
|
@@ -253,16 +298,132 @@ export class Customers extends APIResource {
|
|
|
253
298
|
*/
|
|
254
299
|
previewEvents(
|
|
255
300
|
params: CustomerPreviewEventsParams,
|
|
256
|
-
options?:
|
|
257
|
-
):
|
|
301
|
+
options?: RequestOptions,
|
|
302
|
+
): APIPromise<CustomerPreviewEventsResponse> {
|
|
258
303
|
const { customer_id, ...body } = params;
|
|
259
|
-
return this._client.post(`/v1/customers/${customer_id}/previewEvents`, { body, ...options });
|
|
304
|
+
return this._client.post(path`/v1/customers/${customer_id}/previewEvents`, { body, ...options });
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Returns all billing configurations previously set for the customer. Use during
|
|
309
|
+
* the contract provisioning process to fetch the
|
|
310
|
+
* `billing_provider_configuration_id` needed to set the contract billing
|
|
311
|
+
* configuration.
|
|
312
|
+
*
|
|
313
|
+
* @example
|
|
314
|
+
* ```ts
|
|
315
|
+
* const response =
|
|
316
|
+
* await client.v1.customers.retrieveBillingConfigurations({
|
|
317
|
+
* customer_id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
|
|
318
|
+
* });
|
|
319
|
+
* ```
|
|
320
|
+
*/
|
|
321
|
+
retrieveBillingConfigurations(
|
|
322
|
+
body: CustomerRetrieveBillingConfigurationsParams,
|
|
323
|
+
options?: RequestOptions,
|
|
324
|
+
): APIPromise<CustomerRetrieveBillingConfigurationsResponse> {
|
|
325
|
+
return this._client.post('/v1/getCustomerBillingProviderConfigurations', { body, ...options });
|
|
260
326
|
}
|
|
261
327
|
|
|
262
328
|
/**
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
329
|
+
* Create a billing configuration for a customer. Once created, these
|
|
330
|
+
* configurations are available to associate to a contract and dictates which
|
|
331
|
+
* downstream system to collect payment in or send the invoice to. You can create
|
|
332
|
+
* multiple configurations per customer. The configuration formats are distinct for
|
|
333
|
+
* each downstream provider.
|
|
334
|
+
*
|
|
335
|
+
* ### Use this endpoint to:
|
|
336
|
+
*
|
|
337
|
+
* - Add the initial configuration to an existing customer. Once created, the
|
|
338
|
+
* billing configuration can then be associated to the customer's contract.
|
|
339
|
+
* - Add a new configuration to an existing customer. This might be used as part of
|
|
340
|
+
* an upgrade or downgrade workflow where the customer was previously billed
|
|
341
|
+
* through system A (e.g. Stripe) but will now be billed through system B (e.g.
|
|
342
|
+
* AWS). Once created, the new configuration can then be associated to the
|
|
343
|
+
* customer's contract.
|
|
344
|
+
* - Multiple configurations can be added per destination. For example, you can
|
|
345
|
+
* create two Stripe billing configurations for a Metronome customer that each
|
|
346
|
+
* have a distinct `collection_method`.
|
|
347
|
+
*
|
|
348
|
+
* ### Delivery method options:
|
|
349
|
+
*
|
|
350
|
+
* - `direct_to_billing_provider`: Use when Metronome should send invoices directly
|
|
351
|
+
* to the billing provider's API (e.g., Stripe, NetSuite). This is the most
|
|
352
|
+
* common method for automated billing workflows.
|
|
353
|
+
* - `tackle`: Use specifically for AWS Marketplace transactions that require
|
|
354
|
+
* Tackle's co-selling platform for partner attribution and commission tracking.
|
|
355
|
+
* - `aws_sqs`: Use when you want invoice data delivered to an AWS SQS queue for
|
|
356
|
+
* custom processing before sending to your billing system.
|
|
357
|
+
* - `aws_sns`: Use when you want invoice notifications published to an AWS SNS
|
|
358
|
+
* topic for event-driven billing workflows.
|
|
359
|
+
*
|
|
360
|
+
* ### Key response fields:
|
|
361
|
+
*
|
|
362
|
+
* The id for the customer billing configuration. This id can be used to associate
|
|
363
|
+
* the billing configuration to a contract.
|
|
364
|
+
*
|
|
365
|
+
* ### Usage guidelines:
|
|
366
|
+
*
|
|
367
|
+
* Must use the `delivery_method_id` if you have multiple Stripe accounts connected
|
|
368
|
+
* to Metronome.
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* ```ts
|
|
372
|
+
* await client.v1.customers.setBillingConfigurations({
|
|
373
|
+
* data: [
|
|
374
|
+
* {
|
|
375
|
+
* customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
|
|
376
|
+
* billing_provider: 'stripe',
|
|
377
|
+
* configuration: { ... },
|
|
378
|
+
* delivery_method: 'direct_to_billing_provider',
|
|
379
|
+
* },
|
|
380
|
+
* {
|
|
381
|
+
* customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
|
|
382
|
+
* billing_provider: 'aws_marketplace',
|
|
383
|
+
* configuration: { ... },
|
|
384
|
+
* delivery_method: 'direct_to_billing_provider',
|
|
385
|
+
* },
|
|
386
|
+
* {
|
|
387
|
+
* customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
|
|
388
|
+
* billing_provider: 'azure_marketplace',
|
|
389
|
+
* configuration: { ... },
|
|
390
|
+
* delivery_method_id: '5b9e3072-415b-4842-94f0-0b6700c8b6be',
|
|
391
|
+
* },
|
|
392
|
+
* {
|
|
393
|
+
* customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
|
|
394
|
+
* billing_provider: 'aws_marketplace',
|
|
395
|
+
* configuration: { ... },
|
|
396
|
+
* delivery_method: 'direct_to_billing_provider',
|
|
397
|
+
* },
|
|
398
|
+
* ],
|
|
399
|
+
* });
|
|
400
|
+
* ```
|
|
401
|
+
*/
|
|
402
|
+
setBillingConfigurations(
|
|
403
|
+
body: CustomerSetBillingConfigurationsParams,
|
|
404
|
+
options?: RequestOptions,
|
|
405
|
+
): APIPromise<void> {
|
|
406
|
+
return this._client.post('/v1/setCustomerBillingProviderConfigurations', {
|
|
407
|
+
body,
|
|
408
|
+
...options,
|
|
409
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Sets the ingest aliases for a customer. Use this endpoint to associate a
|
|
415
|
+
* Metronome customer with an internal ID for easier tracking between systems.
|
|
416
|
+
* Ingest aliases can be used in the `customer_id` field when sending usage events
|
|
417
|
+
* to Metronome.
|
|
418
|
+
*
|
|
419
|
+
* ### Usage guidelines:
|
|
420
|
+
*
|
|
421
|
+
* - This call is idempotent and fully replaces the set of ingest aliases for the
|
|
422
|
+
* given customer.
|
|
423
|
+
* - Switching an ingest alias from one customer to another will associate all
|
|
424
|
+
* corresponding usage to the new customer.
|
|
425
|
+
* - Use multiple ingest aliases to model child organizations within a single
|
|
426
|
+
* Metronome customer.
|
|
266
427
|
*
|
|
267
428
|
* @example
|
|
268
429
|
* ```ts
|
|
@@ -272,20 +433,21 @@ export class Customers extends APIResource {
|
|
|
272
433
|
* });
|
|
273
434
|
* ```
|
|
274
435
|
*/
|
|
275
|
-
setIngestAliases(
|
|
276
|
-
params: CustomerSetIngestAliasesParams,
|
|
277
|
-
options?: Core.RequestOptions,
|
|
278
|
-
): Core.APIPromise<void> {
|
|
436
|
+
setIngestAliases(params: CustomerSetIngestAliasesParams, options?: RequestOptions): APIPromise<void> {
|
|
279
437
|
const { customer_id, ...body } = params;
|
|
280
|
-
return this._client.post(`/v1/customers/${customer_id}/setIngestAliases`, {
|
|
438
|
+
return this._client.post(path`/v1/customers/${customer_id}/setIngestAliases`, {
|
|
281
439
|
body,
|
|
282
440
|
...options,
|
|
283
|
-
headers: { Accept: '*/*',
|
|
441
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
284
442
|
});
|
|
285
443
|
}
|
|
286
444
|
|
|
287
445
|
/**
|
|
288
|
-
* Updates the
|
|
446
|
+
* Updates the display name for a customer record. Use this to correct customer
|
|
447
|
+
* names, update business names after rebranding, or maintain accurate customer
|
|
448
|
+
* information for invoicing and reporting. Returns the updated customer object
|
|
449
|
+
* with the new name applied immediately across all billing documents and
|
|
450
|
+
* interfaces.
|
|
289
451
|
*
|
|
290
452
|
* @example
|
|
291
453
|
* ```ts
|
|
@@ -295,16 +457,16 @@ export class Customers extends APIResource {
|
|
|
295
457
|
* });
|
|
296
458
|
* ```
|
|
297
459
|
*/
|
|
298
|
-
setName(
|
|
299
|
-
params: CustomerSetNameParams,
|
|
300
|
-
options?: Core.RequestOptions,
|
|
301
|
-
): Core.APIPromise<CustomerSetNameResponse> {
|
|
460
|
+
setName(params: CustomerSetNameParams, options?: RequestOptions): APIPromise<CustomerSetNameResponse> {
|
|
302
461
|
const { customer_id, ...body } = params;
|
|
303
|
-
return this._client.post(`/v1/customers/${customer_id}/setName`, { body, ...options });
|
|
462
|
+
return this._client.post(path`/v1/customers/${customer_id}/setName`, { body, ...options });
|
|
304
463
|
}
|
|
305
464
|
|
|
306
465
|
/**
|
|
307
|
-
*
|
|
466
|
+
* Update configuration settings for a specific customer, such as external system
|
|
467
|
+
* integrations (e.g., Salesforce account ID) and other customer-specific billing
|
|
468
|
+
* parameters. Use this endpoint to modify customer configurations without
|
|
469
|
+
* affecting core customer data like name or ingest aliases.
|
|
308
470
|
*
|
|
309
471
|
* @example
|
|
310
472
|
* ```ts
|
|
@@ -314,21 +476,21 @@ export class Customers extends APIResource {
|
|
|
314
476
|
* });
|
|
315
477
|
* ```
|
|
316
478
|
*/
|
|
317
|
-
updateConfig(params: CustomerUpdateConfigParams, options?:
|
|
479
|
+
updateConfig(params: CustomerUpdateConfigParams, options?: RequestOptions): APIPromise<void> {
|
|
318
480
|
const { customer_id, ...body } = params;
|
|
319
|
-
return this._client.post(`/v1/customers/${customer_id}/updateConfig`, {
|
|
481
|
+
return this._client.post(path`/v1/customers/${customer_id}/updateConfig`, {
|
|
320
482
|
body,
|
|
321
483
|
...options,
|
|
322
|
-
headers: { Accept: '*/*',
|
|
484
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
323
485
|
});
|
|
324
486
|
}
|
|
325
487
|
}
|
|
326
488
|
|
|
327
|
-
export
|
|
489
|
+
export type CustomerDetailsCursorPage = CursorPage<CustomerDetail>;
|
|
328
490
|
|
|
329
|
-
export
|
|
491
|
+
export type CustomerListBillableMetricsResponsesCursorPage = CursorPage<CustomerListBillableMetricsResponse>;
|
|
330
492
|
|
|
331
|
-
export
|
|
493
|
+
export type CustomerListCostsResponsesCursorPage = CursorPage<CustomerListCostsResponse>;
|
|
332
494
|
|
|
333
495
|
export interface Customer {
|
|
334
496
|
/**
|
|
@@ -350,6 +512,9 @@ export interface Customer {
|
|
|
350
512
|
|
|
351
513
|
name: string;
|
|
352
514
|
|
|
515
|
+
/**
|
|
516
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
517
|
+
*/
|
|
353
518
|
custom_fields?: { [key: string]: string };
|
|
354
519
|
}
|
|
355
520
|
|
|
@@ -364,6 +529,9 @@ export interface CustomerDetail {
|
|
|
364
529
|
*/
|
|
365
530
|
created_at: string;
|
|
366
531
|
|
|
532
|
+
/**
|
|
533
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
534
|
+
*/
|
|
367
535
|
custom_fields: { [key: string]: string };
|
|
368
536
|
|
|
369
537
|
customer_config: CustomerDetail.CustomerConfig;
|
|
@@ -382,6 +550,11 @@ export interface CustomerDetail {
|
|
|
382
550
|
|
|
383
551
|
name: string;
|
|
384
552
|
|
|
553
|
+
/**
|
|
554
|
+
* RFC 3339 timestamp indicating when the customer was last updated.
|
|
555
|
+
*/
|
|
556
|
+
updated_at: string;
|
|
557
|
+
|
|
385
558
|
/**
|
|
386
559
|
* RFC 3339 timestamp indicating when the customer was archived. Null if the
|
|
387
560
|
* customer is active.
|
|
@@ -457,6 +630,9 @@ export interface CustomerListBillableMetricsResponse {
|
|
|
457
630
|
*/
|
|
458
631
|
archived_at?: string;
|
|
459
632
|
|
|
633
|
+
/**
|
|
634
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
635
|
+
*/
|
|
460
636
|
custom_fields?: { [key: string]: string };
|
|
461
637
|
|
|
462
638
|
/**
|
|
@@ -524,7 +700,60 @@ export namespace CustomerListCostsResponse {
|
|
|
524
700
|
}
|
|
525
701
|
|
|
526
702
|
export interface CustomerPreviewEventsResponse {
|
|
527
|
-
data: InvoicesAPI.Invoice
|
|
703
|
+
data: Array<InvoicesAPI.Invoice>;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
export interface CustomerRetrieveBillingConfigurationsResponse {
|
|
707
|
+
data: Array<CustomerRetrieveBillingConfigurationsResponse.Data>;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
export namespace CustomerRetrieveBillingConfigurationsResponse {
|
|
711
|
+
export interface Data {
|
|
712
|
+
/**
|
|
713
|
+
* ID of this configuration; can be provided as the
|
|
714
|
+
* billing_provider_configuration_id when creating a contract.
|
|
715
|
+
*/
|
|
716
|
+
id: string;
|
|
717
|
+
|
|
718
|
+
archived_at: string | null;
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* The billing provider set for this configuration.
|
|
722
|
+
*/
|
|
723
|
+
billing_provider:
|
|
724
|
+
| 'aws_marketplace'
|
|
725
|
+
| 'stripe'
|
|
726
|
+
| 'netsuite'
|
|
727
|
+
| 'custom'
|
|
728
|
+
| 'azure_marketplace'
|
|
729
|
+
| 'quickbooks_online'
|
|
730
|
+
| 'workday'
|
|
731
|
+
| 'gcp_marketplace';
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Configuration for the billing provider. The structure of this object is specific
|
|
735
|
+
* to the billing provider.
|
|
736
|
+
*/
|
|
737
|
+
configuration: { [key: string]: unknown };
|
|
738
|
+
|
|
739
|
+
customer_id: string;
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* The method to use for delivering invoices to this customer.
|
|
743
|
+
*/
|
|
744
|
+
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Configuration for the delivery method. The structure of this object is specific
|
|
748
|
+
* to the delivery method.
|
|
749
|
+
*/
|
|
750
|
+
delivery_method_configuration: { [key: string]: unknown };
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* ID of the delivery method to use for this customer.
|
|
754
|
+
*/
|
|
755
|
+
delivery_method_id: string;
|
|
756
|
+
}
|
|
528
757
|
}
|
|
529
758
|
|
|
530
759
|
export interface CustomerSetNameResponse {
|
|
@@ -539,6 +768,9 @@ export interface CustomerCreateParams {
|
|
|
539
768
|
|
|
540
769
|
billing_config?: CustomerCreateParams.BillingConfig;
|
|
541
770
|
|
|
771
|
+
/**
|
|
772
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
773
|
+
*/
|
|
542
774
|
custom_fields?: { [key: string]: string };
|
|
543
775
|
|
|
544
776
|
customer_billing_provider_configurations?: Array<CustomerCreateParams.CustomerBillingProviderConfiguration>;
|
|
@@ -603,7 +835,11 @@ export namespace CustomerCreateParams {
|
|
|
603
835
|
| 'us-west-1'
|
|
604
836
|
| 'us-west-2';
|
|
605
837
|
|
|
606
|
-
stripe_collection_method?:
|
|
838
|
+
stripe_collection_method?:
|
|
839
|
+
| 'charge_automatically'
|
|
840
|
+
| 'send_invoice'
|
|
841
|
+
| 'auto_charge_payment_intent'
|
|
842
|
+
| 'manually_charge_payment_intent';
|
|
607
843
|
}
|
|
608
844
|
|
|
609
845
|
export interface CustomerBillingProviderConfiguration {
|
|
@@ -631,6 +867,14 @@ export namespace CustomerCreateParams {
|
|
|
631
867
|
* `delivery_method` must be provided.
|
|
632
868
|
*/
|
|
633
869
|
delivery_method_id?: string;
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* Specifies which tax provider Metronome should use for tax calculation when
|
|
873
|
+
* billing through Stripe. This is only supported for Stripe billing provider
|
|
874
|
+
* configurations with auto_charge_payment_intent or manual_charge_payment_intent
|
|
875
|
+
* collection methods.
|
|
876
|
+
*/
|
|
877
|
+
tax_provider?: 'anrok' | 'avalara' | 'stripe';
|
|
634
878
|
}
|
|
635
879
|
}
|
|
636
880
|
|
|
@@ -731,13 +975,6 @@ export namespace CustomerPreviewEventsParams {
|
|
|
731
975
|
export interface Event {
|
|
732
976
|
event_type: string;
|
|
733
977
|
|
|
734
|
-
/**
|
|
735
|
-
* This has no effect for preview events, but may be set for consistency with Event
|
|
736
|
-
* objects. They will be processed even if they do not match the customer's ID or
|
|
737
|
-
* ingest aliases.
|
|
738
|
-
*/
|
|
739
|
-
customer_id?: string;
|
|
740
|
-
|
|
741
978
|
properties?: { [key: string]: unknown };
|
|
742
979
|
|
|
743
980
|
/**
|
|
@@ -746,14 +983,74 @@ export namespace CustomerPreviewEventsParams {
|
|
|
746
983
|
timestamp?: string;
|
|
747
984
|
|
|
748
985
|
/**
|
|
749
|
-
*
|
|
750
|
-
*
|
|
751
|
-
* request.
|
|
986
|
+
* Optional unique identifier for event deduplication. When provided, preview
|
|
987
|
+
* events are automatically deduplicated against historical events from the past 34
|
|
988
|
+
* days. Duplicate transaction IDs within the same request will return an error.
|
|
752
989
|
*/
|
|
753
990
|
transaction_id?: string;
|
|
754
991
|
}
|
|
755
992
|
}
|
|
756
993
|
|
|
994
|
+
export interface CustomerRetrieveBillingConfigurationsParams {
|
|
995
|
+
customer_id: string;
|
|
996
|
+
|
|
997
|
+
include_archived?: boolean;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
export interface CustomerSetBillingConfigurationsParams {
|
|
1001
|
+
data: Array<CustomerSetBillingConfigurationsParams.Data>;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
export namespace CustomerSetBillingConfigurationsParams {
|
|
1005
|
+
export interface Data {
|
|
1006
|
+
/**
|
|
1007
|
+
* The billing provider set for this configuration.
|
|
1008
|
+
*/
|
|
1009
|
+
billing_provider:
|
|
1010
|
+
| 'aws_marketplace'
|
|
1011
|
+
| 'stripe'
|
|
1012
|
+
| 'netsuite'
|
|
1013
|
+
| 'custom'
|
|
1014
|
+
| 'azure_marketplace'
|
|
1015
|
+
| 'quickbooks_online'
|
|
1016
|
+
| 'workday'
|
|
1017
|
+
| 'gcp_marketplace';
|
|
1018
|
+
|
|
1019
|
+
customer_id: string;
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
* Configuration for the billing provider. The structure of this object is specific
|
|
1023
|
+
* to the billing provider and delivery method combination. Defaults to an empty
|
|
1024
|
+
* object, however, for most billing provider + delivery method combinations, it
|
|
1025
|
+
* will not be a valid configuration. For AWS marketplace configurations, the
|
|
1026
|
+
* aws_is_subscription_product flag can be used to indicate a product with
|
|
1027
|
+
* usage-based pricing. More information can be found
|
|
1028
|
+
* [here](https://docs.metronome.com/invoice-customers/solutions/marketplaces/invoice-aws/#provision-aws-marketplace-customers-in-metronome).
|
|
1029
|
+
*/
|
|
1030
|
+
configuration?: { [key: string]: unknown };
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* The method to use for delivering invoices to this customer. If not provided, the
|
|
1034
|
+
* `delivery_method_id` must be provided.
|
|
1035
|
+
*/
|
|
1036
|
+
delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* ID of the delivery method to use for this customer. If not provided, the
|
|
1040
|
+
* `delivery_method` must be provided.
|
|
1041
|
+
*/
|
|
1042
|
+
delivery_method_id?: string;
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* Specifies which tax provider Metronome should use for tax calculation when
|
|
1046
|
+
* billing through Stripe. This is only supported for Stripe billing provider
|
|
1047
|
+
* configurations with auto_charge_payment_intent or manual_charge_payment_intent
|
|
1048
|
+
* collection methods.
|
|
1049
|
+
*/
|
|
1050
|
+
tax_provider?: 'anrok' | 'avalara' | 'stripe';
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
|
|
757
1054
|
export interface CustomerSetIngestAliasesParams {
|
|
758
1055
|
/**
|
|
759
1056
|
* Path param:
|
|
@@ -797,16 +1094,9 @@ export interface CustomerUpdateConfigParams {
|
|
|
797
1094
|
salesforce_account_id?: string | null;
|
|
798
1095
|
}
|
|
799
1096
|
|
|
800
|
-
Customers.CustomerDetailsCursorPage = CustomerDetailsCursorPage;
|
|
801
|
-
Customers.CustomerListBillableMetricsResponsesCursorPage = CustomerListBillableMetricsResponsesCursorPage;
|
|
802
|
-
Customers.CustomerListCostsResponsesCursorPage = CustomerListCostsResponsesCursorPage;
|
|
803
1097
|
Customers.Alerts = Alerts;
|
|
804
1098
|
Customers.Plans = Plans;
|
|
805
|
-
Customers.PlanListResponsesCursorPage = PlanListResponsesCursorPage;
|
|
806
|
-
Customers.PlanListPriceAdjustmentsResponsesCursorPage = PlanListPriceAdjustmentsResponsesCursorPage;
|
|
807
1099
|
Customers.Invoices = Invoices;
|
|
808
|
-
Customers.InvoicesCursorPage = InvoicesCursorPage;
|
|
809
|
-
Customers.InvoiceListBreakdownsResponsesCursorPage = InvoiceListBreakdownsResponsesCursorPage;
|
|
810
1100
|
Customers.BillingConfig = BillingConfigAPIBillingConfig;
|
|
811
1101
|
Customers.Commits = Commits;
|
|
812
1102
|
Customers.Credits = Credits;
|
|
@@ -822,10 +1112,11 @@ export declare namespace Customers {
|
|
|
822
1112
|
type CustomerListBillableMetricsResponse as CustomerListBillableMetricsResponse,
|
|
823
1113
|
type CustomerListCostsResponse as CustomerListCostsResponse,
|
|
824
1114
|
type CustomerPreviewEventsResponse as CustomerPreviewEventsResponse,
|
|
1115
|
+
type CustomerRetrieveBillingConfigurationsResponse as CustomerRetrieveBillingConfigurationsResponse,
|
|
825
1116
|
type CustomerSetNameResponse as CustomerSetNameResponse,
|
|
826
|
-
CustomerDetailsCursorPage as CustomerDetailsCursorPage,
|
|
827
|
-
CustomerListBillableMetricsResponsesCursorPage as CustomerListBillableMetricsResponsesCursorPage,
|
|
828
|
-
CustomerListCostsResponsesCursorPage as CustomerListCostsResponsesCursorPage,
|
|
1117
|
+
type CustomerDetailsCursorPage as CustomerDetailsCursorPage,
|
|
1118
|
+
type CustomerListBillableMetricsResponsesCursorPage as CustomerListBillableMetricsResponsesCursorPage,
|
|
1119
|
+
type CustomerListCostsResponsesCursorPage as CustomerListCostsResponsesCursorPage,
|
|
829
1120
|
type CustomerCreateParams as CustomerCreateParams,
|
|
830
1121
|
type CustomerRetrieveParams as CustomerRetrieveParams,
|
|
831
1122
|
type CustomerListParams as CustomerListParams,
|
|
@@ -833,6 +1124,8 @@ export declare namespace Customers {
|
|
|
833
1124
|
type CustomerListBillableMetricsParams as CustomerListBillableMetricsParams,
|
|
834
1125
|
type CustomerListCostsParams as CustomerListCostsParams,
|
|
835
1126
|
type CustomerPreviewEventsParams as CustomerPreviewEventsParams,
|
|
1127
|
+
type CustomerRetrieveBillingConfigurationsParams as CustomerRetrieveBillingConfigurationsParams,
|
|
1128
|
+
type CustomerSetBillingConfigurationsParams as CustomerSetBillingConfigurationsParams,
|
|
836
1129
|
type CustomerSetIngestAliasesParams as CustomerSetIngestAliasesParams,
|
|
837
1130
|
type CustomerSetNameParams as CustomerSetNameParams,
|
|
838
1131
|
type CustomerUpdateConfigParams as CustomerUpdateConfigParams,
|
|
@@ -842,7 +1135,7 @@ export declare namespace Customers {
|
|
|
842
1135
|
Alerts as Alerts,
|
|
843
1136
|
type CustomerAlert as CustomerAlert,
|
|
844
1137
|
type AlertRetrieveResponse as AlertRetrieveResponse,
|
|
845
|
-
type
|
|
1138
|
+
type CustomerAlertsCursorPageWithoutLimit as CustomerAlertsCursorPageWithoutLimit,
|
|
846
1139
|
type AlertRetrieveParams as AlertRetrieveParams,
|
|
847
1140
|
type AlertListParams as AlertListParams,
|
|
848
1141
|
type AlertResetParams as AlertResetParams,
|
|
@@ -854,8 +1147,8 @@ export declare namespace Customers {
|
|
|
854
1147
|
type PlanAddResponse as PlanAddResponse,
|
|
855
1148
|
type PlanEndResponse as PlanEndResponse,
|
|
856
1149
|
type PlanListPriceAdjustmentsResponse as PlanListPriceAdjustmentsResponse,
|
|
857
|
-
PlanListResponsesCursorPage as PlanListResponsesCursorPage,
|
|
858
|
-
PlanListPriceAdjustmentsResponsesCursorPage as PlanListPriceAdjustmentsResponsesCursorPage,
|
|
1150
|
+
type PlanListResponsesCursorPage as PlanListResponsesCursorPage,
|
|
1151
|
+
type PlanListPriceAdjustmentsResponsesCursorPage as PlanListPriceAdjustmentsResponsesCursorPage,
|
|
859
1152
|
type PlanListParams as PlanListParams,
|
|
860
1153
|
type PlanAddParams as PlanAddParams,
|
|
861
1154
|
type PlanEndParams as PlanEndParams,
|
|
@@ -868,12 +1161,13 @@ export declare namespace Customers {
|
|
|
868
1161
|
type InvoiceRetrieveResponse as InvoiceRetrieveResponse,
|
|
869
1162
|
type InvoiceAddChargeResponse as InvoiceAddChargeResponse,
|
|
870
1163
|
type InvoiceListBreakdownsResponse as InvoiceListBreakdownsResponse,
|
|
871
|
-
InvoicesCursorPage as InvoicesCursorPage,
|
|
872
|
-
InvoiceListBreakdownsResponsesCursorPage as InvoiceListBreakdownsResponsesCursorPage,
|
|
1164
|
+
type InvoicesCursorPage as InvoicesCursorPage,
|
|
1165
|
+
type InvoiceListBreakdownsResponsesCursorPage as InvoiceListBreakdownsResponsesCursorPage,
|
|
873
1166
|
type InvoiceRetrieveParams as InvoiceRetrieveParams,
|
|
874
1167
|
type InvoiceListParams as InvoiceListParams,
|
|
875
1168
|
type InvoiceAddChargeParams as InvoiceAddChargeParams,
|
|
876
1169
|
type InvoiceListBreakdownsParams as InvoiceListBreakdownsParams,
|
|
1170
|
+
type InvoiceRetrievePdfParams as InvoiceRetrievePdfParams,
|
|
877
1171
|
};
|
|
878
1172
|
|
|
879
1173
|
export {
|
|
@@ -887,7 +1181,6 @@ export declare namespace Customers {
|
|
|
887
1181
|
export {
|
|
888
1182
|
Commits as Commits,
|
|
889
1183
|
type CommitCreateResponse as CommitCreateResponse,
|
|
890
|
-
type CommitListResponse as CommitListResponse,
|
|
891
1184
|
type CommitUpdateEndDateResponse as CommitUpdateEndDateResponse,
|
|
892
1185
|
type CommitCreateParams as CommitCreateParams,
|
|
893
1186
|
type CommitListParams as CommitListParams,
|
|
@@ -897,7 +1190,6 @@ export declare namespace Customers {
|
|
|
897
1190
|
export {
|
|
898
1191
|
Credits as Credits,
|
|
899
1192
|
type CreditCreateResponse as CreditCreateResponse,
|
|
900
|
-
type CreditListResponse as CreditListResponse,
|
|
901
1193
|
type CreditUpdateEndDateResponse as CreditUpdateEndDateResponse,
|
|
902
1194
|
type CreditCreateParams as CreditCreateParams,
|
|
903
1195
|
type CreditListParams as CreditListParams,
|