@metronome/sdk 0.3.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 +48 -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 +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 +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 +2239 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +1404 -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 +401 -1294
- 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 +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 +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 +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 +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 +193 -24
- 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 +333 -3870
- 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 +1794 -534
- 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 +465 -1633
- 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 +147 -28
- 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 +390 -101
- package/src/resources/v1/customers/index.ts +19 -18
- package/src/resources/v1/customers/invoices.ts +202 -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 +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 +420 -5022
- package/src/resources/v2/index.ts +2 -2
- package/src/resources/v2/v2.ts +3 -3
- package/src/resources/v2.ts +1 -1
- package/src/resources/webhooks.ts +2 -2
- package/src/resources.ts +1 -1
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -157
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -255
- package/core.d.ts.map +0 -1
- package/core.js +0 -924
- package/core.js.map +0 -1
- package/core.mjs +0 -892
- package/core.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1236
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
package/client.d.mts
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import type { RequestInit, RequestInfo } from "./internal/builtin-types.mjs";
|
|
2
|
+
import type { PromiseOrValue, MergedRequestInit, FinalizedRequestInit } from "./internal/types.mjs";
|
|
3
|
+
export type { Logger, LogLevel } from "./internal/utils/log.mjs";
|
|
4
|
+
import * as Opts from "./internal/request-options.mjs";
|
|
5
|
+
import * as Errors from "./core/error.mjs";
|
|
6
|
+
import * as Pagination from "./core/pagination.mjs";
|
|
7
|
+
import { type BodyCursorPageParams, BodyCursorPageResponse, type CursorPageParams, CursorPageResponse, type CursorPageWithoutLimitParams, CursorPageWithoutLimitResponse } from "./core/pagination.mjs";
|
|
8
|
+
import * as Uploads from "./core/uploads.mjs";
|
|
9
|
+
import * as API from "./resources/index.mjs";
|
|
10
|
+
import { APIPromise } from "./core/api-promise.mjs";
|
|
11
|
+
import { V1 } from "./resources/v1/v1.mjs";
|
|
12
|
+
import { V2 } from "./resources/v2/v2.mjs";
|
|
13
|
+
import { type Fetch } from "./internal/builtin-types.mjs";
|
|
14
|
+
import { HeadersLike, NullableHeaders } from "./internal/headers.mjs";
|
|
15
|
+
import { FinalRequestOptions, RequestOptions } from "./internal/request-options.mjs";
|
|
16
|
+
import { type LogLevel, type Logger } from "./internal/utils/log.mjs";
|
|
17
|
+
export interface ClientOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Defaults to process.env['METRONOME_BEARER_TOKEN'].
|
|
20
|
+
*/
|
|
21
|
+
bearerToken?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Defaults to process.env['METRONOME_WEBHOOK_SECRET'].
|
|
24
|
+
*/
|
|
25
|
+
webhookSecret?: string | null | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
28
|
+
*
|
|
29
|
+
* Defaults to process.env['METRONOME_BASE_URL'].
|
|
30
|
+
*/
|
|
31
|
+
baseURL?: string | null | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The maximum amount of time (in milliseconds) that the client should wait for a response
|
|
34
|
+
* from the server before timing out a single request.
|
|
35
|
+
*
|
|
36
|
+
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
37
|
+
* much longer than this timeout before the promise succeeds or fails.
|
|
38
|
+
*
|
|
39
|
+
* @unit milliseconds
|
|
40
|
+
*/
|
|
41
|
+
timeout?: number | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Additional `RequestInit` options to be passed to `fetch` calls.
|
|
44
|
+
* Properties will be overridden by per-request `fetchOptions`.
|
|
45
|
+
*/
|
|
46
|
+
fetchOptions?: MergedRequestInit | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Specify a custom `fetch` function implementation.
|
|
49
|
+
*
|
|
50
|
+
* If not provided, we expect that `fetch` is defined globally.
|
|
51
|
+
*/
|
|
52
|
+
fetch?: Fetch | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* The maximum number of times that the client will retry a request in case of a
|
|
55
|
+
* temporary failure, like a network error or a 5XX error from the server.
|
|
56
|
+
*
|
|
57
|
+
* @default 2
|
|
58
|
+
*/
|
|
59
|
+
maxRetries?: number | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Default headers to include with every request to the API.
|
|
62
|
+
*
|
|
63
|
+
* These can be removed in individual requests by explicitly setting the
|
|
64
|
+
* header to `null` in request options.
|
|
65
|
+
*/
|
|
66
|
+
defaultHeaders?: HeadersLike | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Default query parameters to include with every request to the API.
|
|
69
|
+
*
|
|
70
|
+
* These can be removed in individual requests by explicitly setting the
|
|
71
|
+
* param to `undefined` in request options.
|
|
72
|
+
*/
|
|
73
|
+
defaultQuery?: Record<string, string | undefined> | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Set the log level.
|
|
76
|
+
*
|
|
77
|
+
* Defaults to process.env['METRONOME_LOG'] or 'warn' if it isn't set.
|
|
78
|
+
*/
|
|
79
|
+
logLevel?: LogLevel | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Set the logger.
|
|
82
|
+
*
|
|
83
|
+
* Defaults to globalThis.console.
|
|
84
|
+
*/
|
|
85
|
+
logger?: Logger | undefined;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* API Client for interfacing with the Metronome API.
|
|
89
|
+
*/
|
|
90
|
+
export declare class Metronome {
|
|
91
|
+
#private;
|
|
92
|
+
bearerToken: string;
|
|
93
|
+
webhookSecret: string | null;
|
|
94
|
+
baseURL: string;
|
|
95
|
+
maxRetries: number;
|
|
96
|
+
timeout: number;
|
|
97
|
+
logger: Logger | undefined;
|
|
98
|
+
logLevel: LogLevel | undefined;
|
|
99
|
+
fetchOptions: MergedRequestInit | undefined;
|
|
100
|
+
private fetch;
|
|
101
|
+
protected idempotencyHeader?: string;
|
|
102
|
+
private _options;
|
|
103
|
+
/**
|
|
104
|
+
* API Client for interfacing with the Metronome API.
|
|
105
|
+
*
|
|
106
|
+
* @param {string | undefined} [opts.bearerToken=process.env['METRONOME_BEARER_TOKEN'] ?? undefined]
|
|
107
|
+
* @param {string | null | undefined} [opts.webhookSecret=process.env['METRONOME_WEBHOOK_SECRET'] ?? null]
|
|
108
|
+
* @param {string} [opts.baseURL=process.env['METRONOME_BASE_URL'] ?? https://api.metronome.com] - Override the default base URL for the API.
|
|
109
|
+
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
110
|
+
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
111
|
+
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
112
|
+
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
113
|
+
* @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
114
|
+
* @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
115
|
+
*/
|
|
116
|
+
constructor({ baseURL, bearerToken, webhookSecret, ...opts }?: ClientOptions);
|
|
117
|
+
/**
|
|
118
|
+
* Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
119
|
+
*/
|
|
120
|
+
withOptions(options: Partial<ClientOptions>): this;
|
|
121
|
+
protected defaultQuery(): Record<string, string | undefined> | undefined;
|
|
122
|
+
protected validateHeaders({ values, nulls }: NullableHeaders): void;
|
|
123
|
+
protected authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
|
|
124
|
+
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
125
|
+
private getUserAgent;
|
|
126
|
+
protected defaultIdempotencyKey(): string;
|
|
127
|
+
protected makeStatusError(status: number, error: Object, message: string | undefined, headers: Headers): Errors.APIError;
|
|
128
|
+
buildURL(path: string, query: Record<string, unknown> | null | undefined, defaultBaseURL?: string | undefined): string;
|
|
129
|
+
/**
|
|
130
|
+
* Used as a callback for mutating the given `FinalRequestOptions` object.
|
|
131
|
+
*/
|
|
132
|
+
protected prepareOptions(options: FinalRequestOptions): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* Used as a callback for mutating the given `RequestInit` object.
|
|
135
|
+
*
|
|
136
|
+
* This is useful for cases where you want to add certain headers based off of
|
|
137
|
+
* the request properties, e.g. `method` or `url`.
|
|
138
|
+
*/
|
|
139
|
+
protected prepareRequest(request: RequestInit, { url, options }: {
|
|
140
|
+
url: string;
|
|
141
|
+
options: FinalRequestOptions;
|
|
142
|
+
}): Promise<void>;
|
|
143
|
+
get<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
144
|
+
post<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
145
|
+
patch<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
146
|
+
put<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
147
|
+
delete<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
148
|
+
private methodRequest;
|
|
149
|
+
request<Rsp>(options: PromiseOrValue<FinalRequestOptions>, remainingRetries?: number | null): APIPromise<Rsp>;
|
|
150
|
+
private makeRequest;
|
|
151
|
+
getAPIList<Item, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(path: string, Page: new (...args: any[]) => PageClass, opts?: RequestOptions): Pagination.PagePromise<PageClass, Item>;
|
|
152
|
+
requestAPIList<Item = unknown, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(Page: new (...args: ConstructorParameters<typeof Pagination.AbstractPage>) => PageClass, options: FinalRequestOptions): Pagination.PagePromise<PageClass, Item>;
|
|
153
|
+
fetchWithTimeout(url: RequestInfo, init: RequestInit | undefined, ms: number, controller: AbortController): Promise<Response>;
|
|
154
|
+
private shouldRetry;
|
|
155
|
+
private retryRequest;
|
|
156
|
+
private calculateDefaultRetryTimeoutMillis;
|
|
157
|
+
buildRequest(inputOptions: FinalRequestOptions, { retryCount }?: {
|
|
158
|
+
retryCount?: number;
|
|
159
|
+
}): Promise<{
|
|
160
|
+
req: FinalizedRequestInit;
|
|
161
|
+
url: string;
|
|
162
|
+
timeout: number;
|
|
163
|
+
}>;
|
|
164
|
+
private buildHeaders;
|
|
165
|
+
private buildBody;
|
|
166
|
+
static Metronome: typeof Metronome;
|
|
167
|
+
static DEFAULT_TIMEOUT: number;
|
|
168
|
+
static MetronomeError: typeof Errors.MetronomeError;
|
|
169
|
+
static APIError: typeof Errors.APIError;
|
|
170
|
+
static APIConnectionError: typeof Errors.APIConnectionError;
|
|
171
|
+
static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
|
|
172
|
+
static APIUserAbortError: typeof Errors.APIUserAbortError;
|
|
173
|
+
static NotFoundError: typeof Errors.NotFoundError;
|
|
174
|
+
static ConflictError: typeof Errors.ConflictError;
|
|
175
|
+
static RateLimitError: typeof Errors.RateLimitError;
|
|
176
|
+
static BadRequestError: typeof Errors.BadRequestError;
|
|
177
|
+
static AuthenticationError: typeof Errors.AuthenticationError;
|
|
178
|
+
static InternalServerError: typeof Errors.InternalServerError;
|
|
179
|
+
static PermissionDeniedError: typeof Errors.PermissionDeniedError;
|
|
180
|
+
static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
181
|
+
static toFile: typeof Uploads.toFile;
|
|
182
|
+
webhooks: API.Webhooks;
|
|
183
|
+
v2: API.V2;
|
|
184
|
+
v1: API.V1;
|
|
185
|
+
}
|
|
186
|
+
export declare namespace Metronome {
|
|
187
|
+
export type RequestOptions = Opts.RequestOptions;
|
|
188
|
+
export import CursorPage = Pagination.CursorPage;
|
|
189
|
+
export { type CursorPageParams as CursorPageParams, type CursorPageResponse as CursorPageResponse };
|
|
190
|
+
export import BodyCursorPage = Pagination.BodyCursorPage;
|
|
191
|
+
export { type BodyCursorPageParams as BodyCursorPageParams, type BodyCursorPageResponse as BodyCursorPageResponse, };
|
|
192
|
+
export import CursorPageWithoutLimit = Pagination.CursorPageWithoutLimit;
|
|
193
|
+
export { type CursorPageWithoutLimitParams as CursorPageWithoutLimitParams, type CursorPageWithoutLimitResponse as CursorPageWithoutLimitResponse, };
|
|
194
|
+
export { V2 as V2 };
|
|
195
|
+
export { V1 as V1 };
|
|
196
|
+
export type BaseThresholdCommit = API.BaseThresholdCommit;
|
|
197
|
+
export type BaseUsageFilter = API.BaseUsageFilter;
|
|
198
|
+
export type Commit = API.Commit;
|
|
199
|
+
export type CommitHierarchyConfiguration = API.CommitHierarchyConfiguration;
|
|
200
|
+
export type CommitRate = API.CommitRate;
|
|
201
|
+
export type CommitSpecifier = API.CommitSpecifier;
|
|
202
|
+
export type CommitSpecifierInput = API.CommitSpecifierInput;
|
|
203
|
+
export type Contract = API.Contract;
|
|
204
|
+
export type ContractV2 = API.ContractV2;
|
|
205
|
+
export type ContractWithoutAmendments = API.ContractWithoutAmendments;
|
|
206
|
+
export type Credit = API.Credit;
|
|
207
|
+
export type CreditTypeData = API.CreditTypeData;
|
|
208
|
+
export type Discount = API.Discount;
|
|
209
|
+
export type EventTypeFilter = API.EventTypeFilter;
|
|
210
|
+
export type HierarchyConfiguration = API.HierarchyConfiguration;
|
|
211
|
+
export type ID = API.ID;
|
|
212
|
+
export type Override = API.Override;
|
|
213
|
+
export type OverrideTier = API.OverrideTier;
|
|
214
|
+
export type OverwriteRate = API.OverwriteRate;
|
|
215
|
+
export type PaymentGateConfig = API.PaymentGateConfig;
|
|
216
|
+
export type PaymentGateConfigV2 = API.PaymentGateConfigV2;
|
|
217
|
+
export type PrepaidBalanceThresholdConfiguration = API.PrepaidBalanceThresholdConfiguration;
|
|
218
|
+
export type PrepaidBalanceThresholdConfigurationV2 = API.PrepaidBalanceThresholdConfigurationV2;
|
|
219
|
+
export type PropertyFilter = API.PropertyFilter;
|
|
220
|
+
export type ProService = API.ProService;
|
|
221
|
+
export type Rate = API.Rate;
|
|
222
|
+
export type RecurringCommitSubscriptionConfig = API.RecurringCommitSubscriptionConfig;
|
|
223
|
+
export type ScheduledCharge = API.ScheduledCharge;
|
|
224
|
+
export type ScheduleDuration = API.ScheduleDuration;
|
|
225
|
+
export type SchedulePointInTime = API.SchedulePointInTime;
|
|
226
|
+
export type SpendThresholdConfiguration = API.SpendThresholdConfiguration;
|
|
227
|
+
export type SpendThresholdConfigurationV2 = API.SpendThresholdConfigurationV2;
|
|
228
|
+
export type Subscription = API.Subscription;
|
|
229
|
+
export type Tier = API.Tier;
|
|
230
|
+
export type UpdateBaseThresholdCommit = API.UpdateBaseThresholdCommit;
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=client.d.mts.map
|
package/client.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAGT,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAEL,KAAK,oBAAoB,EACzB,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,KAAK,4BAA4B,EACjC,8BAA8B,EAC/B;OACM,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EAAE,EAAE,EAAE;OACN,EAAE,EAAE,EAAE;OACN,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,WAAW,EAAE,eAAe,EAAgB;OAC9C,EAAE,mBAAmB,EAAE,cAAc,EAAE;OAEvC,EACL,KAAK,QAAQ,EACb,KAAK,MAAM,EA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mB,CAAC;IAC1D,MAAM,MAAM,2BAA2B,GAAG,GAAG,CAAC,2BAA2B,CAAC;IAC1E,MAAM,MAAM,6BAA6B,GAAG,GAAG,CAAC,6BAA6B,CAAC;IAC9E,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IAC5C,MAAM,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IAC5B,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAC,yBAAyB,CAAC;CACvE"}
|
package/client.d.ts
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import type { RequestInit, RequestInfo } from "./internal/builtin-types.js";
|
|
2
|
+
import type { PromiseOrValue, MergedRequestInit, FinalizedRequestInit } from "./internal/types.js";
|
|
3
|
+
export type { Logger, LogLevel } from "./internal/utils/log.js";
|
|
4
|
+
import * as Opts from "./internal/request-options.js";
|
|
5
|
+
import * as Errors from "./core/error.js";
|
|
6
|
+
import * as Pagination from "./core/pagination.js";
|
|
7
|
+
import { type BodyCursorPageParams, BodyCursorPageResponse, type CursorPageParams, CursorPageResponse, type CursorPageWithoutLimitParams, CursorPageWithoutLimitResponse } from "./core/pagination.js";
|
|
8
|
+
import * as Uploads from "./core/uploads.js";
|
|
9
|
+
import * as API from "./resources/index.js";
|
|
10
|
+
import { APIPromise } from "./core/api-promise.js";
|
|
11
|
+
import { V1 } from "./resources/v1/v1.js";
|
|
12
|
+
import { V2 } from "./resources/v2/v2.js";
|
|
13
|
+
import { type Fetch } from "./internal/builtin-types.js";
|
|
14
|
+
import { HeadersLike, NullableHeaders } from "./internal/headers.js";
|
|
15
|
+
import { FinalRequestOptions, RequestOptions } from "./internal/request-options.js";
|
|
16
|
+
import { type LogLevel, type Logger } from "./internal/utils/log.js";
|
|
17
|
+
export interface ClientOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Defaults to process.env['METRONOME_BEARER_TOKEN'].
|
|
20
|
+
*/
|
|
21
|
+
bearerToken?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Defaults to process.env['METRONOME_WEBHOOK_SECRET'].
|
|
24
|
+
*/
|
|
25
|
+
webhookSecret?: string | null | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
28
|
+
*
|
|
29
|
+
* Defaults to process.env['METRONOME_BASE_URL'].
|
|
30
|
+
*/
|
|
31
|
+
baseURL?: string | null | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The maximum amount of time (in milliseconds) that the client should wait for a response
|
|
34
|
+
* from the server before timing out a single request.
|
|
35
|
+
*
|
|
36
|
+
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
37
|
+
* much longer than this timeout before the promise succeeds or fails.
|
|
38
|
+
*
|
|
39
|
+
* @unit milliseconds
|
|
40
|
+
*/
|
|
41
|
+
timeout?: number | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Additional `RequestInit` options to be passed to `fetch` calls.
|
|
44
|
+
* Properties will be overridden by per-request `fetchOptions`.
|
|
45
|
+
*/
|
|
46
|
+
fetchOptions?: MergedRequestInit | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Specify a custom `fetch` function implementation.
|
|
49
|
+
*
|
|
50
|
+
* If not provided, we expect that `fetch` is defined globally.
|
|
51
|
+
*/
|
|
52
|
+
fetch?: Fetch | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* The maximum number of times that the client will retry a request in case of a
|
|
55
|
+
* temporary failure, like a network error or a 5XX error from the server.
|
|
56
|
+
*
|
|
57
|
+
* @default 2
|
|
58
|
+
*/
|
|
59
|
+
maxRetries?: number | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Default headers to include with every request to the API.
|
|
62
|
+
*
|
|
63
|
+
* These can be removed in individual requests by explicitly setting the
|
|
64
|
+
* header to `null` in request options.
|
|
65
|
+
*/
|
|
66
|
+
defaultHeaders?: HeadersLike | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Default query parameters to include with every request to the API.
|
|
69
|
+
*
|
|
70
|
+
* These can be removed in individual requests by explicitly setting the
|
|
71
|
+
* param to `undefined` in request options.
|
|
72
|
+
*/
|
|
73
|
+
defaultQuery?: Record<string, string | undefined> | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Set the log level.
|
|
76
|
+
*
|
|
77
|
+
* Defaults to process.env['METRONOME_LOG'] or 'warn' if it isn't set.
|
|
78
|
+
*/
|
|
79
|
+
logLevel?: LogLevel | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Set the logger.
|
|
82
|
+
*
|
|
83
|
+
* Defaults to globalThis.console.
|
|
84
|
+
*/
|
|
85
|
+
logger?: Logger | undefined;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* API Client for interfacing with the Metronome API.
|
|
89
|
+
*/
|
|
90
|
+
export declare class Metronome {
|
|
91
|
+
#private;
|
|
92
|
+
bearerToken: string;
|
|
93
|
+
webhookSecret: string | null;
|
|
94
|
+
baseURL: string;
|
|
95
|
+
maxRetries: number;
|
|
96
|
+
timeout: number;
|
|
97
|
+
logger: Logger | undefined;
|
|
98
|
+
logLevel: LogLevel | undefined;
|
|
99
|
+
fetchOptions: MergedRequestInit | undefined;
|
|
100
|
+
private fetch;
|
|
101
|
+
protected idempotencyHeader?: string;
|
|
102
|
+
private _options;
|
|
103
|
+
/**
|
|
104
|
+
* API Client for interfacing with the Metronome API.
|
|
105
|
+
*
|
|
106
|
+
* @param {string | undefined} [opts.bearerToken=process.env['METRONOME_BEARER_TOKEN'] ?? undefined]
|
|
107
|
+
* @param {string | null | undefined} [opts.webhookSecret=process.env['METRONOME_WEBHOOK_SECRET'] ?? null]
|
|
108
|
+
* @param {string} [opts.baseURL=process.env['METRONOME_BASE_URL'] ?? https://api.metronome.com] - Override the default base URL for the API.
|
|
109
|
+
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
110
|
+
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
111
|
+
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
112
|
+
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
113
|
+
* @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
114
|
+
* @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
115
|
+
*/
|
|
116
|
+
constructor({ baseURL, bearerToken, webhookSecret, ...opts }?: ClientOptions);
|
|
117
|
+
/**
|
|
118
|
+
* Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
119
|
+
*/
|
|
120
|
+
withOptions(options: Partial<ClientOptions>): this;
|
|
121
|
+
protected defaultQuery(): Record<string, string | undefined> | undefined;
|
|
122
|
+
protected validateHeaders({ values, nulls }: NullableHeaders): void;
|
|
123
|
+
protected authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
|
|
124
|
+
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
125
|
+
private getUserAgent;
|
|
126
|
+
protected defaultIdempotencyKey(): string;
|
|
127
|
+
protected makeStatusError(status: number, error: Object, message: string | undefined, headers: Headers): Errors.APIError;
|
|
128
|
+
buildURL(path: string, query: Record<string, unknown> | null | undefined, defaultBaseURL?: string | undefined): string;
|
|
129
|
+
/**
|
|
130
|
+
* Used as a callback for mutating the given `FinalRequestOptions` object.
|
|
131
|
+
*/
|
|
132
|
+
protected prepareOptions(options: FinalRequestOptions): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* Used as a callback for mutating the given `RequestInit` object.
|
|
135
|
+
*
|
|
136
|
+
* This is useful for cases where you want to add certain headers based off of
|
|
137
|
+
* the request properties, e.g. `method` or `url`.
|
|
138
|
+
*/
|
|
139
|
+
protected prepareRequest(request: RequestInit, { url, options }: {
|
|
140
|
+
url: string;
|
|
141
|
+
options: FinalRequestOptions;
|
|
142
|
+
}): Promise<void>;
|
|
143
|
+
get<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
144
|
+
post<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
145
|
+
patch<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
146
|
+
put<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
147
|
+
delete<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
148
|
+
private methodRequest;
|
|
149
|
+
request<Rsp>(options: PromiseOrValue<FinalRequestOptions>, remainingRetries?: number | null): APIPromise<Rsp>;
|
|
150
|
+
private makeRequest;
|
|
151
|
+
getAPIList<Item, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(path: string, Page: new (...args: any[]) => PageClass, opts?: RequestOptions): Pagination.PagePromise<PageClass, Item>;
|
|
152
|
+
requestAPIList<Item = unknown, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(Page: new (...args: ConstructorParameters<typeof Pagination.AbstractPage>) => PageClass, options: FinalRequestOptions): Pagination.PagePromise<PageClass, Item>;
|
|
153
|
+
fetchWithTimeout(url: RequestInfo, init: RequestInit | undefined, ms: number, controller: AbortController): Promise<Response>;
|
|
154
|
+
private shouldRetry;
|
|
155
|
+
private retryRequest;
|
|
156
|
+
private calculateDefaultRetryTimeoutMillis;
|
|
157
|
+
buildRequest(inputOptions: FinalRequestOptions, { retryCount }?: {
|
|
158
|
+
retryCount?: number;
|
|
159
|
+
}): Promise<{
|
|
160
|
+
req: FinalizedRequestInit;
|
|
161
|
+
url: string;
|
|
162
|
+
timeout: number;
|
|
163
|
+
}>;
|
|
164
|
+
private buildHeaders;
|
|
165
|
+
private buildBody;
|
|
166
|
+
static Metronome: typeof Metronome;
|
|
167
|
+
static DEFAULT_TIMEOUT: number;
|
|
168
|
+
static MetronomeError: typeof Errors.MetronomeError;
|
|
169
|
+
static APIError: typeof Errors.APIError;
|
|
170
|
+
static APIConnectionError: typeof Errors.APIConnectionError;
|
|
171
|
+
static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
|
|
172
|
+
static APIUserAbortError: typeof Errors.APIUserAbortError;
|
|
173
|
+
static NotFoundError: typeof Errors.NotFoundError;
|
|
174
|
+
static ConflictError: typeof Errors.ConflictError;
|
|
175
|
+
static RateLimitError: typeof Errors.RateLimitError;
|
|
176
|
+
static BadRequestError: typeof Errors.BadRequestError;
|
|
177
|
+
static AuthenticationError: typeof Errors.AuthenticationError;
|
|
178
|
+
static InternalServerError: typeof Errors.InternalServerError;
|
|
179
|
+
static PermissionDeniedError: typeof Errors.PermissionDeniedError;
|
|
180
|
+
static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
181
|
+
static toFile: typeof Uploads.toFile;
|
|
182
|
+
webhooks: API.Webhooks;
|
|
183
|
+
v2: API.V2;
|
|
184
|
+
v1: API.V1;
|
|
185
|
+
}
|
|
186
|
+
export declare namespace Metronome {
|
|
187
|
+
export type RequestOptions = Opts.RequestOptions;
|
|
188
|
+
export import CursorPage = Pagination.CursorPage;
|
|
189
|
+
export { type CursorPageParams as CursorPageParams, type CursorPageResponse as CursorPageResponse };
|
|
190
|
+
export import BodyCursorPage = Pagination.BodyCursorPage;
|
|
191
|
+
export { type BodyCursorPageParams as BodyCursorPageParams, type BodyCursorPageResponse as BodyCursorPageResponse, };
|
|
192
|
+
export import CursorPageWithoutLimit = Pagination.CursorPageWithoutLimit;
|
|
193
|
+
export { type CursorPageWithoutLimitParams as CursorPageWithoutLimitParams, type CursorPageWithoutLimitResponse as CursorPageWithoutLimitResponse, };
|
|
194
|
+
export { V2 as V2 };
|
|
195
|
+
export { V1 as V1 };
|
|
196
|
+
export type BaseThresholdCommit = API.BaseThresholdCommit;
|
|
197
|
+
export type BaseUsageFilter = API.BaseUsageFilter;
|
|
198
|
+
export type Commit = API.Commit;
|
|
199
|
+
export type CommitHierarchyConfiguration = API.CommitHierarchyConfiguration;
|
|
200
|
+
export type CommitRate = API.CommitRate;
|
|
201
|
+
export type CommitSpecifier = API.CommitSpecifier;
|
|
202
|
+
export type CommitSpecifierInput = API.CommitSpecifierInput;
|
|
203
|
+
export type Contract = API.Contract;
|
|
204
|
+
export type ContractV2 = API.ContractV2;
|
|
205
|
+
export type ContractWithoutAmendments = API.ContractWithoutAmendments;
|
|
206
|
+
export type Credit = API.Credit;
|
|
207
|
+
export type CreditTypeData = API.CreditTypeData;
|
|
208
|
+
export type Discount = API.Discount;
|
|
209
|
+
export type EventTypeFilter = API.EventTypeFilter;
|
|
210
|
+
export type HierarchyConfiguration = API.HierarchyConfiguration;
|
|
211
|
+
export type ID = API.ID;
|
|
212
|
+
export type Override = API.Override;
|
|
213
|
+
export type OverrideTier = API.OverrideTier;
|
|
214
|
+
export type OverwriteRate = API.OverwriteRate;
|
|
215
|
+
export type PaymentGateConfig = API.PaymentGateConfig;
|
|
216
|
+
export type PaymentGateConfigV2 = API.PaymentGateConfigV2;
|
|
217
|
+
export type PrepaidBalanceThresholdConfiguration = API.PrepaidBalanceThresholdConfiguration;
|
|
218
|
+
export type PrepaidBalanceThresholdConfigurationV2 = API.PrepaidBalanceThresholdConfigurationV2;
|
|
219
|
+
export type PropertyFilter = API.PropertyFilter;
|
|
220
|
+
export type ProService = API.ProService;
|
|
221
|
+
export type Rate = API.Rate;
|
|
222
|
+
export type RecurringCommitSubscriptionConfig = API.RecurringCommitSubscriptionConfig;
|
|
223
|
+
export type ScheduledCharge = API.ScheduledCharge;
|
|
224
|
+
export type ScheduleDuration = API.ScheduleDuration;
|
|
225
|
+
export type SchedulePointInTime = API.SchedulePointInTime;
|
|
226
|
+
export type SpendThresholdConfiguration = API.SpendThresholdConfiguration;
|
|
227
|
+
export type SpendThresholdConfigurationV2 = API.SpendThresholdConfigurationV2;
|
|
228
|
+
export type Subscription = API.Subscription;
|
|
229
|
+
export type Tier = API.Tier;
|
|
230
|
+
export type UpdateBaseThresholdCommit = API.UpdateBaseThresholdCommit;
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=client.d.ts.map
|
package/client.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAGT,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAEL,KAAK,oBAAoB,EACzB,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,KAAK,4BAA4B,EACjC,8BAA8B,EAC/B;OACM,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EAAE,EAAE,EAAE;OACN,EAAE,EAAE,EAAE;OACN,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,WAAW,EAAE,eAAe,EAAgB;OAC9C,EAAE,mBAAmB,EAAE,cAAc,EAAE;OAEvC,EACL,KAAK,QAAQ,EACb,KAAK,MAAM,EAIZ;AAGD,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAE1C;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEpC;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B;;;OAGG;IACH,YAAY,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAE7C;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IAE1B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,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