@metronome/sdk 3.7.0 → 3.8.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 +39 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +9 -1
- package/client.js.map +1 -1
- package/client.mjs +9 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/shared.d.mts +194 -4
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +194 -4
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.mts +39 -0
- package/resources/v1/alerts.d.mts.map +1 -1
- package/resources/v1/alerts.d.ts +39 -0
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.d.mts +270 -11
- package/resources/v1/contracts/contracts.d.mts.map +1 -1
- package/resources/v1/contracts/contracts.d.ts +270 -11
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js +43 -0
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs +43 -0
- 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/rate-cards/rates.d.mts +4 -0
- package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.ts +4 -0
- package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.js +4 -0
- package/resources/v1/contracts/rate-cards/rates.js.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.mjs +4 -0
- package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
- package/resources/v1/customers/alerts.d.mts +79 -2
- package/resources/v1/customers/alerts.d.mts.map +1 -1
- package/resources/v1/customers/alerts.d.ts +79 -2
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/alerts.js +1 -1
- package/resources/v1/customers/alerts.mjs +1 -1
- package/resources/v1/customers/invoices.d.mts +5 -0
- package/resources/v1/customers/invoices.d.mts.map +1 -1
- package/resources/v1/customers/invoices.d.ts +5 -0
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/dashboards.d.mts +8 -3
- package/resources/v1/dashboards.d.mts.map +1 -1
- package/resources/v1/dashboards.d.ts +8 -3
- package/resources/v1/dashboards.d.ts.map +1 -1
- package/resources/v1/dashboards.js +7 -2
- package/resources/v1/dashboards.js.map +1 -1
- package/resources/v1/dashboards.mjs +7 -2
- package/resources/v1/dashboards.mjs.map +1 -1
- package/resources/v1/index.d.mts +1 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -1
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/packages.d.mts +240 -9
- package/resources/v1/packages.d.mts.map +1 -1
- package/resources/v1/packages.d.ts +240 -9
- package/resources/v1/packages.d.ts.map +1 -1
- package/resources/v1/v1.d.mts +2 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +2 -2
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v2/contracts.d.mts +427 -6
- package/resources/v2/contracts.d.mts.map +1 -1
- package/resources/v2/contracts.d.ts +427 -6
- package/resources/v2/contracts.d.ts.map +1 -1
- package/src/client.ts +9 -1
- package/src/resources/shared.ts +234 -4
- package/src/resources/v1/alerts.ts +49 -0
- package/src/resources/v1/contracts/contracts.ts +322 -10
- package/src/resources/v1/contracts/index.ts +2 -0
- package/src/resources/v1/contracts/rate-cards/rates.ts +4 -0
- package/src/resources/v1/customers/alerts.ts +99 -2
- package/src/resources/v1/customers/invoices.ts +6 -0
- package/src/resources/v1/dashboards.ts +10 -3
- package/src/resources/v1/index.ts +2 -0
- package/src/resources/v1/packages.ts +291 -9
- package/src/resources/v1/v1.ts +4 -0
- package/src/resources/v2/contracts.ts +517 -6
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alerts.d.mts","sourceRoot":"","sources":["../../src/resources/v1/alerts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0DG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAI1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;IACH,OAAO,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAG9F;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,UAAU,EACN,4BAA4B,GAC5B,yBAAyB,GACzB,+CAA+C,GAC/C,oCAAoC,GACpC,yCAAyC,GACzC,yBAAyB,G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AoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
package/resources/v1/alerts.d.ts
CHANGED
|
@@ -126,6 +126,12 @@ export interface AlertCreateParams {
|
|
|
126
126
|
* percentage reached.
|
|
127
127
|
*/
|
|
128
128
|
threshold: number;
|
|
129
|
+
/**
|
|
130
|
+
* Can be used with only `low_remaining_contract_credit_and_commit_balance_reached`
|
|
131
|
+
* notifications. Defines the balances that are considered when evaluating the
|
|
132
|
+
* alert.
|
|
133
|
+
*/
|
|
134
|
+
alert_specifiers?: Array<AlertCreateParams.AlertSpecifier>;
|
|
129
135
|
/**
|
|
130
136
|
* For threshold notifications of type `usage_threshold_reached`, specifies which
|
|
131
137
|
* billable metric to track the usage for.
|
|
@@ -188,6 +194,39 @@ export interface AlertCreateParams {
|
|
|
188
194
|
uniqueness_key?: string;
|
|
189
195
|
}
|
|
190
196
|
export declare namespace AlertCreateParams {
|
|
197
|
+
interface AlertSpecifier {
|
|
198
|
+
/**
|
|
199
|
+
* A list of custom field filters for notification types that support advanced
|
|
200
|
+
* filtering
|
|
201
|
+
*/
|
|
202
|
+
custom_field_filters?: Array<AlertSpecifier.CustomFieldFilter>;
|
|
203
|
+
/**
|
|
204
|
+
* If provided, the specifier will not apply to balances that matches the inclusion
|
|
205
|
+
* criteria and any of the excluding values.
|
|
206
|
+
*/
|
|
207
|
+
exclude?: Array<AlertSpecifier.Exclude>;
|
|
208
|
+
}
|
|
209
|
+
namespace AlertSpecifier {
|
|
210
|
+
interface CustomFieldFilter {
|
|
211
|
+
entity: 'Contract' | 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit';
|
|
212
|
+
key: string;
|
|
213
|
+
value?: string;
|
|
214
|
+
}
|
|
215
|
+
interface Exclude {
|
|
216
|
+
/**
|
|
217
|
+
* A list of custom field filters for notification types that support advanced
|
|
218
|
+
* filtering
|
|
219
|
+
*/
|
|
220
|
+
custom_field_filters?: Array<Exclude.CustomFieldFilter>;
|
|
221
|
+
}
|
|
222
|
+
namespace Exclude {
|
|
223
|
+
interface CustomFieldFilter {
|
|
224
|
+
entity: 'Contract' | 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit';
|
|
225
|
+
key: string;
|
|
226
|
+
value: string;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
191
230
|
interface CustomFieldFilter {
|
|
192
231
|
entity: 'Contract' | 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit';
|
|
193
232
|
key: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alerts.d.ts","sourceRoot":"","sources":["../../src/resources/v1/alerts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0DG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAI1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;IACH,OAAO,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAG9F;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,UAAU,EACN,4BAA4B,GAC5B,yBAAyB,GACzB,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AO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -373,6 +373,47 @@ export declare class Contracts extends APIResource {
|
|
|
373
373
|
* ```
|
|
374
374
|
*/
|
|
375
375
|
getNetBalance(body: ContractGetNetBalanceParams, options?: RequestOptions): APIPromise<ContractGetNetBalanceResponse>;
|
|
376
|
+
/**
|
|
377
|
+
* Get the history of subscription seats schedule over time for a given
|
|
378
|
+
* `subscription_id`. This endpoint provides information about seat assignments and
|
|
379
|
+
* total quantities for different time periods, allowing you to track how seat
|
|
380
|
+
* assignments have changed over time.
|
|
381
|
+
*
|
|
382
|
+
* ### Use this endpoint to:
|
|
383
|
+
*
|
|
384
|
+
* - Track changes to seat assignments over time
|
|
385
|
+
* - Get seat schedule for a specific date using the `covering_date` parameter
|
|
386
|
+
* - Get seat schedule history with optional date range filtering using
|
|
387
|
+
* `starting_at` and `ending_before`
|
|
388
|
+
*
|
|
389
|
+
* ### Key response fields:
|
|
390
|
+
*
|
|
391
|
+
* - data: array of seat schedule entries with time periods, quantity, and
|
|
392
|
+
* assignments
|
|
393
|
+
* - next_page: cursor for pagination to retrieve additional results
|
|
394
|
+
*
|
|
395
|
+
* ### Usage guidelines:
|
|
396
|
+
*
|
|
397
|
+
* - Use `covering_date` to get the active seats for a specific point in time.
|
|
398
|
+
* `covering_date` cannot be used with `starting_at` or `ending_before`.
|
|
399
|
+
* - Use `starting_at` and `ending_before` to filter results by time range.
|
|
400
|
+
* `starting_at` and `ending_before` cannot be used with `covering_date`.
|
|
401
|
+
* - Maximum limit is 10 seat schedule entries per request
|
|
402
|
+
* - Results are ordered by `starting_at` timestamp
|
|
403
|
+
*
|
|
404
|
+
* @example
|
|
405
|
+
* ```ts
|
|
406
|
+
* const response =
|
|
407
|
+
* await client.v1.contracts.getSubscriptionSeatsHistory({
|
|
408
|
+
* contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
409
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
410
|
+
* subscription_id: '1a824d53-bde6-4d82-96d7-6347ff227d5c',
|
|
411
|
+
* covering_date: '2024-01-15T00:00:00.000Z',
|
|
412
|
+
* limit: 10,
|
|
413
|
+
* });
|
|
414
|
+
* ```
|
|
415
|
+
*/
|
|
416
|
+
getSubscriptionSeatsHistory(body: ContractGetSubscriptionSeatsHistoryParams, options?: RequestOptions): APIPromise<ContractGetSubscriptionSeatsHistoryResponse>;
|
|
376
417
|
/**
|
|
377
418
|
* Retrieve a comprehensive view of all available balances (commits and credits)
|
|
378
419
|
* for a customer. This endpoint provides real-time visibility into prepaid funds,
|
|
@@ -788,6 +829,10 @@ export declare namespace ContractCreateResponse {
|
|
|
788
829
|
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
789
830
|
*/
|
|
790
831
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
832
|
+
/**
|
|
833
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
834
|
+
*/
|
|
835
|
+
proration_rounding?: RecurringCommit.ProrationRounding | null;
|
|
791
836
|
/**
|
|
792
837
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
793
838
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -795,7 +840,7 @@ export declare namespace ContractCreateResponse {
|
|
|
795
840
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
796
841
|
* invoice dates.
|
|
797
842
|
*/
|
|
798
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
843
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
799
844
|
/**
|
|
800
845
|
* Will be passed down to the individual commits. This controls how much of an
|
|
801
846
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
@@ -844,6 +889,35 @@ export declare namespace ContractCreateResponse {
|
|
|
844
889
|
quantity: number;
|
|
845
890
|
unit_price: number;
|
|
846
891
|
}
|
|
892
|
+
/**
|
|
893
|
+
* Rounding configuration for prorated recurring commit amounts.
|
|
894
|
+
*/
|
|
895
|
+
interface ProrationRounding {
|
|
896
|
+
access?: ProrationRounding.Access;
|
|
897
|
+
invoice?: ProrationRounding.Invoice;
|
|
898
|
+
}
|
|
899
|
+
namespace ProrationRounding {
|
|
900
|
+
interface Access {
|
|
901
|
+
/**
|
|
902
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
903
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
904
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
905
|
+
* dollar).
|
|
906
|
+
*/
|
|
907
|
+
decimal_places: number;
|
|
908
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
909
|
+
}
|
|
910
|
+
interface Invoice {
|
|
911
|
+
/**
|
|
912
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
913
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
914
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
915
|
+
* dollar).
|
|
916
|
+
*/
|
|
917
|
+
decimal_places: number;
|
|
918
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
919
|
+
}
|
|
920
|
+
}
|
|
847
921
|
}
|
|
848
922
|
interface RecurringCredit {
|
|
849
923
|
id: string;
|
|
@@ -902,6 +976,10 @@ export declare namespace ContractCreateResponse {
|
|
|
902
976
|
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
903
977
|
*/
|
|
904
978
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
979
|
+
/**
|
|
980
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
981
|
+
*/
|
|
982
|
+
proration_rounding?: RecurringCredit.ProrationRounding | null;
|
|
905
983
|
/**
|
|
906
984
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
907
985
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -909,7 +987,7 @@ export declare namespace ContractCreateResponse {
|
|
|
909
987
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
910
988
|
* invoice dates.
|
|
911
989
|
*/
|
|
912
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
990
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
913
991
|
/**
|
|
914
992
|
* Will be passed down to the individual commits. This controls how much of an
|
|
915
993
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
@@ -950,6 +1028,24 @@ export declare namespace ContractCreateResponse {
|
|
|
950
1028
|
interface Contract {
|
|
951
1029
|
id: string;
|
|
952
1030
|
}
|
|
1031
|
+
/**
|
|
1032
|
+
* Rounding configuration for prorated recurring credit amounts.
|
|
1033
|
+
*/
|
|
1034
|
+
interface ProrationRounding {
|
|
1035
|
+
access?: ProrationRounding.Access;
|
|
1036
|
+
}
|
|
1037
|
+
namespace ProrationRounding {
|
|
1038
|
+
interface Access {
|
|
1039
|
+
/**
|
|
1040
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
1041
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1042
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
1043
|
+
* dollar).
|
|
1044
|
+
*/
|
|
1045
|
+
decimal_places: number;
|
|
1046
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
953
1049
|
}
|
|
954
1050
|
}
|
|
955
1051
|
}
|
|
@@ -986,6 +1082,33 @@ export declare namespace ContractGetNetBalanceResponse {
|
|
|
986
1082
|
credit_type_id: string;
|
|
987
1083
|
}
|
|
988
1084
|
}
|
|
1085
|
+
export interface ContractGetSubscriptionSeatsHistoryResponse {
|
|
1086
|
+
data: Array<ContractGetSubscriptionSeatsHistoryResponse.Data>;
|
|
1087
|
+
/**
|
|
1088
|
+
* Cursor for the next page of results
|
|
1089
|
+
*/
|
|
1090
|
+
next_page: string | null;
|
|
1091
|
+
}
|
|
1092
|
+
export declare namespace ContractGetSubscriptionSeatsHistoryResponse {
|
|
1093
|
+
interface Data {
|
|
1094
|
+
/**
|
|
1095
|
+
* Array of seat IDs that are assigned in this period
|
|
1096
|
+
*/
|
|
1097
|
+
assigned_seat_ids: Array<string>;
|
|
1098
|
+
/**
|
|
1099
|
+
* The end time of this seat schedule period (null if ongoing)
|
|
1100
|
+
*/
|
|
1101
|
+
ending_before: string | null;
|
|
1102
|
+
/**
|
|
1103
|
+
* The start time of this seat schedule period
|
|
1104
|
+
*/
|
|
1105
|
+
starting_at: string;
|
|
1106
|
+
/**
|
|
1107
|
+
* Total number of assigned and unassigned seats in this period
|
|
1108
|
+
*/
|
|
1109
|
+
total_quantity: number;
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
989
1112
|
export type ContractListBalancesResponse = Shared.Commit | Shared.Credit;
|
|
990
1113
|
export interface ContractListSeatBalancesResponse {
|
|
991
1114
|
data: Array<ContractListSeatBalancesResponse.Data>;
|
|
@@ -1764,9 +1887,10 @@ export declare namespace ContractCreateParams {
|
|
|
1764
1887
|
entitled?: boolean;
|
|
1765
1888
|
/**
|
|
1766
1889
|
* Indicates whether the override should only apply to commits. Defaults to
|
|
1767
|
-
* `false`. If `true
|
|
1768
|
-
* passing `commit_ids
|
|
1769
|
-
*
|
|
1890
|
+
* `false`. If `true` you can specify relevant commits in `override_specifiers` by
|
|
1891
|
+
* passing `commit_ids`, `recurring_commit_ids`, or `any_commit_or_credit_ids`. If
|
|
1892
|
+
* you do not specify any of these fields, the override will apply when consuming
|
|
1893
|
+
* any prepaid commit, postpaid commit, or credit
|
|
1770
1894
|
*/
|
|
1771
1895
|
is_commit_specific?: boolean;
|
|
1772
1896
|
/**
|
|
@@ -1811,6 +1935,14 @@ export declare namespace ContractCreateParams {
|
|
|
1811
1935
|
}
|
|
1812
1936
|
namespace Override {
|
|
1813
1937
|
interface OverrideSpecifier {
|
|
1938
|
+
/**
|
|
1939
|
+
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
1940
|
+
* one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
1941
|
+
* `presentation_group_values`. Must be used instead of both `commit_ids` and
|
|
1942
|
+
* `recurring_commit_ids` If provided, the override will apply to any specified
|
|
1943
|
+
* commit, credit, recurring commit or recurring credit IDs.
|
|
1944
|
+
*/
|
|
1945
|
+
any_commit_or_credit_ids?: Array<string>;
|
|
1814
1946
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1815
1947
|
/**
|
|
1816
1948
|
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
@@ -1972,6 +2104,10 @@ export declare namespace ContractCreateParams {
|
|
|
1972
2104
|
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1973
2105
|
*/
|
|
1974
2106
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
2107
|
+
/**
|
|
2108
|
+
* Optional rounding configuration for prorated recurring commit amounts.
|
|
2109
|
+
*/
|
|
2110
|
+
proration_rounding?: RecurringCommit.ProrationRounding;
|
|
1975
2111
|
/**
|
|
1976
2112
|
* Whether the created commits will use the commit rate or list rate
|
|
1977
2113
|
*/
|
|
@@ -1983,7 +2119,7 @@ export declare namespace ContractCreateParams {
|
|
|
1983
2119
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1984
2120
|
* invoice dates.
|
|
1985
2121
|
*/
|
|
1986
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2122
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
1987
2123
|
/**
|
|
1988
2124
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1989
2125
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
@@ -2037,6 +2173,35 @@ export declare namespace ContractCreateParams {
|
|
|
2037
2173
|
quantity: number;
|
|
2038
2174
|
unit_price: number;
|
|
2039
2175
|
}
|
|
2176
|
+
/**
|
|
2177
|
+
* Optional rounding configuration for prorated recurring commit amounts.
|
|
2178
|
+
*/
|
|
2179
|
+
interface ProrationRounding {
|
|
2180
|
+
access?: ProrationRounding.Access;
|
|
2181
|
+
invoice?: ProrationRounding.Invoice;
|
|
2182
|
+
}
|
|
2183
|
+
namespace ProrationRounding {
|
|
2184
|
+
interface Access {
|
|
2185
|
+
/**
|
|
2186
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2187
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2188
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
2189
|
+
* dollar).
|
|
2190
|
+
*/
|
|
2191
|
+
decimal_places: number;
|
|
2192
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2193
|
+
}
|
|
2194
|
+
interface Invoice {
|
|
2195
|
+
/**
|
|
2196
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2197
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2198
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
2199
|
+
* dollar).
|
|
2200
|
+
*/
|
|
2201
|
+
decimal_places: number;
|
|
2202
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2040
2205
|
/**
|
|
2041
2206
|
* Attach a subscription to the recurring commit/credit.
|
|
2042
2207
|
*/
|
|
@@ -2114,6 +2279,10 @@ export declare namespace ContractCreateParams {
|
|
|
2114
2279
|
* the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
2115
2280
|
*/
|
|
2116
2281
|
proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
|
|
2282
|
+
/**
|
|
2283
|
+
* Optional rounding configuration for prorated recurring credit amounts.
|
|
2284
|
+
*/
|
|
2285
|
+
proration_rounding?: RecurringCredit.ProrationRounding;
|
|
2117
2286
|
/**
|
|
2118
2287
|
* Whether the created commits will use the commit rate or list rate
|
|
2119
2288
|
*/
|
|
@@ -2125,7 +2294,7 @@ export declare namespace ContractCreateParams {
|
|
|
2125
2294
|
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
2126
2295
|
* invoice dates.
|
|
2127
2296
|
*/
|
|
2128
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2297
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
|
|
2129
2298
|
/**
|
|
2130
2299
|
* Will be passed down to the individual commits. This controls how much of an
|
|
2131
2300
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
@@ -2171,6 +2340,24 @@ export declare namespace ContractCreateParams {
|
|
|
2171
2340
|
value: number;
|
|
2172
2341
|
unit?: 'PERIODS';
|
|
2173
2342
|
}
|
|
2343
|
+
/**
|
|
2344
|
+
* Optional rounding configuration for prorated recurring credit amounts.
|
|
2345
|
+
*/
|
|
2346
|
+
interface ProrationRounding {
|
|
2347
|
+
access?: ProrationRounding.Access;
|
|
2348
|
+
}
|
|
2349
|
+
namespace ProrationRounding {
|
|
2350
|
+
interface Access {
|
|
2351
|
+
/**
|
|
2352
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2353
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2354
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
2355
|
+
* dollar).
|
|
2356
|
+
*/
|
|
2357
|
+
decimal_places: number;
|
|
2358
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2174
2361
|
/**
|
|
2175
2362
|
* Attach a subscription to the recurring commit/credit.
|
|
2176
2363
|
*/
|
|
@@ -2377,6 +2564,7 @@ export declare namespace ContractCreateParams {
|
|
|
2377
2564
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
2378
2565
|
proration: Subscription.Proration;
|
|
2379
2566
|
subscription_rate: Subscription.SubscriptionRate;
|
|
2567
|
+
billing_cycle_config?: Subscription.BillingCycleConfig;
|
|
2380
2568
|
/**
|
|
2381
2569
|
* Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2382
2570
|
*/
|
|
@@ -2433,6 +2621,19 @@ export declare namespace ContractCreateParams {
|
|
|
2433
2621
|
* Indicates if the partial period will be prorated or charged a full amount.
|
|
2434
2622
|
*/
|
|
2435
2623
|
is_prorated?: boolean;
|
|
2624
|
+
rounding?: Proration.Rounding;
|
|
2625
|
+
}
|
|
2626
|
+
namespace Proration {
|
|
2627
|
+
interface Rounding {
|
|
2628
|
+
/**
|
|
2629
|
+
* Number of decimal places to round to. Applied directly to the stored monetary
|
|
2630
|
+
* representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2631
|
+
* nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
2632
|
+
* dollar).
|
|
2633
|
+
*/
|
|
2634
|
+
decimal_places: number;
|
|
2635
|
+
rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
|
|
2636
|
+
}
|
|
2436
2637
|
}
|
|
2437
2638
|
interface SubscriptionRate {
|
|
2438
2639
|
/**
|
|
@@ -2445,6 +2646,18 @@ export declare namespace ContractCreateParams {
|
|
|
2445
2646
|
*/
|
|
2446
2647
|
product_id: string;
|
|
2447
2648
|
}
|
|
2649
|
+
interface BillingCycleConfig {
|
|
2650
|
+
/**
|
|
2651
|
+
* The date to anchor the billing cycle to. If omitted, defaults to the contract's
|
|
2652
|
+
* usage invoice billing cycle anchor date.
|
|
2653
|
+
*/
|
|
2654
|
+
anchor_date?: string;
|
|
2655
|
+
/**
|
|
2656
|
+
* Controls whether this subscription consolidates onto usage invoices or gets its
|
|
2657
|
+
* own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
|
|
2658
|
+
*/
|
|
2659
|
+
invoice_placement?: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
|
|
2660
|
+
}
|
|
2448
2661
|
interface SeatConfig {
|
|
2449
2662
|
/**
|
|
2450
2663
|
* The initial assigned seats on this subscription.
|
|
@@ -3047,9 +3260,10 @@ export declare namespace ContractAmendParams {
|
|
|
3047
3260
|
entitled?: boolean;
|
|
3048
3261
|
/**
|
|
3049
3262
|
* Indicates whether the override should only apply to commits. Defaults to
|
|
3050
|
-
* `false`. If `true
|
|
3051
|
-
* passing `commit_ids
|
|
3052
|
-
*
|
|
3263
|
+
* `false`. If `true` you can specify relevant commits in `override_specifiers` by
|
|
3264
|
+
* passing `commit_ids`, `recurring_commit_ids`, or `any_commit_or_credit_ids`. If
|
|
3265
|
+
* you do not specify any of these fields, the override will apply when consuming
|
|
3266
|
+
* any prepaid commit, postpaid commit, or credit
|
|
3053
3267
|
*/
|
|
3054
3268
|
is_commit_specific?: boolean;
|
|
3055
3269
|
/**
|
|
@@ -3094,6 +3308,14 @@ export declare namespace ContractAmendParams {
|
|
|
3094
3308
|
}
|
|
3095
3309
|
namespace Override {
|
|
3096
3310
|
interface OverrideSpecifier {
|
|
3311
|
+
/**
|
|
3312
|
+
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
3313
|
+
* one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
3314
|
+
* `presentation_group_values`. Must be used instead of both `commit_ids` and
|
|
3315
|
+
* `recurring_commit_ids` If provided, the override will apply to any specified
|
|
3316
|
+
* commit, credit, recurring commit or recurring credit IDs.
|
|
3317
|
+
*/
|
|
3318
|
+
any_commit_or_credit_ids?: Array<string>;
|
|
3097
3319
|
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
3098
3320
|
/**
|
|
3099
3321
|
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
@@ -3424,6 +3646,38 @@ export interface ContractGetNetBalanceParams {
|
|
|
3424
3646
|
*/
|
|
3425
3647
|
invoice_inclusion_mode?: 'FINALIZED' | 'FINALIZED_AND_DRAFT';
|
|
3426
3648
|
}
|
|
3649
|
+
export interface ContractGetSubscriptionSeatsHistoryParams {
|
|
3650
|
+
contract_id: string;
|
|
3651
|
+
customer_id: string;
|
|
3652
|
+
subscription_id: string;
|
|
3653
|
+
/**
|
|
3654
|
+
* Get the seats history segment for the covering date. Cannot be used with
|
|
3655
|
+
* `starting_at` or `ending_before`.
|
|
3656
|
+
*/
|
|
3657
|
+
covering_date?: string | null;
|
|
3658
|
+
/**
|
|
3659
|
+
* Cursor for pagination. Use the value from the `next_page` field of the previous
|
|
3660
|
+
* response to retrieve the next page of results.
|
|
3661
|
+
*/
|
|
3662
|
+
cursor?: string | null;
|
|
3663
|
+
/**
|
|
3664
|
+
* Include seats history segments that are active at or before this timestamp. Use
|
|
3665
|
+
* with `starting_at` to get a specific time range. If not set, there's no upper
|
|
3666
|
+
* bound.
|
|
3667
|
+
*/
|
|
3668
|
+
ending_before?: string | null;
|
|
3669
|
+
/**
|
|
3670
|
+
* Maximum number of seat schedule entries to return. Defaults to 10. Required
|
|
3671
|
+
* range: 1 <= x <= 10.
|
|
3672
|
+
*/
|
|
3673
|
+
limit?: number | null;
|
|
3674
|
+
/**
|
|
3675
|
+
* Include seats history segments that are active at or after this timestamp. Use
|
|
3676
|
+
* with `ending_before` to get a specific time range. If not set, there's no lower
|
|
3677
|
+
* bound.
|
|
3678
|
+
*/
|
|
3679
|
+
starting_at?: string | null;
|
|
3680
|
+
}
|
|
3427
3681
|
export interface ContractListBalancesParams extends BodyCursorPageParams {
|
|
3428
3682
|
customer_id: string;
|
|
3429
3683
|
id?: string;
|
|
@@ -3508,6 +3762,11 @@ export interface ContractListSeatBalancesParams {
|
|
|
3508
3762
|
* Optional filter to only include specific seats.
|
|
3509
3763
|
*/
|
|
3510
3764
|
seat_ids?: Array<string>;
|
|
3765
|
+
/**
|
|
3766
|
+
* When true, any seat_ids not found in contract subscriptions will be silently
|
|
3767
|
+
* omitted from the response instead of returning a 400 error.
|
|
3768
|
+
*/
|
|
3769
|
+
skip_missing_seat_ids?: boolean;
|
|
3511
3770
|
/**
|
|
3512
3771
|
* Include only commits or credits with access effective on or after this date
|
|
3513
3772
|
* (cannot be used with covering_date).
|
|
@@ -3674,7 +3933,7 @@ export interface ContractUpdateEndDateParams {
|
|
|
3674
3933
|
ending_before?: string;
|
|
3675
3934
|
}
|
|
3676
3935
|
export declare namespace Contracts {
|
|
3677
|
-
export { type ContractCreateResponse as ContractCreateResponse, type ContractRetrieveResponse as ContractRetrieveResponse, type ContractListResponse as ContractListResponse, type ContractAmendResponse as ContractAmendResponse, type ContractArchiveResponse as ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse, type ContractGetNetBalanceResponse as ContractGetNetBalanceResponse, type ContractListBalancesResponse as ContractListBalancesResponse, type ContractListSeatBalancesResponse as ContractListSeatBalancesResponse, type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse, type ContractRetrieveSubscriptionQuantityHistoryResponse as ContractRetrieveSubscriptionQuantityHistoryResponse, type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse, type ContractListBalancesResponsesBodyCursorPage as ContractListBalancesResponsesBodyCursorPage, type ContractCreateParams as ContractCreateParams, type ContractRetrieveParams as ContractRetrieveParams, type ContractListParams as ContractListParams, type ContractAddManualBalanceEntryParams as ContractAddManualBalanceEntryParams, type ContractAmendParams as ContractAmendParams, type ContractArchiveParams as ContractArchiveParams, type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams, type ContractGetNetBalanceParams as ContractGetNetBalanceParams, type ContractListBalancesParams as ContractListBalancesParams, type ContractListSeatBalancesParams as ContractListSeatBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractRetrieveSubscriptionQuantityHistoryParams as ContractRetrieveSubscriptionQuantityHistoryParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
|
|
3936
|
+
export { type ContractCreateResponse as ContractCreateResponse, type ContractRetrieveResponse as ContractRetrieveResponse, type ContractListResponse as ContractListResponse, type ContractAmendResponse as ContractAmendResponse, type ContractArchiveResponse as ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse, type ContractGetNetBalanceResponse as ContractGetNetBalanceResponse, type ContractGetSubscriptionSeatsHistoryResponse as ContractGetSubscriptionSeatsHistoryResponse, type ContractListBalancesResponse as ContractListBalancesResponse, type ContractListSeatBalancesResponse as ContractListSeatBalancesResponse, type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse, type ContractRetrieveSubscriptionQuantityHistoryResponse as ContractRetrieveSubscriptionQuantityHistoryResponse, type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse, type ContractListBalancesResponsesBodyCursorPage as ContractListBalancesResponsesBodyCursorPage, type ContractCreateParams as ContractCreateParams, type ContractRetrieveParams as ContractRetrieveParams, type ContractListParams as ContractListParams, type ContractAddManualBalanceEntryParams as ContractAddManualBalanceEntryParams, type ContractAmendParams as ContractAmendParams, type ContractArchiveParams as ContractArchiveParams, type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams, type ContractGetNetBalanceParams as ContractGetNetBalanceParams, type ContractGetSubscriptionSeatsHistoryParams as ContractGetSubscriptionSeatsHistoryParams, type ContractListBalancesParams as ContractListBalancesParams, type ContractListSeatBalancesParams as ContractListSeatBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractRetrieveSubscriptionQuantityHistoryParams as ContractRetrieveSubscriptionQuantityHistoryParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
|
|
3678
3937
|
export { Products as Products, type ProductListItemState as ProductListItemState, type QuantityConversion as QuantityConversion, type QuantityRounding as QuantityRounding, type ProductCreateResponse as ProductCreateResponse, type ProductRetrieveResponse as ProductRetrieveResponse, type ProductUpdateResponse as ProductUpdateResponse, type ProductListResponse as ProductListResponse, type ProductArchiveResponse as ProductArchiveResponse, type ProductListResponsesCursorPage as ProductListResponsesCursorPage, type ProductCreateParams as ProductCreateParams, type ProductRetrieveParams as ProductRetrieveParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, type ProductArchiveParams as ProductArchiveParams, };
|
|
3679
3938
|
export { RateCards as RateCards, type RateCardCreateResponse as RateCardCreateResponse, type RateCardRetrieveResponse as RateCardRetrieveResponse, type RateCardUpdateResponse as RateCardUpdateResponse, type RateCardListResponse as RateCardListResponse, type RateCardArchiveResponse as RateCardArchiveResponse, type RateCardRetrieveRateScheduleResponse as RateCardRetrieveRateScheduleResponse, type RateCardListResponsesCursorPage as RateCardListResponsesCursorPage, type RateCardCreateParams as RateCardCreateParams, type RateCardRetrieveParams as RateCardRetrieveParams, type RateCardUpdateParams as RateCardUpdateParams, type RateCardListParams as RateCardListParams, type RateCardArchiveParams as RateCardArchiveParams, type RateCardRetrieveRateScheduleParams as RateCardRetrieveRateScheduleParams, };
|
|
3680
3939
|
export { NamedSchedules as NamedSchedules, type NamedScheduleRetrieveResponse as NamedScheduleRetrieveResponse, type NamedScheduleRetrieveParams as NamedScheduleRetrieveParams, type NamedScheduleUpdateParams as NamedScheduleUpdateParams, };
|