@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/src/resources/shared.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Shared from
|
|
3
|
+
import * as Shared from "./shared.js";
|
|
4
4
|
|
|
5
5
|
export interface BaseUsageFilter {
|
|
6
6
|
group_key: string;
|
|
@@ -34,6 +34,12 @@ export interface Commit {
|
|
|
34
34
|
|
|
35
35
|
applicable_product_tags?: Array<string>;
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* RFC 3339 timestamp indicating when the commit was archived. If not provided, the
|
|
39
|
+
* commit is not archived.
|
|
40
|
+
*/
|
|
41
|
+
archived_at?: string;
|
|
42
|
+
|
|
37
43
|
/**
|
|
38
44
|
* The current balance of the credit or commit. This balance reflects the amount of
|
|
39
45
|
* credit or commit that the customer has access to use at this moment - thus,
|
|
@@ -48,10 +54,15 @@ export interface Commit {
|
|
|
48
54
|
|
|
49
55
|
contract?: Commit.Contract;
|
|
50
56
|
|
|
51
|
-
custom_fields?:
|
|
57
|
+
custom_fields?: { [key: string]: string };
|
|
52
58
|
|
|
53
59
|
description?: string;
|
|
54
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Optional configuration for commit hierarchy access control
|
|
63
|
+
*/
|
|
64
|
+
hierarchy_configuration?: Commit.HierarchyConfiguration;
|
|
65
|
+
|
|
55
66
|
/**
|
|
56
67
|
* The contract that this commit will be billed on.
|
|
57
68
|
*/
|
|
@@ -73,6 +84,7 @@ export interface Commit {
|
|
|
73
84
|
| Commit.PrepaidCommitExpirationLedgerEntry
|
|
74
85
|
| Commit.PrepaidCommitCanceledLedgerEntry
|
|
75
86
|
| Commit.PrepaidCommitCreditedLedgerEntry
|
|
87
|
+
| Commit.PrepaidCommitSeatBasedAdjustmentLedgerEntry
|
|
76
88
|
| Commit.PostpaidCommitInitialBalanceLedgerEntry
|
|
77
89
|
| Commit.PostpaidCommitAutomatedInvoiceDeductionLedgerEntry
|
|
78
90
|
| Commit.PostpaidCommitRolloverLedgerEntry
|
|
@@ -106,6 +118,13 @@ export interface Commit {
|
|
|
106
118
|
*/
|
|
107
119
|
salesforce_opportunity_id?: string;
|
|
108
120
|
|
|
121
|
+
/**
|
|
122
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
123
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
124
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
125
|
+
*/
|
|
126
|
+
specifiers?: Array<Commit.Specifier>;
|
|
127
|
+
|
|
109
128
|
/**
|
|
110
129
|
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
111
130
|
* is made with a uniqueness key that was previously used to create a commit or
|
|
@@ -126,6 +145,32 @@ export namespace Commit {
|
|
|
126
145
|
id: string;
|
|
127
146
|
}
|
|
128
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Optional configuration for commit hierarchy access control
|
|
150
|
+
*/
|
|
151
|
+
export interface HierarchyConfiguration {
|
|
152
|
+
child_access:
|
|
153
|
+
| HierarchyConfiguration.CommitHierarchyChildAccessAll
|
|
154
|
+
| HierarchyConfiguration.CommitHierarchyChildAccessNone
|
|
155
|
+
| HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export namespace HierarchyConfiguration {
|
|
159
|
+
export interface CommitHierarchyChildAccessAll {
|
|
160
|
+
type: 'ALL';
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface CommitHierarchyChildAccessNone {
|
|
164
|
+
type: 'NONE';
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export interface CommitHierarchyChildAccessContractIDs {
|
|
168
|
+
contract_ids: Array<string>;
|
|
169
|
+
|
|
170
|
+
type: 'CONTRACT_IDS';
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
129
174
|
/**
|
|
130
175
|
* The contract that this commit will be billed on.
|
|
131
176
|
*/
|
|
@@ -201,6 +246,16 @@ export namespace Commit {
|
|
|
201
246
|
type: 'PREPAID_COMMIT_CREDITED';
|
|
202
247
|
}
|
|
203
248
|
|
|
249
|
+
export interface PrepaidCommitSeatBasedAdjustmentLedgerEntry {
|
|
250
|
+
amount: number;
|
|
251
|
+
|
|
252
|
+
segment_id: string;
|
|
253
|
+
|
|
254
|
+
timestamp: string;
|
|
255
|
+
|
|
256
|
+
type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT';
|
|
257
|
+
}
|
|
258
|
+
|
|
204
259
|
export interface PostpaidCommitInitialBalanceLedgerEntry {
|
|
205
260
|
amount: number;
|
|
206
261
|
|
|
@@ -276,6 +331,23 @@ export namespace Commit {
|
|
|
276
331
|
|
|
277
332
|
contract_id: string;
|
|
278
333
|
}
|
|
334
|
+
|
|
335
|
+
export interface Specifier {
|
|
336
|
+
presentation_group_values?: { [key: string]: string };
|
|
337
|
+
|
|
338
|
+
pricing_group_values?: { [key: string]: string };
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
342
|
+
*/
|
|
343
|
+
product_id?: string;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
347
|
+
* tags.
|
|
348
|
+
*/
|
|
349
|
+
product_tags?: Array<string>;
|
|
350
|
+
}
|
|
279
351
|
}
|
|
280
352
|
|
|
281
353
|
export interface ContractWithoutAmendments {
|
|
@@ -304,6 +376,14 @@ export interface ContractWithoutAmendments {
|
|
|
304
376
|
|
|
305
377
|
ending_before?: string;
|
|
306
378
|
|
|
379
|
+
/**
|
|
380
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
381
|
+
* configuration with a single parent.
|
|
382
|
+
*/
|
|
383
|
+
hierarchy_configuration?:
|
|
384
|
+
| ContractWithoutAmendments.ParentHierarchyConfiguration
|
|
385
|
+
| ContractWithoutAmendments.ChildHierarchyConfiguration;
|
|
386
|
+
|
|
307
387
|
name?: string;
|
|
308
388
|
|
|
309
389
|
net_payment_terms_days?: number;
|
|
@@ -313,6 +393,8 @@ export interface ContractWithoutAmendments {
|
|
|
313
393
|
*/
|
|
314
394
|
netsuite_sales_order_id?: string;
|
|
315
395
|
|
|
396
|
+
prepaid_balance_threshold_configuration?: ContractWithoutAmendments.PrepaidBalanceThresholdConfiguration;
|
|
397
|
+
|
|
316
398
|
/**
|
|
317
399
|
* This field's availability is dependent on your client's configuration.
|
|
318
400
|
*/
|
|
@@ -343,6 +425,8 @@ export interface ContractWithoutAmendments {
|
|
|
343
425
|
*/
|
|
344
426
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
345
427
|
|
|
428
|
+
spend_threshold_configuration?: ContractWithoutAmendments.SpendThresholdConfiguration;
|
|
429
|
+
|
|
346
430
|
/**
|
|
347
431
|
* This field's availability is dependent on your client's configuration.
|
|
348
432
|
*/
|
|
@@ -366,7 +450,191 @@ export namespace ContractWithoutAmendments {
|
|
|
366
450
|
*/
|
|
367
451
|
billing_anchor_date: string;
|
|
368
452
|
|
|
369
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
453
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export interface ParentHierarchyConfiguration {
|
|
457
|
+
/**
|
|
458
|
+
* List of contracts that belong to this parent.
|
|
459
|
+
*/
|
|
460
|
+
children: Array<ParentHierarchyConfiguration.Child>;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export namespace ParentHierarchyConfiguration {
|
|
464
|
+
export interface Child {
|
|
465
|
+
contract_id: string;
|
|
466
|
+
|
|
467
|
+
customer_id: string;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export interface ChildHierarchyConfiguration {
|
|
472
|
+
/**
|
|
473
|
+
* The single parent contract/customer for this child.
|
|
474
|
+
*/
|
|
475
|
+
parent: ChildHierarchyConfiguration.Parent;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export namespace ChildHierarchyConfiguration {
|
|
479
|
+
/**
|
|
480
|
+
* The single parent contract/customer for this child.
|
|
481
|
+
*/
|
|
482
|
+
export interface Parent {
|
|
483
|
+
contract_id: string;
|
|
484
|
+
|
|
485
|
+
customer_id: string;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export interface PrepaidBalanceThresholdConfiguration {
|
|
490
|
+
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* When set to false, the contract will not be evaluated against the
|
|
494
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
495
|
+
* regardless of prior state.
|
|
496
|
+
*/
|
|
497
|
+
is_enabled: boolean;
|
|
498
|
+
|
|
499
|
+
payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Specify the amount the balance should be recharged to.
|
|
503
|
+
*/
|
|
504
|
+
recharge_to_amount: number;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Specify the threshold amount for the contract. Each time the contract's prepaid
|
|
508
|
+
* balance lowers to this amount, a threshold charge will be initiated.
|
|
509
|
+
*/
|
|
510
|
+
threshold_amount: number;
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
514
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
515
|
+
*/
|
|
516
|
+
custom_credit_type_id?: string;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
export namespace PrepaidBalanceThresholdConfiguration {
|
|
520
|
+
export interface Commit {
|
|
521
|
+
/**
|
|
522
|
+
* The commit product that will be used to generate the line item for commit
|
|
523
|
+
* payment.
|
|
524
|
+
*/
|
|
525
|
+
product_id: string;
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
529
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
530
|
+
* all products.
|
|
531
|
+
*/
|
|
532
|
+
applicable_product_ids?: Array<string>;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
536
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
537
|
+
* all products.
|
|
538
|
+
*/
|
|
539
|
+
applicable_product_tags?: Array<string>;
|
|
540
|
+
|
|
541
|
+
description?: string;
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
545
|
+
* will default to the commit product name.
|
|
546
|
+
*/
|
|
547
|
+
name?: string;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
551
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
552
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
553
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
554
|
+
*/
|
|
555
|
+
specifiers?: Array<Commit.Specifier>;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export namespace Commit {
|
|
559
|
+
export interface Specifier {
|
|
560
|
+
presentation_group_values?: { [key: string]: string };
|
|
561
|
+
|
|
562
|
+
pricing_group_values?: { [key: string]: string };
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
566
|
+
*/
|
|
567
|
+
product_id?: string;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
571
|
+
* tags.
|
|
572
|
+
*/
|
|
573
|
+
product_tags?: Array<string>;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export interface PaymentGateConfig {
|
|
578
|
+
/**
|
|
579
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
580
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
581
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
582
|
+
* wish to payment gate the commit balance.
|
|
583
|
+
*/
|
|
584
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
588
|
+
*/
|
|
589
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
593
|
+
*/
|
|
594
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
598
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
599
|
+
* will default to NONE.
|
|
600
|
+
*/
|
|
601
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export namespace PaymentGateConfig {
|
|
605
|
+
/**
|
|
606
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
607
|
+
*/
|
|
608
|
+
export interface PrecalculatedTaxConfig {
|
|
609
|
+
/**
|
|
610
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
611
|
+
* denomination as the commit's invoice schedule
|
|
612
|
+
*/
|
|
613
|
+
tax_amount: number;
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
617
|
+
* description.
|
|
618
|
+
*/
|
|
619
|
+
tax_name?: string;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
624
|
+
*/
|
|
625
|
+
export interface StripeConfig {
|
|
626
|
+
/**
|
|
627
|
+
* If left blank, will default to INVOICE
|
|
628
|
+
*/
|
|
629
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
633
|
+
* your payment type.
|
|
634
|
+
*/
|
|
635
|
+
invoice_metadata?: { [key: string]: string };
|
|
636
|
+
}
|
|
637
|
+
}
|
|
370
638
|
}
|
|
371
639
|
|
|
372
640
|
export interface RecurringCommit {
|
|
@@ -421,6 +689,11 @@ export namespace ContractWithoutAmendments {
|
|
|
421
689
|
*/
|
|
422
690
|
ending_before?: string;
|
|
423
691
|
|
|
692
|
+
/**
|
|
693
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
694
|
+
*/
|
|
695
|
+
hierarchy_configuration?: RecurringCommit.HierarchyConfiguration;
|
|
696
|
+
|
|
424
697
|
/**
|
|
425
698
|
* The amount the customer should be billed for the commit. Not required.
|
|
426
699
|
*/
|
|
@@ -436,12 +709,34 @@ export namespace ContractWithoutAmendments {
|
|
|
436
709
|
*/
|
|
437
710
|
netsuite_sales_order_id?: string;
|
|
438
711
|
|
|
712
|
+
/**
|
|
713
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
714
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
715
|
+
*/
|
|
716
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
720
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
721
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
722
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
723
|
+
* invoice dates.
|
|
724
|
+
*/
|
|
725
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
726
|
+
|
|
439
727
|
/**
|
|
440
728
|
* Will be passed down to the individual commits. This controls how much of an
|
|
441
729
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
442
730
|
* between 0 and 1.
|
|
443
731
|
*/
|
|
444
732
|
rollover_fraction?: number;
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
736
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
737
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
738
|
+
*/
|
|
739
|
+
specifiers?: Array<RecurringCommit.Specifier>;
|
|
445
740
|
}
|
|
446
741
|
|
|
447
742
|
export namespace RecurringCommit {
|
|
@@ -451,9 +746,9 @@ export namespace ContractWithoutAmendments {
|
|
|
451
746
|
export interface AccessAmount {
|
|
452
747
|
credit_type_id: string;
|
|
453
748
|
|
|
454
|
-
quantity: number;
|
|
455
|
-
|
|
456
749
|
unit_price: number;
|
|
750
|
+
|
|
751
|
+
quantity?: number;
|
|
457
752
|
}
|
|
458
753
|
|
|
459
754
|
/**
|
|
@@ -475,6 +770,32 @@ export namespace ContractWithoutAmendments {
|
|
|
475
770
|
id: string;
|
|
476
771
|
}
|
|
477
772
|
|
|
773
|
+
/**
|
|
774
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
775
|
+
*/
|
|
776
|
+
export interface HierarchyConfiguration {
|
|
777
|
+
child_access:
|
|
778
|
+
| HierarchyConfiguration.CommitHierarchyChildAccessAll
|
|
779
|
+
| HierarchyConfiguration.CommitHierarchyChildAccessNone
|
|
780
|
+
| HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
export namespace HierarchyConfiguration {
|
|
784
|
+
export interface CommitHierarchyChildAccessAll {
|
|
785
|
+
type: 'ALL';
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
export interface CommitHierarchyChildAccessNone {
|
|
789
|
+
type: 'NONE';
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
export interface CommitHierarchyChildAccessContractIDs {
|
|
793
|
+
contract_ids: Array<string>;
|
|
794
|
+
|
|
795
|
+
type: 'CONTRACT_IDS';
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
|
|
478
799
|
/**
|
|
479
800
|
* The amount the customer should be billed for the commit. Not required.
|
|
480
801
|
*/
|
|
@@ -485,6 +806,23 @@ export namespace ContractWithoutAmendments {
|
|
|
485
806
|
|
|
486
807
|
unit_price: number;
|
|
487
808
|
}
|
|
809
|
+
|
|
810
|
+
export interface Specifier {
|
|
811
|
+
presentation_group_values?: { [key: string]: string };
|
|
812
|
+
|
|
813
|
+
pricing_group_values?: { [key: string]: string };
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
817
|
+
*/
|
|
818
|
+
product_id?: string;
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
822
|
+
* tags.
|
|
823
|
+
*/
|
|
824
|
+
product_tags?: Array<string>;
|
|
825
|
+
}
|
|
488
826
|
}
|
|
489
827
|
|
|
490
828
|
export interface RecurringCredit {
|
|
@@ -540,9 +878,9 @@ export namespace ContractWithoutAmendments {
|
|
|
540
878
|
ending_before?: string;
|
|
541
879
|
|
|
542
880
|
/**
|
|
543
|
-
*
|
|
881
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
544
882
|
*/
|
|
545
|
-
|
|
883
|
+
hierarchy_configuration?: RecurringCredit.HierarchyConfiguration;
|
|
546
884
|
|
|
547
885
|
/**
|
|
548
886
|
* Displayed on invoices. Will be passed through to the individual commits
|
|
@@ -554,12 +892,34 @@ export namespace ContractWithoutAmendments {
|
|
|
554
892
|
*/
|
|
555
893
|
netsuite_sales_order_id?: string;
|
|
556
894
|
|
|
895
|
+
/**
|
|
896
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
897
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
898
|
+
*/
|
|
899
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
903
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
904
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
905
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
906
|
+
* invoice dates.
|
|
907
|
+
*/
|
|
908
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
909
|
+
|
|
557
910
|
/**
|
|
558
911
|
* Will be passed down to the individual commits. This controls how much of an
|
|
559
912
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
560
913
|
* between 0 and 1.
|
|
561
914
|
*/
|
|
562
915
|
rollover_fraction?: number;
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
919
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
920
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
921
|
+
*/
|
|
922
|
+
specifiers?: Array<RecurringCredit.Specifier>;
|
|
563
923
|
}
|
|
564
924
|
|
|
565
925
|
export namespace RecurringCredit {
|
|
@@ -569,9 +929,9 @@ export namespace ContractWithoutAmendments {
|
|
|
569
929
|
export interface AccessAmount {
|
|
570
930
|
credit_type_id: string;
|
|
571
931
|
|
|
572
|
-
quantity: number;
|
|
573
|
-
|
|
574
932
|
unit_price: number;
|
|
933
|
+
|
|
934
|
+
quantity?: number;
|
|
575
935
|
}
|
|
576
936
|
|
|
577
937
|
/**
|
|
@@ -594,14 +954,46 @@ export namespace ContractWithoutAmendments {
|
|
|
594
954
|
}
|
|
595
955
|
|
|
596
956
|
/**
|
|
597
|
-
*
|
|
957
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
598
958
|
*/
|
|
599
|
-
export interface
|
|
600
|
-
|
|
959
|
+
export interface HierarchyConfiguration {
|
|
960
|
+
child_access:
|
|
961
|
+
| HierarchyConfiguration.CommitHierarchyChildAccessAll
|
|
962
|
+
| HierarchyConfiguration.CommitHierarchyChildAccessNone
|
|
963
|
+
| HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
964
|
+
}
|
|
601
965
|
|
|
602
|
-
|
|
966
|
+
export namespace HierarchyConfiguration {
|
|
967
|
+
export interface CommitHierarchyChildAccessAll {
|
|
968
|
+
type: 'ALL';
|
|
969
|
+
}
|
|
603
970
|
|
|
604
|
-
|
|
971
|
+
export interface CommitHierarchyChildAccessNone {
|
|
972
|
+
type: 'NONE';
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
export interface CommitHierarchyChildAccessContractIDs {
|
|
976
|
+
contract_ids: Array<string>;
|
|
977
|
+
|
|
978
|
+
type: 'CONTRACT_IDS';
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
export interface Specifier {
|
|
983
|
+
presentation_group_values?: { [key: string]: string };
|
|
984
|
+
|
|
985
|
+
pricing_group_values?: { [key: string]: string };
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
989
|
+
*/
|
|
990
|
+
product_id?: string;
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
994
|
+
* tags.
|
|
995
|
+
*/
|
|
996
|
+
product_tags?: Array<string>;
|
|
605
997
|
}
|
|
606
998
|
}
|
|
607
999
|
|
|
@@ -633,6 +1025,105 @@ export namespace ContractWithoutAmendments {
|
|
|
633
1025
|
reseller_contract_value?: number;
|
|
634
1026
|
}
|
|
635
1027
|
|
|
1028
|
+
export interface SpendThresholdConfiguration {
|
|
1029
|
+
commit: SpendThresholdConfiguration.Commit;
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* When set to false, the contract will not be evaluated against the
|
|
1033
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1034
|
+
* regardless of prior state.
|
|
1035
|
+
*/
|
|
1036
|
+
is_enabled: boolean;
|
|
1037
|
+
|
|
1038
|
+
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
1042
|
+
* hits this amount, a threshold charge will be initiated.
|
|
1043
|
+
*/
|
|
1044
|
+
threshold_amount: number;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
export namespace SpendThresholdConfiguration {
|
|
1048
|
+
export interface Commit {
|
|
1049
|
+
/**
|
|
1050
|
+
* The commit product that will be used to generate the line item for commit
|
|
1051
|
+
* payment.
|
|
1052
|
+
*/
|
|
1053
|
+
product_id: string;
|
|
1054
|
+
|
|
1055
|
+
description?: string;
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
1059
|
+
* will default to the commit product name.
|
|
1060
|
+
*/
|
|
1061
|
+
name?: string;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
export interface PaymentGateConfig {
|
|
1065
|
+
/**
|
|
1066
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
1067
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1068
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
1069
|
+
* wish to payment gate the commit balance.
|
|
1070
|
+
*/
|
|
1071
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1075
|
+
*/
|
|
1076
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
1080
|
+
*/
|
|
1081
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1085
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1086
|
+
* will default to NONE.
|
|
1087
|
+
*/
|
|
1088
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
export namespace PaymentGateConfig {
|
|
1092
|
+
/**
|
|
1093
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1094
|
+
*/
|
|
1095
|
+
export interface PrecalculatedTaxConfig {
|
|
1096
|
+
/**
|
|
1097
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
1098
|
+
* denomination as the commit's invoice schedule
|
|
1099
|
+
*/
|
|
1100
|
+
tax_amount: number;
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
1104
|
+
* description.
|
|
1105
|
+
*/
|
|
1106
|
+
tax_name?: string;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
1111
|
+
*/
|
|
1112
|
+
export interface StripeConfig {
|
|
1113
|
+
/**
|
|
1114
|
+
* If left blank, will default to INVOICE
|
|
1115
|
+
*/
|
|
1116
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1117
|
+
|
|
1118
|
+
/**
|
|
1119
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
1120
|
+
* your payment type.
|
|
1121
|
+
*/
|
|
1122
|
+
invoice_metadata?: { [key: string]: string };
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
|
|
636
1127
|
export interface UsageFilter {
|
|
637
1128
|
current: Shared.BaseUsageFilter | null;
|
|
638
1129
|
|
|
@@ -684,10 +1175,15 @@ export interface Credit {
|
|
|
684
1175
|
|
|
685
1176
|
contract?: Credit.Contract;
|
|
686
1177
|
|
|
687
|
-
custom_fields?:
|
|
1178
|
+
custom_fields?: { [key: string]: string };
|
|
688
1179
|
|
|
689
1180
|
description?: string;
|
|
690
1181
|
|
|
1182
|
+
/**
|
|
1183
|
+
* Optional configuration for credit hierarchy access control
|
|
1184
|
+
*/
|
|
1185
|
+
hierarchy_configuration?: Credit.HierarchyConfiguration;
|
|
1186
|
+
|
|
691
1187
|
/**
|
|
692
1188
|
* A list of ordered events that impact the balance of a credit. For example, an
|
|
693
1189
|
* invoice deduction or an expiration.
|
|
@@ -699,6 +1195,7 @@ export interface Credit {
|
|
|
699
1195
|
| Credit.CreditCanceledLedgerEntry
|
|
700
1196
|
| Credit.CreditCreditedLedgerEntry
|
|
701
1197
|
| Credit.CreditManualLedgerEntry
|
|
1198
|
+
| Credit.CreditSeatBasedAdjustmentLedgerEntry
|
|
702
1199
|
>;
|
|
703
1200
|
|
|
704
1201
|
name?: string;
|
|
@@ -721,6 +1218,13 @@ export interface Credit {
|
|
|
721
1218
|
*/
|
|
722
1219
|
salesforce_opportunity_id?: string;
|
|
723
1220
|
|
|
1221
|
+
/**
|
|
1222
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1223
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1224
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1225
|
+
*/
|
|
1226
|
+
specifiers?: Array<Credit.Specifier>;
|
|
1227
|
+
|
|
724
1228
|
/**
|
|
725
1229
|
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
726
1230
|
* is made with a uniqueness key that was previously used to create a commit or
|
|
@@ -741,6 +1245,32 @@ export namespace Credit {
|
|
|
741
1245
|
id: string;
|
|
742
1246
|
}
|
|
743
1247
|
|
|
1248
|
+
/**
|
|
1249
|
+
* Optional configuration for credit hierarchy access control
|
|
1250
|
+
*/
|
|
1251
|
+
export interface HierarchyConfiguration {
|
|
1252
|
+
child_access:
|
|
1253
|
+
| HierarchyConfiguration.CommitHierarchyChildAccessAll
|
|
1254
|
+
| HierarchyConfiguration.CommitHierarchyChildAccessNone
|
|
1255
|
+
| HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
export namespace HierarchyConfiguration {
|
|
1259
|
+
export interface CommitHierarchyChildAccessAll {
|
|
1260
|
+
type: 'ALL';
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
export interface CommitHierarchyChildAccessNone {
|
|
1264
|
+
type: 'NONE';
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
export interface CommitHierarchyChildAccessContractIDs {
|
|
1268
|
+
contract_ids: Array<string>;
|
|
1269
|
+
|
|
1270
|
+
type: 'CONTRACT_IDS';
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
|
|
744
1274
|
export interface CreditSegmentStartLedgerEntry {
|
|
745
1275
|
amount: number;
|
|
746
1276
|
|
|
@@ -806,6 +1336,33 @@ export namespace Credit {
|
|
|
806
1336
|
|
|
807
1337
|
type: 'CREDIT_MANUAL';
|
|
808
1338
|
}
|
|
1339
|
+
|
|
1340
|
+
export interface CreditSeatBasedAdjustmentLedgerEntry {
|
|
1341
|
+
amount: number;
|
|
1342
|
+
|
|
1343
|
+
segment_id: string;
|
|
1344
|
+
|
|
1345
|
+
timestamp: string;
|
|
1346
|
+
|
|
1347
|
+
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
export interface Specifier {
|
|
1351
|
+
presentation_group_values?: { [key: string]: string };
|
|
1352
|
+
|
|
1353
|
+
pricing_group_values?: { [key: string]: string };
|
|
1354
|
+
|
|
1355
|
+
/**
|
|
1356
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1357
|
+
*/
|
|
1358
|
+
product_id?: string;
|
|
1359
|
+
|
|
1360
|
+
/**
|
|
1361
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
1362
|
+
* tags.
|
|
1363
|
+
*/
|
|
1364
|
+
product_tags?: Array<string>;
|
|
1365
|
+
}
|
|
809
1366
|
}
|
|
810
1367
|
|
|
811
1368
|
export interface CreditTypeData {
|
|
@@ -821,7 +1378,7 @@ export interface Discount {
|
|
|
821
1378
|
|
|
822
1379
|
schedule: SchedulePointInTime;
|
|
823
1380
|
|
|
824
|
-
custom_fields?:
|
|
1381
|
+
custom_fields?: { [key: string]: string };
|
|
825
1382
|
|
|
826
1383
|
name?: string;
|
|
827
1384
|
|
|
@@ -921,16 +1478,18 @@ export interface Override {
|
|
|
921
1478
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
922
1479
|
* processors.
|
|
923
1480
|
*/
|
|
924
|
-
value?:
|
|
1481
|
+
value?: { [key: string]: unknown };
|
|
925
1482
|
}
|
|
926
1483
|
|
|
927
1484
|
export namespace Override {
|
|
928
1485
|
export interface OverrideSpecifier {
|
|
1486
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1487
|
+
|
|
929
1488
|
commit_ids?: Array<string>;
|
|
930
1489
|
|
|
931
|
-
presentation_group_values?:
|
|
1490
|
+
presentation_group_values?: { [key: string]: string | null };
|
|
932
1491
|
|
|
933
|
-
pricing_group_values?:
|
|
1492
|
+
pricing_group_values?: { [key: string]: string };
|
|
934
1493
|
|
|
935
1494
|
product_id?: string;
|
|
936
1495
|
|
|
@@ -956,7 +1515,7 @@ export namespace Override {
|
|
|
956
1515
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
957
1516
|
* processors.
|
|
958
1517
|
*/
|
|
959
|
-
custom_rate?:
|
|
1518
|
+
custom_rate?: { [key: string]: unknown };
|
|
960
1519
|
|
|
961
1520
|
/**
|
|
962
1521
|
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
@@ -1041,7 +1600,7 @@ export interface ProService {
|
|
|
1041
1600
|
*/
|
|
1042
1601
|
unit_price: number;
|
|
1043
1602
|
|
|
1044
|
-
custom_fields?:
|
|
1603
|
+
custom_fields?: { [key: string]: string };
|
|
1045
1604
|
|
|
1046
1605
|
description?: string;
|
|
1047
1606
|
|
|
@@ -1060,7 +1619,7 @@ export interface Rate {
|
|
|
1060
1619
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
1061
1620
|
* processors.
|
|
1062
1621
|
*/
|
|
1063
|
-
custom_rate?:
|
|
1622
|
+
custom_rate?: { [key: string]: unknown };
|
|
1064
1623
|
|
|
1065
1624
|
/**
|
|
1066
1625
|
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
@@ -1078,7 +1637,7 @@ export interface Rate {
|
|
|
1078
1637
|
* if pricing groups are used, this will contain the values used to calculate the
|
|
1079
1638
|
* price
|
|
1080
1639
|
*/
|
|
1081
|
-
pricing_group_values?:
|
|
1640
|
+
pricing_group_values?: { [key: string]: string };
|
|
1082
1641
|
|
|
1083
1642
|
/**
|
|
1084
1643
|
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
@@ -1105,7 +1664,9 @@ export interface ScheduledCharge {
|
|
|
1105
1664
|
|
|
1106
1665
|
schedule: SchedulePointInTime;
|
|
1107
1666
|
|
|
1108
|
-
|
|
1667
|
+
archived_at?: string;
|
|
1668
|
+
|
|
1669
|
+
custom_fields?: { [key: string]: string };
|
|
1109
1670
|
|
|
1110
1671
|
/**
|
|
1111
1672
|
* displayed on invoices
|
|
@@ -1156,13 +1717,13 @@ export namespace SchedulePointInTime {
|
|
|
1156
1717
|
|
|
1157
1718
|
amount: number;
|
|
1158
1719
|
|
|
1159
|
-
invoice_id: string;
|
|
1160
|
-
|
|
1161
1720
|
quantity: number;
|
|
1162
1721
|
|
|
1163
1722
|
timestamp: string;
|
|
1164
1723
|
|
|
1165
1724
|
unit_price: number;
|
|
1725
|
+
|
|
1726
|
+
invoice_id?: string | null;
|
|
1166
1727
|
}
|
|
1167
1728
|
}
|
|
1168
1729
|
|