@metronome/sdk 0.1.0-beta.8 → 0.1.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 +227 -0
- package/README.md +37 -52
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts +19 -5
- package/core.d.ts.map +1 -1
- package/core.js +25 -15
- package/core.js.map +1 -1
- package/core.mjs +26 -16
- package/core.mjs.map +1 -1
- package/index.d.mts +10 -42
- package/index.d.ts +10 -42
- package/index.d.ts.map +1 -1
- package/index.js +14 -55
- package/index.js.map +1 -1
- package/index.mjs +14 -55
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.js +3 -0
- package/pagination.js.map +1 -1
- package/pagination.mjs +3 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/index.d.ts +2 -13
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -38
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -13
- package/resources/index.mjs.map +1 -1
- package/resources/shared.d.ts +512 -24
- package/resources/shared.d.ts.map +1 -1
- package/resources/{alerts.d.ts → v1/alerts.d.ts} +29 -5
- package/resources/v1/alerts.d.ts.map +1 -0
- package/resources/v1/alerts.js +40 -0
- package/resources/v1/alerts.js.map +1 -0
- package/resources/v1/alerts.mjs +36 -0
- package/resources/v1/alerts.mjs.map +1 -0
- package/resources/{audit-logs.d.ts → v1/audit-logs.d.ts} +11 -3
- package/resources/v1/audit-logs.d.ts.map +1 -0
- package/resources/{audit-logs.js → v1/audit-logs.js} +4 -4
- package/resources/v1/audit-logs.js.map +1 -0
- package/resources/{audit-logs.mjs → v1/audit-logs.mjs} +4 -4
- package/resources/v1/audit-logs.mjs.map +1 -0
- package/resources/{billable-metrics.d.ts → v1/billable-metrics.d.ts} +62 -7
- package/resources/v1/billable-metrics.d.ts.map +1 -0
- package/resources/v1/billable-metrics.js +84 -0
- package/resources/v1/billable-metrics.js.map +1 -0
- package/resources/v1/billable-metrics.mjs +79 -0
- package/resources/v1/billable-metrics.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/contracts.d.ts +1618 -62
- package/resources/v1/contracts/contracts.d.ts.map +1 -0
- package/resources/v1/contracts/contracts.js +312 -0
- package/resources/v1/contracts/contracts.js.map +1 -0
- package/resources/v1/contracts/contracts.mjs +285 -0
- package/resources/v1/contracts/contracts.mjs.map +1 -0
- package/resources/v1/contracts/index.d.ts +5 -0
- package/resources/v1/contracts/index.d.ts.map +1 -0
- package/resources/v1/contracts/index.js.map +1 -0
- package/resources/v1/contracts/index.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/named-schedules.d.ts +23 -2
- package/resources/v1/contracts/named-schedules.d.ts.map +1 -0
- package/resources/v1/contracts/named-schedules.js +48 -0
- package/resources/v1/contracts/named-schedules.js.map +1 -0
- package/resources/v1/contracts/named-schedules.mjs +44 -0
- package/resources/v1/contracts/named-schedules.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/products.d.ts +55 -7
- package/resources/v1/contracts/products.d.ts.map +1 -0
- package/resources/v1/contracts/products.js +84 -0
- package/resources/v1/contracts/products.js.map +1 -0
- package/resources/v1/contracts/products.mjs +79 -0
- package/resources/v1/contracts/products.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/rate-cards/index.d.ts +1 -1
- package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -0
- package/resources/v1/contracts/rate-cards/index.js.map +1 -0
- package/resources/v1/contracts/rate-cards/index.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/rate-cards/named-schedules.d.ts +27 -2
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -0
- package/resources/v1/contracts/rate-cards/named-schedules.js +52 -0
- package/resources/v1/contracts/rate-cards/named-schedules.js.map +1 -0
- package/resources/v1/contracts/rate-cards/named-schedules.mjs +48 -0
- package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/rate-cards/product-orders.d.ts +33 -3
- package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -0
- package/resources/v1/contracts/rate-cards/product-orders.js +54 -0
- package/resources/v1/contracts/rate-cards/product-orders.js.map +1 -0
- package/resources/v1/contracts/rate-cards/product-orders.mjs +50 -0
- package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/rate-cards/rate-cards.d.ts +118 -14
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -0
- package/resources/{contracts → v1/contracts}/rate-cards/rate-cards.js +83 -12
- package/resources/v1/contracts/rate-cards/rate-cards.js.map +1 -0
- package/resources/v1/contracts/rate-cards/rate-cards.mjs +140 -0
- package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -0
- package/resources/{contracts → v1/contracts}/rate-cards/rates.d.ts +118 -14
- package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -0
- package/resources/v1/contracts/rate-cards/rates.js +106 -0
- package/resources/v1/contracts/rate-cards/rates.js.map +1 -0
- package/resources/v1/contracts/rate-cards/rates.mjs +101 -0
- package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -0
- package/resources/v1/contracts/rate-cards.d.ts +2 -0
- package/resources/v1/contracts/rate-cards.d.ts.map +1 -0
- package/resources/v1/contracts/rate-cards.js +19 -0
- package/resources/v1/contracts/rate-cards.js.map +1 -0
- package/resources/v1/contracts/rate-cards.mjs +3 -0
- package/resources/v1/contracts/rate-cards.mjs.map +1 -0
- package/resources/v1/contracts.d.ts +2 -0
- package/resources/v1/contracts.d.ts.map +1 -0
- package/resources/v1/contracts.js +19 -0
- package/resources/v1/contracts.js.map +1 -0
- package/resources/v1/contracts.mjs +3 -0
- package/resources/v1/contracts.mjs.map +1 -0
- package/resources/{credit-grants.d.ts → v1/credit-grants.d.ts} +81 -6
- package/resources/v1/credit-grants.d.ts.map +1 -0
- package/resources/v1/credit-grants.js +89 -0
- package/resources/v1/credit-grants.js.map +1 -0
- package/resources/v1/credit-grants.mjs +84 -0
- package/resources/v1/credit-grants.mjs.map +1 -0
- package/resources/{custom-fields.d.ts → v1/custom-fields.d.ts} +53 -9
- package/resources/v1/custom-fields.d.ts.map +1 -0
- package/resources/{custom-fields.js → v1/custom-fields.js} +42 -7
- package/resources/v1/custom-fields.js.map +1 -0
- package/resources/{custom-fields.mjs → v1/custom-fields.mjs} +42 -7
- package/resources/v1/custom-fields.mjs.map +1 -0
- package/resources/{customers → v1/customers}/alerts.d.ts +31 -3
- package/resources/v1/customers/alerts.d.ts.map +1 -0
- package/resources/v1/customers/alerts.js +56 -0
- package/resources/v1/customers/alerts.js.map +1 -0
- package/resources/v1/customers/alerts.mjs +52 -0
- package/resources/v1/customers/alerts.mjs.map +1 -0
- package/resources/{customers → v1/customers}/billing-config.d.ts +33 -2
- package/resources/v1/customers/billing-config.d.ts.map +1 -0
- package/resources/v1/customers/billing-config.js +65 -0
- package/resources/v1/customers/billing-config.js.map +1 -0
- package/resources/v1/customers/billing-config.mjs +61 -0
- package/resources/v1/customers/billing-config.mjs.map +1 -0
- package/resources/{customers → v1/customers}/commits.d.ts +97 -10
- package/resources/v1/customers/commits.d.ts.map +1 -0
- package/resources/v1/customers/commits.js +82 -0
- package/resources/v1/customers/commits.js.map +1 -0
- package/resources/v1/customers/commits.mjs +78 -0
- package/resources/v1/customers/commits.mjs.map +1 -0
- package/resources/{customers → v1/customers}/credits.d.ts +76 -6
- package/resources/v1/customers/credits.d.ts.map +1 -0
- package/resources/v1/customers/credits.js +67 -0
- package/resources/v1/customers/credits.js.map +1 -0
- package/resources/v1/customers/credits.mjs +63 -0
- package/resources/v1/customers/credits.mjs.map +1 -0
- package/resources/{customers → v1/customers}/customers.d.ts +197 -14
- package/resources/v1/customers/customers.d.ts.map +1 -0
- package/resources/{customers → v1/customers}/customers.js +118 -16
- package/resources/v1/customers/customers.js.map +1 -0
- package/resources/v1/customers/customers.mjs +228 -0
- package/resources/v1/customers/customers.mjs.map +1 -0
- package/resources/{customers → v1/customers}/index.d.ts +1 -1
- package/resources/v1/customers/index.d.ts.map +1 -0
- package/resources/v1/customers/index.js.map +1 -0
- package/resources/v1/customers/index.mjs.map +1 -0
- package/resources/{customers → v1/customers}/invoices.d.ts +152 -57
- package/resources/v1/customers/invoices.d.ts.map +1 -0
- package/resources/v1/customers/invoices.js +103 -0
- package/resources/v1/customers/invoices.js.map +1 -0
- package/resources/v1/customers/invoices.mjs +97 -0
- package/resources/v1/customers/invoices.mjs.map +1 -0
- package/resources/{customers → v1/customers}/named-schedules.d.ts +23 -2
- package/resources/v1/customers/named-schedules.d.ts.map +1 -0
- package/resources/v1/customers/named-schedules.js +48 -0
- package/resources/v1/customers/named-schedules.js.map +1 -0
- package/resources/v1/customers/named-schedules.mjs +44 -0
- package/resources/v1/customers/named-schedules.mjs.map +1 -0
- package/resources/{customers → v1/customers}/plans.d.ts +50 -5
- package/resources/v1/customers/plans.d.ts.map +1 -0
- package/resources/v1/customers/plans.js +99 -0
- package/resources/v1/customers/plans.js.map +1 -0
- package/resources/v1/customers/plans.mjs +93 -0
- package/resources/v1/customers/plans.mjs.map +1 -0
- package/resources/v1/customers.d.ts +2 -0
- package/resources/v1/customers.d.ts.map +1 -0
- package/resources/v1/customers.js +19 -0
- package/resources/v1/customers.js.map +1 -0
- package/resources/v1/customers.mjs +3 -0
- package/resources/v1/customers.mjs.map +1 -0
- package/resources/{dashboards.d.ts → v1/dashboards.d.ts} +32 -4
- package/resources/v1/dashboards.d.ts.map +1 -0
- package/resources/v1/dashboards.js +43 -0
- package/resources/v1/dashboards.js.map +1 -0
- package/resources/v1/dashboards.mjs +39 -0
- package/resources/v1/dashboards.mjs.map +1 -0
- package/resources/v1/index.d.ts +15 -0
- package/resources/v1/index.d.ts.map +1 -0
- package/resources/v1/index.js +44 -0
- package/resources/v1/index.js.map +1 -0
- package/resources/v1/index.mjs +16 -0
- package/resources/v1/index.mjs.map +1 -0
- package/resources/{invoices.d.ts → v1/invoices.d.ts} +16 -2
- package/resources/v1/invoices.d.ts.map +1 -0
- package/resources/v1/invoices.js +35 -0
- package/resources/v1/invoices.js.map +1 -0
- package/resources/v1/invoices.mjs +31 -0
- package/resources/v1/invoices.mjs.map +1 -0
- package/resources/{plans.d.ts → v1/plans.d.ts} +51 -8
- package/resources/v1/plans.d.ts.map +1 -0
- package/resources/{plans.js → v1/plans.js} +34 -7
- package/resources/v1/plans.js.map +1 -0
- package/resources/v1/plans.mjs +74 -0
- package/resources/v1/plans.mjs.map +1 -0
- package/resources/{pricing-units.d.ts → v1/pricing-units.d.ts} +11 -3
- package/resources/v1/pricing-units.d.ts.map +1 -0
- package/resources/{pricing-units.js → v1/pricing-units.js} +4 -4
- package/resources/v1/pricing-units.js.map +1 -0
- package/resources/{pricing-units.mjs → v1/pricing-units.mjs} +4 -4
- package/resources/v1/pricing-units.mjs.map +1 -0
- package/resources/{services.d.ts → v1/services.d.ts} +7 -2
- package/resources/v1/services.d.ts.map +1 -0
- package/resources/{services.js → v1/services.js} +7 -2
- package/resources/v1/services.js.map +1 -0
- package/resources/{services.mjs → v1/services.mjs} +7 -2
- package/resources/v1/services.mjs.map +1 -0
- package/resources/v1/usage.d.ts +325 -0
- package/resources/v1/usage.d.ts.map +1 -0
- package/resources/v1/usage.js +92 -0
- package/resources/v1/usage.js.map +1 -0
- package/resources/v1/usage.mjs +87 -0
- package/resources/v1/usage.mjs.map +1 -0
- package/resources/v1/v1.d.ts +58 -0
- package/resources/v1/v1.d.ts.map +1 -0
- package/resources/v1/v1.js +98 -0
- package/resources/v1/v1.js.map +1 -0
- package/resources/v1/v1.mjs +71 -0
- package/resources/v1/v1.mjs.map +1 -0
- package/resources/v1.d.ts +2 -0
- package/resources/v1.d.ts.map +1 -0
- package/resources/v1.js +19 -0
- package/resources/v1.js.map +1 -0
- package/resources/v1.mjs +3 -0
- package/resources/v1.mjs.map +1 -0
- package/resources/v2/contracts.d.ts +5955 -0
- package/resources/v2/contracts.d.ts.map +1 -0
- package/resources/v2/contracts.js +136 -0
- package/resources/v2/contracts.js.map +1 -0
- package/resources/v2/contracts.mjs +132 -0
- package/resources/v2/contracts.mjs.map +1 -0
- package/resources/v2/index.d.ts +3 -0
- package/resources/v2/index.d.ts.map +1 -0
- package/resources/v2/index.js +9 -0
- package/resources/v2/index.js.map +1 -0
- package/resources/v2/index.mjs +4 -0
- package/resources/v2/index.mjs.map +1 -0
- package/resources/v2/v2.d.ts +10 -0
- package/resources/v2/v2.d.ts.map +1 -0
- package/resources/v2/v2.js +39 -0
- package/resources/v2/v2.js.map +1 -0
- package/resources/v2/v2.mjs +12 -0
- package/resources/v2/v2.mjs.map +1 -0
- package/resources/v2.d.ts +2 -0
- package/resources/v2.d.ts.map +1 -0
- package/resources/v2.js +19 -0
- package/resources/v2.js.map +1 -0
- package/resources/v2.mjs +3 -0
- package/resources/v2.mjs.map +1 -0
- package/resources/webhooks.js +5 -5
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +5 -5
- package/resources/webhooks.mjs.map +1 -1
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +18 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/_shims/auto/runtime-bun.ts +1 -1
- package/src/_shims/auto/runtime-node.ts +1 -1
- package/src/_shims/auto/runtime.ts +1 -1
- package/src/_shims/auto/types-node.ts +1 -1
- package/src/_shims/bun-runtime.ts +2 -2
- package/src/_shims/index.d.ts +5 -3
- package/src/_shims/index.js +5 -1
- package/src/_shims/index.mjs +6 -2
- package/src/_shims/node-runtime.ts +3 -3
- package/src/_shims/registry.ts +1 -1
- package/src/_shims/web-runtime.ts +3 -3
- package/src/core.ts +49 -21
- package/src/error.ts +1 -1
- package/src/index.ts +31 -349
- package/src/internal/qs/formats.ts +1 -1
- package/src/internal/qs/index.ts +3 -3
- package/src/internal/qs/stringify.ts +3 -3
- package/src/internal/qs/utils.ts +2 -2
- package/src/pagination.ts +5 -1
- package/src/resource.ts +2 -2
- package/src/resources/index.ts +4 -144
- package/src/resources/shared.ts +587 -26
- package/src/resources/{alerts.ts → v1/alerts.ts} +31 -7
- package/src/resources/{audit-logs.ts → v1/audit-logs.ts} +13 -5
- package/src/resources/{billable-metrics.ts → v1/billable-metrics.ts} +61 -12
- package/src/resources/{contracts → v1/contracts}/contracts.ts +1848 -83
- package/src/resources/{contracts → v1/contracts}/index.ts +8 -4
- package/src/resources/{contracts → v1/contracts}/named-schedules.ts +25 -4
- package/src/resources/{contracts → v1/contracts}/products.ts +58 -14
- package/src/resources/{contracts → v1/contracts}/rate-cards/index.ts +6 -4
- package/src/resources/{contracts → v1/contracts}/rate-cards/named-schedules.ts +29 -4
- package/src/resources/{contracts → v1/contracts}/rate-cards/product-orders.ts +38 -5
- package/src/resources/{contracts → v1/contracts}/rate-cards/rate-cards.ts +137 -25
- package/src/resources/{contracts → v1/contracts}/rate-cards/rates.ts +105 -17
- package/src/resources/v1/contracts/rate-cards.ts +3 -0
- package/src/resources/v1/contracts.ts +3 -0
- package/src/resources/{credit-grants.ts → v1/credit-grants.ts} +86 -14
- package/src/resources/{custom-fields.ts → v1/custom-fields.ts} +62 -14
- package/src/resources/{customers → v1/customers}/alerts.ts +35 -6
- package/src/resources/{customers → v1/customers}/billing-config.ts +37 -5
- package/src/resources/{customers → v1/customers}/commits.ts +100 -13
- package/src/resources/{customers → v1/customers}/credits.ts +79 -9
- package/src/resources/{customers → v1/customers}/customers.ts +229 -40
- package/src/resources/{customers → v1/customers}/index.ts +10 -8
- package/src/resources/{customers → v1/customers}/invoices.ts +131 -62
- package/src/resources/{customers → v1/customers}/named-schedules.ts +25 -4
- package/src/resources/{customers → v1/customers}/plans.ts +55 -9
- package/src/resources/v1/customers.ts +3 -0
- package/src/resources/{dashboards.ts → v1/dashboards.ts} +31 -5
- package/src/resources/v1/index.ts +151 -0
- package/src/resources/{invoices.ts → v1/invoices.ts} +18 -4
- package/src/resources/{plans.ts → v1/plans.ts} +49 -14
- package/src/resources/{pricing-units.ts → v1/pricing-units.ts} +13 -5
- package/src/resources/{services.ts → v1/services.ts} +8 -3
- package/src/resources/v1/usage.ts +429 -0
- package/src/resources/v1/v1.ts +364 -0
- package/src/resources/v1.ts +3 -0
- package/src/resources/v2/contracts.ts +7677 -0
- package/src/resources/v2/index.ts +18 -0
- package/src/resources/v2/v2.ts +43 -0
- package/src/resources/v2.ts +3 -0
- package/src/resources/webhooks.ts +7 -7
- package/src/resources.ts +1 -0
- package/src/shims/node.ts +3 -3
- package/src/shims/web.ts +3 -3
- package/src/uploads.ts +4 -4
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/alerts.d.ts.map +0 -1
- package/resources/alerts.js +0 -21
- package/resources/alerts.js.map +0 -1
- package/resources/alerts.mjs +0 -17
- package/resources/alerts.mjs.map +0 -1
- package/resources/audit-logs.d.ts.map +0 -1
- package/resources/audit-logs.js.map +0 -1
- package/resources/audit-logs.mjs.map +0 -1
- package/resources/billable-metrics.d.ts.map +0 -1
- package/resources/billable-metrics.js +0 -43
- package/resources/billable-metrics.js.map +0 -1
- package/resources/billable-metrics.mjs +0 -38
- package/resources/billable-metrics.mjs.map +0 -1
- package/resources/contracts/contracts.d.ts.map +0 -1
- package/resources/contracts/contracts.js +0 -135
- package/resources/contracts/contracts.js.map +0 -1
- package/resources/contracts/contracts.mjs +0 -108
- package/resources/contracts/contracts.mjs.map +0 -1
- package/resources/contracts/index.d.ts +0 -5
- package/resources/contracts/index.d.ts.map +0 -1
- package/resources/contracts/index.js.map +0 -1
- package/resources/contracts/index.mjs.map +0 -1
- package/resources/contracts/named-schedules.d.ts.map +0 -1
- package/resources/contracts/named-schedules.js +0 -27
- package/resources/contracts/named-schedules.js.map +0 -1
- package/resources/contracts/named-schedules.mjs +0 -23
- package/resources/contracts/named-schedules.mjs.map +0 -1
- package/resources/contracts/products.d.ts.map +0 -1
- package/resources/contracts/products.js +0 -51
- package/resources/contracts/products.js.map +0 -1
- package/resources/contracts/products.mjs +0 -46
- package/resources/contracts/products.mjs.map +0 -1
- package/resources/contracts/rate-cards/index.d.ts.map +0 -1
- package/resources/contracts/rate-cards/index.js.map +0 -1
- package/resources/contracts/rate-cards/index.mjs.map +0 -1
- package/resources/contracts/rate-cards/named-schedules.d.ts.map +0 -1
- package/resources/contracts/rate-cards/named-schedules.js +0 -27
- package/resources/contracts/rate-cards/named-schedules.js.map +0 -1
- package/resources/contracts/rate-cards/named-schedules.mjs +0 -23
- package/resources/contracts/rate-cards/named-schedules.mjs.map +0 -1
- package/resources/contracts/rate-cards/product-orders.d.ts.map +0 -1
- package/resources/contracts/rate-cards/product-orders.js +0 -21
- package/resources/contracts/rate-cards/product-orders.js.map +0 -1
- package/resources/contracts/rate-cards/product-orders.mjs +0 -17
- package/resources/contracts/rate-cards/product-orders.mjs.map +0 -1
- package/resources/contracts/rate-cards/rate-cards.d.ts.map +0 -1
- package/resources/contracts/rate-cards/rate-cards.js.map +0 -1
- package/resources/contracts/rate-cards/rate-cards.mjs +0 -69
- package/resources/contracts/rate-cards/rate-cards.mjs.map +0 -1
- package/resources/contracts/rate-cards/rates.d.ts.map +0 -1
- package/resources/contracts/rate-cards/rates.js +0 -38
- package/resources/contracts/rate-cards/rates.js.map +0 -1
- package/resources/contracts/rate-cards/rates.mjs +0 -33
- package/resources/contracts/rate-cards/rates.mjs.map +0 -1
- package/resources/credit-grants.d.ts.map +0 -1
- package/resources/credit-grants.js +0 -52
- package/resources/credit-grants.js.map +0 -1
- package/resources/credit-grants.mjs +0 -47
- package/resources/credit-grants.mjs.map +0 -1
- package/resources/custom-fields.d.ts.map +0 -1
- package/resources/custom-fields.js.map +0 -1
- package/resources/custom-fields.mjs.map +0 -1
- package/resources/customers/alerts.d.ts.map +0 -1
- package/resources/customers/alerts.js +0 -33
- package/resources/customers/alerts.js.map +0 -1
- package/resources/customers/alerts.mjs +0 -29
- package/resources/customers/alerts.mjs.map +0 -1
- package/resources/customers/billing-config.d.ts.map +0 -1
- package/resources/customers/billing-config.js +0 -38
- package/resources/customers/billing-config.js.map +0 -1
- package/resources/customers/billing-config.mjs +0 -34
- package/resources/customers/billing-config.mjs.map +0 -1
- package/resources/customers/commits.d.ts.map +0 -1
- package/resources/customers/commits.js +0 -27
- package/resources/customers/commits.js.map +0 -1
- package/resources/customers/commits.mjs +0 -23
- package/resources/customers/commits.mjs.map +0 -1
- package/resources/customers/credits.d.ts.map +0 -1
- package/resources/customers/credits.js +0 -27
- package/resources/customers/credits.js.map +0 -1
- package/resources/customers/credits.mjs +0 -23
- package/resources/customers/credits.mjs.map +0 -1
- package/resources/customers/customers.d.ts.map +0 -1
- package/resources/customers/customers.js.map +0 -1
- package/resources/customers/customers.mjs +0 -126
- package/resources/customers/customers.mjs.map +0 -1
- package/resources/customers/index.d.ts.map +0 -1
- package/resources/customers/index.js.map +0 -1
- package/resources/customers/index.mjs.map +0 -1
- package/resources/customers/invoices.d.ts.map +0 -1
- package/resources/customers/invoices.js +0 -51
- package/resources/customers/invoices.js.map +0 -1
- package/resources/customers/invoices.mjs +0 -45
- package/resources/customers/invoices.mjs.map +0 -1
- package/resources/customers/named-schedules.d.ts.map +0 -1
- package/resources/customers/named-schedules.js +0 -27
- package/resources/customers/named-schedules.js.map +0 -1
- package/resources/customers/named-schedules.mjs +0 -23
- package/resources/customers/named-schedules.mjs.map +0 -1
- package/resources/customers/plans.d.ts.map +0 -1
- package/resources/customers/plans.js +0 -53
- package/resources/customers/plans.js.map +0 -1
- package/resources/customers/plans.mjs +0 -47
- package/resources/customers/plans.mjs.map +0 -1
- package/resources/dashboards.d.ts.map +0 -1
- package/resources/dashboards.js +0 -17
- package/resources/dashboards.js.map +0 -1
- package/resources/dashboards.mjs +0 -13
- package/resources/dashboards.mjs.map +0 -1
- package/resources/invoices.d.ts.map +0 -1
- package/resources/invoices.js +0 -21
- package/resources/invoices.js.map +0 -1
- package/resources/invoices.mjs +0 -17
- package/resources/invoices.mjs.map +0 -1
- package/resources/plans.d.ts.map +0 -1
- package/resources/plans.js.map +0 -1
- package/resources/plans.mjs +0 -47
- package/resources/plans.mjs.map +0 -1
- package/resources/pricing-units.d.ts.map +0 -1
- package/resources/pricing-units.js.map +0 -1
- package/resources/pricing-units.mjs.map +0 -1
- package/resources/services.d.ts.map +0 -1
- package/resources/services.js.map +0 -1
- package/resources/services.mjs.map +0 -1
- package/resources/usage.d.ts +0 -166
- package/resources/usage.d.ts.map +0 -1
- package/resources/usage.js +0 -49
- package/resources/usage.js.map +0 -1
- package/resources/usage.mjs +0 -44
- package/resources/usage.mjs.map +0 -1
- package/src/resources/usage.ts +0 -239
- /package/resources/{contracts → v1/contracts}/index.js +0 -0
- /package/resources/{contracts → v1/contracts}/index.mjs +0 -0
- /package/resources/{contracts → v1/contracts}/rate-cards/index.js +0 -0
- /package/resources/{contracts → v1/contracts}/rate-cards/index.mjs +0 -0
- /package/resources/{customers → v1/customers}/index.js +0 -0
- /package/resources/{customers → v1/customers}/index.mjs +0 -0
package/index.d.mts
CHANGED
|
@@ -5,20 +5,8 @@ import * as Pagination from "./pagination.js";
|
|
|
5
5
|
import { type CursorPageParams, CursorPageResponse } from "./pagination.js";
|
|
6
6
|
import * as Uploads from "./uploads.js";
|
|
7
7
|
import * as API from "./resources/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { BillableMetricArchiveParams, BillableMetricArchiveResponse, BillableMetricCreateParams, BillableMetricCreateResponse, BillableMetricListParams, BillableMetricListResponse, BillableMetricListResponsesCursorPage, BillableMetricRetrieveParams, BillableMetricRetrieveResponse, BillableMetrics } from "./resources/billable-metrics.js";
|
|
11
|
-
import { CreditGrantCreateParams, CreditGrantCreateResponse, CreditGrantEditParams, CreditGrantEditResponse, CreditGrantListEntriesParams, CreditGrantListEntriesResponse, CreditGrantListParams, CreditGrantListResponse, CreditGrantListResponsesCursorPage, CreditGrantVoidParams, CreditGrantVoidResponse, CreditGrants, CreditLedgerEntry, RolloverAmountMaxAmount, RolloverAmountMaxPercentage } from "./resources/credit-grants.js";
|
|
12
|
-
import { CustomFieldAddKeyParams, CustomFieldDeleteValuesParams, CustomFieldListKeysParams, CustomFieldListKeysResponse, CustomFieldRemoveKeyParams, CustomFieldSetValuesParams, CustomFields } from "./resources/custom-fields.js";
|
|
13
|
-
import { DashboardGetEmbeddableURLParams, DashboardGetEmbeddableURLResponse, Dashboards } from "./resources/dashboards.js";
|
|
14
|
-
import { InvoiceRegenerateParams, InvoiceRegenerateResponse, InvoiceVoidParams, InvoiceVoidResponse, Invoices } from "./resources/invoices.js";
|
|
15
|
-
import { PlanDetail, PlanGetDetailsParams, PlanGetDetailsResponse, PlanListChargesParams, PlanListChargesResponse, PlanListChargesResponsesCursorPage, PlanListCustomersParams, PlanListCustomersResponse, PlanListCustomersResponsesCursorPage, PlanListParams, PlanListResponse, PlanListResponsesCursorPage, Plans } from "./resources/plans.js";
|
|
16
|
-
import { PricingUnitListParams, PricingUnitListResponse, PricingUnitListResponsesCursorPage, PricingUnits } from "./resources/pricing-units.js";
|
|
17
|
-
import { ServiceListResponse, Services } from "./resources/services.js";
|
|
18
|
-
import { Usage, UsageIngestParams, UsageListParams, UsageListResponse, UsageListWithGroupsParams, UsageListWithGroupsResponse, UsageListWithGroupsResponsesCursorPage } from "./resources/usage.js";
|
|
19
|
-
import { ContractAddManualBalanceEntryParams, ContractAmendParams, ContractAmendResponse, ContractArchiveParams, ContractArchiveResponse, ContractCreateHistoricalInvoicesParams, ContractCreateHistoricalInvoicesResponse, ContractCreateParams, ContractCreateResponse, ContractListBalancesParams, ContractListBalancesResponse, ContractListParams, ContractListResponse, ContractRetrieveParams, ContractRetrieveRateScheduleParams, ContractRetrieveRateScheduleResponse, ContractRetrieveResponse, ContractScheduleProServicesInvoiceParams, ContractScheduleProServicesInvoiceResponse, ContractSetUsageFilterParams, ContractUpdateEndDateParams, ContractUpdateEndDateResponse, Contracts } from "./resources/contracts/contracts.js";
|
|
20
|
-
import { Customer, CustomerArchiveParams, CustomerArchiveResponse, CustomerCreateParams, CustomerCreateResponse, CustomerDetail, CustomerDetailsCursorPage, CustomerListBillableMetricsParams, CustomerListBillableMetricsResponse, CustomerListBillableMetricsResponsesCursorPage, CustomerListCostsParams, CustomerListCostsResponse, CustomerListCostsResponsesCursorPage, CustomerListParams, CustomerRetrieveParams, CustomerRetrieveResponse, CustomerSetIngestAliasesParams, CustomerSetNameParams, CustomerSetNameResponse, CustomerUpdateConfigParams, Customers } from "./resources/customers/customers.js";
|
|
21
|
-
import { Webhooks } from "./resources/webhooks.js";
|
|
8
|
+
import { V1 } from "./resources/v1/v1.js";
|
|
9
|
+
import { V2 } from "./resources/v2/v2.js";
|
|
22
10
|
export interface ClientOptions {
|
|
23
11
|
/**
|
|
24
12
|
* Defaults to process.env['METRONOME_BEARER_TOKEN'].
|
|
@@ -40,6 +28,8 @@ export interface ClientOptions {
|
|
|
40
28
|
*
|
|
41
29
|
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
42
30
|
* much longer than this timeout before the promise succeeds or fails.
|
|
31
|
+
*
|
|
32
|
+
* @unit milliseconds
|
|
43
33
|
*/
|
|
44
34
|
timeout?: number | undefined;
|
|
45
35
|
/**
|
|
@@ -82,6 +72,7 @@ export interface ClientOptions {
|
|
|
82
72
|
* API Client for interfacing with the Metronome API.
|
|
83
73
|
*/
|
|
84
74
|
export declare class Metronome extends Core.APIClient {
|
|
75
|
+
#private;
|
|
85
76
|
bearerToken: string;
|
|
86
77
|
webhookSecret: string | null;
|
|
87
78
|
private _options;
|
|
@@ -90,7 +81,7 @@ export declare class Metronome extends Core.APIClient {
|
|
|
90
81
|
*
|
|
91
82
|
* @param {string | undefined} [opts.bearerToken=process.env['METRONOME_BEARER_TOKEN'] ?? undefined]
|
|
92
83
|
* @param {string | null | undefined} [opts.webhookSecret=process.env['METRONOME_WEBHOOK_SECRET'] ?? null]
|
|
93
|
-
* @param {string} [opts.baseURL=process.env['METRONOME_BASE_URL'] ?? https://api.metronome.com
|
|
84
|
+
* @param {string} [opts.baseURL=process.env['METRONOME_BASE_URL'] ?? https://api.metronome.com] - Override the default base URL for the API.
|
|
94
85
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
95
86
|
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
96
87
|
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -99,20 +90,9 @@ export declare class Metronome extends Core.APIClient {
|
|
|
99
90
|
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
100
91
|
*/
|
|
101
92
|
constructor({ baseURL, bearerToken, webhookSecret, ...opts }?: ClientOptions);
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
creditGrants: API.CreditGrants;
|
|
105
|
-
pricingUnits: API.PricingUnits;
|
|
106
|
-
customers: API.Customers;
|
|
107
|
-
dashboards: API.Dashboards;
|
|
93
|
+
v2: API.V2;
|
|
94
|
+
v1: API.V1;
|
|
108
95
|
webhooks: API.Webhooks;
|
|
109
|
-
usage: API.Usage;
|
|
110
|
-
auditLogs: API.AuditLogs;
|
|
111
|
-
customFields: API.CustomFields;
|
|
112
|
-
billableMetrics: API.BillableMetrics;
|
|
113
|
-
services: API.Services;
|
|
114
|
-
invoices: API.Invoices;
|
|
115
|
-
contracts: API.Contracts;
|
|
116
96
|
protected defaultQuery(): Core.DefaultQuery | undefined;
|
|
117
97
|
protected defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
118
98
|
protected authHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
@@ -139,20 +119,8 @@ export declare namespace Metronome {
|
|
|
139
119
|
export type RequestOptions = Core.RequestOptions;
|
|
140
120
|
export import CursorPage = Pagination.CursorPage;
|
|
141
121
|
export { type CursorPageParams as CursorPageParams, type CursorPageResponse as CursorPageResponse };
|
|
142
|
-
export {
|
|
143
|
-
export {
|
|
144
|
-
export { CreditGrants as CreditGrants, type CreditLedgerEntry as CreditLedgerEntry, type RolloverAmountMaxAmount as RolloverAmountMaxAmount, type RolloverAmountMaxPercentage as RolloverAmountMaxPercentage, type CreditGrantCreateResponse as CreditGrantCreateResponse, type CreditGrantListResponse as CreditGrantListResponse, type CreditGrantEditResponse as CreditGrantEditResponse, type CreditGrantListEntriesResponse as CreditGrantListEntriesResponse, type CreditGrantVoidResponse as CreditGrantVoidResponse, CreditGrantListResponsesCursorPage as CreditGrantListResponsesCursorPage, type CreditGrantCreateParams as CreditGrantCreateParams, type CreditGrantListParams as CreditGrantListParams, type CreditGrantEditParams as CreditGrantEditParams, type CreditGrantListEntriesParams as CreditGrantListEntriesParams, type CreditGrantVoidParams as CreditGrantVoidParams, };
|
|
145
|
-
export { PricingUnits as PricingUnits, type PricingUnitListResponse as PricingUnitListResponse, PricingUnitListResponsesCursorPage as PricingUnitListResponsesCursorPage, type PricingUnitListParams as PricingUnitListParams, };
|
|
146
|
-
export { Customers as Customers, type Customer as Customer, type CustomerDetail as CustomerDetail, type CustomerCreateResponse as CustomerCreateResponse, type CustomerRetrieveResponse as CustomerRetrieveResponse, type CustomerArchiveResponse as CustomerArchiveResponse, type CustomerListBillableMetricsResponse as CustomerListBillableMetricsResponse, type CustomerListCostsResponse as CustomerListCostsResponse, type CustomerSetNameResponse as CustomerSetNameResponse, CustomerDetailsCursorPage as CustomerDetailsCursorPage, CustomerListBillableMetricsResponsesCursorPage as CustomerListBillableMetricsResponsesCursorPage, CustomerListCostsResponsesCursorPage as CustomerListCostsResponsesCursorPage, type CustomerCreateParams as CustomerCreateParams, type CustomerRetrieveParams as CustomerRetrieveParams, type CustomerListParams as CustomerListParams, type CustomerArchiveParams as CustomerArchiveParams, type CustomerListBillableMetricsParams as CustomerListBillableMetricsParams, type CustomerListCostsParams as CustomerListCostsParams, type CustomerSetIngestAliasesParams as CustomerSetIngestAliasesParams, type CustomerSetNameParams as CustomerSetNameParams, type CustomerUpdateConfigParams as CustomerUpdateConfigParams, };
|
|
147
|
-
export { Dashboards as Dashboards, type DashboardGetEmbeddableURLResponse as DashboardGetEmbeddableURLResponse, type DashboardGetEmbeddableURLParams as DashboardGetEmbeddableURLParams, };
|
|
148
|
-
export { Webhooks as Webhooks };
|
|
149
|
-
export { Usage as Usage, type UsageListResponse as UsageListResponse, type UsageListWithGroupsResponse as UsageListWithGroupsResponse, UsageListWithGroupsResponsesCursorPage as UsageListWithGroupsResponsesCursorPage, type UsageListParams as UsageListParams, type UsageIngestParams as UsageIngestParams, type UsageListWithGroupsParams as UsageListWithGroupsParams, };
|
|
150
|
-
export { AuditLogs as AuditLogs, type AuditLogListResponse as AuditLogListResponse, AuditLogListResponsesCursorPage as AuditLogListResponsesCursorPage, type AuditLogListParams as AuditLogListParams, };
|
|
151
|
-
export { CustomFields as CustomFields, type CustomFieldListKeysResponse as CustomFieldListKeysResponse, type CustomFieldAddKeyParams as CustomFieldAddKeyParams, type CustomFieldDeleteValuesParams as CustomFieldDeleteValuesParams, type CustomFieldListKeysParams as CustomFieldListKeysParams, type CustomFieldRemoveKeyParams as CustomFieldRemoveKeyParams, type CustomFieldSetValuesParams as CustomFieldSetValuesParams, };
|
|
152
|
-
export { BillableMetrics as BillableMetrics, type BillableMetricCreateResponse as BillableMetricCreateResponse, type BillableMetricRetrieveResponse as BillableMetricRetrieveResponse, type BillableMetricListResponse as BillableMetricListResponse, type BillableMetricArchiveResponse as BillableMetricArchiveResponse, BillableMetricListResponsesCursorPage as BillableMetricListResponsesCursorPage, type BillableMetricCreateParams as BillableMetricCreateParams, type BillableMetricRetrieveParams as BillableMetricRetrieveParams, type BillableMetricListParams as BillableMetricListParams, type BillableMetricArchiveParams as BillableMetricArchiveParams, };
|
|
153
|
-
export { Services as Services, type ServiceListResponse as ServiceListResponse };
|
|
154
|
-
export { Invoices as Invoices, type InvoiceRegenerateResponse as InvoiceRegenerateResponse, type InvoiceVoidResponse as InvoiceVoidResponse, type InvoiceRegenerateParams as InvoiceRegenerateParams, type InvoiceVoidParams as InvoiceVoidParams, };
|
|
155
|
-
export { Contracts as Contracts, type ContractCreateResponse as ContractCreateResponse, type ContractRetrieveResponse as ContractRetrieveResponse, type ContractListResponse as ContractListResponse, type ContractAmendResponse as ContractAmendResponse, type ContractArchiveResponse as ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse, type ContractListBalancesResponse as ContractListBalancesResponse, type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse, type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse, type ContractCreateParams as ContractCreateParams, type ContractRetrieveParams as ContractRetrieveParams, type ContractListParams as ContractListParams, type ContractAddManualBalanceEntryParams as ContractAddManualBalanceEntryParams, type ContractAmendParams as ContractAmendParams, type ContractArchiveParams as ContractArchiveParams, type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams, type ContractListBalancesParams as ContractListBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
|
|
122
|
+
export { V2 as V2 };
|
|
123
|
+
export { V1 as V1 };
|
|
156
124
|
export type BaseUsageFilter = API.BaseUsageFilter;
|
|
157
125
|
export type Commit = API.Commit;
|
|
158
126
|
export type ContractWithoutAmendments = API.ContractWithoutAmendments;
|
package/index.d.ts
CHANGED
|
@@ -5,20 +5,8 @@ import * as Pagination from "./pagination.js";
|
|
|
5
5
|
import { type CursorPageParams, CursorPageResponse } from "./pagination.js";
|
|
6
6
|
import * as Uploads from "./uploads.js";
|
|
7
7
|
import * as API from "./resources/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { BillableMetricArchiveParams, BillableMetricArchiveResponse, BillableMetricCreateParams, BillableMetricCreateResponse, BillableMetricListParams, BillableMetricListResponse, BillableMetricListResponsesCursorPage, BillableMetricRetrieveParams, BillableMetricRetrieveResponse, BillableMetrics } from "./resources/billable-metrics.js";
|
|
11
|
-
import { CreditGrantCreateParams, CreditGrantCreateResponse, CreditGrantEditParams, CreditGrantEditResponse, CreditGrantListEntriesParams, CreditGrantListEntriesResponse, CreditGrantListParams, CreditGrantListResponse, CreditGrantListResponsesCursorPage, CreditGrantVoidParams, CreditGrantVoidResponse, CreditGrants, CreditLedgerEntry, RolloverAmountMaxAmount, RolloverAmountMaxPercentage } from "./resources/credit-grants.js";
|
|
12
|
-
import { CustomFieldAddKeyParams, CustomFieldDeleteValuesParams, CustomFieldListKeysParams, CustomFieldListKeysResponse, CustomFieldRemoveKeyParams, CustomFieldSetValuesParams, CustomFields } from "./resources/custom-fields.js";
|
|
13
|
-
import { DashboardGetEmbeddableURLParams, DashboardGetEmbeddableURLResponse, Dashboards } from "./resources/dashboards.js";
|
|
14
|
-
import { InvoiceRegenerateParams, InvoiceRegenerateResponse, InvoiceVoidParams, InvoiceVoidResponse, Invoices } from "./resources/invoices.js";
|
|
15
|
-
import { PlanDetail, PlanGetDetailsParams, PlanGetDetailsResponse, PlanListChargesParams, PlanListChargesResponse, PlanListChargesResponsesCursorPage, PlanListCustomersParams, PlanListCustomersResponse, PlanListCustomersResponsesCursorPage, PlanListParams, PlanListResponse, PlanListResponsesCursorPage, Plans } from "./resources/plans.js";
|
|
16
|
-
import { PricingUnitListParams, PricingUnitListResponse, PricingUnitListResponsesCursorPage, PricingUnits } from "./resources/pricing-units.js";
|
|
17
|
-
import { ServiceListResponse, Services } from "./resources/services.js";
|
|
18
|
-
import { Usage, UsageIngestParams, UsageListParams, UsageListResponse, UsageListWithGroupsParams, UsageListWithGroupsResponse, UsageListWithGroupsResponsesCursorPage } from "./resources/usage.js";
|
|
19
|
-
import { ContractAddManualBalanceEntryParams, ContractAmendParams, ContractAmendResponse, ContractArchiveParams, ContractArchiveResponse, ContractCreateHistoricalInvoicesParams, ContractCreateHistoricalInvoicesResponse, ContractCreateParams, ContractCreateResponse, ContractListBalancesParams, ContractListBalancesResponse, ContractListParams, ContractListResponse, ContractRetrieveParams, ContractRetrieveRateScheduleParams, ContractRetrieveRateScheduleResponse, ContractRetrieveResponse, ContractScheduleProServicesInvoiceParams, ContractScheduleProServicesInvoiceResponse, ContractSetUsageFilterParams, ContractUpdateEndDateParams, ContractUpdateEndDateResponse, Contracts } from "./resources/contracts/contracts.js";
|
|
20
|
-
import { Customer, CustomerArchiveParams, CustomerArchiveResponse, CustomerCreateParams, CustomerCreateResponse, CustomerDetail, CustomerDetailsCursorPage, CustomerListBillableMetricsParams, CustomerListBillableMetricsResponse, CustomerListBillableMetricsResponsesCursorPage, CustomerListCostsParams, CustomerListCostsResponse, CustomerListCostsResponsesCursorPage, CustomerListParams, CustomerRetrieveParams, CustomerRetrieveResponse, CustomerSetIngestAliasesParams, CustomerSetNameParams, CustomerSetNameResponse, CustomerUpdateConfigParams, Customers } from "./resources/customers/customers.js";
|
|
21
|
-
import { Webhooks } from "./resources/webhooks.js";
|
|
8
|
+
import { V1 } from "./resources/v1/v1.js";
|
|
9
|
+
import { V2 } from "./resources/v2/v2.js";
|
|
22
10
|
export interface ClientOptions {
|
|
23
11
|
/**
|
|
24
12
|
* Defaults to process.env['METRONOME_BEARER_TOKEN'].
|
|
@@ -40,6 +28,8 @@ export interface ClientOptions {
|
|
|
40
28
|
*
|
|
41
29
|
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
42
30
|
* much longer than this timeout before the promise succeeds or fails.
|
|
31
|
+
*
|
|
32
|
+
* @unit milliseconds
|
|
43
33
|
*/
|
|
44
34
|
timeout?: number | undefined;
|
|
45
35
|
/**
|
|
@@ -82,6 +72,7 @@ export interface ClientOptions {
|
|
|
82
72
|
* API Client for interfacing with the Metronome API.
|
|
83
73
|
*/
|
|
84
74
|
export declare class Metronome extends Core.APIClient {
|
|
75
|
+
#private;
|
|
85
76
|
bearerToken: string;
|
|
86
77
|
webhookSecret: string | null;
|
|
87
78
|
private _options;
|
|
@@ -90,7 +81,7 @@ export declare class Metronome extends Core.APIClient {
|
|
|
90
81
|
*
|
|
91
82
|
* @param {string | undefined} [opts.bearerToken=process.env['METRONOME_BEARER_TOKEN'] ?? undefined]
|
|
92
83
|
* @param {string | null | undefined} [opts.webhookSecret=process.env['METRONOME_WEBHOOK_SECRET'] ?? null]
|
|
93
|
-
* @param {string} [opts.baseURL=process.env['METRONOME_BASE_URL'] ?? https://api.metronome.com
|
|
84
|
+
* @param {string} [opts.baseURL=process.env['METRONOME_BASE_URL'] ?? https://api.metronome.com] - Override the default base URL for the API.
|
|
94
85
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
95
86
|
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
96
87
|
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -99,20 +90,9 @@ export declare class Metronome extends Core.APIClient {
|
|
|
99
90
|
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
100
91
|
*/
|
|
101
92
|
constructor({ baseURL, bearerToken, webhookSecret, ...opts }?: ClientOptions);
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
creditGrants: API.CreditGrants;
|
|
105
|
-
pricingUnits: API.PricingUnits;
|
|
106
|
-
customers: API.Customers;
|
|
107
|
-
dashboards: API.Dashboards;
|
|
93
|
+
v2: API.V2;
|
|
94
|
+
v1: API.V1;
|
|
108
95
|
webhooks: API.Webhooks;
|
|
109
|
-
usage: API.Usage;
|
|
110
|
-
auditLogs: API.AuditLogs;
|
|
111
|
-
customFields: API.CustomFields;
|
|
112
|
-
billableMetrics: API.BillableMetrics;
|
|
113
|
-
services: API.Services;
|
|
114
|
-
invoices: API.Invoices;
|
|
115
|
-
contracts: API.Contracts;
|
|
116
96
|
protected defaultQuery(): Core.DefaultQuery | undefined;
|
|
117
97
|
protected defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
118
98
|
protected authHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
@@ -139,20 +119,8 @@ export declare namespace Metronome {
|
|
|
139
119
|
export type RequestOptions = Core.RequestOptions;
|
|
140
120
|
export import CursorPage = Pagination.CursorPage;
|
|
141
121
|
export { type CursorPageParams as CursorPageParams, type CursorPageResponse as CursorPageResponse };
|
|
142
|
-
export {
|
|
143
|
-
export {
|
|
144
|
-
export { CreditGrants as CreditGrants, type CreditLedgerEntry as CreditLedgerEntry, type RolloverAmountMaxAmount as RolloverAmountMaxAmount, type RolloverAmountMaxPercentage as RolloverAmountMaxPercentage, type CreditGrantCreateResponse as CreditGrantCreateResponse, type CreditGrantListResponse as CreditGrantListResponse, type CreditGrantEditResponse as CreditGrantEditResponse, type CreditGrantListEntriesResponse as CreditGrantListEntriesResponse, type CreditGrantVoidResponse as CreditGrantVoidResponse, CreditGrantListResponsesCursorPage as CreditGrantListResponsesCursorPage, type CreditGrantCreateParams as CreditGrantCreateParams, type CreditGrantListParams as CreditGrantListParams, type CreditGrantEditParams as CreditGrantEditParams, type CreditGrantListEntriesParams as CreditGrantListEntriesParams, type CreditGrantVoidParams as CreditGrantVoidParams, };
|
|
145
|
-
export { PricingUnits as PricingUnits, type PricingUnitListResponse as PricingUnitListResponse, PricingUnitListResponsesCursorPage as PricingUnitListResponsesCursorPage, type PricingUnitListParams as PricingUnitListParams, };
|
|
146
|
-
export { Customers as Customers, type Customer as Customer, type CustomerDetail as CustomerDetail, type CustomerCreateResponse as CustomerCreateResponse, type CustomerRetrieveResponse as CustomerRetrieveResponse, type CustomerArchiveResponse as CustomerArchiveResponse, type CustomerListBillableMetricsResponse as CustomerListBillableMetricsResponse, type CustomerListCostsResponse as CustomerListCostsResponse, type CustomerSetNameResponse as CustomerSetNameResponse, CustomerDetailsCursorPage as CustomerDetailsCursorPage, CustomerListBillableMetricsResponsesCursorPage as CustomerListBillableMetricsResponsesCursorPage, CustomerListCostsResponsesCursorPage as CustomerListCostsResponsesCursorPage, type CustomerCreateParams as CustomerCreateParams, type CustomerRetrieveParams as CustomerRetrieveParams, type CustomerListParams as CustomerListParams, type CustomerArchiveParams as CustomerArchiveParams, type CustomerListBillableMetricsParams as CustomerListBillableMetricsParams, type CustomerListCostsParams as CustomerListCostsParams, type CustomerSetIngestAliasesParams as CustomerSetIngestAliasesParams, type CustomerSetNameParams as CustomerSetNameParams, type CustomerUpdateConfigParams as CustomerUpdateConfigParams, };
|
|
147
|
-
export { Dashboards as Dashboards, type DashboardGetEmbeddableURLResponse as DashboardGetEmbeddableURLResponse, type DashboardGetEmbeddableURLParams as DashboardGetEmbeddableURLParams, };
|
|
148
|
-
export { Webhooks as Webhooks };
|
|
149
|
-
export { Usage as Usage, type UsageListResponse as UsageListResponse, type UsageListWithGroupsResponse as UsageListWithGroupsResponse, UsageListWithGroupsResponsesCursorPage as UsageListWithGroupsResponsesCursorPage, type UsageListParams as UsageListParams, type UsageIngestParams as UsageIngestParams, type UsageListWithGroupsParams as UsageListWithGroupsParams, };
|
|
150
|
-
export { AuditLogs as AuditLogs, type AuditLogListResponse as AuditLogListResponse, AuditLogListResponsesCursorPage as AuditLogListResponsesCursorPage, type AuditLogListParams as AuditLogListParams, };
|
|
151
|
-
export { CustomFields as CustomFields, type CustomFieldListKeysResponse as CustomFieldListKeysResponse, type CustomFieldAddKeyParams as CustomFieldAddKeyParams, type CustomFieldDeleteValuesParams as CustomFieldDeleteValuesParams, type CustomFieldListKeysParams as CustomFieldListKeysParams, type CustomFieldRemoveKeyParams as CustomFieldRemoveKeyParams, type CustomFieldSetValuesParams as CustomFieldSetValuesParams, };
|
|
152
|
-
export { BillableMetrics as BillableMetrics, type BillableMetricCreateResponse as BillableMetricCreateResponse, type BillableMetricRetrieveResponse as BillableMetricRetrieveResponse, type BillableMetricListResponse as BillableMetricListResponse, type BillableMetricArchiveResponse as BillableMetricArchiveResponse, BillableMetricListResponsesCursorPage as BillableMetricListResponsesCursorPage, type BillableMetricCreateParams as BillableMetricCreateParams, type BillableMetricRetrieveParams as BillableMetricRetrieveParams, type BillableMetricListParams as BillableMetricListParams, type BillableMetricArchiveParams as BillableMetricArchiveParams, };
|
|
153
|
-
export { Services as Services, type ServiceListResponse as ServiceListResponse };
|
|
154
|
-
export { Invoices as Invoices, type InvoiceRegenerateResponse as InvoiceRegenerateResponse, type InvoiceVoidResponse as InvoiceVoidResponse, type InvoiceRegenerateParams as InvoiceRegenerateParams, type InvoiceVoidParams as InvoiceVoidParams, };
|
|
155
|
-
export { Contracts as Contracts, type ContractCreateResponse as ContractCreateResponse, type ContractRetrieveResponse as ContractRetrieveResponse, type ContractListResponse as ContractListResponse, type ContractAmendResponse as ContractAmendResponse, type ContractArchiveResponse as ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse, type ContractListBalancesResponse as ContractListBalancesResponse, type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse, type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse, type ContractCreateParams as ContractCreateParams, type ContractRetrieveParams as ContractRetrieveParams, type ContractListParams as ContractListParams, type ContractAddManualBalanceEntryParams as ContractAddManualBalanceEntryParams, type ContractAmendParams as ContractAmendParams, type ContractArchiveParams as ContractArchiveParams, type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams, type ContractListBalancesParams as ContractListBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
|
|
122
|
+
export { V2 as V2 };
|
|
123
|
+
export { V1 as V1 };
|
|
156
124
|
export type BaseUsageFilter = API.BaseUsageFilter;
|
|
157
125
|
export type Commit = API.Commit;
|
|
158
126
|
export type ContractWithoutAmendments = API.ContractWithoutAmendments;
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,mBAAmB,CAAC;AACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,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;IACtE,MAAM,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAChC,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC;IAChD,MAAM,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IACpC,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC;IAClD,MAAM,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC;IACxB,MAAM,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IACpC,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC;IAChD,MAAM,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC;IACxC,MAAM,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IAC5B,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC;IAClD,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC,gBAAgB,CAAC;IACpD,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC,mBAAmB,CAAC;IAC1D,MAAM,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;CAC7B;AAED,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EACL,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,SAAS,CAAC;AAEjB,eAAe,SAAS,CAAC"}
|
package/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
__setModuleDefault(result, mod);
|
|
24
24
|
return result;
|
|
25
25
|
};
|
|
26
|
-
var _a;
|
|
26
|
+
var _Metronome_instances, _a, _Metronome_baseURLOverridden;
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
exports.UnprocessableEntityError = exports.PermissionDeniedError = exports.InternalServerError = exports.AuthenticationError = exports.BadRequestError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.APIUserAbortError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIError = exports.MetronomeError = exports.fileFromPath = exports.toFile = exports.Metronome = void 0;
|
|
29
29
|
const qs = __importStar(require("./internal/qs/index.js"));
|
|
@@ -32,20 +32,8 @@ const Errors = __importStar(require("./error.js"));
|
|
|
32
32
|
const Pagination = __importStar(require("./pagination.js"));
|
|
33
33
|
const Uploads = __importStar(require("./uploads.js"));
|
|
34
34
|
const API = __importStar(require("./resources/index.js"));
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const billable_metrics_1 = require("./resources/billable-metrics.js");
|
|
38
|
-
const credit_grants_1 = require("./resources/credit-grants.js");
|
|
39
|
-
const custom_fields_1 = require("./resources/custom-fields.js");
|
|
40
|
-
const dashboards_1 = require("./resources/dashboards.js");
|
|
41
|
-
const invoices_1 = require("./resources/invoices.js");
|
|
42
|
-
const plans_1 = require("./resources/plans.js");
|
|
43
|
-
const pricing_units_1 = require("./resources/pricing-units.js");
|
|
44
|
-
const services_1 = require("./resources/services.js");
|
|
45
|
-
const usage_1 = require("./resources/usage.js");
|
|
46
|
-
const contracts_1 = require("./resources/contracts/contracts.js");
|
|
47
|
-
const customers_1 = require("./resources/customers/customers.js");
|
|
48
|
-
const webhooks_1 = require("./resources/webhooks.js");
|
|
35
|
+
const v1_1 = require("./resources/v1/v1.js");
|
|
36
|
+
const v2_1 = require("./resources/v2/v2.js");
|
|
49
37
|
/**
|
|
50
38
|
* API Client for interfacing with the Metronome API.
|
|
51
39
|
*/
|
|
@@ -55,7 +43,7 @@ class Metronome extends Core.APIClient {
|
|
|
55
43
|
*
|
|
56
44
|
* @param {string | undefined} [opts.bearerToken=process.env['METRONOME_BEARER_TOKEN'] ?? undefined]
|
|
57
45
|
* @param {string | null | undefined} [opts.webhookSecret=process.env['METRONOME_WEBHOOK_SECRET'] ?? null]
|
|
58
|
-
* @param {string} [opts.baseURL=process.env['METRONOME_BASE_URL'] ?? https://api.metronome.com
|
|
46
|
+
* @param {string} [opts.baseURL=process.env['METRONOME_BASE_URL'] ?? https://api.metronome.com] - Override the default base URL for the API.
|
|
59
47
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
60
48
|
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
61
49
|
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -71,29 +59,20 @@ class Metronome extends Core.APIClient {
|
|
|
71
59
|
bearerToken,
|
|
72
60
|
webhookSecret,
|
|
73
61
|
...opts,
|
|
74
|
-
baseURL: baseURL || `https://api.metronome.com
|
|
62
|
+
baseURL: baseURL || `https://api.metronome.com`,
|
|
75
63
|
};
|
|
76
64
|
super({
|
|
77
65
|
baseURL: options.baseURL,
|
|
66
|
+
baseURLOverridden: baseURL ? baseURL !== 'https://api.metronome.com' : false,
|
|
78
67
|
timeout: options.timeout ?? 60000 /* 1 minute */,
|
|
79
68
|
httpAgent: options.httpAgent,
|
|
80
69
|
maxRetries: options.maxRetries,
|
|
81
70
|
fetch: options.fetch,
|
|
82
71
|
});
|
|
83
|
-
|
|
84
|
-
this.
|
|
85
|
-
this.
|
|
86
|
-
this.pricingUnits = new API.PricingUnits(this);
|
|
87
|
-
this.customers = new API.Customers(this);
|
|
88
|
-
this.dashboards = new API.Dashboards(this);
|
|
72
|
+
_Metronome_instances.add(this);
|
|
73
|
+
this.v2 = new API.V2(this);
|
|
74
|
+
this.v1 = new API.V1(this);
|
|
89
75
|
this.webhooks = new API.Webhooks(this);
|
|
90
|
-
this.usage = new API.Usage(this);
|
|
91
|
-
this.auditLogs = new API.AuditLogs(this);
|
|
92
|
-
this.customFields = new API.CustomFields(this);
|
|
93
|
-
this.billableMetrics = new API.BillableMetrics(this);
|
|
94
|
-
this.services = new API.Services(this);
|
|
95
|
-
this.invoices = new API.Invoices(this);
|
|
96
|
-
this.contracts = new API.Contracts(this);
|
|
97
76
|
this._options = options;
|
|
98
77
|
this.bearerToken = bearerToken;
|
|
99
78
|
this.webhookSecret = webhookSecret;
|
|
@@ -115,7 +94,9 @@ class Metronome extends Core.APIClient {
|
|
|
115
94
|
}
|
|
116
95
|
}
|
|
117
96
|
exports.Metronome = Metronome;
|
|
118
|
-
_a = Metronome
|
|
97
|
+
_a = Metronome, _Metronome_instances = new WeakSet(), _Metronome_baseURLOverridden = function _Metronome_baseURLOverridden() {
|
|
98
|
+
return this.baseURL !== 'https://api.metronome.com';
|
|
99
|
+
};
|
|
119
100
|
Metronome.Metronome = _a;
|
|
120
101
|
Metronome.DEFAULT_TIMEOUT = 60000; // 1 minute
|
|
121
102
|
Metronome.MetronomeError = Errors.MetronomeError;
|
|
@@ -133,30 +114,8 @@ Metronome.PermissionDeniedError = Errors.PermissionDeniedError;
|
|
|
133
114
|
Metronome.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
134
115
|
Metronome.toFile = Uploads.toFile;
|
|
135
116
|
Metronome.fileFromPath = Uploads.fileFromPath;
|
|
136
|
-
Metronome.
|
|
137
|
-
Metronome.
|
|
138
|
-
Metronome.PlanListResponsesCursorPage = plans_1.PlanListResponsesCursorPage;
|
|
139
|
-
Metronome.PlanListChargesResponsesCursorPage = plans_1.PlanListChargesResponsesCursorPage;
|
|
140
|
-
Metronome.PlanListCustomersResponsesCursorPage = plans_1.PlanListCustomersResponsesCursorPage;
|
|
141
|
-
Metronome.CreditGrants = credit_grants_1.CreditGrants;
|
|
142
|
-
Metronome.CreditGrantListResponsesCursorPage = credit_grants_1.CreditGrantListResponsesCursorPage;
|
|
143
|
-
Metronome.PricingUnits = pricing_units_1.PricingUnits;
|
|
144
|
-
Metronome.PricingUnitListResponsesCursorPage = pricing_units_1.PricingUnitListResponsesCursorPage;
|
|
145
|
-
Metronome.Customers = customers_1.Customers;
|
|
146
|
-
Metronome.CustomerDetailsCursorPage = customers_1.CustomerDetailsCursorPage;
|
|
147
|
-
Metronome.CustomerListBillableMetricsResponsesCursorPage = customers_1.CustomerListBillableMetricsResponsesCursorPage;
|
|
148
|
-
Metronome.CustomerListCostsResponsesCursorPage = customers_1.CustomerListCostsResponsesCursorPage;
|
|
149
|
-
Metronome.Dashboards = dashboards_1.Dashboards;
|
|
150
|
-
Metronome.Usage = usage_1.Usage;
|
|
151
|
-
Metronome.UsageListWithGroupsResponsesCursorPage = usage_1.UsageListWithGroupsResponsesCursorPage;
|
|
152
|
-
Metronome.AuditLogs = audit_logs_1.AuditLogs;
|
|
153
|
-
Metronome.AuditLogListResponsesCursorPage = audit_logs_1.AuditLogListResponsesCursorPage;
|
|
154
|
-
Metronome.CustomFields = custom_fields_1.CustomFields;
|
|
155
|
-
Metronome.BillableMetrics = billable_metrics_1.BillableMetrics;
|
|
156
|
-
Metronome.BillableMetricListResponsesCursorPage = billable_metrics_1.BillableMetricListResponsesCursorPage;
|
|
157
|
-
Metronome.Services = services_1.Services;
|
|
158
|
-
Metronome.Invoices = invoices_1.Invoices;
|
|
159
|
-
Metronome.Contracts = contracts_1.Contracts;
|
|
117
|
+
Metronome.V2 = v2_1.V2;
|
|
118
|
+
Metronome.V1 = v1_1.V1;
|
|
160
119
|
var uploads_1 = require("./uploads.js");
|
|
161
120
|
Object.defineProperty(exports, "toFile", { enumerable: true, get: function () { return uploads_1.toFile; } });
|
|
162
121
|
Object.defineProperty(exports, "fileFromPath", { enumerable: true, get: function () { return uploads_1.fileFromPath; } });
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtF,2DAAoC;AACpC,gDAA+B;AAC/B,mDAAkC;AAClC,4DAA2C;AAE3C,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;AACvC,yBAAe,GAAG,MAAM,CAAC,eAAe,CAAC;AACzC,6BAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,6BAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,+BAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACrD,kCAAwB,GAAG,MAAM,CAAC,wBAAwB,CAAC;AAE3D,gBAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AACxB,sBAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AAG7C,SAAS,CAAC,EAAE,GAAG,OAAE,CAAC;AAClB,SAAS,CAAC,EAAE,GAAG,OAAE,CAAC;AA6BlB,wCAAiD;AAAxC,iGAAA,MAAM,OAAA;AAAE,uGAAA,YAAY,OAAA;AAC7B,oCAciB;AAbf,uGAAA,cAAc,OAAA;AACd,iGAAA,QAAQ,OAAA;AACR,2GAAA,kBAAkB,OAAA;AAClB,kHAAA,yBAAyB,OAAA;AACzB,0GAAA,iBAAiB,OAAA;AACjB,sGAAA,aAAa,OAAA;AACb,sGAAA,aAAa,OAAA;AACb,uGAAA,cAAc,OAAA;AACd,wGAAA,eAAe,OAAA;AACf,4GAAA,mBAAmB,OAAA;AACnB,4GAAA,mBAAmB,OAAA;AACnB,8GAAA,qBAAqB,OAAA;AACrB,iHAAA,wBAAwB,OAAA;AAG1B,kBAAe,SAAS,CAAC"}
|
package/index.mjs
CHANGED
|
@@ -1,25 +1,13 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
var _a;
|
|
2
|
+
var _Metronome_instances, _a, _Metronome_baseURLOverridden;
|
|
3
3
|
import * as qs from "./internal/qs/index.mjs";
|
|
4
4
|
import * as Core from "./core.mjs";
|
|
5
5
|
import * as Errors from "./error.mjs";
|
|
6
6
|
import * as Pagination from "./pagination.mjs";
|
|
7
7
|
import * as Uploads from "./uploads.mjs";
|
|
8
8
|
import * as API from "./resources/index.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { BillableMetricListResponsesCursorPage, BillableMetrics, } from "./resources/billable-metrics.mjs";
|
|
12
|
-
import { CreditGrantListResponsesCursorPage, CreditGrants, } from "./resources/credit-grants.mjs";
|
|
13
|
-
import { CustomFields, } from "./resources/custom-fields.mjs";
|
|
14
|
-
import { Dashboards, } from "./resources/dashboards.mjs";
|
|
15
|
-
import { Invoices, } from "./resources/invoices.mjs";
|
|
16
|
-
import { PlanListChargesResponsesCursorPage, PlanListCustomersResponsesCursorPage, PlanListResponsesCursorPage, Plans, } from "./resources/plans.mjs";
|
|
17
|
-
import { PricingUnitListResponsesCursorPage, PricingUnits, } from "./resources/pricing-units.mjs";
|
|
18
|
-
import { Services } from "./resources/services.mjs";
|
|
19
|
-
import { Usage, UsageListWithGroupsResponsesCursorPage, } from "./resources/usage.mjs";
|
|
20
|
-
import { Contracts, } from "./resources/contracts/contracts.mjs";
|
|
21
|
-
import { CustomerDetailsCursorPage, CustomerListBillableMetricsResponsesCursorPage, CustomerListCostsResponsesCursorPage, Customers, } from "./resources/customers/customers.mjs";
|
|
22
|
-
import { Webhooks } from "./resources/webhooks.mjs";
|
|
9
|
+
import { V1 } from "./resources/v1/v1.mjs";
|
|
10
|
+
import { V2 } from "./resources/v2/v2.mjs";
|
|
23
11
|
/**
|
|
24
12
|
* API Client for interfacing with the Metronome API.
|
|
25
13
|
*/
|
|
@@ -29,7 +17,7 @@ export class Metronome extends Core.APIClient {
|
|
|
29
17
|
*
|
|
30
18
|
* @param {string | undefined} [opts.bearerToken=process.env['METRONOME_BEARER_TOKEN'] ?? undefined]
|
|
31
19
|
* @param {string | null | undefined} [opts.webhookSecret=process.env['METRONOME_WEBHOOK_SECRET'] ?? null]
|
|
32
|
-
* @param {string} [opts.baseURL=process.env['METRONOME_BASE_URL'] ?? https://api.metronome.com
|
|
20
|
+
* @param {string} [opts.baseURL=process.env['METRONOME_BASE_URL'] ?? https://api.metronome.com] - Override the default base URL for the API.
|
|
33
21
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
34
22
|
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
35
23
|
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -45,29 +33,20 @@ export class Metronome extends Core.APIClient {
|
|
|
45
33
|
bearerToken,
|
|
46
34
|
webhookSecret,
|
|
47
35
|
...opts,
|
|
48
|
-
baseURL: baseURL || `https://api.metronome.com
|
|
36
|
+
baseURL: baseURL || `https://api.metronome.com`,
|
|
49
37
|
};
|
|
50
38
|
super({
|
|
51
39
|
baseURL: options.baseURL,
|
|
40
|
+
baseURLOverridden: baseURL ? baseURL !== 'https://api.metronome.com' : false,
|
|
52
41
|
timeout: options.timeout ?? 60000 /* 1 minute */,
|
|
53
42
|
httpAgent: options.httpAgent,
|
|
54
43
|
maxRetries: options.maxRetries,
|
|
55
44
|
fetch: options.fetch,
|
|
56
45
|
});
|
|
57
|
-
|
|
58
|
-
this.
|
|
59
|
-
this.
|
|
60
|
-
this.pricingUnits = new API.PricingUnits(this);
|
|
61
|
-
this.customers = new API.Customers(this);
|
|
62
|
-
this.dashboards = new API.Dashboards(this);
|
|
46
|
+
_Metronome_instances.add(this);
|
|
47
|
+
this.v2 = new API.V2(this);
|
|
48
|
+
this.v1 = new API.V1(this);
|
|
63
49
|
this.webhooks = new API.Webhooks(this);
|
|
64
|
-
this.usage = new API.Usage(this);
|
|
65
|
-
this.auditLogs = new API.AuditLogs(this);
|
|
66
|
-
this.customFields = new API.CustomFields(this);
|
|
67
|
-
this.billableMetrics = new API.BillableMetrics(this);
|
|
68
|
-
this.services = new API.Services(this);
|
|
69
|
-
this.invoices = new API.Invoices(this);
|
|
70
|
-
this.contracts = new API.Contracts(this);
|
|
71
50
|
this._options = options;
|
|
72
51
|
this.bearerToken = bearerToken;
|
|
73
52
|
this.webhookSecret = webhookSecret;
|
|
@@ -88,7 +67,9 @@ export class Metronome extends Core.APIClient {
|
|
|
88
67
|
return qs.stringify(query, { arrayFormat: 'comma' });
|
|
89
68
|
}
|
|
90
69
|
}
|
|
91
|
-
_a = Metronome
|
|
70
|
+
_a = Metronome, _Metronome_instances = new WeakSet(), _Metronome_baseURLOverridden = function _Metronome_baseURLOverridden() {
|
|
71
|
+
return this.baseURL !== 'https://api.metronome.com';
|
|
72
|
+
};
|
|
92
73
|
Metronome.Metronome = _a;
|
|
93
74
|
Metronome.DEFAULT_TIMEOUT = 60000; // 1 minute
|
|
94
75
|
Metronome.MetronomeError = Errors.MetronomeError;
|
|
@@ -106,30 +87,8 @@ Metronome.PermissionDeniedError = Errors.PermissionDeniedError;
|
|
|
106
87
|
Metronome.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
107
88
|
Metronome.toFile = Uploads.toFile;
|
|
108
89
|
Metronome.fileFromPath = Uploads.fileFromPath;
|
|
109
|
-
Metronome.
|
|
110
|
-
Metronome.
|
|
111
|
-
Metronome.PlanListResponsesCursorPage = PlanListResponsesCursorPage;
|
|
112
|
-
Metronome.PlanListChargesResponsesCursorPage = PlanListChargesResponsesCursorPage;
|
|
113
|
-
Metronome.PlanListCustomersResponsesCursorPage = PlanListCustomersResponsesCursorPage;
|
|
114
|
-
Metronome.CreditGrants = CreditGrants;
|
|
115
|
-
Metronome.CreditGrantListResponsesCursorPage = CreditGrantListResponsesCursorPage;
|
|
116
|
-
Metronome.PricingUnits = PricingUnits;
|
|
117
|
-
Metronome.PricingUnitListResponsesCursorPage = PricingUnitListResponsesCursorPage;
|
|
118
|
-
Metronome.Customers = Customers;
|
|
119
|
-
Metronome.CustomerDetailsCursorPage = CustomerDetailsCursorPage;
|
|
120
|
-
Metronome.CustomerListBillableMetricsResponsesCursorPage = CustomerListBillableMetricsResponsesCursorPage;
|
|
121
|
-
Metronome.CustomerListCostsResponsesCursorPage = CustomerListCostsResponsesCursorPage;
|
|
122
|
-
Metronome.Dashboards = Dashboards;
|
|
123
|
-
Metronome.Usage = Usage;
|
|
124
|
-
Metronome.UsageListWithGroupsResponsesCursorPage = UsageListWithGroupsResponsesCursorPage;
|
|
125
|
-
Metronome.AuditLogs = AuditLogs;
|
|
126
|
-
Metronome.AuditLogListResponsesCursorPage = AuditLogListResponsesCursorPage;
|
|
127
|
-
Metronome.CustomFields = CustomFields;
|
|
128
|
-
Metronome.BillableMetrics = BillableMetrics;
|
|
129
|
-
Metronome.BillableMetricListResponsesCursorPage = BillableMetricListResponsesCursorPage;
|
|
130
|
-
Metronome.Services = Services;
|
|
131
|
-
Metronome.Invoices = Invoices;
|
|
132
|
-
Metronome.Contracts = Contracts;
|
|
90
|
+
Metronome.V2 = V2;
|
|
91
|
+
Metronome.V1 = V1;
|
|
133
92
|
export { toFile, fileFromPath } from "./uploads.mjs";
|
|
134
93
|
export { MetronomeError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.mjs";
|
|
135
94
|
export default Metronome;
|
package/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,KAAK,EAAE;OACP,KAAK,IAAI;OACT,KAAK,MAAM;OACX,KAAK,UAAU;OAEf,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,KAAK,EAAE;OACP,KAAK,IAAI;OACT,KAAK,MAAM;OACX,KAAK,UAAU;OAEf,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,EAAE,EAAE;OACN,EAAE,EAAE,EAAE;AAwEb;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,IAAI,CAAC,SAAS;IAM3C;;;;;;;;;;;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,CAAC;AAClB,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;OA6BX,EAAE,MAAM,EAAE,YAAY,EAAE;OACxB,EACL,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB;AAED,eAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
package/pagination.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare class CursorPage<Item> extends AbstractPage<Item> implements Curs
|
|
|
30
30
|
data: Array<Item>;
|
|
31
31
|
constructor(client: APIClient, response: Response, body: CursorPageResponse<Item>, options: FinalRequestOptions);
|
|
32
32
|
getPaginatedItems(): Item[];
|
|
33
|
+
hasNextPage(): boolean;
|
|
33
34
|
nextPageParams(): Partial<CursorPageParams> | null;
|
|
34
35
|
nextPageInfo(): PageInfo | null;
|
|
35
36
|
}
|
package/pagination.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["src/pagination.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAE1F,MAAM,WAAW,kBAAkB,CAAC,IAAI;IACtC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,UAAU,CAAC,IAAI,CAAE,SAAQ,YAAY,CAAC,IAAI,CAAE,YAAW,kBAAkB,CAAC,IAAI,CAAC;IAC1F;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-12,6 +12,9 @@ class CursorPage extends core_1.AbstractPage {
|
|
|
12
12
|
getPaginatedItems() {
|
|
13
13
|
return this.data ?? [];
|
|
14
14
|
}
|
|
15
|
+
hasNextPage() {
|
|
16
|
+
return this.nextPageInfo() != null;
|
|
17
|
+
}
|
|
15
18
|
// @deprecated Please use `nextPageInfo()` instead
|
|
16
19
|
nextPageParams() {
|
|
17
20
|
const info = this.nextPageInfo();
|
package/pagination.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["src/pagination.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oCAA0F;AA0B1F,MAAa,UAAiB,SAAQ,mBAAkB;IAWtD,YACE,MAAiB,EACjB,QAAkB,EAClB,IAA8B,EAC9B,OAA4B;QAE5B,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAEvC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;IAC9B,CAAC;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;IACzB,CAAC;IAED,kDAAkD;IAClD,cAAc;QACZ,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACjC,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QACvB,IAAI,QAAQ,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC,MAAM,CAAC;QACzC,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACzD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAC7C,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,YAAY;QACV,MAA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C9B,IAAI,CAAC,MAAM,EAAE;YACX,OAAO,IAAI,CAAC;SACb;QAED,OAAO;YACL,MAAM,EAAE;gBACN,SAAS,EAAE,MAAM;aAClB;SACF,CAAC;IACJ,CAAC;CACF;AArDD,gCAqDC"}
|
package/pagination.mjs
CHANGED
|
@@ -9,6 +9,9 @@ export class CursorPage extends AbstractPage {
|
|
|
9
9
|
getPaginatedItems() {
|
|
10
10
|
return this.data ?? [];
|
|
11
11
|
}
|
|
12
|
+
hasNextPage() {
|
|
13
|
+
return this.nextPageInfo() != null;
|
|
14
|
+
}
|
|
12
15
|
// @deprecated Please use `nextPageInfo()` instead
|
|
13
16
|
nextPageParams() {
|
|
14
17
|
const info = this.nextPageInfo();
|
package/pagination.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.mjs","sourceRoot":"","sources":["src/pagination.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,YAAY,EAAsD;AA0B3E,MAAM,OAAO,UAAiB,SAAQ,YAAkB;IAWtD,YACE,MAAiB,EACjB,QAAkB,EAClB,IAA8B,EAC9B,OAA4B;QAE5B,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAEvC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;IAC9B,CAAC;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;IACzB,CAAC;IAED,kDAAkD;IAClD,cAAc;QACZ,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACjC,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QACvB,IAAI,QAAQ,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC,MAAM,CAAC;QACzC,MAAM,MAAM,GAAG,MAAM,CAAC,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GAAG,CAAC,YAAY,CAAC,CAAC;QACzD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAC7C,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,YAAY;QACV,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC;QAC9B,IAAI,CAAC,MAAM,EAAE;YACX,OAAO,IAAI,CAAC;SACb;QAED,OAAO;YACL,MAAM,EAAE;gBACN,SAAS,EAAE,MAAM;aAClB;SACF,CAAC;IACJ,CAAC;CACF"}
|
package/resource.d.ts
CHANGED
package/resource.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,8BAAsB,WAAW;IAC/B,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC;gBAEjB,MAAM,EAAE,SAAS;CAG9B"}
|
package/resource.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.js","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAItF,
|
|
1
|
+
{"version":3,"file":"resource.js","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAItF,MAAsB,WAAW;IAG/B,YAAY,MAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;CACF;AAND,kCAMC"}
|