@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoices.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmDG;IACH,QAAQ,CAAC,MAAM,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAKtG;;;;;;;;;;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AE,MAAM,CAAC;IAElB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAEhC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACnE;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
|
@@ -1,10 +1,50 @@
|
|
|
1
|
-
import { APIResource } from "../../../resource.js";
|
|
2
|
-
import * as Core from "../../../core.js";
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
3
2
|
import * as Shared from "../../shared.js";
|
|
4
|
-
import {
|
|
3
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
4
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../../../core/pagination.js";
|
|
5
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
5
6
|
export declare class Invoices extends APIResource {
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
+
* Retrieve detailed information for a specific invoice by its unique identifier.
|
|
9
|
+
* This endpoint returns comprehensive invoice data including line items, applied
|
|
10
|
+
* credits, totals, and billing period details for both finalized and draft
|
|
11
|
+
* invoices.
|
|
12
|
+
*
|
|
13
|
+
* ### Use this endpoint to:
|
|
14
|
+
*
|
|
15
|
+
* - Display historical invoice details in customer-facing dashboards or billing
|
|
16
|
+
* portals.
|
|
17
|
+
* - Retrieve current month draft invoices to show customers their month-to-date
|
|
18
|
+
* spend.
|
|
19
|
+
* - Access finalized invoices for historical billing records and payment
|
|
20
|
+
* reconciliation.
|
|
21
|
+
* - Validate customer pricing and credit applications for customer support
|
|
22
|
+
* queries.
|
|
23
|
+
*
|
|
24
|
+
* ### Key response fields:
|
|
25
|
+
*
|
|
26
|
+
* Invoice status (DRAFT, FINALIZED, VOID) Billing period start and end dates Total
|
|
27
|
+
* amount and amount due after credits Detailed line items broken down by:
|
|
28
|
+
*
|
|
29
|
+
* - Customer and contract information
|
|
30
|
+
* - Invoice line item type
|
|
31
|
+
* - Product/service name and ID
|
|
32
|
+
* - Quantity consumed
|
|
33
|
+
* - Unit and total price
|
|
34
|
+
* - Time period for usage-based charges
|
|
35
|
+
* - Applied credits or prepaid commitments
|
|
36
|
+
*
|
|
37
|
+
* ### Usage guidelines:
|
|
38
|
+
*
|
|
39
|
+
* - Draft invoices update in real-time as usage is reported and may change before
|
|
40
|
+
* finalization
|
|
41
|
+
* - The response includes both usage-based line items (e.g., API calls, data
|
|
42
|
+
* processed) and scheduled charges (e.g., monthly subscriptions, commitment
|
|
43
|
+
* fees)
|
|
44
|
+
* - Credit and commitment applications are shown as separate line items with
|
|
45
|
+
* negative amounts
|
|
46
|
+
* - For voided invoices, the response will indicate VOID status but retain all
|
|
47
|
+
* original line item details
|
|
8
48
|
*
|
|
9
49
|
* @example
|
|
10
50
|
* ```ts
|
|
@@ -16,10 +56,54 @@ export declare class Invoices extends APIResource {
|
|
|
16
56
|
* );
|
|
17
57
|
* ```
|
|
18
58
|
*/
|
|
19
|
-
retrieve(params: InvoiceRetrieveParams, options?:
|
|
59
|
+
retrieve(params: InvoiceRetrieveParams, options?: RequestOptions): APIPromise<InvoiceRetrieveResponse>;
|
|
20
60
|
/**
|
|
21
|
-
*
|
|
22
|
-
* range,
|
|
61
|
+
* Retrieves a paginated list of invoices for a specific customer, with flexible
|
|
62
|
+
* filtering options to narrow results by status, date range, credit type, and
|
|
63
|
+
* more. This endpoint provides a comprehensive view of a customer's billing
|
|
64
|
+
* history and current charges, supporting both real-time billing dashboards and
|
|
65
|
+
* historical reporting needs.
|
|
66
|
+
*
|
|
67
|
+
* ### Use this endpoint to:
|
|
68
|
+
*
|
|
69
|
+
* - Display historical invoice details in customer-facing dashboards or billing
|
|
70
|
+
* portals.
|
|
71
|
+
* - Retrieve current month draft invoices to show customers their month-to-date
|
|
72
|
+
* spend.
|
|
73
|
+
* - Access finalized invoices for historical billing records and payment
|
|
74
|
+
* reconciliation.
|
|
75
|
+
* - Validate customer pricing and credit applications for customer support
|
|
76
|
+
* queries.
|
|
77
|
+
* - Generate financial reports by filtering invoices within specific date ranges
|
|
78
|
+
*
|
|
79
|
+
* ### Key response fields:
|
|
80
|
+
*
|
|
81
|
+
* Array of invoice objects containing:
|
|
82
|
+
*
|
|
83
|
+
* - Invoice ID and status (DRAFT, FINALIZED, VOID)
|
|
84
|
+
* - Invoice type (USAGE, SCHEDULED)
|
|
85
|
+
* - Billing period start and end dates
|
|
86
|
+
* - Issue date and due date
|
|
87
|
+
* - Total amount, subtotal, and amount due
|
|
88
|
+
* - Applied credits summary
|
|
89
|
+
* - Contract ID reference
|
|
90
|
+
* - External billing provider status (if integrated with Stripe, etc.)
|
|
91
|
+
* - Pagination metadata `next_page` cursor
|
|
92
|
+
*
|
|
93
|
+
* ### Usage guidelines:
|
|
94
|
+
*
|
|
95
|
+
* - The endpoint returns invoice summaries; use the Get Invoice endpoint for
|
|
96
|
+
* detailed line items
|
|
97
|
+
* - Draft invoices are continuously updated as new usage is reported and will show
|
|
98
|
+
* real-time spend
|
|
99
|
+
* - Results are ordered by creation date descending by default (newest first)
|
|
100
|
+
* - When filtering by date range, the filter applies to the billing period, not
|
|
101
|
+
* the issue date
|
|
102
|
+
* - For customers with many invoices, implement pagination to ensure all results
|
|
103
|
+
* are retrieved External billing provider statuses (like Stripe payment status)
|
|
104
|
+
* are included when applicable
|
|
105
|
+
* - Voided invoices are included in results by default unless filtered out by
|
|
106
|
+
* status
|
|
23
107
|
*
|
|
24
108
|
* @example
|
|
25
109
|
* ```ts
|
|
@@ -31,7 +115,7 @@ export declare class Invoices extends APIResource {
|
|
|
31
115
|
* }
|
|
32
116
|
* ```
|
|
33
117
|
*/
|
|
34
|
-
list(params: InvoiceListParams, options?:
|
|
118
|
+
list(params: InvoiceListParams, options?: RequestOptions): PagePromise<InvoicesCursorPage, Invoice>;
|
|
35
119
|
/**
|
|
36
120
|
* Add a one time charge to the specified invoice
|
|
37
121
|
*
|
|
@@ -50,13 +134,46 @@ export declare class Invoices extends APIResource {
|
|
|
50
134
|
* });
|
|
51
135
|
* ```
|
|
52
136
|
*/
|
|
53
|
-
addCharge(params: InvoiceAddChargeParams, options?:
|
|
137
|
+
addCharge(params: InvoiceAddChargeParams, options?: RequestOptions): APIPromise<InvoiceAddChargeResponse>;
|
|
54
138
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
139
|
+
* Retrieve granular time-series breakdowns of invoice data at hourly or daily
|
|
140
|
+
* intervals. This endpoint transforms standard invoices into detailed timelines,
|
|
141
|
+
* enabling you to track usage patterns, identify consumption spikes, and provide
|
|
142
|
+
* customers with transparency into their billing details throughout the billing
|
|
143
|
+
* period.
|
|
144
|
+
*
|
|
145
|
+
* ### Use this endpoint to:
|
|
146
|
+
*
|
|
147
|
+
* - Build usage analytics dashboards showing daily or hourly consumption trends
|
|
148
|
+
* - Identify peak usage periods for capacity planning and cost optimization
|
|
149
|
+
* - Generate detailed billing reports for finance teams and customer success
|
|
150
|
+
* - Troubleshoot billing disputes by examining usage patterns at specific times
|
|
151
|
+
* - Power real-time cost monitoring and alerting systems
|
|
152
|
+
*
|
|
153
|
+
* ### Key response fields:
|
|
154
|
+
*
|
|
155
|
+
* An array of BreakdownInvoice objects, each containing:
|
|
57
156
|
*
|
|
58
|
-
* -
|
|
59
|
-
*
|
|
157
|
+
* - All standard invoice fields (ID, customer, commit, line items, totals, status)
|
|
158
|
+
* - Line items with quantities and costs for that specific period
|
|
159
|
+
* - `breakdown_start_timestamp`: Start of the specific time window
|
|
160
|
+
* - `breakdown_end_timestamp`: End of the specific time window
|
|
161
|
+
* - `next_page`: Pagination cursor for large result sets
|
|
162
|
+
*
|
|
163
|
+
* ### Usage guidelines:
|
|
164
|
+
*
|
|
165
|
+
* - Time granularity: Set `window_size` to hour or day based on your analysis
|
|
166
|
+
* needs
|
|
167
|
+
* - Response limits: Daily breakdowns return up to 35 days; hourly breakdowns
|
|
168
|
+
* return up to 24 hours per request
|
|
169
|
+
* - Date filtering: Use `starting_on` and `ending_before` to focus on specific
|
|
170
|
+
* periods
|
|
171
|
+
* - Performance: For large date ranges, use pagination to retrieve all data
|
|
172
|
+
* efficiently
|
|
173
|
+
* - Backdated usage: If usage events arrive after invoice finalization, breakdowns
|
|
174
|
+
* will reflect the updated usage
|
|
175
|
+
* - Zero quantity filtering: Use `skip_zero_qty_line_items=true` to exclude
|
|
176
|
+
* periods with no usage
|
|
60
177
|
*
|
|
61
178
|
* @example
|
|
62
179
|
* ```ts
|
|
@@ -72,12 +189,10 @@ export declare class Invoices extends APIResource {
|
|
|
72
189
|
* }
|
|
73
190
|
* ```
|
|
74
191
|
*/
|
|
75
|
-
listBreakdowns(params: InvoiceListBreakdownsParams, options?:
|
|
76
|
-
}
|
|
77
|
-
export declare class InvoicesCursorPage extends CursorPage<Invoice> {
|
|
78
|
-
}
|
|
79
|
-
export declare class InvoiceListBreakdownsResponsesCursorPage extends CursorPage<InvoiceListBreakdownsResponse> {
|
|
192
|
+
listBreakdowns(params: InvoiceListBreakdownsParams, options?: RequestOptions): PagePromise<InvoiceListBreakdownsResponsesCursorPage, InvoiceListBreakdownsResponse>;
|
|
80
193
|
}
|
|
194
|
+
export type InvoicesCursorPage = CursorPage<Invoice>;
|
|
195
|
+
export type InvoiceListBreakdownsResponsesCursorPage = CursorPage<InvoiceListBreakdownsResponse>;
|
|
81
196
|
export interface Invoice {
|
|
82
197
|
id: string;
|
|
83
198
|
credit_type: Shared.CreditTypeData;
|
|
@@ -91,6 +206,9 @@ export interface Invoice {
|
|
|
91
206
|
* This field's availability is dependent on your client's configuration.
|
|
92
207
|
*/
|
|
93
208
|
billable_status?: 'billable' | 'unbillable';
|
|
209
|
+
/**
|
|
210
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
211
|
+
*/
|
|
94
212
|
contract_custom_fields?: {
|
|
95
213
|
[key: string]: string;
|
|
96
214
|
};
|
|
@@ -104,6 +222,9 @@ export interface Invoice {
|
|
|
104
222
|
custom_fields?: {
|
|
105
223
|
[key: string]: unknown;
|
|
106
224
|
};
|
|
225
|
+
/**
|
|
226
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
227
|
+
*/
|
|
107
228
|
customer_custom_fields?: {
|
|
108
229
|
[key: string]: string;
|
|
109
230
|
};
|
|
@@ -122,6 +243,9 @@ export interface Invoice {
|
|
|
122
243
|
* This field's availability is dependent on your client's configuration.
|
|
123
244
|
*/
|
|
124
245
|
netsuite_sales_order_id?: string;
|
|
246
|
+
/**
|
|
247
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
248
|
+
*/
|
|
125
249
|
plan_custom_fields?: {
|
|
126
250
|
[key: string]: string;
|
|
127
251
|
};
|
|
@@ -146,12 +270,41 @@ export declare namespace Invoice {
|
|
|
146
270
|
credit_type: Shared.CreditTypeData;
|
|
147
271
|
name: string;
|
|
148
272
|
total: number;
|
|
273
|
+
/**
|
|
274
|
+
* The type of line item.
|
|
275
|
+
*
|
|
276
|
+
* - `scheduled`: Line item is associated with a scheduled charge. View the
|
|
277
|
+
* scheduled_charge_id on the line item.
|
|
278
|
+
* - `commit_purchase`: Line item is associated with a payment for a prepaid
|
|
279
|
+
* commit. View the commit_id on the line item.
|
|
280
|
+
* - `usage`: Line item is associated with a usage product or composite product.
|
|
281
|
+
* View the product_id on the line item to determine which product.
|
|
282
|
+
* - `subscription`: Line item is associated with a subscription. e.g. monthly
|
|
283
|
+
* recurring payment for an in-advance subscription.
|
|
284
|
+
* - `applied_commit_or_credit`: On metronome invoices, applied commits and credits
|
|
285
|
+
* are associated with their own line items. These line items have negative
|
|
286
|
+
* totals. Use the applied_commit_or_credit object on the line item to understand
|
|
287
|
+
* the id of the applied commit or credit, and its type. Note that the
|
|
288
|
+
* application of a postpaid commit is associated with a line item, but the total
|
|
289
|
+
* on the line item is not included in the invoice's total as postpaid commits
|
|
290
|
+
* are paid in-arrears.
|
|
291
|
+
* - `cpu_conversion`: Line item converting between a custom pricing unit and fiat
|
|
292
|
+
* currency, using the conversion rate set on the rate card. This line item will
|
|
293
|
+
* appear when there are products priced in custom pricing units, and there is
|
|
294
|
+
* insufficient prepaid commit/credit in that custom pricing unit to fully cover
|
|
295
|
+
* the spend. Then, the outstanding spend in custom pricing units will be
|
|
296
|
+
* converted to fiat currency using a cpu_conversion line item.
|
|
297
|
+
*/
|
|
298
|
+
type: string;
|
|
149
299
|
/**
|
|
150
300
|
* Details about the credit or commit that was applied to this line item. Only
|
|
151
301
|
* present on line items with product of `USAGE`, `SUBSCRIPTION` or `COMPOSITE`
|
|
152
302
|
* types.
|
|
153
303
|
*/
|
|
154
304
|
applied_commit_or_credit?: LineItem.AppliedCommitOrCredit;
|
|
305
|
+
/**
|
|
306
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
307
|
+
*/
|
|
155
308
|
commit_custom_fields?: {
|
|
156
309
|
[key: string]: string;
|
|
157
310
|
};
|
|
@@ -170,9 +323,15 @@ export declare namespace Invoice {
|
|
|
170
323
|
* (for commit type `POSTPAID`).
|
|
171
324
|
*/
|
|
172
325
|
commit_type?: string;
|
|
326
|
+
/**
|
|
327
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
328
|
+
*/
|
|
173
329
|
custom_fields?: {
|
|
174
330
|
[key: string]: string;
|
|
175
331
|
};
|
|
332
|
+
/**
|
|
333
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
334
|
+
*/
|
|
176
335
|
discount_custom_fields?: {
|
|
177
336
|
[key: string]: string;
|
|
178
337
|
};
|
|
@@ -224,6 +383,9 @@ export declare namespace Invoice {
|
|
|
224
383
|
pricing_group_values?: {
|
|
225
384
|
[key: string]: string;
|
|
226
385
|
};
|
|
386
|
+
/**
|
|
387
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
388
|
+
*/
|
|
227
389
|
product_custom_fields?: {
|
|
228
390
|
[key: string]: string;
|
|
229
391
|
};
|
|
@@ -243,6 +405,9 @@ export declare namespace Invoice {
|
|
|
243
405
|
* charges, commit and credit payments, the value is `FixedProductListItem`.
|
|
244
406
|
*/
|
|
245
407
|
product_type?: string;
|
|
408
|
+
/**
|
|
409
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
410
|
+
*/
|
|
246
411
|
professional_service_custom_fields?: {
|
|
247
412
|
[key: string]: string;
|
|
248
413
|
};
|
|
@@ -252,6 +417,9 @@ export declare namespace Invoice {
|
|
|
252
417
|
*/
|
|
253
418
|
quantity?: number;
|
|
254
419
|
reseller_type?: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
420
|
+
/**
|
|
421
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
422
|
+
*/
|
|
255
423
|
scheduled_charge_custom_fields?: {
|
|
256
424
|
[key: string]: string;
|
|
257
425
|
};
|
|
@@ -264,6 +432,9 @@ export declare namespace Invoice {
|
|
|
264
432
|
*/
|
|
265
433
|
starting_at?: string;
|
|
266
434
|
sub_line_items?: Array<LineItem.SubLineItem>;
|
|
435
|
+
/**
|
|
436
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
437
|
+
*/
|
|
267
438
|
subscription_custom_fields?: {
|
|
268
439
|
[key: string]: string;
|
|
269
440
|
};
|
|
@@ -293,6 +464,9 @@ export declare namespace Invoice {
|
|
|
293
464
|
id: string;
|
|
294
465
|
}
|
|
295
466
|
interface SubLineItem {
|
|
467
|
+
/**
|
|
468
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
469
|
+
*/
|
|
296
470
|
custom_fields: {
|
|
297
471
|
[key: string]: string;
|
|
298
472
|
};
|
|
@@ -371,6 +545,9 @@ export declare namespace Invoice {
|
|
|
371
545
|
credit_type: Shared.CreditTypeData;
|
|
372
546
|
name: string;
|
|
373
547
|
total: number;
|
|
548
|
+
/**
|
|
549
|
+
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
550
|
+
*/
|
|
374
551
|
credit_grant_custom_fields?: {
|
|
375
552
|
[key: string]: string;
|
|
376
553
|
};
|
|
@@ -528,6 +705,6 @@ export interface InvoiceListBreakdownsParams extends CursorPageParams {
|
|
|
528
705
|
window_size?: 'HOUR' | 'DAY';
|
|
529
706
|
}
|
|
530
707
|
export declare namespace Invoices {
|
|
531
|
-
export { type Invoice as Invoice, type InvoiceRetrieveResponse as InvoiceRetrieveResponse, type InvoiceAddChargeResponse as InvoiceAddChargeResponse, type InvoiceListBreakdownsResponse as InvoiceListBreakdownsResponse, InvoicesCursorPage as InvoicesCursorPage, InvoiceListBreakdownsResponsesCursorPage as InvoiceListBreakdownsResponsesCursorPage, type InvoiceRetrieveParams as InvoiceRetrieveParams, type InvoiceListParams as InvoiceListParams, type InvoiceAddChargeParams as InvoiceAddChargeParams, type InvoiceListBreakdownsParams as InvoiceListBreakdownsParams, };
|
|
708
|
+
export { type Invoice as Invoice, type InvoiceRetrieveResponse as InvoiceRetrieveResponse, type InvoiceAddChargeResponse as InvoiceAddChargeResponse, type InvoiceListBreakdownsResponse as InvoiceListBreakdownsResponse, type InvoicesCursorPage as InvoicesCursorPage, type InvoiceListBreakdownsResponsesCursorPage as InvoiceListBreakdownsResponsesCursorPage, type InvoiceRetrieveParams as InvoiceRetrieveParams, type InvoiceListParams as InvoiceListParams, type InvoiceAddChargeParams as InvoiceAddChargeParams, type InvoiceListBreakdownsParams as InvoiceListBreakdownsParams, };
|
|
532
709
|
}
|
|
533
710
|
//# sourceMappingURL=invoices.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"invoices.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmDG;IACH,QAAQ,CAAC,MAAM,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAKtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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B,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAEhC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACnE;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
|
@@ -1,12 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
const resource_1 = require("../../../resource.js");
|
|
6
|
-
const pagination_1 = require("../../../pagination.js");
|
|
4
|
+
exports.Invoices = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../../core/pagination.js");
|
|
7
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
7
8
|
class Invoices extends resource_1.APIResource {
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
+
* Retrieve detailed information for a specific invoice by its unique identifier.
|
|
11
|
+
* This endpoint returns comprehensive invoice data including line items, applied
|
|
12
|
+
* credits, totals, and billing period details for both finalized and draft
|
|
13
|
+
* invoices.
|
|
14
|
+
*
|
|
15
|
+
* ### Use this endpoint to:
|
|
16
|
+
*
|
|
17
|
+
* - Display historical invoice details in customer-facing dashboards or billing
|
|
18
|
+
* portals.
|
|
19
|
+
* - Retrieve current month draft invoices to show customers their month-to-date
|
|
20
|
+
* spend.
|
|
21
|
+
* - Access finalized invoices for historical billing records and payment
|
|
22
|
+
* reconciliation.
|
|
23
|
+
* - Validate customer pricing and credit applications for customer support
|
|
24
|
+
* queries.
|
|
25
|
+
*
|
|
26
|
+
* ### Key response fields:
|
|
27
|
+
*
|
|
28
|
+
* Invoice status (DRAFT, FINALIZED, VOID) Billing period start and end dates Total
|
|
29
|
+
* amount and amount due after credits Detailed line items broken down by:
|
|
30
|
+
*
|
|
31
|
+
* - Customer and contract information
|
|
32
|
+
* - Invoice line item type
|
|
33
|
+
* - Product/service name and ID
|
|
34
|
+
* - Quantity consumed
|
|
35
|
+
* - Unit and total price
|
|
36
|
+
* - Time period for usage-based charges
|
|
37
|
+
* - Applied credits or prepaid commitments
|
|
38
|
+
*
|
|
39
|
+
* ### Usage guidelines:
|
|
40
|
+
*
|
|
41
|
+
* - Draft invoices update in real-time as usage is reported and may change before
|
|
42
|
+
* finalization
|
|
43
|
+
* - The response includes both usage-based line items (e.g., API calls, data
|
|
44
|
+
* processed) and scheduled charges (e.g., monthly subscriptions, commitment
|
|
45
|
+
* fees)
|
|
46
|
+
* - Credit and commitment applications are shown as separate line items with
|
|
47
|
+
* negative amounts
|
|
48
|
+
* - For voided invoices, the response will indicate VOID status but retain all
|
|
49
|
+
* original line item details
|
|
10
50
|
*
|
|
11
51
|
* @example
|
|
12
52
|
* ```ts
|
|
@@ -20,11 +60,55 @@ class Invoices extends resource_1.APIResource {
|
|
|
20
60
|
*/
|
|
21
61
|
retrieve(params, options) {
|
|
22
62
|
const { customer_id, invoice_id, ...query } = params;
|
|
23
|
-
return this._client.get(`/v1/customers/${customer_id}/invoices/${invoice_id}`, { query, ...options });
|
|
63
|
+
return this._client.get((0, path_1.path) `/v1/customers/${customer_id}/invoices/${invoice_id}`, { query, ...options });
|
|
24
64
|
}
|
|
25
65
|
/**
|
|
26
|
-
*
|
|
27
|
-
* range,
|
|
66
|
+
* Retrieves a paginated list of invoices for a specific customer, with flexible
|
|
67
|
+
* filtering options to narrow results by status, date range, credit type, and
|
|
68
|
+
* more. This endpoint provides a comprehensive view of a customer's billing
|
|
69
|
+
* history and current charges, supporting both real-time billing dashboards and
|
|
70
|
+
* historical reporting needs.
|
|
71
|
+
*
|
|
72
|
+
* ### Use this endpoint to:
|
|
73
|
+
*
|
|
74
|
+
* - Display historical invoice details in customer-facing dashboards or billing
|
|
75
|
+
* portals.
|
|
76
|
+
* - Retrieve current month draft invoices to show customers their month-to-date
|
|
77
|
+
* spend.
|
|
78
|
+
* - Access finalized invoices for historical billing records and payment
|
|
79
|
+
* reconciliation.
|
|
80
|
+
* - Validate customer pricing and credit applications for customer support
|
|
81
|
+
* queries.
|
|
82
|
+
* - Generate financial reports by filtering invoices within specific date ranges
|
|
83
|
+
*
|
|
84
|
+
* ### Key response fields:
|
|
85
|
+
*
|
|
86
|
+
* Array of invoice objects containing:
|
|
87
|
+
*
|
|
88
|
+
* - Invoice ID and status (DRAFT, FINALIZED, VOID)
|
|
89
|
+
* - Invoice type (USAGE, SCHEDULED)
|
|
90
|
+
* - Billing period start and end dates
|
|
91
|
+
* - Issue date and due date
|
|
92
|
+
* - Total amount, subtotal, and amount due
|
|
93
|
+
* - Applied credits summary
|
|
94
|
+
* - Contract ID reference
|
|
95
|
+
* - External billing provider status (if integrated with Stripe, etc.)
|
|
96
|
+
* - Pagination metadata `next_page` cursor
|
|
97
|
+
*
|
|
98
|
+
* ### Usage guidelines:
|
|
99
|
+
*
|
|
100
|
+
* - The endpoint returns invoice summaries; use the Get Invoice endpoint for
|
|
101
|
+
* detailed line items
|
|
102
|
+
* - Draft invoices are continuously updated as new usage is reported and will show
|
|
103
|
+
* real-time spend
|
|
104
|
+
* - Results are ordered by creation date descending by default (newest first)
|
|
105
|
+
* - When filtering by date range, the filter applies to the billing period, not
|
|
106
|
+
* the issue date
|
|
107
|
+
* - For customers with many invoices, implement pagination to ensure all results
|
|
108
|
+
* are retrieved External billing provider statuses (like Stripe payment status)
|
|
109
|
+
* are included when applicable
|
|
110
|
+
* - Voided invoices are included in results by default unless filtered out by
|
|
111
|
+
* status
|
|
28
112
|
*
|
|
29
113
|
* @example
|
|
30
114
|
* ```ts
|
|
@@ -38,7 +122,7 @@ class Invoices extends resource_1.APIResource {
|
|
|
38
122
|
*/
|
|
39
123
|
list(params, options) {
|
|
40
124
|
const { customer_id, ...query } = params;
|
|
41
|
-
return this._client.getAPIList(`/v1/customers/${customer_id}/invoices`,
|
|
125
|
+
return this._client.getAPIList((0, path_1.path) `/v1/customers/${customer_id}/invoices`, (pagination_1.CursorPage), {
|
|
42
126
|
query,
|
|
43
127
|
...options,
|
|
44
128
|
});
|
|
@@ -63,14 +147,47 @@ class Invoices extends resource_1.APIResource {
|
|
|
63
147
|
*/
|
|
64
148
|
addCharge(params, options) {
|
|
65
149
|
const { customer_id, ...body } = params;
|
|
66
|
-
return this._client.post(`/v1/customers/${customer_id}/addCharge`, { body, ...options });
|
|
150
|
+
return this._client.post((0, path_1.path) `/v1/customers/${customer_id}/addCharge`, { body, ...options });
|
|
67
151
|
}
|
|
68
152
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
153
|
+
* Retrieve granular time-series breakdowns of invoice data at hourly or daily
|
|
154
|
+
* intervals. This endpoint transforms standard invoices into detailed timelines,
|
|
155
|
+
* enabling you to track usage patterns, identify consumption spikes, and provide
|
|
156
|
+
* customers with transparency into their billing details throughout the billing
|
|
157
|
+
* period.
|
|
158
|
+
*
|
|
159
|
+
* ### Use this endpoint to:
|
|
160
|
+
*
|
|
161
|
+
* - Build usage analytics dashboards showing daily or hourly consumption trends
|
|
162
|
+
* - Identify peak usage periods for capacity planning and cost optimization
|
|
163
|
+
* - Generate detailed billing reports for finance teams and customer success
|
|
164
|
+
* - Troubleshoot billing disputes by examining usage patterns at specific times
|
|
165
|
+
* - Power real-time cost monitoring and alerting systems
|
|
166
|
+
*
|
|
167
|
+
* ### Key response fields:
|
|
71
168
|
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
169
|
+
* An array of BreakdownInvoice objects, each containing:
|
|
170
|
+
*
|
|
171
|
+
* - All standard invoice fields (ID, customer, commit, line items, totals, status)
|
|
172
|
+
* - Line items with quantities and costs for that specific period
|
|
173
|
+
* - `breakdown_start_timestamp`: Start of the specific time window
|
|
174
|
+
* - `breakdown_end_timestamp`: End of the specific time window
|
|
175
|
+
* - `next_page`: Pagination cursor for large result sets
|
|
176
|
+
*
|
|
177
|
+
* ### Usage guidelines:
|
|
178
|
+
*
|
|
179
|
+
* - Time granularity: Set `window_size` to hour or day based on your analysis
|
|
180
|
+
* needs
|
|
181
|
+
* - Response limits: Daily breakdowns return up to 35 days; hourly breakdowns
|
|
182
|
+
* return up to 24 hours per request
|
|
183
|
+
* - Date filtering: Use `starting_on` and `ending_before` to focus on specific
|
|
184
|
+
* periods
|
|
185
|
+
* - Performance: For large date ranges, use pagination to retrieve all data
|
|
186
|
+
* efficiently
|
|
187
|
+
* - Backdated usage: If usage events arrive after invoice finalization, breakdowns
|
|
188
|
+
* will reflect the updated usage
|
|
189
|
+
* - Zero quantity filtering: Use `skip_zero_qty_line_items=true` to exclude
|
|
190
|
+
* periods with no usage
|
|
74
191
|
*
|
|
75
192
|
* @example
|
|
76
193
|
* ```ts
|
|
@@ -88,16 +205,8 @@ class Invoices extends resource_1.APIResource {
|
|
|
88
205
|
*/
|
|
89
206
|
listBreakdowns(params, options) {
|
|
90
207
|
const { customer_id, ...query } = params;
|
|
91
|
-
return this._client.getAPIList(`/v1/customers/${customer_id}/invoices/breakdowns`,
|
|
208
|
+
return this._client.getAPIList((0, path_1.path) `/v1/customers/${customer_id}/invoices/breakdowns`, (pagination_1.CursorPage), { query, ...options });
|
|
92
209
|
}
|
|
93
210
|
}
|
|
94
211
|
exports.Invoices = Invoices;
|
|
95
|
-
class InvoicesCursorPage extends pagination_1.CursorPage {
|
|
96
|
-
}
|
|
97
|
-
exports.InvoicesCursorPage = InvoicesCursorPage;
|
|
98
|
-
class InvoiceListBreakdownsResponsesCursorPage extends pagination_1.CursorPage {
|
|
99
|
-
}
|
|
100
|
-
exports.InvoiceListBreakdownsResponsesCursorPage = InvoiceListBreakdownsResponsesCursorPage;
|
|
101
|
-
Invoices.InvoicesCursorPage = InvoicesCursorPage;
|
|
102
|
-
Invoices.InvoiceListBreakdownsResponsesCursorPage = InvoiceListBreakdownsResponsesCursorPage;
|
|
103
212
|
//# sourceMappingURL=invoices.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,4DAA0F;AAE1F,0DAAoD;AAEpD,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmDG;I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