@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/resources/plans.mjs
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../resource.mjs";
|
|
3
|
-
import { isRequestOptions } from "../core.mjs";
|
|
4
|
-
import { CursorPage } from "../pagination.mjs";
|
|
5
|
-
export class Plans extends APIResource {
|
|
6
|
-
list(query = {}, options) {
|
|
7
|
-
if (isRequestOptions(query)) {
|
|
8
|
-
return this.list({}, query);
|
|
9
|
-
}
|
|
10
|
-
return this._client.getAPIList('/plans', PlanListResponsesCursorPage, { query, ...options });
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Fetch high level details of a specific plan.
|
|
14
|
-
*/
|
|
15
|
-
getDetails(params, options) {
|
|
16
|
-
const { plan_id } = params;
|
|
17
|
-
return this._client.get(`/planDetails/${plan_id}`, options);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Fetches a list of charges of a specific plan.
|
|
21
|
-
*/
|
|
22
|
-
listCharges(params, options) {
|
|
23
|
-
const { plan_id, ...query } = params;
|
|
24
|
-
return this._client.getAPIList(`/planDetails/${plan_id}/charges`, PlanListChargesResponsesCursorPage, {
|
|
25
|
-
query,
|
|
26
|
-
...options,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Fetches a list of customers on a specific plan (by default, only currently
|
|
31
|
-
* active plans are included)
|
|
32
|
-
*/
|
|
33
|
-
listCustomers(params, options) {
|
|
34
|
-
const { plan_id, ...query } = params;
|
|
35
|
-
return this._client.getAPIList(`/planDetails/${plan_id}/customers`, PlanListCustomersResponsesCursorPage, { query, ...options });
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
export class PlanListResponsesCursorPage extends CursorPage {
|
|
39
|
-
}
|
|
40
|
-
export class PlanListChargesResponsesCursorPage extends CursorPage {
|
|
41
|
-
}
|
|
42
|
-
export class PlanListCustomersResponsesCursorPage extends CursorPage {
|
|
43
|
-
}
|
|
44
|
-
Plans.PlanListResponsesCursorPage = PlanListResponsesCursorPage;
|
|
45
|
-
Plans.PlanListChargesResponsesCursorPage = PlanListChargesResponsesCursorPage;
|
|
46
|
-
Plans.PlanListCustomersResponsesCursorPage = PlanListCustomersResponsesCursorPage;
|
|
47
|
-
//# sourceMappingURL=plans.mjs.map
|
package/resources/plans.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plans.mjs","sourceRoot":"","sources":["../src/resources/plans.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAIpB,EAAE,UAAU,EAAyB;AAE5C,MAAM,OAAO,KAAM,SAAQ,WAAW;IASpC,IAAI,CACF,QAA8C,EAAE,EAChD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,2BAA2B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;OAEG;IACH,UAAU,CACR,MAA4B,EAC5B,OAA6B;QAE7B,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,WAAW,CACT,MAA6B,EAC7B,OAA6B;QAE7B,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,OAAO,UAAU,EAAE,kCAAkC,EAAE;YACpG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,aAAa,CACX,MAA+B,EAC/B,OAA6B;QAE7B,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,gBAAgB,OAAO,YAAY,EACnC,oCAAoC,EACpC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,2BAA4B,SAAQ,UAA4B;CAAG;AAEhF,MAAM,OAAO,kCAAmC,SAAQ,UAAmC;CAAG;AAE9F,MAAM,OAAO,oCAAqC,SAAQ,UAAqC;CAAG;AAyNlG,KAAK,CAAC,2BAA2B,GAAG,2BAA2B,CAAC;AAChE,KAAK,CAAC,kCAAkC,GAAG,kCAAkC,CAAC;AAC9E,KAAK,CAAC,oCAAoC,GAAG,oCAAoC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-units.d.ts","sourceRoot":"","sources":["../src/resources/pricing-units.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAElE,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,IAAI,CACF,KAAK,CAAC,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,WAAW,CAAC,kCAAkC,EAAE,uBAAuB,CAAC;IAChF,IAAI,CACF,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,WAAW,CAAC,kCAAkC,EAAE,uBAAuB,CAAC;CAajF;AAED,qBAAa,kCAAmC,SAAQ,UAAU,CAAC,uBAAuB,CAAC;CAAG;AAE9F,MAAM,WAAW,uBAAuB;IACtC,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;CAAG;AAIlE,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,kCAAkC,IAAI,kCAAkC,EACxE,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-units.js","sourceRoot":"","sources":["../src/resources/pricing-units.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAC1C,qCAA2C;AAE3C,iDAAkE;AAElE,MAAa,YAAa,SAAQ,sBAAW;IAW3C,IAAI,CACF,QAAqD,EAAE,EACvD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE,kCAAkC,EAAE;YACvF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAvBD,oCAuBC;AAED,MAAa,kCAAmC,SAAQ,uBAAmC;CAAG;AAA9F,gFAA8F;AAY9F,YAAY,CAAC,kCAAkC,GAAG,kCAAkC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-units.mjs","sourceRoot":"","sources":["../src/resources/pricing-units.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,EAAE,UAAU,EAAyB;AAE5C,MAAM,OAAO,YAAa,SAAQ,WAAW;IAW3C,IAAI,CACF,QAAqD,EAAE,EACvD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE,kCAAkC,EAAE;YACvF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,kCAAmC,SAAQ,UAAmC;CAAG;AAY9F,YAAY,CAAC,kCAAkC,GAAG,kCAAkC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../src/resources/services.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;OAKG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;CAG1E;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,KAAK,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;CAC9C;AAED,yBAAiB,mBAAmB,CAAC;IACnC,UAAiB,OAAO;QACtB,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAEnB,IAAI,EAAE,MAAM,CAAC;QAEb,KAAK,EAAE,wBAAwB,GAAG,wBAAwB,CAAC;KAC5D;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CAC5D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services.js","sourceRoot":"","sources":["../src/resources/services.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;OAKG;IACH,IAAI,CAAC,OAA6B;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;CACF;AAVD,4BAUC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services.mjs","sourceRoot":"","sources":["../src/resources/services.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;OAKG;IACH,IAAI,CAAC,OAA6B;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;CACF"}
|
package/resources/usage.d.ts
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../resource.js";
|
|
2
|
-
import * as Core from "../core.js";
|
|
3
|
-
import { CursorPage, type CursorPageParams } from "../pagination.js";
|
|
4
|
-
export declare class Usage extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Fetch aggregated usage data for multiple customers and billable-metrics, broken
|
|
7
|
-
* into intervals of the specified length.
|
|
8
|
-
*/
|
|
9
|
-
list(params: UsageListParams, options?: Core.RequestOptions): Core.APIPromise<UsageListResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* Send usage events to Metronome. The body of this request is expected to be a
|
|
12
|
-
* JSON array of between 1 and 100 usage events. Compressed request bodies are
|
|
13
|
-
* supported with a `Content-Encoding: gzip` header. See
|
|
14
|
-
* [Getting usage into Metronome](https://docs.metronome.com/connect-metronome/) to
|
|
15
|
-
* learn more about usage events.
|
|
16
|
-
*/
|
|
17
|
-
ingest(body: UsageIngestParams, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
18
|
-
/**
|
|
19
|
-
* Fetch aggregated usage data for the specified customer, billable-metric, and
|
|
20
|
-
* optional group, broken into intervals of the specified length.
|
|
21
|
-
*/
|
|
22
|
-
listWithGroups(params: UsageListWithGroupsParams, options?: Core.RequestOptions): Core.PagePromise<UsageListWithGroupsResponsesCursorPage, UsageListWithGroupsResponse>;
|
|
23
|
-
}
|
|
24
|
-
export declare class UsageListWithGroupsResponsesCursorPage extends CursorPage<UsageListWithGroupsResponse> {
|
|
25
|
-
}
|
|
26
|
-
export interface UsageListResponse {
|
|
27
|
-
data: Array<UsageListResponse.Data>;
|
|
28
|
-
next_page: string | null;
|
|
29
|
-
}
|
|
30
|
-
export declare namespace UsageListResponse {
|
|
31
|
-
interface Data {
|
|
32
|
-
billable_metric_id: string;
|
|
33
|
-
billable_metric_name: string;
|
|
34
|
-
customer_id: string;
|
|
35
|
-
end_timestamp: string;
|
|
36
|
-
start_timestamp: string;
|
|
37
|
-
value: number | null;
|
|
38
|
-
/**
|
|
39
|
-
* Values will be either a number or null. Null indicates that there were no
|
|
40
|
-
* matches for the group_by value.
|
|
41
|
-
*/
|
|
42
|
-
groups?: Record<string, number | null>;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
export interface UsageListWithGroupsResponse {
|
|
46
|
-
ending_before: string;
|
|
47
|
-
group_key: string | null;
|
|
48
|
-
group_value: string | null;
|
|
49
|
-
starting_on: string;
|
|
50
|
-
value: number | null;
|
|
51
|
-
}
|
|
52
|
-
export interface UsageListParams {
|
|
53
|
-
/**
|
|
54
|
-
* Body param:
|
|
55
|
-
*/
|
|
56
|
-
ending_before: string;
|
|
57
|
-
/**
|
|
58
|
-
* Body param:
|
|
59
|
-
*/
|
|
60
|
-
starting_on: string;
|
|
61
|
-
/**
|
|
62
|
-
* Body param: A window_size of "day" or "hour" will return the usage for the
|
|
63
|
-
* specified period segmented into daily or hourly aggregates. A window_size of
|
|
64
|
-
* "none" will return a single usage aggregate for the entirety of the specified
|
|
65
|
-
* period.
|
|
66
|
-
*/
|
|
67
|
-
window_size: 'HOUR' | 'DAY' | 'NONE';
|
|
68
|
-
/**
|
|
69
|
-
* Query param: Cursor that indicates where the next page of results should start.
|
|
70
|
-
*/
|
|
71
|
-
next_page?: string;
|
|
72
|
-
/**
|
|
73
|
-
* Body param: A list of billable metrics to fetch usage for. If absent, all
|
|
74
|
-
* billable metrics will be returned.
|
|
75
|
-
*/
|
|
76
|
-
billable_metrics?: Array<UsageListParams.BillableMetric>;
|
|
77
|
-
/**
|
|
78
|
-
* Body param: A list of Metronome customer IDs to fetch usage for. If absent,
|
|
79
|
-
* usage for all customers will be returned.
|
|
80
|
-
*/
|
|
81
|
-
customer_ids?: Array<string>;
|
|
82
|
-
}
|
|
83
|
-
export declare namespace UsageListParams {
|
|
84
|
-
interface BillableMetric {
|
|
85
|
-
id: string;
|
|
86
|
-
group_by?: BillableMetric.GroupBy;
|
|
87
|
-
}
|
|
88
|
-
namespace BillableMetric {
|
|
89
|
-
interface GroupBy {
|
|
90
|
-
/**
|
|
91
|
-
* The name of the group_by key to use
|
|
92
|
-
*/
|
|
93
|
-
key: string;
|
|
94
|
-
/**
|
|
95
|
-
* Values of the group_by key to return in the query. If this field is omitted, all
|
|
96
|
-
* available values will be returned, up to a maximum of 200.
|
|
97
|
-
*/
|
|
98
|
-
values?: Array<string>;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
export type UsageIngestParams = Array<UsageIngestParams.Usage>;
|
|
103
|
-
export declare namespace UsageIngestParams {
|
|
104
|
-
interface Usage {
|
|
105
|
-
customer_id: string;
|
|
106
|
-
event_type: string;
|
|
107
|
-
/**
|
|
108
|
-
* RFC 3339 formatted
|
|
109
|
-
*/
|
|
110
|
-
timestamp: string;
|
|
111
|
-
transaction_id: string;
|
|
112
|
-
properties?: Record<string, unknown>;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
export interface UsageListWithGroupsParams extends CursorPageParams {
|
|
116
|
-
/**
|
|
117
|
-
* Body param:
|
|
118
|
-
*/
|
|
119
|
-
billable_metric_id: string;
|
|
120
|
-
/**
|
|
121
|
-
* Body param:
|
|
122
|
-
*/
|
|
123
|
-
customer_id: string;
|
|
124
|
-
/**
|
|
125
|
-
* Body param: A window_size of "day" or "hour" will return the usage for the
|
|
126
|
-
* specified period segmented into daily or hourly aggregates. A window_size of
|
|
127
|
-
* "none" will return a single usage aggregate for the entirety of the specified
|
|
128
|
-
* period.
|
|
129
|
-
*/
|
|
130
|
-
window_size: 'HOUR' | 'DAY' | 'NONE';
|
|
131
|
-
/**
|
|
132
|
-
* Body param: If true, will return the usage for the current billing period. Will
|
|
133
|
-
* return an error if the customer is currently uncontracted or starting_on and
|
|
134
|
-
* ending_before are specified when this is true.
|
|
135
|
-
*/
|
|
136
|
-
current_period?: boolean;
|
|
137
|
-
/**
|
|
138
|
-
* Body param:
|
|
139
|
-
*/
|
|
140
|
-
ending_before?: string;
|
|
141
|
-
/**
|
|
142
|
-
* Body param:
|
|
143
|
-
*/
|
|
144
|
-
group_by?: UsageListWithGroupsParams.GroupBy;
|
|
145
|
-
/**
|
|
146
|
-
* Body param:
|
|
147
|
-
*/
|
|
148
|
-
starting_on?: string;
|
|
149
|
-
}
|
|
150
|
-
export declare namespace UsageListWithGroupsParams {
|
|
151
|
-
interface GroupBy {
|
|
152
|
-
/**
|
|
153
|
-
* The name of the group_by key to use
|
|
154
|
-
*/
|
|
155
|
-
key: string;
|
|
156
|
-
/**
|
|
157
|
-
* Values of the group_by key to return in the query. Omit this if you'd like all
|
|
158
|
-
* values for the key returned.
|
|
159
|
-
*/
|
|
160
|
-
values?: Array<string>;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
export declare namespace Usage {
|
|
164
|
-
export { type UsageListResponse as UsageListResponse, type UsageListWithGroupsResponse as UsageListWithGroupsResponse, UsageListWithGroupsResponsesCursorPage as UsageListWithGroupsResponsesCursorPage, type UsageListParams as UsageListParams, type UsageIngestParams as UsageIngestParams, type UsageListWithGroupsParams as UsageListWithGroupsParams, };
|
|
165
|
-
}
|
|
166
|
-
//# sourceMappingURL=usage.d.ts.map
|
package/resources/usage.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAElE,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAKhG;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;IAQrF;;;OAGG;IACH,cAAc,CACZ,MAAM,EAAE,yBAAyB,EACjC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,WAAW,CAAC,sCAAsC,EAAE,2BAA2B,CAAC;CASzF;AAED,qBAAa,sCAAuC,SAAQ,UAAU,CAAC,2BAA2B,CAAC;CAAG;AAEtG,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEpC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,IAAI;QACnB,kBAAkB,EAAE,MAAM,CAAC;QAE3B,oBAAoB,EAAE,MAAM,CAAC;QAE7B,WAAW,EAAE,MAAM,CAAC;QAEpB,aAAa,EAAE,MAAM,CAAC;QAEtB,eAAe,EAAE,MAAM,CAAC;QAExB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB;;;WAGG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;KACxC;CACF;AAED,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,MAAM,CAAC;IAEtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,WAAW,EAAE,MAAM,CAAC;IAEpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,WAAW,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IAErC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;IAEzD;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC9B;AAED,yBAAiB,eAAe,CAAC;IAC/B,UAAiB,cAAc;QAC7B,EAAE,EAAE,MAAM,CAAC;QAEX,QAAQ,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC;KACnC;IAED,UAAiB,cAAc,CAAC;QAC9B,UAAiB,OAAO;YACtB;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;YAEZ;;;eAGG;YACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;SACxB;KACF;CACF;AAED,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAE/D,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,KAAK;QACpB,WAAW,EAAE,MAAM,CAAC;QAEpB,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB,cAAc,EAAE,MAAM,CAAC;QAEvB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACtC;CACF;AAED,MAAM,WAAW,yBAA0B,SAAQ,gBAAgB;IACjE;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,WAAW,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IAErC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,OAAO,CAAC;IAE7C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,yBAAiB,yBAAyB,CAAC;IACzC,UAAiB,OAAO;QACtB;;WAEG;QACH,GAAG,EAAE,MAAM,CAAC;QAEZ;;;WAGG;QACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;KACxB;CACF;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,sCAAsC,IAAI,sCAAsC,EAChF,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
package/resources/usage.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.UsageListWithGroupsResponsesCursorPage = exports.Usage = void 0;
|
|
5
|
-
const resource_1 = require("../resource.js");
|
|
6
|
-
const pagination_1 = require("../pagination.js");
|
|
7
|
-
class Usage extends resource_1.APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Fetch aggregated usage data for multiple customers and billable-metrics, broken
|
|
10
|
-
* into intervals of the specified length.
|
|
11
|
-
*/
|
|
12
|
-
list(params, options) {
|
|
13
|
-
const { next_page, ...body } = params;
|
|
14
|
-
return this._client.post('/usage', { query: { next_page }, body, ...options });
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Send usage events to Metronome. The body of this request is expected to be a
|
|
18
|
-
* JSON array of between 1 and 100 usage events. Compressed request bodies are
|
|
19
|
-
* supported with a `Content-Encoding: gzip` header. See
|
|
20
|
-
* [Getting usage into Metronome](https://docs.metronome.com/connect-metronome/) to
|
|
21
|
-
* learn more about usage events.
|
|
22
|
-
*/
|
|
23
|
-
ingest(body, options) {
|
|
24
|
-
return this._client.post('/ingest', {
|
|
25
|
-
body,
|
|
26
|
-
...options,
|
|
27
|
-
headers: { Accept: '*/*', ...options?.headers },
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Fetch aggregated usage data for the specified customer, billable-metric, and
|
|
32
|
-
* optional group, broken into intervals of the specified length.
|
|
33
|
-
*/
|
|
34
|
-
listWithGroups(params, options) {
|
|
35
|
-
const { limit, next_page, ...body } = params;
|
|
36
|
-
return this._client.getAPIList('/usage/groups', UsageListWithGroupsResponsesCursorPage, {
|
|
37
|
-
query: { limit, next_page },
|
|
38
|
-
body,
|
|
39
|
-
method: 'post',
|
|
40
|
-
...options,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.Usage = Usage;
|
|
45
|
-
class UsageListWithGroupsResponsesCursorPage extends pagination_1.CursorPage {
|
|
46
|
-
}
|
|
47
|
-
exports.UsageListWithGroupsResponsesCursorPage = UsageListWithGroupsResponsesCursorPage;
|
|
48
|
-
Usage.UsageListWithGroupsResponsesCursorPage = UsageListWithGroupsResponsesCursorPage;
|
|
49
|
-
//# sourceMappingURL=usage.js.map
|
package/resources/usage.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage.js","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAE1C,iDAAkE;AAElE,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;OAGG;IACH,IAAI,CAAC,MAAuB,EAAE,OAA6B;QACzD,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,IAAuB,EAAE,OAA6B;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE;YAClC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,cAAc,CACZ,MAAiC,EACjC,OAA6B;QAE7B,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,eAAe,EAAE,sCAAsC,EAAE;YACtF,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;YAC3B,IAAI;YACJ,MAAM,EAAE,MAAM;YACd,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAzCD,sBAyCC;AAED,MAAa,sCAAuC,SAAQ,uBAAuC;CAAG;AAAtG,wFAAsG;AAkLtG,KAAK,CAAC,sCAAsC,GAAG,sCAAsC,CAAC"}
|
package/resources/usage.mjs
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../resource.mjs";
|
|
3
|
-
import { CursorPage } from "../pagination.mjs";
|
|
4
|
-
export class Usage extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Fetch aggregated usage data for multiple customers and billable-metrics, broken
|
|
7
|
-
* into intervals of the specified length.
|
|
8
|
-
*/
|
|
9
|
-
list(params, options) {
|
|
10
|
-
const { next_page, ...body } = params;
|
|
11
|
-
return this._client.post('/usage', { query: { next_page }, body, ...options });
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Send usage events to Metronome. The body of this request is expected to be a
|
|
15
|
-
* JSON array of between 1 and 100 usage events. Compressed request bodies are
|
|
16
|
-
* supported with a `Content-Encoding: gzip` header. See
|
|
17
|
-
* [Getting usage into Metronome](https://docs.metronome.com/connect-metronome/) to
|
|
18
|
-
* learn more about usage events.
|
|
19
|
-
*/
|
|
20
|
-
ingest(body, options) {
|
|
21
|
-
return this._client.post('/ingest', {
|
|
22
|
-
body,
|
|
23
|
-
...options,
|
|
24
|
-
headers: { Accept: '*/*', ...options?.headers },
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Fetch aggregated usage data for the specified customer, billable-metric, and
|
|
29
|
-
* optional group, broken into intervals of the specified length.
|
|
30
|
-
*/
|
|
31
|
-
listWithGroups(params, options) {
|
|
32
|
-
const { limit, next_page, ...body } = params;
|
|
33
|
-
return this._client.getAPIList('/usage/groups', UsageListWithGroupsResponsesCursorPage, {
|
|
34
|
-
query: { limit, next_page },
|
|
35
|
-
body,
|
|
36
|
-
method: 'post',
|
|
37
|
-
...options,
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
export class UsageListWithGroupsResponsesCursorPage extends CursorPage {
|
|
42
|
-
}
|
|
43
|
-
Usage.UsageListWithGroupsResponsesCursorPage = UsageListWithGroupsResponsesCursorPage;
|
|
44
|
-
//# sourceMappingURL=usage.mjs.map
|
package/resources/usage.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage.mjs","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,UAAU,EAAyB;AAE5C,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,IAAI,CAAC,MAAuB,EAAE,OAA6B;QACzD,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,IAAuB,EAAE,OAA6B;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE;YAClC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,cAAc,CACZ,MAAiC,EACjC,OAA6B;QAE7B,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,eAAe,EAAE,sCAAsC,EAAE;YACtF,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;YAC3B,IAAI;YACJ,MAAM,EAAE,MAAM;YACd,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,sCAAuC,SAAQ,UAAuC;CAAG;AAkLtG,KAAK,CAAC,sCAAsC,GAAG,sCAAsC,CAAC"}
|
package/src/resources/usage.ts
DELETED
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import * as Core from '../core';
|
|
5
|
-
import { CursorPage, type CursorPageParams } from '../pagination';
|
|
6
|
-
|
|
7
|
-
export class Usage extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Fetch aggregated usage data for multiple customers and billable-metrics, broken
|
|
10
|
-
* into intervals of the specified length.
|
|
11
|
-
*/
|
|
12
|
-
list(params: UsageListParams, options?: Core.RequestOptions): Core.APIPromise<UsageListResponse> {
|
|
13
|
-
const { next_page, ...body } = params;
|
|
14
|
-
return this._client.post('/usage', { query: { next_page }, body, ...options });
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Send usage events to Metronome. The body of this request is expected to be a
|
|
19
|
-
* JSON array of between 1 and 100 usage events. Compressed request bodies are
|
|
20
|
-
* supported with a `Content-Encoding: gzip` header. See
|
|
21
|
-
* [Getting usage into Metronome](https://docs.metronome.com/connect-metronome/) to
|
|
22
|
-
* learn more about usage events.
|
|
23
|
-
*/
|
|
24
|
-
ingest(body: UsageIngestParams, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
25
|
-
return this._client.post('/ingest', {
|
|
26
|
-
body,
|
|
27
|
-
...options,
|
|
28
|
-
headers: { Accept: '*/*', ...options?.headers },
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Fetch aggregated usage data for the specified customer, billable-metric, and
|
|
34
|
-
* optional group, broken into intervals of the specified length.
|
|
35
|
-
*/
|
|
36
|
-
listWithGroups(
|
|
37
|
-
params: UsageListWithGroupsParams,
|
|
38
|
-
options?: Core.RequestOptions,
|
|
39
|
-
): Core.PagePromise<UsageListWithGroupsResponsesCursorPage, UsageListWithGroupsResponse> {
|
|
40
|
-
const { limit, next_page, ...body } = params;
|
|
41
|
-
return this._client.getAPIList('/usage/groups', UsageListWithGroupsResponsesCursorPage, {
|
|
42
|
-
query: { limit, next_page },
|
|
43
|
-
body,
|
|
44
|
-
method: 'post',
|
|
45
|
-
...options,
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export class UsageListWithGroupsResponsesCursorPage extends CursorPage<UsageListWithGroupsResponse> {}
|
|
51
|
-
|
|
52
|
-
export interface UsageListResponse {
|
|
53
|
-
data: Array<UsageListResponse.Data>;
|
|
54
|
-
|
|
55
|
-
next_page: string | null;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export namespace UsageListResponse {
|
|
59
|
-
export interface Data {
|
|
60
|
-
billable_metric_id: string;
|
|
61
|
-
|
|
62
|
-
billable_metric_name: string;
|
|
63
|
-
|
|
64
|
-
customer_id: string;
|
|
65
|
-
|
|
66
|
-
end_timestamp: string;
|
|
67
|
-
|
|
68
|
-
start_timestamp: string;
|
|
69
|
-
|
|
70
|
-
value: number | null;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Values will be either a number or null. Null indicates that there were no
|
|
74
|
-
* matches for the group_by value.
|
|
75
|
-
*/
|
|
76
|
-
groups?: Record<string, number | null>;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export interface UsageListWithGroupsResponse {
|
|
81
|
-
ending_before: string;
|
|
82
|
-
|
|
83
|
-
group_key: string | null;
|
|
84
|
-
|
|
85
|
-
group_value: string | null;
|
|
86
|
-
|
|
87
|
-
starting_on: string;
|
|
88
|
-
|
|
89
|
-
value: number | null;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export interface UsageListParams {
|
|
93
|
-
/**
|
|
94
|
-
* Body param:
|
|
95
|
-
*/
|
|
96
|
-
ending_before: string;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Body param:
|
|
100
|
-
*/
|
|
101
|
-
starting_on: string;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Body param: A window_size of "day" or "hour" will return the usage for the
|
|
105
|
-
* specified period segmented into daily or hourly aggregates. A window_size of
|
|
106
|
-
* "none" will return a single usage aggregate for the entirety of the specified
|
|
107
|
-
* period.
|
|
108
|
-
*/
|
|
109
|
-
window_size: 'HOUR' | 'DAY' | 'NONE';
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Query param: Cursor that indicates where the next page of results should start.
|
|
113
|
-
*/
|
|
114
|
-
next_page?: string;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Body param: A list of billable metrics to fetch usage for. If absent, all
|
|
118
|
-
* billable metrics will be returned.
|
|
119
|
-
*/
|
|
120
|
-
billable_metrics?: Array<UsageListParams.BillableMetric>;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Body param: A list of Metronome customer IDs to fetch usage for. If absent,
|
|
124
|
-
* usage for all customers will be returned.
|
|
125
|
-
*/
|
|
126
|
-
customer_ids?: Array<string>;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export namespace UsageListParams {
|
|
130
|
-
export interface BillableMetric {
|
|
131
|
-
id: string;
|
|
132
|
-
|
|
133
|
-
group_by?: BillableMetric.GroupBy;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export namespace BillableMetric {
|
|
137
|
-
export interface GroupBy {
|
|
138
|
-
/**
|
|
139
|
-
* The name of the group_by key to use
|
|
140
|
-
*/
|
|
141
|
-
key: string;
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Values of the group_by key to return in the query. If this field is omitted, all
|
|
145
|
-
* available values will be returned, up to a maximum of 200.
|
|
146
|
-
*/
|
|
147
|
-
values?: Array<string>;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export type UsageIngestParams = Array<UsageIngestParams.Usage>;
|
|
153
|
-
|
|
154
|
-
export namespace UsageIngestParams {
|
|
155
|
-
export interface Usage {
|
|
156
|
-
customer_id: string;
|
|
157
|
-
|
|
158
|
-
event_type: string;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* RFC 3339 formatted
|
|
162
|
-
*/
|
|
163
|
-
timestamp: string;
|
|
164
|
-
|
|
165
|
-
transaction_id: string;
|
|
166
|
-
|
|
167
|
-
properties?: Record<string, unknown>;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export interface UsageListWithGroupsParams extends CursorPageParams {
|
|
172
|
-
/**
|
|
173
|
-
* Body param:
|
|
174
|
-
*/
|
|
175
|
-
billable_metric_id: string;
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Body param:
|
|
179
|
-
*/
|
|
180
|
-
customer_id: string;
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Body param: A window_size of "day" or "hour" will return the usage for the
|
|
184
|
-
* specified period segmented into daily or hourly aggregates. A window_size of
|
|
185
|
-
* "none" will return a single usage aggregate for the entirety of the specified
|
|
186
|
-
* period.
|
|
187
|
-
*/
|
|
188
|
-
window_size: 'HOUR' | 'DAY' | 'NONE';
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Body param: If true, will return the usage for the current billing period. Will
|
|
192
|
-
* return an error if the customer is currently uncontracted or starting_on and
|
|
193
|
-
* ending_before are specified when this is true.
|
|
194
|
-
*/
|
|
195
|
-
current_period?: boolean;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Body param:
|
|
199
|
-
*/
|
|
200
|
-
ending_before?: string;
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Body param:
|
|
204
|
-
*/
|
|
205
|
-
group_by?: UsageListWithGroupsParams.GroupBy;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Body param:
|
|
209
|
-
*/
|
|
210
|
-
starting_on?: string;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export namespace UsageListWithGroupsParams {
|
|
214
|
-
export interface GroupBy {
|
|
215
|
-
/**
|
|
216
|
-
* The name of the group_by key to use
|
|
217
|
-
*/
|
|
218
|
-
key: string;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Values of the group_by key to return in the query. Omit this if you'd like all
|
|
222
|
-
* values for the key returned.
|
|
223
|
-
*/
|
|
224
|
-
values?: Array<string>;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
Usage.UsageListWithGroupsResponsesCursorPage = UsageListWithGroupsResponsesCursorPage;
|
|
229
|
-
|
|
230
|
-
export declare namespace Usage {
|
|
231
|
-
export {
|
|
232
|
-
type UsageListResponse as UsageListResponse,
|
|
233
|
-
type UsageListWithGroupsResponse as UsageListWithGroupsResponse,
|
|
234
|
-
UsageListWithGroupsResponsesCursorPage as UsageListWithGroupsResponsesCursorPage,
|
|
235
|
-
type UsageListParams as UsageListParams,
|
|
236
|
-
type UsageIngestParams as UsageIngestParams,
|
|
237
|
-
type UsageListWithGroupsParams as UsageListWithGroupsParams,
|
|
238
|
-
};
|
|
239
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|