@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.
Files changed (307) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/api-promise.d.mts +1 -0
  3. package/api-promise.d.mts.map +1 -1
  4. package/api-promise.d.ts +1 -0
  5. package/api-promise.d.ts.map +1 -1
  6. package/api-promise.mjs +1 -0
  7. package/api-promise.mjs.map +1 -1
  8. package/bin/cli +12 -5
  9. package/client.d.mts.map +1 -1
  10. package/client.d.ts.map +1 -1
  11. package/client.js +11 -0
  12. package/client.js.map +1 -1
  13. package/client.mjs +11 -0
  14. package/client.mjs.map +1 -1
  15. package/core/api-promise.d.mts.map +1 -1
  16. package/core/api-promise.d.ts.map +1 -1
  17. package/core/api-promise.mjs.map +1 -1
  18. package/core/error.mjs.map +1 -1
  19. package/core/pagination.d.mts.map +1 -1
  20. package/core/pagination.d.ts.map +1 -1
  21. package/core/pagination.mjs.map +1 -1
  22. package/core/resource.d.mts.map +1 -1
  23. package/core/resource.d.ts.map +1 -1
  24. package/core/uploads.d.mts.map +1 -1
  25. package/core/uploads.d.ts.map +1 -1
  26. package/core/uploads.mjs.map +1 -1
  27. package/error.d.mts +1 -0
  28. package/error.d.mts.map +1 -1
  29. package/error.d.ts +1 -0
  30. package/error.d.ts.map +1 -1
  31. package/error.mjs +1 -0
  32. package/error.mjs.map +1 -1
  33. package/index.d.mts.map +1 -1
  34. package/index.d.ts.map +1 -1
  35. package/index.mjs.map +1 -1
  36. package/internal/detect-platform.mjs.map +1 -1
  37. package/internal/headers.mjs.map +1 -1
  38. package/internal/parse.d.mts.map +1 -1
  39. package/internal/parse.d.ts.map +1 -1
  40. package/internal/parse.mjs.map +1 -1
  41. package/internal/qs/formats.d.mts.map +1 -1
  42. package/internal/qs/formats.d.ts.map +1 -1
  43. package/internal/qs/index.d.mts +2 -2
  44. package/internal/qs/index.d.mts.map +1 -1
  45. package/internal/qs/index.d.ts +2 -2
  46. package/internal/qs/index.d.ts.map +1 -1
  47. package/internal/qs/index.mjs.map +1 -1
  48. package/internal/qs/stringify.d.mts.map +1 -1
  49. package/internal/qs/stringify.d.ts.map +1 -1
  50. package/internal/qs/stringify.mjs.map +1 -1
  51. package/internal/qs/utils.d.mts.map +1 -1
  52. package/internal/qs/utils.d.ts.map +1 -1
  53. package/internal/qs/utils.mjs.map +1 -1
  54. package/internal/request-options.d.mts.map +1 -1
  55. package/internal/request-options.d.ts.map +1 -1
  56. package/internal/shims.d.mts +6 -0
  57. package/internal/shims.d.mts.map +1 -1
  58. package/internal/shims.d.ts +6 -0
  59. package/internal/shims.d.ts.map +1 -1
  60. package/internal/to-file.d.mts.map +1 -1
  61. package/internal/to-file.d.ts.map +1 -1
  62. package/internal/to-file.mjs.map +1 -1
  63. package/internal/types.d.mts +10 -10
  64. package/internal/types.d.mts.map +1 -1
  65. package/internal/types.d.ts +10 -10
  66. package/internal/types.d.ts.map +1 -1
  67. package/internal/uploads.d.mts.map +1 -1
  68. package/internal/uploads.d.ts.map +1 -1
  69. package/internal/uploads.mjs.map +1 -1
  70. package/internal/utils/base64.mjs.map +1 -1
  71. package/internal/utils/log.d.mts.map +1 -1
  72. package/internal/utils/log.d.ts.map +1 -1
  73. package/internal/utils/log.js +2 -0
  74. package/internal/utils/log.js.map +1 -1
  75. package/internal/utils/log.mjs +2 -0
  76. package/internal/utils/log.mjs.map +1 -1
  77. package/internal/utils/path.mjs.map +1 -1
  78. package/internal/utils/query.mjs.map +1 -1
  79. package/internal/utils/values.mjs.map +1 -1
  80. package/internal/utils.d.mts.map +1 -1
  81. package/internal/utils.d.ts.map +1 -1
  82. package/internal/utils.mjs.map +1 -1
  83. package/package.json +1 -1
  84. package/pagination.d.mts +1 -0
  85. package/pagination.d.mts.map +1 -1
  86. package/pagination.d.ts +1 -0
  87. package/pagination.d.ts.map +1 -1
  88. package/pagination.mjs +1 -0
  89. package/pagination.mjs.map +1 -1
  90. package/resource.d.mts +1 -0
  91. package/resource.d.mts.map +1 -1
  92. package/resource.d.ts +1 -0
  93. package/resource.d.ts.map +1 -1
  94. package/resource.mjs +1 -0
  95. package/resource.mjs.map +1 -1
  96. package/resources/index.d.mts.map +1 -1
  97. package/resources/index.d.ts.map +1 -1
  98. package/resources/index.mjs.map +1 -1
  99. package/resources/shared.d.mts +321 -1
  100. package/resources/shared.d.mts.map +1 -1
  101. package/resources/shared.d.ts +321 -1
  102. package/resources/shared.d.ts.map +1 -1
  103. package/resources/v1/alerts.d.mts +1 -1
  104. package/resources/v1/alerts.d.mts.map +1 -1
  105. package/resources/v1/alerts.d.ts +1 -1
  106. package/resources/v1/alerts.d.ts.map +1 -1
  107. package/resources/v1/alerts.mjs.map +1 -1
  108. package/resources/v1/audit-logs.d.mts.map +1 -1
  109. package/resources/v1/audit-logs.d.ts.map +1 -1
  110. package/resources/v1/audit-logs.mjs.map +1 -1
  111. package/resources/v1/billable-metrics.d.mts.map +1 -1
  112. package/resources/v1/billable-metrics.d.ts.map +1 -1
  113. package/resources/v1/billable-metrics.mjs.map +1 -1
  114. package/resources/v1/contracts/contracts.d.mts +629 -143
  115. package/resources/v1/contracts/contracts.d.mts.map +1 -1
  116. package/resources/v1/contracts/contracts.d.ts +629 -143
  117. package/resources/v1/contracts/contracts.d.ts.map +1 -1
  118. package/resources/v1/contracts/contracts.js +47 -2
  119. package/resources/v1/contracts/contracts.js.map +1 -1
  120. package/resources/v1/contracts/contracts.mjs +47 -2
  121. package/resources/v1/contracts/contracts.mjs.map +1 -1
  122. package/resources/v1/contracts/index.d.mts +1 -1
  123. package/resources/v1/contracts/index.d.mts.map +1 -1
  124. package/resources/v1/contracts/index.d.ts +1 -1
  125. package/resources/v1/contracts/index.d.ts.map +1 -1
  126. package/resources/v1/contracts/index.js.map +1 -1
  127. package/resources/v1/contracts/index.mjs.map +1 -1
  128. package/resources/v1/contracts/named-schedules.d.mts.map +1 -1
  129. package/resources/v1/contracts/named-schedules.d.ts.map +1 -1
  130. package/resources/v1/contracts/named-schedules.mjs.map +1 -1
  131. package/resources/v1/contracts/products.d.mts +18 -0
  132. package/resources/v1/contracts/products.d.mts.map +1 -1
  133. package/resources/v1/contracts/products.d.ts +18 -0
  134. package/resources/v1/contracts/products.d.ts.map +1 -1
  135. package/resources/v1/contracts/products.mjs.map +1 -1
  136. package/resources/v1/contracts/rate-cards/index.d.mts.map +1 -1
  137. package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -1
  138. package/resources/v1/contracts/rate-cards/index.mjs.map +1 -1
  139. package/resources/v1/contracts/rate-cards/named-schedules.d.mts.map +1 -1
  140. package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -1
  141. package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -1
  142. package/resources/v1/contracts/rate-cards/product-orders.d.mts.map +1 -1
  143. package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -1
  144. package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -1
  145. package/resources/v1/contracts/rate-cards/rate-cards.d.mts.map +1 -1
  146. package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -1
  147. package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -1
  148. package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -1
  149. package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
  150. package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
  151. package/resources/v1/contracts/rate-cards.d.mts.map +1 -1
  152. package/resources/v1/contracts/rate-cards.d.ts.map +1 -1
  153. package/resources/v1/contracts/rate-cards.mjs.map +1 -1
  154. package/resources/v1/contracts.d.mts.map +1 -1
  155. package/resources/v1/contracts.d.ts.map +1 -1
  156. package/resources/v1/contracts.mjs.map +1 -1
  157. package/resources/v1/credit-grants.d.mts.map +1 -1
  158. package/resources/v1/credit-grants.d.ts.map +1 -1
  159. package/resources/v1/credit-grants.mjs.map +1 -1
  160. package/resources/v1/custom-fields.d.mts.map +1 -1
  161. package/resources/v1/custom-fields.d.ts.map +1 -1
  162. package/resources/v1/custom-fields.mjs.map +1 -1
  163. package/resources/v1/customers/alerts.d.mts +1 -1
  164. package/resources/v1/customers/alerts.d.mts.map +1 -1
  165. package/resources/v1/customers/alerts.d.ts +1 -1
  166. package/resources/v1/customers/alerts.d.ts.map +1 -1
  167. package/resources/v1/customers/alerts.mjs.map +1 -1
  168. package/resources/v1/customers/billing-config.d.mts.map +1 -1
  169. package/resources/v1/customers/billing-config.d.ts.map +1 -1
  170. package/resources/v1/customers/billing-config.mjs.map +1 -1
  171. package/resources/v1/customers/commits.d.mts.map +1 -1
  172. package/resources/v1/customers/commits.d.ts.map +1 -1
  173. package/resources/v1/customers/commits.mjs.map +1 -1
  174. package/resources/v1/customers/credits.d.mts.map +1 -1
  175. package/resources/v1/customers/credits.d.ts.map +1 -1
  176. package/resources/v1/customers/credits.mjs.map +1 -1
  177. package/resources/v1/customers/customers.d.mts.map +1 -1
  178. package/resources/v1/customers/customers.d.ts.map +1 -1
  179. package/resources/v1/customers/customers.mjs.map +1 -1
  180. package/resources/v1/customers/index.d.mts.map +1 -1
  181. package/resources/v1/customers/index.d.ts.map +1 -1
  182. package/resources/v1/customers/index.mjs.map +1 -1
  183. package/resources/v1/customers/invoices.d.mts +9 -0
  184. package/resources/v1/customers/invoices.d.mts.map +1 -1
  185. package/resources/v1/customers/invoices.d.ts +9 -0
  186. package/resources/v1/customers/invoices.d.ts.map +1 -1
  187. package/resources/v1/customers/invoices.mjs.map +1 -1
  188. package/resources/v1/customers/named-schedules.d.mts.map +1 -1
  189. package/resources/v1/customers/named-schedules.d.ts.map +1 -1
  190. package/resources/v1/customers/named-schedules.mjs.map +1 -1
  191. package/resources/v1/customers/plans.d.mts.map +1 -1
  192. package/resources/v1/customers/plans.d.ts.map +1 -1
  193. package/resources/v1/customers/plans.mjs.map +1 -1
  194. package/resources/v1/customers.d.mts.map +1 -1
  195. package/resources/v1/customers.d.ts.map +1 -1
  196. package/resources/v1/customers.mjs.map +1 -1
  197. package/resources/v1/dashboards.d.mts.map +1 -1
  198. package/resources/v1/dashboards.d.ts.map +1 -1
  199. package/resources/v1/dashboards.mjs.map +1 -1
  200. package/resources/v1/index.d.mts +1 -2
  201. package/resources/v1/index.d.mts.map +1 -1
  202. package/resources/v1/index.d.ts +1 -2
  203. package/resources/v1/index.d.ts.map +1 -1
  204. package/resources/v1/index.js +1 -3
  205. package/resources/v1/index.js.map +1 -1
  206. package/resources/v1/index.mjs +0 -1
  207. package/resources/v1/index.mjs.map +1 -1
  208. package/resources/v1/invoices.d.mts.map +1 -1
  209. package/resources/v1/invoices.d.ts.map +1 -1
  210. package/resources/v1/invoices.mjs.map +1 -1
  211. package/resources/v1/packages.d.mts +57 -5
  212. package/resources/v1/packages.d.mts.map +1 -1
  213. package/resources/v1/packages.d.ts +57 -5
  214. package/resources/v1/packages.d.ts.map +1 -1
  215. package/resources/v1/packages.js +3 -4
  216. package/resources/v1/packages.js.map +1 -1
  217. package/resources/v1/packages.mjs +3 -4
  218. package/resources/v1/packages.mjs.map +1 -1
  219. package/resources/v1/plans.d.mts.map +1 -1
  220. package/resources/v1/plans.d.ts.map +1 -1
  221. package/resources/v1/plans.mjs.map +1 -1
  222. package/resources/v1/pricing-units.d.mts.map +1 -1
  223. package/resources/v1/pricing-units.d.ts.map +1 -1
  224. package/resources/v1/pricing-units.mjs.map +1 -1
  225. package/resources/v1/services.d.mts.map +1 -1
  226. package/resources/v1/services.d.ts.map +1 -1
  227. package/resources/v1/services.mjs.map +1 -1
  228. package/resources/v1/settings/billing-providers.d.mts.map +1 -1
  229. package/resources/v1/settings/billing-providers.d.ts.map +1 -1
  230. package/resources/v1/settings/billing-providers.mjs.map +1 -1
  231. package/resources/v1/settings/index.d.mts.map +1 -1
  232. package/resources/v1/settings/index.d.ts.map +1 -1
  233. package/resources/v1/settings/index.mjs.map +1 -1
  234. package/resources/v1/settings/settings.d.mts.map +1 -1
  235. package/resources/v1/settings/settings.d.ts.map +1 -1
  236. package/resources/v1/settings/settings.mjs.map +1 -1
  237. package/resources/v1/settings.d.mts.map +1 -1
  238. package/resources/v1/settings.d.ts.map +1 -1
  239. package/resources/v1/settings.mjs.map +1 -1
  240. package/resources/v1/usage.d.mts.map +1 -1
  241. package/resources/v1/usage.d.ts.map +1 -1
  242. package/resources/v1/usage.mjs.map +1 -1
  243. package/resources/v1/v1.d.mts +2 -6
  244. package/resources/v1/v1.d.mts.map +1 -1
  245. package/resources/v1/v1.d.ts +2 -6
  246. package/resources/v1/v1.d.ts.map +1 -1
  247. package/resources/v1/v1.js +0 -4
  248. package/resources/v1/v1.js.map +1 -1
  249. package/resources/v1/v1.mjs +0 -4
  250. package/resources/v1/v1.mjs.map +1 -1
  251. package/resources/v1.d.mts.map +1 -1
  252. package/resources/v1.d.ts.map +1 -1
  253. package/resources/v1.mjs.map +1 -1
  254. package/resources/v2/contracts.d.mts +1431 -2
  255. package/resources/v2/contracts.d.mts.map +1 -1
  256. package/resources/v2/contracts.d.ts +1431 -2
  257. package/resources/v2/contracts.d.ts.map +1 -1
  258. package/resources/v2/contracts.mjs.map +1 -1
  259. package/resources/v2/index.d.mts.map +1 -1
  260. package/resources/v2/index.d.ts.map +1 -1
  261. package/resources/v2/index.mjs.map +1 -1
  262. package/resources/v2/v2.d.mts.map +1 -1
  263. package/resources/v2/v2.d.ts.map +1 -1
  264. package/resources/v2/v2.mjs.map +1 -1
  265. package/resources/v2.d.mts.map +1 -1
  266. package/resources/v2.d.ts.map +1 -1
  267. package/resources/v2.mjs.map +1 -1
  268. package/resources/webhooks.d.mts.map +1 -1
  269. package/resources/webhooks.d.ts.map +1 -1
  270. package/resources/webhooks.mjs.map +1 -1
  271. package/resources.d.mts.map +1 -1
  272. package/resources.d.ts.map +1 -1
  273. package/resources.mjs.map +1 -1
  274. package/src/client.ts +12 -0
  275. package/src/internal/types.ts +6 -8
  276. package/src/internal/utils/log.ts +2 -0
  277. package/src/resources/shared.ts +417 -1
  278. package/src/resources/v1/alerts.ts +1 -1
  279. package/src/resources/v1/contracts/contracts.ts +813 -156
  280. package/src/resources/v1/contracts/index.ts +2 -0
  281. package/src/resources/v1/contracts/products.ts +20 -0
  282. package/src/resources/v1/customers/alerts.ts +1 -1
  283. package/src/resources/v1/customers/invoices.ts +12 -0
  284. package/src/resources/v1/index.ts +2 -11
  285. package/src/resources/v1/packages.ts +81 -6
  286. package/src/resources/v1/v1.ts +4 -26
  287. package/src/resources/v2/contracts.ts +1881 -2
  288. package/src/version.ts +1 -1
  289. package/uploads.d.mts +1 -0
  290. package/uploads.d.mts.map +1 -1
  291. package/uploads.d.ts +1 -0
  292. package/uploads.d.ts.map +1 -1
  293. package/uploads.mjs +1 -0
  294. package/uploads.mjs.map +1 -1
  295. package/version.d.mts +1 -1
  296. package/version.d.ts +1 -1
  297. package/version.js +1 -1
  298. package/version.mjs +1 -1
  299. package/resources/v1/payments.d.mts +0 -127
  300. package/resources/v1/payments.d.mts.map +0 -1
  301. package/resources/v1/payments.d.ts +0 -127
  302. package/resources/v1/payments.d.ts.map +0 -1
  303. package/resources/v1/payments.js +0 -71
  304. package/resources/v1/payments.js.map +0 -1
  305. package/resources/v1/payments.mjs +0 -67
  306. package/resources/v1/payments.mjs.map +0 -1
  307. 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 **`starting_at`**, **`covering_date`**,
149
- * and **`include_archived`** parameters to filter the list of returned contracts.
150
- * For example, to list only currently active contracts,
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
 
@@ -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,