@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.
Files changed (94) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts.map +1 -1
  4. package/client.js +9 -1
  5. package/client.js.map +1 -1
  6. package/client.mjs +9 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/shared.d.mts +194 -4
  10. package/resources/shared.d.mts.map +1 -1
  11. package/resources/shared.d.ts +194 -4
  12. package/resources/shared.d.ts.map +1 -1
  13. package/resources/v1/alerts.d.mts +39 -0
  14. package/resources/v1/alerts.d.mts.map +1 -1
  15. package/resources/v1/alerts.d.ts +39 -0
  16. package/resources/v1/alerts.d.ts.map +1 -1
  17. package/resources/v1/contracts/contracts.d.mts +270 -11
  18. package/resources/v1/contracts/contracts.d.mts.map +1 -1
  19. package/resources/v1/contracts/contracts.d.ts +270 -11
  20. package/resources/v1/contracts/contracts.d.ts.map +1 -1
  21. package/resources/v1/contracts/contracts.js +43 -0
  22. package/resources/v1/contracts/contracts.js.map +1 -1
  23. package/resources/v1/contracts/contracts.mjs +43 -0
  24. package/resources/v1/contracts/contracts.mjs.map +1 -1
  25. package/resources/v1/contracts/index.d.mts +1 -1
  26. package/resources/v1/contracts/index.d.mts.map +1 -1
  27. package/resources/v1/contracts/index.d.ts +1 -1
  28. package/resources/v1/contracts/index.d.ts.map +1 -1
  29. package/resources/v1/contracts/index.js.map +1 -1
  30. package/resources/v1/contracts/index.mjs.map +1 -1
  31. package/resources/v1/contracts/rate-cards/rates.d.mts +4 -0
  32. package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -1
  33. package/resources/v1/contracts/rate-cards/rates.d.ts +4 -0
  34. package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
  35. package/resources/v1/contracts/rate-cards/rates.js +4 -0
  36. package/resources/v1/contracts/rate-cards/rates.js.map +1 -1
  37. package/resources/v1/contracts/rate-cards/rates.mjs +4 -0
  38. package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
  39. package/resources/v1/customers/alerts.d.mts +79 -2
  40. package/resources/v1/customers/alerts.d.mts.map +1 -1
  41. package/resources/v1/customers/alerts.d.ts +79 -2
  42. package/resources/v1/customers/alerts.d.ts.map +1 -1
  43. package/resources/v1/customers/alerts.js +1 -1
  44. package/resources/v1/customers/alerts.mjs +1 -1
  45. package/resources/v1/customers/invoices.d.mts +5 -0
  46. package/resources/v1/customers/invoices.d.mts.map +1 -1
  47. package/resources/v1/customers/invoices.d.ts +5 -0
  48. package/resources/v1/customers/invoices.d.ts.map +1 -1
  49. package/resources/v1/dashboards.d.mts +8 -3
  50. package/resources/v1/dashboards.d.mts.map +1 -1
  51. package/resources/v1/dashboards.d.ts +8 -3
  52. package/resources/v1/dashboards.d.ts.map +1 -1
  53. package/resources/v1/dashboards.js +7 -2
  54. package/resources/v1/dashboards.js.map +1 -1
  55. package/resources/v1/dashboards.mjs +7 -2
  56. package/resources/v1/dashboards.mjs.map +1 -1
  57. package/resources/v1/index.d.mts +1 -1
  58. package/resources/v1/index.d.mts.map +1 -1
  59. package/resources/v1/index.d.ts +1 -1
  60. package/resources/v1/index.d.ts.map +1 -1
  61. package/resources/v1/index.js.map +1 -1
  62. package/resources/v1/index.mjs.map +1 -1
  63. package/resources/v1/packages.d.mts +240 -9
  64. package/resources/v1/packages.d.mts.map +1 -1
  65. package/resources/v1/packages.d.ts +240 -9
  66. package/resources/v1/packages.d.ts.map +1 -1
  67. package/resources/v1/v1.d.mts +2 -2
  68. package/resources/v1/v1.d.mts.map +1 -1
  69. package/resources/v1/v1.d.ts +2 -2
  70. package/resources/v1/v1.d.ts.map +1 -1
  71. package/resources/v1/v1.js.map +1 -1
  72. package/resources/v1/v1.mjs.map +1 -1
  73. package/resources/v2/contracts.d.mts +427 -6
  74. package/resources/v2/contracts.d.mts.map +1 -1
  75. package/resources/v2/contracts.d.ts +427 -6
  76. package/resources/v2/contracts.d.ts.map +1 -1
  77. package/src/client.ts +9 -1
  78. package/src/resources/shared.ts +234 -4
  79. package/src/resources/v1/alerts.ts +49 -0
  80. package/src/resources/v1/contracts/contracts.ts +322 -10
  81. package/src/resources/v1/contracts/index.ts +2 -0
  82. package/src/resources/v1/contracts/rate-cards/rates.ts +4 -0
  83. package/src/resources/v1/customers/alerts.ts +99 -2
  84. package/src/resources/v1/customers/invoices.ts +6 -0
  85. package/src/resources/v1/dashboards.ts +10 -3
  86. package/src/resources/v1/index.ts +2 -0
  87. package/src/resources/v1/packages.ts +291 -9
  88. package/src/resources/v1/v1.ts +4 -0
  89. package/src/resources/v2/contracts.ts +517 -6
  90. package/src/version.ts +1 -1
  91. package/version.d.mts +1 -1
  92. package/version.d.ts +1 -1
  93. package/version.js +1 -1
  94. package/version.mjs +1 -1
@@ -103,6 +103,12 @@ export interface Commit {
103
103
 
104
104
  contract?: Commit.Contract;
105
105
 
106
+ /**
107
+ * The actor who created this commit. Omitted for system-generated commits such as
108
+ * recurring commits, rollover commits, and threshold commits.
109
+ */
110
+ created_by?: string;
111
+
106
112
  /**
107
113
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
108
114
  */
@@ -875,6 +881,12 @@ export namespace ContractV2 {
875
881
 
876
882
  contract?: Commit.Contract;
877
883
 
884
+ /**
885
+ * The actor who created this commit. Omitted for system-generated commits such as
886
+ * recurring commits, rollover commits, and threshold commits.
887
+ */
888
+ created_by?: string;
889
+
878
890
  /**
879
891
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
880
892
  */
@@ -1193,6 +1205,8 @@ export namespace ContractV2 {
1193
1205
 
1194
1206
  export namespace Override {
1195
1207
  export interface OverrideSpecifier {
1208
+ any_commit_or_credit_ids?: Array<string>;
1209
+
1196
1210
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1197
1211
 
1198
1212
  commit_ids?: Array<string>;
@@ -1326,6 +1340,12 @@ export namespace ContractV2 {
1326
1340
  */
1327
1341
  created_at?: string;
1328
1342
 
1343
+ /**
1344
+ * The actor who created this credit. Omitted for system-generated credits such as
1345
+ * recurring credits.
1346
+ */
1347
+ created_by?: string;
1348
+
1329
1349
  /**
1330
1350
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1331
1351
  */
@@ -1691,6 +1711,11 @@ export namespace ContractV2 {
1691
1711
  */
1692
1712
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
1693
1713
 
1714
+ /**
1715
+ * Rounding configuration for prorated recurring commit amounts.
1716
+ */
1717
+ proration_rounding?: RecurringCommit.ProrationRounding | null;
1718
+
1694
1719
  /**
1695
1720
  * The frequency at which the recurring commits will be created. If not provided: -
1696
1721
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -1698,7 +1723,7 @@ export namespace ContractV2 {
1698
1723
  * be created aligned with the recurring commit's starting_at rather than the usage
1699
1724
  * invoice dates.
1700
1725
  */
1701
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1726
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1702
1727
 
1703
1728
  /**
1704
1729
  * Will be passed down to the individual commits. This controls how much of an
@@ -1761,6 +1786,39 @@ export namespace ContractV2 {
1761
1786
 
1762
1787
  unit_price: number;
1763
1788
  }
1789
+
1790
+ /**
1791
+ * Rounding configuration for prorated recurring commit amounts.
1792
+ */
1793
+ export interface ProrationRounding {
1794
+ access?: ProrationRounding.Access;
1795
+
1796
+ invoice?: ProrationRounding.Invoice;
1797
+ }
1798
+
1799
+ export namespace ProrationRounding {
1800
+ export interface Access {
1801
+ /**
1802
+ * Number of decimal places to round to. Applied directly to the stored monetary
1803
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1804
+ * nearest 100 in the stored unit).
1805
+ */
1806
+ decimal_places: number;
1807
+
1808
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1809
+ }
1810
+
1811
+ export interface Invoice {
1812
+ /**
1813
+ * Number of decimal places to round to. Applied directly to the stored monetary
1814
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1815
+ * nearest 100 in the stored unit).
1816
+ */
1817
+ decimal_places: number;
1818
+
1819
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1820
+ }
1821
+ }
1764
1822
  }
1765
1823
 
1766
1824
  export interface RecurringCredit {
@@ -1836,6 +1894,11 @@ export namespace ContractV2 {
1836
1894
  */
1837
1895
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
1838
1896
 
1897
+ /**
1898
+ * Rounding configuration for prorated recurring credit amounts.
1899
+ */
1900
+ proration_rounding?: RecurringCredit.ProrationRounding | null;
1901
+
1839
1902
  /**
1840
1903
  * The frequency at which the recurring commits will be created. If not provided: -
1841
1904
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -1843,7 +1906,7 @@ export namespace ContractV2 {
1843
1906
  * be created aligned with the recurring commit's starting_at rather than the usage
1844
1907
  * invoice dates.
1845
1908
  */
1846
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1909
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
1847
1910
 
1848
1911
  /**
1849
1912
  * Will be passed down to the individual commits. This controls how much of an
@@ -1895,6 +1958,26 @@ export namespace ContractV2 {
1895
1958
  export interface Contract {
1896
1959
  id: string;
1897
1960
  }
1961
+
1962
+ /**
1963
+ * Rounding configuration for prorated recurring credit amounts.
1964
+ */
1965
+ export interface ProrationRounding {
1966
+ access?: ProrationRounding.Access;
1967
+ }
1968
+
1969
+ export namespace ProrationRounding {
1970
+ export interface Access {
1971
+ /**
1972
+ * Number of decimal places to round to. Applied directly to the stored monetary
1973
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
1974
+ * nearest 100 in the stored unit).
1975
+ */
1976
+ decimal_places: number;
1977
+
1978
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
1979
+ }
1980
+ }
1898
1981
  }
1899
1982
 
1900
1983
  export interface ResellerRoyalty {
@@ -2001,6 +2084,8 @@ export namespace ContractV2 {
2001
2084
 
2002
2085
  id?: string;
2003
2086
 
2087
+ billing_cycle_config?: Subscription.BillingCycleConfig;
2088
+
2004
2089
  /**
2005
2090
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2006
2091
  */
@@ -2053,6 +2138,21 @@ export namespace ContractV2 {
2053
2138
  invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
2054
2139
 
2055
2140
  is_prorated: boolean;
2141
+
2142
+ rounding?: Proration.Rounding;
2143
+ }
2144
+
2145
+ export namespace Proration {
2146
+ export interface Rounding {
2147
+ /**
2148
+ * Number of decimal places to round to. Applied directly to the stored monetary
2149
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2150
+ * nearest 100 in the stored unit).
2151
+ */
2152
+ decimal_places: number;
2153
+
2154
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2155
+ }
2056
2156
  }
2057
2157
 
2058
2158
  export interface QuantitySchedule {
@@ -2077,6 +2177,19 @@ export namespace ContractV2 {
2077
2177
  }
2078
2178
  }
2079
2179
 
2180
+ export interface BillingCycleConfig {
2181
+ /**
2182
+ * The date this subscription's billing cycle is anchored to.
2183
+ */
2184
+ anchor_date: string;
2185
+
2186
+ /**
2187
+ * Controls whether this subscription consolidates onto usage invoices or gets its
2188
+ * own scheduled invoice.
2189
+ */
2190
+ invoice_placement: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
2191
+ }
2192
+
2080
2193
  export interface SeatConfig {
2081
2194
  /**
2082
2195
  * The property name, sent on usage events, that identifies the seat ID associated
@@ -2275,6 +2388,11 @@ export namespace ContractWithoutAmendments {
2275
2388
  */
2276
2389
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
2277
2390
 
2391
+ /**
2392
+ * Rounding configuration for prorated recurring commit amounts.
2393
+ */
2394
+ proration_rounding?: RecurringCommit.ProrationRounding | null;
2395
+
2278
2396
  /**
2279
2397
  * The frequency at which the recurring commits will be created. If not provided: -
2280
2398
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -2282,7 +2400,7 @@ export namespace ContractWithoutAmendments {
2282
2400
  * be created aligned with the recurring commit's starting_at rather than the usage
2283
2401
  * invoice dates.
2284
2402
  */
2285
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2403
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
2286
2404
 
2287
2405
  /**
2288
2406
  * Will be passed down to the individual commits. This controls how much of an
@@ -2345,6 +2463,41 @@ export namespace ContractWithoutAmendments {
2345
2463
 
2346
2464
  unit_price: number;
2347
2465
  }
2466
+
2467
+ /**
2468
+ * Rounding configuration for prorated recurring commit amounts.
2469
+ */
2470
+ export interface ProrationRounding {
2471
+ access?: ProrationRounding.Access;
2472
+
2473
+ invoice?: ProrationRounding.Invoice;
2474
+ }
2475
+
2476
+ export namespace ProrationRounding {
2477
+ export interface Access {
2478
+ /**
2479
+ * Number of decimal places to round to. Applied directly to the stored monetary
2480
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2481
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2482
+ * dollar).
2483
+ */
2484
+ decimal_places: number;
2485
+
2486
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2487
+ }
2488
+
2489
+ export interface Invoice {
2490
+ /**
2491
+ * Number of decimal places to round to. Applied directly to the stored monetary
2492
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2493
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2494
+ * dollar).
2495
+ */
2496
+ decimal_places: number;
2497
+
2498
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2499
+ }
2500
+ }
2348
2501
  }
2349
2502
 
2350
2503
  export interface RecurringCredit {
@@ -2420,6 +2573,11 @@ export namespace ContractWithoutAmendments {
2420
2573
  */
2421
2574
  proration?: 'NONE' | 'FIRST' | 'LAST' | 'FIRST_AND_LAST';
2422
2575
 
2576
+ /**
2577
+ * Rounding configuration for prorated recurring credit amounts.
2578
+ */
2579
+ proration_rounding?: RecurringCredit.ProrationRounding | null;
2580
+
2423
2581
  /**
2424
2582
  * The frequency at which the recurring commits will be created. If not provided: -
2425
2583
  * The commits will be created on the usage invoice frequency. If provided: - The
@@ -2427,7 +2585,7 @@ export namespace ContractWithoutAmendments {
2427
2585
  * be created aligned with the recurring commit's starting_at rather than the usage
2428
2586
  * invoice dates.
2429
2587
  */
2430
- recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
2588
+ recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY';
2431
2589
 
2432
2590
  /**
2433
2591
  * Will be passed down to the individual commits. This controls how much of an
@@ -2479,6 +2637,27 @@ export namespace ContractWithoutAmendments {
2479
2637
  export interface Contract {
2480
2638
  id: string;
2481
2639
  }
2640
+
2641
+ /**
2642
+ * Rounding configuration for prorated recurring credit amounts.
2643
+ */
2644
+ export interface ProrationRounding {
2645
+ access?: ProrationRounding.Access;
2646
+ }
2647
+
2648
+ export namespace ProrationRounding {
2649
+ export interface Access {
2650
+ /**
2651
+ * Number of decimal places to round to. Applied directly to the stored monetary
2652
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
2653
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
2654
+ * dollar).
2655
+ */
2656
+ decimal_places: number;
2657
+
2658
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
2659
+ }
2660
+ }
2482
2661
  }
2483
2662
 
2484
2663
  export interface ResellerRoyalty {
@@ -2593,6 +2772,12 @@ export interface Credit {
2593
2772
 
2594
2773
  contract?: Credit.Contract;
2595
2774
 
2775
+ /**
2776
+ * The actor who created this credit. Omitted for system-generated credits such as
2777
+ * recurring credits.
2778
+ */
2779
+ created_by?: string;
2780
+
2596
2781
  /**
2597
2782
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2598
2783
  */
@@ -3005,6 +3190,8 @@ export interface Override {
3005
3190
 
3006
3191
  export namespace Override {
3007
3192
  export interface OverrideSpecifier {
3193
+ any_commit_or_credit_ids?: Array<string>;
3194
+
3008
3195
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
3009
3196
 
3010
3197
  commit_ids?: Array<string>;
@@ -3222,6 +3409,10 @@ export interface PrepaidBalanceThresholdConfiguration {
3222
3409
 
3223
3410
  discount_configuration?: PrepaidBalanceThresholdConfiguration.DiscountConfiguration;
3224
3411
 
3412
+ /**
3413
+ * Determines which balances are excluded from remaining balance calculation for
3414
+ * threshold billing.
3415
+ */
3225
3416
  threshold_balance_specifiers?: Array<PrepaidBalanceThresholdConfiguration.ThresholdBalanceSpecifier>;
3226
3417
  }
3227
3418
 
@@ -3284,6 +3475,10 @@ export namespace PrepaidBalanceThresholdConfiguration {
3284
3475
  }
3285
3476
 
3286
3477
  export interface ThresholdBalanceSpecifier {
3478
+ /**
3479
+ * If any of the exclude specifier is met, the balance is not considered when
3480
+ * evaluating threshold billing
3481
+ */
3287
3482
  exclude: Array<ThresholdBalanceSpecifier.Exclude>;
3288
3483
  }
3289
3484
 
@@ -3339,6 +3534,10 @@ export interface PrepaidBalanceThresholdConfigurationV2 {
3339
3534
 
3340
3535
  discount_configuration?: PrepaidBalanceThresholdConfigurationV2.DiscountConfiguration;
3341
3536
 
3537
+ /**
3538
+ * Determines which balances are excluded from remaining balance calculation for
3539
+ * threshold billing.
3540
+ */
3342
3541
  threshold_balance_specifiers?: Array<PrepaidBalanceThresholdConfigurationV2.ThresholdBalanceSpecifier>;
3343
3542
  }
3344
3543
 
@@ -3772,6 +3971,8 @@ export interface Subscription {
3772
3971
 
3773
3972
  id?: string;
3774
3973
 
3974
+ billing_cycle_config?: Subscription.BillingCycleConfig;
3975
+
3775
3976
  /**
3776
3977
  * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
3777
3978
  */
@@ -3824,6 +4025,22 @@ export namespace Subscription {
3824
4025
  invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
3825
4026
 
3826
4027
  is_prorated: boolean;
4028
+
4029
+ rounding?: Proration.Rounding;
4030
+ }
4031
+
4032
+ export namespace Proration {
4033
+ export interface Rounding {
4034
+ /**
4035
+ * Number of decimal places to round to. Applied directly to the stored monetary
4036
+ * representation. Negative values round to powers of 10 (e.g., -2 rounds to
4037
+ * nearest 100 in the stored unit. For USD, this means rounding to the nearest
4038
+ * dollar).
4039
+ */
4040
+ decimal_places: number;
4041
+
4042
+ rounding_method: 'HALF_UP' | 'FLOOR' | 'CEILING';
4043
+ }
3827
4044
  }
3828
4045
 
3829
4046
  export interface QuantitySchedule {
@@ -3848,6 +4065,19 @@ export namespace Subscription {
3848
4065
  }
3849
4066
  }
3850
4067
 
4068
+ export interface BillingCycleConfig {
4069
+ /**
4070
+ * The date this subscription's billing cycle is anchored to.
4071
+ */
4072
+ anchor_date: string;
4073
+
4074
+ /**
4075
+ * Controls whether this subscription consolidates onto usage invoices or gets its
4076
+ * own scheduled invoice.
4077
+ */
4078
+ invoice_placement: 'ON_SCHEDULED_INVOICE' | 'ON_USAGE_INVOICE';
4079
+ }
4080
+
3851
4081
  export interface SeatConfig {
3852
4082
  /**
3853
4083
  * The property name, sent on usage events, that identifies the seat ID associated
@@ -155,6 +155,13 @@ export interface AlertCreateParams {
155
155
  */
156
156
  threshold: number;
157
157
 
158
+ /**
159
+ * Can be used with only `low_remaining_contract_credit_and_commit_balance_reached`
160
+ * notifications. Defines the balances that are considered when evaluating the
161
+ * alert.
162
+ */
163
+ alert_specifiers?: Array<AlertCreateParams.AlertSpecifier>;
164
+
158
165
  /**
159
166
  * For threshold notifications of type `usage_threshold_reached`, specifies which
160
167
  * billable metric to track the usage for.
@@ -228,6 +235,48 @@ export interface AlertCreateParams {
228
235
  }
229
236
 
230
237
  export namespace AlertCreateParams {
238
+ export interface AlertSpecifier {
239
+ /**
240
+ * A list of custom field filters for notification types that support advanced
241
+ * filtering
242
+ */
243
+ custom_field_filters?: Array<AlertSpecifier.CustomFieldFilter>;
244
+
245
+ /**
246
+ * If provided, the specifier will not apply to balances that matches the inclusion
247
+ * criteria and any of the excluding values.
248
+ */
249
+ exclude?: Array<AlertSpecifier.Exclude>;
250
+ }
251
+
252
+ export namespace AlertSpecifier {
253
+ export interface CustomFieldFilter {
254
+ entity: 'Contract' | 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit';
255
+
256
+ key: string;
257
+
258
+ value?: string;
259
+ }
260
+
261
+ export interface Exclude {
262
+ /**
263
+ * A list of custom field filters for notification types that support advanced
264
+ * filtering
265
+ */
266
+ custom_field_filters?: Array<Exclude.CustomFieldFilter>;
267
+ }
268
+
269
+ export namespace Exclude {
270
+ export interface CustomFieldFilter {
271
+ entity: 'Contract' | 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit';
272
+
273
+ key: string;
274
+
275
+ value: string;
276
+ }
277
+ }
278
+ }
279
+
231
280
  export interface CustomFieldFilter {
232
281
  entity: 'Contract' | 'Commit' | 'ContractCredit' | 'ContractCreditOrCommit';
233
282