@metronome/sdk 3.5.0 → 3.7.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 +78 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/bin/cli +12 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +11 -0
- package/client.js.map +1 -1
- package/client.mjs +11 -0
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +10 -10
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +10 -10
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.d.mts +1 -0
- package/pagination.d.mts.map +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.mjs +1 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/shared.d.mts +321 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +321 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.mts +1 -1
- package/resources/v1/alerts.d.mts.map +1 -1
- package/resources/v1/alerts.d.ts +1 -1
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/alerts.mjs.map +1 -1
- package/resources/v1/audit-logs.d.mts.map +1 -1
- package/resources/v1/audit-logs.d.ts.map +1 -1
- package/resources/v1/audit-logs.mjs.map +1 -1
- package/resources/v1/billable-metrics.d.mts.map +1 -1
- package/resources/v1/billable-metrics.d.ts.map +1 -1
- package/resources/v1/billable-metrics.mjs.map +1 -1
- package/resources/v1/contracts/contracts.d.mts +629 -143
- package/resources/v1/contracts/contracts.d.mts.map +1 -1
- package/resources/v1/contracts/contracts.d.ts +629 -143
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js +47 -2
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs +47 -2
- package/resources/v1/contracts/contracts.mjs.map +1 -1
- package/resources/v1/contracts/index.d.mts +1 -1
- package/resources/v1/contracts/index.d.mts.map +1 -1
- package/resources/v1/contracts/index.d.ts +1 -1
- package/resources/v1/contracts/index.d.ts.map +1 -1
- package/resources/v1/contracts/index.js.map +1 -1
- package/resources/v1/contracts/index.mjs.map +1 -1
- package/resources/v1/contracts/named-schedules.d.mts.map +1 -1
- package/resources/v1/contracts/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/products.d.mts +18 -0
- package/resources/v1/contracts/products.d.mts.map +1 -1
- package/resources/v1/contracts/products.d.ts +18 -0
- package/resources/v1/contracts/products.d.ts.map +1 -1
- package/resources/v1/contracts/products.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/index.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/index.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards.mjs.map +1 -1
- package/resources/v1/contracts.d.mts.map +1 -1
- package/resources/v1/contracts.d.ts.map +1 -1
- package/resources/v1/contracts.mjs.map +1 -1
- package/resources/v1/credit-grants.d.mts.map +1 -1
- package/resources/v1/credit-grants.d.ts.map +1 -1
- package/resources/v1/credit-grants.mjs.map +1 -1
- package/resources/v1/custom-fields.d.mts.map +1 -1
- package/resources/v1/custom-fields.d.ts.map +1 -1
- package/resources/v1/custom-fields.mjs.map +1 -1
- package/resources/v1/customers/alerts.d.mts +1 -1
- package/resources/v1/customers/alerts.d.mts.map +1 -1
- package/resources/v1/customers/alerts.d.ts +1 -1
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/alerts.mjs.map +1 -1
- package/resources/v1/customers/billing-config.d.mts.map +1 -1
- package/resources/v1/customers/billing-config.d.ts.map +1 -1
- package/resources/v1/customers/billing-config.mjs.map +1 -1
- package/resources/v1/customers/commits.d.mts.map +1 -1
- package/resources/v1/customers/commits.d.ts.map +1 -1
- package/resources/v1/customers/commits.mjs.map +1 -1
- package/resources/v1/customers/credits.d.mts.map +1 -1
- package/resources/v1/customers/credits.d.ts.map +1 -1
- package/resources/v1/customers/credits.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/invoices.d.mts +9 -0
- package/resources/v1/customers/invoices.d.mts.map +1 -1
- package/resources/v1/customers/invoices.d.ts +9 -0
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/customers/invoices.mjs.map +1 -1
- package/resources/v1/customers/named-schedules.d.mts.map +1 -1
- package/resources/v1/customers/named-schedules.d.ts.map +1 -1
- package/resources/v1/customers/named-schedules.mjs.map +1 -1
- package/resources/v1/customers/plans.d.mts.map +1 -1
- package/resources/v1/customers/plans.d.ts.map +1 -1
- package/resources/v1/customers/plans.mjs.map +1 -1
- package/resources/v1/customers.d.mts.map +1 -1
- package/resources/v1/customers.d.ts.map +1 -1
- package/resources/v1/customers.mjs.map +1 -1
- package/resources/v1/dashboards.d.mts.map +1 -1
- package/resources/v1/dashboards.d.ts.map +1 -1
- package/resources/v1/dashboards.mjs.map +1 -1
- package/resources/v1/index.d.mts +1 -2
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -2
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +1 -3
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +0 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/invoices.d.mts.map +1 -1
- package/resources/v1/invoices.d.ts.map +1 -1
- package/resources/v1/invoices.mjs.map +1 -1
- package/resources/v1/packages.d.mts +57 -5
- package/resources/v1/packages.d.mts.map +1 -1
- package/resources/v1/packages.d.ts +57 -5
- package/resources/v1/packages.d.ts.map +1 -1
- package/resources/v1/packages.js +3 -4
- package/resources/v1/packages.js.map +1 -1
- package/resources/v1/packages.mjs +3 -4
- package/resources/v1/packages.mjs.map +1 -1
- package/resources/v1/plans.d.mts.map +1 -1
- package/resources/v1/plans.d.ts.map +1 -1
- package/resources/v1/plans.mjs.map +1 -1
- package/resources/v1/pricing-units.d.mts.map +1 -1
- package/resources/v1/pricing-units.d.ts.map +1 -1
- package/resources/v1/pricing-units.mjs.map +1 -1
- package/resources/v1/services.d.mts.map +1 -1
- package/resources/v1/services.d.ts.map +1 -1
- package/resources/v1/services.mjs.map +1 -1
- package/resources/v1/settings/billing-providers.d.mts.map +1 -1
- package/resources/v1/settings/billing-providers.d.ts.map +1 -1
- package/resources/v1/settings/billing-providers.mjs.map +1 -1
- package/resources/v1/settings/index.d.mts.map +1 -1
- package/resources/v1/settings/index.d.ts.map +1 -1
- package/resources/v1/settings/index.mjs.map +1 -1
- package/resources/v1/settings/settings.d.mts.map +1 -1
- package/resources/v1/settings/settings.d.ts.map +1 -1
- package/resources/v1/settings/settings.mjs.map +1 -1
- package/resources/v1/settings.d.mts.map +1 -1
- package/resources/v1/settings.d.ts.map +1 -1
- package/resources/v1/settings.mjs.map +1 -1
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +2 -6
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +2 -6
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +0 -4
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +0 -4
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v1.d.mts.map +1 -1
- package/resources/v1.d.ts.map +1 -1
- package/resources/v1.mjs.map +1 -1
- package/resources/v2/contracts.d.mts +1431 -2
- package/resources/v2/contracts.d.mts.map +1 -1
- package/resources/v2/contracts.d.ts +1431 -2
- package/resources/v2/contracts.d.ts.map +1 -1
- package/resources/v2/contracts.mjs.map +1 -1
- package/resources/v2/index.d.mts.map +1 -1
- package/resources/v2/index.d.ts.map +1 -1
- package/resources/v2/index.mjs.map +1 -1
- package/resources/v2/v2.d.mts.map +1 -1
- package/resources/v2/v2.d.ts.map +1 -1
- package/resources/v2/v2.mjs.map +1 -1
- package/resources/v2.d.mts.map +1 -1
- package/resources/v2.d.ts.map +1 -1
- package/resources/v2.mjs.map +1 -1
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +12 -0
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/log.ts +2 -0
- package/src/resources/shared.ts +417 -1
- package/src/resources/v1/alerts.ts +1 -1
- package/src/resources/v1/contracts/contracts.ts +813 -156
- package/src/resources/v1/contracts/index.ts +2 -0
- package/src/resources/v1/contracts/products.ts +20 -0
- package/src/resources/v1/customers/alerts.ts +1 -1
- package/src/resources/v1/customers/invoices.ts +12 -0
- package/src/resources/v1/index.ts +2 -11
- package/src/resources/v1/packages.ts +81 -6
- package/src/resources/v1/v1.ts +4 -26
- package/src/resources/v2/contracts.ts +1881 -2
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/v1/payments.d.mts +0 -127
- package/resources/v1/payments.d.mts.map +0 -1
- package/resources/v1/payments.d.ts +0 -127
- package/resources/v1/payments.d.ts.map +0 -1
- package/resources/v1/payments.js +0 -71
- package/resources/v1/payments.js.map +0 -1
- package/resources/v1/payments.mjs +0 -67
- package/resources/v1/payments.mjs.map +0 -1
- package/src/resources/v1/payments.ts +0 -187
|
@@ -10,6 +10,7 @@ export {
|
|
|
10
10
|
type ContractCreateHistoricalInvoicesResponse,
|
|
11
11
|
type ContractGetNetBalanceResponse,
|
|
12
12
|
type ContractListBalancesResponse,
|
|
13
|
+
type ContractListSeatBalancesResponse,
|
|
13
14
|
type ContractRetrieveRateScheduleResponse,
|
|
14
15
|
type ContractRetrieveSubscriptionQuantityHistoryResponse,
|
|
15
16
|
type ContractScheduleProServicesInvoiceResponse,
|
|
@@ -23,6 +24,7 @@ export {
|
|
|
23
24
|
type ContractCreateHistoricalInvoicesParams,
|
|
24
25
|
type ContractGetNetBalanceParams,
|
|
25
26
|
type ContractListBalancesParams,
|
|
27
|
+
type ContractListSeatBalancesParams,
|
|
26
28
|
type ContractRetrieveRateScheduleParams,
|
|
27
29
|
type ContractRetrieveSubscriptionQuantityHistoryParams,
|
|
28
30
|
type ContractScheduleProServicesInvoiceParams,
|
|
@@ -503,6 +503,16 @@ export interface ProductCreateParams {
|
|
|
503
503
|
*/
|
|
504
504
|
quantity_rounding?: QuantityRounding | null;
|
|
505
505
|
|
|
506
|
+
/**
|
|
507
|
+
* Defines the breakdown behavior when calculating usage from SQL Billable Metrics.
|
|
508
|
+
* If set to 'service_period' (default), the usage will be evaluated once for all
|
|
509
|
+
* events the invoice service period and the usage will be applied at the last
|
|
510
|
+
* instant of the invoice. If set to 'hour', it will be broken down and evaluated
|
|
511
|
+
* for each hour. For most use cases, 'hour' is recommended. The setting has no
|
|
512
|
+
* effect for Streaming Billable Metrics.
|
|
513
|
+
*/
|
|
514
|
+
sql_breakdown_granularity?: 'HOUR' | 'SERVICE_PERIOD';
|
|
515
|
+
|
|
506
516
|
tags?: Array<string>;
|
|
507
517
|
}
|
|
508
518
|
|
|
@@ -604,6 +614,16 @@ export interface ProductUpdateParams {
|
|
|
604
614
|
*/
|
|
605
615
|
quantity_rounding?: QuantityRounding | null;
|
|
606
616
|
|
|
617
|
+
/**
|
|
618
|
+
* Defines the breakdown behavior when calculating usage from SQL Billable Metrics.
|
|
619
|
+
* If set to 'service_period' (default), the usage will be evaluated once for all
|
|
620
|
+
* events the invoice service period and the usage will be applied at the last
|
|
621
|
+
* instant of the invoice. If set to 'hour', it will be broken down and evaluated
|
|
622
|
+
* for each hour. For most use cases, 'hour' is recommended. The setting has no
|
|
623
|
+
* effect for Streaming Billable Metrics.
|
|
624
|
+
*/
|
|
625
|
+
sql_breakdown_granularity?: 'HOUR' | 'SERVICE_PERIOD';
|
|
626
|
+
|
|
607
627
|
/**
|
|
608
628
|
* If not provided, defaults to product's current tags
|
|
609
629
|
*/
|
|
@@ -302,7 +302,7 @@ export namespace CustomerAlert {
|
|
|
302
302
|
|
|
303
303
|
export namespace Alert {
|
|
304
304
|
export interface CustomFieldFilter {
|
|
305
|
-
entity: 'Contract' | 'Commit' | 'ContractCredit';
|
|
305
|
+
entity: 'Contract' | 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit';
|
|
306
306
|
|
|
307
307
|
key: string;
|
|
308
308
|
|
|
@@ -365,6 +365,8 @@ export interface Invoice {
|
|
|
365
365
|
|
|
366
366
|
plan_name?: string;
|
|
367
367
|
|
|
368
|
+
regenerated_from_invoice_id?: string;
|
|
369
|
+
|
|
368
370
|
/**
|
|
369
371
|
* Only present for contract invoices with reseller royalties.
|
|
370
372
|
*/
|
|
@@ -1007,6 +1009,11 @@ export interface InvoiceListParams extends CursorPageParams {
|
|
|
1007
1009
|
*/
|
|
1008
1010
|
customer_id: string;
|
|
1009
1011
|
|
|
1012
|
+
/**
|
|
1013
|
+
* Query param: Only return invoices for the specified contract
|
|
1014
|
+
*/
|
|
1015
|
+
contract_id?: string;
|
|
1016
|
+
|
|
1010
1017
|
/**
|
|
1011
1018
|
* Query param: Only return invoices for the specified credit type
|
|
1012
1019
|
*/
|
|
@@ -1040,6 +1047,11 @@ export interface InvoiceListParams extends CursorPageParams {
|
|
|
1040
1047
|
* Query param: Invoice status, e.g. DRAFT, FINALIZED, or VOID
|
|
1041
1048
|
*/
|
|
1042
1049
|
status?: string;
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* Query param: Filter invoices by type. Defaults to returning all invoice types.
|
|
1053
|
+
*/
|
|
1054
|
+
type?: 'USAGE' | 'USAGE_CONSOLIDATED' | 'SCHEDULED';
|
|
1043
1055
|
}
|
|
1044
1056
|
|
|
1045
1057
|
export interface InvoiceAddChargeParams {
|
|
@@ -35,6 +35,7 @@ export {
|
|
|
35
35
|
type ContractCreateHistoricalInvoicesResponse,
|
|
36
36
|
type ContractGetNetBalanceResponse,
|
|
37
37
|
type ContractListBalancesResponse,
|
|
38
|
+
type ContractListSeatBalancesResponse,
|
|
38
39
|
type ContractRetrieveRateScheduleResponse,
|
|
39
40
|
type ContractRetrieveSubscriptionQuantityHistoryResponse,
|
|
40
41
|
type ContractScheduleProServicesInvoiceResponse,
|
|
@@ -48,6 +49,7 @@ export {
|
|
|
48
49
|
type ContractCreateHistoricalInvoicesParams,
|
|
49
50
|
type ContractGetNetBalanceParams,
|
|
50
51
|
type ContractListBalancesParams,
|
|
52
|
+
type ContractListSeatBalancesParams,
|
|
51
53
|
type ContractRetrieveRateScheduleParams,
|
|
52
54
|
type ContractRetrieveSubscriptionQuantityHistoryParams,
|
|
53
55
|
type ContractScheduleProServicesInvoiceParams,
|
|
@@ -141,17 +143,6 @@ export {
|
|
|
141
143
|
type PackageListResponsesCursorPage,
|
|
142
144
|
type PackageListContractsOnPackageResponsesCursorPage,
|
|
143
145
|
} from './packages';
|
|
144
|
-
export {
|
|
145
|
-
Payments,
|
|
146
|
-
type Payment,
|
|
147
|
-
type PaymentStatus,
|
|
148
|
-
type PaymentAttemptResponse,
|
|
149
|
-
type PaymentCancelResponse,
|
|
150
|
-
type PaymentListParams,
|
|
151
|
-
type PaymentAttemptParams,
|
|
152
|
-
type PaymentCancelParams,
|
|
153
|
-
type PaymentsBodyCursorPage,
|
|
154
|
-
} from './payments';
|
|
155
146
|
export {
|
|
156
147
|
Plans,
|
|
157
148
|
type PlanDetail,
|
|
@@ -145,10 +145,9 @@ export class Packages extends APIResource {
|
|
|
145
145
|
*
|
|
146
146
|
* ### **Usage guidelines:**
|
|
147
147
|
*
|
|
148
|
-
* Use the
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* pass **`covering_date`** equal to the current time.
|
|
148
|
+
* Use the **`starting_at`**, **`covering_date`**, and **`include_archived`**
|
|
149
|
+
* parameters to filter the list of returned contracts. For example, to list only
|
|
150
|
+
* currently active contracts, pass **`covering_date`** equal to the current time.
|
|
152
151
|
*
|
|
153
152
|
* @example
|
|
154
153
|
* ```ts
|
|
@@ -259,6 +258,8 @@ export namespace PackageRetrieveResponse {
|
|
|
259
258
|
|
|
260
259
|
spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
|
|
261
260
|
|
|
261
|
+
spend_trackers?: Array<Data.SpendTracker>;
|
|
262
|
+
|
|
262
263
|
subscriptions?: Array<Data.Subscription>;
|
|
263
264
|
|
|
264
265
|
/**
|
|
@@ -924,6 +925,29 @@ export namespace PackageRetrieveResponse {
|
|
|
924
925
|
}
|
|
925
926
|
}
|
|
926
927
|
|
|
928
|
+
export interface SpendTracker {
|
|
929
|
+
/**
|
|
930
|
+
* Human-readable identifier, unique per contract.
|
|
931
|
+
*/
|
|
932
|
+
alias: string;
|
|
933
|
+
|
|
934
|
+
applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
|
|
935
|
+
|
|
936
|
+
credit_type_id: string;
|
|
937
|
+
|
|
938
|
+
reset_frequency: 'BILLING_PERIOD';
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
export namespace SpendTracker {
|
|
942
|
+
export interface ApplicableSpendSpecifier {
|
|
943
|
+
sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
|
|
944
|
+
|
|
945
|
+
spend_type: 'COMMIT_PURCHASE';
|
|
946
|
+
|
|
947
|
+
discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
|
|
927
951
|
export interface Subscription {
|
|
928
952
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
929
953
|
|
|
@@ -1086,6 +1110,8 @@ export interface PackageListResponse {
|
|
|
1086
1110
|
|
|
1087
1111
|
spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
|
|
1088
1112
|
|
|
1113
|
+
spend_trackers?: Array<PackageListResponse.SpendTracker>;
|
|
1114
|
+
|
|
1089
1115
|
subscriptions?: Array<PackageListResponse.Subscription>;
|
|
1090
1116
|
|
|
1091
1117
|
/**
|
|
@@ -1751,6 +1777,29 @@ export namespace PackageListResponse {
|
|
|
1751
1777
|
}
|
|
1752
1778
|
}
|
|
1753
1779
|
|
|
1780
|
+
export interface SpendTracker {
|
|
1781
|
+
/**
|
|
1782
|
+
* Human-readable identifier, unique per contract.
|
|
1783
|
+
*/
|
|
1784
|
+
alias: string;
|
|
1785
|
+
|
|
1786
|
+
applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
|
|
1787
|
+
|
|
1788
|
+
credit_type_id: string;
|
|
1789
|
+
|
|
1790
|
+
reset_frequency: 'BILLING_PERIOD';
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
export namespace SpendTracker {
|
|
1794
|
+
export interface ApplicableSpendSpecifier {
|
|
1795
|
+
sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
|
|
1796
|
+
|
|
1797
|
+
spend_type: 'COMMIT_PURCHASE';
|
|
1798
|
+
|
|
1799
|
+
discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1754
1803
|
export interface Subscription {
|
|
1755
1804
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
1756
1805
|
|
|
@@ -1866,8 +1915,6 @@ export interface PackageCreateParams {
|
|
|
1866
1915
|
*/
|
|
1867
1916
|
aliases?: Array<PackageCreateParams.Alias>;
|
|
1868
1917
|
|
|
1869
|
-
billing_anchor_date?: 'contract_start_date' | 'first_billing_period';
|
|
1870
|
-
|
|
1871
1918
|
billing_provider?: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite';
|
|
1872
1919
|
|
|
1873
1920
|
commits?: Array<PackageCreateParams.Commit>;
|
|
@@ -1919,6 +1966,8 @@ export interface PackageCreateParams {
|
|
|
1919
1966
|
|
|
1920
1967
|
spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
|
|
1921
1968
|
|
|
1969
|
+
spend_trackers?: Array<PackageCreateParams.SpendTracker>;
|
|
1970
|
+
|
|
1922
1971
|
subscriptions?: Array<PackageCreateParams.Subscription>;
|
|
1923
1972
|
|
|
1924
1973
|
/**
|
|
@@ -2840,6 +2889,32 @@ export namespace PackageCreateParams {
|
|
|
2840
2889
|
}
|
|
2841
2890
|
}
|
|
2842
2891
|
|
|
2892
|
+
export interface SpendTracker {
|
|
2893
|
+
/**
|
|
2894
|
+
* Human-readable identifier, unique per contract.
|
|
2895
|
+
*/
|
|
2896
|
+
alias: string;
|
|
2897
|
+
|
|
2898
|
+
applicable_spend_specifiers: Array<SpendTracker.ApplicableSpendSpecifier>;
|
|
2899
|
+
|
|
2900
|
+
credit_type_id: string;
|
|
2901
|
+
|
|
2902
|
+
reset_frequency: 'BILLING_PERIOD';
|
|
2903
|
+
}
|
|
2904
|
+
|
|
2905
|
+
export namespace SpendTracker {
|
|
2906
|
+
export interface ApplicableSpendSpecifier {
|
|
2907
|
+
sources: Array<'THRESHOLD_RECHARGE' | 'MANUAL'>;
|
|
2908
|
+
|
|
2909
|
+
spend_type: 'COMMIT_PURCHASE';
|
|
2910
|
+
|
|
2911
|
+
/**
|
|
2912
|
+
* Filter by whether the spend was discounted. Defaults to ANY if omitted.
|
|
2913
|
+
*/
|
|
2914
|
+
discounted?: 'ANY' | 'DISCOUNTED_ONLY' | 'UNDISCOUNTED_ONLY';
|
|
2915
|
+
}
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2843
2918
|
export interface Subscription {
|
|
2844
2919
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
2845
2920
|
|
package/src/resources/v1/v1.ts
CHANGED
|
@@ -85,18 +85,6 @@ import {
|
|
|
85
85
|
PackageRetrieveResponse,
|
|
86
86
|
Packages,
|
|
87
87
|
} from './packages';
|
|
88
|
-
import * as PaymentsAPI from './payments';
|
|
89
|
-
import {
|
|
90
|
-
Payment,
|
|
91
|
-
PaymentAttemptParams,
|
|
92
|
-
PaymentAttemptResponse,
|
|
93
|
-
PaymentCancelParams,
|
|
94
|
-
PaymentCancelResponse,
|
|
95
|
-
PaymentListParams,
|
|
96
|
-
PaymentStatus,
|
|
97
|
-
Payments,
|
|
98
|
-
PaymentsBodyCursorPage,
|
|
99
|
-
} from './payments';
|
|
100
88
|
import * as PlansAPI from './plans';
|
|
101
89
|
import {
|
|
102
90
|
PlanDetail,
|
|
@@ -153,6 +141,8 @@ import {
|
|
|
153
141
|
ContractListBalancesResponsesBodyCursorPage,
|
|
154
142
|
ContractListParams,
|
|
155
143
|
ContractListResponse,
|
|
144
|
+
ContractListSeatBalancesParams,
|
|
145
|
+
ContractListSeatBalancesResponse,
|
|
156
146
|
ContractRetrieveParams,
|
|
157
147
|
ContractRetrieveRateScheduleParams,
|
|
158
148
|
ContractRetrieveRateScheduleResponse,
|
|
@@ -220,7 +210,6 @@ export class V1 extends APIResource {
|
|
|
220
210
|
invoices: InvoicesAPI.Invoices = new InvoicesAPI.Invoices(this._client);
|
|
221
211
|
contracts: ContractsAPI.Contracts = new ContractsAPI.Contracts(this._client);
|
|
222
212
|
packages: PackagesAPI.Packages = new PackagesAPI.Packages(this._client);
|
|
223
|
-
payments: PaymentsAPI.Payments = new PaymentsAPI.Payments(this._client);
|
|
224
213
|
settings: SettingsAPI.Settings = new SettingsAPI.Settings(this._client);
|
|
225
214
|
}
|
|
226
215
|
|
|
@@ -238,7 +227,6 @@ V1.Services = Services;
|
|
|
238
227
|
V1.Invoices = Invoices;
|
|
239
228
|
V1.Contracts = Contracts;
|
|
240
229
|
V1.Packages = Packages;
|
|
241
|
-
V1.Payments = Payments;
|
|
242
230
|
V1.Settings = Settings;
|
|
243
231
|
|
|
244
232
|
export declare namespace V1 {
|
|
@@ -394,6 +382,7 @@ export declare namespace V1 {
|
|
|
394
382
|
type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse,
|
|
395
383
|
type ContractGetNetBalanceResponse as ContractGetNetBalanceResponse,
|
|
396
384
|
type ContractListBalancesResponse as ContractListBalancesResponse,
|
|
385
|
+
type ContractListSeatBalancesResponse as ContractListSeatBalancesResponse,
|
|
397
386
|
type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse,
|
|
398
387
|
type ContractRetrieveSubscriptionQuantityHistoryResponse as ContractRetrieveSubscriptionQuantityHistoryResponse,
|
|
399
388
|
type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse,
|
|
@@ -408,6 +397,7 @@ export declare namespace V1 {
|
|
|
408
397
|
type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams,
|
|
409
398
|
type ContractGetNetBalanceParams as ContractGetNetBalanceParams,
|
|
410
399
|
type ContractListBalancesParams as ContractListBalancesParams,
|
|
400
|
+
type ContractListSeatBalancesParams as ContractListSeatBalancesParams,
|
|
411
401
|
type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams,
|
|
412
402
|
type ContractRetrieveSubscriptionQuantityHistoryParams as ContractRetrieveSubscriptionQuantityHistoryParams,
|
|
413
403
|
type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams,
|
|
@@ -431,18 +421,6 @@ export declare namespace V1 {
|
|
|
431
421
|
type PackageListContractsOnPackageParams as PackageListContractsOnPackageParams,
|
|
432
422
|
};
|
|
433
423
|
|
|
434
|
-
export {
|
|
435
|
-
Payments as Payments,
|
|
436
|
-
type Payment as Payment,
|
|
437
|
-
type PaymentStatus as PaymentStatus,
|
|
438
|
-
type PaymentAttemptResponse as PaymentAttemptResponse,
|
|
439
|
-
type PaymentCancelResponse as PaymentCancelResponse,
|
|
440
|
-
type PaymentsBodyCursorPage as PaymentsBodyCursorPage,
|
|
441
|
-
type PaymentListParams as PaymentListParams,
|
|
442
|
-
type PaymentAttemptParams as PaymentAttemptParams,
|
|
443
|
-
type PaymentCancelParams as PaymentCancelParams,
|
|
444
|
-
};
|
|
445
|
-
|
|
446
424
|
export {
|
|
447
425
|
Settings as Settings,
|
|
448
426
|
type SettingUpsertAvalaraCredentialsResponse as SettingUpsertAvalaraCredentialsResponse,
|