@metronome/sdk 0.3.0 → 2.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 (817) hide show
  1. package/CHANGELOG.md +113 -28
  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 +46 -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 +113 -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 +2363 -0
  290. package/resources/shared.d.mts.map +1 -0
  291. package/resources/shared.d.ts +1470 -465
  292. package/resources/shared.d.ts.map +1 -1
  293. package/resources/v1/alerts.d.mts +207 -0
  294. package/resources/v1/alerts.d.mts.map +1 -0
  295. package/resources/v1/alerts.d.ts +107 -32
  296. package/resources/v1/alerts.d.ts.map +1 -1
  297. package/resources/v1/alerts.js +74 -3
  298. package/resources/v1/alerts.js.map +1 -1
  299. package/resources/v1/alerts.mjs +74 -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 +3006 -0
  318. package/resources/v1/contracts/contracts.d.mts.map +1 -0
  319. package/resources/v1/contracts/contracts.d.ts +428 -1299
  320. package/resources/v1/contracts/contracts.d.ts.map +1 -1
  321. package/resources/v1/contracts/contracts.js +269 -50
  322. package/resources/v1/contracts/contracts.js.map +1 -1
  323. package/resources/v1/contracts/contracts.mjs +267 -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 +44 -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 +309 -0
  416. package/resources/v1/customers/alerts.d.mts.map +1 -0
  417. package/resources/v1/customers/alerts.d.ts +176 -50
  418. package/resources/v1/customers/alerts.d.ts.map +1 -1
  419. package/resources/v1/customers/alerts.js +131 -10
  420. package/resources/v1/customers/alerts.js.map +1 -1
  421. package/resources/v1/customers/alerts.mjs +131 -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 +139 -47
  434. package/resources/v1/customers/commits.d.ts.map +1 -1
  435. package/resources/v1/customers/commits.js +131 -12
  436. package/resources/v1/customers/commits.js.map +1 -1
  437. package/resources/v1/customers/commits.mjs +131 -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 +819 -0
  448. package/resources/v1/customers/customers.d.mts.map +1 -0
  449. package/resources/v1/customers/customers.d.ts +319 -55
  450. package/resources/v1/customers/customers.d.ts.map +1 -1
  451. package/resources/v1/customers/customers.js +220 -76
  452. package/resources/v1/customers/customers.js.map +1 -1
  453. package/resources/v1/customers/customers.mjs +213 -44
  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 +825 -0
  464. package/resources/v1/customers/invoices.d.mts.map +1 -0
  465. package/resources/v1/customers/invoices.d.ts +309 -25
  466. package/resources/v1/customers/invoices.d.ts.map +1 -1
  467. package/resources/v1/customers/invoices.js +180 -22
  468. package/resources/v1/customers/invoices.js.map +1 -1
  469. package/resources/v1/customers/invoices.mjs +179 -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 +16 -0
  501. package/resources/v1/index.d.mts.map +1 -0
  502. package/resources/v1/index.d.ts +10 -9
  503. package/resources/v1/index.d.ts.map +1 -1
  504. package/resources/v1/index.js +3 -12
  505. package/resources/v1/index.js.map +1 -1
  506. package/resources/v1/index.mjs +8 -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/payments.d.mts +116 -0
  517. package/resources/v1/payments.d.mts.map +1 -0
  518. package/resources/v1/payments.d.ts +116 -0
  519. package/resources/v1/payments.d.ts.map +1 -0
  520. package/resources/v1/payments.js +71 -0
  521. package/resources/v1/payments.js.map +1 -0
  522. package/resources/v1/payments.mjs +67 -0
  523. package/resources/v1/payments.mjs.map +1 -0
  524. package/resources/v1/plans.d.mts +240 -0
  525. package/resources/v1/plans.d.mts.map +1 -0
  526. package/resources/v1/plans.d.ts +24 -15
  527. package/resources/v1/plans.d.ts.map +1 -1
  528. package/resources/v1/plans.js +19 -26
  529. package/resources/v1/plans.js.map +1 -1
  530. package/resources/v1/plans.mjs +18 -22
  531. package/resources/v1/plans.mjs.map +1 -1
  532. package/resources/v1/pricing-units.d.mts +34 -0
  533. package/resources/v1/pricing-units.d.mts.map +1 -0
  534. package/resources/v1/pricing-units.d.ts +12 -9
  535. package/resources/v1/pricing-units.d.ts.map +1 -1
  536. package/resources/v1/pricing-units.js +20 -12
  537. package/resources/v1/pricing-units.js.map +1 -1
  538. package/resources/v1/pricing-units.mjs +19 -10
  539. package/resources/v1/pricing-units.mjs.map +1 -1
  540. package/resources/v1/services.d.mts +33 -0
  541. package/resources/v1/services.d.mts.map +1 -0
  542. package/resources/v1/services.d.ts +10 -7
  543. package/resources/v1/services.d.ts.map +1 -1
  544. package/resources/v1/services.js +7 -5
  545. package/resources/v1/services.js.map +1 -1
  546. package/resources/v1/services.mjs +7 -5
  547. package/resources/v1/services.mjs.map +1 -1
  548. package/resources/v1/usage.d.mts +490 -0
  549. package/resources/v1/usage.d.mts.map +1 -0
  550. package/resources/v1/usage.d.ts +223 -58
  551. package/resources/v1/usage.d.ts.map +1 -1
  552. package/resources/v1/usage.js +214 -26
  553. package/resources/v1/usage.js.map +1 -1
  554. package/resources/v1/usage.mjs +213 -24
  555. package/resources/v1/usage.mjs.map +1 -1
  556. package/resources/v1/v1.d.mts +62 -0
  557. package/resources/v1/v1.d.mts.map +1 -0
  558. package/resources/v1/v1.d.ts +19 -15
  559. package/resources/v1/v1.d.ts.map +1 -1
  560. package/resources/v1/v1.js +19 -48
  561. package/resources/v1/v1.js.map +1 -1
  562. package/resources/v1/v1.mjs +12 -19
  563. package/resources/v1/v1.mjs.map +1 -1
  564. package/resources/v1.d.mts +2 -0
  565. package/resources/v1.d.mts.map +1 -0
  566. package/resources/v1.d.ts.map +1 -1
  567. package/resources/v1.js +2 -15
  568. package/resources/v1.js.map +1 -1
  569. package/resources/v2/contracts.d.mts +2900 -0
  570. package/resources/v2/contracts.d.mts.map +1 -0
  571. package/resources/v2/contracts.d.ts +399 -3830
  572. package/resources/v2/contracts.d.ts.map +1 -1
  573. package/resources/v2/contracts.js +102 -12
  574. package/resources/v2/contracts.js.map +1 -1
  575. package/resources/v2/contracts.mjs +102 -12
  576. package/resources/v2/contracts.mjs.map +1 -1
  577. package/resources/v2/index.d.mts +3 -0
  578. package/resources/v2/index.d.mts.map +1 -0
  579. package/resources/v2/index.d.ts.map +1 -1
  580. package/resources/v2/v2.d.mts +10 -0
  581. package/resources/v2/v2.d.mts.map +1 -0
  582. package/resources/v2/v2.d.ts +1 -1
  583. package/resources/v2/v2.d.ts.map +1 -1
  584. package/resources/v2/v2.js +3 -25
  585. package/resources/v2/v2.js.map +1 -1
  586. package/resources/v2/v2.mjs +1 -1
  587. package/resources/v2.d.mts +2 -0
  588. package/resources/v2.d.mts.map +1 -0
  589. package/resources/v2.d.ts.map +1 -1
  590. package/resources/v2.js +2 -15
  591. package/resources/v2.js.map +1 -1
  592. package/resources/webhooks.d.mts +22 -0
  593. package/resources/webhooks.d.mts.map +1 -0
  594. package/resources/webhooks.d.ts +1 -1
  595. package/resources/webhooks.d.ts.map +1 -1
  596. package/resources/webhooks.js +3 -3
  597. package/resources/webhooks.js.map +1 -1
  598. package/resources/webhooks.mjs +1 -1
  599. package/resources/webhooks.mjs.map +1 -1
  600. package/resources.d.mts +2 -0
  601. package/resources.d.mts.map +1 -0
  602. package/resources.d.ts.map +1 -1
  603. package/resources.js +2 -15
  604. package/resources.js.map +1 -1
  605. package/src/api-promise.ts +2 -0
  606. package/src/client.ts +809 -0
  607. package/src/core/README.md +3 -0
  608. package/src/core/api-promise.ts +92 -0
  609. package/src/core/error.ts +130 -0
  610. package/src/core/pagination.ts +319 -0
  611. package/src/core/resource.ts +11 -0
  612. package/src/core/uploads.ts +2 -0
  613. package/src/error.ts +2 -130
  614. package/src/index.ts +6 -221
  615. package/src/internal/README.md +3 -0
  616. package/src/internal/builtin-types.ts +93 -0
  617. package/src/internal/detect-platform.ts +196 -0
  618. package/src/internal/errors.ts +33 -0
  619. package/src/internal/headers.ts +144 -0
  620. package/src/internal/parse.ts +50 -0
  621. package/src/internal/qs/formats.ts +3 -2
  622. package/src/internal/qs/index.ts +3 -3
  623. package/src/internal/qs/stringify.ts +18 -21
  624. package/src/internal/qs/utils.ts +16 -16
  625. package/src/internal/request-options.ts +91 -0
  626. package/src/internal/shim-types.ts +26 -0
  627. package/src/internal/shims.ts +107 -0
  628. package/src/internal/to-file.ts +154 -0
  629. package/src/internal/types.ts +95 -0
  630. package/src/internal/uploads.ts +187 -0
  631. package/src/internal/utils/base64.ts +40 -0
  632. package/src/internal/utils/bytes.ts +32 -0
  633. package/src/internal/utils/env.ts +18 -0
  634. package/src/internal/utils/log.ts +126 -0
  635. package/src/internal/utils/path.ts +88 -0
  636. package/src/internal/utils/sleep.ts +3 -0
  637. package/src/internal/utils/uuid.ts +17 -0
  638. package/src/internal/utils/values.ts +105 -0
  639. package/src/internal/utils.ts +8 -0
  640. package/src/pagination.ts +2 -82
  641. package/src/resource.ts +2 -11
  642. package/src/resources/index.ts +4 -4
  643. package/src/resources/shared.ts +1921 -506
  644. package/src/resources/v1/alerts.ts +108 -33
  645. package/src/resources/v1/audit-logs.ts +48 -26
  646. package/src/resources/v1/billable-metrics.ts +79 -34
  647. package/src/resources/v1/contracts/contracts.ts +490 -1632
  648. package/src/resources/v1/contracts/index.ts +7 -6
  649. package/src/resources/v1/contracts/named-schedules.ts +8 -6
  650. package/src/resources/v1/contracts/products.ts +50 -38
  651. package/src/resources/v1/contracts/rate-cards/index.ts +6 -6
  652. package/src/resources/v1/contracts/rate-cards/named-schedules.ts +8 -6
  653. package/src/resources/v1/contracts/rate-cards/product-orders.ts +13 -10
  654. package/src/resources/v1/contracts/rate-cards/rate-cards.ts +145 -72
  655. package/src/resources/v1/contracts/rate-cards/rates.ts +28 -98
  656. package/src/resources/v1/contracts/rate-cards.ts +1 -1
  657. package/src/resources/v1/contracts.ts +1 -1
  658. package/src/resources/v1/credit-grants.ts +100 -112
  659. package/src/resources/v1/custom-fields.ts +106 -74
  660. package/src/resources/v1/customers/alerts.ts +195 -55
  661. package/src/resources/v1/customers/billing-config.ts +27 -13
  662. package/src/resources/v1/customers/commits.ts +146 -54
  663. package/src/resources/v1/customers/credits.ts +131 -53
  664. package/src/resources/v1/customers/customers.ts +407 -115
  665. package/src/resources/v1/customers/index.ts +20 -18
  666. package/src/resources/v1/customers/invoices.ts +343 -42
  667. package/src/resources/v1/customers/named-schedules.ts +8 -6
  668. package/src/resources/v1/customers/plans.ts +24 -22
  669. package/src/resources/v1/customers.ts +1 -1
  670. package/src/resources/v1/dashboards.ts +34 -7
  671. package/src/resources/v1/index.ts +43 -25
  672. package/src/resources/v1/invoices.ts +28 -9
  673. package/src/resources/v1/payments.ts +170 -0
  674. package/src/resources/v1/plans.ts +42 -43
  675. package/src/resources/v1/pricing-units.ts +15 -23
  676. package/src/resources/v1/services.ts +10 -7
  677. package/src/resources/v1/usage.ts +247 -73
  678. package/src/resources/v1/v1.ts +78 -49
  679. package/src/resources/v1.ts +1 -1
  680. package/src/resources/v2/contracts.ts +469 -4930
  681. package/src/resources/v2/index.ts +2 -2
  682. package/src/resources/v2/v2.ts +3 -3
  683. package/src/resources/v2.ts +1 -1
  684. package/src/resources/webhooks.ts +2 -2
  685. package/src/resources.ts +1 -1
  686. package/src/tsconfig.json +2 -2
  687. package/src/uploads.ts +2 -255
  688. package/src/version.ts +1 -1
  689. package/uploads.d.mts +2 -0
  690. package/uploads.d.mts.map +1 -0
  691. package/uploads.d.ts +1 -74
  692. package/uploads.d.ts.map +1 -1
  693. package/uploads.js +3 -168
  694. package/uploads.js.map +1 -1
  695. package/uploads.mjs +1 -157
  696. package/uploads.mjs.map +1 -1
  697. package/version.d.mts +2 -0
  698. package/version.d.mts.map +1 -0
  699. package/version.d.ts +1 -1
  700. package/version.js +1 -1
  701. package/version.mjs +1 -1
  702. package/_shims/MultipartBody.d.ts +0 -9
  703. package/_shims/MultipartBody.d.ts.map +0 -1
  704. package/_shims/MultipartBody.js +0 -16
  705. package/_shims/MultipartBody.js.map +0 -1
  706. package/_shims/MultipartBody.mjs +0 -12
  707. package/_shims/MultipartBody.mjs.map +0 -1
  708. package/_shims/README.md +0 -46
  709. package/_shims/auto/runtime-bun.d.ts +0 -5
  710. package/_shims/auto/runtime-bun.d.ts.map +0 -1
  711. package/_shims/auto/runtime-bun.js +0 -21
  712. package/_shims/auto/runtime-bun.js.map +0 -1
  713. package/_shims/auto/runtime-bun.mjs +0 -2
  714. package/_shims/auto/runtime-bun.mjs.map +0 -1
  715. package/_shims/auto/runtime-node.d.ts +0 -5
  716. package/_shims/auto/runtime-node.d.ts.map +0 -1
  717. package/_shims/auto/runtime-node.js +0 -21
  718. package/_shims/auto/runtime-node.js.map +0 -1
  719. package/_shims/auto/runtime-node.mjs +0 -2
  720. package/_shims/auto/runtime-node.mjs.map +0 -1
  721. package/_shims/auto/runtime.d.ts +0 -5
  722. package/_shims/auto/runtime.d.ts.map +0 -1
  723. package/_shims/auto/runtime.js +0 -21
  724. package/_shims/auto/runtime.js.map +0 -1
  725. package/_shims/auto/runtime.mjs +0 -2
  726. package/_shims/auto/runtime.mjs.map +0 -1
  727. package/_shims/auto/types-node.d.ts +0 -5
  728. package/_shims/auto/types-node.d.ts.map +0 -1
  729. package/_shims/auto/types-node.js +0 -21
  730. package/_shims/auto/types-node.js.map +0 -1
  731. package/_shims/auto/types-node.mjs +0 -2
  732. package/_shims/auto/types-node.mjs.map +0 -1
  733. package/_shims/auto/types.d.ts +0 -101
  734. package/_shims/auto/types.js +0 -3
  735. package/_shims/auto/types.mjs +0 -3
  736. package/_shims/bun-runtime.d.ts +0 -6
  737. package/_shims/bun-runtime.d.ts.map +0 -1
  738. package/_shims/bun-runtime.js +0 -14
  739. package/_shims/bun-runtime.js.map +0 -1
  740. package/_shims/bun-runtime.mjs +0 -10
  741. package/_shims/bun-runtime.mjs.map +0 -1
  742. package/_shims/index.d.ts +0 -83
  743. package/_shims/index.js +0 -17
  744. package/_shims/index.mjs +0 -11
  745. package/_shims/manual-types.d.ts +0 -12
  746. package/_shims/manual-types.js +0 -3
  747. package/_shims/manual-types.mjs +0 -3
  748. package/_shims/node-runtime.d.ts +0 -3
  749. package/_shims/node-runtime.d.ts.map +0 -1
  750. package/_shims/node-runtime.js +0 -89
  751. package/_shims/node-runtime.js.map +0 -1
  752. package/_shims/node-runtime.mjs +0 -56
  753. package/_shims/node-runtime.mjs.map +0 -1
  754. package/_shims/node-types.d.ts +0 -42
  755. package/_shims/node-types.js +0 -3
  756. package/_shims/node-types.mjs +0 -3
  757. package/_shims/registry.d.ts +0 -37
  758. package/_shims/registry.d.ts.map +0 -1
  759. package/_shims/registry.js +0 -41
  760. package/_shims/registry.js.map +0 -1
  761. package/_shims/registry.mjs +0 -37
  762. package/_shims/registry.mjs.map +0 -1
  763. package/_shims/web-runtime.d.ts +0 -5
  764. package/_shims/web-runtime.d.ts.map +0 -1
  765. package/_shims/web-runtime.js +0 -78
  766. package/_shims/web-runtime.js.map +0 -1
  767. package/_shims/web-runtime.mjs +0 -71
  768. package/_shims/web-runtime.mjs.map +0 -1
  769. package/_shims/web-types.d.ts +0 -83
  770. package/_shims/web-types.js +0 -3
  771. package/_shims/web-types.mjs +0 -3
  772. package/core.d.ts +0 -255
  773. package/core.d.ts.map +0 -1
  774. package/core.js +0 -924
  775. package/core.js.map +0 -1
  776. package/core.mjs +0 -892
  777. package/core.mjs.map +0 -1
  778. package/shims/node.d.ts +0 -30
  779. package/shims/node.d.ts.map +0 -1
  780. package/shims/node.js +0 -31
  781. package/shims/node.js.map +0 -1
  782. package/shims/node.mjs +0 -5
  783. package/shims/node.mjs.map +0 -1
  784. package/shims/web.d.ts +0 -26
  785. package/shims/web.d.ts.map +0 -1
  786. package/shims/web.js +0 -31
  787. package/shims/web.js.map +0 -1
  788. package/shims/web.mjs +0 -5
  789. package/shims/web.mjs.map +0 -1
  790. package/src/_shims/MultipartBody.ts +0 -9
  791. package/src/_shims/README.md +0 -46
  792. package/src/_shims/auto/runtime-bun.ts +0 -4
  793. package/src/_shims/auto/runtime-node.ts +0 -4
  794. package/src/_shims/auto/runtime.ts +0 -4
  795. package/src/_shims/auto/types-node.ts +0 -4
  796. package/src/_shims/auto/types.d.ts +0 -101
  797. package/src/_shims/auto/types.js +0 -3
  798. package/src/_shims/auto/types.mjs +0 -3
  799. package/src/_shims/bun-runtime.ts +0 -14
  800. package/src/_shims/index.d.ts +0 -83
  801. package/src/_shims/index.js +0 -17
  802. package/src/_shims/index.mjs +0 -11
  803. package/src/_shims/manual-types.d.ts +0 -12
  804. package/src/_shims/manual-types.js +0 -3
  805. package/src/_shims/manual-types.mjs +0 -3
  806. package/src/_shims/node-runtime.ts +0 -81
  807. package/src/_shims/node-types.d.ts +0 -42
  808. package/src/_shims/node-types.js +0 -3
  809. package/src/_shims/node-types.mjs +0 -3
  810. package/src/_shims/registry.ts +0 -67
  811. package/src/_shims/web-runtime.ts +0 -103
  812. package/src/_shims/web-types.d.ts +0 -83
  813. package/src/_shims/web-types.js +0 -3
  814. package/src/_shims/web-types.mjs +0 -3
  815. package/src/core.ts +0 -1236
  816. package/src/shims/node.ts +0 -50
  817. package/src/shims/web.ts +0 -50
@@ -0,0 +1,819 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import * as Shared from "../../shared.mjs";
3
+ import * as AlertsAPI from "./alerts.mjs";
4
+ import { AlertListParams, AlertResetParams, AlertRetrieveParams, AlertRetrieveResponse, Alerts, CustomerAlert, CustomerAlertsCursorPageWithoutLimit } from "./alerts.mjs";
5
+ import * as BillingConfigAPI from "./billing-config.mjs";
6
+ import { BillingConfig as BillingConfigAPIBillingConfig, BillingConfigCreateParams, BillingConfigDeleteParams, BillingConfigRetrieveParams, BillingConfigRetrieveResponse } from "./billing-config.mjs";
7
+ import * as CommitsAPI from "./commits.mjs";
8
+ import { CommitCreateParams, CommitCreateResponse, CommitListParams, CommitUpdateEndDateParams, CommitUpdateEndDateResponse, Commits } from "./commits.mjs";
9
+ import * as CreditsAPI from "./credits.mjs";
10
+ import { CreditCreateParams, CreditCreateResponse, CreditListParams, CreditUpdateEndDateParams, CreditUpdateEndDateResponse, Credits } from "./credits.mjs";
11
+ import * as InvoicesAPI from "./invoices.mjs";
12
+ import { Invoice, InvoiceAddChargeParams, InvoiceAddChargeResponse, InvoiceListBreakdownsParams, InvoiceListBreakdownsResponse, InvoiceListBreakdownsResponsesCursorPage, InvoiceListParams, InvoiceRetrieveParams, InvoiceRetrievePdfParams, InvoiceRetrieveResponse, Invoices, InvoicesCursorPage } from "./invoices.mjs";
13
+ import * as NamedSchedulesAPI from "./named-schedules.mjs";
14
+ import { NamedScheduleRetrieveParams, NamedScheduleRetrieveResponse, NamedScheduleUpdateParams, NamedSchedules } from "./named-schedules.mjs";
15
+ import * as PlansAPI from "./plans.mjs";
16
+ import { PlanAddParams, PlanAddResponse, PlanEndParams, PlanEndResponse, PlanListParams, PlanListPriceAdjustmentsParams, PlanListPriceAdjustmentsResponse, PlanListPriceAdjustmentsResponsesCursorPage, PlanListResponse, PlanListResponsesCursorPage, Plans } from "./plans.mjs";
17
+ import { APIPromise } from "../../../core/api-promise.mjs";
18
+ import { CursorPage, type CursorPageParams, PagePromise } from "../../../core/pagination.mjs";
19
+ import { RequestOptions } from "../../../internal/request-options.mjs";
20
+ export declare class Customers extends APIResource {
21
+ alerts: AlertsAPI.Alerts;
22
+ plans: PlansAPI.Plans;
23
+ invoices: InvoicesAPI.Invoices;
24
+ billingConfig: BillingConfigAPI.BillingConfig;
25
+ commits: CommitsAPI.Commits;
26
+ credits: CreditsAPI.Credits;
27
+ namedSchedules: NamedSchedulesAPI.NamedSchedules;
28
+ /**
29
+ * Create a new customer in Metronome and optionally the billing configuration
30
+ * (recommended) which dictates where invoices for the customer will be sent or
31
+ * where payment will be collected.
32
+ *
33
+ * ### Use this endpoint to:
34
+ *
35
+ * Execute your customer provisioning workflows for either PLG motions, where
36
+ * customers originate in your platform, or SLG motions, where customers originate
37
+ * in your sales system.
38
+ *
39
+ * ### Key response fields:
40
+ *
41
+ * This end-point returns the `customer_id` created by the request. This id can be
42
+ * used to fetch relevant billing configurations and create contracts.
43
+ *
44
+ * ### Example workflow:
45
+ *
46
+ * - Generally, Metronome recommends first creating the customer in the downstream
47
+ * payment / ERP system when payment method is collected and then creating the
48
+ * customer in Metronome using the response (i.e. `customer_id`) from the
49
+ * downstream system. If you do not create a billing configuration on customer
50
+ * creation, you can add it later.
51
+ * - Once a customer is created, you can then create a contract for the customer.
52
+ * In the contract creation process, you will need to add the customer billing
53
+ * configuration to the contract to ensure Metronome invoices the customer
54
+ * correctly. This is because a customer can have multiple configurations.
55
+ * - As part of the customer creation process, set the ingest alias for the
56
+ * customer which will ensure usage is accurately mapped to the customer. Ingest
57
+ * aliases can be added or changed after the creation process as well.
58
+ *
59
+ * ### Usage guidelines:
60
+ *
61
+ * For details on different billing configurations for different systems, review
62
+ * the `/setCustomerBillingConfiguration` end-point.
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * const customer = await client.v1.customers.create({
67
+ * name: 'Example, Inc.',
68
+ * customer_billing_provider_configurations: [
69
+ * {
70
+ * billing_provider: 'stripe',
71
+ * delivery_method: 'direct_to_billing_provider',
72
+ * configuration: {
73
+ * stripe_customer_id: 'cus_123',
74
+ * stripe_collection_method: 'charge_automatically',
75
+ * },
76
+ * },
77
+ * ],
78
+ * ingest_aliases: ['team@example.com'],
79
+ * });
80
+ * ```
81
+ */
82
+ create(body: CustomerCreateParams, options?: RequestOptions): APIPromise<CustomerCreateResponse>;
83
+ /**
84
+ * Get detailed information for a specific customer by their Metronome ID. Returns
85
+ * customer profile data including name, creation date, ingest aliases,
86
+ * configuration settings, and custom fields. Use this endpoint to fetch complete
87
+ * customer details for billing operations or account management.
88
+ *
89
+ * Note: If searching for a customer billing configuration, use the
90
+ * `/getCustomerBillingConfigurations` endpoint.
91
+ *
92
+ * @example
93
+ * ```ts
94
+ * const customer = await client.v1.customers.retrieve({
95
+ * customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
96
+ * });
97
+ * ```
98
+ */
99
+ retrieve(params: CustomerRetrieveParams, options?: RequestOptions): APIPromise<CustomerRetrieveResponse>;
100
+ /**
101
+ * Gets a paginated list of all customers in your Metronome account. Use this
102
+ * endpoint to browse your customer base, implement customer search functionality,
103
+ * or sync customer data with external systems. Returns customer details including
104
+ * IDs, names, and configuration settings. Supports filtering and pagination
105
+ * parameters for efficient data retrieval.
106
+ *
107
+ * @example
108
+ * ```ts
109
+ * // Automatically fetches more pages as needed.
110
+ * for await (const customerDetail of client.v1.customers.list()) {
111
+ * // ...
112
+ * }
113
+ * ```
114
+ */
115
+ list(query?: CustomerListParams | null | undefined, options?: RequestOptions): PagePromise<CustomerDetailsCursorPage, CustomerDetail>;
116
+ /**
117
+ * Use this endpoint to archive a customer while preserving auditability. Archiving
118
+ * a customer will automatically archive all contracts as of the current date and
119
+ * void all corresponding invoices. Use this endpoint if a customer is onboarded by
120
+ * mistake.
121
+ *
122
+ * ### Usage guidelines:
123
+ *
124
+ * - Once a customer is archived, it cannot be unarchived.
125
+ * - Archived customers can still be viewed through the API or the UI for audit
126
+ * purposes.
127
+ * - Ingest aliases remain idempotent for archived customers. In order to reuse an
128
+ * ingest alias, first remove the ingest alias from the customer prior to
129
+ * archiving.
130
+ * - Any notifications associated with the customer will no longer be triggered.
131
+ *
132
+ * @example
133
+ * ```ts
134
+ * const response = await client.v1.customers.archive({
135
+ * id: '8deed800-1b7a-495d-a207-6c52bac54dc9',
136
+ * });
137
+ * ```
138
+ */
139
+ archive(body: CustomerArchiveParams, options?: RequestOptions): APIPromise<CustomerArchiveResponse>;
140
+ /**
141
+ * Get all billable metrics available for a specific customer. Supports pagination
142
+ * and filtering by current plan status or archived metrics. Use this endpoint to
143
+ * see which metrics are being tracked for billing calculations for a given
144
+ * customer.
145
+ *
146
+ * @example
147
+ * ```ts
148
+ * // Automatically fetches more pages as needed.
149
+ * for await (const customerListBillableMetricsResponse of client.v1.customers.listBillableMetrics(
150
+ * { customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' },
151
+ * )) {
152
+ * // ...
153
+ * }
154
+ * ```
155
+ */
156
+ listBillableMetrics(params: CustomerListBillableMetricsParams, options?: RequestOptions): PagePromise<CustomerListBillableMetricsResponsesCursorPage, CustomerListBillableMetricsResponse>;
157
+ /**
158
+ * Fetch daily pending costs for the specified customer, broken down by credit type
159
+ * and line items. Note: this is not supported for customers whose plan includes a
160
+ * UNIQUE-type billable metric.
161
+ *
162
+ * @example
163
+ * ```ts
164
+ * // Automatically fetches more pages as needed.
165
+ * for await (const customerListCostsResponse of client.v1.customers.listCosts(
166
+ * {
167
+ * customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
168
+ * ending_before: '2019-12-27T18:11:19.117Z',
169
+ * starting_on: '2019-12-27T18:11:19.117Z',
170
+ * },
171
+ * )) {
172
+ * // ...
173
+ * }
174
+ * ```
175
+ */
176
+ listCosts(params: CustomerListCostsParams, options?: RequestOptions): PagePromise<CustomerListCostsResponsesCursorPage, CustomerListCostsResponse>;
177
+ /**
178
+ * Preview how a set of events will affect a customer's invoices. Generates draft
179
+ * invoices for a customer using their current contract configuration and the
180
+ * provided events. This is useful for testing how new events will affect the
181
+ * customer's invoices before they are actually processed.
182
+ *
183
+ * @example
184
+ * ```ts
185
+ * const response = await client.v1.customers.previewEvents({
186
+ * customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
187
+ * events: [
188
+ * {
189
+ * event_type: 'heartbeat',
190
+ * timestamp: '2021-01-01T00:00:00Z',
191
+ * properties: { cpu_hours: 100, memory_gb_hours: 200 },
192
+ * },
193
+ * ],
194
+ * });
195
+ * ```
196
+ */
197
+ previewEvents(params: CustomerPreviewEventsParams, options?: RequestOptions): APIPromise<CustomerPreviewEventsResponse>;
198
+ /**
199
+ * Returns all billing configurations previously set for the customer. Use during
200
+ * the contract provisioning process to fetch the
201
+ * `billing_provider_configuration_id` needed to set the contract billing
202
+ * configuration.
203
+ *
204
+ * @example
205
+ * ```ts
206
+ * const response =
207
+ * await client.v1.customers.retrieveBillingConfigurations({
208
+ * customer_id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
209
+ * });
210
+ * ```
211
+ */
212
+ retrieveBillingConfigurations(body: CustomerRetrieveBillingConfigurationsParams, options?: RequestOptions): APIPromise<CustomerRetrieveBillingConfigurationsResponse>;
213
+ /**
214
+ * Create a billing configuration for a customer. Once created, these
215
+ * configurations are available to associate to a contract and dictates which
216
+ * downstream system to collect payment in or send the invoice to. You can create
217
+ * multiple configurations per customer. The configuration formats are distinct for
218
+ * each downstream provider.
219
+ *
220
+ * ### Use this endpoint to:
221
+ *
222
+ * - Add the initial configuration to an existing customer. Once created, the
223
+ * billing configuration can then be associated to the customer's contract.
224
+ * - Add a new configuration to an existing customer. This might be used as part of
225
+ * an upgrade or downgrade workflow where the customer was previously billed
226
+ * through system A (e.g. Stripe) but will now be billed through system B (e.g.
227
+ * AWS). Once created, the new configuration can then be associated to the
228
+ * customer's contract.
229
+ * - Multiple configurations can be added per destination. For example, you can
230
+ * create two Stripe billing configurations for a Metronome customer that each
231
+ * have a distinct `collection_method`.
232
+ *
233
+ * ### Delivery method options:
234
+ *
235
+ * - `direct_to_billing_provider`: Use when Metronome should send invoices directly
236
+ * to the billing provider's API (e.g., Stripe, NetSuite). This is the most
237
+ * common method for automated billing workflows.
238
+ * - `tackle`: Use specifically for AWS Marketplace transactions that require
239
+ * Tackle's co-selling platform for partner attribution and commission tracking.
240
+ * - `aws_sqs`: Use when you want invoice data delivered to an AWS SQS queue for
241
+ * custom processing before sending to your billing system.
242
+ * - `aws_sns`: Use when you want invoice notifications published to an AWS SNS
243
+ * topic for event-driven billing workflows.
244
+ *
245
+ * ### Key response fields:
246
+ *
247
+ * The id for the customer billing configuration. This id can be used to associate
248
+ * the billing configuration to a contract.
249
+ *
250
+ * ### Usage guidelines:
251
+ *
252
+ * Must use the `delivery_method_id` if you have multiple Stripe accounts connected
253
+ * to Metronome.
254
+ *
255
+ * @example
256
+ * ```ts
257
+ * await client.v1.customers.setBillingConfigurations({
258
+ * data: [
259
+ * {
260
+ * customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
261
+ * billing_provider: 'stripe',
262
+ * configuration: { ... },
263
+ * delivery_method: 'direct_to_billing_provider',
264
+ * },
265
+ * {
266
+ * customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
267
+ * billing_provider: 'aws_marketplace',
268
+ * configuration: { ... },
269
+ * delivery_method: 'direct_to_billing_provider',
270
+ * },
271
+ * {
272
+ * customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
273
+ * billing_provider: 'azure_marketplace',
274
+ * configuration: { ... },
275
+ * delivery_method_id: '5b9e3072-415b-4842-94f0-0b6700c8b6be',
276
+ * },
277
+ * {
278
+ * customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
279
+ * billing_provider: 'aws_marketplace',
280
+ * configuration: { ... },
281
+ * delivery_method: 'direct_to_billing_provider',
282
+ * },
283
+ * ],
284
+ * });
285
+ * ```
286
+ */
287
+ setBillingConfigurations(body: CustomerSetBillingConfigurationsParams, options?: RequestOptions): APIPromise<void>;
288
+ /**
289
+ * Sets the ingest aliases for a customer. Use this endpoint to associate a
290
+ * Metronome customer with an internal ID for easier tracking between systems.
291
+ * Ingest aliases can be used in the `customer_id` field when sending usage events
292
+ * to Metronome.
293
+ *
294
+ * ### Usage guidelines:
295
+ *
296
+ * - This call is idempotent and fully replaces the set of ingest aliases for the
297
+ * given customer.
298
+ * - Switching an ingest alias from one customer to another will associate all
299
+ * corresponding usage to the new customer.
300
+ * - Use multiple ingest aliases to model child organizations within a single
301
+ * Metronome customer.
302
+ *
303
+ * @example
304
+ * ```ts
305
+ * await client.v1.customers.setIngestAliases({
306
+ * customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
307
+ * ingest_aliases: ['team@example.com'],
308
+ * });
309
+ * ```
310
+ */
311
+ setIngestAliases(params: CustomerSetIngestAliasesParams, options?: RequestOptions): APIPromise<void>;
312
+ /**
313
+ * Updates the display name for a customer record. Use this to correct customer
314
+ * names, update business names after rebranding, or maintain accurate customer
315
+ * information for invoicing and reporting. Returns the updated customer object
316
+ * with the new name applied immediately across all billing documents and
317
+ * interfaces.
318
+ *
319
+ * @example
320
+ * ```ts
321
+ * const response = await client.v1.customers.setName({
322
+ * customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
323
+ * name: 'Example, Inc.',
324
+ * });
325
+ * ```
326
+ */
327
+ setName(params: CustomerSetNameParams, options?: RequestOptions): APIPromise<CustomerSetNameResponse>;
328
+ /**
329
+ * Update configuration settings for a specific customer, such as external system
330
+ * integrations (e.g., Salesforce account ID) and other customer-specific billing
331
+ * parameters. Use this endpoint to modify customer configurations without
332
+ * affecting core customer data like name or ingest aliases.
333
+ *
334
+ * @example
335
+ * ```ts
336
+ * await client.v1.customers.updateConfig({
337
+ * customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
338
+ * salesforce_account_id: '0015500001WO1ZiABL',
339
+ * });
340
+ * ```
341
+ */
342
+ updateConfig(params: CustomerUpdateConfigParams, options?: RequestOptions): APIPromise<void>;
343
+ }
344
+ export type CustomerDetailsCursorPage = CursorPage<CustomerDetail>;
345
+ export type CustomerListBillableMetricsResponsesCursorPage = CursorPage<CustomerListBillableMetricsResponse>;
346
+ export type CustomerListCostsResponsesCursorPage = CursorPage<CustomerListCostsResponse>;
347
+ export interface Customer {
348
+ /**
349
+ * the Metronome ID of the customer
350
+ */
351
+ id: string;
352
+ /**
353
+ * (deprecated, use ingest_aliases instead) the first ID (Metronome or ingest
354
+ * alias) that can be used in usage events
355
+ */
356
+ external_id: string;
357
+ /**
358
+ * aliases for this customer that can be used instead of the Metronome customer ID
359
+ * in usage events
360
+ */
361
+ ingest_aliases: Array<string>;
362
+ name: string;
363
+ /**
364
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
365
+ */
366
+ custom_fields?: {
367
+ [key: string]: string;
368
+ };
369
+ }
370
+ export interface CustomerDetail {
371
+ /**
372
+ * the Metronome ID of the customer
373
+ */
374
+ id: string;
375
+ /**
376
+ * RFC 3339 timestamp indicating when the customer was created.
377
+ */
378
+ created_at: string;
379
+ /**
380
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
381
+ */
382
+ custom_fields: {
383
+ [key: string]: string;
384
+ };
385
+ customer_config: CustomerDetail.CustomerConfig;
386
+ /**
387
+ * (deprecated, use ingest_aliases instead) the first ID (Metronome or ingest
388
+ * alias) that can be used in usage events
389
+ */
390
+ external_id: string;
391
+ /**
392
+ * aliases for this customer that can be used instead of the Metronome customer ID
393
+ * in usage events
394
+ */
395
+ ingest_aliases: Array<string>;
396
+ name: string;
397
+ /**
398
+ * RFC 3339 timestamp indicating when the customer was last updated.
399
+ */
400
+ updated_at: string;
401
+ /**
402
+ * RFC 3339 timestamp indicating when the customer was archived. Null if the
403
+ * customer is active.
404
+ */
405
+ archived_at?: string | null;
406
+ /**
407
+ * This field's availability is dependent on your client's configuration.
408
+ */
409
+ current_billable_status?: CustomerDetail.CurrentBillableStatus;
410
+ }
411
+ export declare namespace CustomerDetail {
412
+ interface CustomerConfig {
413
+ /**
414
+ * The Salesforce account ID for the customer
415
+ */
416
+ salesforce_account_id: string | null;
417
+ }
418
+ /**
419
+ * This field's availability is dependent on your client's configuration.
420
+ */
421
+ interface CurrentBillableStatus {
422
+ value: 'billable' | 'unbillable';
423
+ effective_at?: string | null;
424
+ }
425
+ }
426
+ export interface CustomerCreateResponse {
427
+ data: Customer;
428
+ }
429
+ export interface CustomerRetrieveResponse {
430
+ data: CustomerDetail;
431
+ }
432
+ export interface CustomerArchiveResponse {
433
+ data: Shared.ID;
434
+ }
435
+ export interface CustomerListBillableMetricsResponse {
436
+ id: string;
437
+ name: string;
438
+ /**
439
+ * (DEPRECATED) use aggregation_type instead
440
+ */
441
+ aggregate?: string;
442
+ /**
443
+ * (DEPRECATED) use aggregation_key instead
444
+ */
445
+ aggregate_keys?: Array<string>;
446
+ /**
447
+ * A key that specifies which property of the event is used to aggregate data. This
448
+ * key must be one of the property filter names and is not applicable when the
449
+ * aggregation type is 'count'.
450
+ */
451
+ aggregation_key?: string;
452
+ /**
453
+ * Specifies the type of aggregation performed on matching events.
454
+ */
455
+ aggregation_type?: 'COUNT' | 'LATEST' | 'MAX' | 'SUM' | 'UNIQUE';
456
+ /**
457
+ * RFC 3339 timestamp indicating when the billable metric was archived. If not
458
+ * provided, the billable metric is not archived.
459
+ */
460
+ archived_at?: string;
461
+ /**
462
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
463
+ */
464
+ custom_fields?: {
465
+ [key: string]: string;
466
+ };
467
+ /**
468
+ * An optional filtering rule to match the 'event_type' property of an event.
469
+ */
470
+ event_type_filter?: Shared.EventTypeFilter;
471
+ /**
472
+ * (DEPRECATED) use property_filters & event_type_filter instead
473
+ */
474
+ filter?: {
475
+ [key: string]: unknown;
476
+ };
477
+ /**
478
+ * (DEPRECATED) use group_keys instead
479
+ */
480
+ group_by?: Array<string>;
481
+ /**
482
+ * Property names that are used to group usage costs on an invoice. Each entry
483
+ * represents a set of properties used to slice events into distinct buckets.
484
+ */
485
+ group_keys?: Array<Array<string>>;
486
+ /**
487
+ * A list of filters to match events to this billable metric. Each filter defines a
488
+ * rule on an event property. All rules must pass for the event to match the
489
+ * billable metric.
490
+ */
491
+ property_filters?: Array<Shared.PropertyFilter>;
492
+ /**
493
+ * The SQL query associated with the billable metric
494
+ */
495
+ sql?: string;
496
+ }
497
+ export interface CustomerListCostsResponse {
498
+ credit_types: {
499
+ [key: string]: CustomerListCostsResponse.CreditTypes;
500
+ };
501
+ end_timestamp: string;
502
+ start_timestamp: string;
503
+ }
504
+ export declare namespace CustomerListCostsResponse {
505
+ interface CreditTypes {
506
+ cost?: number;
507
+ line_item_breakdown?: Array<CreditTypes.LineItemBreakdown>;
508
+ name?: string;
509
+ }
510
+ namespace CreditTypes {
511
+ interface LineItemBreakdown {
512
+ cost: number;
513
+ name: string;
514
+ group_key?: string;
515
+ group_value?: string | null;
516
+ }
517
+ }
518
+ }
519
+ export interface CustomerPreviewEventsResponse {
520
+ data: Array<InvoicesAPI.Invoice>;
521
+ }
522
+ export interface CustomerRetrieveBillingConfigurationsResponse {
523
+ data: Array<CustomerRetrieveBillingConfigurationsResponse.Data>;
524
+ }
525
+ export declare namespace CustomerRetrieveBillingConfigurationsResponse {
526
+ interface Data {
527
+ /**
528
+ * ID of this configuration; can be provided as the
529
+ * billing_provider_configuration_id when creating a contract.
530
+ */
531
+ id: string;
532
+ archived_at: string | null;
533
+ /**
534
+ * The billing provider set for this configuration.
535
+ */
536
+ billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
537
+ /**
538
+ * Configuration for the billing provider. The structure of this object is specific
539
+ * to the billing provider.
540
+ */
541
+ configuration: {
542
+ [key: string]: unknown;
543
+ };
544
+ customer_id: string;
545
+ /**
546
+ * The method to use for delivering invoices to this customer.
547
+ */
548
+ delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
549
+ /**
550
+ * Configuration for the delivery method. The structure of this object is specific
551
+ * to the delivery method.
552
+ */
553
+ delivery_method_configuration: {
554
+ [key: string]: unknown;
555
+ };
556
+ /**
557
+ * ID of the delivery method to use for this customer.
558
+ */
559
+ delivery_method_id: string;
560
+ }
561
+ }
562
+ export interface CustomerSetNameResponse {
563
+ data: Customer;
564
+ }
565
+ export interface CustomerCreateParams {
566
+ /**
567
+ * This will be truncated to 160 characters if the provided name is longer.
568
+ */
569
+ name: string;
570
+ billing_config?: CustomerCreateParams.BillingConfig;
571
+ /**
572
+ * Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
573
+ */
574
+ custom_fields?: {
575
+ [key: string]: string;
576
+ };
577
+ customer_billing_provider_configurations?: Array<CustomerCreateParams.CustomerBillingProviderConfiguration>;
578
+ /**
579
+ * (deprecated, use ingest_aliases instead) an alias that can be used to refer to
580
+ * this customer in usage events
581
+ */
582
+ external_id?: string;
583
+ /**
584
+ * Aliases that can be used to refer to this customer in usage events
585
+ */
586
+ ingest_aliases?: Array<string>;
587
+ }
588
+ export declare namespace CustomerCreateParams {
589
+ interface BillingConfig {
590
+ billing_provider_customer_id: string;
591
+ billing_provider_type: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
592
+ /**
593
+ * True if the aws_product_code is a SAAS subscription product, false otherwise.
594
+ */
595
+ aws_is_subscription_product?: boolean;
596
+ aws_product_code?: string;
597
+ aws_region?: 'af-south-1' | 'ap-east-1' | 'ap-northeast-1' | 'ap-northeast-2' | 'ap-northeast-3' | 'ap-south-1' | 'ap-southeast-1' | 'ap-southeast-2' | 'ca-central-1' | 'cn-north-1' | 'cn-northwest-1' | 'eu-central-1' | 'eu-north-1' | 'eu-south-1' | 'eu-west-1' | 'eu-west-2' | 'eu-west-3' | 'me-south-1' | 'sa-east-1' | 'us-east-1' | 'us-east-2' | 'us-gov-east-1' | 'us-gov-west-1' | 'us-west-1' | 'us-west-2';
598
+ stripe_collection_method?: 'charge_automatically' | 'send_invoice' | 'auto_charge_payment_intent' | 'manually_charge_payment_intent';
599
+ }
600
+ interface CustomerBillingProviderConfiguration {
601
+ /**
602
+ * The billing provider set for this configuration.
603
+ */
604
+ billing_provider: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite';
605
+ /**
606
+ * Configuration for the billing provider. The structure of this object is specific
607
+ * to the billing provider and delivery provider combination. Defaults to an empty
608
+ * object, however, for most billing provider + delivery method combinations, it
609
+ * will not be a valid configuration.
610
+ */
611
+ configuration?: {
612
+ [key: string]: unknown;
613
+ };
614
+ /**
615
+ * The method to use for delivering invoices to this customer. If not provided, the
616
+ * `delivery_method_id` must be provided.
617
+ */
618
+ delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
619
+ /**
620
+ * ID of the delivery method to use for this customer. If not provided, the
621
+ * `delivery_method` must be provided.
622
+ */
623
+ delivery_method_id?: string;
624
+ /**
625
+ * Specifies which tax provider Metronome should use for tax calculation when
626
+ * billing through Stripe. This is only supported for Stripe billing provider
627
+ * configurations with auto_charge_payment_intent or manual_charge_payment_intent
628
+ * collection methods.
629
+ */
630
+ tax_provider?: 'anrok' | 'avalara' | 'stripe';
631
+ }
632
+ }
633
+ export interface CustomerRetrieveParams {
634
+ customer_id: string;
635
+ }
636
+ export interface CustomerListParams extends CursorPageParams {
637
+ /**
638
+ * Filter the customer list by customer_id. Up to 100 ids can be provided.
639
+ */
640
+ customer_ids?: Array<string>;
641
+ /**
642
+ * Filter the customer list by ingest_alias
643
+ */
644
+ ingest_alias?: string;
645
+ /**
646
+ * Filter the customer list to only return archived customers. By default, only
647
+ * active customers are returned.
648
+ */
649
+ only_archived?: boolean;
650
+ /**
651
+ * Filter the customer list by salesforce_account_id. Up to 100 ids can be
652
+ * provided.
653
+ */
654
+ salesforce_account_ids?: Array<string>;
655
+ }
656
+ export interface CustomerArchiveParams {
657
+ id: string;
658
+ }
659
+ export interface CustomerListBillableMetricsParams extends CursorPageParams {
660
+ /**
661
+ * Path param:
662
+ */
663
+ customer_id: string;
664
+ /**
665
+ * Query param: If true, the list of returned metrics will include archived metrics
666
+ */
667
+ include_archived?: boolean;
668
+ /**
669
+ * Query param: If true, the list of metrics will be filtered to just ones that are
670
+ * on the customer's current plan
671
+ */
672
+ on_current_plan?: boolean;
673
+ }
674
+ export interface CustomerListCostsParams extends CursorPageParams {
675
+ /**
676
+ * Path param:
677
+ */
678
+ customer_id: string;
679
+ /**
680
+ * Query param: RFC 3339 timestamp (exclusive)
681
+ */
682
+ ending_before: string;
683
+ /**
684
+ * Query param: RFC 3339 timestamp (inclusive)
685
+ */
686
+ starting_on: string;
687
+ }
688
+ export interface CustomerPreviewEventsParams {
689
+ /**
690
+ * Path param:
691
+ */
692
+ customer_id: string;
693
+ /**
694
+ * Body param:
695
+ */
696
+ events: Array<CustomerPreviewEventsParams.Event>;
697
+ /**
698
+ * Body param: If set to "replace", the preview will be generated as if those were
699
+ * the only events for the specified customer. If set to "merge", the events will
700
+ * be merged with any existing events for the specified customer. Defaults to
701
+ * "replace".
702
+ */
703
+ mode?: 'replace' | 'merge';
704
+ /**
705
+ * Body param: If set, all zero quantity line items will be filtered out of the
706
+ * response.
707
+ */
708
+ skip_zero_qty_line_items?: boolean;
709
+ }
710
+ export declare namespace CustomerPreviewEventsParams {
711
+ interface Event {
712
+ event_type: string;
713
+ properties?: {
714
+ [key: string]: unknown;
715
+ };
716
+ /**
717
+ * RFC 3339 formatted. If not provided, the current time will be used.
718
+ */
719
+ timestamp?: string;
720
+ /**
721
+ * Optional unique identifier for event deduplication. When provided, preview
722
+ * events are automatically deduplicated against historical events from the past 34
723
+ * days. Duplicate transaction IDs within the same request will return an error.
724
+ */
725
+ transaction_id?: string;
726
+ }
727
+ }
728
+ export interface CustomerRetrieveBillingConfigurationsParams {
729
+ customer_id: string;
730
+ include_archived?: boolean;
731
+ }
732
+ export interface CustomerSetBillingConfigurationsParams {
733
+ data: Array<CustomerSetBillingConfigurationsParams.Data>;
734
+ }
735
+ export declare namespace CustomerSetBillingConfigurationsParams {
736
+ interface Data {
737
+ /**
738
+ * The billing provider set for this configuration.
739
+ */
740
+ billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
741
+ customer_id: string;
742
+ /**
743
+ * Configuration for the billing provider. The structure of this object is specific
744
+ * to the billing provider and delivery method combination. Defaults to an empty
745
+ * object, however, for most billing provider + delivery method combinations, it
746
+ * will not be a valid configuration. For AWS marketplace configurations, the
747
+ * aws_is_subscription_product flag can be used to indicate a product with
748
+ * usage-based pricing. More information can be found
749
+ * [here](https://docs.metronome.com/invoice-customers/solutions/marketplaces/invoice-aws/#provision-aws-marketplace-customers-in-metronome).
750
+ */
751
+ configuration?: {
752
+ [key: string]: unknown;
753
+ };
754
+ /**
755
+ * The method to use for delivering invoices to this customer. If not provided, the
756
+ * `delivery_method_id` must be provided.
757
+ */
758
+ delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
759
+ /**
760
+ * ID of the delivery method to use for this customer. If not provided, the
761
+ * `delivery_method` must be provided.
762
+ */
763
+ delivery_method_id?: string;
764
+ /**
765
+ * Specifies which tax provider Metronome should use for tax calculation when
766
+ * billing through Stripe. This is only supported for Stripe billing provider
767
+ * configurations with auto_charge_payment_intent or manual_charge_payment_intent
768
+ * collection methods.
769
+ */
770
+ tax_provider?: 'anrok' | 'avalara' | 'stripe';
771
+ }
772
+ }
773
+ export interface CustomerSetIngestAliasesParams {
774
+ /**
775
+ * Path param:
776
+ */
777
+ customer_id: string;
778
+ /**
779
+ * Body param:
780
+ */
781
+ ingest_aliases: Array<string>;
782
+ }
783
+ export interface CustomerSetNameParams {
784
+ /**
785
+ * Path param:
786
+ */
787
+ customer_id: string;
788
+ /**
789
+ * Body param: The new name for the customer. This will be truncated to 160
790
+ * characters if the provided name is longer.
791
+ */
792
+ name: string;
793
+ }
794
+ export interface CustomerUpdateConfigParams {
795
+ /**
796
+ * Path param:
797
+ */
798
+ customer_id: string;
799
+ /**
800
+ * Body param: Leave in draft or set to auto-advance on invoices sent to Stripe.
801
+ * Falls back to the client-level config if unset, which defaults to true if unset.
802
+ */
803
+ leave_stripe_invoices_in_draft?: boolean | null;
804
+ /**
805
+ * Body param: The Salesforce account ID for the customer
806
+ */
807
+ salesforce_account_id?: string | null;
808
+ }
809
+ export declare namespace Customers {
810
+ export { type Customer as Customer, type CustomerDetail as CustomerDetail, type CustomerCreateResponse as CustomerCreateResponse, type CustomerRetrieveResponse as CustomerRetrieveResponse, type CustomerArchiveResponse as CustomerArchiveResponse, type CustomerListBillableMetricsResponse as CustomerListBillableMetricsResponse, type CustomerListCostsResponse as CustomerListCostsResponse, type CustomerPreviewEventsResponse as CustomerPreviewEventsResponse, type CustomerRetrieveBillingConfigurationsResponse as CustomerRetrieveBillingConfigurationsResponse, type CustomerSetNameResponse as CustomerSetNameResponse, type CustomerDetailsCursorPage as CustomerDetailsCursorPage, type CustomerListBillableMetricsResponsesCursorPage as CustomerListBillableMetricsResponsesCursorPage, type CustomerListCostsResponsesCursorPage as CustomerListCostsResponsesCursorPage, type CustomerCreateParams as CustomerCreateParams, type CustomerRetrieveParams as CustomerRetrieveParams, type CustomerListParams as CustomerListParams, type CustomerArchiveParams as CustomerArchiveParams, type CustomerListBillableMetricsParams as CustomerListBillableMetricsParams, type CustomerListCostsParams as CustomerListCostsParams, type CustomerPreviewEventsParams as CustomerPreviewEventsParams, type CustomerRetrieveBillingConfigurationsParams as CustomerRetrieveBillingConfigurationsParams, type CustomerSetBillingConfigurationsParams as CustomerSetBillingConfigurationsParams, type CustomerSetIngestAliasesParams as CustomerSetIngestAliasesParams, type CustomerSetNameParams as CustomerSetNameParams, type CustomerUpdateConfigParams as CustomerUpdateConfigParams, };
811
+ export { Alerts as Alerts, type CustomerAlert as CustomerAlert, type AlertRetrieveResponse as AlertRetrieveResponse, type CustomerAlertsCursorPageWithoutLimit as CustomerAlertsCursorPageWithoutLimit, type AlertRetrieveParams as AlertRetrieveParams, type AlertListParams as AlertListParams, type AlertResetParams as AlertResetParams, };
812
+ export { Plans as Plans, type PlanListResponse as PlanListResponse, type PlanAddResponse as PlanAddResponse, type PlanEndResponse as PlanEndResponse, type PlanListPriceAdjustmentsResponse as PlanListPriceAdjustmentsResponse, type PlanListResponsesCursorPage as PlanListResponsesCursorPage, type PlanListPriceAdjustmentsResponsesCursorPage as PlanListPriceAdjustmentsResponsesCursorPage, type PlanListParams as PlanListParams, type PlanAddParams as PlanAddParams, type PlanEndParams as PlanEndParams, type PlanListPriceAdjustmentsParams as PlanListPriceAdjustmentsParams, };
813
+ export { Invoices as Invoices, type Invoice as Invoice, type InvoiceRetrieveResponse as InvoiceRetrieveResponse, type InvoiceAddChargeResponse as InvoiceAddChargeResponse, type InvoiceListBreakdownsResponse as InvoiceListBreakdownsResponse, type InvoicesCursorPage as InvoicesCursorPage, type InvoiceListBreakdownsResponsesCursorPage as InvoiceListBreakdownsResponsesCursorPage, type InvoiceRetrieveParams as InvoiceRetrieveParams, type InvoiceListParams as InvoiceListParams, type InvoiceAddChargeParams as InvoiceAddChargeParams, type InvoiceListBreakdownsParams as InvoiceListBreakdownsParams, type InvoiceRetrievePdfParams as InvoiceRetrievePdfParams, };
814
+ export { BillingConfigAPIBillingConfig as BillingConfig, type BillingConfigRetrieveResponse as BillingConfigRetrieveResponse, type BillingConfigCreateParams as BillingConfigCreateParams, type BillingConfigRetrieveParams as BillingConfigRetrieveParams, type BillingConfigDeleteParams as BillingConfigDeleteParams, };
815
+ export { Commits as Commits, type CommitCreateResponse as CommitCreateResponse, type CommitUpdateEndDateResponse as CommitUpdateEndDateResponse, type CommitCreateParams as CommitCreateParams, type CommitListParams as CommitListParams, type CommitUpdateEndDateParams as CommitUpdateEndDateParams, };
816
+ export { Credits as Credits, type CreditCreateResponse as CreditCreateResponse, type CreditUpdateEndDateResponse as CreditUpdateEndDateResponse, type CreditCreateParams as CreditCreateParams, type CreditListParams as CreditListParams, type CreditUpdateEndDateParams as CreditUpdateEndDateParams, };
817
+ export { NamedSchedules as NamedSchedules, type NamedScheduleRetrieveResponse as NamedScheduleRetrieveResponse, type NamedScheduleRetrieveParams as NamedScheduleRetrieveParams, type NamedScheduleUpdateParams as NamedScheduleUpdateParams, };
818
+ }
819
+ //# sourceMappingURL=customers.d.mts.map