@metronome/sdk 0.2.0 → 1.0.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 (808) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/README.md +123 -51
  3. package/api-promise.d.mts +2 -0
  4. package/api-promise.d.mts.map +1 -0
  5. package/api-promise.d.ts +2 -0
  6. package/api-promise.d.ts.map +1 -0
  7. package/api-promise.js +6 -0
  8. package/api-promise.js.map +1 -0
  9. package/api-promise.mjs +2 -0
  10. package/api-promise.mjs.map +1 -0
  11. package/bin/cli +53 -0
  12. package/bin/migration-config.json +6 -0
  13. package/client.d.mts +232 -0
  14. package/client.d.mts.map +1 -0
  15. package/client.d.ts +232 -0
  16. package/client.d.ts.map +1 -0
  17. package/client.js +464 -0
  18. package/client.js.map +1 -0
  19. package/client.mjs +460 -0
  20. package/client.mjs.map +1 -0
  21. package/core/api-promise.d.mts +46 -0
  22. package/core/api-promise.d.mts.map +1 -0
  23. package/core/api-promise.d.ts +46 -0
  24. package/core/api-promise.d.ts.map +1 -0
  25. package/core/api-promise.js +74 -0
  26. package/core/api-promise.js.map +1 -0
  27. package/core/api-promise.mjs +70 -0
  28. package/core/api-promise.mjs.map +1 -0
  29. package/core/error.d.mts +46 -0
  30. package/core/error.d.mts.map +1 -0
  31. package/core/error.d.ts +46 -0
  32. package/core/error.d.ts.map +1 -0
  33. package/core/error.js +113 -0
  34. package/core/error.js.map +1 -0
  35. package/core/error.mjs +97 -0
  36. package/core/error.mjs.map +1 -0
  37. package/core/pagination.d.mts +137 -0
  38. package/core/pagination.d.mts.map +1 -0
  39. package/core/pagination.d.ts +137 -0
  40. package/core/pagination.d.ts.map +1 -0
  41. package/core/pagination.js +158 -0
  42. package/core/pagination.js.map +1 -0
  43. package/core/pagination.mjs +150 -0
  44. package/core/pagination.mjs.map +1 -0
  45. package/core/resource.d.mts +6 -0
  46. package/core/resource.d.mts.map +1 -0
  47. package/core/resource.d.ts +6 -0
  48. package/core/resource.d.ts.map +1 -0
  49. package/core/resource.js +11 -0
  50. package/core/resource.js.map +1 -0
  51. package/core/resource.mjs +7 -0
  52. package/core/resource.mjs.map +1 -0
  53. package/core/uploads.d.mts +3 -0
  54. package/core/uploads.d.mts.map +1 -0
  55. package/core/uploads.d.ts +3 -0
  56. package/core/uploads.d.ts.map +1 -0
  57. package/core/uploads.js +6 -0
  58. package/core/uploads.js.map +1 -0
  59. package/core/uploads.mjs +2 -0
  60. package/core/uploads.mjs.map +1 -0
  61. package/error.d.mts +2 -0
  62. package/error.d.mts.map +1 -0
  63. package/error.d.ts +1 -46
  64. package/error.d.ts.map +1 -1
  65. package/error.js +3 -110
  66. package/error.js.map +1 -1
  67. package/error.mjs +1 -96
  68. package/error.mjs.map +1 -1
  69. package/index.d.mts +7 -144
  70. package/index.d.mts.map +1 -0
  71. package/index.d.ts +6 -143
  72. package/index.d.ts.map +1 -1
  73. package/index.js +14 -120
  74. package/index.js.map +1 -1
  75. package/index.mjs +6 -93
  76. package/index.mjs.map +1 -1
  77. package/internal/builtin-types.d.mts +73 -0
  78. package/internal/builtin-types.d.mts.map +1 -0
  79. package/internal/builtin-types.d.ts +73 -0
  80. package/internal/builtin-types.d.ts.map +1 -0
  81. package/internal/builtin-types.js +4 -0
  82. package/internal/builtin-types.js.map +1 -0
  83. package/internal/builtin-types.mjs +3 -0
  84. package/internal/builtin-types.mjs.map +1 -0
  85. package/internal/detect-platform.d.mts +15 -0
  86. package/internal/detect-platform.d.mts.map +1 -0
  87. package/internal/detect-platform.d.ts +15 -0
  88. package/internal/detect-platform.d.ts.map +1 -0
  89. package/internal/detect-platform.js +162 -0
  90. package/internal/detect-platform.js.map +1 -0
  91. package/internal/detect-platform.mjs +157 -0
  92. package/internal/detect-platform.mjs.map +1 -0
  93. package/internal/errors.d.mts +3 -0
  94. package/internal/errors.d.mts.map +1 -0
  95. package/internal/errors.d.ts +3 -0
  96. package/internal/errors.d.ts.map +1 -0
  97. package/internal/errors.js +41 -0
  98. package/internal/errors.js.map +1 -0
  99. package/internal/errors.mjs +36 -0
  100. package/internal/errors.mjs.map +1 -0
  101. package/internal/headers.d.mts +26 -0
  102. package/internal/headers.d.mts.map +1 -0
  103. package/internal/headers.d.ts +26 -0
  104. package/internal/headers.d.ts.map +1 -0
  105. package/internal/headers.js +120 -0
  106. package/internal/headers.js.map +1 -0
  107. package/internal/headers.mjs +112 -0
  108. package/internal/headers.mjs.map +1 -0
  109. package/internal/parse.d.mts +12 -0
  110. package/internal/parse.d.mts.map +1 -0
  111. package/internal/parse.d.ts +12 -0
  112. package/internal/parse.d.ts.map +1 -0
  113. package/internal/parse.js +35 -0
  114. package/internal/parse.js.map +1 -0
  115. package/internal/parse.mjs +32 -0
  116. package/internal/parse.mjs.map +1 -0
  117. package/internal/qs/formats.d.mts +7 -0
  118. package/internal/qs/formats.d.mts.map +1 -0
  119. package/internal/qs/formats.d.ts +1 -0
  120. package/internal/qs/formats.d.ts.map +1 -1
  121. package/internal/qs/formats.js +4 -2
  122. package/internal/qs/formats.js.map +1 -1
  123. package/internal/qs/formats.mjs +2 -1
  124. package/internal/qs/formats.mjs.map +1 -1
  125. package/internal/qs/index.d.mts +10 -0
  126. package/internal/qs/index.d.mts.map +1 -0
  127. package/internal/qs/index.d.ts.map +1 -1
  128. package/internal/qs/stringify.d.mts +3 -0
  129. package/internal/qs/stringify.d.mts.map +1 -0
  130. package/internal/qs/stringify.d.ts.map +1 -1
  131. package/internal/qs/stringify.js +16 -19
  132. package/internal/qs/stringify.js.map +1 -1
  133. package/internal/qs/stringify.mjs +17 -19
  134. package/internal/qs/stringify.mjs.map +1 -1
  135. package/internal/qs/types.d.mts +57 -0
  136. package/internal/qs/types.d.mts.map +1 -0
  137. package/internal/qs/utils.d.mts +15 -0
  138. package/internal/qs/utils.d.mts.map +1 -0
  139. package/internal/qs/utils.d.ts +1 -0
  140. package/internal/qs/utils.d.ts.map +1 -1
  141. package/internal/qs/utils.js +22 -21
  142. package/internal/qs/utils.js.map +1 -1
  143. package/internal/qs/utils.mjs +12 -12
  144. package/internal/qs/utils.mjs.map +1 -1
  145. package/internal/request-options.d.mts +75 -0
  146. package/internal/request-options.d.mts.map +1 -0
  147. package/internal/request-options.d.ts +75 -0
  148. package/internal/request-options.d.ts.map +1 -0
  149. package/internal/request-options.js +14 -0
  150. package/internal/request-options.js.map +1 -0
  151. package/internal/request-options.mjs +10 -0
  152. package/internal/request-options.mjs.map +1 -0
  153. package/internal/shim-types.d.mts +17 -0
  154. package/internal/shim-types.d.mts.map +1 -0
  155. package/internal/shim-types.d.ts +17 -0
  156. package/internal/shim-types.d.ts.map +1 -0
  157. package/internal/shim-types.js +4 -0
  158. package/internal/shim-types.js.map +1 -0
  159. package/internal/shim-types.mjs +3 -0
  160. package/internal/shim-types.mjs.map +1 -0
  161. package/internal/shims.d.mts +20 -0
  162. package/internal/shims.d.mts.map +1 -0
  163. package/internal/shims.d.ts +20 -0
  164. package/internal/shims.d.ts.map +1 -0
  165. package/internal/shims.js +92 -0
  166. package/internal/shims.js.map +1 -0
  167. package/internal/shims.mjs +85 -0
  168. package/internal/shims.mjs.map +1 -0
  169. package/internal/to-file.d.mts +45 -0
  170. package/internal/to-file.d.mts.map +1 -0
  171. package/internal/to-file.d.ts +45 -0
  172. package/internal/to-file.d.ts.map +1 -0
  173. package/internal/to-file.js +91 -0
  174. package/internal/to-file.js.map +1 -0
  175. package/internal/to-file.mjs +88 -0
  176. package/internal/to-file.mjs.map +1 -0
  177. package/internal/tslib.js +81 -0
  178. package/internal/tslib.mjs +17 -0
  179. package/internal/types.d.mts +69 -0
  180. package/internal/types.d.mts.map +1 -0
  181. package/internal/types.d.ts +69 -0
  182. package/internal/types.d.ts.map +1 -0
  183. package/internal/types.js +4 -0
  184. package/internal/types.js.map +1 -0
  185. package/internal/types.mjs +3 -0
  186. package/internal/types.mjs.map +1 -0
  187. package/internal/uploads.d.mts +42 -0
  188. package/internal/uploads.d.mts.map +1 -0
  189. package/internal/uploads.d.ts +42 -0
  190. package/internal/uploads.d.ts.map +1 -0
  191. package/internal/uploads.js +141 -0
  192. package/internal/uploads.js.map +1 -0
  193. package/internal/uploads.mjs +131 -0
  194. package/internal/uploads.mjs.map +1 -0
  195. package/internal/utils/base64.d.mts +3 -0
  196. package/internal/utils/base64.d.mts.map +1 -0
  197. package/internal/utils/base64.d.ts +3 -0
  198. package/internal/utils/base64.d.ts.map +1 -0
  199. package/internal/utils/base64.js +38 -0
  200. package/internal/utils/base64.js.map +1 -0
  201. package/internal/utils/base64.mjs +33 -0
  202. package/internal/utils/base64.mjs.map +1 -0
  203. package/internal/utils/bytes.d.mts +4 -0
  204. package/internal/utils/bytes.d.mts.map +1 -0
  205. package/internal/utils/bytes.d.ts +4 -0
  206. package/internal/utils/bytes.d.ts.map +1 -0
  207. package/internal/utils/bytes.js +31 -0
  208. package/internal/utils/bytes.js.map +1 -0
  209. package/internal/utils/bytes.mjs +26 -0
  210. package/internal/utils/bytes.mjs.map +1 -0
  211. package/internal/utils/env.d.mts +9 -0
  212. package/internal/utils/env.d.mts.map +1 -0
  213. package/internal/utils/env.d.ts +9 -0
  214. package/internal/utils/env.d.ts.map +1 -0
  215. package/internal/utils/env.js +22 -0
  216. package/internal/utils/env.js.map +1 -0
  217. package/internal/utils/env.mjs +18 -0
  218. package/internal/utils/env.mjs.map +1 -0
  219. package/internal/utils/log.d.mts +37 -0
  220. package/internal/utils/log.d.mts.map +1 -0
  221. package/internal/utils/log.d.ts +37 -0
  222. package/internal/utils/log.d.ts.map +1 -0
  223. package/internal/utils/log.js +85 -0
  224. package/internal/utils/log.js.map +1 -0
  225. package/internal/utils/log.mjs +79 -0
  226. package/internal/utils/log.mjs.map +1 -0
  227. package/internal/utils/path.d.mts +15 -0
  228. package/internal/utils/path.d.mts.map +1 -0
  229. package/internal/utils/path.d.ts +15 -0
  230. package/internal/utils/path.d.ts.map +1 -0
  231. package/internal/utils/path.js +79 -0
  232. package/internal/utils/path.js.map +1 -0
  233. package/internal/utils/path.mjs +74 -0
  234. package/internal/utils/path.mjs.map +1 -0
  235. package/internal/utils/sleep.d.mts +2 -0
  236. package/internal/utils/sleep.d.mts.map +1 -0
  237. package/internal/utils/sleep.d.ts +2 -0
  238. package/internal/utils/sleep.d.ts.map +1 -0
  239. package/internal/utils/sleep.js +7 -0
  240. package/internal/utils/sleep.js.map +1 -0
  241. package/internal/utils/sleep.mjs +3 -0
  242. package/internal/utils/sleep.mjs.map +1 -0
  243. package/internal/utils/uuid.d.mts +5 -0
  244. package/internal/utils/uuid.d.mts.map +1 -0
  245. package/internal/utils/uuid.d.ts +5 -0
  246. package/internal/utils/uuid.d.ts.map +1 -0
  247. package/internal/utils/uuid.js +19 -0
  248. package/internal/utils/uuid.js.map +1 -0
  249. package/internal/utils/uuid.mjs +15 -0
  250. package/internal/utils/uuid.mjs.map +1 -0
  251. package/internal/utils/values.d.mts +18 -0
  252. package/internal/utils/values.d.mts.map +1 -0
  253. package/internal/utils/values.d.ts +18 -0
  254. package/internal/utils/values.d.ts.map +1 -0
  255. package/internal/utils/values.js +112 -0
  256. package/internal/utils/values.js.map +1 -0
  257. package/internal/utils/values.mjs +94 -0
  258. package/internal/utils/values.mjs.map +1 -0
  259. package/internal/utils.d.mts +7 -0
  260. package/internal/utils.d.mts.map +1 -0
  261. package/internal/utils.d.ts +7 -0
  262. package/internal/utils.d.ts.map +1 -0
  263. package/internal/utils.js +11 -0
  264. package/internal/utils.js.map +1 -0
  265. package/internal/utils.mjs +8 -0
  266. package/internal/utils.mjs.map +1 -0
  267. package/package.json +116 -64
  268. package/pagination.d.mts +2 -0
  269. package/pagination.d.mts.map +1 -0
  270. package/pagination.d.ts +1 -36
  271. package/pagination.d.ts.map +1 -1
  272. package/pagination.js +3 -40
  273. package/pagination.js.map +1 -1
  274. package/pagination.mjs +1 -38
  275. package/pagination.mjs.map +1 -1
  276. package/resource.d.mts +2 -0
  277. package/resource.d.mts.map +1 -0
  278. package/resource.d.ts +1 -5
  279. package/resource.d.ts.map +1 -1
  280. package/resource.js +3 -8
  281. package/resource.js.map +1 -1
  282. package/resource.mjs +1 -6
  283. package/resource.mjs.map +1 -1
  284. package/resources/index.d.mts +5 -0
  285. package/resources/index.d.mts.map +1 -0
  286. package/resources/index.d.ts.map +1 -1
  287. package/resources/index.js +2 -15
  288. package/resources/index.js.map +1 -1
  289. package/resources/shared.d.mts +2239 -0
  290. package/resources/shared.d.mts.map +1 -0
  291. package/resources/shared.d.ts +1409 -523
  292. package/resources/shared.d.ts.map +1 -1
  293. package/resources/v1/alerts.d.mts +203 -0
  294. package/resources/v1/alerts.d.mts.map +1 -0
  295. package/resources/v1/alerts.d.ts +78 -7
  296. package/resources/v1/alerts.d.ts.map +1 -1
  297. package/resources/v1/alerts.js +73 -3
  298. package/resources/v1/alerts.js.map +1 -1
  299. package/resources/v1/alerts.mjs +73 -3
  300. package/resources/v1/alerts.mjs.map +1 -1
  301. package/resources/v1/audit-logs.d.mts +108 -0
  302. package/resources/v1/audit-logs.d.mts.map +1 -0
  303. package/resources/v1/audit-logs.d.ts +45 -12
  304. package/resources/v1/audit-logs.d.ts.map +1 -1
  305. package/resources/v1/audit-logs.js +53 -12
  306. package/resources/v1/audit-logs.js.map +1 -1
  307. package/resources/v1/audit-logs.mjs +52 -10
  308. package/resources/v1/audit-logs.mjs.map +1 -1
  309. package/resources/v1/billable-metrics.d.mts +293 -0
  310. package/resources/v1/billable-metrics.d.mts.map +1 -0
  311. package/resources/v1/billable-metrics.d.ts +70 -15
  312. package/resources/v1/billable-metrics.d.ts.map +1 -1
  313. package/resources/v1/billable-metrics.js +70 -16
  314. package/resources/v1/billable-metrics.js.map +1 -1
  315. package/resources/v1/billable-metrics.mjs +69 -14
  316. package/resources/v1/billable-metrics.mjs.map +1 -1
  317. package/resources/v1/contracts/contracts.d.mts +2984 -0
  318. package/resources/v1/contracts/contracts.d.mts.map +1 -0
  319. package/resources/v1/contracts/contracts.d.ts +450 -1285
  320. package/resources/v1/contracts/contracts.d.ts.map +1 -1
  321. package/resources/v1/contracts/contracts.js +268 -50
  322. package/resources/v1/contracts/contracts.js.map +1 -1
  323. package/resources/v1/contracts/contracts.mjs +266 -26
  324. package/resources/v1/contracts/contracts.mjs.map +1 -1
  325. package/resources/v1/contracts/index.d.mts +5 -0
  326. package/resources/v1/contracts/index.d.mts.map +1 -0
  327. package/resources/v1/contracts/index.d.ts +3 -3
  328. package/resources/v1/contracts/index.d.ts.map +1 -1
  329. package/resources/v1/contracts/index.js +1 -3
  330. package/resources/v1/contracts/index.js.map +1 -1
  331. package/resources/v1/contracts/index.mjs +2 -2
  332. package/resources/v1/contracts/index.mjs.map +1 -1
  333. package/resources/v1/contracts/named-schedules.d.mts +82 -0
  334. package/resources/v1/contracts/named-schedules.d.mts.map +1 -0
  335. package/resources/v1/contracts/named-schedules.d.ts +5 -4
  336. package/resources/v1/contracts/named-schedules.d.ts.map +1 -1
  337. package/resources/v1/contracts/named-schedules.js +3 -2
  338. package/resources/v1/contracts/named-schedules.js.map +1 -1
  339. package/resources/v1/contracts/named-schedules.mjs +3 -2
  340. package/resources/v1/contracts/named-schedules.mjs.map +1 -1
  341. package/resources/v1/contracts/products.d.mts +502 -0
  342. package/resources/v1/contracts/products.d.mts.map +1 -0
  343. package/resources/v1/contracts/products.d.ts +47 -17
  344. package/resources/v1/contracts/products.d.ts.map +1 -1
  345. package/resources/v1/contracts/products.js +41 -17
  346. package/resources/v1/contracts/products.js.map +1 -1
  347. package/resources/v1/contracts/products.mjs +40 -15
  348. package/resources/v1/contracts/products.mjs.map +1 -1
  349. package/resources/v1/contracts/rate-cards/index.d.mts +5 -0
  350. package/resources/v1/contracts/rate-cards/index.d.mts.map +1 -0
  351. package/resources/v1/contracts/rate-cards/index.d.ts +2 -2
  352. package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -1
  353. package/resources/v1/contracts/rate-cards/index.js +1 -3
  354. package/resources/v1/contracts/rate-cards/index.js.map +1 -1
  355. package/resources/v1/contracts/rate-cards/index.mjs +2 -2
  356. package/resources/v1/contracts/rate-cards/index.mjs.map +1 -1
  357. package/resources/v1/contracts/rate-cards/named-schedules.d.mts +94 -0
  358. package/resources/v1/contracts/rate-cards/named-schedules.d.mts.map +1 -0
  359. package/resources/v1/contracts/rate-cards/named-schedules.d.ts +5 -4
  360. package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -1
  361. package/resources/v1/contracts/rate-cards/named-schedules.js +3 -2
  362. package/resources/v1/contracts/rate-cards/named-schedules.js.map +1 -1
  363. package/resources/v1/contracts/rate-cards/named-schedules.mjs +3 -2
  364. package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -1
  365. package/resources/v1/contracts/rate-cards/product-orders.d.mts +85 -0
  366. package/resources/v1/contracts/rate-cards/product-orders.d.mts.map +1 -0
  367. package/resources/v1/contracts/rate-cards/product-orders.d.ts +12 -6
  368. package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -1
  369. package/resources/v1/contracts/rate-cards/product-orders.js +8 -3
  370. package/resources/v1/contracts/rate-cards/product-orders.js.map +1 -1
  371. package/resources/v1/contracts/rate-cards/product-orders.mjs +8 -3
  372. package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -1
  373. package/resources/v1/contracts/rate-cards/rate-cards.d.mts +452 -0
  374. package/resources/v1/contracts/rate-cards/rate-cards.d.mts.map +1 -0
  375. package/resources/v1/contracts/rate-cards/rate-cards.d.ts +134 -41
  376. package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -1
  377. package/resources/v1/contracts/rate-cards/rate-cards.js +127 -47
  378. package/resources/v1/contracts/rate-cards/rate-cards.js.map +1 -1
  379. package/resources/v1/contracts/rate-cards/rate-cards.mjs +123 -20
  380. package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -1
  381. package/resources/v1/contracts/rate-cards/rates.d.mts +382 -0
  382. package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -0
  383. package/resources/v1/contracts/rate-cards/rates.d.ts +25 -82
  384. package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
  385. package/resources/v1/contracts/rate-cards/rates.js +13 -9
  386. package/resources/v1/contracts/rate-cards/rates.js.map +1 -1
  387. package/resources/v1/contracts/rate-cards/rates.mjs +12 -7
  388. package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
  389. package/resources/v1/contracts/rate-cards.d.mts +2 -0
  390. package/resources/v1/contracts/rate-cards.d.mts.map +1 -0
  391. package/resources/v1/contracts/rate-cards.d.ts.map +1 -1
  392. package/resources/v1/contracts/rate-cards.js +2 -15
  393. package/resources/v1/contracts/rate-cards.js.map +1 -1
  394. package/resources/v1/contracts.d.mts +2 -0
  395. package/resources/v1/contracts.d.mts.map +1 -0
  396. package/resources/v1/contracts.d.ts.map +1 -1
  397. package/resources/v1/contracts.js +2 -15
  398. package/resources/v1/contracts.js.map +1 -1
  399. package/resources/v1/credit-grants.d.mts +505 -0
  400. package/resources/v1/credit-grants.d.mts.map +1 -0
  401. package/resources/v1/credit-grants.d.ts +73 -74
  402. package/resources/v1/credit-grants.d.ts.map +1 -1
  403. package/resources/v1/credit-grants.js +52 -18
  404. package/resources/v1/credit-grants.js.map +1 -1
  405. package/resources/v1/credit-grants.mjs +51 -16
  406. package/resources/v1/credit-grants.mjs.map +1 -1
  407. package/resources/v1/custom-fields.d.mts +151 -0
  408. package/resources/v1/custom-fields.d.mts.map +1 -0
  409. package/resources/v1/custom-fields.d.ts +69 -38
  410. package/resources/v1/custom-fields.d.ts.map +1 -1
  411. package/resources/v1/custom-fields.js +66 -22
  412. package/resources/v1/custom-fields.js.map +1 -1
  413. package/resources/v1/custom-fields.mjs +66 -22
  414. package/resources/v1/custom-fields.mjs.map +1 -1
  415. package/resources/v1/customers/alerts.d.mts +288 -0
  416. package/resources/v1/customers/alerts.d.mts.map +1 -0
  417. package/resources/v1/customers/alerts.d.ts +128 -23
  418. package/resources/v1/customers/alerts.d.ts.map +1 -1
  419. package/resources/v1/customers/alerts.js +112 -10
  420. package/resources/v1/customers/alerts.js.map +1 -1
  421. package/resources/v1/customers/alerts.mjs +112 -10
  422. package/resources/v1/customers/alerts.mjs.map +1 -1
  423. package/resources/v1/customers/billing-config.d.mts +125 -0
  424. package/resources/v1/customers/billing-config.d.mts.map +1 -0
  425. package/resources/v1/customers/billing-config.d.ts +8 -7
  426. package/resources/v1/customers/billing-config.d.ts.map +1 -1
  427. package/resources/v1/customers/billing-config.js +8 -6
  428. package/resources/v1/customers/billing-config.js.map +1 -1
  429. package/resources/v1/customers/billing-config.mjs +8 -6
  430. package/resources/v1/customers/billing-config.mjs.map +1 -1
  431. package/resources/v1/customers/commits.d.mts +456 -0
  432. package/resources/v1/customers/commits.d.mts.map +1 -0
  433. package/resources/v1/customers/commits.d.ts +145 -47
  434. package/resources/v1/customers/commits.d.ts.map +1 -1
  435. package/resources/v1/customers/commits.js +132 -12
  436. package/resources/v1/customers/commits.js.map +1 -1
  437. package/resources/v1/customers/commits.mjs +132 -12
  438. package/resources/v1/customers/commits.mjs.map +1 -1
  439. package/resources/v1/customers/credits.d.mts +310 -0
  440. package/resources/v1/customers/credits.d.mts.map +1 -0
  441. package/resources/v1/customers/credits.d.ts +124 -46
  442. package/resources/v1/customers/credits.d.ts.map +1 -1
  443. package/resources/v1/customers/credits.js +116 -11
  444. package/resources/v1/customers/credits.js.map +1 -1
  445. package/resources/v1/customers/credits.mjs +116 -11
  446. package/resources/v1/customers/credits.mjs.map +1 -1
  447. package/resources/v1/customers/customers.d.mts +818 -0
  448. package/resources/v1/customers/customers.d.mts.map +1 -0
  449. package/resources/v1/customers/customers.d.ts +304 -41
  450. package/resources/v1/customers/customers.d.ts.map +1 -1
  451. package/resources/v1/customers/customers.js +214 -73
  452. package/resources/v1/customers/customers.js.map +1 -1
  453. package/resources/v1/customers/customers.mjs +207 -41
  454. package/resources/v1/customers/customers.mjs.map +1 -1
  455. package/resources/v1/customers/index.d.mts +9 -0
  456. package/resources/v1/customers/index.d.mts.map +1 -0
  457. package/resources/v1/customers/index.d.ts +6 -6
  458. package/resources/v1/customers/index.d.ts.map +1 -1
  459. package/resources/v1/customers/index.js +1 -8
  460. package/resources/v1/customers/index.js.map +1 -1
  461. package/resources/v1/customers/index.mjs +3 -3
  462. package/resources/v1/customers/index.mjs.map +1 -1
  463. package/resources/v1/customers/invoices.d.mts +710 -0
  464. package/resources/v1/customers/invoices.d.mts.map +1 -0
  465. package/resources/v1/customers/invoices.d.ts +196 -19
  466. package/resources/v1/customers/invoices.d.ts.map +1 -1
  467. package/resources/v1/customers/invoices.js +131 -22
  468. package/resources/v1/customers/invoices.js.map +1 -1
  469. package/resources/v1/customers/invoices.mjs +130 -19
  470. package/resources/v1/customers/invoices.mjs.map +1 -1
  471. package/resources/v1/customers/named-schedules.d.mts +82 -0
  472. package/resources/v1/customers/named-schedules.d.mts.map +1 -0
  473. package/resources/v1/customers/named-schedules.d.ts +5 -4
  474. package/resources/v1/customers/named-schedules.d.ts.map +1 -1
  475. package/resources/v1/customers/named-schedules.js +3 -2
  476. package/resources/v1/customers/named-schedules.js.map +1 -1
  477. package/resources/v1/customers/named-schedules.mjs +3 -2
  478. package/resources/v1/customers/named-schedules.mjs.map +1 -1
  479. package/resources/v1/customers/plans.d.mts +281 -0
  480. package/resources/v1/customers/plans.d.mts.map +1 -0
  481. package/resources/v1/customers/plans.d.ts +14 -12
  482. package/resources/v1/customers/plans.d.ts.map +1 -1
  483. package/resources/v1/customers/plans.js +8 -15
  484. package/resources/v1/customers/plans.js.map +1 -1
  485. package/resources/v1/customers/plans.mjs +7 -12
  486. package/resources/v1/customers/plans.mjs.map +1 -1
  487. package/resources/v1/customers.d.mts +2 -0
  488. package/resources/v1/customers.d.mts.map +1 -0
  489. package/resources/v1/customers.d.ts.map +1 -1
  490. package/resources/v1/customers.js +2 -15
  491. package/resources/v1/customers.js.map +1 -1
  492. package/resources/v1/dashboards.d.mts +133 -0
  493. package/resources/v1/dashboards.d.mts.map +1 -0
  494. package/resources/v1/dashboards.d.ts +33 -6
  495. package/resources/v1/dashboards.d.ts.map +1 -1
  496. package/resources/v1/dashboards.js +30 -4
  497. package/resources/v1/dashboards.js.map +1 -1
  498. package/resources/v1/dashboards.mjs +30 -4
  499. package/resources/v1/dashboards.mjs.map +1 -1
  500. package/resources/v1/index.d.mts +15 -0
  501. package/resources/v1/index.d.mts.map +1 -0
  502. package/resources/v1/index.d.ts +9 -9
  503. package/resources/v1/index.d.ts.map +1 -1
  504. package/resources/v1/index.js +1 -12
  505. package/resources/v1/index.js.map +1 -1
  506. package/resources/v1/index.mjs +7 -7
  507. package/resources/v1/index.mjs.map +1 -1
  508. package/resources/v1/invoices.d.mts +83 -0
  509. package/resources/v1/invoices.d.mts.map +1 -0
  510. package/resources/v1/invoices.d.ts +28 -6
  511. package/resources/v1/invoices.d.ts.map +1 -1
  512. package/resources/v1/invoices.js +24 -3
  513. package/resources/v1/invoices.js.map +1 -1
  514. package/resources/v1/invoices.mjs +24 -3
  515. package/resources/v1/invoices.mjs.map +1 -1
  516. package/resources/v1/plans.d.mts +240 -0
  517. package/resources/v1/plans.d.mts.map +1 -0
  518. package/resources/v1/plans.d.ts +24 -15
  519. package/resources/v1/plans.d.ts.map +1 -1
  520. package/resources/v1/plans.js +19 -26
  521. package/resources/v1/plans.js.map +1 -1
  522. package/resources/v1/plans.mjs +18 -22
  523. package/resources/v1/plans.mjs.map +1 -1
  524. package/resources/v1/pricing-units.d.mts +34 -0
  525. package/resources/v1/pricing-units.d.mts.map +1 -0
  526. package/resources/v1/pricing-units.d.ts +12 -9
  527. package/resources/v1/pricing-units.d.ts.map +1 -1
  528. package/resources/v1/pricing-units.js +20 -12
  529. package/resources/v1/pricing-units.js.map +1 -1
  530. package/resources/v1/pricing-units.mjs +19 -10
  531. package/resources/v1/pricing-units.mjs.map +1 -1
  532. package/resources/v1/services.d.mts +33 -0
  533. package/resources/v1/services.d.mts.map +1 -0
  534. package/resources/v1/services.d.ts +10 -7
  535. package/resources/v1/services.d.ts.map +1 -1
  536. package/resources/v1/services.js +7 -5
  537. package/resources/v1/services.js.map +1 -1
  538. package/resources/v1/services.mjs +7 -5
  539. package/resources/v1/services.mjs.map +1 -1
  540. package/resources/v1/usage.d.mts +488 -0
  541. package/resources/v1/usage.d.mts.map +1 -0
  542. package/resources/v1/usage.d.ts +220 -57
  543. package/resources/v1/usage.d.ts.map +1 -1
  544. package/resources/v1/usage.js +212 -26
  545. package/resources/v1/usage.js.map +1 -1
  546. package/resources/v1/usage.mjs +211 -24
  547. package/resources/v1/usage.mjs.map +1 -1
  548. package/resources/v1/v1.d.mts +58 -0
  549. package/resources/v1/v1.d.mts.map +1 -0
  550. package/resources/v1/v1.d.ts +15 -15
  551. package/resources/v1/v1.d.ts.map +1 -1
  552. package/resources/v1/v1.js +15 -48
  553. package/resources/v1/v1.js.map +1 -1
  554. package/resources/v1/v1.mjs +8 -19
  555. package/resources/v1/v1.mjs.map +1 -1
  556. package/resources/v1.d.mts +2 -0
  557. package/resources/v1.d.mts.map +1 -0
  558. package/resources/v1.d.ts.map +1 -1
  559. package/resources/v1.js +2 -15
  560. package/resources/v1.js.map +1 -1
  561. package/resources/v2/contracts.d.mts +2794 -0
  562. package/resources/v2/contracts.d.mts.map +1 -0
  563. package/resources/v2/contracts.d.ts +381 -3862
  564. package/resources/v2/contracts.d.ts.map +1 -1
  565. package/resources/v2/contracts.js +102 -12
  566. package/resources/v2/contracts.js.map +1 -1
  567. package/resources/v2/contracts.mjs +102 -12
  568. package/resources/v2/contracts.mjs.map +1 -1
  569. package/resources/v2/index.d.mts +3 -0
  570. package/resources/v2/index.d.mts.map +1 -0
  571. package/resources/v2/index.d.ts.map +1 -1
  572. package/resources/v2/v2.d.mts +10 -0
  573. package/resources/v2/v2.d.mts.map +1 -0
  574. package/resources/v2/v2.d.ts +1 -1
  575. package/resources/v2/v2.d.ts.map +1 -1
  576. package/resources/v2/v2.js +3 -25
  577. package/resources/v2/v2.js.map +1 -1
  578. package/resources/v2/v2.mjs +1 -1
  579. package/resources/v2.d.mts +2 -0
  580. package/resources/v2.d.mts.map +1 -0
  581. package/resources/v2.d.ts.map +1 -1
  582. package/resources/v2.js +2 -15
  583. package/resources/v2.js.map +1 -1
  584. package/resources/webhooks.d.mts +22 -0
  585. package/resources/webhooks.d.mts.map +1 -0
  586. package/resources/webhooks.d.ts +1 -1
  587. package/resources/webhooks.d.ts.map +1 -1
  588. package/resources/webhooks.js +3 -3
  589. package/resources/webhooks.js.map +1 -1
  590. package/resources/webhooks.mjs +1 -1
  591. package/resources/webhooks.mjs.map +1 -1
  592. package/resources.d.mts +2 -0
  593. package/resources.d.mts.map +1 -0
  594. package/resources.d.ts.map +1 -1
  595. package/resources.js +2 -15
  596. package/resources.js.map +1 -1
  597. package/src/api-promise.ts +2 -0
  598. package/src/client.ts +809 -0
  599. package/src/core/README.md +3 -0
  600. package/src/core/api-promise.ts +92 -0
  601. package/src/core/error.ts +130 -0
  602. package/src/core/pagination.ts +319 -0
  603. package/src/core/resource.ts +11 -0
  604. package/src/core/uploads.ts +2 -0
  605. package/src/error.ts +2 -130
  606. package/src/index.ts +6 -220
  607. package/src/internal/README.md +3 -0
  608. package/src/internal/builtin-types.ts +93 -0
  609. package/src/internal/detect-platform.ts +196 -0
  610. package/src/internal/errors.ts +33 -0
  611. package/src/internal/headers.ts +144 -0
  612. package/src/internal/parse.ts +50 -0
  613. package/src/internal/qs/formats.ts +3 -2
  614. package/src/internal/qs/index.ts +3 -3
  615. package/src/internal/qs/stringify.ts +18 -21
  616. package/src/internal/qs/utils.ts +16 -16
  617. package/src/internal/request-options.ts +91 -0
  618. package/src/internal/shim-types.ts +26 -0
  619. package/src/internal/shims.ts +107 -0
  620. package/src/internal/to-file.ts +154 -0
  621. package/src/internal/types.ts +95 -0
  622. package/src/internal/uploads.ts +187 -0
  623. package/src/internal/utils/base64.ts +40 -0
  624. package/src/internal/utils/bytes.ts +32 -0
  625. package/src/internal/utils/env.ts +18 -0
  626. package/src/internal/utils/log.ts +126 -0
  627. package/src/internal/utils/path.ts +88 -0
  628. package/src/internal/utils/sleep.ts +3 -0
  629. package/src/internal/utils/uuid.ts +17 -0
  630. package/src/internal/utils/values.ts +105 -0
  631. package/src/internal/utils.ts +8 -0
  632. package/src/pagination.ts +2 -82
  633. package/src/resource.ts +2 -11
  634. package/src/resources/index.ts +4 -4
  635. package/src/resources/shared.ts +1786 -520
  636. package/src/resources/v1/alerts.ts +79 -8
  637. package/src/resources/v1/audit-logs.ts +48 -26
  638. package/src/resources/v1/billable-metrics.ts +79 -34
  639. package/src/resources/v1/contracts/contracts.ts +518 -1622
  640. package/src/resources/v1/contracts/index.ts +7 -6
  641. package/src/resources/v1/contracts/named-schedules.ts +8 -6
  642. package/src/resources/v1/contracts/products.ts +52 -38
  643. package/src/resources/v1/contracts/rate-cards/index.ts +6 -6
  644. package/src/resources/v1/contracts/rate-cards/named-schedules.ts +8 -6
  645. package/src/resources/v1/contracts/rate-cards/product-orders.ts +13 -10
  646. package/src/resources/v1/contracts/rate-cards/rate-cards.ts +145 -72
  647. package/src/resources/v1/contracts/rate-cards/rates.ts +28 -98
  648. package/src/resources/v1/contracts/rate-cards.ts +1 -1
  649. package/src/resources/v1/contracts.ts +1 -1
  650. package/src/resources/v1/credit-grants.ts +100 -112
  651. package/src/resources/v1/custom-fields.ts +106 -74
  652. package/src/resources/v1/customers/alerts.ts +147 -28
  653. package/src/resources/v1/customers/billing-config.ts +27 -13
  654. package/src/resources/v1/customers/commits.ts +153 -54
  655. package/src/resources/v1/customers/credits.ts +131 -53
  656. package/src/resources/v1/customers/customers.ts +390 -101
  657. package/src/resources/v1/customers/index.ts +19 -18
  658. package/src/resources/v1/customers/invoices.ts +206 -37
  659. package/src/resources/v1/customers/named-schedules.ts +8 -6
  660. package/src/resources/v1/customers/plans.ts +24 -22
  661. package/src/resources/v1/customers.ts +1 -1
  662. package/src/resources/v1/dashboards.ts +34 -7
  663. package/src/resources/v1/index.ts +32 -25
  664. package/src/resources/v1/invoices.ts +28 -9
  665. package/src/resources/v1/plans.ts +42 -43
  666. package/src/resources/v1/pricing-units.ts +15 -23
  667. package/src/resources/v1/services.ts +10 -7
  668. package/src/resources/v1/usage.ts +244 -72
  669. package/src/resources/v1/v1.ts +52 -49
  670. package/src/resources/v1.ts +1 -1
  671. package/src/resources/v2/contracts.ts +431 -4967
  672. package/src/resources/v2/index.ts +2 -2
  673. package/src/resources/v2/v2.ts +3 -3
  674. package/src/resources/v2.ts +1 -1
  675. package/src/resources/webhooks.ts +2 -2
  676. package/src/resources.ts +1 -1
  677. package/src/tsconfig.json +2 -2
  678. package/src/uploads.ts +2 -255
  679. package/src/version.ts +1 -1
  680. package/uploads.d.mts +2 -0
  681. package/uploads.d.mts.map +1 -0
  682. package/uploads.d.ts +1 -74
  683. package/uploads.d.ts.map +1 -1
  684. package/uploads.js +3 -168
  685. package/uploads.js.map +1 -1
  686. package/uploads.mjs +1 -157
  687. package/uploads.mjs.map +1 -1
  688. package/version.d.mts +2 -0
  689. package/version.d.mts.map +1 -0
  690. package/version.d.ts +1 -1
  691. package/version.js +1 -1
  692. package/version.mjs +1 -1
  693. package/_shims/MultipartBody.d.ts +0 -9
  694. package/_shims/MultipartBody.d.ts.map +0 -1
  695. package/_shims/MultipartBody.js +0 -16
  696. package/_shims/MultipartBody.js.map +0 -1
  697. package/_shims/MultipartBody.mjs +0 -12
  698. package/_shims/MultipartBody.mjs.map +0 -1
  699. package/_shims/README.md +0 -46
  700. package/_shims/auto/runtime-bun.d.ts +0 -5
  701. package/_shims/auto/runtime-bun.d.ts.map +0 -1
  702. package/_shims/auto/runtime-bun.js +0 -21
  703. package/_shims/auto/runtime-bun.js.map +0 -1
  704. package/_shims/auto/runtime-bun.mjs +0 -2
  705. package/_shims/auto/runtime-bun.mjs.map +0 -1
  706. package/_shims/auto/runtime-node.d.ts +0 -5
  707. package/_shims/auto/runtime-node.d.ts.map +0 -1
  708. package/_shims/auto/runtime-node.js +0 -21
  709. package/_shims/auto/runtime-node.js.map +0 -1
  710. package/_shims/auto/runtime-node.mjs +0 -2
  711. package/_shims/auto/runtime-node.mjs.map +0 -1
  712. package/_shims/auto/runtime.d.ts +0 -5
  713. package/_shims/auto/runtime.d.ts.map +0 -1
  714. package/_shims/auto/runtime.js +0 -21
  715. package/_shims/auto/runtime.js.map +0 -1
  716. package/_shims/auto/runtime.mjs +0 -2
  717. package/_shims/auto/runtime.mjs.map +0 -1
  718. package/_shims/auto/types-node.d.ts +0 -5
  719. package/_shims/auto/types-node.d.ts.map +0 -1
  720. package/_shims/auto/types-node.js +0 -21
  721. package/_shims/auto/types-node.js.map +0 -1
  722. package/_shims/auto/types-node.mjs +0 -2
  723. package/_shims/auto/types-node.mjs.map +0 -1
  724. package/_shims/auto/types.d.ts +0 -101
  725. package/_shims/auto/types.js +0 -3
  726. package/_shims/auto/types.mjs +0 -3
  727. package/_shims/bun-runtime.d.ts +0 -6
  728. package/_shims/bun-runtime.d.ts.map +0 -1
  729. package/_shims/bun-runtime.js +0 -14
  730. package/_shims/bun-runtime.js.map +0 -1
  731. package/_shims/bun-runtime.mjs +0 -10
  732. package/_shims/bun-runtime.mjs.map +0 -1
  733. package/_shims/index.d.ts +0 -83
  734. package/_shims/index.js +0 -17
  735. package/_shims/index.mjs +0 -11
  736. package/_shims/manual-types.d.ts +0 -12
  737. package/_shims/manual-types.js +0 -3
  738. package/_shims/manual-types.mjs +0 -3
  739. package/_shims/node-runtime.d.ts +0 -3
  740. package/_shims/node-runtime.d.ts.map +0 -1
  741. package/_shims/node-runtime.js +0 -89
  742. package/_shims/node-runtime.js.map +0 -1
  743. package/_shims/node-runtime.mjs +0 -56
  744. package/_shims/node-runtime.mjs.map +0 -1
  745. package/_shims/node-types.d.ts +0 -42
  746. package/_shims/node-types.js +0 -3
  747. package/_shims/node-types.mjs +0 -3
  748. package/_shims/registry.d.ts +0 -37
  749. package/_shims/registry.d.ts.map +0 -1
  750. package/_shims/registry.js +0 -41
  751. package/_shims/registry.js.map +0 -1
  752. package/_shims/registry.mjs +0 -37
  753. package/_shims/registry.mjs.map +0 -1
  754. package/_shims/web-runtime.d.ts +0 -5
  755. package/_shims/web-runtime.d.ts.map +0 -1
  756. package/_shims/web-runtime.js +0 -78
  757. package/_shims/web-runtime.js.map +0 -1
  758. package/_shims/web-runtime.mjs +0 -71
  759. package/_shims/web-runtime.mjs.map +0 -1
  760. package/_shims/web-types.d.ts +0 -83
  761. package/_shims/web-types.js +0 -3
  762. package/_shims/web-types.mjs +0 -3
  763. package/core.d.ts +0 -255
  764. package/core.d.ts.map +0 -1
  765. package/core.js +0 -924
  766. package/core.js.map +0 -1
  767. package/core.mjs +0 -892
  768. package/core.mjs.map +0 -1
  769. package/shims/node.d.ts +0 -30
  770. package/shims/node.d.ts.map +0 -1
  771. package/shims/node.js +0 -31
  772. package/shims/node.js.map +0 -1
  773. package/shims/node.mjs +0 -5
  774. package/shims/node.mjs.map +0 -1
  775. package/shims/web.d.ts +0 -26
  776. package/shims/web.d.ts.map +0 -1
  777. package/shims/web.js +0 -31
  778. package/shims/web.js.map +0 -1
  779. package/shims/web.mjs +0 -5
  780. package/shims/web.mjs.map +0 -1
  781. package/src/_shims/MultipartBody.ts +0 -9
  782. package/src/_shims/README.md +0 -46
  783. package/src/_shims/auto/runtime-bun.ts +0 -4
  784. package/src/_shims/auto/runtime-node.ts +0 -4
  785. package/src/_shims/auto/runtime.ts +0 -4
  786. package/src/_shims/auto/types-node.ts +0 -4
  787. package/src/_shims/auto/types.d.ts +0 -101
  788. package/src/_shims/auto/types.js +0 -3
  789. package/src/_shims/auto/types.mjs +0 -3
  790. package/src/_shims/bun-runtime.ts +0 -14
  791. package/src/_shims/index.d.ts +0 -83
  792. package/src/_shims/index.js +0 -17
  793. package/src/_shims/index.mjs +0 -11
  794. package/src/_shims/manual-types.d.ts +0 -12
  795. package/src/_shims/manual-types.js +0 -3
  796. package/src/_shims/manual-types.mjs +0 -3
  797. package/src/_shims/node-runtime.ts +0 -81
  798. package/src/_shims/node-types.d.ts +0 -42
  799. package/src/_shims/node-types.js +0 -3
  800. package/src/_shims/node-types.mjs +0 -3
  801. package/src/_shims/registry.ts +0 -67
  802. package/src/_shims/web-runtime.ts +0 -103
  803. package/src/_shims/web-types.d.ts +0 -83
  804. package/src/_shims/web-types.js +0 -3
  805. package/src/_shims/web-types.mjs +0 -3
  806. package/src/core.ts +0 -1236
  807. package/src/shims/node.ts +0 -50
  808. package/src/shims/web.ts +0 -50
@@ -1,5 +1,4 @@
1
- import { APIResource } from "../../../resource.js";
2
- import * as Core from "../../../core.js";
1
+ import { APIResource } from "../../../core/resource.js";
3
2
  import * as Shared from "../../shared.js";
4
3
  import * as NamedSchedulesAPI from "./named-schedules.js";
5
4
  import { NamedScheduleRetrieveParams, NamedScheduleRetrieveResponse, NamedScheduleUpdateParams, NamedSchedules } from "./named-schedules.js";
@@ -8,12 +7,137 @@ import { ProductArchiveParams, ProductArchiveResponse, ProductCreateParams, Prod
8
7
  import * as InvoicesAPI from "../customers/invoices.js";
9
8
  import * as RateCardsAPI from "./rate-cards/rate-cards.js";
10
9
  import { RateCardArchiveParams, RateCardArchiveResponse, RateCardCreateParams, RateCardCreateResponse, RateCardListParams, RateCardListResponse, RateCardListResponsesCursorPage, RateCardRetrieveParams, RateCardRetrieveRateScheduleParams, RateCardRetrieveRateScheduleResponse, RateCardRetrieveResponse, RateCardUpdateParams, RateCardUpdateResponse, RateCards } from "./rate-cards/rate-cards.js";
10
+ import { APIPromise } from "../../../core/api-promise.js";
11
+ import { BodyCursorPage, type BodyCursorPageParams, PagePromise } from "../../../core/pagination.js";
12
+ import { RequestOptions } from "../../../internal/request-options.js";
11
13
  export declare class Contracts extends APIResource {
12
14
  products: ProductsAPI.Products;
13
15
  rateCards: RateCardsAPI.RateCards;
14
16
  namedSchedules: NamedSchedulesAPI.NamedSchedules;
15
17
  /**
16
- * Create a new contract
18
+ * Contracts define a customer's products, pricing, discounts, access duration, and
19
+ * billing configuration. Contracts serve as the central billing agreement for both
20
+ * PLG and Enterprise customers, you can automatically customers access to your
21
+ * products and services directly from your product or CRM.
22
+ *
23
+ * ### Use this endpoint to:
24
+ *
25
+ * - PLG onboarding: Automatically provision new self-serve customers with
26
+ * contracts when they sign up.
27
+ * - Enterprise sales: Push negotiated contracts from Salesforce with custom
28
+ * pricing and commitments
29
+ * - Promotional pricing: Implement time-limited discounts and free trials through
30
+ * overrides
31
+ *
32
+ * ### Key components:
33
+ *
34
+ * #### Contract Term and Billing Schedule
35
+ *
36
+ * - Set contract duration using `starting_at` and `ending_before` fields. PLG
37
+ * contracts typically use perpetual agreements (no end date), while Enterprise
38
+ * contracts have fixed end dates which can be edited over time in the case of
39
+ * co-term upsells.
40
+ *
41
+ * #### Rate Card
42
+ *
43
+ * If you are offering usage based pricing, you can set a rate card for the
44
+ * contract to reference through `rate_card_id` or `rate_card_alias`. The rate card
45
+ * is a store of all of your usage based products and their centralized pricing.
46
+ * Any new products or price changes on the rate card can be set to automatically
47
+ * propagate to all associated contracts - this ensures consistent pricing and
48
+ * product launches flow to contracts without manual updates and migrations. The
49
+ * `usage_statement_schedule` determines the cadence on which Metronome will
50
+ * finalize a usage invoice for the customer. This defaults to monthly on the 1st,
51
+ * with options for custom dates, quarterly, or annual cadences. Note: Most usage
52
+ * based billing companies align usage statements to be evaluated aligned to the
53
+ * first of the month. Read more about
54
+ * [Rate Cards](https://docs.metronome.com/pricing-packaging/create-manage-rate-cards/).
55
+ *
56
+ * #### Overrides and discounts
57
+ *
58
+ * Customize pricing on the contract through time-bounded overrides that can target
59
+ * specific products, product families, or complex usage scenarios. Overrides
60
+ * enable two key capabilities:
61
+ *
62
+ * - Discounts: Apply percentage discounts, fixed rate reductions, or
63
+ * quantity-based pricing tiers
64
+ * - Entitlements: Provide special pricing or access to specific products for
65
+ * negotiated deals
66
+ *
67
+ * Read more about
68
+ * [Contract Overrides](https://docs.metronome.com/manage-product-access/add-contract-override/).
69
+ *
70
+ * #### Commits and Credits
71
+ *
72
+ * Using commits, configure prepaid or postpaid spending commitments where
73
+ * customers promise to spend a certain amount over the contract period paid in
74
+ * advance or in arrears. Use credits to provide free spending allowances. Under
75
+ * the hood these are the same mechanisms, however, credits are typically offered
76
+ * for free (SLA or promotional) or as a part of an allotment associated with a
77
+ * Subscription.
78
+ *
79
+ * In Metronome, you can set commits and credits to only be applicable for a subset
80
+ * of usage. Use `applicable_product_ids` or `applicable_product_tags` to create
81
+ * product or product-family specific commits or credits, or you can build complex
82
+ * boolean logic specifiers to target usage based on pricing and presentation group
83
+ * values using `override_specifiers`.
84
+ *
85
+ * These objects can also also be configured to have a recurrence schedule to
86
+ * easily model customer packaging which includes recurring monthly or quarterly
87
+ * allotments.
88
+ *
89
+ * Commits support rollover settings (`rollover_fraction`) to transfer unused
90
+ * balances between contract periods, either entirely or as a percentage.
91
+ *
92
+ * Read more about
93
+ * [Credits and Commits](https://docs.metronome.com/pricing-packaging/apply-credits-commits/).
94
+ *
95
+ * #### Subscriptions
96
+ *
97
+ * You can add a fixed recurring charge to a contract, like monthly licenses or
98
+ * seat-based fees, using the subscription charge. Subscription charges are defined
99
+ * on your rate card and you can select which subscription is applicable to add to
100
+ * each contract. When you add a subscription to a contract you need to:
101
+ *
102
+ * - Define whether the subscription is paid for in-advance or in-arrears
103
+ * (`collection_schedule`)
104
+ * - Define the proration behavior (`proration`)
105
+ * - Specify an initial quantity (`initial_quantity`)
106
+ * - Define which subscription rate on the rate card should be used
107
+ * (`subscription_rate`)
108
+ *
109
+ * Read more about
110
+ * [Subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/).
111
+ *
112
+ * #### Scheduled Charges
113
+ *
114
+ * Set up one-time, recurring, or entirely custom charges that occur on specific
115
+ * dates, separate from usage-based billing or commitments. These can be used to
116
+ * model non-recurring platform charges or professional services.
117
+ *
118
+ * #### Threshold Billing
119
+ *
120
+ * Metronome allows you to configure automatic billing triggers when customers
121
+ * reach spending thresholds to prevent fraud and manage risk. You can use
122
+ * `spend_threshold_configuration` to trigger an invoice to cover current charges
123
+ * whenever the threshold is reached or you can ensure the customer maintains a
124
+ * minimum prepaid balance using the `prepaid_balance_configuration`.
125
+ *
126
+ * Read more about
127
+ * [Spend Threshold](https://docs.metronome.com/manage-product-access/spend-thresholds/)
128
+ * and
129
+ * [Prepaid Balance Thresholds](https://docs.metronome.com/manage-product-access/prepaid-balance-thresholds/).
130
+ *
131
+ * ### Usage guidelines:
132
+ *
133
+ * - You can always
134
+ * [Edit Contracts](https://docs.metronome.com/manage-product-access/edit-contract/)
135
+ * after it has been created, using the `editContract` endpoint. Metronome keeps
136
+ * track of all edits, both in the audit log and over the `getEditHistory`
137
+ * endpoint.
138
+ * - Customers in Metronome can have multiple concurrent contracts at one time. Use
139
+ * `usage_filters` to route the correct usage to each contract.
140
+ * [Read more about usage filters](https://docs.metronome.com/manage-product-access/provision-customer/#create-a-usage-filter).
17
141
  *
18
142
  * @example
19
143
  * ```ts
@@ -28,7 +152,7 @@ export declare class Contracts extends APIResource {
28
152
  * });
29
153
  * ```
30
154
  */
31
- create(body: ContractCreateParams, options?: Core.RequestOptions): Core.APIPromise<ContractCreateResponse>;
155
+ create(body: ContractCreateParams, options?: RequestOptions): APIPromise<ContractCreateResponse>;
32
156
  /**
33
157
  * This is the v1 endpoint to get a contract. New clients should implement using
34
158
  * the v2 endpoint.
@@ -41,10 +165,15 @@ export declare class Contracts extends APIResource {
41
165
  * });
42
166
  * ```
43
167
  */
44
- retrieve(body: ContractRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<ContractRetrieveResponse>;
168
+ retrieve(body: ContractRetrieveParams, options?: RequestOptions): APIPromise<ContractRetrieveResponse>;
45
169
  /**
46
- * This is the v1 endpoint to list all contracts for a customer. New clients should
47
- * implement using the v2 endpoint.
170
+ * Retrieves all contracts for a specific customer, including pricing, terms,
171
+ * credits, and commitments. Use this to view a customer's contract history and
172
+ * current agreements for billing management. Returns contract details with
173
+ * optional ledgers and balance information.
174
+ *
175
+ * ⚠️ Note: This is the legacy v1 endpoint - new integrations should use the v2
176
+ * endpoint for enhanced features.
48
177
  *
49
178
  * @example
50
179
  * ```ts
@@ -53,9 +182,26 @@ export declare class Contracts extends APIResource {
53
182
  * });
54
183
  * ```
55
184
  */
56
- list(body: ContractListParams, options?: Core.RequestOptions): Core.APIPromise<ContractListResponse>;
185
+ list(body: ContractListParams, options?: RequestOptions): APIPromise<ContractListResponse>;
57
186
  /**
58
- * Add a manual balance entry
187
+ * Manually adjust the available balance on a commit or credit. This entry is
188
+ * appended to the commit ledger as a new event. Optionally include a description
189
+ * that provides the reasoning for the entry.
190
+ *
191
+ * ### Use this endpoint to:
192
+ *
193
+ * - Address incorrect usage burn-down caused by malformed usage or invalid config
194
+ * - Decrease available balance to account for outages where usage may have not
195
+ * been tracked or sent to Metronome
196
+ * - Issue credits to customers in the form of increased balance on existing commit
197
+ * or credit
198
+ *
199
+ * ### Usage guidelines:
200
+ *
201
+ * Manual ledger entries can be extremely useful for resolving discrepancies in
202
+ * Metronome. However, most corrections to inaccurate billings can be modified
203
+ * upstream of the commit, whether that is via contract editing, rate editing, or
204
+ * other actions that cause an invoice to be recalculated.
59
205
  *
60
206
  * @example
61
207
  * ```ts
@@ -69,10 +215,10 @@ export declare class Contracts extends APIResource {
69
215
  * });
70
216
  * ```
71
217
  */
72
- addManualBalanceEntry(body: ContractAddManualBalanceEntryParams, options?: Core.RequestOptions): Core.APIPromise<void>;
218
+ addManualBalanceEntry(body: ContractAddManualBalanceEntryParams, options?: RequestOptions): APIPromise<void>;
73
219
  /**
74
220
  * Amendments will be replaced by Contract editing. New clients should implement
75
- * using the editContract endpoint. Read more about the migration to contract
221
+ * using the `editContract` endpoint. Read more about the migration to contract
76
222
  * editing [here](https://docs.metronome.com/migrate-amendments-to-edits/) and
77
223
  * reach out to your Metronome representative for more details. Once contract
78
224
  * editing is enabled, access to this endpoint will be removed.
@@ -86,9 +232,28 @@ export declare class Contracts extends APIResource {
86
232
  * });
87
233
  * ```
88
234
  */
89
- amend(body: ContractAmendParams, options?: Core.RequestOptions): Core.APIPromise<ContractAmendResponse>;
235
+ amend(body: ContractAmendParams, options?: RequestOptions): APIPromise<ContractAmendResponse>;
90
236
  /**
91
- * Archive a contract
237
+ * Permanently end and archive a contract along with all its terms. Any draft
238
+ * invoices will be canceled, and all upcoming scheduled invoices will be
239
+ * voided–also all finalized invoices can optionally be voided. Use this in the
240
+ * event a contract was incorrectly created and needed to be removed from a
241
+ * customer.
242
+ *
243
+ * #### Impact on commits and credits:
244
+ *
245
+ * When archiving a contract, all associated commits and credits are also archived.
246
+ * For prepaid commits with active segments, Metronome automatically generates
247
+ * expiration ledger entries to close out any remaining balances, ensuring accurate
248
+ * accounting of unused prepaid amounts. These ledger entries will appear in the
249
+ * commit's transaction history with type `PREPAID_COMMIT_EXPIRATION`.
250
+ *
251
+ * #### Archived contract visibility:
252
+ *
253
+ * Archived contracts remain accessible for historical reporting and audit
254
+ * purposes. They can be retrieved using the `ListContracts` endpoint by setting
255
+ * the `include_archived` parameter to `true` or in the Metronome UI when the "Show
256
+ * archived" option is enabled.
92
257
  *
93
258
  * @example
94
259
  * ```ts
@@ -99,9 +264,13 @@ export declare class Contracts extends APIResource {
99
264
  * });
100
265
  * ```
101
266
  */
102
- archive(body: ContractArchiveParams, options?: Core.RequestOptions): Core.APIPromise<ContractArchiveResponse>;
267
+ archive(body: ContractArchiveParams, options?: RequestOptions): APIPromise<ContractArchiveResponse>;
103
268
  /**
104
- * Creates historical usage invoices for a contract
269
+ * Create historical usage invoices for past billing periods on specific contracts.
270
+ * Use this endpoint to generate retroactive invoices with custom usage line items,
271
+ * quantities, and date ranges. Supports preview mode to validate invoice data
272
+ * before creation. Ideal for billing migrations or correcting past billing
273
+ * periods.
105
274
  *
106
275
  * @example
107
276
  * ```ts
@@ -132,22 +301,66 @@ export declare class Contracts extends APIResource {
132
301
  * });
133
302
  * ```
134
303
  */
135
- createHistoricalInvoices(body: ContractCreateHistoricalInvoicesParams, options?: Core.RequestOptions): Core.APIPromise<ContractCreateHistoricalInvoicesResponse>;
304
+ createHistoricalInvoices(body: ContractCreateHistoricalInvoicesParams, options?: RequestOptions): APIPromise<ContractCreateHistoricalInvoicesResponse>;
136
305
  /**
137
- * List balances (commits and credits).
306
+ * Retrieve a comprehensive view of all available balances (commits and credits)
307
+ * for a customer. This endpoint provides real-time visibility into prepaid funds,
308
+ * postpaid commitments, promotional credits, and other balance types that can
309
+ * offset usage charges, helping you build transparent billing experiences.
310
+ *
311
+ * ### Use this endpoint to:
312
+ *
313
+ * - Display current available balances in customer dashboards
314
+ * - Verify available funds before approving high-usage operations
315
+ * - Generate balance reports for finance teams
316
+ * - Filter balances by contract or date ranges
317
+ *
318
+ * ### Key response fields:
319
+ *
320
+ * An array of balance objects (all credits and commits) containing:
321
+ *
322
+ * - Balance details: Current available amount for each commit or credit
323
+ * - Metadata: Product associations, priorities, applicable date ranges
324
+ * - Optional ledger entries: Detailed transaction history (if
325
+ * `include_ledgers=true`)
326
+ * - Balance calculations: Including pending transactions and future-dated entries
327
+ * - Custom fields: Any additional metadata attached to balances
328
+ *
329
+ * ### Usage guidelines:
330
+ *
331
+ * - Date filtering: Use `effective_before` to include only balances with access
332
+ * before a specific date (exclusive)
333
+ * - Set `include_balance=true` for calculated balance amounts on each commit or
334
+ * credit
335
+ * - Set `include_ledgers=true` for full transaction history
336
+ * - Set `include_contract_balances = true` to see contract level balances
337
+ * - Balance logic: Reflects currently accessible amounts, excluding expired/future
338
+ * segments
339
+ * - Manual adjustments: Includes all manual ledger entries, even future-dated ones
138
340
  *
139
341
  * @example
140
342
  * ```ts
141
- * const response = await client.v1.contracts.listBalances({
142
- * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
143
- * id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
144
- * include_ledgers: true,
145
- * });
343
+ * // Automatically fetches more pages as needed.
344
+ * for await (const contractListBalancesResponse of client.v1.contracts.listBalances(
345
+ * {
346
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
347
+ * id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
348
+ * include_ledgers: true,
349
+ * },
350
+ * )) {
351
+ * // ...
352
+ * }
146
353
  * ```
147
354
  */
148
- listBalances(body: ContractListBalancesParams, options?: Core.RequestOptions): Core.APIPromise<ContractListBalancesResponse>;
355
+ listBalances(body: ContractListBalancesParams, options?: RequestOptions): PagePromise<ContractListBalancesResponsesBodyCursorPage, ContractListBalancesResponse>;
149
356
  /**
150
- * Get the rate schedule for the rate card on a given contract.
357
+ * For a specific customer and contract, get the rates at a specific point in time.
358
+ * This endpoint takes the contract's rate card into consideration, including
359
+ * scheduled changes. It also takes into account overrides on the contract.
360
+ *
361
+ * For example, if you want to show your customer a summary of the prices they are
362
+ * paying, inclusive of any negotiated discounts or promotions, use this endpoint.
363
+ * This endpoint only returns rates that are entitled.
151
364
  *
152
365
  * @example
153
366
  * ```ts
@@ -168,10 +381,18 @@ export declare class Contracts extends APIResource {
168
381
  * });
169
382
  * ```
170
383
  */
171
- retrieveRateSchedule(params: ContractRetrieveRateScheduleParams, options?: Core.RequestOptions): Core.APIPromise<ContractRetrieveRateScheduleResponse>;
384
+ retrieveRateSchedule(params: ContractRetrieveRateScheduleParams, options?: RequestOptions): APIPromise<ContractRetrieveRateScheduleResponse>;
172
385
  /**
173
- * Fetch the quantity and price for a subscription over time. End-point does not
174
- * return future scheduled changes.
386
+ * Get the history of subscription quantities and prices over time for a given
387
+ * `subscription_id`. This endpoint can be used to power an in-product experience
388
+ * where you show a customer their historical changes to seat count. Future changes
389
+ * are not included in this endpoint - use the `getContract` endpoint to view the
390
+ * future scheduled changes to a subscription's quantity.
391
+ *
392
+ * Subscriptions are used to model fixed recurring fees as well as seat-based
393
+ * recurring fees. To model changes to the number of seats in Metronome, you can
394
+ * increment or decrement the quantity on a subscription at any point in the past
395
+ * or future.
175
396
  *
176
397
  * @example
177
398
  * ```ts
@@ -186,7 +407,7 @@ export declare class Contracts extends APIResource {
186
407
  * );
187
408
  * ```
188
409
  */
189
- retrieveSubscriptionQuantityHistory(body: ContractRetrieveSubscriptionQuantityHistoryParams, options?: Core.RequestOptions): Core.APIPromise<ContractRetrieveSubscriptionQuantityHistoryResponse>;
410
+ retrieveSubscriptionQuantityHistory(body: ContractRetrieveSubscriptionQuantityHistoryParams, options?: RequestOptions): APIPromise<ContractRetrieveSubscriptionQuantityHistoryResponse>;
190
411
  /**
191
412
  * Create a new scheduled invoice for Professional Services terms on a contract.
192
413
  * This endpoint's availability is dependent on your client's configuration.
@@ -207,9 +428,26 @@ export declare class Contracts extends APIResource {
207
428
  * });
208
429
  * ```
209
430
  */
210
- scheduleProServicesInvoice(body: ContractScheduleProServicesInvoiceParams, options?: Core.RequestOptions): Core.APIPromise<ContractScheduleProServicesInvoiceResponse>;
431
+ scheduleProServicesInvoice(body: ContractScheduleProServicesInvoiceParams, options?: RequestOptions): APIPromise<ContractScheduleProServicesInvoiceResponse>;
211
432
  /**
212
- * Set usage filter for a contract
433
+ * If a customer has multiple contracts with overlapping rates, the usage filter
434
+ * routes usage to the appropriate contract based on a predefined group key.
435
+ *
436
+ * As an example, imagine you have a customer associated with two projects. Each
437
+ * project is associated with its own contract. You can create a usage filter with
438
+ * group key `project_id` on each contract, and route usage for `project_1` to the
439
+ * first contract and `project_2` to the second contract.
440
+ *
441
+ * ### Use this endpoint to:
442
+ *
443
+ * - Support enterprise contracting scenarios where multiple contracts are
444
+ * associated to the same customer with the same rates.
445
+ * - Update the usage filter associated with the contract over time.
446
+ *
447
+ * ### Usage guidelines:
448
+ *
449
+ * To use usage filters, the `group_key` must be defined on the billable metrics
450
+ * underlying the rate card on the contracts.
213
451
  *
214
452
  * @example
215
453
  * ```ts
@@ -222,9 +460,13 @@ export declare class Contracts extends APIResource {
222
460
  * });
223
461
  * ```
224
462
  */
225
- setUsageFilter(body: ContractSetUsageFilterParams, options?: Core.RequestOptions): Core.APIPromise<void>;
463
+ setUsageFilter(body: ContractSetUsageFilterParams, options?: RequestOptions): APIPromise<void>;
226
464
  /**
227
- * Update the end date of a contract
465
+ * Update or and an end date to a contract. Ending a contract early will impact
466
+ * draft usage statements, truncate any terms, and remove upcoming scheduled
467
+ * invoices. Moving the date into the future will only extend the contract length.
468
+ * Terms and scheduled invoices are not extended. Use this if a contract's end date
469
+ * has changed or if a perpetual contract ends.
228
470
  *
229
471
  * @example
230
472
  * ```ts
@@ -235,748 +477,17 @@ export declare class Contracts extends APIResource {
235
477
  * });
236
478
  * ```
237
479
  */
238
- updateEndDate(body: ContractUpdateEndDateParams, options?: Core.RequestOptions): Core.APIPromise<ContractUpdateEndDateResponse>;
480
+ updateEndDate(body: ContractUpdateEndDateParams, options?: RequestOptions): APIPromise<ContractUpdateEndDateResponse>;
239
481
  }
482
+ export type ContractListBalancesResponsesBodyCursorPage = BodyCursorPage<ContractListBalancesResponse>;
240
483
  export interface ContractCreateResponse {
241
484
  data: Shared.ID;
242
485
  }
243
486
  export interface ContractRetrieveResponse {
244
- data: ContractRetrieveResponse.Data;
245
- }
246
- export declare namespace ContractRetrieveResponse {
247
- interface Data {
248
- id: string;
249
- amendments: Array<Data.Amendment>;
250
- current: Shared.ContractWithoutAmendments;
251
- customer_id: string;
252
- initial: Shared.ContractWithoutAmendments;
253
- /**
254
- * RFC 3339 timestamp indicating when the contract was archived. If not returned,
255
- * the contract is not archived.
256
- */
257
- archived_at?: string;
258
- custom_fields?: {
259
- [key: string]: string;
260
- };
261
- /**
262
- * The billing provider configuration associated with a contract.
263
- */
264
- customer_billing_provider_configuration?: Data.CustomerBillingProviderConfiguration;
265
- prepaid_balance_threshold_configuration?: Data.PrepaidBalanceThresholdConfiguration;
266
- /**
267
- * Priority of the contract.
268
- */
269
- priority?: number;
270
- /**
271
- * Determines which scheduled and commit charges to consolidate onto the Contract's
272
- * usage invoice. The charge's `timestamp` must match the usage invoice's
273
- * `ending_before` date for consolidation to occur. This field cannot be modified
274
- * after a Contract has been created. If this field is omitted, charges will appear
275
- * on a separate invoice from usage charges.
276
- */
277
- scheduled_charges_on_usage_invoices?: 'ALL';
278
- spend_threshold_configuration?: Data.SpendThresholdConfiguration;
279
- /**
280
- * List of subscriptions on the contract.
281
- */
282
- subscriptions?: Array<Data.Subscription>;
283
- /**
284
- * Prevents the creation of duplicates. If a request to create a record is made
285
- * with a previously used uniqueness key, a new record will not be created and the
286
- * request will fail with a 409 error.
287
- */
288
- uniqueness_key?: string;
289
- }
290
- namespace Data {
291
- interface Amendment {
292
- id: string;
293
- commits: Array<Shared.Commit>;
294
- created_at: string;
295
- created_by: string;
296
- overrides: Array<Shared.Override>;
297
- scheduled_charges: Array<Shared.ScheduledCharge>;
298
- starting_at: string;
299
- credits?: Array<Shared.Credit>;
300
- /**
301
- * This field's availability is dependent on your client's configuration.
302
- */
303
- discounts?: Array<Shared.Discount>;
304
- /**
305
- * This field's availability is dependent on your client's configuration.
306
- */
307
- netsuite_sales_order_id?: string;
308
- /**
309
- * This field's availability is dependent on your client's configuration.
310
- */
311
- professional_services?: Array<Shared.ProService>;
312
- /**
313
- * This field's availability is dependent on your client's configuration.
314
- */
315
- reseller_royalties?: Array<Amendment.ResellerRoyalty>;
316
- /**
317
- * This field's availability is dependent on your client's configuration.
318
- */
319
- salesforce_opportunity_id?: string;
320
- }
321
- namespace Amendment {
322
- interface ResellerRoyalty {
323
- reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
324
- aws_account_number?: string;
325
- aws_offer_id?: string;
326
- aws_payer_reference_id?: string;
327
- ending_before?: string | null;
328
- fraction?: number;
329
- gcp_account_id?: string;
330
- gcp_offer_id?: string;
331
- netsuite_reseller_id?: string;
332
- reseller_contract_value?: number;
333
- starting_at?: string;
334
- }
335
- }
336
- /**
337
- * The billing provider configuration associated with a contract.
338
- */
339
- interface CustomerBillingProviderConfiguration {
340
- billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
341
- delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
342
- id?: string;
343
- /**
344
- * Configuration for the billing provider. The structure of this object is specific
345
- * to the billing provider.
346
- */
347
- configuration?: {
348
- [key: string]: unknown;
349
- };
350
- }
351
- interface PrepaidBalanceThresholdConfiguration {
352
- commit: PrepaidBalanceThresholdConfiguration.Commit;
353
- /**
354
- * When set to false, the contract will not be evaluated against the
355
- * threshold_amount. Toggling to true will result an immediate evaluation,
356
- * regardless of prior state.
357
- */
358
- is_enabled: boolean;
359
- payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
360
- /**
361
- * Specify the amount the balance should be recharged to.
362
- */
363
- recharge_to_amount: number;
364
- /**
365
- * Specify the threshold amount for the contract. Each time the contract's prepaid
366
- * balance lowers to this amount, a threshold charge will be initiated.
367
- */
368
- threshold_amount: number;
369
- /**
370
- * If provided, the threshold, recharge-to amount, and the resulting threshold
371
- * commit amount will be in terms of this credit type instead of the fiat currency.
372
- */
373
- custom_credit_type_id?: string;
374
- }
375
- namespace PrepaidBalanceThresholdConfiguration {
376
- interface Commit {
377
- /**
378
- * The commit product that will be used to generate the line item for commit
379
- * payment.
380
- */
381
- product_id: string;
382
- /**
383
- * Which products the threshold commit applies to. If applicable_product_ids,
384
- * applicable_product_tags or specifiers are not provided, the commit applies to
385
- * all products.
386
- */
387
- applicable_product_ids?: Array<string>;
388
- /**
389
- * Which tags the threshold commit applies to. If applicable_product_ids,
390
- * applicable_product_tags or specifiers are not provided, the commit applies to
391
- * all products.
392
- */
393
- applicable_product_tags?: Array<string>;
394
- description?: string;
395
- /**
396
- * Specify the name of the line item for the threshold charge. If left blank, it
397
- * will default to the commit product name.
398
- */
399
- name?: string;
400
- /**
401
- * List of filters that determine what kind of customer usage draws down a commit
402
- * or credit. A customer's usage needs to meet the condition of at least one of the
403
- * specifiers to contribute to a commit's or credit's drawdown. This field cannot
404
- * be used together with `applicable_product_ids` or `applicable_product_tags`.
405
- */
406
- specifiers?: Array<Commit.Specifier>;
407
- }
408
- namespace Commit {
409
- interface Specifier {
410
- presentation_group_values?: {
411
- [key: string]: string;
412
- };
413
- pricing_group_values?: {
414
- [key: string]: string;
415
- };
416
- /**
417
- * If provided, the specifier will only apply to the product with the specified ID.
418
- */
419
- product_id?: string;
420
- /**
421
- * If provided, the specifier will only apply to products with all the specified
422
- * tags.
423
- */
424
- product_tags?: Array<string>;
425
- }
426
- }
427
- interface PaymentGateConfig {
428
- /**
429
- * Gate access to the commit balance based on successful collection of payment.
430
- * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
431
- * facilitate payment using your own payment integration. Select NONE if you do not
432
- * wish to payment gate the commit balance.
433
- */
434
- payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
435
- /**
436
- * Only applicable if using PRECALCULATED as your tax type.
437
- */
438
- precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
439
- /**
440
- * Only applicable if using STRIPE as your payment gate type.
441
- */
442
- stripe_config?: PaymentGateConfig.StripeConfig;
443
- /**
444
- * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
445
- * not wish Metronome to calculate tax on your behalf. Leaving this field blank
446
- * will default to NONE.
447
- */
448
- tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
449
- }
450
- namespace PaymentGateConfig {
451
- /**
452
- * Only applicable if using PRECALCULATED as your tax type.
453
- */
454
- interface PrecalculatedTaxConfig {
455
- /**
456
- * Amount of tax to be applied. This should be in the same currency and
457
- * denomination as the commit's invoice schedule
458
- */
459
- tax_amount: number;
460
- /**
461
- * Name of the tax to be applied. This may be used in an invoice line item
462
- * description.
463
- */
464
- tax_name?: string;
465
- }
466
- /**
467
- * Only applicable if using STRIPE as your payment gate type.
468
- */
469
- interface StripeConfig {
470
- /**
471
- * If left blank, will default to INVOICE
472
- */
473
- payment_type: 'INVOICE' | 'PAYMENT_INTENT';
474
- /**
475
- * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
476
- * your payment type.
477
- */
478
- invoice_metadata?: {
479
- [key: string]: string;
480
- };
481
- }
482
- }
483
- }
484
- interface SpendThresholdConfiguration {
485
- commit: SpendThresholdConfiguration.Commit;
486
- /**
487
- * When set to false, the contract will not be evaluated against the
488
- * threshold_amount. Toggling to true will result an immediate evaluation,
489
- * regardless of prior state.
490
- */
491
- is_enabled: boolean;
492
- payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
493
- /**
494
- * Specify the threshold amount for the contract. Each time the contract's usage
495
- * hits this amount, a threshold charge will be initiated.
496
- */
497
- threshold_amount: number;
498
- }
499
- namespace SpendThresholdConfiguration {
500
- interface Commit {
501
- /**
502
- * The commit product that will be used to generate the line item for commit
503
- * payment.
504
- */
505
- product_id: string;
506
- description?: string;
507
- /**
508
- * Specify the name of the line item for the threshold charge. If left blank, it
509
- * will default to the commit product name.
510
- */
511
- name?: string;
512
- }
513
- interface PaymentGateConfig {
514
- /**
515
- * Gate access to the commit balance based on successful collection of payment.
516
- * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
517
- * facilitate payment using your own payment integration. Select NONE if you do not
518
- * wish to payment gate the commit balance.
519
- */
520
- payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
521
- /**
522
- * Only applicable if using PRECALCULATED as your tax type.
523
- */
524
- precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
525
- /**
526
- * Only applicable if using STRIPE as your payment gate type.
527
- */
528
- stripe_config?: PaymentGateConfig.StripeConfig;
529
- /**
530
- * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
531
- * not wish Metronome to calculate tax on your behalf. Leaving this field blank
532
- * will default to NONE.
533
- */
534
- tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
535
- }
536
- namespace PaymentGateConfig {
537
- /**
538
- * Only applicable if using PRECALCULATED as your tax type.
539
- */
540
- interface PrecalculatedTaxConfig {
541
- /**
542
- * Amount of tax to be applied. This should be in the same currency and
543
- * denomination as the commit's invoice schedule
544
- */
545
- tax_amount: number;
546
- /**
547
- * Name of the tax to be applied. This may be used in an invoice line item
548
- * description.
549
- */
550
- tax_name?: string;
551
- }
552
- /**
553
- * Only applicable if using STRIPE as your payment gate type.
554
- */
555
- interface StripeConfig {
556
- /**
557
- * If left blank, will default to INVOICE
558
- */
559
- payment_type: 'INVOICE' | 'PAYMENT_INTENT';
560
- /**
561
- * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
562
- * your payment type.
563
- */
564
- invoice_metadata?: {
565
- [key: string]: string;
566
- };
567
- }
568
- }
569
- }
570
- interface Subscription {
571
- collection_schedule: 'ADVANCE' | 'ARREARS';
572
- proration: Subscription.Proration;
573
- /**
574
- * List of quantity schedule items for the subscription. Only includes the current
575
- * quantity and future quantity changes.
576
- */
577
- quantity_schedule: Array<Subscription.QuantitySchedule>;
578
- starting_at: string;
579
- subscription_rate: Subscription.SubscriptionRate;
580
- id?: string;
581
- custom_fields?: {
582
- [key: string]: string;
583
- };
584
- description?: string;
585
- ending_before?: string;
586
- fiat_credit_type_id?: string;
587
- name?: string;
588
- }
589
- namespace Subscription {
590
- interface Proration {
591
- invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
592
- is_prorated: boolean;
593
- }
594
- interface QuantitySchedule {
595
- quantity: number;
596
- starting_at: string;
597
- ending_before?: string;
598
- }
599
- interface SubscriptionRate {
600
- billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
601
- product: SubscriptionRate.Product;
602
- }
603
- namespace SubscriptionRate {
604
- interface Product {
605
- id: string;
606
- name: string;
607
- }
608
- }
609
- }
610
- }
487
+ data: Shared.Contract;
611
488
  }
612
489
  export interface ContractListResponse {
613
- data: Array<ContractListResponse.Data>;
614
- }
615
- export declare namespace ContractListResponse {
616
- interface Data {
617
- id: string;
618
- amendments: Array<Data.Amendment>;
619
- current: Shared.ContractWithoutAmendments;
620
- customer_id: string;
621
- initial: Shared.ContractWithoutAmendments;
622
- /**
623
- * RFC 3339 timestamp indicating when the contract was archived. If not returned,
624
- * the contract is not archived.
625
- */
626
- archived_at?: string;
627
- custom_fields?: {
628
- [key: string]: string;
629
- };
630
- /**
631
- * The billing provider configuration associated with a contract.
632
- */
633
- customer_billing_provider_configuration?: Data.CustomerBillingProviderConfiguration;
634
- prepaid_balance_threshold_configuration?: Data.PrepaidBalanceThresholdConfiguration;
635
- /**
636
- * Priority of the contract.
637
- */
638
- priority?: number;
639
- /**
640
- * Determines which scheduled and commit charges to consolidate onto the Contract's
641
- * usage invoice. The charge's `timestamp` must match the usage invoice's
642
- * `ending_before` date for consolidation to occur. This field cannot be modified
643
- * after a Contract has been created. If this field is omitted, charges will appear
644
- * on a separate invoice from usage charges.
645
- */
646
- scheduled_charges_on_usage_invoices?: 'ALL';
647
- spend_threshold_configuration?: Data.SpendThresholdConfiguration;
648
- /**
649
- * List of subscriptions on the contract.
650
- */
651
- subscriptions?: Array<Data.Subscription>;
652
- /**
653
- * Prevents the creation of duplicates. If a request to create a record is made
654
- * with a previously used uniqueness key, a new record will not be created and the
655
- * request will fail with a 409 error.
656
- */
657
- uniqueness_key?: string;
658
- }
659
- namespace Data {
660
- interface Amendment {
661
- id: string;
662
- commits: Array<Shared.Commit>;
663
- created_at: string;
664
- created_by: string;
665
- overrides: Array<Shared.Override>;
666
- scheduled_charges: Array<Shared.ScheduledCharge>;
667
- starting_at: string;
668
- credits?: Array<Shared.Credit>;
669
- /**
670
- * This field's availability is dependent on your client's configuration.
671
- */
672
- discounts?: Array<Shared.Discount>;
673
- /**
674
- * This field's availability is dependent on your client's configuration.
675
- */
676
- netsuite_sales_order_id?: string;
677
- /**
678
- * This field's availability is dependent on your client's configuration.
679
- */
680
- professional_services?: Array<Shared.ProService>;
681
- /**
682
- * This field's availability is dependent on your client's configuration.
683
- */
684
- reseller_royalties?: Array<Amendment.ResellerRoyalty>;
685
- /**
686
- * This field's availability is dependent on your client's configuration.
687
- */
688
- salesforce_opportunity_id?: string;
689
- }
690
- namespace Amendment {
691
- interface ResellerRoyalty {
692
- reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
693
- aws_account_number?: string;
694
- aws_offer_id?: string;
695
- aws_payer_reference_id?: string;
696
- ending_before?: string | null;
697
- fraction?: number;
698
- gcp_account_id?: string;
699
- gcp_offer_id?: string;
700
- netsuite_reseller_id?: string;
701
- reseller_contract_value?: number;
702
- starting_at?: string;
703
- }
704
- }
705
- /**
706
- * The billing provider configuration associated with a contract.
707
- */
708
- interface CustomerBillingProviderConfiguration {
709
- billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
710
- delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
711
- id?: string;
712
- /**
713
- * Configuration for the billing provider. The structure of this object is specific
714
- * to the billing provider.
715
- */
716
- configuration?: {
717
- [key: string]: unknown;
718
- };
719
- }
720
- interface PrepaidBalanceThresholdConfiguration {
721
- commit: PrepaidBalanceThresholdConfiguration.Commit;
722
- /**
723
- * When set to false, the contract will not be evaluated against the
724
- * threshold_amount. Toggling to true will result an immediate evaluation,
725
- * regardless of prior state.
726
- */
727
- is_enabled: boolean;
728
- payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
729
- /**
730
- * Specify the amount the balance should be recharged to.
731
- */
732
- recharge_to_amount: number;
733
- /**
734
- * Specify the threshold amount for the contract. Each time the contract's prepaid
735
- * balance lowers to this amount, a threshold charge will be initiated.
736
- */
737
- threshold_amount: number;
738
- /**
739
- * If provided, the threshold, recharge-to amount, and the resulting threshold
740
- * commit amount will be in terms of this credit type instead of the fiat currency.
741
- */
742
- custom_credit_type_id?: string;
743
- }
744
- namespace PrepaidBalanceThresholdConfiguration {
745
- interface Commit {
746
- /**
747
- * The commit product that will be used to generate the line item for commit
748
- * payment.
749
- */
750
- product_id: string;
751
- /**
752
- * Which products the threshold commit applies to. If applicable_product_ids,
753
- * applicable_product_tags or specifiers are not provided, the commit applies to
754
- * all products.
755
- */
756
- applicable_product_ids?: Array<string>;
757
- /**
758
- * Which tags the threshold commit applies to. If applicable_product_ids,
759
- * applicable_product_tags or specifiers are not provided, the commit applies to
760
- * all products.
761
- */
762
- applicable_product_tags?: Array<string>;
763
- description?: string;
764
- /**
765
- * Specify the name of the line item for the threshold charge. If left blank, it
766
- * will default to the commit product name.
767
- */
768
- name?: string;
769
- /**
770
- * List of filters that determine what kind of customer usage draws down a commit
771
- * or credit. A customer's usage needs to meet the condition of at least one of the
772
- * specifiers to contribute to a commit's or credit's drawdown. This field cannot
773
- * be used together with `applicable_product_ids` or `applicable_product_tags`.
774
- */
775
- specifiers?: Array<Commit.Specifier>;
776
- }
777
- namespace Commit {
778
- interface Specifier {
779
- presentation_group_values?: {
780
- [key: string]: string;
781
- };
782
- pricing_group_values?: {
783
- [key: string]: string;
784
- };
785
- /**
786
- * If provided, the specifier will only apply to the product with the specified ID.
787
- */
788
- product_id?: string;
789
- /**
790
- * If provided, the specifier will only apply to products with all the specified
791
- * tags.
792
- */
793
- product_tags?: Array<string>;
794
- }
795
- }
796
- interface PaymentGateConfig {
797
- /**
798
- * Gate access to the commit balance based on successful collection of payment.
799
- * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
800
- * facilitate payment using your own payment integration. Select NONE if you do not
801
- * wish to payment gate the commit balance.
802
- */
803
- payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
804
- /**
805
- * Only applicable if using PRECALCULATED as your tax type.
806
- */
807
- precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
808
- /**
809
- * Only applicable if using STRIPE as your payment gate type.
810
- */
811
- stripe_config?: PaymentGateConfig.StripeConfig;
812
- /**
813
- * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
814
- * not wish Metronome to calculate tax on your behalf. Leaving this field blank
815
- * will default to NONE.
816
- */
817
- tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
818
- }
819
- namespace PaymentGateConfig {
820
- /**
821
- * Only applicable if using PRECALCULATED as your tax type.
822
- */
823
- interface PrecalculatedTaxConfig {
824
- /**
825
- * Amount of tax to be applied. This should be in the same currency and
826
- * denomination as the commit's invoice schedule
827
- */
828
- tax_amount: number;
829
- /**
830
- * Name of the tax to be applied. This may be used in an invoice line item
831
- * description.
832
- */
833
- tax_name?: string;
834
- }
835
- /**
836
- * Only applicable if using STRIPE as your payment gate type.
837
- */
838
- interface StripeConfig {
839
- /**
840
- * If left blank, will default to INVOICE
841
- */
842
- payment_type: 'INVOICE' | 'PAYMENT_INTENT';
843
- /**
844
- * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
845
- * your payment type.
846
- */
847
- invoice_metadata?: {
848
- [key: string]: string;
849
- };
850
- }
851
- }
852
- }
853
- interface SpendThresholdConfiguration {
854
- commit: SpendThresholdConfiguration.Commit;
855
- /**
856
- * When set to false, the contract will not be evaluated against the
857
- * threshold_amount. Toggling to true will result an immediate evaluation,
858
- * regardless of prior state.
859
- */
860
- is_enabled: boolean;
861
- payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
862
- /**
863
- * Specify the threshold amount for the contract. Each time the contract's usage
864
- * hits this amount, a threshold charge will be initiated.
865
- */
866
- threshold_amount: number;
867
- }
868
- namespace SpendThresholdConfiguration {
869
- interface Commit {
870
- /**
871
- * The commit product that will be used to generate the line item for commit
872
- * payment.
873
- */
874
- product_id: string;
875
- description?: string;
876
- /**
877
- * Specify the name of the line item for the threshold charge. If left blank, it
878
- * will default to the commit product name.
879
- */
880
- name?: string;
881
- }
882
- interface PaymentGateConfig {
883
- /**
884
- * Gate access to the commit balance based on successful collection of payment.
885
- * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
886
- * facilitate payment using your own payment integration. Select NONE if you do not
887
- * wish to payment gate the commit balance.
888
- */
889
- payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
890
- /**
891
- * Only applicable if using PRECALCULATED as your tax type.
892
- */
893
- precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
894
- /**
895
- * Only applicable if using STRIPE as your payment gate type.
896
- */
897
- stripe_config?: PaymentGateConfig.StripeConfig;
898
- /**
899
- * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
900
- * not wish Metronome to calculate tax on your behalf. Leaving this field blank
901
- * will default to NONE.
902
- */
903
- tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
904
- }
905
- namespace PaymentGateConfig {
906
- /**
907
- * Only applicable if using PRECALCULATED as your tax type.
908
- */
909
- interface PrecalculatedTaxConfig {
910
- /**
911
- * Amount of tax to be applied. This should be in the same currency and
912
- * denomination as the commit's invoice schedule
913
- */
914
- tax_amount: number;
915
- /**
916
- * Name of the tax to be applied. This may be used in an invoice line item
917
- * description.
918
- */
919
- tax_name?: string;
920
- }
921
- /**
922
- * Only applicable if using STRIPE as your payment gate type.
923
- */
924
- interface StripeConfig {
925
- /**
926
- * If left blank, will default to INVOICE
927
- */
928
- payment_type: 'INVOICE' | 'PAYMENT_INTENT';
929
- /**
930
- * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
931
- * your payment type.
932
- */
933
- invoice_metadata?: {
934
- [key: string]: string;
935
- };
936
- }
937
- }
938
- }
939
- interface Subscription {
940
- collection_schedule: 'ADVANCE' | 'ARREARS';
941
- proration: Subscription.Proration;
942
- /**
943
- * List of quantity schedule items for the subscription. Only includes the current
944
- * quantity and future quantity changes.
945
- */
946
- quantity_schedule: Array<Subscription.QuantitySchedule>;
947
- starting_at: string;
948
- subscription_rate: Subscription.SubscriptionRate;
949
- id?: string;
950
- custom_fields?: {
951
- [key: string]: string;
952
- };
953
- description?: string;
954
- ending_before?: string;
955
- fiat_credit_type_id?: string;
956
- name?: string;
957
- }
958
- namespace Subscription {
959
- interface Proration {
960
- invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
961
- is_prorated: boolean;
962
- }
963
- interface QuantitySchedule {
964
- quantity: number;
965
- starting_at: string;
966
- ending_before?: string;
967
- }
968
- interface SubscriptionRate {
969
- billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
970
- product: SubscriptionRate.Product;
971
- }
972
- namespace SubscriptionRate {
973
- interface Product {
974
- id: string;
975
- name: string;
976
- }
977
- }
978
- }
979
- }
490
+ data: Array<Shared.Contract>;
980
491
  }
981
492
  export interface ContractAmendResponse {
982
493
  data: Shared.ID;
@@ -987,10 +498,7 @@ export interface ContractArchiveResponse {
987
498
  export interface ContractCreateHistoricalInvoicesResponse {
988
499
  data: Array<InvoicesAPI.Invoice>;
989
500
  }
990
- export interface ContractListBalancesResponse {
991
- data: Array<Shared.Commit | Shared.Credit>;
992
- next_page: string | null;
993
- }
501
+ export type ContractListBalancesResponse = Shared.Commit | Shared.Credit;
994
502
  export interface ContractRetrieveRateScheduleResponse {
995
503
  data: Array<ContractRetrieveRateScheduleResponse.Data>;
996
504
  next_page?: string | null;
@@ -999,6 +507,9 @@ export declare namespace ContractRetrieveRateScheduleResponse {
999
507
  interface Data {
1000
508
  entitled: boolean;
1001
509
  list_rate: Shared.Rate;
510
+ /**
511
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
512
+ */
1002
513
  product_custom_fields: {
1003
514
  [key: string]: string;
1004
515
  };
@@ -1012,30 +523,13 @@ export declare namespace ContractRetrieveRateScheduleResponse {
1012
523
  * A distinct rate on the rate card. You can choose to use this rate rather than
1013
524
  * list rate when consuming a credit or commit.
1014
525
  */
1015
- commit_rate?: Data.CommitRate;
526
+ commit_rate?: Shared.CommitRate;
1016
527
  ending_before?: string;
1017
528
  override_rate?: Shared.Rate;
1018
529
  pricing_group_values?: {
1019
530
  [key: string]: string;
1020
531
  };
1021
532
  }
1022
- namespace Data {
1023
- /**
1024
- * A distinct rate on the rate card. You can choose to use this rate rather than
1025
- * list rate when consuming a credit or commit.
1026
- */
1027
- interface CommitRate {
1028
- rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
1029
- /**
1030
- * Commit rate price. For FLAT rate_type, this must be >=0.
1031
- */
1032
- price?: number;
1033
- /**
1034
- * Only set for TIERED rate_type.
1035
- */
1036
- tiers?: Array<Shared.Tier>;
1037
- }
1038
- }
1039
533
  }
1040
534
  export interface ContractRetrieveSubscriptionQuantityHistoryResponse {
1041
535
  data: ContractRetrieveSubscriptionQuantityHistoryResponse.Data;
@@ -1079,6 +573,9 @@ export interface ContractCreateParams {
1079
573
  billing_provider_configuration?: ContractCreateParams.BillingProviderConfiguration;
1080
574
  commits?: Array<ContractCreateParams.Commit>;
1081
575
  credits?: Array<ContractCreateParams.Credit>;
576
+ /**
577
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
578
+ */
1082
579
  custom_fields?: {
1083
580
  [key: string]: string;
1084
581
  };
@@ -1105,7 +602,7 @@ export interface ContractCreateParams {
1105
602
  */
1106
603
  netsuite_sales_order_id?: string;
1107
604
  overrides?: Array<ContractCreateParams.Override>;
1108
- prepaid_balance_threshold_configuration?: ContractCreateParams.PrepaidBalanceThresholdConfiguration;
605
+ prepaid_balance_threshold_configuration?: Shared.PrepaidBalanceThresholdConfiguration;
1109
606
  /**
1110
607
  * Priority of the contract.
1111
608
  */
@@ -1139,7 +636,7 @@ export interface ContractCreateParams {
1139
636
  * on a separate invoice from usage charges.
1140
637
  */
1141
638
  scheduled_charges_on_usage_invoices?: 'ALL';
1142
- spend_threshold_configuration?: ContractCreateParams.SpendThresholdConfiguration;
639
+ spend_threshold_configuration?: Shared.SpendThresholdConfiguration;
1143
640
  /**
1144
641
  * Optional list of
1145
642
  * [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
@@ -1206,6 +703,9 @@ export declare namespace ContractCreateParams {
1206
703
  * all products.
1207
704
  */
1208
705
  applicable_product_tags?: Array<string>;
706
+ /**
707
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
708
+ */
1209
709
  custom_fields?: {
1210
710
  [key: string]: string;
1211
711
  };
@@ -1216,7 +716,7 @@ export declare namespace ContractCreateParams {
1216
716
  /**
1217
717
  * Optional configuration for commit hierarchy access control
1218
718
  */
1219
- hierarchy_configuration?: Commit.HierarchyConfiguration;
719
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
1220
720
  /**
1221
721
  * Required for "POSTPAID" commits: the true up invoice will be generated at this
1222
722
  * time and only one schedule item is allowed; the total must match access_schedule
@@ -1252,7 +752,7 @@ export declare namespace ContractCreateParams {
1252
752
  * specifiers to contribute to a commit's or credit's drawdown. This field cannot
1253
753
  * be used together with `applicable_product_ids` or `applicable_product_tags`.
1254
754
  */
1255
- specifiers?: Array<Commit.Specifier>;
755
+ specifiers?: Array<Shared.CommitSpecifierInput>;
1256
756
  /**
1257
757
  * A temporary ID for the commit that can be used to reference the commit for
1258
758
  * commit specific overrides.
@@ -1285,24 +785,6 @@ export declare namespace ContractCreateParams {
1285
785
  starting_at: string;
1286
786
  }
1287
787
  }
1288
- /**
1289
- * Optional configuration for commit hierarchy access control
1290
- */
1291
- interface HierarchyConfiguration {
1292
- child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
1293
- }
1294
- namespace HierarchyConfiguration {
1295
- interface CommitHierarchyChildAccessAll {
1296
- type: 'ALL';
1297
- }
1298
- interface CommitHierarchyChildAccessNone {
1299
- type: 'NONE';
1300
- }
1301
- interface CommitHierarchyChildAccessContractIDs {
1302
- contract_ids: Array<string>;
1303
- type: 'CONTRACT_IDS';
1304
- }
1305
- }
1306
788
  /**
1307
789
  * Required for "POSTPAID" commits: the true up invoice will be generated at this
1308
790
  * time and only one schedule item is allowed; the total must match access_schedule
@@ -1314,6 +796,11 @@ export declare namespace ContractCreateParams {
1314
796
  * Defaults to USD (cents) if not passed.
1315
797
  */
1316
798
  credit_type_id?: string;
799
+ /**
800
+ * This field is only applicable to commit invoice schedules. If true, this
801
+ * schedule will not generate an invoice.
802
+ */
803
+ do_not_invoice?: boolean;
1317
804
  /**
1318
805
  * Enter the unit price and quantity for the charge or instead only send the
1319
806
  * amount. If amount is sent, the unit price is assumed to be the amount and
@@ -1443,25 +930,19 @@ export declare namespace ContractCreateParams {
1443
930
  invoice_metadata?: {
1444
931
  [key: string]: string;
1445
932
  };
933
+ /**
934
+ * If true, the payment will be made assuming the customer is present (i.e. on
935
+ * session).
936
+ *
937
+ * If false, the payment will be made assuming the customer is not present (i.e.
938
+ * off session). For cardholders from a country with an e-mandate requirement (e.g.
939
+ * India), the payment may be declined.
940
+ *
941
+ * If left blank, will default to false.
942
+ */
943
+ on_session_payment?: boolean;
1446
944
  }
1447
945
  }
1448
- interface Specifier {
1449
- presentation_group_values?: {
1450
- [key: string]: string;
1451
- };
1452
- pricing_group_values?: {
1453
- [key: string]: string;
1454
- };
1455
- /**
1456
- * If provided, the specifier will only apply to the product with the specified ID.
1457
- */
1458
- product_id?: string;
1459
- /**
1460
- * If provided, the specifier will only apply to products with all the specified
1461
- * tags.
1462
- */
1463
- product_tags?: Array<string>;
1464
- }
1465
946
  }
1466
947
  interface Credit {
1467
948
  /**
@@ -1479,6 +960,9 @@ export declare namespace ContractCreateParams {
1479
960
  * applicable_product_tags are not provided, the credit applies to all products.
1480
961
  */
1481
962
  applicable_product_tags?: Array<string>;
963
+ /**
964
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
965
+ */
1482
966
  custom_fields?: {
1483
967
  [key: string]: string;
1484
968
  };
@@ -1489,7 +973,7 @@ export declare namespace ContractCreateParams {
1489
973
  /**
1490
974
  * Optional configuration for credit hierarchy access control
1491
975
  */
1492
- hierarchy_configuration?: Credit.HierarchyConfiguration;
976
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
1493
977
  /**
1494
978
  * displayed on invoices
1495
979
  */
@@ -1510,7 +994,7 @@ export declare namespace ContractCreateParams {
1510
994
  * specifiers to contribute to a commit's or credit's drawdown. This field cannot
1511
995
  * be used together with `applicable_product_ids` or `applicable_product_tags`.
1512
996
  */
1513
- specifiers?: Array<Credit.Specifier>;
997
+ specifiers?: Array<Shared.CommitSpecifierInput>;
1514
998
  }
1515
999
  namespace Credit {
1516
1000
  /**
@@ -1536,41 +1020,6 @@ export declare namespace ContractCreateParams {
1536
1020
  starting_at: string;
1537
1021
  }
1538
1022
  }
1539
- /**
1540
- * Optional configuration for credit hierarchy access control
1541
- */
1542
- interface HierarchyConfiguration {
1543
- child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
1544
- }
1545
- namespace HierarchyConfiguration {
1546
- interface CommitHierarchyChildAccessAll {
1547
- type: 'ALL';
1548
- }
1549
- interface CommitHierarchyChildAccessNone {
1550
- type: 'NONE';
1551
- }
1552
- interface CommitHierarchyChildAccessContractIDs {
1553
- contract_ids: Array<string>;
1554
- type: 'CONTRACT_IDS';
1555
- }
1556
- }
1557
- interface Specifier {
1558
- presentation_group_values?: {
1559
- [key: string]: string;
1560
- };
1561
- pricing_group_values?: {
1562
- [key: string]: string;
1563
- };
1564
- /**
1565
- * If provided, the specifier will only apply to the product with the specified ID.
1566
- */
1567
- product_id?: string;
1568
- /**
1569
- * If provided, the specifier will only apply to products with all the specified
1570
- * tags.
1571
- */
1572
- product_tags?: Array<string>;
1573
- }
1574
1023
  }
1575
1024
  interface Discount {
1576
1025
  product_id: string;
@@ -1578,6 +1027,9 @@ export declare namespace ContractCreateParams {
1578
1027
  * Must provide either schedule_items or recurring_schedule.
1579
1028
  */
1580
1029
  schedule: Discount.Schedule;
1030
+ /**
1031
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1032
+ */
1581
1033
  custom_fields?: {
1582
1034
  [key: string]: string;
1583
1035
  };
@@ -1599,6 +1051,11 @@ export declare namespace ContractCreateParams {
1599
1051
  * Defaults to USD (cents) if not passed.
1600
1052
  */
1601
1053
  credit_type_id?: string;
1054
+ /**
1055
+ * This field is only applicable to commit invoice schedules. If true, this
1056
+ * schedule will not generate an invoice.
1057
+ */
1058
+ do_not_invoice?: boolean;
1602
1059
  /**
1603
1060
  * Enter the unit price and quantity for the charge or instead only send the
1604
1061
  * amount. If amount is sent, the unit price is assumed to be the amount and
@@ -1748,8 +1205,8 @@ export declare namespace ContractCreateParams {
1748
1205
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
1749
1206
  /**
1750
1207
  * Can only be used for commit specific overrides. Must be used in conjunction with
1751
- * one of product_id, product_tags, pricing_group_values, or
1752
- * presentation_group_values. If provided, the override will only apply to the
1208
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
1209
+ * `presentation_group_values`. If provided, the override will only apply to the
1753
1210
  * specified commits. If not provided, the override will apply to all commits.
1754
1211
  */
1755
1212
  commit_ids?: Array<string>;
@@ -1778,16 +1235,16 @@ export declare namespace ContractCreateParams {
1778
1235
  product_tags?: Array<string>;
1779
1236
  /**
1780
1237
  * Can only be used for commit specific overrides. Must be used in conjunction with
1781
- * one of product_id, product_tags, pricing_group_values, or
1782
- * presentation_group_values. If provided, the override will only apply to commits
1783
- * created by the specified recurring commit ids.
1238
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
1239
+ * `presentation_group_values`. If provided, the override will only apply to
1240
+ * commits created by the specified recurring commit ids.
1784
1241
  */
1785
1242
  recurring_commit_ids?: Array<string>;
1786
1243
  /**
1787
1244
  * Can only be used for commit specific overrides. Must be used in conjunction with
1788
- * one of product_id, product_tags, pricing_group_values, or
1789
- * presentation_group_values. If provided, the override will only apply to credits
1790
- * created by the specified recurring credit ids.
1245
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
1246
+ * `presentation_group_values`. If provided, the override will only apply to
1247
+ * credits created by the specified recurring credit ids.
1791
1248
  */
1792
1249
  recurring_credit_ids?: Array<string>;
1793
1250
  }
@@ -1803,162 +1260,29 @@ export declare namespace ContractCreateParams {
1803
1260
  */
1804
1261
  custom_rate?: {
1805
1262
  [key: string]: unknown;
1806
- };
1807
- /**
1808
- * Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
1809
- * set to true.
1810
- */
1811
- is_prorated?: boolean;
1812
- /**
1813
- * Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
1814
- * this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
1815
- */
1816
- price?: number;
1817
- /**
1818
- * Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
1819
- */
1820
- quantity?: number;
1821
- /**
1822
- * Only set for TIERED rate_type.
1823
- */
1824
- tiers?: Array<Shared.Tier>;
1825
- }
1826
- interface Tier {
1827
- multiplier: number;
1828
- size?: number;
1829
- }
1830
- }
1831
- interface PrepaidBalanceThresholdConfiguration {
1832
- commit: PrepaidBalanceThresholdConfiguration.Commit;
1833
- /**
1834
- * When set to false, the contract will not be evaluated against the
1835
- * threshold_amount. Toggling to true will result an immediate evaluation,
1836
- * regardless of prior state.
1837
- */
1838
- is_enabled: boolean;
1839
- payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
1840
- /**
1841
- * Specify the amount the balance should be recharged to.
1842
- */
1843
- recharge_to_amount: number;
1844
- /**
1845
- * Specify the threshold amount for the contract. Each time the contract's prepaid
1846
- * balance lowers to this amount, a threshold charge will be initiated.
1847
- */
1848
- threshold_amount: number;
1849
- /**
1850
- * If provided, the threshold, recharge-to amount, and the resulting threshold
1851
- * commit amount will be in terms of this credit type instead of the fiat currency.
1852
- */
1853
- custom_credit_type_id?: string;
1854
- }
1855
- namespace PrepaidBalanceThresholdConfiguration {
1856
- interface Commit {
1857
- /**
1858
- * The commit product that will be used to generate the line item for commit
1859
- * payment.
1860
- */
1861
- product_id: string;
1862
- /**
1863
- * Which products the threshold commit applies to. If applicable_product_ids,
1864
- * applicable_product_tags or specifiers are not provided, the commit applies to
1865
- * all products.
1866
- */
1867
- applicable_product_ids?: Array<string>;
1868
- /**
1869
- * Which tags the threshold commit applies to. If applicable_product_ids,
1870
- * applicable_product_tags or specifiers are not provided, the commit applies to
1871
- * all products.
1872
- */
1873
- applicable_product_tags?: Array<string>;
1874
- description?: string;
1875
- /**
1876
- * Specify the name of the line item for the threshold charge. If left blank, it
1877
- * will default to the commit product name.
1878
- */
1879
- name?: string;
1880
- /**
1881
- * List of filters that determine what kind of customer usage draws down a commit
1882
- * or credit. A customer's usage needs to meet the condition of at least one of the
1883
- * specifiers to contribute to a commit's or credit's drawdown. This field cannot
1884
- * be used together with `applicable_product_ids` or `applicable_product_tags`.
1885
- */
1886
- specifiers?: Array<Commit.Specifier>;
1887
- }
1888
- namespace Commit {
1889
- interface Specifier {
1890
- presentation_group_values?: {
1891
- [key: string]: string;
1892
- };
1893
- pricing_group_values?: {
1894
- [key: string]: string;
1895
- };
1896
- /**
1897
- * If provided, the specifier will only apply to the product with the specified ID.
1898
- */
1899
- product_id?: string;
1900
- /**
1901
- * If provided, the specifier will only apply to products with all the specified
1902
- * tags.
1903
- */
1904
- product_tags?: Array<string>;
1905
- }
1906
- }
1907
- interface PaymentGateConfig {
1908
- /**
1909
- * Gate access to the commit balance based on successful collection of payment.
1910
- * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
1911
- * facilitate payment using your own payment integration. Select NONE if you do not
1912
- * wish to payment gate the commit balance.
1913
- */
1914
- payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
1915
- /**
1916
- * Only applicable if using PRECALCULATED as your tax type.
1917
- */
1918
- precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
1263
+ };
1919
1264
  /**
1920
- * Only applicable if using STRIPE as your payment gate type.
1265
+ * Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
1266
+ * set to true.
1921
1267
  */
1922
- stripe_config?: PaymentGateConfig.StripeConfig;
1268
+ is_prorated?: boolean;
1923
1269
  /**
1924
- * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
1925
- * not wish Metronome to calculate tax on your behalf. Leaving this field blank
1926
- * will default to NONE.
1270
+ * Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
1271
+ * this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
1927
1272
  */
1928
- tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
1929
- }
1930
- namespace PaymentGateConfig {
1273
+ price?: number;
1931
1274
  /**
1932
- * Only applicable if using PRECALCULATED as your tax type.
1275
+ * Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
1933
1276
  */
1934
- interface PrecalculatedTaxConfig {
1935
- /**
1936
- * Amount of tax to be applied. This should be in the same currency and
1937
- * denomination as the commit's invoice schedule
1938
- */
1939
- tax_amount: number;
1940
- /**
1941
- * Name of the tax to be applied. This may be used in an invoice line item
1942
- * description.
1943
- */
1944
- tax_name?: string;
1945
- }
1277
+ quantity?: number;
1946
1278
  /**
1947
- * Only applicable if using STRIPE as your payment gate type.
1279
+ * Only set for TIERED rate_type.
1948
1280
  */
1949
- interface StripeConfig {
1950
- /**
1951
- * If left blank, will default to INVOICE
1952
- */
1953
- payment_type: 'INVOICE' | 'PAYMENT_INTENT';
1954
- /**
1955
- * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
1956
- * your payment type.
1957
- */
1958
- invoice_metadata?: {
1959
- [key: string]: string;
1960
- };
1961
- }
1281
+ tiers?: Array<Shared.Tier>;
1282
+ }
1283
+ interface Tier {
1284
+ multiplier: number;
1285
+ size?: number;
1962
1286
  }
1963
1287
  }
1964
1288
  interface ProfessionalService {
@@ -1977,6 +1301,9 @@ export declare namespace ContractCreateParams {
1977
1301
  * amount and must be specified.
1978
1302
  */
1979
1303
  unit_price: number;
1304
+ /**
1305
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1306
+ */
1980
1307
  custom_fields?: {
1981
1308
  [key: string]: string;
1982
1309
  };
@@ -2025,7 +1352,7 @@ export declare namespace ContractCreateParams {
2025
1352
  /**
2026
1353
  * Optional configuration for recurring commit/credit hierarchy access control
2027
1354
  */
2028
- hierarchy_configuration?: RecurringCommit.HierarchyConfiguration;
1355
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
2029
1356
  /**
2030
1357
  * The amount the customer should be billed for the commit. Not required.
2031
1358
  */
@@ -2067,7 +1394,7 @@ export declare namespace ContractCreateParams {
2067
1394
  * specifiers to contribute to a commit's or credit's drawdown. This field cannot
2068
1395
  * be used together with `applicable_product_ids` or `applicable_product_tags`.
2069
1396
  */
2070
- specifiers?: Array<RecurringCommit.Specifier>;
1397
+ specifiers?: Array<Shared.CommitSpecifierInput>;
2071
1398
  /**
2072
1399
  * Attach a subscription to the recurring commit/credit.
2073
1400
  */
@@ -2086,8 +1413,8 @@ export declare namespace ContractCreateParams {
2086
1413
  credit_type_id: string;
2087
1414
  unit_price: number;
2088
1415
  /**
2089
- * This field is currently required. Upcoming recurring commit/credit configuration
2090
- * options will allow it to be optional.
1416
+ * This field is required unless a subscription is attached via
1417
+ * `subscription_config`.
2091
1418
  */
2092
1419
  quantity?: number;
2093
1420
  }
@@ -2100,24 +1427,6 @@ export declare namespace ContractCreateParams {
2100
1427
  value: number;
2101
1428
  unit?: 'PERIODS';
2102
1429
  }
2103
- /**
2104
- * Optional configuration for recurring commit/credit hierarchy access control
2105
- */
2106
- interface HierarchyConfiguration {
2107
- child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
2108
- }
2109
- namespace HierarchyConfiguration {
2110
- interface CommitHierarchyChildAccessAll {
2111
- type: 'ALL';
2112
- }
2113
- interface CommitHierarchyChildAccessNone {
2114
- type: 'NONE';
2115
- }
2116
- interface CommitHierarchyChildAccessContractIDs {
2117
- contract_ids: Array<string>;
2118
- type: 'CONTRACT_IDS';
2119
- }
2120
- }
2121
1430
  /**
2122
1431
  * The amount the customer should be billed for the commit. Not required.
2123
1432
  */
@@ -2126,23 +1435,6 @@ export declare namespace ContractCreateParams {
2126
1435
  quantity: number;
2127
1436
  unit_price: number;
2128
1437
  }
2129
- interface Specifier {
2130
- presentation_group_values?: {
2131
- [key: string]: string;
2132
- };
2133
- pricing_group_values?: {
2134
- [key: string]: string;
2135
- };
2136
- /**
2137
- * If provided, the specifier will only apply to the product with the specified ID.
2138
- */
2139
- product_id?: string;
2140
- /**
2141
- * If provided, the specifier will only apply to products with all the specified
2142
- * tags.
2143
- */
2144
- product_tags?: Array<string>;
2145
- }
2146
1438
  /**
2147
1439
  * Attach a subscription to the recurring commit/credit.
2148
1440
  */
@@ -2155,7 +1447,7 @@ export declare namespace ContractCreateParams {
2155
1447
  /**
2156
1448
  * If set to POOLED, allocation added per seat is pooled across the account.
2157
1449
  */
2158
- allocation?: 'POOLED';
1450
+ allocation?: 'INDIVIDUAL' | 'POOLED';
2159
1451
  }
2160
1452
  namespace SubscriptionConfig {
2161
1453
  interface ApplySeatIncreaseConfig {
@@ -2205,7 +1497,7 @@ export declare namespace ContractCreateParams {
2205
1497
  /**
2206
1498
  * Optional configuration for recurring commit/credit hierarchy access control
2207
1499
  */
2208
- hierarchy_configuration?: RecurringCredit.HierarchyConfiguration;
1500
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
2209
1501
  /**
2210
1502
  * displayed on invoices. will be passed through to the individual commits
2211
1503
  */
@@ -2243,7 +1535,7 @@ export declare namespace ContractCreateParams {
2243
1535
  * specifiers to contribute to a commit's or credit's drawdown. This field cannot
2244
1536
  * be used together with `applicable_product_ids` or `applicable_product_tags`.
2245
1537
  */
2246
- specifiers?: Array<RecurringCredit.Specifier>;
1538
+ specifiers?: Array<Shared.CommitSpecifierInput>;
2247
1539
  /**
2248
1540
  * Attach a subscription to the recurring commit/credit.
2249
1541
  */
@@ -2262,8 +1554,8 @@ export declare namespace ContractCreateParams {
2262
1554
  credit_type_id: string;
2263
1555
  unit_price: number;
2264
1556
  /**
2265
- * This field is currently required. Upcoming recurring commit/credit configuration
2266
- * options will allow it to be optional.
1557
+ * This field is required unless a subscription is attached via
1558
+ * `subscription_config`.
2267
1559
  */
2268
1560
  quantity?: number;
2269
1561
  }
@@ -2276,41 +1568,6 @@ export declare namespace ContractCreateParams {
2276
1568
  value: number;
2277
1569
  unit?: 'PERIODS';
2278
1570
  }
2279
- /**
2280
- * Optional configuration for recurring commit/credit hierarchy access control
2281
- */
2282
- interface HierarchyConfiguration {
2283
- child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
2284
- }
2285
- namespace HierarchyConfiguration {
2286
- interface CommitHierarchyChildAccessAll {
2287
- type: 'ALL';
2288
- }
2289
- interface CommitHierarchyChildAccessNone {
2290
- type: 'NONE';
2291
- }
2292
- interface CommitHierarchyChildAccessContractIDs {
2293
- contract_ids: Array<string>;
2294
- type: 'CONTRACT_IDS';
2295
- }
2296
- }
2297
- interface Specifier {
2298
- presentation_group_values?: {
2299
- [key: string]: string;
2300
- };
2301
- pricing_group_values?: {
2302
- [key: string]: string;
2303
- };
2304
- /**
2305
- * If provided, the specifier will only apply to the product with the specified ID.
2306
- */
2307
- product_id?: string;
2308
- /**
2309
- * If provided, the specifier will only apply to products with all the specified
2310
- * tags.
2311
- */
2312
- product_tags?: Array<string>;
2313
- }
2314
1571
  /**
2315
1572
  * Attach a subscription to the recurring commit/credit.
2316
1573
  */
@@ -2323,7 +1580,7 @@ export declare namespace ContractCreateParams {
2323
1580
  /**
2324
1581
  * If set to POOLED, allocation added per seat is pooled across the account.
2325
1582
  */
2326
- allocation?: 'POOLED';
1583
+ allocation?: 'INDIVIDUAL' | 'POOLED';
2327
1584
  }
2328
1585
  namespace SubscriptionConfig {
2329
1586
  interface ApplySeatIncreaseConfig {
@@ -2369,6 +1626,12 @@ export declare namespace ContractCreateParams {
2369
1626
  * Must provide either schedule_items or recurring_schedule.
2370
1627
  */
2371
1628
  schedule: ScheduledCharge.Schedule;
1629
+ /**
1630
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1631
+ */
1632
+ custom_fields?: {
1633
+ [key: string]: string;
1634
+ };
2372
1635
  /**
2373
1636
  * displayed on invoices
2374
1637
  */
@@ -2387,6 +1650,11 @@ export declare namespace ContractCreateParams {
2387
1650
  * Defaults to USD (cents) if not passed.
2388
1651
  */
2389
1652
  credit_type_id?: string;
1653
+ /**
1654
+ * This field is only applicable to commit invoice schedules. If true, this
1655
+ * schedule will not generate an invoice.
1656
+ */
1657
+ do_not_invoice?: boolean;
2390
1658
  /**
2391
1659
  * Enter the unit price and quantity for the charge or instead only send the
2392
1660
  * amount. If amount is sent, the unit price is assumed to be the amount and
@@ -2460,100 +1728,13 @@ export declare namespace ContractCreateParams {
2460
1728
  }
2461
1729
  }
2462
1730
  }
2463
- interface SpendThresholdConfiguration {
2464
- commit: SpendThresholdConfiguration.Commit;
2465
- /**
2466
- * When set to false, the contract will not be evaluated against the
2467
- * threshold_amount. Toggling to true will result an immediate evaluation,
2468
- * regardless of prior state.
2469
- */
2470
- is_enabled: boolean;
2471
- payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
2472
- /**
2473
- * Specify the threshold amount for the contract. Each time the contract's usage
2474
- * hits this amount, a threshold charge will be initiated.
2475
- */
2476
- threshold_amount: number;
2477
- }
2478
- namespace SpendThresholdConfiguration {
2479
- interface Commit {
2480
- /**
2481
- * The commit product that will be used to generate the line item for commit
2482
- * payment.
2483
- */
2484
- product_id: string;
2485
- description?: string;
2486
- /**
2487
- * Specify the name of the line item for the threshold charge. If left blank, it
2488
- * will default to the commit product name.
2489
- */
2490
- name?: string;
2491
- }
2492
- interface PaymentGateConfig {
2493
- /**
2494
- * Gate access to the commit balance based on successful collection of payment.
2495
- * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
2496
- * facilitate payment using your own payment integration. Select NONE if you do not
2497
- * wish to payment gate the commit balance.
2498
- */
2499
- payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
2500
- /**
2501
- * Only applicable if using PRECALCULATED as your tax type.
2502
- */
2503
- precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
2504
- /**
2505
- * Only applicable if using STRIPE as your payment gate type.
2506
- */
2507
- stripe_config?: PaymentGateConfig.StripeConfig;
2508
- /**
2509
- * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
2510
- * not wish Metronome to calculate tax on your behalf. Leaving this field blank
2511
- * will default to NONE.
2512
- */
2513
- tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
2514
- }
2515
- namespace PaymentGateConfig {
2516
- /**
2517
- * Only applicable if using PRECALCULATED as your tax type.
2518
- */
2519
- interface PrecalculatedTaxConfig {
2520
- /**
2521
- * Amount of tax to be applied. This should be in the same currency and
2522
- * denomination as the commit's invoice schedule
2523
- */
2524
- tax_amount: number;
2525
- /**
2526
- * Name of the tax to be applied. This may be used in an invoice line item
2527
- * description.
2528
- */
2529
- tax_name?: string;
2530
- }
2531
- /**
2532
- * Only applicable if using STRIPE as your payment gate type.
2533
- */
2534
- interface StripeConfig {
2535
- /**
2536
- * If left blank, will default to INVOICE
2537
- */
2538
- payment_type: 'INVOICE' | 'PAYMENT_INTENT';
2539
- /**
2540
- * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
2541
- * your payment type.
2542
- */
2543
- invoice_metadata?: {
2544
- [key: string]: string;
2545
- };
2546
- }
2547
- }
2548
- }
2549
1731
  interface Subscription {
2550
1732
  collection_schedule: 'ADVANCE' | 'ARREARS';
2551
- /**
2552
- * The initial quantity for the subscription. It must be non-negative value.
2553
- */
2554
- initial_quantity: number;
2555
1733
  proration: Subscription.Proration;
2556
1734
  subscription_rate: Subscription.SubscriptionRate;
1735
+ /**
1736
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1737
+ */
2557
1738
  custom_fields?: {
2558
1739
  [key: string]: string;
2559
1740
  };
@@ -2563,7 +1744,19 @@ export declare namespace ContractCreateParams {
2563
1744
  * contract end date.
2564
1745
  */
2565
1746
  ending_before?: string;
1747
+ /**
1748
+ * The initial quantity for the subscription. It must be non-negative value.
1749
+ * Required if quantity_management_mode is QUANTITY_ONLY.
1750
+ */
1751
+ initial_quantity?: number;
2566
1752
  name?: string;
1753
+ /**
1754
+ * Determines how the subscription's quantity is controlled. Defaults to
1755
+ * QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
1756
+ * directly on the subscription. `initial_quantity` must be provided with this
1757
+ * option. Compatible with recurring commits/credits that use POOLED allocation.
1758
+ */
1759
+ quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY';
2567
1760
  /**
2568
1761
  * Inclusive start time for the subscription. If not provided, defaults to contract
2569
1762
  * start date
@@ -2731,6 +1924,9 @@ export interface ContractAmendParams {
2731
1924
  starting_at: string;
2732
1925
  commits?: Array<ContractAmendParams.Commit>;
2733
1926
  credits?: Array<ContractAmendParams.Credit>;
1927
+ /**
1928
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1929
+ */
2734
1930
  custom_fields?: {
2735
1931
  [key: string]: string;
2736
1932
  };
@@ -2787,6 +1983,9 @@ export declare namespace ContractAmendParams {
2787
1983
  * all products.
2788
1984
  */
2789
1985
  applicable_product_tags?: Array<string>;
1986
+ /**
1987
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1988
+ */
2790
1989
  custom_fields?: {
2791
1990
  [key: string]: string;
2792
1991
  };
@@ -2797,7 +1996,7 @@ export declare namespace ContractAmendParams {
2797
1996
  /**
2798
1997
  * Optional configuration for commit hierarchy access control
2799
1998
  */
2800
- hierarchy_configuration?: Commit.HierarchyConfiguration;
1999
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
2801
2000
  /**
2802
2001
  * Required for "POSTPAID" commits: the true up invoice will be generated at this
2803
2002
  * time and only one schedule item is allowed; the total must match access_schedule
@@ -2833,7 +2032,7 @@ export declare namespace ContractAmendParams {
2833
2032
  * specifiers to contribute to a commit's or credit's drawdown. This field cannot
2834
2033
  * be used together with `applicable_product_ids` or `applicable_product_tags`.
2835
2034
  */
2836
- specifiers?: Array<Commit.Specifier>;
2035
+ specifiers?: Array<Shared.CommitSpecifierInput>;
2837
2036
  /**
2838
2037
  * A temporary ID for the commit that can be used to reference the commit for
2839
2038
  * commit specific overrides.
@@ -2866,24 +2065,6 @@ export declare namespace ContractAmendParams {
2866
2065
  starting_at: string;
2867
2066
  }
2868
2067
  }
2869
- /**
2870
- * Optional configuration for commit hierarchy access control
2871
- */
2872
- interface HierarchyConfiguration {
2873
- child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
2874
- }
2875
- namespace HierarchyConfiguration {
2876
- interface CommitHierarchyChildAccessAll {
2877
- type: 'ALL';
2878
- }
2879
- interface CommitHierarchyChildAccessNone {
2880
- type: 'NONE';
2881
- }
2882
- interface CommitHierarchyChildAccessContractIDs {
2883
- contract_ids: Array<string>;
2884
- type: 'CONTRACT_IDS';
2885
- }
2886
- }
2887
2068
  /**
2888
2069
  * Required for "POSTPAID" commits: the true up invoice will be generated at this
2889
2070
  * time and only one schedule item is allowed; the total must match access_schedule
@@ -2895,6 +2076,11 @@ export declare namespace ContractAmendParams {
2895
2076
  * Defaults to USD (cents) if not passed.
2896
2077
  */
2897
2078
  credit_type_id?: string;
2079
+ /**
2080
+ * This field is only applicable to commit invoice schedules. If true, this
2081
+ * schedule will not generate an invoice.
2082
+ */
2083
+ do_not_invoice?: boolean;
2898
2084
  /**
2899
2085
  * Enter the unit price and quantity for the charge or instead only send the
2900
2086
  * amount. If amount is sent, the unit price is assumed to be the amount and
@@ -3024,25 +2210,19 @@ export declare namespace ContractAmendParams {
3024
2210
  invoice_metadata?: {
3025
2211
  [key: string]: string;
3026
2212
  };
2213
+ /**
2214
+ * If true, the payment will be made assuming the customer is present (i.e. on
2215
+ * session).
2216
+ *
2217
+ * If false, the payment will be made assuming the customer is not present (i.e.
2218
+ * off session). For cardholders from a country with an e-mandate requirement (e.g.
2219
+ * India), the payment may be declined.
2220
+ *
2221
+ * If left blank, will default to false.
2222
+ */
2223
+ on_session_payment?: boolean;
3027
2224
  }
3028
2225
  }
3029
- interface Specifier {
3030
- presentation_group_values?: {
3031
- [key: string]: string;
3032
- };
3033
- pricing_group_values?: {
3034
- [key: string]: string;
3035
- };
3036
- /**
3037
- * If provided, the specifier will only apply to the product with the specified ID.
3038
- */
3039
- product_id?: string;
3040
- /**
3041
- * If provided, the specifier will only apply to products with all the specified
3042
- * tags.
3043
- */
3044
- product_tags?: Array<string>;
3045
- }
3046
2226
  }
3047
2227
  interface Credit {
3048
2228
  /**
@@ -3060,6 +2240,9 @@ export declare namespace ContractAmendParams {
3060
2240
  * applicable_product_tags are not provided, the credit applies to all products.
3061
2241
  */
3062
2242
  applicable_product_tags?: Array<string>;
2243
+ /**
2244
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2245
+ */
3063
2246
  custom_fields?: {
3064
2247
  [key: string]: string;
3065
2248
  };
@@ -3070,7 +2253,7 @@ export declare namespace ContractAmendParams {
3070
2253
  /**
3071
2254
  * Optional configuration for credit hierarchy access control
3072
2255
  */
3073
- hierarchy_configuration?: Credit.HierarchyConfiguration;
2256
+ hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
3074
2257
  /**
3075
2258
  * displayed on invoices
3076
2259
  */
@@ -3091,7 +2274,7 @@ export declare namespace ContractAmendParams {
3091
2274
  * specifiers to contribute to a commit's or credit's drawdown. This field cannot
3092
2275
  * be used together with `applicable_product_ids` or `applicable_product_tags`.
3093
2276
  */
3094
- specifiers?: Array<Credit.Specifier>;
2277
+ specifiers?: Array<Shared.CommitSpecifierInput>;
3095
2278
  }
3096
2279
  namespace Credit {
3097
2280
  /**
@@ -3117,41 +2300,6 @@ export declare namespace ContractAmendParams {
3117
2300
  starting_at: string;
3118
2301
  }
3119
2302
  }
3120
- /**
3121
- * Optional configuration for credit hierarchy access control
3122
- */
3123
- interface HierarchyConfiguration {
3124
- child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
3125
- }
3126
- namespace HierarchyConfiguration {
3127
- interface CommitHierarchyChildAccessAll {
3128
- type: 'ALL';
3129
- }
3130
- interface CommitHierarchyChildAccessNone {
3131
- type: 'NONE';
3132
- }
3133
- interface CommitHierarchyChildAccessContractIDs {
3134
- contract_ids: Array<string>;
3135
- type: 'CONTRACT_IDS';
3136
- }
3137
- }
3138
- interface Specifier {
3139
- presentation_group_values?: {
3140
- [key: string]: string;
3141
- };
3142
- pricing_group_values?: {
3143
- [key: string]: string;
3144
- };
3145
- /**
3146
- * If provided, the specifier will only apply to the product with the specified ID.
3147
- */
3148
- product_id?: string;
3149
- /**
3150
- * If provided, the specifier will only apply to products with all the specified
3151
- * tags.
3152
- */
3153
- product_tags?: Array<string>;
3154
- }
3155
2303
  }
3156
2304
  interface Discount {
3157
2305
  product_id: string;
@@ -3159,6 +2307,9 @@ export declare namespace ContractAmendParams {
3159
2307
  * Must provide either schedule_items or recurring_schedule.
3160
2308
  */
3161
2309
  schedule: Discount.Schedule;
2310
+ /**
2311
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2312
+ */
3162
2313
  custom_fields?: {
3163
2314
  [key: string]: string;
3164
2315
  };
@@ -3180,6 +2331,11 @@ export declare namespace ContractAmendParams {
3180
2331
  * Defaults to USD (cents) if not passed.
3181
2332
  */
3182
2333
  credit_type_id?: string;
2334
+ /**
2335
+ * This field is only applicable to commit invoice schedules. If true, this
2336
+ * schedule will not generate an invoice.
2337
+ */
2338
+ do_not_invoice?: boolean;
3183
2339
  /**
3184
2340
  * Enter the unit price and quantity for the charge or instead only send the
3185
2341
  * amount. If amount is sent, the unit price is assumed to be the amount and
@@ -3320,8 +2476,8 @@ export declare namespace ContractAmendParams {
3320
2476
  billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
3321
2477
  /**
3322
2478
  * Can only be used for commit specific overrides. Must be used in conjunction with
3323
- * one of product_id, product_tags, pricing_group_values, or
3324
- * presentation_group_values. If provided, the override will only apply to the
2479
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
2480
+ * `presentation_group_values`. If provided, the override will only apply to the
3325
2481
  * specified commits. If not provided, the override will apply to all commits.
3326
2482
  */
3327
2483
  commit_ids?: Array<string>;
@@ -3350,16 +2506,16 @@ export declare namespace ContractAmendParams {
3350
2506
  product_tags?: Array<string>;
3351
2507
  /**
3352
2508
  * Can only be used for commit specific overrides. Must be used in conjunction with
3353
- * one of product_id, product_tags, pricing_group_values, or
3354
- * presentation_group_values. If provided, the override will only apply to commits
3355
- * created by the specified recurring commit ids.
2509
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
2510
+ * `presentation_group_values`. If provided, the override will only apply to
2511
+ * commits created by the specified recurring commit ids.
3356
2512
  */
3357
2513
  recurring_commit_ids?: Array<string>;
3358
2514
  /**
3359
2515
  * Can only be used for commit specific overrides. Must be used in conjunction with
3360
- * one of product_id, product_tags, pricing_group_values, or
3361
- * presentation_group_values. If provided, the override will only apply to credits
3362
- * created by the specified recurring credit ids.
2516
+ * one of `product_id`, `product_tags`, `pricing_group_values`, or
2517
+ * `presentation_group_values`. If provided, the override will only apply to
2518
+ * credits created by the specified recurring credit ids.
3363
2519
  */
3364
2520
  recurring_credit_ids?: Array<string>;
3365
2521
  }
@@ -3416,6 +2572,9 @@ export declare namespace ContractAmendParams {
3416
2572
  * amount and must be specified.
3417
2573
  */
3418
2574
  unit_price: number;
2575
+ /**
2576
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2577
+ */
3419
2578
  custom_fields?: {
3420
2579
  [key: string]: string;
3421
2580
  };
@@ -3463,6 +2622,12 @@ export declare namespace ContractAmendParams {
3463
2622
  * Must provide either schedule_items or recurring_schedule.
3464
2623
  */
3465
2624
  schedule: ScheduledCharge.Schedule;
2625
+ /**
2626
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2627
+ */
2628
+ custom_fields?: {
2629
+ [key: string]: string;
2630
+ };
3466
2631
  /**
3467
2632
  * displayed on invoices
3468
2633
  */
@@ -3481,6 +2646,11 @@ export declare namespace ContractAmendParams {
3481
2646
  * Defaults to USD (cents) if not passed.
3482
2647
  */
3483
2648
  credit_type_id?: string;
2649
+ /**
2650
+ * This field is only applicable to commit invoice schedules. If true, this
2651
+ * schedule will not generate an invoice.
2652
+ */
2653
+ do_not_invoice?: boolean;
3484
2654
  /**
3485
2655
  * Enter the unit price and quantity for the charge or instead only send the
3486
2656
  * amount. If amount is sent, the unit price is assumed to be the amount and
@@ -3588,6 +2758,9 @@ export declare namespace ContractCreateHistoricalInvoicesParams {
3588
2758
  */
3589
2759
  billable_status?: 'billable' | 'unbillable';
3590
2760
  breakdown_granularity?: 'HOUR' | 'DAY';
2761
+ /**
2762
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2763
+ */
3591
2764
  custom_fields?: {
3592
2765
  [key: string]: string;
3593
2766
  };
@@ -3615,7 +2788,7 @@ export declare namespace ContractCreateHistoricalInvoicesParams {
3615
2788
  }
3616
2789
  }
3617
2790
  }
3618
- export interface ContractListBalancesParams {
2791
+ export interface ContractListBalancesParams extends BodyCursorPageParams {
3619
2792
  customer_id: string;
3620
2793
  id?: string;
3621
2794
  /**
@@ -3644,14 +2817,6 @@ export interface ContractListBalancesParams {
3644
2817
  * slower.
3645
2818
  */
3646
2819
  include_ledgers?: boolean;
3647
- /**
3648
- * The maximum number of commits to return. Defaults to 25.
3649
- */
3650
- limit?: number;
3651
- /**
3652
- * The next page token from a previous response.
3653
- */
3654
- next_page?: string;
3655
2820
  /**
3656
2821
  * Include only balances that have any access on or after the provided date
3657
2822
  */
@@ -3811,9 +2976,9 @@ export interface ContractUpdateEndDateParams {
3811
2976
  ending_before?: string;
3812
2977
  }
3813
2978
  export declare namespace Contracts {
3814
- 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 ContractListBalancesResponse as ContractListBalancesResponse, type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse, type ContractRetrieveSubscriptionQuantityHistoryResponse as ContractRetrieveSubscriptionQuantityHistoryResponse, type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse, 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 ContractListBalancesParams as ContractListBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractRetrieveSubscriptionQuantityHistoryParams as ContractRetrieveSubscriptionQuantityHistoryParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
3815
- 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, ProductListResponsesCursorPage as ProductListResponsesCursorPage, type ProductCreateParams as ProductCreateParams, type ProductRetrieveParams as ProductRetrieveParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, type ProductArchiveParams as ProductArchiveParams, };
3816
- 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, 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, };
2979
+ 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 ContractListBalancesResponse as ContractListBalancesResponse, 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 ContractListBalancesParams as ContractListBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractRetrieveSubscriptionQuantityHistoryParams as ContractRetrieveSubscriptionQuantityHistoryParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
2980
+ 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, };
2981
+ 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, };
3817
2982
  export { NamedSchedules as NamedSchedules, type NamedScheduleRetrieveResponse as NamedScheduleRetrieveResponse, type NamedScheduleRetrieveParams as NamedScheduleRetrieveParams, type NamedScheduleUpdateParams as NamedScheduleUpdateParams, };
3818
2983
  }
3819
2984
  //# sourceMappingURL=contracts.d.ts.map