@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/shared.d.ts
CHANGED
|
@@ -20,6 +20,11 @@ export interface Commit {
|
|
|
20
20
|
applicable_contract_ids?: Array<string>;
|
|
21
21
|
applicable_product_ids?: Array<string>;
|
|
22
22
|
applicable_product_tags?: Array<string>;
|
|
23
|
+
/**
|
|
24
|
+
* RFC 3339 timestamp indicating when the commit was archived. If not provided, the
|
|
25
|
+
* commit is not archived.
|
|
26
|
+
*/
|
|
27
|
+
archived_at?: string;
|
|
23
28
|
/**
|
|
24
29
|
* The current balance of the credit or commit. This balance reflects the amount of
|
|
25
30
|
* credit or commit that the customer has access to use at this moment - thus,
|
|
@@ -32,8 +37,14 @@ export interface Commit {
|
|
|
32
37
|
*/
|
|
33
38
|
balance?: number;
|
|
34
39
|
contract?: Commit.Contract;
|
|
35
|
-
custom_fields?:
|
|
40
|
+
custom_fields?: {
|
|
41
|
+
[key: string]: string;
|
|
42
|
+
};
|
|
36
43
|
description?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Optional configuration for commit hierarchy access control
|
|
46
|
+
*/
|
|
47
|
+
hierarchy_configuration?: Commit.HierarchyConfiguration;
|
|
37
48
|
/**
|
|
38
49
|
* The contract that this commit will be billed on.
|
|
39
50
|
*/
|
|
@@ -46,7 +57,7 @@ export interface Commit {
|
|
|
46
57
|
* A list of ordered events that impact the balance of a commit. For example, an
|
|
47
58
|
* invoice deduction or a rollover.
|
|
48
59
|
*/
|
|
49
|
-
ledger?: Array<Commit.PrepaidCommitSegmentStartLedgerEntry | Commit.PrepaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PrepaidCommitRolloverLedgerEntry | Commit.PrepaidCommitExpirationLedgerEntry | Commit.PrepaidCommitCanceledLedgerEntry | Commit.PrepaidCommitCreditedLedgerEntry | Commit.PostpaidCommitInitialBalanceLedgerEntry | Commit.PostpaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PostpaidCommitRolloverLedgerEntry | Commit.PostpaidCommitTrueupLedgerEntry | Commit.PrepaidCommitManualLedgerEntry | Commit.PostpaidCommitManualLedgerEntry | Commit.PostpaidCommitExpirationLedgerEntry>;
|
|
60
|
+
ledger?: Array<Commit.PrepaidCommitSegmentStartLedgerEntry | Commit.PrepaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PrepaidCommitRolloverLedgerEntry | Commit.PrepaidCommitExpirationLedgerEntry | Commit.PrepaidCommitCanceledLedgerEntry | Commit.PrepaidCommitCreditedLedgerEntry | Commit.PrepaidCommitSeatBasedAdjustmentLedgerEntry | Commit.PostpaidCommitInitialBalanceLedgerEntry | Commit.PostpaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PostpaidCommitRolloverLedgerEntry | Commit.PostpaidCommitTrueupLedgerEntry | Commit.PrepaidCommitManualLedgerEntry | Commit.PostpaidCommitManualLedgerEntry | Commit.PostpaidCommitExpirationLedgerEntry>;
|
|
50
61
|
name?: string;
|
|
51
62
|
/**
|
|
52
63
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -64,6 +75,12 @@ export interface Commit {
|
|
|
64
75
|
* This field's availability is dependent on your client's configuration.
|
|
65
76
|
*/
|
|
66
77
|
salesforce_opportunity_id?: string;
|
|
78
|
+
/**
|
|
79
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
80
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
81
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
82
|
+
*/
|
|
83
|
+
specifiers?: Array<Commit.Specifier>;
|
|
67
84
|
/**
|
|
68
85
|
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
69
86
|
* is made with a uniqueness key that was previously used to create a commit or
|
|
@@ -80,6 +97,24 @@ export declare namespace Commit {
|
|
|
80
97
|
interface Contract {
|
|
81
98
|
id: string;
|
|
82
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Optional configuration for commit hierarchy access control
|
|
102
|
+
*/
|
|
103
|
+
interface HierarchyConfiguration {
|
|
104
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
105
|
+
}
|
|
106
|
+
namespace HierarchyConfiguration {
|
|
107
|
+
interface CommitHierarchyChildAccessAll {
|
|
108
|
+
type: 'ALL';
|
|
109
|
+
}
|
|
110
|
+
interface CommitHierarchyChildAccessNone {
|
|
111
|
+
type: 'NONE';
|
|
112
|
+
}
|
|
113
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
114
|
+
contract_ids: Array<string>;
|
|
115
|
+
type: 'CONTRACT_IDS';
|
|
116
|
+
}
|
|
117
|
+
}
|
|
83
118
|
/**
|
|
84
119
|
* The contract that this commit will be billed on.
|
|
85
120
|
*/
|
|
@@ -126,6 +161,12 @@ export declare namespace Commit {
|
|
|
126
161
|
timestamp: string;
|
|
127
162
|
type: 'PREPAID_COMMIT_CREDITED';
|
|
128
163
|
}
|
|
164
|
+
interface PrepaidCommitSeatBasedAdjustmentLedgerEntry {
|
|
165
|
+
amount: number;
|
|
166
|
+
segment_id: string;
|
|
167
|
+
timestamp: string;
|
|
168
|
+
type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT';
|
|
169
|
+
}
|
|
129
170
|
interface PostpaidCommitInitialBalanceLedgerEntry {
|
|
130
171
|
amount: number;
|
|
131
172
|
timestamp: string;
|
|
@@ -172,6 +213,23 @@ export declare namespace Commit {
|
|
|
172
213
|
commit_id: string;
|
|
173
214
|
contract_id: string;
|
|
174
215
|
}
|
|
216
|
+
interface Specifier {
|
|
217
|
+
presentation_group_values?: {
|
|
218
|
+
[key: string]: string;
|
|
219
|
+
};
|
|
220
|
+
pricing_group_values?: {
|
|
221
|
+
[key: string]: string;
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
225
|
+
*/
|
|
226
|
+
product_id?: string;
|
|
227
|
+
/**
|
|
228
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
229
|
+
* tags.
|
|
230
|
+
*/
|
|
231
|
+
product_tags?: Array<string>;
|
|
232
|
+
}
|
|
175
233
|
}
|
|
176
234
|
export interface ContractWithoutAmendments {
|
|
177
235
|
commits: Array<Commit>;
|
|
@@ -188,12 +246,18 @@ export interface ContractWithoutAmendments {
|
|
|
188
246
|
*/
|
|
189
247
|
discounts?: Array<Discount>;
|
|
190
248
|
ending_before?: string;
|
|
249
|
+
/**
|
|
250
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
251
|
+
* configuration with a single parent.
|
|
252
|
+
*/
|
|
253
|
+
hierarchy_configuration?: ContractWithoutAmendments.ParentHierarchyConfiguration | ContractWithoutAmendments.ChildHierarchyConfiguration;
|
|
191
254
|
name?: string;
|
|
192
255
|
net_payment_terms_days?: number;
|
|
193
256
|
/**
|
|
194
257
|
* This field's availability is dependent on your client's configuration.
|
|
195
258
|
*/
|
|
196
259
|
netsuite_sales_order_id?: string;
|
|
260
|
+
prepaid_balance_threshold_configuration?: ContractWithoutAmendments.PrepaidBalanceThresholdConfiguration;
|
|
197
261
|
/**
|
|
198
262
|
* This field's availability is dependent on your client's configuration.
|
|
199
263
|
*/
|
|
@@ -217,6 +281,7 @@ export interface ContractWithoutAmendments {
|
|
|
217
281
|
* on a separate invoice from usage charges.
|
|
218
282
|
*/
|
|
219
283
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
284
|
+
spend_threshold_configuration?: ContractWithoutAmendments.SpendThresholdConfiguration;
|
|
220
285
|
/**
|
|
221
286
|
* This field's availability is dependent on your client's configuration.
|
|
222
287
|
*/
|
|
@@ -234,7 +299,167 @@ export declare namespace ContractWithoutAmendments {
|
|
|
234
299
|
* Contract usage statements follow a selected cadence based on this date.
|
|
235
300
|
*/
|
|
236
301
|
billing_anchor_date: string;
|
|
237
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
302
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
303
|
+
}
|
|
304
|
+
interface ParentHierarchyConfiguration {
|
|
305
|
+
/**
|
|
306
|
+
* List of contracts that belong to this parent.
|
|
307
|
+
*/
|
|
308
|
+
children: Array<ParentHierarchyConfiguration.Child>;
|
|
309
|
+
}
|
|
310
|
+
namespace ParentHierarchyConfiguration {
|
|
311
|
+
interface Child {
|
|
312
|
+
contract_id: string;
|
|
313
|
+
customer_id: string;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
interface ChildHierarchyConfiguration {
|
|
317
|
+
/**
|
|
318
|
+
* The single parent contract/customer for this child.
|
|
319
|
+
*/
|
|
320
|
+
parent: ChildHierarchyConfiguration.Parent;
|
|
321
|
+
}
|
|
322
|
+
namespace ChildHierarchyConfiguration {
|
|
323
|
+
/**
|
|
324
|
+
* The single parent contract/customer for this child.
|
|
325
|
+
*/
|
|
326
|
+
interface Parent {
|
|
327
|
+
contract_id: string;
|
|
328
|
+
customer_id: string;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
interface PrepaidBalanceThresholdConfiguration {
|
|
332
|
+
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
333
|
+
/**
|
|
334
|
+
* When set to false, the contract will not be evaluated against the
|
|
335
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
336
|
+
* regardless of prior state.
|
|
337
|
+
*/
|
|
338
|
+
is_enabled: boolean;
|
|
339
|
+
payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
340
|
+
/**
|
|
341
|
+
* Specify the amount the balance should be recharged to.
|
|
342
|
+
*/
|
|
343
|
+
recharge_to_amount: number;
|
|
344
|
+
/**
|
|
345
|
+
* Specify the threshold amount for the contract. Each time the contract's prepaid
|
|
346
|
+
* balance lowers to this amount, a threshold charge will be initiated.
|
|
347
|
+
*/
|
|
348
|
+
threshold_amount: number;
|
|
349
|
+
/**
|
|
350
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
351
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
352
|
+
*/
|
|
353
|
+
custom_credit_type_id?: string;
|
|
354
|
+
}
|
|
355
|
+
namespace PrepaidBalanceThresholdConfiguration {
|
|
356
|
+
interface Commit {
|
|
357
|
+
/**
|
|
358
|
+
* The commit product that will be used to generate the line item for commit
|
|
359
|
+
* payment.
|
|
360
|
+
*/
|
|
361
|
+
product_id: string;
|
|
362
|
+
/**
|
|
363
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
364
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
365
|
+
* all products.
|
|
366
|
+
*/
|
|
367
|
+
applicable_product_ids?: Array<string>;
|
|
368
|
+
/**
|
|
369
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
370
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
371
|
+
* all products.
|
|
372
|
+
*/
|
|
373
|
+
applicable_product_tags?: Array<string>;
|
|
374
|
+
description?: string;
|
|
375
|
+
/**
|
|
376
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
377
|
+
* will default to the commit product name.
|
|
378
|
+
*/
|
|
379
|
+
name?: string;
|
|
380
|
+
/**
|
|
381
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
382
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
383
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
384
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
385
|
+
*/
|
|
386
|
+
specifiers?: Array<Commit.Specifier>;
|
|
387
|
+
}
|
|
388
|
+
namespace Commit {
|
|
389
|
+
interface Specifier {
|
|
390
|
+
presentation_group_values?: {
|
|
391
|
+
[key: string]: string;
|
|
392
|
+
};
|
|
393
|
+
pricing_group_values?: {
|
|
394
|
+
[key: string]: string;
|
|
395
|
+
};
|
|
396
|
+
/**
|
|
397
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
398
|
+
*/
|
|
399
|
+
product_id?: string;
|
|
400
|
+
/**
|
|
401
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
402
|
+
* tags.
|
|
403
|
+
*/
|
|
404
|
+
product_tags?: Array<string>;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
interface PaymentGateConfig {
|
|
408
|
+
/**
|
|
409
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
410
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
411
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
412
|
+
* wish to payment gate the commit balance.
|
|
413
|
+
*/
|
|
414
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
415
|
+
/**
|
|
416
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
417
|
+
*/
|
|
418
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
419
|
+
/**
|
|
420
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
421
|
+
*/
|
|
422
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
423
|
+
/**
|
|
424
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
425
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
426
|
+
* will default to NONE.
|
|
427
|
+
*/
|
|
428
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
429
|
+
}
|
|
430
|
+
namespace PaymentGateConfig {
|
|
431
|
+
/**
|
|
432
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
433
|
+
*/
|
|
434
|
+
interface PrecalculatedTaxConfig {
|
|
435
|
+
/**
|
|
436
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
437
|
+
* denomination as the commit's invoice schedule
|
|
438
|
+
*/
|
|
439
|
+
tax_amount: number;
|
|
440
|
+
/**
|
|
441
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
442
|
+
* description.
|
|
443
|
+
*/
|
|
444
|
+
tax_name?: string;
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
448
|
+
*/
|
|
449
|
+
interface StripeConfig {
|
|
450
|
+
/**
|
|
451
|
+
* If left blank, will default to INVOICE
|
|
452
|
+
*/
|
|
453
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
454
|
+
/**
|
|
455
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
456
|
+
* your payment type.
|
|
457
|
+
*/
|
|
458
|
+
invoice_metadata?: {
|
|
459
|
+
[key: string]: string;
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
}
|
|
238
463
|
}
|
|
239
464
|
interface RecurringCommit {
|
|
240
465
|
id: string;
|
|
@@ -276,6 +501,10 @@ export declare namespace ContractWithoutAmendments {
|
|
|
276
501
|
* Determines when the contract will stop creating recurring commits. Optional
|
|
277
502
|
*/
|
|
278
503
|
ending_before?: string;
|
|
504
|
+
/**
|
|
505
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
506
|
+
*/
|
|
507
|
+
hierarchy_configuration?: RecurringCommit.HierarchyConfiguration;
|
|
279
508
|
/**
|
|
280
509
|
* The amount the customer should be billed for the commit. Not required.
|
|
281
510
|
*/
|
|
@@ -288,12 +517,31 @@ export declare namespace ContractWithoutAmendments {
|
|
|
288
517
|
* Will be passed down to the individual commits
|
|
289
518
|
*/
|
|
290
519
|
netsuite_sales_order_id?: string;
|
|
520
|
+
/**
|
|
521
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
522
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
523
|
+
*/
|
|
524
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
525
|
+
/**
|
|
526
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
527
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
528
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
529
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
530
|
+
* invoice dates.
|
|
531
|
+
*/
|
|
532
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
291
533
|
/**
|
|
292
534
|
* Will be passed down to the individual commits. This controls how much of an
|
|
293
535
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
294
536
|
* between 0 and 1.
|
|
295
537
|
*/
|
|
296
538
|
rollover_fraction?: number;
|
|
539
|
+
/**
|
|
540
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
541
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
542
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
543
|
+
*/
|
|
544
|
+
specifiers?: Array<RecurringCommit.Specifier>;
|
|
297
545
|
}
|
|
298
546
|
namespace RecurringCommit {
|
|
299
547
|
/**
|
|
@@ -301,8 +549,8 @@ export declare namespace ContractWithoutAmendments {
|
|
|
301
549
|
*/
|
|
302
550
|
interface AccessAmount {
|
|
303
551
|
credit_type_id: string;
|
|
304
|
-
quantity: number;
|
|
305
552
|
unit_price: number;
|
|
553
|
+
quantity?: number;
|
|
306
554
|
}
|
|
307
555
|
/**
|
|
308
556
|
* The amount of time the created commits will be valid for
|
|
@@ -318,6 +566,24 @@ export declare namespace ContractWithoutAmendments {
|
|
|
318
566
|
interface Contract {
|
|
319
567
|
id: string;
|
|
320
568
|
}
|
|
569
|
+
/**
|
|
570
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
571
|
+
*/
|
|
572
|
+
interface HierarchyConfiguration {
|
|
573
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
574
|
+
}
|
|
575
|
+
namespace HierarchyConfiguration {
|
|
576
|
+
interface CommitHierarchyChildAccessAll {
|
|
577
|
+
type: 'ALL';
|
|
578
|
+
}
|
|
579
|
+
interface CommitHierarchyChildAccessNone {
|
|
580
|
+
type: 'NONE';
|
|
581
|
+
}
|
|
582
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
583
|
+
contract_ids: Array<string>;
|
|
584
|
+
type: 'CONTRACT_IDS';
|
|
585
|
+
}
|
|
586
|
+
}
|
|
321
587
|
/**
|
|
322
588
|
* The amount the customer should be billed for the commit. Not required.
|
|
323
589
|
*/
|
|
@@ -326,6 +592,23 @@ export declare namespace ContractWithoutAmendments {
|
|
|
326
592
|
quantity: number;
|
|
327
593
|
unit_price: number;
|
|
328
594
|
}
|
|
595
|
+
interface Specifier {
|
|
596
|
+
presentation_group_values?: {
|
|
597
|
+
[key: string]: string;
|
|
598
|
+
};
|
|
599
|
+
pricing_group_values?: {
|
|
600
|
+
[key: string]: string;
|
|
601
|
+
};
|
|
602
|
+
/**
|
|
603
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
604
|
+
*/
|
|
605
|
+
product_id?: string;
|
|
606
|
+
/**
|
|
607
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
608
|
+
* tags.
|
|
609
|
+
*/
|
|
610
|
+
product_tags?: Array<string>;
|
|
611
|
+
}
|
|
329
612
|
}
|
|
330
613
|
interface RecurringCredit {
|
|
331
614
|
id: string;
|
|
@@ -368,9 +651,9 @@ export declare namespace ContractWithoutAmendments {
|
|
|
368
651
|
*/
|
|
369
652
|
ending_before?: string;
|
|
370
653
|
/**
|
|
371
|
-
*
|
|
654
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
372
655
|
*/
|
|
373
|
-
|
|
656
|
+
hierarchy_configuration?: RecurringCredit.HierarchyConfiguration;
|
|
374
657
|
/**
|
|
375
658
|
* Displayed on invoices. Will be passed through to the individual commits
|
|
376
659
|
*/
|
|
@@ -379,12 +662,31 @@ export declare namespace ContractWithoutAmendments {
|
|
|
379
662
|
* Will be passed down to the individual commits
|
|
380
663
|
*/
|
|
381
664
|
netsuite_sales_order_id?: string;
|
|
665
|
+
/**
|
|
666
|
+
* Determines whether the first and last commit will be prorated. If not provided,
|
|
667
|
+
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
668
|
+
*/
|
|
669
|
+
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
670
|
+
/**
|
|
671
|
+
* The frequency at which the recurring commits will be created. If not provided: -
|
|
672
|
+
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
673
|
+
* period defined in the duration will correspond to this frequency. - Commits will
|
|
674
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
675
|
+
* invoice dates.
|
|
676
|
+
*/
|
|
677
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
382
678
|
/**
|
|
383
679
|
* Will be passed down to the individual commits. This controls how much of an
|
|
384
680
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
385
681
|
* between 0 and 1.
|
|
386
682
|
*/
|
|
387
683
|
rollover_fraction?: number;
|
|
684
|
+
/**
|
|
685
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
686
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
687
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
688
|
+
*/
|
|
689
|
+
specifiers?: Array<RecurringCredit.Specifier>;
|
|
388
690
|
}
|
|
389
691
|
namespace RecurringCredit {
|
|
390
692
|
/**
|
|
@@ -392,8 +694,8 @@ export declare namespace ContractWithoutAmendments {
|
|
|
392
694
|
*/
|
|
393
695
|
interface AccessAmount {
|
|
394
696
|
credit_type_id: string;
|
|
395
|
-
quantity: number;
|
|
396
697
|
unit_price: number;
|
|
698
|
+
quantity?: number;
|
|
397
699
|
}
|
|
398
700
|
/**
|
|
399
701
|
* The amount of time the created commits will be valid for
|
|
@@ -410,12 +712,39 @@ export declare namespace ContractWithoutAmendments {
|
|
|
410
712
|
id: string;
|
|
411
713
|
}
|
|
412
714
|
/**
|
|
413
|
-
*
|
|
715
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
414
716
|
*/
|
|
415
|
-
interface
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
717
|
+
interface HierarchyConfiguration {
|
|
718
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
719
|
+
}
|
|
720
|
+
namespace HierarchyConfiguration {
|
|
721
|
+
interface CommitHierarchyChildAccessAll {
|
|
722
|
+
type: 'ALL';
|
|
723
|
+
}
|
|
724
|
+
interface CommitHierarchyChildAccessNone {
|
|
725
|
+
type: 'NONE';
|
|
726
|
+
}
|
|
727
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
728
|
+
contract_ids: Array<string>;
|
|
729
|
+
type: 'CONTRACT_IDS';
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
interface Specifier {
|
|
733
|
+
presentation_group_values?: {
|
|
734
|
+
[key: string]: string;
|
|
735
|
+
};
|
|
736
|
+
pricing_group_values?: {
|
|
737
|
+
[key: string]: string;
|
|
738
|
+
};
|
|
739
|
+
/**
|
|
740
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
741
|
+
*/
|
|
742
|
+
product_id?: string;
|
|
743
|
+
/**
|
|
744
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
745
|
+
* tags.
|
|
746
|
+
*/
|
|
747
|
+
product_tags?: Array<string>;
|
|
419
748
|
}
|
|
420
749
|
}
|
|
421
750
|
interface ResellerRoyalty {
|
|
@@ -433,6 +762,92 @@ export declare namespace ContractWithoutAmendments {
|
|
|
433
762
|
gcp_offer_id?: string;
|
|
434
763
|
reseller_contract_value?: number;
|
|
435
764
|
}
|
|
765
|
+
interface SpendThresholdConfiguration {
|
|
766
|
+
commit: SpendThresholdConfiguration.Commit;
|
|
767
|
+
/**
|
|
768
|
+
* When set to false, the contract will not be evaluated against the
|
|
769
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
770
|
+
* regardless of prior state.
|
|
771
|
+
*/
|
|
772
|
+
is_enabled: boolean;
|
|
773
|
+
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
774
|
+
/**
|
|
775
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
776
|
+
* hits this amount, a threshold charge will be initiated.
|
|
777
|
+
*/
|
|
778
|
+
threshold_amount: number;
|
|
779
|
+
}
|
|
780
|
+
namespace SpendThresholdConfiguration {
|
|
781
|
+
interface Commit {
|
|
782
|
+
/**
|
|
783
|
+
* The commit product that will be used to generate the line item for commit
|
|
784
|
+
* payment.
|
|
785
|
+
*/
|
|
786
|
+
product_id: string;
|
|
787
|
+
description?: string;
|
|
788
|
+
/**
|
|
789
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
790
|
+
* will default to the commit product name.
|
|
791
|
+
*/
|
|
792
|
+
name?: string;
|
|
793
|
+
}
|
|
794
|
+
interface PaymentGateConfig {
|
|
795
|
+
/**
|
|
796
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
797
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
798
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
799
|
+
* wish to payment gate the commit balance.
|
|
800
|
+
*/
|
|
801
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
802
|
+
/**
|
|
803
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
804
|
+
*/
|
|
805
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
806
|
+
/**
|
|
807
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
808
|
+
*/
|
|
809
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
810
|
+
/**
|
|
811
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
812
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
813
|
+
* will default to NONE.
|
|
814
|
+
*/
|
|
815
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
816
|
+
}
|
|
817
|
+
namespace PaymentGateConfig {
|
|
818
|
+
/**
|
|
819
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
820
|
+
*/
|
|
821
|
+
interface PrecalculatedTaxConfig {
|
|
822
|
+
/**
|
|
823
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
824
|
+
* denomination as the commit's invoice schedule
|
|
825
|
+
*/
|
|
826
|
+
tax_amount: number;
|
|
827
|
+
/**
|
|
828
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
829
|
+
* description.
|
|
830
|
+
*/
|
|
831
|
+
tax_name?: string;
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
835
|
+
*/
|
|
836
|
+
interface StripeConfig {
|
|
837
|
+
/**
|
|
838
|
+
* If left blank, will default to INVOICE
|
|
839
|
+
*/
|
|
840
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
841
|
+
/**
|
|
842
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
843
|
+
* your payment type.
|
|
844
|
+
*/
|
|
845
|
+
invoice_metadata?: {
|
|
846
|
+
[key: string]: string;
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
}
|
|
436
851
|
interface UsageFilter {
|
|
437
852
|
current: Shared.BaseUsageFilter | null;
|
|
438
853
|
initial: Shared.BaseUsageFilter;
|
|
@@ -469,13 +884,19 @@ export interface Credit {
|
|
|
469
884
|
*/
|
|
470
885
|
balance?: number;
|
|
471
886
|
contract?: Credit.Contract;
|
|
472
|
-
custom_fields?:
|
|
887
|
+
custom_fields?: {
|
|
888
|
+
[key: string]: string;
|
|
889
|
+
};
|
|
473
890
|
description?: string;
|
|
891
|
+
/**
|
|
892
|
+
* Optional configuration for credit hierarchy access control
|
|
893
|
+
*/
|
|
894
|
+
hierarchy_configuration?: Credit.HierarchyConfiguration;
|
|
474
895
|
/**
|
|
475
896
|
* A list of ordered events that impact the balance of a credit. For example, an
|
|
476
897
|
* invoice deduction or an expiration.
|
|
477
898
|
*/
|
|
478
|
-
ledger?: Array<Credit.CreditSegmentStartLedgerEntry | Credit.CreditAutomatedInvoiceDeductionLedgerEntry | Credit.CreditExpirationLedgerEntry | Credit.CreditCanceledLedgerEntry | Credit.CreditCreditedLedgerEntry | Credit.CreditManualLedgerEntry>;
|
|
899
|
+
ledger?: Array<Credit.CreditSegmentStartLedgerEntry | Credit.CreditAutomatedInvoiceDeductionLedgerEntry | Credit.CreditExpirationLedgerEntry | Credit.CreditCanceledLedgerEntry | Credit.CreditCreditedLedgerEntry | Credit.CreditManualLedgerEntry | Credit.CreditSeatBasedAdjustmentLedgerEntry>;
|
|
479
900
|
name?: string;
|
|
480
901
|
/**
|
|
481
902
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -491,6 +912,12 @@ export interface Credit {
|
|
|
491
912
|
* This field's availability is dependent on your client's configuration.
|
|
492
913
|
*/
|
|
493
914
|
salesforce_opportunity_id?: string;
|
|
915
|
+
/**
|
|
916
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
917
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
918
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
919
|
+
*/
|
|
920
|
+
specifiers?: Array<Credit.Specifier>;
|
|
494
921
|
/**
|
|
495
922
|
* Prevents the creation of duplicates. If a request to create a commit or credit
|
|
496
923
|
* is made with a uniqueness key that was previously used to create a commit or
|
|
@@ -507,6 +934,24 @@ export declare namespace Credit {
|
|
|
507
934
|
interface Contract {
|
|
508
935
|
id: string;
|
|
509
936
|
}
|
|
937
|
+
/**
|
|
938
|
+
* Optional configuration for credit hierarchy access control
|
|
939
|
+
*/
|
|
940
|
+
interface HierarchyConfiguration {
|
|
941
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
942
|
+
}
|
|
943
|
+
namespace HierarchyConfiguration {
|
|
944
|
+
interface CommitHierarchyChildAccessAll {
|
|
945
|
+
type: 'ALL';
|
|
946
|
+
}
|
|
947
|
+
interface CommitHierarchyChildAccessNone {
|
|
948
|
+
type: 'NONE';
|
|
949
|
+
}
|
|
950
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
951
|
+
contract_ids: Array<string>;
|
|
952
|
+
type: 'CONTRACT_IDS';
|
|
953
|
+
}
|
|
954
|
+
}
|
|
510
955
|
interface CreditSegmentStartLedgerEntry {
|
|
511
956
|
amount: number;
|
|
512
957
|
segment_id: string;
|
|
@@ -546,6 +991,29 @@ export declare namespace Credit {
|
|
|
546
991
|
timestamp: string;
|
|
547
992
|
type: 'CREDIT_MANUAL';
|
|
548
993
|
}
|
|
994
|
+
interface CreditSeatBasedAdjustmentLedgerEntry {
|
|
995
|
+
amount: number;
|
|
996
|
+
segment_id: string;
|
|
997
|
+
timestamp: string;
|
|
998
|
+
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
999
|
+
}
|
|
1000
|
+
interface Specifier {
|
|
1001
|
+
presentation_group_values?: {
|
|
1002
|
+
[key: string]: string;
|
|
1003
|
+
};
|
|
1004
|
+
pricing_group_values?: {
|
|
1005
|
+
[key: string]: string;
|
|
1006
|
+
};
|
|
1007
|
+
/**
|
|
1008
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1009
|
+
*/
|
|
1010
|
+
product_id?: string;
|
|
1011
|
+
/**
|
|
1012
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
1013
|
+
* tags.
|
|
1014
|
+
*/
|
|
1015
|
+
product_tags?: Array<string>;
|
|
1016
|
+
}
|
|
549
1017
|
}
|
|
550
1018
|
export interface CreditTypeData {
|
|
551
1019
|
id: string;
|
|
@@ -555,7 +1023,9 @@ export interface Discount {
|
|
|
555
1023
|
id: string;
|
|
556
1024
|
product: Discount.Product;
|
|
557
1025
|
schedule: SchedulePointInTime;
|
|
558
|
-
custom_fields?:
|
|
1026
|
+
custom_fields?: {
|
|
1027
|
+
[key: string]: string;
|
|
1028
|
+
};
|
|
559
1029
|
name?: string;
|
|
560
1030
|
/**
|
|
561
1031
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -627,13 +1097,20 @@ export interface Override {
|
|
|
627
1097
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
628
1098
|
* processors.
|
|
629
1099
|
*/
|
|
630
|
-
value?:
|
|
1100
|
+
value?: {
|
|
1101
|
+
[key: string]: unknown;
|
|
1102
|
+
};
|
|
631
1103
|
}
|
|
632
1104
|
export declare namespace Override {
|
|
633
1105
|
interface OverrideSpecifier {
|
|
1106
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
634
1107
|
commit_ids?: Array<string>;
|
|
635
|
-
presentation_group_values?:
|
|
636
|
-
|
|
1108
|
+
presentation_group_values?: {
|
|
1109
|
+
[key: string]: string | null;
|
|
1110
|
+
};
|
|
1111
|
+
pricing_group_values?: {
|
|
1112
|
+
[key: string]: string;
|
|
1113
|
+
};
|
|
637
1114
|
product_id?: string;
|
|
638
1115
|
product_tags?: Array<string>;
|
|
639
1116
|
recurring_commit_ids?: Array<string>;
|
|
@@ -650,7 +1127,9 @@ export declare namespace Override {
|
|
|
650
1127
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
651
1128
|
* processors.
|
|
652
1129
|
*/
|
|
653
|
-
custom_rate?:
|
|
1130
|
+
custom_rate?: {
|
|
1131
|
+
[key: string]: unknown;
|
|
1132
|
+
};
|
|
654
1133
|
/**
|
|
655
1134
|
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
656
1135
|
* set to true.
|
|
@@ -719,7 +1198,9 @@ export interface ProService {
|
|
|
719
1198
|
* amount and must be specified.
|
|
720
1199
|
*/
|
|
721
1200
|
unit_price: number;
|
|
722
|
-
custom_fields?:
|
|
1201
|
+
custom_fields?: {
|
|
1202
|
+
[key: string]: string;
|
|
1203
|
+
};
|
|
723
1204
|
description?: string;
|
|
724
1205
|
/**
|
|
725
1206
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -733,7 +1214,9 @@ export interface Rate {
|
|
|
733
1214
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
734
1215
|
* processors.
|
|
735
1216
|
*/
|
|
736
|
-
custom_rate?:
|
|
1217
|
+
custom_rate?: {
|
|
1218
|
+
[key: string]: unknown;
|
|
1219
|
+
};
|
|
737
1220
|
/**
|
|
738
1221
|
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
739
1222
|
* set to true.
|
|
@@ -748,7 +1231,9 @@ export interface Rate {
|
|
|
748
1231
|
* if pricing groups are used, this will contain the values used to calculate the
|
|
749
1232
|
* price
|
|
750
1233
|
*/
|
|
751
|
-
pricing_group_values?:
|
|
1234
|
+
pricing_group_values?: {
|
|
1235
|
+
[key: string]: string;
|
|
1236
|
+
};
|
|
752
1237
|
/**
|
|
753
1238
|
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
754
1239
|
*/
|
|
@@ -768,7 +1253,10 @@ export interface ScheduledCharge {
|
|
|
768
1253
|
id: string;
|
|
769
1254
|
product: ScheduledCharge.Product;
|
|
770
1255
|
schedule: SchedulePointInTime;
|
|
771
|
-
|
|
1256
|
+
archived_at?: string;
|
|
1257
|
+
custom_fields?: {
|
|
1258
|
+
[key: string]: string;
|
|
1259
|
+
};
|
|
772
1260
|
/**
|
|
773
1261
|
* displayed on invoices
|
|
774
1262
|
*/
|
|
@@ -804,10 +1292,10 @@ export declare namespace SchedulePointInTime {
|
|
|
804
1292
|
interface ScheduleItem {
|
|
805
1293
|
id: string;
|
|
806
1294
|
amount: number;
|
|
807
|
-
invoice_id: string;
|
|
808
1295
|
quantity: number;
|
|
809
1296
|
timestamp: string;
|
|
810
1297
|
unit_price: number;
|
|
1298
|
+
invoice_id?: string | null;
|
|
811
1299
|
}
|
|
812
1300
|
}
|
|
813
1301
|
export interface Tier {
|