@tirdad/sdk 2.1.43 → 2.1.44

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 (309) hide show
  1. package/esm/funcs/commitments-create-commitment.d.ts +17 -0
  2. package/esm/funcs/commitments-create-commitment.d.ts.map +1 -0
  3. package/esm/funcs/commitments-create-commitment.js +83 -0
  4. package/esm/funcs/commitments-create-commitment.js.map +1 -0
  5. package/esm/funcs/commitments-get-commitment.d.ts +17 -0
  6. package/esm/funcs/commitments-get-commitment.d.ts.map +1 -0
  7. package/esm/funcs/commitments-get-commitment.js +91 -0
  8. package/esm/funcs/commitments-get-commitment.js.map +1 -0
  9. package/esm/funcs/commitments-preview-commitment.d.ts +17 -0
  10. package/esm/funcs/commitments-preview-commitment.d.ts.map +1 -0
  11. package/esm/funcs/commitments-preview-commitment.js +83 -0
  12. package/esm/funcs/commitments-preview-commitment.js.map +1 -0
  13. package/esm/funcs/commitments-query-commitment.d.ts +17 -0
  14. package/esm/funcs/commitments-query-commitment.d.ts.map +1 -0
  15. package/esm/funcs/commitments-query-commitment.js +83 -0
  16. package/esm/funcs/commitments-query-commitment.js.map +1 -0
  17. package/esm/funcs/commitments-terminate-commitment.d.ts +17 -0
  18. package/esm/funcs/commitments-terminate-commitment.d.ts.map +1 -0
  19. package/esm/funcs/commitments-terminate-commitment.js +93 -0
  20. package/esm/funcs/commitments-terminate-commitment.js.map +1 -0
  21. package/esm/funcs/commitments-update-commitment.d.ts +17 -0
  22. package/esm/funcs/commitments-update-commitment.d.ts.map +1 -0
  23. package/esm/funcs/commitments-update-commitment.js +93 -0
  24. package/esm/funcs/commitments-update-commitment.js.map +1 -0
  25. package/esm/funcs/events-delete-events.d.ts +17 -0
  26. package/esm/funcs/events-delete-events.d.ts.map +1 -0
  27. package/esm/funcs/events-delete-events.js +86 -0
  28. package/esm/funcs/events-delete-events.js.map +1 -0
  29. package/esm/funcs/self-billing-get-self-billing-summary.d.ts +1 -1
  30. package/esm/funcs/self-billing-get-self-billing-summary.js +1 -1
  31. package/esm/funcs/webhook-events-post-webhook-events-commitment-created.d.ts +17 -0
  32. package/esm/funcs/webhook-events-post-webhook-events-commitment-created.d.ts.map +1 -0
  33. package/esm/funcs/webhook-events-post-webhook-events-commitment-created.js +69 -0
  34. package/esm/funcs/webhook-events-post-webhook-events-commitment-created.js.map +1 -0
  35. package/esm/funcs/webhook-events-post-webhook-events-commitment-terminated.d.ts +17 -0
  36. package/esm/funcs/webhook-events-post-webhook-events-commitment-terminated.d.ts.map +1 -0
  37. package/esm/funcs/webhook-events-post-webhook-events-commitment-terminated.js +69 -0
  38. package/esm/funcs/webhook-events-post-webhook-events-commitment-terminated.js.map +1 -0
  39. package/esm/funcs/webhook-events-post-webhook-events-commitment-updated.d.ts +17 -0
  40. package/esm/funcs/webhook-events-post-webhook-events-commitment-updated.d.ts.map +1 -0
  41. package/esm/funcs/webhook-events-post-webhook-events-commitment-updated.js +69 -0
  42. package/esm/funcs/webhook-events-post-webhook-events-commitment-updated.js.map +1 -0
  43. package/esm/lib/config.d.ts +2 -2
  44. package/esm/lib/config.js +2 -2
  45. package/esm/sdk/commitments.d.ts +47 -0
  46. package/esm/sdk/commitments.d.ts.map +1 -0
  47. package/esm/sdk/commitments.js +68 -0
  48. package/esm/sdk/commitments.js.map +1 -0
  49. package/esm/sdk/events.d.ts +7 -0
  50. package/esm/sdk/events.d.ts.map +1 -1
  51. package/esm/sdk/events.js +10 -0
  52. package/esm/sdk/events.js.map +1 -1
  53. package/esm/sdk/models/active-window.d.ts +20 -0
  54. package/esm/sdk/models/active-window.d.ts.map +1 -0
  55. package/esm/sdk/models/active-window.js +24 -0
  56. package/esm/sdk/models/active-window.js.map +1 -0
  57. package/esm/sdk/models/commitment-collection-method.d.ts +12 -0
  58. package/esm/sdk/models/commitment-collection-method.d.ts.map +1 -0
  59. package/esm/sdk/models/commitment-collection-method.js +13 -0
  60. package/esm/sdk/models/commitment-collection-method.js.map +1 -0
  61. package/esm/sdk/models/commitment-early-termination.d.ts +11 -0
  62. package/esm/sdk/models/commitment-early-termination.d.ts.map +1 -0
  63. package/esm/sdk/models/commitment-early-termination.js +12 -0
  64. package/esm/sdk/models/commitment-early-termination.js.map +1 -0
  65. package/esm/sdk/models/commitment-filter.d.ts +60 -0
  66. package/esm/sdk/models/commitment-filter.d.ts.map +1 -0
  67. package/esm/sdk/models/commitment-filter.js +51 -0
  68. package/esm/sdk/models/commitment-filter.js.map +1 -0
  69. package/esm/sdk/models/commitment-measurement.d.ts +12 -0
  70. package/esm/sdk/models/commitment-measurement.d.ts.map +1 -0
  71. package/esm/sdk/models/commitment-measurement.js +13 -0
  72. package/esm/sdk/models/commitment-measurement.js.map +1 -0
  73. package/esm/sdk/models/commitment-price-input.d.ts +24 -0
  74. package/esm/sdk/models/commitment-price-input.d.ts.map +1 -0
  75. package/esm/sdk/models/commitment-price-input.js +27 -0
  76. package/esm/sdk/models/commitment-price-input.js.map +1 -0
  77. package/esm/sdk/models/commitment-response.d.ts +56 -0
  78. package/esm/sdk/models/commitment-response.d.ts.map +1 -0
  79. package/esm/sdk/models/commitment-response.js +88 -0
  80. package/esm/sdk/models/commitment-response.js.map +1 -0
  81. package/esm/sdk/models/commitment-scope-input.d.ts +18 -0
  82. package/esm/sdk/models/commitment-scope-input.d.ts.map +1 -0
  83. package/esm/sdk/models/commitment-scope-input.js +20 -0
  84. package/esm/sdk/models/commitment-scope-input.js.map +1 -0
  85. package/esm/sdk/models/commitment-scope-type.d.ts +14 -0
  86. package/esm/sdk/models/commitment-scope-type.d.ts.map +1 -0
  87. package/esm/sdk/models/commitment-scope-type.js +15 -0
  88. package/esm/sdk/models/commitment-scope-type.js.map +1 -0
  89. package/esm/sdk/models/commitment-status.d.ts +13 -0
  90. package/esm/sdk/models/commitment-status.d.ts.map +1 -0
  91. package/esm/sdk/models/commitment-status.js +14 -0
  92. package/esm/sdk/models/commitment-status.js.map +1 -0
  93. package/esm/sdk/models/commitment-usage-breakdown.d.ts +33 -0
  94. package/esm/sdk/models/commitment-usage-breakdown.d.ts.map +1 -0
  95. package/esm/sdk/models/commitment-usage-breakdown.js +37 -0
  96. package/esm/sdk/models/commitment-usage-breakdown.js.map +1 -0
  97. package/esm/sdk/models/commitment-usage-value.d.ts +11 -0
  98. package/esm/sdk/models/commitment-usage-value.d.ts.map +1 -0
  99. package/esm/sdk/models/commitment-usage-value.js +15 -0
  100. package/esm/sdk/models/commitment-usage-value.js.map +1 -0
  101. package/esm/sdk/models/create-commitment-request.d.ts +64 -0
  102. package/esm/sdk/models/create-commitment-request.d.ts.map +1 -0
  103. package/esm/sdk/models/create-commitment-request.js +50 -0
  104. package/esm/sdk/models/create-commitment-request.js.map +1 -0
  105. package/esm/sdk/models/create-entitlement-request.d.ts +3 -0
  106. package/esm/sdk/models/create-entitlement-request.d.ts.map +1 -1
  107. package/esm/sdk/models/create-entitlement-request.js.map +1 -1
  108. package/esm/sdk/models/create-price-tier.d.ts +3 -0
  109. package/esm/sdk/models/create-price-tier.d.ts.map +1 -1
  110. package/esm/sdk/models/create-price-tier.js +3 -0
  111. package/esm/sdk/models/create-price-tier.js.map +1 -1
  112. package/esm/sdk/models/create-subscription-request.d.ts +9 -0
  113. package/esm/sdk/models/create-subscription-request.d.ts.map +1 -1
  114. package/esm/sdk/models/create-subscription-request.js +2 -0
  115. package/esm/sdk/models/create-subscription-request.js.map +1 -1
  116. package/esm/sdk/models/delete-events-op.d.ts +14 -0
  117. package/esm/sdk/models/delete-events-op.d.ts.map +1 -0
  118. package/esm/sdk/models/delete-events-op.js +21 -0
  119. package/esm/sdk/models/delete-events-op.js.map +1 -0
  120. package/esm/sdk/models/delete-events-request.d.ts +38 -0
  121. package/esm/sdk/models/delete-events-request.d.ts.map +1 -0
  122. package/esm/sdk/models/delete-events-request.js +27 -0
  123. package/esm/sdk/models/delete-events-request.js.map +1 -0
  124. package/esm/sdk/models/delete-events-response.d.ts +11 -0
  125. package/esm/sdk/models/delete-events-response.d.ts.map +1 -0
  126. package/esm/sdk/models/delete-events-response.js +21 -0
  127. package/esm/sdk/models/delete-events-response.js.map +1 -0
  128. package/esm/sdk/models/get-commitment-op.d.ts +15 -0
  129. package/esm/sdk/models/get-commitment-op.d.ts.map +1 -0
  130. package/esm/sdk/models/get-commitment-op.js +12 -0
  131. package/esm/sdk/models/get-commitment-op.js.map +1 -0
  132. package/esm/sdk/models/get-usage-by-subscription-response.d.ts +5 -0
  133. package/esm/sdk/models/get-usage-by-subscription-response.d.ts.map +1 -1
  134. package/esm/sdk/models/get-usage-by-subscription-response.js +2 -0
  135. package/esm/sdk/models/get-usage-by-subscription-response.js.map +1 -1
  136. package/esm/sdk/models/index.d.ts +28 -0
  137. package/esm/sdk/models/index.d.ts.map +1 -1
  138. package/esm/sdk/models/index.js +28 -0
  139. package/esm/sdk/models/index.js.map +1 -1
  140. package/esm/sdk/models/invoice-filter.d.ts +10 -0
  141. package/esm/sdk/models/invoice-filter.d.ts.map +1 -1
  142. package/esm/sdk/models/invoice-filter.js +4 -0
  143. package/esm/sdk/models/invoice-filter.js.map +1 -1
  144. package/esm/sdk/models/invoice-line-item-response.d.ts +4 -0
  145. package/esm/sdk/models/invoice-line-item-response.d.ts.map +1 -1
  146. package/esm/sdk/models/invoice-line-item-response.js +2 -0
  147. package/esm/sdk/models/invoice-line-item-response.js.map +1 -1
  148. package/esm/sdk/models/invoice-sync-settings.d.ts +2 -0
  149. package/esm/sdk/models/invoice-sync-settings.d.ts.map +1 -1
  150. package/esm/sdk/models/invoice-sync-settings.js +3 -0
  151. package/esm/sdk/models/invoice-sync-settings.js.map +1 -1
  152. package/esm/sdk/models/list-commitments-response.d.ts +13 -0
  153. package/esm/sdk/models/list-commitments-response.d.ts.map +1 -0
  154. package/esm/sdk/models/list-commitments-response.js +17 -0
  155. package/esm/sdk/models/list-commitments-response.js.map +1 -0
  156. package/esm/sdk/models/price-price-tier.d.ts +2 -0
  157. package/esm/sdk/models/price-price-tier.d.ts.map +1 -1
  158. package/esm/sdk/models/price-price-tier.js +3 -0
  159. package/esm/sdk/models/price-price-tier.js.map +1 -1
  160. package/esm/sdk/models/price-transform-quantity.d.ts +5 -0
  161. package/esm/sdk/models/price-transform-quantity.d.ts.map +1 -1
  162. package/esm/sdk/models/price-transform-quantity.js +15 -1
  163. package/esm/sdk/models/price-transform-quantity.js.map +1 -1
  164. package/esm/sdk/models/report-query-request.d.ts +2 -0
  165. package/esm/sdk/models/report-query-request.d.ts.map +1 -1
  166. package/esm/sdk/models/report-query-request.js +1 -0
  167. package/esm/sdk/models/report-query-request.js.map +1 -1
  168. package/esm/sdk/models/scheduled-task-entity-type.d.ts +1 -0
  169. package/esm/sdk/models/scheduled-task-entity-type.d.ts.map +1 -1
  170. package/esm/sdk/models/scheduled-task-entity-type.js +1 -0
  171. package/esm/sdk/models/scheduled-task-entity-type.js.map +1 -1
  172. package/esm/sdk/models/self-billing-charge-response.d.ts +45 -0
  173. package/esm/sdk/models/self-billing-charge-response.d.ts.map +1 -0
  174. package/esm/sdk/models/self-billing-charge-response.js +63 -0
  175. package/esm/sdk/models/self-billing-charge-response.js.map +1 -0
  176. package/esm/sdk/models/self-billing-plan-response.d.ts +14 -0
  177. package/esm/sdk/models/self-billing-plan-response.d.ts.map +1 -0
  178. package/esm/sdk/models/self-billing-plan-response.js +18 -0
  179. package/esm/sdk/models/self-billing-plan-response.js.map +1 -0
  180. package/esm/sdk/models/self-billing-summary-response.d.ts +2 -0
  181. package/esm/sdk/models/self-billing-summary-response.d.ts.map +1 -1
  182. package/esm/sdk/models/self-billing-summary-response.js +2 -0
  183. package/esm/sdk/models/self-billing-summary-response.js.map +1 -1
  184. package/esm/sdk/models/subscription-line-item-response.d.ts +5 -0
  185. package/esm/sdk/models/subscription-line-item-response.d.ts.map +1 -1
  186. package/esm/sdk/models/subscription-line-item-response.js +4 -0
  187. package/esm/sdk/models/subscription-line-item-response.js.map +1 -1
  188. package/esm/sdk/models/subscription-subscription-line-item.d.ts +5 -0
  189. package/esm/sdk/models/subscription-subscription-line-item.d.ts.map +1 -1
  190. package/esm/sdk/models/subscription-subscription-line-item.js +4 -0
  191. package/esm/sdk/models/subscription-subscription-line-item.js.map +1 -1
  192. package/esm/sdk/models/terminate-commitment-op.d.ts +21 -0
  193. package/esm/sdk/models/terminate-commitment-op.d.ts.map +1 -0
  194. package/esm/sdk/models/terminate-commitment-op.js +14 -0
  195. package/esm/sdk/models/terminate-commitment-op.js.map +1 -0
  196. package/esm/sdk/models/terminate-commitment-request.d.ts +14 -0
  197. package/esm/sdk/models/terminate-commitment-request.d.ts.map +1 -0
  198. package/esm/sdk/models/terminate-commitment-request.js +19 -0
  199. package/esm/sdk/models/terminate-commitment-request.js.map +1 -0
  200. package/esm/sdk/models/trigger-force-run-request.d.ts +5 -0
  201. package/esm/sdk/models/trigger-force-run-request.d.ts.map +1 -1
  202. package/esm/sdk/models/trigger-force-run-request.js +2 -0
  203. package/esm/sdk/models/trigger-force-run-request.js.map +1 -1
  204. package/esm/sdk/models/update-commitment-op.d.ts +21 -0
  205. package/esm/sdk/models/update-commitment-op.d.ts.map +1 -0
  206. package/esm/sdk/models/update-commitment-op.js +14 -0
  207. package/esm/sdk/models/update-commitment-op.js.map +1 -0
  208. package/esm/sdk/models/update-commitment-request.d.ts +22 -0
  209. package/esm/sdk/models/update-commitment-request.d.ts.map +1 -0
  210. package/esm/sdk/models/update-commitment-request.js +21 -0
  211. package/esm/sdk/models/update-commitment-request.js.map +1 -0
  212. package/esm/sdk/models/update-entitlement-request.d.ts +3 -0
  213. package/esm/sdk/models/update-entitlement-request.d.ts.map +1 -1
  214. package/esm/sdk/models/update-entitlement-request.js.map +1 -1
  215. package/esm/sdk/models/webhook-dto-commitment-webhook-payload.d.ts +13 -0
  216. package/esm/sdk/models/webhook-dto-commitment-webhook-payload.d.ts.map +1 -0
  217. package/esm/sdk/models/webhook-dto-commitment-webhook-payload.js +22 -0
  218. package/esm/sdk/models/webhook-dto-commitment-webhook-payload.js.map +1 -0
  219. package/esm/sdk/models/webhook-event-name.d.ts +3 -0
  220. package/esm/sdk/models/webhook-event-name.d.ts.map +1 -1
  221. package/esm/sdk/models/webhook-event-name.js +3 -0
  222. package/esm/sdk/models/webhook-event-name.js.map +1 -1
  223. package/esm/sdk/models/zoho-pay-pal-payment-method.d.ts +10 -0
  224. package/esm/sdk/models/zoho-pay-pal-payment-method.d.ts.map +1 -0
  225. package/esm/sdk/models/zoho-pay-pal-payment-method.js +11 -0
  226. package/esm/sdk/models/zoho-pay-pal-payment-method.js.map +1 -0
  227. package/esm/sdk/models/zoho-payment-gateway-settings.d.ts +14 -0
  228. package/esm/sdk/models/zoho-payment-gateway-settings.d.ts.map +1 -0
  229. package/esm/sdk/models/zoho-payment-gateway-settings.js +23 -0
  230. package/esm/sdk/models/zoho-payment-gateway-settings.js.map +1 -0
  231. package/esm/sdk/models/zoho-payment-gateway.d.ts +15 -0
  232. package/esm/sdk/models/zoho-payment-gateway.d.ts.map +1 -0
  233. package/esm/sdk/models/zoho-payment-gateway.js +16 -0
  234. package/esm/sdk/models/zoho-payment-gateway.js.map +1 -0
  235. package/esm/sdk/sdk.d.ts +3 -0
  236. package/esm/sdk/sdk.d.ts.map +1 -1
  237. package/esm/sdk/sdk.js +5 -0
  238. package/esm/sdk/sdk.js.map +1 -1
  239. package/esm/sdk/self-billing.d.ts +1 -1
  240. package/esm/sdk/self-billing.js +1 -1
  241. package/esm/sdk/webhook-events.d.ts +21 -0
  242. package/esm/sdk/webhook-events.d.ts.map +1 -1
  243. package/esm/sdk/webhook-events.js +30 -0
  244. package/esm/sdk/webhook-events.js.map +1 -1
  245. package/jsr.json +1 -1
  246. package/package.json +1 -1
  247. package/src/funcs/commitments-create-commitment.ts +172 -0
  248. package/src/funcs/commitments-get-commitment.ts +181 -0
  249. package/src/funcs/commitments-preview-commitment.ts +172 -0
  250. package/src/funcs/commitments-query-commitment.ts +172 -0
  251. package/src/funcs/commitments-terminate-commitment.ts +187 -0
  252. package/src/funcs/commitments-update-commitment.ts +187 -0
  253. package/src/funcs/events-delete-events.ts +175 -0
  254. package/src/funcs/self-billing-get-self-billing-summary.ts +1 -1
  255. package/src/funcs/webhook-events-post-webhook-events-commitment-created.ts +144 -0
  256. package/src/funcs/webhook-events-post-webhook-events-commitment-terminated.ts +144 -0
  257. package/src/funcs/webhook-events-post-webhook-events-commitment-updated.ts +144 -0
  258. package/src/lib/config.ts +2 -2
  259. package/src/sdk/commitments.ts +121 -0
  260. package/src/sdk/events.ts +18 -0
  261. package/src/sdk/models/active-window.ts +54 -0
  262. package/src/sdk/models/commitment-collection-method.ts +26 -0
  263. package/src/sdk/models/commitment-early-termination.ts +22 -0
  264. package/src/sdk/models/commitment-filter.ts +127 -0
  265. package/src/sdk/models/commitment-measurement.ts +24 -0
  266. package/src/sdk/models/commitment-price-input.ts +64 -0
  267. package/src/sdk/models/commitment-response.ts +164 -0
  268. package/src/sdk/models/commitment-scope-input.ts +49 -0
  269. package/src/sdk/models/commitment-scope-type.ts +26 -0
  270. package/src/sdk/models/commitment-status.ts +25 -0
  271. package/src/sdk/models/commitment-usage-breakdown.ts +86 -0
  272. package/src/sdk/models/commitment-usage-value.ts +33 -0
  273. package/src/sdk/models/create-commitment-request.ts +134 -0
  274. package/src/sdk/models/create-entitlement-request.ts +3 -0
  275. package/src/sdk/models/create-price-tier.ts +9 -0
  276. package/src/sdk/models/create-subscription-request.ts +14 -0
  277. package/src/sdk/models/delete-events-op.ts +45 -0
  278. package/src/sdk/models/delete-events-request.ts +74 -0
  279. package/src/sdk/models/delete-events-response.ts +42 -0
  280. package/src/sdk/models/get-commitment-op.ts +33 -0
  281. package/src/sdk/models/get-usage-by-subscription-response.ts +11 -0
  282. package/src/sdk/models/index.ts +28 -0
  283. package/src/sdk/models/invoice-filter.ts +14 -0
  284. package/src/sdk/models/invoice-line-item-response.ts +6 -0
  285. package/src/sdk/models/invoice-sync-settings.ts +7 -0
  286. package/src/sdk/models/list-commitments-response.ts +41 -0
  287. package/src/sdk/models/price-price-tier.ts +7 -0
  288. package/src/sdk/models/price-transform-quantity.ts +33 -1
  289. package/src/sdk/models/report-query-request.ts +3 -0
  290. package/src/sdk/models/scheduled-task-entity-type.ts +1 -0
  291. package/src/sdk/models/self-billing-charge-response.ts +124 -0
  292. package/src/sdk/models/self-billing-plan-response.ts +41 -0
  293. package/src/sdk/models/self-billing-summary-response.ts +6 -0
  294. package/src/sdk/models/subscription-line-item-response.ts +9 -0
  295. package/src/sdk/models/subscription-subscription-line-item.ts +9 -0
  296. package/src/sdk/models/terminate-commitment-op.ts +46 -0
  297. package/src/sdk/models/terminate-commitment-request.ts +44 -0
  298. package/src/sdk/models/trigger-force-run-request.ts +7 -0
  299. package/src/sdk/models/update-commitment-op.ts +46 -0
  300. package/src/sdk/models/update-commitment-request.ts +48 -0
  301. package/src/sdk/models/update-entitlement-request.ts +3 -0
  302. package/src/sdk/models/webhook-dto-commitment-webhook-payload.ts +50 -0
  303. package/src/sdk/models/webhook-event-name.ts +3 -0
  304. package/src/sdk/models/zoho-pay-pal-payment-method.ts +19 -0
  305. package/src/sdk/models/zoho-payment-gateway-settings.ts +53 -0
  306. package/src/sdk/models/zoho-payment-gateway.ts +24 -0
  307. package/src/sdk/sdk.ts +6 -0
  308. package/src/sdk/self-billing.ts +1 -1
  309. package/src/sdk/webhook-events.ts +48 -0
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import * as openEnums from "../../types/enums.js";
7
+ import { OpenEnum } from "../../types/enums.js";
8
+
9
+ export const CommitmentScopeType = {
10
+ Subscription: "subscription",
11
+ Group: "group",
12
+ Meter: "meter",
13
+ Price: "price",
14
+ } as const;
15
+ export type CommitmentScopeType = OpenEnum<typeof CommitmentScopeType>;
16
+
17
+ /** @internal */
18
+ export const CommitmentScopeType$inboundSchema: z.ZodMiniType<
19
+ CommitmentScopeType,
20
+ unknown
21
+ > = openEnums.inboundSchema(CommitmentScopeType);
22
+ /** @internal */
23
+ export const CommitmentScopeType$outboundSchema: z.ZodMiniType<
24
+ string,
25
+ CommitmentScopeType
26
+ > = openEnums.outboundSchema(CommitmentScopeType);
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import * as openEnums from "../../types/enums.js";
7
+ import { OpenEnum } from "../../types/enums.js";
8
+
9
+ export const CommitmentStatus = {
10
+ Active: "active",
11
+ Ended: "ended",
12
+ Terminated: "terminated",
13
+ } as const;
14
+ export type CommitmentStatus = OpenEnum<typeof CommitmentStatus>;
15
+
16
+ /** @internal */
17
+ export const CommitmentStatus$inboundSchema: z.ZodMiniType<
18
+ CommitmentStatus,
19
+ unknown
20
+ > = openEnums.inboundSchema(CommitmentStatus);
21
+ /** @internal */
22
+ export const CommitmentStatus$outboundSchema: z.ZodMiniType<
23
+ string,
24
+ CommitmentStatus
25
+ > = openEnums.outboundSchema(CommitmentStatus);
@@ -0,0 +1,86 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as types from "../../types/primitives.js";
10
+ import {
11
+ CommitmentMeasurement,
12
+ CommitmentMeasurement$inboundSchema,
13
+ } from "./commitment-measurement.js";
14
+ import {
15
+ CommitmentType,
16
+ CommitmentType$inboundSchema,
17
+ } from "./commitment-type.js";
18
+ import {
19
+ CommitmentUsageValue,
20
+ CommitmentUsageValue$inboundSchema,
21
+ } from "./commitment-usage-value.js";
22
+ import { SDKValidationError } from "./sdk-validation-error.js";
23
+
24
+ export type CommitmentUsageBreakdown = {
25
+ /**
26
+ * AppliesFrom/To is the stretch of the queried window the commitment covers; usage outside it
27
+ *
28
+ * @remarks
29
+ * bills as overage and is not counted here.
30
+ */
31
+ appliesFrom?: Date | undefined;
32
+ appliesTo?: Date | undefined;
33
+ /**
34
+ * BilledAmount is what the stretch bills for this commitment: used plus, when binding, the true-up.
35
+ */
36
+ billedAmount?: string | undefined;
37
+ binding?: boolean | undefined;
38
+ commitmentId?: string | undefined;
39
+ committed?: CommitmentUsageValue | undefined;
40
+ currency?: string | undefined;
41
+ invoiceLabel?: string | undefined;
42
+ measurement?: CommitmentMeasurement | undefined;
43
+ type?: CommitmentType | undefined;
44
+ unused?: CommitmentUsageValue | undefined;
45
+ used?: CommitmentUsageValue | undefined;
46
+ };
47
+
48
+ /** @internal */
49
+ export const CommitmentUsageBreakdown$inboundSchema: z.ZodMiniType<
50
+ CommitmentUsageBreakdown,
51
+ unknown
52
+ > = z.pipe(
53
+ z.object({
54
+ applies_from: types.optional(types.date()),
55
+ applies_to: types.optional(types.date()),
56
+ billed_amount: types.optional(types.string()),
57
+ binding: types.optional(types.boolean()),
58
+ commitment_id: types.optional(types.string()),
59
+ committed: types.optional(CommitmentUsageValue$inboundSchema),
60
+ currency: types.optional(types.string()),
61
+ invoice_label: types.optional(types.string()),
62
+ measurement: types.optional(CommitmentMeasurement$inboundSchema),
63
+ type: types.optional(CommitmentType$inboundSchema),
64
+ unused: types.optional(CommitmentUsageValue$inboundSchema),
65
+ used: types.optional(CommitmentUsageValue$inboundSchema),
66
+ }),
67
+ z.transform((v) => {
68
+ return remap$(v, {
69
+ "applies_from": "appliesFrom",
70
+ "applies_to": "appliesTo",
71
+ "billed_amount": "billedAmount",
72
+ "commitment_id": "commitmentId",
73
+ "invoice_label": "invoiceLabel",
74
+ });
75
+ }),
76
+ );
77
+
78
+ export function commitmentUsageBreakdownFromJSON(
79
+ jsonString: string,
80
+ ): SafeParseResult<CommitmentUsageBreakdown, SDKValidationError> {
81
+ return safeParse(
82
+ jsonString,
83
+ (x) => CommitmentUsageBreakdown$inboundSchema.parse(JSON.parse(x)),
84
+ `Failed to parse 'CommitmentUsageBreakdown' from JSON`,
85
+ );
86
+ }
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import { SDKValidationError } from "./sdk-validation-error.js";
10
+
11
+ export type CommitmentUsageValue = {
12
+ amount?: string | undefined;
13
+ quantity?: string | undefined;
14
+ };
15
+
16
+ /** @internal */
17
+ export const CommitmentUsageValue$inboundSchema: z.ZodMiniType<
18
+ CommitmentUsageValue,
19
+ unknown
20
+ > = z.object({
21
+ amount: types.optional(types.string()),
22
+ quantity: types.optional(types.string()),
23
+ });
24
+
25
+ export function commitmentUsageValueFromJSON(
26
+ jsonString: string,
27
+ ): SafeParseResult<CommitmentUsageValue, SDKValidationError> {
28
+ return safeParse(
29
+ jsonString,
30
+ (x) => CommitmentUsageValue$inboundSchema.parse(JSON.parse(x)),
31
+ `Failed to parse 'CommitmentUsageValue' from JSON`,
32
+ );
33
+ }
@@ -0,0 +1,134 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import {
8
+ ActiveWindow,
9
+ ActiveWindow$Outbound,
10
+ ActiveWindow$outboundSchema,
11
+ } from "./active-window.js";
12
+ import {
13
+ CommitmentCollectionMethod,
14
+ CommitmentCollectionMethod$outboundSchema,
15
+ } from "./commitment-collection-method.js";
16
+ import {
17
+ CommitmentMeasurement,
18
+ CommitmentMeasurement$outboundSchema,
19
+ } from "./commitment-measurement.js";
20
+ import {
21
+ CommitmentPriceInput,
22
+ CommitmentPriceInput$Outbound,
23
+ CommitmentPriceInput$outboundSchema,
24
+ } from "./commitment-price-input.js";
25
+ import {
26
+ CommitmentScopeInput,
27
+ CommitmentScopeInput$Outbound,
28
+ CommitmentScopeInput$outboundSchema,
29
+ } from "./commitment-scope-input.js";
30
+ import {
31
+ CommitmentType,
32
+ CommitmentType$outboundSchema,
33
+ } from "./commitment-type.js";
34
+
35
+ export type CreateCommitmentRequest = {
36
+ activeWindows?: Array<ActiveWindow> | undefined;
37
+ /**
38
+ * default false
39
+ */
40
+ binding?: boolean | undefined;
41
+ collectionMethod?: CommitmentCollectionMethod | undefined;
42
+ committedPrice?: CommitmentPriceInput | undefined;
43
+ endDate: Date;
44
+ idempotencyKey?: string | undefined;
45
+ invoiceDescription?: string | undefined;
46
+ invoiceLabel?: string | undefined;
47
+ measurement: CommitmentMeasurement;
48
+ metadata?: { [k: string]: string } | undefined;
49
+ name: string;
50
+ overagePrice?: CommitmentPriceInput | undefined;
51
+ priority?: number | undefined;
52
+ scope: CommitmentScopeInput;
53
+ startDate: Date;
54
+ /**
55
+ * SubscriptionID is required on POST /commitments and set server-side on inline commitments.
56
+ */
57
+ subscriptionId?: string | undefined;
58
+ timezone?: string | undefined;
59
+ type: CommitmentType;
60
+ value?: string | undefined;
61
+ };
62
+
63
+ /** @internal */
64
+ export type CreateCommitmentRequest$Outbound = {
65
+ active_windows?: Array<ActiveWindow$Outbound> | undefined;
66
+ binding?: boolean | undefined;
67
+ collection_method?: string | undefined;
68
+ committed_price?: CommitmentPriceInput$Outbound | undefined;
69
+ end_date: string;
70
+ idempotency_key?: string | undefined;
71
+ invoice_description?: string | undefined;
72
+ invoice_label?: string | undefined;
73
+ measurement: string;
74
+ metadata?: { [k: string]: string } | undefined;
75
+ name: string;
76
+ overage_price?: CommitmentPriceInput$Outbound | undefined;
77
+ priority?: number | undefined;
78
+ scope: CommitmentScopeInput$Outbound;
79
+ start_date: string;
80
+ subscription_id?: string | undefined;
81
+ timezone?: string | undefined;
82
+ type: string;
83
+ value?: string | undefined;
84
+ };
85
+
86
+ /** @internal */
87
+ export const CreateCommitmentRequest$outboundSchema: z.ZodMiniType<
88
+ CreateCommitmentRequest$Outbound,
89
+ CreateCommitmentRequest
90
+ > = z.pipe(
91
+ z.object({
92
+ activeWindows: z.optional(z.array(ActiveWindow$outboundSchema)),
93
+ binding: z.optional(z.boolean()),
94
+ collectionMethod: z.optional(CommitmentCollectionMethod$outboundSchema),
95
+ committedPrice: z.optional(CommitmentPriceInput$outboundSchema),
96
+ endDate: z.pipe(z.date(), z.transform(v => v.toISOString())),
97
+ idempotencyKey: z.optional(z.string()),
98
+ invoiceDescription: z.optional(z.string()),
99
+ invoiceLabel: z.optional(z.string()),
100
+ measurement: CommitmentMeasurement$outboundSchema,
101
+ metadata: z.optional(z.record(z.string(), z.string())),
102
+ name: z.string(),
103
+ overagePrice: z.optional(CommitmentPriceInput$outboundSchema),
104
+ priority: z.optional(z.int()),
105
+ scope: CommitmentScopeInput$outboundSchema,
106
+ startDate: z.pipe(z.date(), z.transform(v => v.toISOString())),
107
+ subscriptionId: z.optional(z.string()),
108
+ timezone: z.optional(z.string()),
109
+ type: CommitmentType$outboundSchema,
110
+ value: z.optional(z.string()),
111
+ }),
112
+ z.transform((v) => {
113
+ return remap$(v, {
114
+ activeWindows: "active_windows",
115
+ collectionMethod: "collection_method",
116
+ committedPrice: "committed_price",
117
+ endDate: "end_date",
118
+ idempotencyKey: "idempotency_key",
119
+ invoiceDescription: "invoice_description",
120
+ invoiceLabel: "invoice_label",
121
+ overagePrice: "overage_price",
122
+ startDate: "start_date",
123
+ subscriptionId: "subscription_id",
124
+ });
125
+ }),
126
+ );
127
+
128
+ export function createCommitmentRequestToJSON(
129
+ createCommitmentRequest: CreateCommitmentRequest,
130
+ ): string {
131
+ return JSON.stringify(
132
+ CreateCommitmentRequest$outboundSchema.parse(createCommitmentRequest),
133
+ );
134
+ }
@@ -50,6 +50,9 @@ export type CreateEntitlementRequest = {
50
50
  planId?: string | undefined;
51
51
  startDate?: Date | undefined;
52
52
  staticValue?: string | undefined;
53
+ /**
54
+ * Deprecated: use grant_quota; a metered usage_limit is converted to a grant on create.
55
+ */
53
56
  usageLimit?: number | undefined;
54
57
  usageResetPeriod?: EntitlementUsageResetPeriod | undefined;
55
58
  };
@@ -4,6 +4,11 @@
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
+ import {
8
+ PriceTransformQuantity,
9
+ PriceTransformQuantity$Outbound,
10
+ PriceTransformQuantity$outboundSchema,
11
+ } from "./price-transform-quantity.js";
7
12
 
8
13
  export type CreatePriceTier = {
9
14
  /**
@@ -13,6 +18,7 @@ export type CreatePriceTier = {
13
18
  * Applied on top of unit_amount*quantity. Useful for cases like "2.7$ + 5c"
14
19
  */
15
20
  flatAmount?: string | undefined;
21
+ transformQuantity?: PriceTransformQuantity | undefined;
16
22
  /**
17
23
  * unit_amount is the amount per unit for the given tier
18
24
  */
@@ -31,6 +37,7 @@ export type CreatePriceTier = {
31
37
  /** @internal */
32
38
  export type CreatePriceTier$Outbound = {
33
39
  flat_amount?: string | undefined;
40
+ transform_quantity?: PriceTransformQuantity$Outbound | undefined;
34
41
  unit_amount: string;
35
42
  up_to?: number | undefined;
36
43
  };
@@ -42,12 +49,14 @@ export const CreatePriceTier$outboundSchema: z.ZodMiniType<
42
49
  > = z.pipe(
43
50
  z.object({
44
51
  flatAmount: z.optional(z.string()),
52
+ transformQuantity: z.optional(PriceTransformQuantity$outboundSchema),
45
53
  unitAmount: z.string(),
46
54
  upTo: z.optional(z.int()),
47
55
  }),
48
56
  z.transform((v) => {
49
57
  return remap$(v, {
50
58
  flatAmount: "flat_amount",
59
+ transformQuantity: "transform_quantity",
51
60
  unitAmount: "unit_amount",
52
61
  upTo: "up_to",
53
62
  });
@@ -23,6 +23,11 @@ import {
23
23
  CollectionMethod,
24
24
  CollectionMethod$outboundSchema,
25
25
  } from "./collection-method.js";
26
+ import {
27
+ CreateCommitmentRequest,
28
+ CreateCommitmentRequest$Outbound,
29
+ CreateCommitmentRequest$outboundSchema,
30
+ } from "./create-commitment-request.js";
26
31
  import {
27
32
  CreateCreditGrantRequest,
28
33
  CreateCreditGrantRequest$Outbound,
@@ -114,6 +119,13 @@ export type CreateSubscriptionRequest = {
114
119
  collectionMethod?: CollectionMethod | undefined;
115
120
  commitmentAmount?: string | undefined;
116
121
  commitmentDuration?: BillingPeriod | undefined;
122
+ /**
123
+ * Commitments are created with the subscription. subscription_id, and entity_id on a subscription scope,
124
+ *
125
+ * @remarks
126
+ * are set server-side.
127
+ */
128
+ commitments?: Array<CreateCommitmentRequest> | undefined;
117
129
  /**
118
130
  * Deprecated: use SubscriptionCoupons instead.
119
131
  */
@@ -205,6 +217,7 @@ export type CreateSubscriptionRequest$Outbound = {
205
217
  collection_method?: string | undefined;
206
218
  commitment_amount?: string | undefined;
207
219
  commitment_duration?: string | undefined;
220
+ commitments?: Array<CreateCommitmentRequest$Outbound> | undefined;
208
221
  coupons?: Array<string> | undefined;
209
222
  credit_grants?: Array<CreateCreditGrantRequest$Outbound> | undefined;
210
223
  currency: string;
@@ -260,6 +273,7 @@ export const CreateSubscriptionRequest$outboundSchema: z.ZodMiniType<
260
273
  collectionMethod: z.optional(CollectionMethod$outboundSchema),
261
274
  commitmentAmount: z.optional(z.string()),
262
275
  commitmentDuration: z.optional(BillingPeriod$outboundSchema),
276
+ commitments: z.optional(z.array(CreateCommitmentRequest$outboundSchema)),
263
277
  coupons: z.optional(z.array(z.string())),
264
278
  creditGrants: z.optional(z.array(CreateCreditGrantRequest$outboundSchema)),
265
279
  currency: z.string(),
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import {
10
+ DeleteEventsResponse,
11
+ DeleteEventsResponse$inboundSchema,
12
+ } from "./delete-events-response.js";
13
+ import { SDKValidationError } from "./sdk-validation-error.js";
14
+
15
+ export type DeleteEventsResponseResponse = {
16
+ headers: { [k: string]: Array<string> };
17
+ result: DeleteEventsResponse;
18
+ };
19
+
20
+ /** @internal */
21
+ export const DeleteEventsResponseResponse$inboundSchema: z.ZodMiniType<
22
+ DeleteEventsResponseResponse,
23
+ unknown
24
+ > = z.pipe(
25
+ z.object({
26
+ Headers: z._default(z.record(z.string(), z.array(z.string())), {}),
27
+ Result: DeleteEventsResponse$inboundSchema,
28
+ }),
29
+ z.transform((v) => {
30
+ return remap$(v, {
31
+ "Headers": "headers",
32
+ "Result": "result",
33
+ });
34
+ }),
35
+ );
36
+
37
+ export function deleteEventsResponseResponseFromJSON(
38
+ jsonString: string,
39
+ ): SafeParseResult<DeleteEventsResponseResponse, SDKValidationError> {
40
+ return safeParse(
41
+ jsonString,
42
+ (x) => DeleteEventsResponseResponse$inboundSchema.parse(JSON.parse(x)),
43
+ `Failed to parse 'DeleteEventsResponseResponse' from JSON`,
44
+ );
45
+ }
@@ -0,0 +1,74 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+
8
+ export type DeleteEventsRequest = {
9
+ /**
10
+ * EventIDs narrows the deletion to exact event ids. Requires exactly one
11
+ *
12
+ * @remarks
13
+ * customer and no feature_ids.
14
+ */
15
+ eventIds?: Array<string> | undefined;
16
+ externalCustomerIds: Array<string>;
17
+ /**
18
+ * FeatureIDs narrows the deletion to the meters these features resolve to.
19
+ */
20
+ featureIds?: Array<string> | undefined;
21
+ periodEnd: Date;
22
+ periodStart: Date;
23
+ /**
24
+ * SkipPayload stores the audit row's properties as '' so the deletion leaves
25
+ *
26
+ * @remarks
27
+ * no payload copy. Defaults to true: a deletion is usually an erasure, and
28
+ * keeping the payload would defeat it. Send false to retain it.
29
+ */
30
+ skipPayload?: boolean | undefined;
31
+ };
32
+
33
+ /** @internal */
34
+ export type DeleteEventsRequest$Outbound = {
35
+ event_ids?: Array<string> | undefined;
36
+ external_customer_ids: Array<string>;
37
+ feature_ids?: Array<string> | undefined;
38
+ period_end: string;
39
+ period_start: string;
40
+ skip_payload?: boolean | undefined;
41
+ };
42
+
43
+ /** @internal */
44
+ export const DeleteEventsRequest$outboundSchema: z.ZodMiniType<
45
+ DeleteEventsRequest$Outbound,
46
+ DeleteEventsRequest
47
+ > = z.pipe(
48
+ z.object({
49
+ eventIds: z.optional(z.array(z.string())),
50
+ externalCustomerIds: z.array(z.string()),
51
+ featureIds: z.optional(z.array(z.string())),
52
+ periodEnd: z.pipe(z.date(), z.transform(v => v.toISOString())),
53
+ periodStart: z.pipe(z.date(), z.transform(v => v.toISOString())),
54
+ skipPayload: z.optional(z.boolean()),
55
+ }),
56
+ z.transform((v) => {
57
+ return remap$(v, {
58
+ eventIds: "event_ids",
59
+ externalCustomerIds: "external_customer_ids",
60
+ featureIds: "feature_ids",
61
+ periodEnd: "period_end",
62
+ periodStart: "period_start",
63
+ skipPayload: "skip_payload",
64
+ });
65
+ }),
66
+ );
67
+
68
+ export function deleteEventsRequestToJSON(
69
+ deleteEventsRequest: DeleteEventsRequest,
70
+ ): string {
71
+ return JSON.stringify(
72
+ DeleteEventsRequest$outboundSchema.parse(deleteEventsRequest),
73
+ );
74
+ }
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as types from "../../types/primitives.js";
10
+ import { SDKValidationError } from "./sdk-validation-error.js";
11
+
12
+ export type DeleteEventsResponse = {
13
+ deletedEvents?: number | undefined;
14
+ deletedMeterUsageRows?: number | undefined;
15
+ };
16
+
17
+ /** @internal */
18
+ export const DeleteEventsResponse$inboundSchema: z.ZodMiniType<
19
+ DeleteEventsResponse,
20
+ unknown
21
+ > = z.pipe(
22
+ z.object({
23
+ deleted_events: types.optional(types.number()),
24
+ deleted_meter_usage_rows: types.optional(types.number()),
25
+ }),
26
+ z.transform((v) => {
27
+ return remap$(v, {
28
+ "deleted_events": "deletedEvents",
29
+ "deleted_meter_usage_rows": "deletedMeterUsageRows",
30
+ });
31
+ }),
32
+ );
33
+
34
+ export function deleteEventsResponseFromJSON(
35
+ jsonString: string,
36
+ ): SafeParseResult<DeleteEventsResponse, SDKValidationError> {
37
+ return safeParse(
38
+ jsonString,
39
+ (x) => DeleteEventsResponse$inboundSchema.parse(JSON.parse(x)),
40
+ `Failed to parse 'DeleteEventsResponse' from JSON`,
41
+ );
42
+ }
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+
7
+ export type GetCommitmentRequest = {
8
+ /**
9
+ * Commitment ID
10
+ */
11
+ id: string;
12
+ };
13
+
14
+ /** @internal */
15
+ export type GetCommitmentRequest$Outbound = {
16
+ id: string;
17
+ };
18
+
19
+ /** @internal */
20
+ export const GetCommitmentRequest$outboundSchema: z.ZodMiniType<
21
+ GetCommitmentRequest$Outbound,
22
+ GetCommitmentRequest
23
+ > = z.object({
24
+ id: z.string(),
25
+ });
26
+
27
+ export function getCommitmentRequestToJSON(
28
+ getCommitmentRequest: GetCommitmentRequest,
29
+ ): string {
30
+ return JSON.stringify(
31
+ GetCommitmentRequest$outboundSchema.parse(getCommitmentRequest),
32
+ );
33
+ }
@@ -7,6 +7,10 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import * as types from "../../types/primitives.js";
10
+ import {
11
+ CommitmentUsageBreakdown,
12
+ CommitmentUsageBreakdown$inboundSchema,
13
+ } from "./commitment-usage-breakdown.js";
10
14
  import { SDKValidationError } from "./sdk-validation-error.js";
11
15
  import {
12
16
  SubscriptionUsageByMetersResponse,
@@ -21,6 +25,10 @@ export type GetUsageBySubscriptionResponse = {
21
25
  * Amount of commitment used
22
26
  */
23
27
  commitmentUtilized?: number | undefined;
28
+ /**
29
+ * Commitments is the per-commitment usage breakdown for the window; nil when commitments v2 is off or none apply.
30
+ */
31
+ commitments?: Array<CommitmentUsageBreakdown> | undefined;
24
32
  currency?: string | undefined;
25
33
  displayAmount?: string | undefined;
26
34
  endTime?: Date | undefined;
@@ -48,6 +56,9 @@ export const GetUsageBySubscriptionResponse$inboundSchema: z.ZodMiniType<
48
56
  ),
49
57
  commitment_amount: types.optional(types.number()),
50
58
  commitment_utilized: types.optional(types.number()),
59
+ commitments: types.optional(
60
+ z.array(CommitmentUsageBreakdown$inboundSchema),
61
+ ),
51
62
  currency: types.optional(types.string()),
52
63
  display_amount: types.optional(types.string()),
53
64
  end_time: types.optional(types.date()),