@metronome/sdk 3.8.0 → 3.10.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/package.json +1 -1
  3. package/resources/shared.d.mts +178 -22
  4. package/resources/shared.d.mts.map +1 -1
  5. package/resources/shared.d.ts +178 -22
  6. package/resources/shared.d.ts.map +1 -1
  7. package/resources/v1/contracts/contracts.d.mts +43 -15
  8. package/resources/v1/contracts/contracts.d.mts.map +1 -1
  9. package/resources/v1/contracts/contracts.d.ts +43 -15
  10. package/resources/v1/contracts/contracts.d.ts.map +1 -1
  11. package/resources/v1/contracts/contracts.js.map +1 -1
  12. package/resources/v1/contracts/contracts.mjs.map +1 -1
  13. package/resources/v1/contracts/rate-cards/rate-cards.d.mts +17 -13
  14. package/resources/v1/contracts/rate-cards/rate-cards.d.mts.map +1 -1
  15. package/resources/v1/contracts/rate-cards/rate-cards.d.ts +17 -13
  16. package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -1
  17. package/resources/v1/contracts/rate-cards/rate-cards.js +8 -13
  18. package/resources/v1/contracts/rate-cards/rate-cards.js.map +1 -1
  19. package/resources/v1/contracts/rate-cards/rate-cards.mjs +8 -13
  20. package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -1
  21. package/resources/v1/dashboards.d.mts +13 -22
  22. package/resources/v1/dashboards.d.mts.map +1 -1
  23. package/resources/v1/dashboards.d.ts +13 -22
  24. package/resources/v1/dashboards.d.ts.map +1 -1
  25. package/resources/v1/dashboards.js +7 -20
  26. package/resources/v1/dashboards.js.map +1 -1
  27. package/resources/v1/dashboards.mjs +7 -20
  28. package/resources/v1/dashboards.mjs.map +1 -1
  29. package/resources/v1/packages.d.mts +12 -6
  30. package/resources/v1/packages.d.mts.map +1 -1
  31. package/resources/v1/packages.d.ts +12 -6
  32. package/resources/v1/packages.d.ts.map +1 -1
  33. package/resources/v2/contracts.d.mts +28 -10
  34. package/resources/v2/contracts.d.mts.map +1 -1
  35. package/resources/v2/contracts.d.ts +28 -10
  36. package/resources/v2/contracts.d.ts.map +1 -1
  37. package/src/resources/shared.ts +208 -23
  38. package/src/resources/v1/contracts/contracts.ts +44 -15
  39. package/src/resources/v1/contracts/rate-cards/rate-cards.ts +20 -13
  40. package/src/resources/v1/dashboards.ts +21 -22
  41. package/src/resources/v1/packages.ts +12 -6
  42. package/src/resources/v2/contracts.ts +30 -10
  43. package/src/version.ts +1 -1
  44. package/version.d.mts +1 -1
  45. package/version.d.mts.map +1 -1
  46. package/version.d.ts +1 -1
  47. package/version.d.ts.map +1 -1
  48. package/version.js +1 -1
  49. package/version.js.map +1 -1
  50. package/version.mjs +1 -1
  51. package/version.mjs.map +1 -1
@@ -103,6 +103,11 @@ export interface Commit {
103
103
 
104
104
  contract?: Commit.Contract;
105
105
 
106
+ /**
107
+ * The ratio of the amount paid for the commit to the amount of credit granted.
108
+ */
109
+ cost_basis?: number;
110
+
106
111
  /**
107
112
  * The actor who created this commit. Omitted for system-generated commits such as
108
113
  * recurring commits, rollover commits, and threshold commits.
@@ -531,9 +536,6 @@ export interface Contract {
531
536
  */
532
537
  custom_fields?: { [key: string]: string };
533
538
 
534
- /**
535
- * The billing provider configuration associated with a contract.
536
- */
537
539
  customer_billing_provider_configuration?: Contract.CustomerBillingProviderConfiguration;
538
540
 
539
541
  /**
@@ -642,12 +644,18 @@ export namespace Contract {
642
644
  }
643
645
  }
644
646
 
645
- /**
646
- * The billing provider configuration associated with a contract.
647
- */
648
647
  export interface CustomerBillingProviderConfiguration {
648
+ /**
649
+ * ID of this configuration; can be provided as the
650
+ * billing_provider_configuration_id when creating a contract.
651
+ */
652
+ id: string;
653
+
649
654
  archived_at: string | null;
650
655
 
656
+ /**
657
+ * The billing provider set for this configuration.
658
+ */
651
659
  billing_provider:
652
660
  | 'aws_marketplace'
653
661
  | 'stripe'
@@ -659,15 +667,29 @@ export namespace Contract {
659
667
  | 'gcp_marketplace'
660
668
  | 'metronome';
661
669
 
670
+ /**
671
+ * Configuration for the billing provider. The structure of this object is specific
672
+ * to the billing provider.
673
+ */
674
+ configuration: { [key: string]: unknown };
675
+
676
+ customer_id: string;
677
+
678
+ /**
679
+ * The method to use for delivering invoices to this customer.
680
+ */
662
681
  delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
663
682
 
664
- id?: string;
683
+ /**
684
+ * Configuration for the delivery method. The structure of this object is specific
685
+ * to the delivery method.
686
+ */
687
+ delivery_method_configuration: { [key: string]: unknown };
665
688
 
666
689
  /**
667
- * Configuration for the billing provider. The structure of this object is specific
668
- * to the billing provider.
690
+ * ID of the delivery method to use for this customer.
669
691
  */
670
- configuration?: { [key: string]: unknown };
692
+ delivery_method_id: string;
671
693
  }
672
694
 
673
695
  export interface SpendTracker {
@@ -729,6 +751,12 @@ export interface ContractV2 {
729
751
 
730
752
  archived_at?: string;
731
753
 
754
+ /**
755
+ * The schedule of billing provider configuration changes on the contract, ordered
756
+ * by effective_at ascending.
757
+ */
758
+ billing_provider_configuration_schedule?: Array<ContractV2.BillingProviderConfigurationSchedule>;
759
+
732
760
  credits?: Array<ContractV2.Credit>;
733
761
 
734
762
  /**
@@ -736,9 +764,6 @@ export interface ContractV2 {
736
764
  */
737
765
  custom_fields?: { [key: string]: string };
738
766
 
739
- /**
740
- * This field's availability is dependent on your client's configuration.
741
- */
742
767
  customer_billing_provider_configuration?: ContractV2.CustomerBillingProviderConfiguration;
743
768
 
744
769
  /**
@@ -802,6 +827,12 @@ export interface ContractV2 {
802
827
  */
803
828
  reseller_royalties?: Array<ContractV2.ResellerRoyalty>;
804
829
 
830
+ /**
831
+ * The schedule of revenue system configuration changes on the contract, ordered by
832
+ * effective_at ascending.
833
+ */
834
+ revenue_system_configuration_schedule?: Array<ContractV2.RevenueSystemConfigurationSchedule>;
835
+
805
836
  /**
806
837
  * This field's availability is dependent on your client's configuration.
807
838
  */
@@ -881,6 +912,11 @@ export namespace ContractV2 {
881
912
 
882
913
  contract?: Commit.Contract;
883
914
 
915
+ /**
916
+ * The ratio of the amount paid for the commit to the amount of credit granted.
917
+ */
918
+ cost_basis?: number;
919
+
884
920
  /**
885
921
  * The actor who created this commit. Omitted for system-generated commits such as
886
922
  * recurring commits, rollover commits, and threshold commits.
@@ -1268,7 +1304,7 @@ export namespace ContractV2 {
1268
1304
 
1269
1305
  to_contract_id: string;
1270
1306
 
1271
- type: 'SUPERSEDE' | 'RENEWAL';
1307
+ type: 'RENEWAL';
1272
1308
  }
1273
1309
 
1274
1310
  export interface UsageFilter {
@@ -1298,6 +1334,71 @@ export namespace ContractV2 {
1298
1334
  frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1299
1335
  }
1300
1336
 
1337
+ export interface BillingProviderConfigurationSchedule {
1338
+ billing_provider_configuration: BillingProviderConfigurationSchedule.BillingProviderConfiguration | null;
1339
+
1340
+ /**
1341
+ * The date this billing provider configuration became or becomes active.
1342
+ */
1343
+ effective_at: string;
1344
+
1345
+ /**
1346
+ * The date this billing provider configuration is superseded by the next entry.
1347
+ * Null for the last entry in the schedule.
1348
+ */
1349
+ effective_until?: string;
1350
+ }
1351
+
1352
+ export namespace BillingProviderConfigurationSchedule {
1353
+ export interface BillingProviderConfiguration {
1354
+ /**
1355
+ * ID of this configuration; can be provided as the
1356
+ * billing_provider_configuration_id when creating a contract.
1357
+ */
1358
+ id: string;
1359
+
1360
+ archived_at: string | null;
1361
+
1362
+ /**
1363
+ * The billing provider set for this configuration.
1364
+ */
1365
+ billing_provider:
1366
+ | 'aws_marketplace'
1367
+ | 'stripe'
1368
+ | 'netsuite'
1369
+ | 'custom'
1370
+ | 'azure_marketplace'
1371
+ | 'quickbooks_online'
1372
+ | 'workday'
1373
+ | 'gcp_marketplace'
1374
+ | 'metronome';
1375
+
1376
+ /**
1377
+ * Configuration for the billing provider. The structure of this object is specific
1378
+ * to the billing provider.
1379
+ */
1380
+ configuration: { [key: string]: unknown };
1381
+
1382
+ customer_id: string;
1383
+
1384
+ /**
1385
+ * The method to use for delivering invoices to this customer.
1386
+ */
1387
+ delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
1388
+
1389
+ /**
1390
+ * Configuration for the delivery method. The structure of this object is specific
1391
+ * to the delivery method.
1392
+ */
1393
+ delivery_method_configuration: { [key: string]: unknown };
1394
+
1395
+ /**
1396
+ * ID of the delivery method to use for this customer.
1397
+ */
1398
+ delivery_method_id: string;
1399
+ }
1400
+ }
1401
+
1301
1402
  export interface Credit {
1302
1403
  id: string;
1303
1404
 
@@ -1523,15 +1624,18 @@ export namespace ContractV2 {
1523
1624
  }
1524
1625
  }
1525
1626
 
1526
- /**
1527
- * This field's availability is dependent on your client's configuration.
1528
- */
1529
1627
  export interface CustomerBillingProviderConfiguration {
1530
1628
  /**
1531
- * ID of Customer's billing provider configuration.
1629
+ * ID of this configuration; can be provided as the
1630
+ * billing_provider_configuration_id when creating a contract.
1532
1631
  */
1533
1632
  id: string;
1534
1633
 
1634
+ archived_at: string | null;
1635
+
1636
+ /**
1637
+ * The billing provider set for this configuration.
1638
+ */
1535
1639
  billing_provider:
1536
1640
  | 'aws_marketplace'
1537
1641
  | 'stripe'
@@ -1543,7 +1647,29 @@ export namespace ContractV2 {
1543
1647
  | 'gcp_marketplace'
1544
1648
  | 'metronome';
1545
1649
 
1650
+ /**
1651
+ * Configuration for the billing provider. The structure of this object is specific
1652
+ * to the billing provider.
1653
+ */
1654
+ configuration: { [key: string]: unknown };
1655
+
1656
+ customer_id: string;
1657
+
1658
+ /**
1659
+ * The method to use for delivering invoices to this customer.
1660
+ */
1546
1661
  delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
1662
+
1663
+ /**
1664
+ * Configuration for the delivery method. The structure of this object is specific
1665
+ * to the delivery method.
1666
+ */
1667
+ delivery_method_configuration: { [key: string]: unknown };
1668
+
1669
+ /**
1670
+ * ID of the delivery method to use for this customer.
1671
+ */
1672
+ delivery_method_id: string;
1547
1673
  }
1548
1674
 
1549
1675
  /**
@@ -1721,7 +1847,8 @@ export namespace ContractV2 {
1721
1847
  * The commits will be created on the usage invoice frequency. If provided: - The
1722
1848
  * period defined in the duration will correspond to this frequency. - Commits will
1723
1849
  * be created aligned with the recurring commit's starting_at rather than the usage
1724
- * invoice dates.
1850
+ * invoice dates. - Daily recurring commits have a limit of one per contract, and
1851
+ * are unable to be created with seat-based subscriptions
1725
1852
  */
1726
1853
  recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1727
1854
 
@@ -1904,7 +2031,8 @@ export namespace ContractV2 {
1904
2031
  * The commits will be created on the usage invoice frequency. If provided: - The
1905
2032
  * period defined in the duration will correspond to this frequency. - Commits will
1906
2033
  * be created aligned with the recurring commit's starting_at rather than the usage
1907
- * invoice dates.
2034
+ * invoice dates. - Daily recurring commits have a limit of one per contract, and
2035
+ * are unable to be created with seat-based subscriptions
1908
2036
  */
1909
2037
  recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1910
2038
 
@@ -2016,6 +2144,61 @@ export namespace ContractV2 {
2016
2144
  }
2017
2145
  }
2018
2146
 
2147
+ export interface RevenueSystemConfigurationSchedule {
2148
+ /**
2149
+ * The date this revenue system configuration became or becomes active.
2150
+ */
2151
+ effective_at: string;
2152
+
2153
+ revenue_system_configuration: RevenueSystemConfigurationSchedule.RevenueSystemConfiguration | null;
2154
+
2155
+ /**
2156
+ * The date this revenue system configuration is superseded by the next entry. Null
2157
+ * for the last entry in the schedule.
2158
+ */
2159
+ effective_until?: string;
2160
+ }
2161
+
2162
+ export namespace RevenueSystemConfigurationSchedule {
2163
+ export interface RevenueSystemConfiguration {
2164
+ /**
2165
+ * ID of the revenue system configuration.
2166
+ */
2167
+ id: string;
2168
+
2169
+ /**
2170
+ * Configuration for the revenue system. The structure of this object is specific
2171
+ * to the provider.
2172
+ */
2173
+ configuration: { [key: string]: unknown };
2174
+
2175
+ customer_id: string;
2176
+
2177
+ /**
2178
+ * ID of the delivery method used for this customer configuration.
2179
+ */
2180
+ delivery_method_id: string;
2181
+
2182
+ /**
2183
+ * The revenue system provider (e.g. netsuite).
2184
+ */
2185
+ provider: 'netsuite';
2186
+
2187
+ archived_at?: string | null;
2188
+
2189
+ /**
2190
+ * The method to use for delivering data to the revenue system.
2191
+ */
2192
+ delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
2193
+
2194
+ /**
2195
+ * Configuration for the delivery method. The structure of this object is specific
2196
+ * to the delivery method.
2197
+ */
2198
+ delivery_method_configuration?: { [key: string]: unknown };
2199
+ }
2200
+ }
2201
+
2019
2202
  export interface SpendTracker {
2020
2203
  /**
2021
2204
  * Human-readable identifier, unique per contract.
@@ -2298,7 +2481,7 @@ export namespace ContractWithoutAmendments {
2298
2481
 
2299
2482
  to_contract_id: string;
2300
2483
 
2301
- type: 'SUPERSEDE' | 'RENEWAL';
2484
+ type: 'RENEWAL';
2302
2485
  }
2303
2486
 
2304
2487
  export interface UsageStatementSchedule {
@@ -2398,7 +2581,8 @@ export namespace ContractWithoutAmendments {
2398
2581
  * The commits will be created on the usage invoice frequency. If provided: - The
2399
2582
  * period defined in the duration will correspond to this frequency. - Commits will
2400
2583
  * be created aligned with the recurring commit's starting_at rather than the usage
2401
- * invoice dates.
2584
+ * invoice dates. - Daily recurring commits have a limit of one per contract, and
2585
+ * are unable to be created with seat-based subscriptions
2402
2586
  */
2403
2587
  recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
2404
2588
 
@@ -2583,7 +2767,8 @@ export namespace ContractWithoutAmendments {
2583
2767
  * The commits will be created on the usage invoice frequency. If provided: - The
2584
2768
  * period defined in the duration will correspond to this frequency. - Commits will
2585
2769
  * be created aligned with the recurring commit's starting_at rather than the usage
2586
- * invoice dates.
2770
+ * invoice dates. - Daily recurring commits have a limit of one per contract, and
2771
+ * are unable to be created with seat-based subscriptions
2587
2772
  */
2588
2773
  recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
2589
2774
 
@@ -824,9 +824,6 @@ export namespace ContractCreateResponse {
824
824
  */
825
825
  custom_fields?: { [key: string]: string };
826
826
 
827
- /**
828
- * The billing provider configuration associated with the contract.
829
- */
830
827
  customer_billing_provider_configuration?: Contract.CustomerBillingProviderConfiguration;
831
828
 
832
829
  ending_before?: string;
@@ -896,7 +893,7 @@ export namespace ContractCreateResponse {
896
893
 
897
894
  to_contract_id: string;
898
895
 
899
- type: 'SUPERSEDE' | 'RENEWAL';
896
+ type: 'RENEWAL';
900
897
  }
901
898
 
902
899
  export interface UsageFilter {
@@ -918,13 +915,19 @@ export namespace ContractCreateResponse {
918
915
  frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
919
916
  }
920
917
 
921
- /**
922
- * The billing provider configuration associated with the contract.
923
- */
924
918
  export interface CustomerBillingProviderConfiguration {
925
- id?: string;
919
+ /**
920
+ * ID of this configuration; can be provided as the
921
+ * billing_provider_configuration_id when creating a contract.
922
+ */
923
+ id: string;
924
+
925
+ archived_at: string | null;
926
926
 
927
- billing_provider?:
927
+ /**
928
+ * The billing provider set for this configuration.
929
+ */
930
+ billing_provider:
928
931
  | 'aws_marketplace'
929
932
  | 'stripe'
930
933
  | 'netsuite'
@@ -935,7 +938,29 @@ export namespace ContractCreateResponse {
935
938
  | 'gcp_marketplace'
936
939
  | 'metronome';
937
940
 
938
- delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
941
+ /**
942
+ * Configuration for the billing provider. The structure of this object is specific
943
+ * to the billing provider.
944
+ */
945
+ configuration: { [key: string]: unknown };
946
+
947
+ customer_id: string;
948
+
949
+ /**
950
+ * The method to use for delivering invoices to this customer.
951
+ */
952
+ delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
953
+
954
+ /**
955
+ * Configuration for the delivery method. The structure of this object is specific
956
+ * to the delivery method.
957
+ */
958
+ delivery_method_configuration: { [key: string]: unknown };
959
+
960
+ /**
961
+ * ID of the delivery method to use for this customer.
962
+ */
963
+ delivery_method_id: string;
939
964
  }
940
965
 
941
966
  /**
@@ -1046,7 +1071,8 @@ export namespace ContractCreateResponse {
1046
1071
  * The commits will be created on the usage invoice frequency. If provided: - The
1047
1072
  * period defined in the duration will correspond to this frequency. - Commits will
1048
1073
  * be created aligned with the recurring commit's starting_at rather than the usage
1049
- * invoice dates.
1074
+ * invoice dates. - Daily recurring commits have a limit of one per contract, and
1075
+ * are unable to be created with seat-based subscriptions
1050
1076
  */
1051
1077
  recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1052
1078
 
@@ -1231,7 +1257,8 @@ export namespace ContractCreateResponse {
1231
1257
  * The commits will be created on the usage invoice frequency. If provided: - The
1232
1258
  * period defined in the duration will correspond to this frequency. - Commits will
1233
1259
  * be created aligned with the recurring commit's starting_at rather than the usage
1234
- * invoice dates.
1260
+ * invoice dates. - Daily recurring commits have a limit of one per contract, and
1261
+ * are unable to be created with seat-based subscriptions
1235
1262
  */
1236
1263
  recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1237
1264
 
@@ -2618,7 +2645,8 @@ export namespace ContractCreateParams {
2618
2645
  * The commits will be created on the usage invoice frequency. If provided: - The
2619
2646
  * period defined in the duration will correspond to this frequency. - Commits will
2620
2647
  * be created aligned with the recurring commit's starting_at rather than the usage
2621
- * invoice dates.
2648
+ * invoice dates. - Daily recurring commits have a limit of one per contract, and
2649
+ * are unable to be created with seat-based subscriptions
2622
2650
  */
2623
2651
  recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
2624
2652
 
@@ -2831,7 +2859,8 @@ export namespace ContractCreateParams {
2831
2859
  * The commits will be created on the usage invoice frequency. If provided: - The
2832
2860
  * period defined in the duration will correspond to this frequency. - Commits will
2833
2861
  * be created aligned with the recurring commit's starting_at rather than the usage
2834
- * invoice dates.
2862
+ * invoice dates. - Daily recurring commits have a limit of one per contract, and
2863
+ * are unable to be created with seat-based subscriptions
2835
2864
  */
2836
2865
  recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
2837
2866
 
@@ -3306,7 +3335,7 @@ export namespace ContractCreateParams {
3306
3335
  /**
3307
3336
  * This field's available values may vary based on your client's configuration.
3308
3337
  */
3309
- type: 'SUPERSEDE' | 'RENEWAL';
3338
+ type: 'RENEWAL';
3310
3339
 
3311
3340
  future_invoice_behavior?: Transition.FutureInvoiceBehavior;
3312
3341
  }
@@ -117,24 +117,19 @@ export class RateCards extends APIResource {
117
117
  }
118
118
 
119
119
  /**
120
- * Update the metadata properties of an existing rate card, including its name,
121
- * description, and aliases. This endpoint is designed for managing rate card
122
- * identity and reference aliases rather than modifying pricing rates.
123
- *
124
- * Modifies the descriptive properties and alias configuration of a rate card
125
- * without affecting the underlying pricing rates or schedules. This allows you to
126
- * update how a rate card is identified and referenced throughout your system.
120
+ * Update a rate card's name, description, aliases, and credit type conversion
121
+ * rates. This endpoint does not affect underlying pricing rates or schedules.
127
122
  *
128
123
  * ### Use this endpoint to:
129
124
  *
130
- * - Rate card renaming: Update display names or descriptions for organizational
125
+ * - Rename rate cards: Update display names or descriptions for organizational
131
126
  * clarity
132
- * - Alias management: Add, modify, or schedule alias transitions for seamless rate
133
- * card migrations
134
- * - Documentation updates: Keep rate card descriptions current with business
127
+ * - Manage aliases: Add, modify, or schedule alias transitions for seamless and
128
+ * code-free rate card migrations
129
+ * - Update documentation: Keep rate card descriptions current with business
135
130
  * context
136
- * - Self-serve provisioning setup: Configure aliases to enable code-free rate card
137
- * transitions
131
+ * - Configure custom pricing units: Add credit type conversions to enable rates
132
+ * with different pricing units
138
133
  *
139
134
  * #### Active contract impact:
140
135
  *
@@ -470,6 +465,12 @@ export interface RateCardUpdateParams {
470
465
  */
471
466
  rate_card_id: string;
472
467
 
468
+ /**
469
+ * Add credit type conversions for using custom pricing units in rates. Existing
470
+ * conversions cannot be modified.
471
+ */
472
+ add_credit_type_conversions?: Array<RateCardUpdateParams.AddCreditTypeConversion>;
473
+
473
474
  /**
474
475
  * Reference this alias when creating a contract. If the same alias is assigned to
475
476
  * multiple rate cards, it will reference the rate card to which it was most
@@ -486,6 +487,12 @@ export interface RateCardUpdateParams {
486
487
  }
487
488
 
488
489
  export namespace RateCardUpdateParams {
490
+ export interface AddCreditTypeConversion {
491
+ custom_credit_type_id: string;
492
+
493
+ fiat_per_custom_credit: number;
494
+ }
495
+
489
496
  export interface Alias {
490
497
  name: string;
491
498
 
@@ -31,16 +31,13 @@ export class Dashboards extends APIResource {
31
31
  *
32
32
  * - Dashboard types: Choose from `invoices`, `usage`, or `commits_and_credits`
33
33
  * - Customization options:
34
- * - `dashboard_options`: Configure dashboard behavior. For the invoices
35
- * dashboard, supported keys include: `show_zero_usage_line_items`
36
- * ("true"/"false"), `hide_voided_invoices` ("true"/"false"), `contract_id`
37
- * (UUID, filters invoices by contract), `invoice_type` ("USAGE" or
38
- * "SCHEDULED", filters by invoice type), `invoice_status_filter` ("VOID",
39
- * "FINALIZED", "DRAFT", "FINALIZED_AND_DRAFT", or "ALL"), and
40
- * `billable_status_filter` ("BILLABLE", "UNBILLABLE", or "ALL")
34
+ * - `dashboard_options`: Configure dashboard behavior. Supported for the
35
+ * invoices dashboard only. Available keys include:
36
+ * `show_zero_usage_line_items` ("true"/"false"), `contract_id` (UUID, filters
37
+ * invoices by contract), `invoice_type` ("USAGE" or "SCHEDULED", filters by
38
+ * invoice type), and `invoice_status_filter` ("VOID", "FINALIZED", "DRAFT",
39
+ * "FINALIZED_AND_DRAFT", or "ALL")
41
40
  * - `color_overrides`: Match your brand's color palette
42
- * - `bm_group_key_overrides`: Customize how dimensions are displayed (for the
43
- * usage embeddable dashboard)
44
41
  * - Iframe implementation: Embed the returned URL directly in an iframe element
45
42
  * - Responsive design: Dashboards automatically adapt to container dimensions
46
43
  *
@@ -50,22 +47,12 @@ export class Dashboards extends APIResource {
50
47
  * await client.v1.dashboards.getEmbeddableURL({
51
48
  * customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
52
49
  * dashboard: 'invoices',
53
- * bm_group_key_overrides: [
54
- * {
55
- * group_key_name: 'tenant_id',
56
- * display_name: 'Org ID',
57
- * value_display_names: {
58
- * '48ecb18f358f': 'Cluster EU',
59
- * e358f3ce242d: 'Cluster APAC',
60
- * },
61
- * },
62
- * ],
63
50
  * color_overrides: [
64
51
  * { name: 'Gray_dark', value: '#ff0000' },
65
52
  * ],
66
53
  * dashboard_options: [
67
54
  * { key: 'show_zero_usage_line_items', value: 'false' },
68
- * { key: 'hide_voided_invoices', value: 'true' },
55
+ * { key: 'invoice_status_filter', value: 'FINALIZED' },
69
56
  * ],
70
57
  * });
71
58
  * ```
@@ -170,10 +157,22 @@ export namespace DashboardGetEmbeddableURLParams {
170
157
  /**
171
158
  * The option key name
172
159
  */
173
- key: string;
160
+ key:
161
+ | 'show_zero_usage_line_items'
162
+ | 'contract_id'
163
+ | 'invoice_type'
164
+ | 'invoice_status_filter'
165
+ | 'hide_voided_invoices'
166
+ | 'billable_status_filter'
167
+ | 'hide_grant_name'
168
+ | 'credit_ledger_credit_type_id';
174
169
 
175
170
  /**
176
- * The option value
171
+ * The option value. For show_zero_usage_line_items: "true" or "false" (default
172
+ * "false"). For contract_id: a UUID filtering invoices to a specific contract. For
173
+ * invoice_type: "USAGE" or "SCHEDULED". For invoice_status_filter: "VOID",
174
+ * "FINALIZED", "DRAFT", "FINALIZED_AND_DRAFT", or "ALL". For hide_voided_invoices
175
+ * (deprecated): "true" or "false".
177
176
  */
178
177
  value: string;
179
178
  }
@@ -678,7 +678,8 @@ export namespace PackageRetrieveResponse {
678
678
  * The commits will be created on the usage invoice frequency. If provided: - The
679
679
  * period defined in the duration will correspond to this frequency. - Commits will
680
680
  * be created aligned with the recurring commit's starting_at rather than the usage
681
- * invoice dates.
681
+ * invoice dates. - Daily recurring commits have a limit of one per contract, and
682
+ * are unable to be created with seat-based subscriptions
682
683
  */
683
684
  recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
684
685
 
@@ -880,7 +881,8 @@ export namespace PackageRetrieveResponse {
880
881
  * The commits will be created on the usage invoice frequency. If provided: - The
881
882
  * period defined in the duration will correspond to this frequency. - Commits will
882
883
  * be created aligned with the recurring commit's starting_at rather than the usage
883
- * invoice dates.
884
+ * invoice dates. - Daily recurring commits have a limit of one per contract, and
885
+ * are unable to be created with seat-based subscriptions
884
886
  */
885
887
  recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
886
888
 
@@ -1620,7 +1622,8 @@ export namespace PackageListResponse {
1620
1622
  * The commits will be created on the usage invoice frequency. If provided: - The
1621
1623
  * period defined in the duration will correspond to this frequency. - Commits will
1622
1624
  * be created aligned with the recurring commit's starting_at rather than the usage
1623
- * invoice dates.
1625
+ * invoice dates. - Daily recurring commits have a limit of one per contract, and
1626
+ * are unable to be created with seat-based subscriptions
1624
1627
  */
1625
1628
  recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1626
1629
 
@@ -1822,7 +1825,8 @@ export namespace PackageListResponse {
1822
1825
  * The commits will be created on the usage invoice frequency. If provided: - The
1823
1826
  * period defined in the duration will correspond to this frequency. - Commits will
1824
1827
  * be created aligned with the recurring commit's starting_at rather than the usage
1825
- * invoice dates.
1828
+ * invoice dates. - Daily recurring commits have a limit of one per contract, and
1829
+ * are unable to be created with seat-based subscriptions
1826
1830
  */
1827
1831
  recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1828
1832
 
@@ -2725,7 +2729,8 @@ export namespace PackageCreateParams {
2725
2729
  * The commits will be created on the usage invoice frequency. If provided: - The
2726
2730
  * period defined in the duration will correspond to this frequency. - Commits will
2727
2731
  * be created aligned with the recurring commit's starting_at rather than the usage
2728
- * invoice dates.
2732
+ * invoice dates. - Daily recurring commits have a limit of one per contract, and
2733
+ * are unable to be created with seat-based subscriptions
2729
2734
  */
2730
2735
  recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
2731
2736
 
@@ -2950,7 +2955,8 @@ export namespace PackageCreateParams {
2950
2955
  * The commits will be created on the usage invoice frequency. If provided: - The
2951
2956
  * period defined in the duration will correspond to this frequency. - Commits will
2952
2957
  * be created aligned with the recurring commit's starting_at rather than the usage
2953
- * invoice dates.
2958
+ * invoice dates. - Daily recurring commits have a limit of one per contract, and
2959
+ * are unable to be created with seat-based subscriptions
2954
2960
  */
2955
2961
  recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
2956
2962