orb-billing 5.76.0 → 6.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 (926) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +118 -45
  3. package/api-promise.d.mts +3 -0
  4. package/api-promise.d.mts.map +1 -0
  5. package/api-promise.d.ts +3 -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 +3 -0
  10. package/api-promise.mjs.map +1 -0
  11. package/client.d.mts +474 -0
  12. package/client.d.mts.map +1 -0
  13. package/client.d.ts +474 -0
  14. package/client.d.ts.map +1 -0
  15. package/client.js +650 -0
  16. package/client.js.map +1 -0
  17. package/client.mjs +645 -0
  18. package/client.mjs.map +1 -0
  19. package/core/api-promise.d.mts +46 -0
  20. package/core/api-promise.d.mts.map +1 -0
  21. package/core/api-promise.d.ts +46 -0
  22. package/core/api-promise.d.ts.map +1 -0
  23. package/core/api-promise.js +74 -0
  24. package/core/api-promise.js.map +1 -0
  25. package/core/api-promise.mjs +70 -0
  26. package/core/api-promise.mjs.map +1 -0
  27. package/core/error.d.mts +131 -0
  28. package/core/error.d.mts.map +1 -0
  29. package/core/error.d.ts +131 -0
  30. package/core/error.d.ts.map +1 -0
  31. package/core/error.js +294 -0
  32. package/core/error.js.map +1 -0
  33. package/core/error.mjs +266 -0
  34. package/core/error.mjs.map +1 -0
  35. package/core/pagination.d.mts +67 -0
  36. package/core/pagination.d.mts.map +1 -0
  37. package/core/pagination.d.ts +67 -0
  38. package/core/pagination.d.ts.map +1 -0
  39. package/core/pagination.js +101 -0
  40. package/core/pagination.js.map +1 -0
  41. package/core/pagination.mjs +95 -0
  42. package/core/pagination.mjs.map +1 -0
  43. package/core/resource.d.mts +6 -0
  44. package/core/resource.d.mts.map +1 -0
  45. package/core/resource.d.ts +6 -0
  46. package/core/resource.d.ts.map +1 -0
  47. package/core/resource.js +11 -0
  48. package/core/resource.js.map +1 -0
  49. package/core/resource.mjs +7 -0
  50. package/core/resource.mjs.map +1 -0
  51. package/core/uploads.d.mts +3 -0
  52. package/core/uploads.d.mts.map +1 -0
  53. package/core/uploads.d.ts +3 -0
  54. package/core/uploads.d.ts.map +1 -0
  55. package/core/uploads.js +6 -0
  56. package/core/uploads.js.map +1 -0
  57. package/core/uploads.mjs +2 -0
  58. package/core/uploads.mjs.map +1 -0
  59. package/error.d.mts +3 -0
  60. package/error.d.mts.map +1 -0
  61. package/error.d.ts +2 -131
  62. package/error.d.ts.map +1 -1
  63. package/error.js +3 -291
  64. package/error.js.map +1 -1
  65. package/error.mjs +2 -265
  66. package/error.mjs.map +1 -1
  67. package/index.d.mts +7 -401
  68. package/index.d.mts.map +1 -0
  69. package/index.d.ts +6 -400
  70. package/index.d.ts.map +1 -1
  71. package/index.js +15 -286
  72. package/index.js.map +1 -1
  73. package/index.mjs +6 -259
  74. package/index.mjs.map +1 -1
  75. package/internal/builtin-types.d.mts +73 -0
  76. package/internal/builtin-types.d.mts.map +1 -0
  77. package/internal/builtin-types.d.ts +73 -0
  78. package/internal/builtin-types.d.ts.map +1 -0
  79. package/internal/builtin-types.js +4 -0
  80. package/internal/builtin-types.js.map +1 -0
  81. package/internal/builtin-types.mjs +3 -0
  82. package/internal/builtin-types.mjs.map +1 -0
  83. package/internal/detect-platform.d.mts +15 -0
  84. package/internal/detect-platform.d.mts.map +1 -0
  85. package/internal/detect-platform.d.ts +15 -0
  86. package/internal/detect-platform.d.ts.map +1 -0
  87. package/internal/detect-platform.js +162 -0
  88. package/internal/detect-platform.js.map +1 -0
  89. package/internal/detect-platform.mjs +157 -0
  90. package/internal/detect-platform.mjs.map +1 -0
  91. package/internal/errors.d.mts +3 -0
  92. package/internal/errors.d.mts.map +1 -0
  93. package/internal/errors.d.ts +3 -0
  94. package/internal/errors.d.ts.map +1 -0
  95. package/internal/errors.js +41 -0
  96. package/internal/errors.js.map +1 -0
  97. package/internal/errors.mjs +36 -0
  98. package/internal/errors.mjs.map +1 -0
  99. package/internal/headers.d.mts +20 -0
  100. package/internal/headers.d.mts.map +1 -0
  101. package/internal/headers.d.ts +20 -0
  102. package/internal/headers.d.ts.map +1 -0
  103. package/internal/headers.js +79 -0
  104. package/internal/headers.js.map +1 -0
  105. package/internal/headers.mjs +74 -0
  106. package/internal/headers.mjs.map +1 -0
  107. package/internal/parse.d.mts +12 -0
  108. package/internal/parse.d.mts.map +1 -0
  109. package/internal/parse.d.ts +12 -0
  110. package/internal/parse.d.ts.map +1 -0
  111. package/internal/parse.js +40 -0
  112. package/internal/parse.js.map +1 -0
  113. package/internal/parse.mjs +37 -0
  114. package/internal/parse.mjs.map +1 -0
  115. package/internal/qs/formats.d.mts +7 -0
  116. package/internal/qs/formats.d.mts.map +1 -0
  117. package/internal/qs/formats.d.ts +1 -0
  118. package/internal/qs/formats.d.ts.map +1 -1
  119. package/internal/qs/formats.js +4 -2
  120. package/internal/qs/formats.js.map +1 -1
  121. package/internal/qs/formats.mjs +2 -1
  122. package/internal/qs/formats.mjs.map +1 -1
  123. package/internal/qs/index.d.mts +10 -0
  124. package/internal/qs/index.d.mts.map +1 -0
  125. package/internal/qs/index.d.ts +2 -2
  126. package/internal/qs/index.d.ts.map +1 -1
  127. package/internal/qs/index.mjs.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 +26 -0
  162. package/internal/shims.d.mts.map +1 -0
  163. package/internal/shims.d.ts +26 -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 +87 -0
  224. package/internal/utils/log.js.map +1 -0
  225. package/internal/utils/log.mjs +81 -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/query.d.mts +2 -0
  236. package/internal/utils/query.d.mts.map +1 -0
  237. package/internal/utils/query.js +3 -26
  238. package/internal/utils/query.js.map +1 -1
  239. package/internal/utils/query.mjs.map +1 -1
  240. package/internal/utils/sleep.d.mts +2 -0
  241. package/internal/utils/sleep.d.mts.map +1 -0
  242. package/internal/utils/sleep.d.ts +2 -0
  243. package/internal/utils/sleep.d.ts.map +1 -0
  244. package/internal/utils/sleep.js +7 -0
  245. package/internal/utils/sleep.js.map +1 -0
  246. package/internal/utils/sleep.mjs +3 -0
  247. package/internal/utils/sleep.mjs.map +1 -0
  248. package/internal/utils/uuid.d.mts +5 -0
  249. package/internal/utils/uuid.d.mts.map +1 -0
  250. package/internal/utils/uuid.d.ts +5 -0
  251. package/internal/utils/uuid.d.ts.map +1 -0
  252. package/internal/utils/uuid.js +19 -0
  253. package/internal/utils/uuid.js.map +1 -0
  254. package/internal/utils/uuid.mjs +15 -0
  255. package/internal/utils/uuid.mjs.map +1 -0
  256. package/internal/utils/values.d.mts +18 -0
  257. package/internal/utils/values.d.mts.map +1 -0
  258. package/internal/utils/values.d.ts +18 -0
  259. package/internal/utils/values.d.ts.map +1 -0
  260. package/internal/utils/values.js +112 -0
  261. package/internal/utils/values.js.map +1 -0
  262. package/internal/utils/values.mjs +94 -0
  263. package/internal/utils/values.mjs.map +1 -0
  264. package/internal/utils.d.mts +8 -0
  265. package/internal/utils.d.mts.map +1 -0
  266. package/internal/utils.d.ts +8 -0
  267. package/internal/utils.d.ts.map +1 -0
  268. package/internal/utils.js +12 -0
  269. package/internal/utils.js.map +1 -0
  270. package/internal/utils.mjs +9 -0
  271. package/internal/utils.mjs.map +1 -0
  272. package/package.json +122 -65
  273. package/pagination.d.mts +3 -0
  274. package/pagination.d.mts.map +1 -0
  275. package/pagination.d.ts +2 -30
  276. package/pagination.d.ts.map +1 -1
  277. package/pagination.js +3 -37
  278. package/pagination.js.map +1 -1
  279. package/pagination.mjs +2 -35
  280. package/pagination.mjs.map +1 -1
  281. package/resource.d.mts +3 -0
  282. package/resource.d.mts.map +1 -0
  283. package/resource.d.ts +2 -5
  284. package/resource.d.ts.map +1 -1
  285. package/resource.js +3 -8
  286. package/resource.js.map +1 -1
  287. package/resource.mjs +2 -6
  288. package/resource.mjs.map +1 -1
  289. package/resources/alerts.d.mts +430 -0
  290. package/resources/alerts.d.mts.map +1 -0
  291. package/resources/alerts.d.ts +14 -17
  292. package/resources/alerts.d.ts.map +1 -1
  293. package/resources/alerts.js +37 -27
  294. package/resources/alerts.js.map +1 -1
  295. package/resources/alerts.mjs +36 -25
  296. package/resources/alerts.mjs.map +1 -1
  297. package/resources/beta/beta.d.mts +2826 -0
  298. package/resources/beta/beta.d.mts.map +1 -0
  299. package/resources/beta/beta.d.ts +13 -9
  300. package/resources/beta/beta.d.ts.map +1 -1
  301. package/resources/beta/beta.js +10 -30
  302. package/resources/beta/beta.js.map +1 -1
  303. package/resources/beta/beta.mjs +8 -6
  304. package/resources/beta/beta.mjs.map +1 -1
  305. package/resources/beta/external-plan-id.d.mts +2713 -0
  306. package/resources/beta/external-plan-id.d.mts.map +1 -0
  307. package/resources/beta/external-plan-id.d.ts +10 -6
  308. package/resources/beta/external-plan-id.d.ts.map +1 -1
  309. package/resources/beta/external-plan-id.js +7 -5
  310. package/resources/beta/external-plan-id.js.map +1 -1
  311. package/resources/beta/external-plan-id.mjs +7 -5
  312. package/resources/beta/external-plan-id.mjs.map +1 -1
  313. package/resources/beta/index.d.mts +3 -0
  314. package/resources/beta/index.d.mts.map +1 -0
  315. package/resources/beta/index.d.ts +2 -2
  316. package/resources/beta/index.d.ts.map +1 -1
  317. package/resources/beta/index.js.map +1 -1
  318. package/resources/beta/index.mjs.map +1 -1
  319. package/resources/beta.d.mts +2 -0
  320. package/resources/beta.d.mts.map +1 -0
  321. package/resources/beta.d.ts.map +1 -1
  322. package/resources/beta.js +2 -15
  323. package/resources/beta.js.map +1 -1
  324. package/resources/beta.mjs.map +1 -1
  325. package/resources/coupons/coupons.d.mts +148 -0
  326. package/resources/coupons/coupons.d.mts.map +1 -0
  327. package/resources/coupons/coupons.d.ts +10 -11
  328. package/resources/coupons/coupons.d.ts.map +1 -1
  329. package/resources/coupons/coupons.js +24 -38
  330. package/resources/coupons/coupons.js.map +1 -1
  331. package/resources/coupons/coupons.mjs +21 -12
  332. package/resources/coupons/coupons.mjs.map +1 -1
  333. package/resources/coupons/index.d.mts +3 -0
  334. package/resources/coupons/index.d.mts.map +1 -0
  335. package/resources/coupons/index.d.ts +1 -1
  336. package/resources/coupons/index.d.ts.map +1 -1
  337. package/resources/coupons/index.js +1 -2
  338. package/resources/coupons/index.js.map +1 -1
  339. package/resources/coupons/index.mjs +1 -1
  340. package/resources/coupons/index.mjs.map +1 -1
  341. package/resources/coupons/subscriptions.d.mts +34 -0
  342. package/resources/coupons/subscriptions.d.mts.map +1 -0
  343. package/resources/coupons/subscriptions.d.ts +5 -6
  344. package/resources/coupons/subscriptions.d.ts.map +1 -1
  345. package/resources/coupons/subscriptions.js +21 -12
  346. package/resources/coupons/subscriptions.js.map +1 -1
  347. package/resources/coupons/subscriptions.mjs +20 -11
  348. package/resources/coupons/subscriptions.mjs.map +1 -1
  349. package/resources/coupons.d.mts +2 -0
  350. package/resources/coupons.d.mts.map +1 -0
  351. package/resources/coupons.d.ts.map +1 -1
  352. package/resources/coupons.js +2 -15
  353. package/resources/coupons.js.map +1 -1
  354. package/resources/coupons.mjs.map +1 -1
  355. package/resources/credit-blocks.d.mts +275 -0
  356. package/resources/credit-blocks.d.mts.map +1 -0
  357. package/resources/credit-blocks.d.ts +6 -5
  358. package/resources/credit-blocks.d.ts.map +1 -1
  359. package/resources/credit-blocks.js +7 -5
  360. package/resources/credit-blocks.js.map +1 -1
  361. package/resources/credit-blocks.mjs +7 -5
  362. package/resources/credit-blocks.mjs.map +1 -1
  363. package/resources/credit-notes.d.mts +144 -0
  364. package/resources/credit-notes.d.mts.map +1 -0
  365. package/resources/credit-notes.d.ts +8 -8
  366. package/resources/credit-notes.d.ts.map +1 -1
  367. package/resources/credit-notes.js +19 -10
  368. package/resources/credit-notes.js.map +1 -1
  369. package/resources/credit-notes.mjs +18 -9
  370. package/resources/credit-notes.mjs.map +1 -1
  371. package/resources/customers/balance-transactions.d.mts +135 -0
  372. package/resources/customers/balance-transactions.d.mts.map +1 -0
  373. package/resources/customers/balance-transactions.d.ts +8 -9
  374. package/resources/customers/balance-transactions.d.ts.map +1 -1
  375. package/resources/customers/balance-transactions.js +29 -13
  376. package/resources/customers/balance-transactions.js.map +1 -1
  377. package/resources/customers/balance-transactions.mjs +28 -11
  378. package/resources/customers/balance-transactions.mjs.map +1 -1
  379. package/resources/customers/costs.d.mts +314 -0
  380. package/resources/customers/costs.d.mts.map +1 -0
  381. package/resources/customers/costs.d.ts +5 -6
  382. package/resources/customers/costs.d.ts.map +1 -1
  383. package/resources/customers/costs.js +243 -11
  384. package/resources/customers/costs.js.map +1 -1
  385. package/resources/customers/costs.mjs +243 -11
  386. package/resources/customers/costs.mjs.map +1 -1
  387. package/resources/customers/credits/credits.d.mts +287 -0
  388. package/resources/customers/credits/credits.d.mts.map +1 -0
  389. package/resources/customers/credits/credits.d.ts +11 -15
  390. package/resources/customers/credits/credits.d.ts.map +1 -1
  391. package/resources/customers/credits/credits.js +38 -50
  392. package/resources/customers/credits/credits.js.map +1 -1
  393. package/resources/customers/credits/credits.mjs +36 -24
  394. package/resources/customers/credits/credits.mjs.map +1 -1
  395. package/resources/customers/credits/index.d.mts +4 -0
  396. package/resources/customers/credits/index.d.mts.map +1 -0
  397. package/resources/customers/credits/index.d.ts +3 -3
  398. package/resources/customers/credits/index.d.ts.map +1 -1
  399. package/resources/customers/credits/index.js +1 -7
  400. package/resources/customers/credits/index.js.map +1 -1
  401. package/resources/customers/credits/index.mjs +3 -3
  402. package/resources/customers/credits/index.mjs.map +1 -1
  403. package/resources/customers/credits/ledger.d.mts +1202 -0
  404. package/resources/customers/credits/ledger.d.mts.map +1 -0
  405. package/resources/customers/credits/ledger.d.ts +11 -14
  406. package/resources/customers/credits/ledger.d.ts.map +1 -1
  407. package/resources/customers/credits/ledger.js +172 -27
  408. package/resources/customers/credits/ledger.js.map +1 -1
  409. package/resources/customers/credits/ledger.mjs +171 -24
  410. package/resources/customers/credits/ledger.mjs.map +1 -1
  411. package/resources/customers/credits/top-ups.d.mts +357 -0
  412. package/resources/customers/credits/top-ups.d.mts.map +1 -0
  413. package/resources/customers/credits/top-ups.d.ts +19 -16
  414. package/resources/customers/credits/top-ups.d.ts.map +1 -1
  415. package/resources/customers/credits/top-ups.js +24 -29
  416. package/resources/customers/credits/top-ups.js.map +1 -1
  417. package/resources/customers/credits/top-ups.mjs +23 -26
  418. package/resources/customers/credits/top-ups.mjs.map +1 -1
  419. package/resources/customers/credits.d.mts +2 -0
  420. package/resources/customers/credits.d.mts.map +1 -0
  421. package/resources/customers/credits.d.ts.map +1 -1
  422. package/resources/customers/credits.js +2 -15
  423. package/resources/customers/credits.js.map +1 -1
  424. package/resources/customers/credits.mjs.map +1 -1
  425. package/resources/customers/customers.d.mts +1453 -0
  426. package/resources/customers/customers.d.mts.map +1 -0
  427. package/resources/customers/customers.d.ts +17 -18
  428. package/resources/customers/customers.d.ts.map +1 -1
  429. package/resources/customers/customers.js +30 -53
  430. package/resources/customers/customers.js.map +1 -1
  431. package/resources/customers/customers.mjs +27 -27
  432. package/resources/customers/customers.mjs.map +1 -1
  433. package/resources/customers/index.d.mts +5 -0
  434. package/resources/customers/index.d.mts.map +1 -0
  435. package/resources/customers/index.d.ts +3 -3
  436. package/resources/customers/index.d.ts.map +1 -1
  437. package/resources/customers/index.js +1 -5
  438. package/resources/customers/index.js.map +1 -1
  439. package/resources/customers/index.mjs +3 -3
  440. package/resources/customers/index.mjs.map +1 -1
  441. package/resources/customers.d.mts +2 -0
  442. package/resources/customers.d.mts.map +1 -0
  443. package/resources/customers.d.ts.map +1 -1
  444. package/resources/customers.js +2 -15
  445. package/resources/customers.js.map +1 -1
  446. package/resources/customers.mjs.map +1 -1
  447. package/resources/dimensional-price-groups/dimensional-price-groups.d.mts +150 -0
  448. package/resources/dimensional-price-groups/dimensional-price-groups.d.mts.map +1 -0
  449. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +11 -12
  450. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -1
  451. package/resources/dimensional-price-groups/dimensional-price-groups.js +21 -39
  452. package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -1
  453. package/resources/dimensional-price-groups/dimensional-price-groups.mjs +18 -13
  454. package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -1
  455. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts +53 -0
  456. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts.map +1 -0
  457. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +7 -6
  458. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -1
  459. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +6 -5
  460. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -1
  461. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +6 -5
  462. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -1
  463. package/resources/dimensional-price-groups/index.d.mts +3 -0
  464. package/resources/dimensional-price-groups/index.d.mts.map +1 -0
  465. package/resources/dimensional-price-groups/index.d.ts +1 -1
  466. package/resources/dimensional-price-groups/index.d.ts.map +1 -1
  467. package/resources/dimensional-price-groups/index.js +1 -2
  468. package/resources/dimensional-price-groups/index.js.map +1 -1
  469. package/resources/dimensional-price-groups/index.mjs +1 -1
  470. package/resources/dimensional-price-groups/index.mjs.map +1 -1
  471. package/resources/dimensional-price-groups.d.mts +2 -0
  472. package/resources/dimensional-price-groups.d.mts.map +1 -0
  473. package/resources/dimensional-price-groups.d.ts.map +1 -1
  474. package/resources/dimensional-price-groups.js +2 -15
  475. package/resources/dimensional-price-groups.js.map +1 -1
  476. package/resources/dimensional-price-groups.mjs.map +1 -1
  477. package/resources/events/backfills.d.mts +389 -0
  478. package/resources/events/backfills.d.mts.map +1 -0
  479. package/resources/events/backfills.d.ts +11 -12
  480. package/resources/events/backfills.d.ts.map +1 -1
  481. package/resources/events/backfills.js +24 -15
  482. package/resources/events/backfills.js.map +1 -1
  483. package/resources/events/backfills.mjs +23 -13
  484. package/resources/events/backfills.mjs.map +1 -1
  485. package/resources/events/events.d.mts +536 -0
  486. package/resources/events/events.d.mts.map +1 -0
  487. package/resources/events/events.d.ts +10 -11
  488. package/resources/events/events.d.ts.map +1 -1
  489. package/resources/events/events.js +7 -29
  490. package/resources/events/events.js.map +1 -1
  491. package/resources/events/events.mjs +5 -5
  492. package/resources/events/events.mjs.map +1 -1
  493. package/resources/events/index.d.mts +4 -0
  494. package/resources/events/index.d.mts.map +1 -0
  495. package/resources/events/index.d.ts +1 -1
  496. package/resources/events/index.d.ts.map +1 -1
  497. package/resources/events/index.js +1 -2
  498. package/resources/events/index.js.map +1 -1
  499. package/resources/events/index.mjs +1 -1
  500. package/resources/events/index.mjs.map +1 -1
  501. package/resources/events/volume.d.mts +79 -0
  502. package/resources/events/volume.d.mts.map +1 -0
  503. package/resources/events/volume.d.ts +4 -3
  504. package/resources/events/volume.d.ts.map +1 -1
  505. package/resources/events/volume.js +1 -1
  506. package/resources/events/volume.js.map +1 -1
  507. package/resources/events/volume.mjs +1 -1
  508. package/resources/events/volume.mjs.map +1 -1
  509. package/resources/events.d.mts +2 -0
  510. package/resources/events.d.mts.map +1 -0
  511. package/resources/events.d.ts.map +1 -1
  512. package/resources/events.js +2 -15
  513. package/resources/events.js.map +1 -1
  514. package/resources/events.mjs.map +1 -1
  515. package/resources/index.d.mts +22 -0
  516. package/resources/index.d.mts.map +1 -0
  517. package/resources/index.d.ts +13 -13
  518. package/resources/index.d.ts.map +1 -1
  519. package/resources/index.js +7 -33
  520. package/resources/index.js.map +1 -1
  521. package/resources/index.mjs +12 -12
  522. package/resources/index.mjs.map +1 -1
  523. package/resources/invoice-line-items.d.mts +245 -0
  524. package/resources/invoice-line-items.d.mts.map +1 -0
  525. package/resources/invoice-line-items.d.ts +4 -3
  526. package/resources/invoice-line-items.d.ts.map +1 -1
  527. package/resources/invoice-line-items.js +1 -1
  528. package/resources/invoice-line-items.js.map +1 -1
  529. package/resources/invoice-line-items.mjs +1 -1
  530. package/resources/invoice-line-items.mjs.map +1 -1
  531. package/resources/invoices.d.mts +1795 -0
  532. package/resources/invoices.d.mts.map +1 -0
  533. package/resources/invoices.d.ts +25 -27
  534. package/resources/invoices.d.ts.map +1 -1
  535. package/resources/invoices.js +105 -38
  536. package/resources/invoices.js.map +1 -1
  537. package/resources/invoices.mjs +104 -36
  538. package/resources/invoices.mjs.map +1 -1
  539. package/resources/items.d.mts +163 -0
  540. package/resources/items.d.mts.map +1 -0
  541. package/resources/items.d.ts +11 -12
  542. package/resources/items.d.ts.map +1 -1
  543. package/resources/items.js +20 -15
  544. package/resources/items.js.map +1 -1
  545. package/resources/items.mjs +19 -13
  546. package/resources/items.mjs.map +1 -1
  547. package/resources/license-types.d.mts +112 -0
  548. package/resources/license-types.d.mts.map +1 -0
  549. package/resources/license-types.d.ts +9 -10
  550. package/resources/license-types.d.ts.map +1 -1
  551. package/resources/license-types.js +14 -13
  552. package/resources/license-types.js.map +1 -1
  553. package/resources/license-types.mjs +13 -11
  554. package/resources/license-types.mjs.map +1 -1
  555. package/resources/licenses/external-licenses.d.mts +127 -0
  556. package/resources/licenses/external-licenses.d.mts.map +1 -0
  557. package/resources/licenses/external-licenses.d.ts +4 -3
  558. package/resources/licenses/external-licenses.d.ts.map +1 -1
  559. package/resources/licenses/external-licenses.js +6 -2
  560. package/resources/licenses/external-licenses.js.map +1 -1
  561. package/resources/licenses/external-licenses.mjs +6 -2
  562. package/resources/licenses/external-licenses.mjs.map +1 -1
  563. package/resources/licenses/index.d.mts +4 -0
  564. package/resources/licenses/index.d.mts.map +1 -0
  565. package/resources/licenses/index.d.ts +1 -1
  566. package/resources/licenses/index.d.ts.map +1 -1
  567. package/resources/licenses/index.js +1 -2
  568. package/resources/licenses/index.js.map +1 -1
  569. package/resources/licenses/index.mjs +1 -1
  570. package/resources/licenses/index.mjs.map +1 -1
  571. package/resources/licenses/licenses.d.mts +177 -0
  572. package/resources/licenses/licenses.d.mts.map +1 -0
  573. package/resources/licenses/licenses.d.ts +12 -12
  574. package/resources/licenses/licenses.d.ts.map +1 -1
  575. package/resources/licenses/licenses.js +13 -38
  576. package/resources/licenses/licenses.js.map +1 -1
  577. package/resources/licenses/licenses.mjs +9 -11
  578. package/resources/licenses/licenses.mjs.map +1 -1
  579. package/resources/licenses/usage.d.mts +226 -0
  580. package/resources/licenses/usage.d.mts.map +1 -0
  581. package/resources/licenses/usage.d.ts +5 -5
  582. package/resources/licenses/usage.d.ts.map +1 -1
  583. package/resources/licenses/usage.js +15 -6
  584. package/resources/licenses/usage.js.map +1 -1
  585. package/resources/licenses/usage.mjs +15 -6
  586. package/resources/licenses/usage.mjs.map +1 -1
  587. package/resources/licenses.d.mts +2 -0
  588. package/resources/licenses.d.mts.map +1 -0
  589. package/resources/licenses.d.ts.map +1 -1
  590. package/resources/licenses.js +2 -15
  591. package/resources/licenses.js.map +1 -1
  592. package/resources/licenses.mjs.map +1 -1
  593. package/resources/metrics.d.mts +147 -0
  594. package/resources/metrics.d.mts.map +1 -0
  595. package/resources/metrics.d.ts +10 -11
  596. package/resources/metrics.d.ts.map +1 -1
  597. package/resources/metrics.js +19 -14
  598. package/resources/metrics.js.map +1 -1
  599. package/resources/metrics.mjs +18 -12
  600. package/resources/metrics.mjs.map +1 -1
  601. package/resources/plans/external-plan-id.d.mts +61 -0
  602. package/resources/plans/external-plan-id.d.mts.map +1 -0
  603. package/resources/plans/external-plan-id.d.ts +5 -4
  604. package/resources/plans/external-plan-id.d.ts.map +1 -1
  605. package/resources/plans/external-plan-id.js +4 -3
  606. package/resources/plans/external-plan-id.js.map +1 -1
  607. package/resources/plans/external-plan-id.mjs +4 -3
  608. package/resources/plans/external-plan-id.mjs.map +1 -1
  609. package/resources/plans/index.d.mts +4 -0
  610. package/resources/plans/index.d.mts.map +1 -0
  611. package/resources/plans/index.d.ts +2 -2
  612. package/resources/plans/index.d.ts.map +1 -1
  613. package/resources/plans/index.js +1 -3
  614. package/resources/plans/index.js.map +1 -1
  615. package/resources/plans/index.mjs +2 -2
  616. package/resources/plans/index.mjs.map +1 -1
  617. package/resources/plans/migrations.d.mts +99 -0
  618. package/resources/plans/migrations.d.mts.map +1 -0
  619. package/resources/plans/migrations.d.ts +15 -10
  620. package/resources/plans/migrations.d.ts.map +1 -1
  621. package/resources/plans/migrations.js +17 -16
  622. package/resources/plans/migrations.js.map +1 -1
  623. package/resources/plans/migrations.mjs +16 -14
  624. package/resources/plans/migrations.mjs.map +1 -1
  625. package/resources/plans/plans.d.mts +1682 -0
  626. package/resources/plans/plans.d.mts.map +1 -0
  627. package/resources/plans/plans.d.ts +13 -14
  628. package/resources/plans/plans.d.ts.map +1 -1
  629. package/resources/plans/plans.js +18 -41
  630. package/resources/plans/plans.js.map +1 -1
  631. package/resources/plans/plans.mjs +15 -15
  632. package/resources/plans/plans.mjs.map +1 -1
  633. package/resources/plans.d.mts +2 -0
  634. package/resources/plans.d.mts.map +1 -0
  635. package/resources/plans.d.ts.map +1 -1
  636. package/resources/plans.js +2 -15
  637. package/resources/plans.js.map +1 -1
  638. package/resources/plans.mjs.map +1 -1
  639. package/resources/prices/external-price-id.d.mts +55 -0
  640. package/resources/prices/external-price-id.d.mts.map +1 -0
  641. package/resources/prices/external-price-id.d.ts +7 -6
  642. package/resources/prices/external-price-id.d.ts.map +1 -1
  643. package/resources/prices/external-price-id.js +6 -5
  644. package/resources/prices/external-price-id.js.map +1 -1
  645. package/resources/prices/external-price-id.mjs +6 -5
  646. package/resources/prices/external-price-id.mjs.map +1 -1
  647. package/resources/prices/index.d.mts +3 -0
  648. package/resources/prices/index.d.mts.map +1 -0
  649. package/resources/prices/index.d.ts.map +1 -1
  650. package/resources/prices/index.mjs.map +1 -1
  651. package/resources/prices/prices.d.mts +5950 -0
  652. package/resources/prices/prices.d.mts.map +1 -0
  653. package/resources/prices/prices.d.ts +13 -13
  654. package/resources/prices/prices.d.ts.map +1 -1
  655. package/resources/prices/prices.js +23 -37
  656. package/resources/prices/prices.js.map +1 -1
  657. package/resources/prices/prices.mjs +20 -12
  658. package/resources/prices/prices.mjs.map +1 -1
  659. package/resources/prices.d.mts +2 -0
  660. package/resources/prices.d.mts.map +1 -0
  661. package/resources/prices.d.ts.map +1 -1
  662. package/resources/prices.js +2 -15
  663. package/resources/prices.js.map +1 -1
  664. package/resources/prices.mjs.map +1 -1
  665. package/resources/shared.d.mts +13354 -0
  666. package/resources/shared.d.mts.map +1 -0
  667. package/resources/shared.d.ts +4 -7
  668. package/resources/shared.d.ts.map +1 -1
  669. package/resources/shared.js +0 -11
  670. package/resources/shared.js.map +1 -1
  671. package/resources/shared.mjs +1 -7
  672. package/resources/shared.mjs.map +1 -1
  673. package/resources/subscription-changes.d.mts +434 -0
  674. package/resources/subscription-changes.d.mts.map +1 -0
  675. package/resources/subscription-changes.d.ts +10 -12
  676. package/resources/subscription-changes.d.ts.map +1 -1
  677. package/resources/subscription-changes.js +18 -18
  678. package/resources/subscription-changes.js.map +1 -1
  679. package/resources/subscription-changes.mjs +17 -16
  680. package/resources/subscription-changes.mjs.map +1 -1
  681. package/resources/subscriptions.d.mts +10821 -0
  682. package/resources/subscriptions.d.mts.map +1 -0
  683. package/resources/subscriptions.d.ts +24 -29
  684. package/resources/subscriptions.d.ts.map +1 -1
  685. package/resources/subscriptions.js +284 -40
  686. package/resources/subscriptions.js.map +1 -1
  687. package/resources/subscriptions.mjs +283 -37
  688. package/resources/subscriptions.mjs.map +1 -1
  689. package/resources/top-level.d.mts +21 -0
  690. package/resources/top-level.d.mts.map +1 -0
  691. package/resources/top-level.d.ts +4 -3
  692. package/resources/top-level.d.ts.map +1 -1
  693. package/resources/top-level.js +1 -1
  694. package/resources/top-level.js.map +1 -1
  695. package/resources/top-level.mjs +1 -1
  696. package/resources/top-level.mjs.map +1 -1
  697. package/resources/webhooks.d.mts +24 -0
  698. package/resources/webhooks.d.mts.map +1 -0
  699. package/resources/webhooks.d.ts +2 -2
  700. package/resources/webhooks.d.ts.map +1 -1
  701. package/resources/webhooks.js +18 -5
  702. package/resources/webhooks.js.map +1 -1
  703. package/resources/webhooks.mjs +16 -3
  704. package/resources/webhooks.mjs.map +1 -1
  705. package/resources.d.mts +2 -0
  706. package/resources.d.mts.map +1 -0
  707. package/resources.d.ts.map +1 -1
  708. package/resources.js +2 -15
  709. package/resources.js.map +1 -1
  710. package/resources.mjs.map +1 -1
  711. package/src/api-promise.ts +2 -0
  712. package/src/client.ts +1499 -0
  713. package/src/core/README.md +3 -0
  714. package/src/core/api-promise.ts +92 -0
  715. package/src/core/error.ts +456 -0
  716. package/src/core/pagination.ts +167 -0
  717. package/src/core/resource.ts +11 -0
  718. package/src/core/uploads.ts +2 -0
  719. package/src/error.ts +2 -456
  720. package/src/index.ts +6 -923
  721. package/src/internal/README.md +3 -0
  722. package/src/internal/builtin-types.ts +93 -0
  723. package/src/internal/detect-platform.ts +196 -0
  724. package/src/internal/errors.ts +33 -0
  725. package/src/internal/headers.ts +97 -0
  726. package/src/internal/parse.ts +56 -0
  727. package/src/internal/qs/formats.ts +2 -1
  728. package/src/internal/qs/stringify.ts +17 -20
  729. package/src/internal/qs/utils.ts +14 -14
  730. package/src/internal/request-options.ts +91 -0
  731. package/src/internal/shim-types.ts +26 -0
  732. package/src/internal/shims.ts +107 -0
  733. package/src/internal/to-file.ts +154 -0
  734. package/src/internal/types.ts +93 -0
  735. package/src/internal/uploads.ts +187 -0
  736. package/src/internal/utils/base64.ts +40 -0
  737. package/src/internal/utils/bytes.ts +32 -0
  738. package/src/internal/utils/env.ts +18 -0
  739. package/src/internal/utils/log.ts +128 -0
  740. package/src/internal/utils/path.ts +88 -0
  741. package/src/internal/utils/sleep.ts +3 -0
  742. package/src/internal/utils/uuid.ts +17 -0
  743. package/src/internal/utils/values.ts +105 -0
  744. package/src/internal/utils.ts +9 -0
  745. package/src/pagination.ts +2 -70
  746. package/src/resource.ts +2 -11
  747. package/src/resources/alerts.ts +34 -62
  748. package/src/resources/beta/beta.ts +23 -13
  749. package/src/resources/beta/external-plan-id.ts +20 -12
  750. package/src/resources/beta/index.ts +2 -0
  751. package/src/resources/coupons/coupons.ts +16 -21
  752. package/src/resources/coupons/index.ts +7 -1
  753. package/src/resources/coupons/subscriptions.ts +13 -24
  754. package/src/resources/credit-blocks.ts +12 -12
  755. package/src/resources/credit-notes.ts +13 -20
  756. package/src/resources/customers/balance-transactions.ts +15 -28
  757. package/src/resources/customers/costs.ts +13 -33
  758. package/src/resources/customers/credits/credits.ts +26 -52
  759. package/src/resources/customers/credits/index.ts +8 -6
  760. package/src/resources/customers/credits/ledger.ts +29 -55
  761. package/src/resources/customers/credits/top-ups.ts +48 -61
  762. package/src/resources/customers/customers.ts +37 -48
  763. package/src/resources/customers/index.ts +4 -4
  764. package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +19 -30
  765. package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +12 -10
  766. package/src/resources/dimensional-price-groups/index.ts +1 -1
  767. package/src/resources/events/backfills.ts +18 -27
  768. package/src/resources/events/events.ts +14 -15
  769. package/src/resources/events/index.ts +1 -1
  770. package/src/resources/events/volume.ts +4 -3
  771. package/src/resources/index.ts +29 -28
  772. package/src/resources/invoice-line-items.ts +5 -4
  773. package/src/resources/invoices.ts +53 -95
  774. package/src/resources/items.ts +18 -24
  775. package/src/resources/license-types.ts +14 -31
  776. package/src/resources/licenses/external-licenses.ts +10 -5
  777. package/src/resources/licenses/index.ts +1 -1
  778. package/src/resources/licenses/licenses.ts +21 -20
  779. package/src/resources/licenses/usage.ts +9 -20
  780. package/src/resources/metrics.ts +16 -29
  781. package/src/resources/plans/external-plan-id.ts +9 -7
  782. package/src/resources/plans/index.ts +4 -2
  783. package/src/resources/plans/migrations.ts +30 -31
  784. package/src/resources/plans/plans.ts +22 -24
  785. package/src/resources/prices/external-price-id.ts +11 -9
  786. package/src/resources/prices/prices.ts +23 -31
  787. package/src/resources/shared.ts +4 -4
  788. package/src/resources/subscription-changes.ts +21 -44
  789. package/src/resources/subscriptions.ts +66 -106
  790. package/src/resources/top-level.ts +4 -3
  791. package/src/resources/webhooks.ts +17 -3
  792. package/src/tsconfig.json +2 -2
  793. package/src/uploads.ts +2 -255
  794. package/src/version.ts +1 -1
  795. package/uploads.d.mts +3 -0
  796. package/uploads.d.mts.map +1 -0
  797. package/uploads.d.ts +2 -74
  798. package/uploads.d.ts.map +1 -1
  799. package/uploads.js +3 -168
  800. package/uploads.js.map +1 -1
  801. package/uploads.mjs +2 -157
  802. package/uploads.mjs.map +1 -1
  803. package/version.d.mts +2 -0
  804. package/version.d.mts.map +1 -0
  805. package/version.d.ts +1 -1
  806. package/version.d.ts.map +1 -1
  807. package/version.js +1 -1
  808. package/version.js.map +1 -1
  809. package/version.mjs +1 -1
  810. package/version.mjs.map +1 -1
  811. package/_shims/MultipartBody.d.ts +0 -9
  812. package/_shims/MultipartBody.d.ts.map +0 -1
  813. package/_shims/MultipartBody.js +0 -16
  814. package/_shims/MultipartBody.js.map +0 -1
  815. package/_shims/MultipartBody.mjs +0 -12
  816. package/_shims/MultipartBody.mjs.map +0 -1
  817. package/_shims/README.md +0 -46
  818. package/_shims/auto/runtime-bun.d.ts +0 -5
  819. package/_shims/auto/runtime-bun.d.ts.map +0 -1
  820. package/_shims/auto/runtime-bun.js +0 -21
  821. package/_shims/auto/runtime-bun.js.map +0 -1
  822. package/_shims/auto/runtime-bun.mjs +0 -2
  823. package/_shims/auto/runtime-bun.mjs.map +0 -1
  824. package/_shims/auto/runtime-node.d.ts +0 -5
  825. package/_shims/auto/runtime-node.d.ts.map +0 -1
  826. package/_shims/auto/runtime-node.js +0 -21
  827. package/_shims/auto/runtime-node.js.map +0 -1
  828. package/_shims/auto/runtime-node.mjs +0 -2
  829. package/_shims/auto/runtime-node.mjs.map +0 -1
  830. package/_shims/auto/runtime.d.ts +0 -5
  831. package/_shims/auto/runtime.d.ts.map +0 -1
  832. package/_shims/auto/runtime.js +0 -21
  833. package/_shims/auto/runtime.js.map +0 -1
  834. package/_shims/auto/runtime.mjs +0 -2
  835. package/_shims/auto/runtime.mjs.map +0 -1
  836. package/_shims/auto/types-node.d.ts +0 -5
  837. package/_shims/auto/types-node.d.ts.map +0 -1
  838. package/_shims/auto/types-node.js +0 -21
  839. package/_shims/auto/types-node.js.map +0 -1
  840. package/_shims/auto/types-node.mjs +0 -2
  841. package/_shims/auto/types-node.mjs.map +0 -1
  842. package/_shims/auto/types.d.ts +0 -101
  843. package/_shims/auto/types.js +0 -3
  844. package/_shims/auto/types.mjs +0 -3
  845. package/_shims/bun-runtime.d.ts +0 -6
  846. package/_shims/bun-runtime.d.ts.map +0 -1
  847. package/_shims/bun-runtime.js +0 -14
  848. package/_shims/bun-runtime.js.map +0 -1
  849. package/_shims/bun-runtime.mjs +0 -10
  850. package/_shims/bun-runtime.mjs.map +0 -1
  851. package/_shims/index.d.ts +0 -83
  852. package/_shims/index.js +0 -17
  853. package/_shims/index.mjs +0 -11
  854. package/_shims/manual-types.d.ts +0 -12
  855. package/_shims/manual-types.js +0 -3
  856. package/_shims/manual-types.mjs +0 -3
  857. package/_shims/node-runtime.d.ts +0 -3
  858. package/_shims/node-runtime.d.ts.map +0 -1
  859. package/_shims/node-runtime.js +0 -89
  860. package/_shims/node-runtime.js.map +0 -1
  861. package/_shims/node-runtime.mjs +0 -56
  862. package/_shims/node-runtime.mjs.map +0 -1
  863. package/_shims/node-types.d.ts +0 -42
  864. package/_shims/node-types.js +0 -3
  865. package/_shims/node-types.mjs +0 -3
  866. package/_shims/registry.d.ts +0 -37
  867. package/_shims/registry.d.ts.map +0 -1
  868. package/_shims/registry.js +0 -41
  869. package/_shims/registry.js.map +0 -1
  870. package/_shims/registry.mjs +0 -37
  871. package/_shims/registry.mjs.map +0 -1
  872. package/_shims/web-runtime.d.ts +0 -5
  873. package/_shims/web-runtime.d.ts.map +0 -1
  874. package/_shims/web-runtime.js +0 -78
  875. package/_shims/web-runtime.js.map +0 -1
  876. package/_shims/web-runtime.mjs +0 -71
  877. package/_shims/web-runtime.mjs.map +0 -1
  878. package/_shims/web-types.d.ts +0 -83
  879. package/_shims/web-types.js +0 -3
  880. package/_shims/web-types.mjs +0 -3
  881. package/core.d.ts +0 -255
  882. package/core.d.ts.map +0 -1
  883. package/core.js +0 -920
  884. package/core.js.map +0 -1
  885. package/core.mjs +0 -888
  886. package/core.mjs.map +0 -1
  887. package/shims/node.d.ts +0 -30
  888. package/shims/node.d.ts.map +0 -1
  889. package/shims/node.js +0 -31
  890. package/shims/node.js.map +0 -1
  891. package/shims/node.mjs +0 -5
  892. package/shims/node.mjs.map +0 -1
  893. package/shims/web.d.ts +0 -26
  894. package/shims/web.d.ts.map +0 -1
  895. package/shims/web.js +0 -31
  896. package/shims/web.js.map +0 -1
  897. package/shims/web.mjs +0 -5
  898. package/shims/web.mjs.map +0 -1
  899. package/src/_shims/MultipartBody.ts +0 -9
  900. package/src/_shims/README.md +0 -46
  901. package/src/_shims/auto/runtime-bun.ts +0 -4
  902. package/src/_shims/auto/runtime-node.ts +0 -4
  903. package/src/_shims/auto/runtime.ts +0 -4
  904. package/src/_shims/auto/types-node.ts +0 -4
  905. package/src/_shims/auto/types.d.ts +0 -101
  906. package/src/_shims/auto/types.js +0 -3
  907. package/src/_shims/auto/types.mjs +0 -3
  908. package/src/_shims/bun-runtime.ts +0 -14
  909. package/src/_shims/index.d.ts +0 -83
  910. package/src/_shims/index.js +0 -17
  911. package/src/_shims/index.mjs +0 -11
  912. package/src/_shims/manual-types.d.ts +0 -12
  913. package/src/_shims/manual-types.js +0 -3
  914. package/src/_shims/manual-types.mjs +0 -3
  915. package/src/_shims/node-runtime.ts +0 -81
  916. package/src/_shims/node-types.d.ts +0 -42
  917. package/src/_shims/node-types.js +0 -3
  918. package/src/_shims/node-types.mjs +0 -3
  919. package/src/_shims/registry.ts +0 -67
  920. package/src/_shims/web-runtime.ts +0 -103
  921. package/src/_shims/web-types.d.ts +0 -83
  922. package/src/_shims/web-types.js +0 -3
  923. package/src/_shims/web-types.mjs +0 -3
  924. package/src/core.ts +0 -1231
  925. package/src/shims/node.ts +0 -50
  926. package/src/shims/web.ts +0 -50
@@ -0,0 +1,1682 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as Shared from "../shared.mjs";
3
+ import * as ExternalPlanIDAPI from "./external-plan-id.mjs";
4
+ import { ExternalPlanID, ExternalPlanIDUpdateParams } from "./external-plan-id.mjs";
5
+ import * as MigrationsAPI from "./migrations.mjs";
6
+ import { MigrationCancelParams, MigrationCancelResponse, MigrationListParams, MigrationListResponse, MigrationListResponsesPage, MigrationRetrieveParams, MigrationRetrieveResponse, Migrations } from "./migrations.mjs";
7
+ import { APIPromise } from "../../core/api-promise.mjs";
8
+ import { Page, type PageParams, PagePromise } from "../../core/pagination.mjs";
9
+ import { RequestOptions } from "../../internal/request-options.mjs";
10
+ /**
11
+ * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
12
+ * customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices
13
+ * in the [Price resource](/reference/price).
14
+ */
15
+ export declare class Plans extends APIResource {
16
+ externalPlanID: ExternalPlanIDAPI.ExternalPlanID;
17
+ migrations: MigrationsAPI.Migrations;
18
+ /**
19
+ * This endpoint allows creation of plans including their prices.
20
+ */
21
+ create(body: PlanCreateParams, options?: RequestOptions): APIPromise<Plan>;
22
+ /**
23
+ * This endpoint can be used to update the `external_plan_id`, `description`, and
24
+ * `metadata` of an existing plan.
25
+ *
26
+ * Other fields on a plan are currently immutable.
27
+ */
28
+ update(planId: string, body: PlanUpdateParams, options?: RequestOptions): APIPromise<Plan>;
29
+ /**
30
+ * This endpoint returns a list of all [plans](/core-concepts#plan-and-price) for
31
+ * an account in a list format. The list of plans is ordered starting from the most
32
+ * recently created plan. The response also includes
33
+ * [`pagination_metadata`](/api-reference/pagination) which lets the caller
34
+ * retrieve the next page of results if they exist.
35
+ */
36
+ list(query?: PlanListParams | null | undefined, options?: RequestOptions): PagePromise<PlansPage, Plan>;
37
+ /**
38
+ * This endpoint is used to fetch [plan](/core-concepts#plan-and-price) details
39
+ * given a plan identifier. It returns information about the prices included in the
40
+ * plan and their configuration, as well as the product that the plan is attached
41
+ * to.
42
+ *
43
+ * ## Serialized prices
44
+ *
45
+ * Orb supports a few different pricing models out of the box. Each of these models
46
+ * is serialized differently in a given [Price](/core-concepts#plan-and-price)
47
+ * object. The `model_type` field determines the key for the configuration object
48
+ * that is present. A detailed explanation of price types can be found in the
49
+ * [Price schema](/core-concepts#plan-and-price).
50
+ *
51
+ * ## Phases
52
+ *
53
+ * Orb supports plan phases, also known as contract ramps. For plans with phases,
54
+ * the serialized prices refer to all prices across all phases.
55
+ */
56
+ fetch(planId: string, options?: RequestOptions): APIPromise<Plan>;
57
+ }
58
+ export type PlansPage = Page<Plan>;
59
+ /**
60
+ * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
61
+ * subscribed to by a customer. Plans define the billing behavior of the
62
+ * subscription. You can see more about how to configure prices in the
63
+ * [Price resource](/reference/price).
64
+ */
65
+ export interface Plan {
66
+ id: string;
67
+ /**
68
+ * Adjustments for this plan. If the plan has phases, this includes adjustments
69
+ * across all phases of the plan.
70
+ */
71
+ adjustments: Array<Shared.PlanPhaseUsageDiscountAdjustment | Shared.PlanPhaseAmountDiscountAdjustment | Shared.PlanPhasePercentageDiscountAdjustment | Plan.PlanPhaseTieredPercentageDiscountAdjustment | Shared.PlanPhaseMinimumAdjustment | Shared.PlanPhaseMaximumAdjustment>;
72
+ /**
73
+ * @deprecated Legacy field representing the parent plan if the current plan is a
74
+ * 'child plan', overriding prices from the parent.
75
+ */
76
+ base_plan: Plan.BasePlan | null;
77
+ /**
78
+ * @deprecated Legacy field representing the parent plan ID if the current plan is
79
+ * a 'child plan', overriding prices from the parent.
80
+ */
81
+ base_plan_id: string | null;
82
+ created_at: string;
83
+ /**
84
+ * @deprecated An ISO 4217 currency string or custom pricing unit (`credits`) for
85
+ * this plan's prices.
86
+ */
87
+ currency: string;
88
+ /**
89
+ * The default memo text on the invoices corresponding to subscriptions on this
90
+ * plan. Note that each subscription may configure its own memo.
91
+ */
92
+ default_invoice_memo: string | null;
93
+ description: string;
94
+ /**
95
+ * @deprecated
96
+ */
97
+ discount: Shared.Discount | null;
98
+ /**
99
+ * An optional user-defined ID for this plan resource, used throughout the system
100
+ * as an alias for this Plan. Use this field to identify a plan by an existing
101
+ * identifier in your system.
102
+ */
103
+ external_plan_id: string | null;
104
+ /**
105
+ * An ISO 4217 currency string for which this plan is billed in. Matches `currency`
106
+ * unless `currency` is a custom pricing unit.
107
+ */
108
+ invoicing_currency: string;
109
+ /**
110
+ * @deprecated
111
+ */
112
+ maximum: Shared.Maximum | null;
113
+ /**
114
+ * @deprecated
115
+ */
116
+ maximum_amount: string | null;
117
+ /**
118
+ * User specified key-value pairs for the resource. If not present, this defaults
119
+ * to an empty dictionary. Individual keys can be removed by setting the value to
120
+ * `null`, and the entire metadata mapping can be cleared by setting `metadata` to
121
+ * `null`.
122
+ */
123
+ metadata: {
124
+ [key: string]: string;
125
+ };
126
+ /**
127
+ * @deprecated
128
+ */
129
+ minimum: Shared.Minimum | null;
130
+ /**
131
+ * @deprecated
132
+ */
133
+ minimum_amount: string | null;
134
+ name: string;
135
+ /**
136
+ * Determines the difference between the invoice issue date and the due date. A
137
+ * value of "0" here signifies that invoices are due on issue, whereas a value of
138
+ * "30" means that the customer has a month to pay the invoice before its overdue.
139
+ * Note that individual subscriptions or invoices may set a different net terms
140
+ * configuration.
141
+ */
142
+ net_terms: number | null;
143
+ plan_phases: Array<Plan.PlanPhase> | null;
144
+ /**
145
+ * Prices for this plan. If the plan has phases, this includes prices across all
146
+ * phases of the plan.
147
+ */
148
+ prices: Array<Shared.Price>;
149
+ product: Plan.Product;
150
+ status: 'active' | 'archived' | 'draft';
151
+ trial_config: Plan.TrialConfig;
152
+ version: number;
153
+ }
154
+ export declare namespace Plan {
155
+ interface PlanPhaseTieredPercentageDiscountAdjustment {
156
+ id: string;
157
+ adjustment_type: 'tiered_percentage_discount';
158
+ /**
159
+ * @deprecated The price IDs that this adjustment applies to.
160
+ */
161
+ applies_to_price_ids: Array<string>;
162
+ /**
163
+ * The filters that determine which prices to apply this adjustment to.
164
+ */
165
+ filters: Array<PlanPhaseTieredPercentageDiscountAdjustment.Filter>;
166
+ /**
167
+ * True for adjustments that apply to an entire invoice, false for adjustments that
168
+ * apply to only one price.
169
+ */
170
+ is_invoice_level: boolean;
171
+ /**
172
+ * The plan phase in which this adjustment is active.
173
+ */
174
+ plan_phase_order: number | null;
175
+ /**
176
+ * The reason for the adjustment.
177
+ */
178
+ reason: string | null;
179
+ /**
180
+ * The adjustment id this adjustment replaces. This adjustment will take the place
181
+ * of the replaced adjustment in plan version migrations.
182
+ */
183
+ replaces_adjustment_id: string | null;
184
+ /**
185
+ * The ordered, contiguous bands of cumulative eligible spend, each discounted at
186
+ * its own percentage (progressive fill-a-tier), applied to the prices this
187
+ * adjustment covers in a given billing period.
188
+ */
189
+ tiers: Array<PlanPhaseTieredPercentageDiscountAdjustment.Tier>;
190
+ }
191
+ namespace PlanPhaseTieredPercentageDiscountAdjustment {
192
+ interface Filter {
193
+ /**
194
+ * The property of the price to filter on.
195
+ */
196
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
197
+ /**
198
+ * Should prices that match the filter be included or excluded.
199
+ */
200
+ operator: 'includes' | 'excludes';
201
+ /**
202
+ * The IDs or values that match this filter.
203
+ */
204
+ values: Array<string>;
205
+ }
206
+ /**
207
+ * One band of a tiered percentage discount. Bounds are denominated in the
208
+ * discount's currency. `lower_bound` is the exclusive start of the band and
209
+ * `upper_bound` is the inclusive end; `upper_bound` is null only for the
210
+ * open-ended final tier.
211
+ */
212
+ interface Tier {
213
+ /**
214
+ * Exclusive lower bound of cumulative spend for this tier.
215
+ */
216
+ lower_bound: number;
217
+ /**
218
+ * The percentage (between 0 and 1) discounted from spend that falls within this
219
+ * tier.
220
+ */
221
+ percentage: number;
222
+ /**
223
+ * Inclusive upper bound of cumulative spend for this tier; null for the final
224
+ * open-ended tier.
225
+ */
226
+ upper_bound?: number | null;
227
+ }
228
+ }
229
+ /**
230
+ * @deprecated Legacy field representing the parent plan if the current plan is a
231
+ * 'child plan', overriding prices from the parent.
232
+ */
233
+ interface BasePlan {
234
+ id: string | null;
235
+ /**
236
+ * An optional user-defined ID for this plan resource, used throughout the system
237
+ * as an alias for this Plan. Use this field to identify a plan by an existing
238
+ * identifier in your system.
239
+ */
240
+ external_plan_id: string | null;
241
+ name: string | null;
242
+ }
243
+ interface PlanPhase {
244
+ id: string;
245
+ description: string | null;
246
+ discount: Shared.Discount | null;
247
+ /**
248
+ * How many terms of length `duration_unit` this phase is active for. If null, this
249
+ * phase is evergreen and active indefinitely
250
+ */
251
+ duration: number | null;
252
+ duration_unit: 'daily' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | null;
253
+ maximum: Shared.Maximum | null;
254
+ maximum_amount: string | null;
255
+ minimum: Shared.Minimum | null;
256
+ minimum_amount: string | null;
257
+ name: string;
258
+ /**
259
+ * Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
260
+ */
261
+ order: number;
262
+ }
263
+ interface Product {
264
+ id: string;
265
+ created_at: string;
266
+ name: string;
267
+ }
268
+ interface TrialConfig {
269
+ trial_period: number | null;
270
+ trial_period_unit: 'days';
271
+ }
272
+ }
273
+ export interface PlanCreateParams {
274
+ /**
275
+ * An ISO 4217 currency string for invoices generated by subscriptions on this
276
+ * plan.
277
+ */
278
+ currency: string;
279
+ name: string;
280
+ /**
281
+ * Prices for this plan. If the plan has phases, this includes prices across all
282
+ * phases of the plan.
283
+ */
284
+ prices: Array<PlanCreateParams.Price>;
285
+ /**
286
+ * Adjustments for this plan. If the plan has phases, this includes adjustments
287
+ * across all phases of the plan.
288
+ */
289
+ adjustments?: Array<PlanCreateParams.Adjustment> | null;
290
+ /**
291
+ * Free-form text which is available on the invoice PDF and the Orb invoice portal.
292
+ */
293
+ default_invoice_memo?: string | null;
294
+ /**
295
+ * An optional user-defined description of the plan.
296
+ */
297
+ description?: string | null;
298
+ external_plan_id?: string | null;
299
+ /**
300
+ * User-specified key/value pairs for the resource. Individual keys can be removed
301
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
302
+ * by setting `metadata` to `null`.
303
+ */
304
+ metadata?: {
305
+ [key: string]: string | null;
306
+ } | null;
307
+ /**
308
+ * The net terms determines the difference between the invoice date and the issue
309
+ * date for the invoice. If you intend the invoice to be due on issue, set this
310
+ * to 0.
311
+ */
312
+ net_terms?: number | null;
313
+ /**
314
+ * Configuration of pre-defined phases, each with their own prices and adjustments.
315
+ * Leave unspecified for plans with a single phase.
316
+ */
317
+ plan_phases?: Array<PlanCreateParams.PlanPhase> | null;
318
+ /**
319
+ * The status of the plan to create (either active or draft). If not specified,
320
+ * this defaults to active.
321
+ */
322
+ status?: 'active' | 'draft';
323
+ }
324
+ export declare namespace PlanCreateParams {
325
+ interface Price {
326
+ /**
327
+ * The allocation price to add to the plan.
328
+ */
329
+ allocation_price?: Shared.NewAllocationPrice | null;
330
+ /**
331
+ * The license allocation price to add to the plan.
332
+ */
333
+ license_allocation_price?: Price.LicenseAllocationPrice | null;
334
+ /**
335
+ * The phase to add this price to.
336
+ */
337
+ plan_phase_order?: number | null;
338
+ /**
339
+ * New plan price request body params.
340
+ */
341
+ price?: Shared.NewPlanUnitPrice | Shared.NewPlanTieredPrice | Shared.NewPlanBulkPrice | Price.NewPlanBulkWithFiltersPrice | Shared.NewPlanPackagePrice | Shared.NewPlanMatrixPrice | Shared.NewPlanThresholdTotalAmountPrice | Shared.NewPlanTieredPackagePrice | Shared.NewPlanTieredWithMinimumPrice | Shared.NewPlanGroupedTieredPrice | Shared.NewPlanTieredPackageWithMinimumPrice | Shared.NewPlanPackageWithAllocationPrice | Shared.NewPlanUnitWithPercentPrice | Shared.NewPlanMatrixWithAllocationPrice | Price.NewPlanMatrixWithThresholdDiscountsPrice | Price.NewPlanTieredWithProrationPrice | Shared.NewPlanUnitWithProrationPrice | Shared.NewPlanGroupedAllocationPrice | Shared.NewPlanBulkWithProrationPrice | Shared.NewPlanGroupedWithProratedMinimumPrice | Shared.NewPlanGroupedWithMeteredMinimumPrice | Price.NewPlanGroupedWithMinMaxThresholdsPrice | Shared.NewPlanMatrixWithDisplayNamePrice | Shared.NewPlanGroupedTieredPackagePrice | Shared.NewPlanMaxGroupTieredPackagePrice | Shared.NewPlanScalableMatrixWithUnitPricingPrice | Shared.NewPlanScalableMatrixWithTieredPricingPrice | Shared.NewPlanCumulativeGroupedBulkPrice | Price.NewPlanCumulativeGroupedAllocationPrice | Price.NewPlanDailyCreditAllowancePrice | Price.NewPlanMeteredAllowancePrice | Shared.NewPlanMinimumCompositePrice | Price.NewPlanPercentCompositePrice | Price.NewPlanEventOutputPrice | null;
342
+ }
343
+ namespace Price {
344
+ /**
345
+ * The license allocation price to add to the plan.
346
+ */
347
+ interface LicenseAllocationPrice {
348
+ /**
349
+ * The cadence to bill for this price on.
350
+ */
351
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
352
+ /**
353
+ * The id of the item the price will be associated with.
354
+ */
355
+ item_id: string;
356
+ /**
357
+ * License allocations to associate with this price. Each entry defines a
358
+ * per-license credit pool granted each cadence. Requires license_type_id or
359
+ * license_type_configuration to be set.
360
+ */
361
+ license_allocations: Array<LicenseAllocationPrice.LicenseAllocation>;
362
+ /**
363
+ * The pricing model type
364
+ */
365
+ model_type: 'unit';
366
+ /**
367
+ * The name of the price.
368
+ */
369
+ name: string;
370
+ /**
371
+ * Configuration for unit pricing
372
+ */
373
+ unit_config: Shared.UnitConfig;
374
+ /**
375
+ * The id of the billable metric for the price. Only needed if the price is
376
+ * usage-based.
377
+ */
378
+ billable_metric_id?: string | null;
379
+ /**
380
+ * If the Price represents a fixed cost, the price will be billed in-advance if
381
+ * this is true, and in-arrears if this is false.
382
+ */
383
+ billed_in_advance?: boolean | null;
384
+ /**
385
+ * For custom cadence: specifies the duration of the billing period in days or
386
+ * months.
387
+ */
388
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
389
+ /**
390
+ * The per unit conversion rate of the price currency to the invoicing currency.
391
+ */
392
+ conversion_rate?: number | null;
393
+ /**
394
+ * The configuration for the rate of the price currency to the invoicing currency.
395
+ */
396
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
397
+ /**
398
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
399
+ * price is billed.
400
+ */
401
+ currency?: string | null;
402
+ /**
403
+ * For dimensional price: specifies a price group and dimension values
404
+ */
405
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
406
+ /**
407
+ * An alias for the price.
408
+ */
409
+ external_price_id?: string | null;
410
+ /**
411
+ * If the Price represents a fixed cost, this represents the quantity of units
412
+ * applied.
413
+ */
414
+ fixed_price_quantity?: number | null;
415
+ /**
416
+ * The property used to group this price on an invoice
417
+ */
418
+ invoice_grouping_key?: string | null;
419
+ /**
420
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
421
+ * If unspecified, a single invoice is produced per billing cycle.
422
+ */
423
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
424
+ /**
425
+ * The ID of the license type to associate with this price.
426
+ */
427
+ license_type_id?: string | null;
428
+ /**
429
+ * User-specified key/value pairs for the resource. Individual keys can be removed
430
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
431
+ * by setting `metadata` to `null`.
432
+ */
433
+ metadata?: {
434
+ [key: string]: string | null;
435
+ } | null;
436
+ /**
437
+ * A transient ID that can be used to reference this price when adding adjustments
438
+ * in the same API call.
439
+ */
440
+ reference_id?: string | null;
441
+ }
442
+ namespace LicenseAllocationPrice {
443
+ interface LicenseAllocation {
444
+ /**
445
+ * The amount of credits granted per active license per cadence.
446
+ */
447
+ amount: string;
448
+ /**
449
+ * The currency of the license allocation.
450
+ */
451
+ currency: string;
452
+ /**
453
+ * When True, overage beyond the allocation is written off.
454
+ */
455
+ write_off_overage?: boolean | null;
456
+ }
457
+ }
458
+ interface NewPlanBulkWithFiltersPrice {
459
+ /**
460
+ * Configuration for bulk_with_filters pricing
461
+ */
462
+ bulk_with_filters_config: NewPlanBulkWithFiltersPrice.BulkWithFiltersConfig;
463
+ /**
464
+ * The cadence to bill for this price on.
465
+ */
466
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
467
+ /**
468
+ * The id of the item the price will be associated with.
469
+ */
470
+ item_id: string;
471
+ /**
472
+ * The pricing model type
473
+ */
474
+ model_type: 'bulk_with_filters';
475
+ /**
476
+ * The name of the price.
477
+ */
478
+ name: string;
479
+ /**
480
+ * The id of the billable metric for the price. Only needed if the price is
481
+ * usage-based.
482
+ */
483
+ billable_metric_id?: string | null;
484
+ /**
485
+ * If the Price represents a fixed cost, the price will be billed in-advance if
486
+ * this is true, and in-arrears if this is false.
487
+ */
488
+ billed_in_advance?: boolean | null;
489
+ /**
490
+ * For custom cadence: specifies the duration of the billing period in days or
491
+ * months.
492
+ */
493
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
494
+ /**
495
+ * The per unit conversion rate of the price currency to the invoicing currency.
496
+ */
497
+ conversion_rate?: number | null;
498
+ /**
499
+ * The configuration for the rate of the price currency to the invoicing currency.
500
+ */
501
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
502
+ /**
503
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
504
+ * price is billed.
505
+ */
506
+ currency?: string | null;
507
+ /**
508
+ * For dimensional price: specifies a price group and dimension values
509
+ */
510
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
511
+ /**
512
+ * An alias for the price.
513
+ */
514
+ external_price_id?: string | null;
515
+ /**
516
+ * If the Price represents a fixed cost, this represents the quantity of units
517
+ * applied.
518
+ */
519
+ fixed_price_quantity?: number | null;
520
+ /**
521
+ * The property used to group this price on an invoice
522
+ */
523
+ invoice_grouping_key?: string | null;
524
+ /**
525
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
526
+ * If unspecified, a single invoice is produced per billing cycle.
527
+ */
528
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
529
+ /**
530
+ * The ID of the license type to associate with this price.
531
+ */
532
+ license_type_id?: string | null;
533
+ /**
534
+ * User-specified key/value pairs for the resource. Individual keys can be removed
535
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
536
+ * by setting `metadata` to `null`.
537
+ */
538
+ metadata?: {
539
+ [key: string]: string | null;
540
+ } | null;
541
+ /**
542
+ * A transient ID that can be used to reference this price when adding adjustments
543
+ * in the same API call.
544
+ */
545
+ reference_id?: string | null;
546
+ }
547
+ namespace NewPlanBulkWithFiltersPrice {
548
+ /**
549
+ * Configuration for bulk_with_filters pricing
550
+ */
551
+ interface BulkWithFiltersConfig {
552
+ /**
553
+ * Property filters to apply (all must match)
554
+ */
555
+ filters: Array<BulkWithFiltersConfig.Filter>;
556
+ /**
557
+ * Bulk tiers for rating based on total usage volume
558
+ */
559
+ tiers: Array<BulkWithFiltersConfig.Tier>;
560
+ }
561
+ namespace BulkWithFiltersConfig {
562
+ /**
563
+ * Configuration for a single property filter
564
+ */
565
+ interface Filter {
566
+ /**
567
+ * Event property key to filter on
568
+ */
569
+ property_key: string;
570
+ /**
571
+ * Event property value to match
572
+ */
573
+ property_value: string;
574
+ }
575
+ /**
576
+ * Configuration for a single bulk pricing tier
577
+ */
578
+ interface Tier {
579
+ /**
580
+ * Amount per unit
581
+ */
582
+ unit_amount: string;
583
+ /**
584
+ * The lower bound for this tier
585
+ */
586
+ tier_lower_bound?: string | null;
587
+ }
588
+ }
589
+ }
590
+ interface NewPlanMatrixWithThresholdDiscountsPrice {
591
+ /**
592
+ * The cadence to bill for this price on.
593
+ */
594
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
595
+ /**
596
+ * The id of the item the price will be associated with.
597
+ */
598
+ item_id: string;
599
+ /**
600
+ * Configuration for matrix_with_threshold_discounts pricing
601
+ */
602
+ matrix_with_threshold_discounts_config: NewPlanMatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
603
+ /**
604
+ * The pricing model type
605
+ */
606
+ model_type: 'matrix_with_threshold_discounts';
607
+ /**
608
+ * The name of the price.
609
+ */
610
+ name: string;
611
+ /**
612
+ * The id of the billable metric for the price. Only needed if the price is
613
+ * usage-based.
614
+ */
615
+ billable_metric_id?: string | null;
616
+ /**
617
+ * If the Price represents a fixed cost, the price will be billed in-advance if
618
+ * this is true, and in-arrears if this is false.
619
+ */
620
+ billed_in_advance?: boolean | null;
621
+ /**
622
+ * For custom cadence: specifies the duration of the billing period in days or
623
+ * months.
624
+ */
625
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
626
+ /**
627
+ * The per unit conversion rate of the price currency to the invoicing currency.
628
+ */
629
+ conversion_rate?: number | null;
630
+ /**
631
+ * The configuration for the rate of the price currency to the invoicing currency.
632
+ */
633
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
634
+ /**
635
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
636
+ * price is billed.
637
+ */
638
+ currency?: string | null;
639
+ /**
640
+ * For dimensional price: specifies a price group and dimension values
641
+ */
642
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
643
+ /**
644
+ * An alias for the price.
645
+ */
646
+ external_price_id?: string | null;
647
+ /**
648
+ * If the Price represents a fixed cost, this represents the quantity of units
649
+ * applied.
650
+ */
651
+ fixed_price_quantity?: number | null;
652
+ /**
653
+ * The property used to group this price on an invoice
654
+ */
655
+ invoice_grouping_key?: string | null;
656
+ /**
657
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
658
+ * If unspecified, a single invoice is produced per billing cycle.
659
+ */
660
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
661
+ /**
662
+ * The ID of the license type to associate with this price.
663
+ */
664
+ license_type_id?: string | null;
665
+ /**
666
+ * User-specified key/value pairs for the resource. Individual keys can be removed
667
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
668
+ * by setting `metadata` to `null`.
669
+ */
670
+ metadata?: {
671
+ [key: string]: string | null;
672
+ } | null;
673
+ /**
674
+ * A transient ID that can be used to reference this price when adding adjustments
675
+ * in the same API call.
676
+ */
677
+ reference_id?: string | null;
678
+ }
679
+ namespace NewPlanMatrixWithThresholdDiscountsPrice {
680
+ /**
681
+ * Configuration for matrix_with_threshold_discounts pricing
682
+ */
683
+ interface MatrixWithThresholdDiscountsConfig {
684
+ /**
685
+ * Unit price used for usage that does not match any defined matrix cell.
686
+ */
687
+ default_unit_amount: string;
688
+ /**
689
+ * First matrix dimension key.
690
+ */
691
+ first_dimension: string;
692
+ /**
693
+ * Per-cell unit prices.
694
+ */
695
+ matrix_values: Array<MatrixWithThresholdDiscountsConfig.MatrixValue>;
696
+ /**
697
+ * Optional second matrix dimension key.
698
+ */
699
+ second_dimension?: string | null;
700
+ threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
701
+ }
702
+ namespace MatrixWithThresholdDiscountsConfig {
703
+ interface MatrixValue {
704
+ first_dimension_value: string;
705
+ unit_amount: string;
706
+ second_dimension_value?: string | null;
707
+ }
708
+ interface ThresholdDiscountGroup {
709
+ /**
710
+ * Discount rate applied to spend above the threshold.
711
+ */
712
+ above_threshold_discount_percentage: string;
713
+ /**
714
+ * Discount rate applied to spend at or below the threshold. Set to 0 for no
715
+ * baseline discount.
716
+ */
717
+ below_threshold_discount_percentage: string;
718
+ /**
719
+ * Semicolon-separated list of matrix cell coordinates targeted by this group. Each
720
+ * coordinate is `first,second` when the matrix has two dimensions, or just `first`
721
+ * for a single-dimension matrix. Example: `blue,circle;green,triangle`.
722
+ */
723
+ cell_coordinates: string;
724
+ threshold_amount: string;
725
+ description?: string | null;
726
+ }
727
+ }
728
+ }
729
+ interface NewPlanTieredWithProrationPrice {
730
+ /**
731
+ * The cadence to bill for this price on.
732
+ */
733
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
734
+ /**
735
+ * The id of the item the price will be associated with.
736
+ */
737
+ item_id: string;
738
+ /**
739
+ * The pricing model type
740
+ */
741
+ model_type: 'tiered_with_proration';
742
+ /**
743
+ * The name of the price.
744
+ */
745
+ name: string;
746
+ /**
747
+ * Configuration for tiered_with_proration pricing
748
+ */
749
+ tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
750
+ /**
751
+ * The id of the billable metric for the price. Only needed if the price is
752
+ * usage-based.
753
+ */
754
+ billable_metric_id?: string | null;
755
+ /**
756
+ * If the Price represents a fixed cost, the price will be billed in-advance if
757
+ * this is true, and in-arrears if this is false.
758
+ */
759
+ billed_in_advance?: boolean | null;
760
+ /**
761
+ * For custom cadence: specifies the duration of the billing period in days or
762
+ * months.
763
+ */
764
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
765
+ /**
766
+ * The per unit conversion rate of the price currency to the invoicing currency.
767
+ */
768
+ conversion_rate?: number | null;
769
+ /**
770
+ * The configuration for the rate of the price currency to the invoicing currency.
771
+ */
772
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
773
+ /**
774
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
775
+ * price is billed.
776
+ */
777
+ currency?: string | null;
778
+ /**
779
+ * For dimensional price: specifies a price group and dimension values
780
+ */
781
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
782
+ /**
783
+ * An alias for the price.
784
+ */
785
+ external_price_id?: string | null;
786
+ /**
787
+ * If the Price represents a fixed cost, this represents the quantity of units
788
+ * applied.
789
+ */
790
+ fixed_price_quantity?: number | null;
791
+ /**
792
+ * The property used to group this price on an invoice
793
+ */
794
+ invoice_grouping_key?: string | null;
795
+ /**
796
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
797
+ * If unspecified, a single invoice is produced per billing cycle.
798
+ */
799
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
800
+ /**
801
+ * The ID of the license type to associate with this price.
802
+ */
803
+ license_type_id?: string | null;
804
+ /**
805
+ * User-specified key/value pairs for the resource. Individual keys can be removed
806
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
807
+ * by setting `metadata` to `null`.
808
+ */
809
+ metadata?: {
810
+ [key: string]: string | null;
811
+ } | null;
812
+ /**
813
+ * A transient ID that can be used to reference this price when adding adjustments
814
+ * in the same API call.
815
+ */
816
+ reference_id?: string | null;
817
+ }
818
+ namespace NewPlanTieredWithProrationPrice {
819
+ /**
820
+ * Configuration for tiered_with_proration pricing
821
+ */
822
+ interface TieredWithProrationConfig {
823
+ /**
824
+ * Tiers for rating based on total usage quantities into the specified tier with
825
+ * proration
826
+ */
827
+ tiers: Array<TieredWithProrationConfig.Tier>;
828
+ }
829
+ namespace TieredWithProrationConfig {
830
+ /**
831
+ * Configuration for a single tiered with proration tier
832
+ */
833
+ interface Tier {
834
+ /**
835
+ * Inclusive tier starting value
836
+ */
837
+ tier_lower_bound: string;
838
+ /**
839
+ * Amount per unit
840
+ */
841
+ unit_amount: string;
842
+ }
843
+ }
844
+ }
845
+ interface NewPlanGroupedWithMinMaxThresholdsPrice {
846
+ /**
847
+ * The cadence to bill for this price on.
848
+ */
849
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
850
+ /**
851
+ * Configuration for grouped_with_min_max_thresholds pricing
852
+ */
853
+ grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
854
+ /**
855
+ * The id of the item the price will be associated with.
856
+ */
857
+ item_id: string;
858
+ /**
859
+ * The pricing model type
860
+ */
861
+ model_type: 'grouped_with_min_max_thresholds';
862
+ /**
863
+ * The name of the price.
864
+ */
865
+ name: string;
866
+ /**
867
+ * The id of the billable metric for the price. Only needed if the price is
868
+ * usage-based.
869
+ */
870
+ billable_metric_id?: string | null;
871
+ /**
872
+ * If the Price represents a fixed cost, the price will be billed in-advance if
873
+ * this is true, and in-arrears if this is false.
874
+ */
875
+ billed_in_advance?: boolean | null;
876
+ /**
877
+ * For custom cadence: specifies the duration of the billing period in days or
878
+ * months.
879
+ */
880
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
881
+ /**
882
+ * The per unit conversion rate of the price currency to the invoicing currency.
883
+ */
884
+ conversion_rate?: number | null;
885
+ /**
886
+ * The configuration for the rate of the price currency to the invoicing currency.
887
+ */
888
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
889
+ /**
890
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
891
+ * price is billed.
892
+ */
893
+ currency?: string | null;
894
+ /**
895
+ * For dimensional price: specifies a price group and dimension values
896
+ */
897
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
898
+ /**
899
+ * An alias for the price.
900
+ */
901
+ external_price_id?: string | null;
902
+ /**
903
+ * If the Price represents a fixed cost, this represents the quantity of units
904
+ * applied.
905
+ */
906
+ fixed_price_quantity?: number | null;
907
+ /**
908
+ * The property used to group this price on an invoice
909
+ */
910
+ invoice_grouping_key?: string | null;
911
+ /**
912
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
913
+ * If unspecified, a single invoice is produced per billing cycle.
914
+ */
915
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
916
+ /**
917
+ * The ID of the license type to associate with this price.
918
+ */
919
+ license_type_id?: string | null;
920
+ /**
921
+ * User-specified key/value pairs for the resource. Individual keys can be removed
922
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
923
+ * by setting `metadata` to `null`.
924
+ */
925
+ metadata?: {
926
+ [key: string]: string | null;
927
+ } | null;
928
+ /**
929
+ * A transient ID that can be used to reference this price when adding adjustments
930
+ * in the same API call.
931
+ */
932
+ reference_id?: string | null;
933
+ }
934
+ namespace NewPlanGroupedWithMinMaxThresholdsPrice {
935
+ /**
936
+ * Configuration for grouped_with_min_max_thresholds pricing
937
+ */
938
+ interface GroupedWithMinMaxThresholdsConfig {
939
+ /**
940
+ * The event property used to group before applying thresholds
941
+ */
942
+ grouping_key: string;
943
+ /**
944
+ * The maximum amount to charge each group
945
+ */
946
+ maximum_charge: string;
947
+ /**
948
+ * The minimum amount to charge each group, regardless of usage
949
+ */
950
+ minimum_charge: string;
951
+ /**
952
+ * The base price charged per group
953
+ */
954
+ per_unit_rate: string;
955
+ }
956
+ }
957
+ interface NewPlanCumulativeGroupedAllocationPrice {
958
+ /**
959
+ * The cadence to bill for this price on.
960
+ */
961
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
962
+ /**
963
+ * Configuration for cumulative_grouped_allocation pricing
964
+ */
965
+ cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
966
+ /**
967
+ * The id of the item the price will be associated with.
968
+ */
969
+ item_id: string;
970
+ /**
971
+ * The pricing model type
972
+ */
973
+ model_type: 'cumulative_grouped_allocation';
974
+ /**
975
+ * The name of the price.
976
+ */
977
+ name: string;
978
+ /**
979
+ * The id of the billable metric for the price. Only needed if the price is
980
+ * usage-based.
981
+ */
982
+ billable_metric_id?: string | null;
983
+ /**
984
+ * If the Price represents a fixed cost, the price will be billed in-advance if
985
+ * this is true, and in-arrears if this is false.
986
+ */
987
+ billed_in_advance?: boolean | null;
988
+ /**
989
+ * For custom cadence: specifies the duration of the billing period in days or
990
+ * months.
991
+ */
992
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
993
+ /**
994
+ * The per unit conversion rate of the price currency to the invoicing currency.
995
+ */
996
+ conversion_rate?: number | null;
997
+ /**
998
+ * The configuration for the rate of the price currency to the invoicing currency.
999
+ */
1000
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1001
+ /**
1002
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1003
+ * price is billed.
1004
+ */
1005
+ currency?: string | null;
1006
+ /**
1007
+ * For dimensional price: specifies a price group and dimension values
1008
+ */
1009
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1010
+ /**
1011
+ * An alias for the price.
1012
+ */
1013
+ external_price_id?: string | null;
1014
+ /**
1015
+ * If the Price represents a fixed cost, this represents the quantity of units
1016
+ * applied.
1017
+ */
1018
+ fixed_price_quantity?: number | null;
1019
+ /**
1020
+ * The property used to group this price on an invoice
1021
+ */
1022
+ invoice_grouping_key?: string | null;
1023
+ /**
1024
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
1025
+ * If unspecified, a single invoice is produced per billing cycle.
1026
+ */
1027
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1028
+ /**
1029
+ * The ID of the license type to associate with this price.
1030
+ */
1031
+ license_type_id?: string | null;
1032
+ /**
1033
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1034
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1035
+ * by setting `metadata` to `null`.
1036
+ */
1037
+ metadata?: {
1038
+ [key: string]: string | null;
1039
+ } | null;
1040
+ /**
1041
+ * A transient ID that can be used to reference this price when adding adjustments
1042
+ * in the same API call.
1043
+ */
1044
+ reference_id?: string | null;
1045
+ }
1046
+ namespace NewPlanCumulativeGroupedAllocationPrice {
1047
+ /**
1048
+ * Configuration for cumulative_grouped_allocation pricing
1049
+ */
1050
+ interface CumulativeGroupedAllocationConfig {
1051
+ /**
1052
+ * The overall allocation across all groups
1053
+ */
1054
+ cumulative_allocation: string;
1055
+ /**
1056
+ * The allocation per individual group
1057
+ */
1058
+ group_allocation: string;
1059
+ /**
1060
+ * The event property used to group usage before applying allocations
1061
+ */
1062
+ grouping_key: string;
1063
+ /**
1064
+ * The amount to charge for each unit outside of the allocation
1065
+ */
1066
+ unit_amount: string;
1067
+ }
1068
+ }
1069
+ interface NewPlanDailyCreditAllowancePrice {
1070
+ /**
1071
+ * The cadence to bill for this price on.
1072
+ */
1073
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1074
+ /**
1075
+ * Configuration for daily_credit_allowance pricing
1076
+ */
1077
+ daily_credit_allowance_config: NewPlanDailyCreditAllowancePrice.DailyCreditAllowanceConfig;
1078
+ /**
1079
+ * The id of the item the price will be associated with.
1080
+ */
1081
+ item_id: string;
1082
+ /**
1083
+ * The pricing model type
1084
+ */
1085
+ model_type: 'daily_credit_allowance';
1086
+ /**
1087
+ * The name of the price.
1088
+ */
1089
+ name: string;
1090
+ /**
1091
+ * The id of the billable metric for the price. Only needed if the price is
1092
+ * usage-based.
1093
+ */
1094
+ billable_metric_id?: string | null;
1095
+ /**
1096
+ * If the Price represents a fixed cost, the price will be billed in-advance if
1097
+ * this is true, and in-arrears if this is false.
1098
+ */
1099
+ billed_in_advance?: boolean | null;
1100
+ /**
1101
+ * For custom cadence: specifies the duration of the billing period in days or
1102
+ * months.
1103
+ */
1104
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1105
+ /**
1106
+ * The per unit conversion rate of the price currency to the invoicing currency.
1107
+ */
1108
+ conversion_rate?: number | null;
1109
+ /**
1110
+ * The configuration for the rate of the price currency to the invoicing currency.
1111
+ */
1112
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1113
+ /**
1114
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1115
+ * price is billed.
1116
+ */
1117
+ currency?: string | null;
1118
+ /**
1119
+ * For dimensional price: specifies a price group and dimension values
1120
+ */
1121
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1122
+ /**
1123
+ * An alias for the price.
1124
+ */
1125
+ external_price_id?: string | null;
1126
+ /**
1127
+ * If the Price represents a fixed cost, this represents the quantity of units
1128
+ * applied.
1129
+ */
1130
+ fixed_price_quantity?: number | null;
1131
+ /**
1132
+ * The property used to group this price on an invoice
1133
+ */
1134
+ invoice_grouping_key?: string | null;
1135
+ /**
1136
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
1137
+ * If unspecified, a single invoice is produced per billing cycle.
1138
+ */
1139
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1140
+ /**
1141
+ * The ID of the license type to associate with this price.
1142
+ */
1143
+ license_type_id?: string | null;
1144
+ /**
1145
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1146
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1147
+ * by setting `metadata` to `null`.
1148
+ */
1149
+ metadata?: {
1150
+ [key: string]: string | null;
1151
+ } | null;
1152
+ /**
1153
+ * A transient ID that can be used to reference this price when adding adjustments
1154
+ * in the same API call.
1155
+ */
1156
+ reference_id?: string | null;
1157
+ }
1158
+ namespace NewPlanDailyCreditAllowancePrice {
1159
+ /**
1160
+ * Configuration for daily_credit_allowance pricing
1161
+ */
1162
+ interface DailyCreditAllowanceConfig {
1163
+ /**
1164
+ * Credits granted per day. Lose-it-or-use-it; does not roll over.
1165
+ */
1166
+ daily_allowance: string;
1167
+ /**
1168
+ * Default per-unit credit rate for any usage not bucketed into a specified
1169
+ * matrix_value
1170
+ */
1171
+ default_unit_amount: string;
1172
+ /**
1173
+ * One or two event property values to evaluate matrix groups by
1174
+ */
1175
+ dimensions: Array<string | null>;
1176
+ /**
1177
+ * Event property whose value identifies the day bucket the event belongs to (e.g.
1178
+ * 'event_day' set to an ISO date string in the customer's timezone). The allowance
1179
+ * resets per distinct value of this property.
1180
+ */
1181
+ event_day_property: string;
1182
+ /**
1183
+ * Per-dimension credit rates
1184
+ */
1185
+ matrix_values: Array<DailyCreditAllowanceConfig.MatrixValue>;
1186
+ }
1187
+ namespace DailyCreditAllowanceConfig {
1188
+ /**
1189
+ * Per-dimension credit price for the daily credit allowance model.
1190
+ */
1191
+ interface MatrixValue {
1192
+ /**
1193
+ * One or two matrix keys to filter usage to this value by. For example, ["model"]
1194
+ * could be used to apply a different credit rate to each AI model.
1195
+ */
1196
+ dimension_values: Array<string | null>;
1197
+ /**
1198
+ * Credits charged per unit of usage matching the specified dimension_values
1199
+ */
1200
+ unit_amount: string;
1201
+ }
1202
+ }
1203
+ }
1204
+ interface NewPlanMeteredAllowancePrice {
1205
+ /**
1206
+ * The cadence to bill for this price on.
1207
+ */
1208
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1209
+ /**
1210
+ * The id of the item the price will be associated with.
1211
+ */
1212
+ item_id: string;
1213
+ /**
1214
+ * Configuration for metered_allowance pricing
1215
+ */
1216
+ metered_allowance_config: NewPlanMeteredAllowancePrice.MeteredAllowanceConfig;
1217
+ /**
1218
+ * The pricing model type
1219
+ */
1220
+ model_type: 'metered_allowance';
1221
+ /**
1222
+ * The name of the price.
1223
+ */
1224
+ name: string;
1225
+ /**
1226
+ * The id of the billable metric for the price. Only needed if the price is
1227
+ * usage-based.
1228
+ */
1229
+ billable_metric_id?: string | null;
1230
+ /**
1231
+ * If the Price represents a fixed cost, the price will be billed in-advance if
1232
+ * this is true, and in-arrears if this is false.
1233
+ */
1234
+ billed_in_advance?: boolean | null;
1235
+ /**
1236
+ * For custom cadence: specifies the duration of the billing period in days or
1237
+ * months.
1238
+ */
1239
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1240
+ /**
1241
+ * The per unit conversion rate of the price currency to the invoicing currency.
1242
+ */
1243
+ conversion_rate?: number | null;
1244
+ /**
1245
+ * The configuration for the rate of the price currency to the invoicing currency.
1246
+ */
1247
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1248
+ /**
1249
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1250
+ * price is billed.
1251
+ */
1252
+ currency?: string | null;
1253
+ /**
1254
+ * For dimensional price: specifies a price group and dimension values
1255
+ */
1256
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1257
+ /**
1258
+ * An alias for the price.
1259
+ */
1260
+ external_price_id?: string | null;
1261
+ /**
1262
+ * If the Price represents a fixed cost, this represents the quantity of units
1263
+ * applied.
1264
+ */
1265
+ fixed_price_quantity?: number | null;
1266
+ /**
1267
+ * The property used to group this price on an invoice
1268
+ */
1269
+ invoice_grouping_key?: string | null;
1270
+ /**
1271
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
1272
+ * If unspecified, a single invoice is produced per billing cycle.
1273
+ */
1274
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1275
+ /**
1276
+ * The ID of the license type to associate with this price.
1277
+ */
1278
+ license_type_id?: string | null;
1279
+ /**
1280
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1281
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1282
+ * by setting `metadata` to `null`.
1283
+ */
1284
+ metadata?: {
1285
+ [key: string]: string | null;
1286
+ } | null;
1287
+ /**
1288
+ * A transient ID that can be used to reference this price when adding adjustments
1289
+ * in the same API call.
1290
+ */
1291
+ reference_id?: string | null;
1292
+ }
1293
+ namespace NewPlanMeteredAllowancePrice {
1294
+ /**
1295
+ * Configuration for metered_allowance pricing
1296
+ */
1297
+ interface MeteredAllowanceConfig {
1298
+ /**
1299
+ * The grouping_key value whose summed quantity represents the allowance for this
1300
+ * period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
1301
+ * — credit can never exceed actual usage.
1302
+ */
1303
+ allowance_grouping_value: string;
1304
+ /**
1305
+ * The grouping_key value whose summed quantity represents consumption (e.g.
1306
+ * 'download'). Charged at unit_amount.
1307
+ */
1308
+ consumption_grouping_value: string;
1309
+ /**
1310
+ * Event property used to partition the metric into consumption and allowance
1311
+ * quantities (e.g. 'event_name'). The metric is queried with this key and the two
1312
+ * values below select which partition is which.
1313
+ */
1314
+ grouping_key: string;
1315
+ /**
1316
+ * Per-unit price applied to gross consumption and to the allowance credit.
1317
+ */
1318
+ unit_amount: string;
1319
+ /**
1320
+ * Sub-line label for the credit row (e.g. 'Up to 3x free egress').
1321
+ */
1322
+ allowance_display_name?: string;
1323
+ /**
1324
+ * Sub-line label for the gross consumption row (e.g. 'bytes gotten').
1325
+ */
1326
+ consumption_display_name?: string;
1327
+ }
1328
+ }
1329
+ interface NewPlanPercentCompositePrice {
1330
+ /**
1331
+ * The cadence to bill for this price on.
1332
+ */
1333
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1334
+ /**
1335
+ * The id of the item the price will be associated with.
1336
+ */
1337
+ item_id: string;
1338
+ /**
1339
+ * The pricing model type
1340
+ */
1341
+ model_type: 'percent';
1342
+ /**
1343
+ * The name of the price.
1344
+ */
1345
+ name: string;
1346
+ /**
1347
+ * Configuration for percent pricing
1348
+ */
1349
+ percent_config: NewPlanPercentCompositePrice.PercentConfig;
1350
+ /**
1351
+ * The id of the billable metric for the price. Only needed if the price is
1352
+ * usage-based.
1353
+ */
1354
+ billable_metric_id?: string | null;
1355
+ /**
1356
+ * If the Price represents a fixed cost, the price will be billed in-advance if
1357
+ * this is true, and in-arrears if this is false.
1358
+ */
1359
+ billed_in_advance?: boolean | null;
1360
+ /**
1361
+ * For custom cadence: specifies the duration of the billing period in days or
1362
+ * months.
1363
+ */
1364
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1365
+ /**
1366
+ * The per unit conversion rate of the price currency to the invoicing currency.
1367
+ */
1368
+ conversion_rate?: number | null;
1369
+ /**
1370
+ * The configuration for the rate of the price currency to the invoicing currency.
1371
+ */
1372
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1373
+ /**
1374
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1375
+ * price is billed.
1376
+ */
1377
+ currency?: string | null;
1378
+ /**
1379
+ * For dimensional price: specifies a price group and dimension values
1380
+ */
1381
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1382
+ /**
1383
+ * An alias for the price.
1384
+ */
1385
+ external_price_id?: string | null;
1386
+ /**
1387
+ * If the Price represents a fixed cost, this represents the quantity of units
1388
+ * applied.
1389
+ */
1390
+ fixed_price_quantity?: number | null;
1391
+ /**
1392
+ * The property used to group this price on an invoice
1393
+ */
1394
+ invoice_grouping_key?: string | null;
1395
+ /**
1396
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
1397
+ * If unspecified, a single invoice is produced per billing cycle.
1398
+ */
1399
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1400
+ /**
1401
+ * The ID of the license type to associate with this price.
1402
+ */
1403
+ license_type_id?: string | null;
1404
+ /**
1405
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1406
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1407
+ * by setting `metadata` to `null`.
1408
+ */
1409
+ metadata?: {
1410
+ [key: string]: string | null;
1411
+ } | null;
1412
+ /**
1413
+ * A transient ID that can be used to reference this price when adding adjustments
1414
+ * in the same API call.
1415
+ */
1416
+ reference_id?: string | null;
1417
+ }
1418
+ namespace NewPlanPercentCompositePrice {
1419
+ /**
1420
+ * Configuration for percent pricing
1421
+ */
1422
+ interface PercentConfig {
1423
+ /**
1424
+ * Fraction of the component subtotals to charge (0 < percent <= 1).
1425
+ */
1426
+ percent: number;
1427
+ /**
1428
+ * Maximum amount to charge. If unset, the fee has no upper bound.
1429
+ */
1430
+ maximum_amount?: string | null;
1431
+ /**
1432
+ * Minimum amount to charge. If unset, the fee is bounded below by 0.
1433
+ */
1434
+ minimum_amount?: string | null;
1435
+ /**
1436
+ * If true, the minimum_amount is prorated based on the service period. The
1437
+ * maximum_amount is an absolute cap (never prorated), and the percent applied to
1438
+ * upstream subtotals is never prorated either.
1439
+ */
1440
+ prorated?: boolean;
1441
+ }
1442
+ }
1443
+ interface NewPlanEventOutputPrice {
1444
+ /**
1445
+ * The cadence to bill for this price on.
1446
+ */
1447
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1448
+ /**
1449
+ * Configuration for event_output pricing
1450
+ */
1451
+ event_output_config: NewPlanEventOutputPrice.EventOutputConfig;
1452
+ /**
1453
+ * The id of the item the price will be associated with.
1454
+ */
1455
+ item_id: string;
1456
+ /**
1457
+ * The pricing model type
1458
+ */
1459
+ model_type: 'event_output';
1460
+ /**
1461
+ * The name of the price.
1462
+ */
1463
+ name: string;
1464
+ /**
1465
+ * The id of the billable metric for the price. Only needed if the price is
1466
+ * usage-based.
1467
+ */
1468
+ billable_metric_id?: string | null;
1469
+ /**
1470
+ * If the Price represents a fixed cost, the price will be billed in-advance if
1471
+ * this is true, and in-arrears if this is false.
1472
+ */
1473
+ billed_in_advance?: boolean | null;
1474
+ /**
1475
+ * For custom cadence: specifies the duration of the billing period in days or
1476
+ * months.
1477
+ */
1478
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1479
+ /**
1480
+ * The per unit conversion rate of the price currency to the invoicing currency.
1481
+ */
1482
+ conversion_rate?: number | null;
1483
+ /**
1484
+ * The configuration for the rate of the price currency to the invoicing currency.
1485
+ */
1486
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1487
+ /**
1488
+ * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1489
+ * price is billed.
1490
+ */
1491
+ currency?: string | null;
1492
+ /**
1493
+ * For dimensional price: specifies a price group and dimension values
1494
+ */
1495
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1496
+ /**
1497
+ * An alias for the price.
1498
+ */
1499
+ external_price_id?: string | null;
1500
+ /**
1501
+ * If the Price represents a fixed cost, this represents the quantity of units
1502
+ * applied.
1503
+ */
1504
+ fixed_price_quantity?: number | null;
1505
+ /**
1506
+ * The property used to group this price on an invoice
1507
+ */
1508
+ invoice_grouping_key?: string | null;
1509
+ /**
1510
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
1511
+ * If unspecified, a single invoice is produced per billing cycle.
1512
+ */
1513
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1514
+ /**
1515
+ * The ID of the license type to associate with this price.
1516
+ */
1517
+ license_type_id?: string | null;
1518
+ /**
1519
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1520
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1521
+ * by setting `metadata` to `null`.
1522
+ */
1523
+ metadata?: {
1524
+ [key: string]: string | null;
1525
+ } | null;
1526
+ /**
1527
+ * A transient ID that can be used to reference this price when adding adjustments
1528
+ * in the same API call.
1529
+ */
1530
+ reference_id?: string | null;
1531
+ }
1532
+ namespace NewPlanEventOutputPrice {
1533
+ /**
1534
+ * Configuration for event_output pricing
1535
+ */
1536
+ interface EventOutputConfig {
1537
+ /**
1538
+ * The key in the event data to extract the unit rate from.
1539
+ */
1540
+ unit_rating_key: string;
1541
+ /**
1542
+ * If provided, this amount will be used as the unit rate when an event does not
1543
+ * have a value for the `unit_rating_key`. If not provided, events missing a unit
1544
+ * rate will be ignored.
1545
+ */
1546
+ default_unit_rate?: string | null;
1547
+ /**
1548
+ * An optional key in the event data to group by (e.g., event ID). All events will
1549
+ * also be grouped by their unit rate.
1550
+ */
1551
+ grouping_key?: string | null;
1552
+ }
1553
+ }
1554
+ }
1555
+ interface Adjustment {
1556
+ /**
1557
+ * The definition of a new adjustment to create and add to the plan.
1558
+ */
1559
+ adjustment: Shared.NewPercentageDiscount | Shared.NewUsageDiscount | Shared.NewAmountDiscount | Shared.NewMinimum | Shared.NewMaximum | Adjustment.NewTieredPercentageDiscount;
1560
+ /**
1561
+ * The phase to add this adjustment to.
1562
+ */
1563
+ plan_phase_order?: number | null;
1564
+ }
1565
+ namespace Adjustment {
1566
+ interface NewTieredPercentageDiscount {
1567
+ adjustment_type: 'tiered_percentage_discount';
1568
+ tiers: Array<NewTieredPercentageDiscount.Tier>;
1569
+ /**
1570
+ * If set, the adjustment will apply to every price on the subscription.
1571
+ */
1572
+ applies_to_all?: true | null;
1573
+ /**
1574
+ * The set of item IDs to which this adjustment applies.
1575
+ */
1576
+ applies_to_item_ids?: Array<string> | null;
1577
+ /**
1578
+ * The set of price IDs to which this adjustment applies.
1579
+ */
1580
+ applies_to_price_ids?: Array<string> | null;
1581
+ /**
1582
+ * If set, only prices in the specified currency will have the adjustment applied.
1583
+ */
1584
+ currency?: string | null;
1585
+ /**
1586
+ * A list of filters that determine which prices this adjustment will apply to.
1587
+ */
1588
+ filters?: Array<NewTieredPercentageDiscount.Filter> | null;
1589
+ /**
1590
+ * When false, this adjustment will be applied to a single price. Otherwise, it
1591
+ * will be applied at the invoice level, possibly to multiple prices.
1592
+ */
1593
+ is_invoice_level?: boolean;
1594
+ /**
1595
+ * If set, only prices of the specified type will have the adjustment applied.
1596
+ */
1597
+ price_type?: 'usage' | 'fixed_in_advance' | 'fixed_in_arrears' | 'fixed' | 'in_arrears' | null;
1598
+ }
1599
+ namespace NewTieredPercentageDiscount {
1600
+ interface Tier {
1601
+ /**
1602
+ * Exclusive lower bound of cumulative spend for this tier.
1603
+ */
1604
+ lower_bound: number;
1605
+ /**
1606
+ * The percentage (0-1) discounted from spend in this tier.
1607
+ */
1608
+ percentage: number;
1609
+ /**
1610
+ * Inclusive upper bound of cumulative spend; null for the final open-ended tier.
1611
+ */
1612
+ upper_bound?: number | null;
1613
+ }
1614
+ interface Filter {
1615
+ /**
1616
+ * The property of the price to filter on.
1617
+ */
1618
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
1619
+ /**
1620
+ * Should prices that match the filter be included or excluded.
1621
+ */
1622
+ operator: 'includes' | 'excludes';
1623
+ /**
1624
+ * The IDs or values that match this filter.
1625
+ */
1626
+ values: Array<string>;
1627
+ }
1628
+ }
1629
+ }
1630
+ interface PlanPhase {
1631
+ /**
1632
+ * Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
1633
+ */
1634
+ order: number;
1635
+ /**
1636
+ * Align billing cycle day with phase start date.
1637
+ */
1638
+ align_billing_with_phase_start_date?: boolean | null;
1639
+ /**
1640
+ * How many terms of length `duration_unit` this phase is active for. If null, this
1641
+ * phase is evergreen and active indefinitely
1642
+ */
1643
+ duration?: number | null;
1644
+ duration_unit?: 'daily' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | null;
1645
+ }
1646
+ }
1647
+ export interface PlanUpdateParams {
1648
+ /**
1649
+ * An optional user-defined description of the plan.
1650
+ */
1651
+ description?: string | null;
1652
+ /**
1653
+ * An optional user-defined ID for this plan resource, used throughout the system
1654
+ * as an alias for this Plan. Use this field to identify a plan by an existing
1655
+ * identifier in your system.
1656
+ */
1657
+ external_plan_id?: string | null;
1658
+ /**
1659
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1660
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1661
+ * by setting `metadata` to `null`.
1662
+ */
1663
+ metadata?: {
1664
+ [key: string]: string | null;
1665
+ } | null;
1666
+ }
1667
+ export interface PlanListParams extends PageParams {
1668
+ 'created_at[gt]'?: string | null;
1669
+ 'created_at[gte]'?: string | null;
1670
+ 'created_at[lt]'?: string | null;
1671
+ 'created_at[lte]'?: string | null;
1672
+ /**
1673
+ * The plan status to filter to ('active', 'archived', or 'draft').
1674
+ */
1675
+ status?: 'active' | 'archived' | 'draft';
1676
+ }
1677
+ export declare namespace Plans {
1678
+ export { type Plan as Plan, type PlansPage as PlansPage, type PlanCreateParams as PlanCreateParams, type PlanUpdateParams as PlanUpdateParams, type PlanListParams as PlanListParams, };
1679
+ export { ExternalPlanID as ExternalPlanID, type ExternalPlanIDUpdateParams as ExternalPlanIDUpdateParams };
1680
+ export { Migrations as Migrations, type MigrationRetrieveResponse as MigrationRetrieveResponse, type MigrationListResponse as MigrationListResponse, type MigrationCancelResponse as MigrationCancelResponse, type MigrationListResponsesPage as MigrationListResponsesPage, type MigrationRetrieveParams as MigrationRetrieveParams, type MigrationListParams as MigrationListParams, type MigrationCancelParams as MigrationCancelParams, };
1681
+ }
1682
+ //# sourceMappingURL=plans.d.mts.map