@leaflow/sdk 0.141.0 → 0.143.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 (589) hide show
  1. package/dist/billing/type/funds/v1/generated/models.d.ts +4 -4
  2. package/dist/billing/type/funds/v1/generated/validators/funds.zod.js +4 -4
  3. package/dist/billing/type/order/v1/generated/models.d.ts +375 -779
  4. package/dist/billing/type/order/v1/generated/models.js +12 -44
  5. package/dist/billing/type/order/v1/generated/validators/accountBalance.zod.d.ts +22 -11
  6. package/dist/billing/type/order/v1/generated/validators/accountBalance.zod.js +8 -8
  7. package/dist/billing/type/order/v1/generated/validators/activeResource.zod.js +8 -5
  8. package/dist/billing/type/order/v1/generated/validators/allowance.zod.js +3 -3
  9. package/dist/billing/type/order/v1/generated/validators/applicability.zod.d.ts +22 -11
  10. package/dist/billing/type/order/v1/generated/validators/applicability.zod.js +12 -3
  11. package/dist/billing/type/order/v1/generated/validators/applicablePlan.zod.js +1 -1
  12. package/dist/billing/type/order/v1/generated/validators/billingAccount.zod.js +5 -5
  13. package/dist/billing/type/order/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
  14. package/dist/billing/type/order/v1/generated/validators/billingScheme.zod.d.ts +14 -0
  15. package/dist/billing/type/order/v1/generated/validators/billingScheme.zod.js +11 -0
  16. package/dist/billing/type/order/v1/generated/validators/cancellation.zod.d.ts +6 -3
  17. package/dist/billing/type/order/v1/generated/validators/cancellation.zod.js +4 -4
  18. package/dist/billing/type/order/v1/generated/validators/cancellationCreate.zod.js +3 -3
  19. package/dist/billing/type/order/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
  20. package/dist/billing/type/order/v1/generated/validators/cancellationItem.zod.js +6 -5
  21. package/dist/billing/type/order/v1/generated/validators/cancellationList.zod.d.ts +6 -3
  22. package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
  23. package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
  24. package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
  25. package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
  26. package/dist/billing/type/order/v1/generated/validators/contact.zod.js +2 -2
  27. package/dist/billing/type/order/v1/generated/validators/creditGrant.zod.d.ts +22 -11
  28. package/dist/billing/type/order/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
  29. package/dist/billing/type/order/v1/generated/validators/creditGroup.zod.d.ts +22 -11
  30. package/dist/billing/type/order/v1/generated/validators/creditGroup.zod.js +1 -1
  31. package/dist/billing/type/order/v1/generated/validators/creditNote.zod.js +4 -4
  32. package/dist/billing/type/order/v1/generated/validators/currency.zod.js +1 -1
  33. package/dist/billing/type/order/v1/generated/validators/discount.zod.d.ts +23 -12
  34. package/dist/billing/type/order/v1/generated/validators/discount.zod.js +4 -4
  35. package/dist/billing/type/order/v1/generated/validators/discountList.zod.d.ts +23 -12
  36. package/dist/billing/type/order/v1/generated/validators/entitlement.zod.js +1 -1
  37. package/dist/billing/type/order/v1/generated/validators/funds.zod.js +4 -4
  38. package/dist/billing/type/order/v1/generated/validators/invoice.zod.d.ts +0 -1
  39. package/dist/billing/type/order/v1/generated/validators/invoice.zod.js +8 -8
  40. package/dist/billing/type/order/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
  41. package/dist/billing/type/order/v1/generated/validators/invoiceItem.zod.js +6 -4
  42. package/dist/billing/type/order/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
  43. package/dist/billing/type/order/v1/generated/validators/invoiceItemProration.zod.js +1 -3
  44. package/dist/billing/type/order/v1/generated/validators/invoiceList.zod.d.ts +0 -1
  45. package/dist/billing/type/order/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
  46. package/dist/billing/type/order/v1/generated/validators/invoiceStatus.zod.js +2 -2
  47. package/dist/billing/type/order/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
  48. package/dist/billing/type/order/v1/generated/validators/invoiceSummary.zod.js +3 -3
  49. package/dist/billing/type/order/v1/generated/validators/monthlyStatement.zod.js +2 -2
  50. package/dist/billing/type/order/v1/generated/validators/objectIdentity.zod.js +1 -1
  51. package/dist/billing/type/order/v1/generated/validators/order.zod.d.ts +7 -4
  52. package/dist/billing/type/order/v1/generated/validators/order.zod.js +10 -12
  53. package/dist/billing/type/order/v1/generated/validators/orderItem.zod.d.ts +7 -3
  54. package/dist/billing/type/order/v1/generated/validators/orderItem.zod.js +16 -14
  55. package/dist/billing/type/order/v1/generated/validators/orderItemList.zod.d.ts +7 -3
  56. package/dist/billing/type/order/v1/generated/validators/orderItemStatus.zod.js +1 -1
  57. package/dist/billing/type/order/v1/generated/validators/orderList.zod.d.ts +7 -4
  58. package/dist/billing/type/order/v1/generated/validators/orderRefundQuote.zod.js +1 -1
  59. package/dist/billing/type/order/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
  60. package/dist/billing/type/order/v1/generated/validators/orderStatus.zod.js +1 -1
  61. package/dist/billing/type/order/v1/generated/validators/paidWith.zod.js +1 -1
  62. package/dist/billing/type/order/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
  63. package/dist/billing/type/order/v1/generated/validators/payTogetherRequest.zod.js +2 -2
  64. package/dist/billing/type/order/v1/generated/validators/paymentAction.zod.js +4 -4
  65. package/dist/billing/type/order/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
  66. package/dist/billing/type/order/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
  67. package/dist/billing/type/order/v1/generated/validators/paymentOption.zod.js +1 -1
  68. package/dist/billing/type/order/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
  69. package/dist/billing/type/order/v1/generated/validators/paymentPreview.zod.js +4 -4
  70. package/dist/billing/type/order/v1/generated/validators/paymentResult.zod.js +5 -8
  71. package/dist/billing/type/order/v1/generated/validators/paymentStatus.zod.js +1 -1
  72. package/dist/billing/type/order/v1/generated/validators/placedOrder.zod.d.ts +0 -1
  73. package/dist/billing/type/order/v1/generated/validators/price.zod.d.ts +7 -5
  74. package/dist/billing/type/order/v1/generated/validators/price.zod.js +14 -11
  75. package/dist/billing/type/order/v1/generated/validators/priceList.zod.d.ts +7 -5
  76. package/dist/billing/type/order/v1/generated/validators/priceOption.zod.d.ts +7 -5
  77. package/dist/billing/type/order/v1/generated/validators/priceOption.zod.js +7 -3
  78. package/dist/billing/type/order/v1/generated/validators/priceType.zod.d.ts +14 -0
  79. package/dist/billing/type/order/v1/generated/validators/priceType.zod.js +11 -0
  80. package/dist/billing/type/order/v1/generated/validators/productID.zod.js +1 -1
  81. package/dist/billing/type/order/v1/generated/validators/projectAssignment.zod.js +2 -2
  82. package/dist/billing/type/order/v1/generated/validators/purchaseOperation.zod.js +1 -1
  83. package/dist/billing/type/order/v1/generated/validators/quote.zod.d.ts +6 -3
  84. package/dist/billing/type/order/v1/generated/validators/quote.zod.js +4 -4
  85. package/dist/billing/type/order/v1/generated/validators/quoteCancellation.zod.js +2 -2
  86. package/dist/billing/type/order/v1/generated/validators/quoteItem.zod.js +4 -4
  87. package/dist/billing/type/order/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
  88. package/dist/billing/type/order/v1/generated/validators/quoteItemInput.zod.js +8 -8
  89. package/dist/billing/type/order/v1/generated/validators/quoteRenewal.zod.js +1 -1
  90. package/dist/billing/type/order/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
  91. package/dist/billing/type/order/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
  92. package/dist/billing/type/order/v1/generated/validators/quoteRequest.zod.js +5 -5
  93. package/dist/billing/type/order/v1/generated/validators/quotedDiscount.zod.js +1 -1
  94. package/dist/billing/type/order/v1/generated/validators/rate.zod.d.ts +11 -0
  95. package/dist/billing/type/order/v1/generated/validators/rate.zod.js +14 -6
  96. package/dist/billing/type/order/v1/generated/validators/rateList.zod.d.ts +11 -0
  97. package/dist/billing/type/order/v1/generated/validators/refund.zod.js +3 -3
  98. package/dist/billing/type/order/v1/generated/validators/refundPolicy.zod.js +1 -1
  99. package/dist/billing/type/order/v1/generated/validators/refundReason.zod.js +1 -1
  100. package/dist/billing/type/order/v1/generated/validators/renewRequest.zod.js +2 -2
  101. package/dist/billing/type/order/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
  102. package/dist/billing/type/order/v1/generated/validators/renewalPrice.zod.js +1 -1
  103. package/dist/billing/type/order/v1/generated/validators/scheduledChange.zod.js +2 -2
  104. package/dist/billing/type/order/v1/generated/validators/spendRow.zod.d.ts +8 -0
  105. package/dist/billing/type/order/v1/generated/validators/spendRow.zod.js +11 -0
  106. package/dist/billing/type/order/v1/generated/validators/spendRowList.zod.d.ts +8 -0
  107. package/dist/billing/type/order/v1/generated/validators/spendRowList.zod.js +1 -1
  108. package/dist/billing/type/order/v1/generated/validators/statement.zod.js +2 -2
  109. package/dist/billing/type/order/v1/generated/validators/statementItem.zod.d.ts +1 -0
  110. package/dist/billing/type/order/v1/generated/validators/statementItem.zod.js +4 -0
  111. package/dist/billing/type/order/v1/generated/validators/statementSummary.zod.d.ts +1 -0
  112. package/dist/billing/type/order/v1/generated/validators/statementType.zod.js +1 -1
  113. package/dist/billing/type/order/v1/generated/validators/subscription.zod.d.ts +7 -3
  114. package/dist/billing/type/order/v1/generated/validators/subscription.zod.js +20 -14
  115. package/dist/billing/type/order/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
  116. package/dist/billing/type/order/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
  117. package/dist/billing/type/order/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
  118. package/dist/billing/type/order/v1/generated/validators/terminationPolicy.zod.js +1 -1
  119. package/dist/billing/type/order/v1/generated/validators/tier.zod.js +1 -1
  120. package/dist/billing/type/order/v1/generated/validators/topUp.zod.js +8 -8
  121. package/dist/billing/type/order/v1/generated/validators/topUpCreate.zod.js +4 -4
  122. package/dist/billing/type/order/v1/generated/validators/transaction.zod.js +6 -6
  123. package/dist/billing/type/order/v1/generated/validators/usageCharge.zod.js +4 -7
  124. package/dist/billing/type/order/v1/generated/validators/usageType.zod.d.ts +14 -0
  125. package/dist/billing/type/order/v1/generated/validators/usageType.zod.js +11 -0
  126. package/dist/billing/type/order/v1/generated/validators/withdrawal.zod.js +2 -2
  127. package/dist/billing/type/order/v1/generated/validators/withdrawalItem.zod.js +2 -2
  128. package/dist/billing/type/order/v1/generated/validators/withdrawalSource.zod.js +1 -1
  129. package/dist/billing/type/quote/v1/generated/models.d.ts +4 -4
  130. package/dist/billing/type/quote/v1/generated/validators/funds.zod.js +4 -4
  131. package/dist/billing/v1/generated/functions.d.ts +176 -310
  132. package/dist/billing/v1/generated/functions.js +175 -309
  133. package/dist/billing/v1/generated/models.d.ts +425 -863
  134. package/dist/billing/v1/generated/models.js +13 -49
  135. package/dist/billing/v1/generated/schemas.zod.d.ts +166 -383
  136. package/dist/billing/v1/generated/schemas.zod.js +213 -372
  137. package/dist/billing/v1/generated/validators/accountBalance.zod.d.ts +22 -11
  138. package/dist/billing/v1/generated/validators/accountBalance.zod.js +8 -8
  139. package/dist/billing/v1/generated/validators/activeResource.zod.js +8 -5
  140. package/dist/billing/v1/generated/validators/allowance.zod.js +3 -3
  141. package/dist/billing/v1/generated/validators/applicability.zod.d.ts +22 -11
  142. package/dist/billing/v1/generated/validators/applicability.zod.js +12 -3
  143. package/dist/billing/v1/generated/validators/applicablePlan.zod.js +1 -1
  144. package/dist/billing/v1/generated/validators/billingAccount.zod.js +5 -5
  145. package/dist/billing/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
  146. package/dist/billing/v1/generated/validators/billingScheme.zod.d.ts +14 -0
  147. package/dist/billing/v1/generated/validators/billingScheme.zod.js +11 -0
  148. package/dist/billing/v1/generated/validators/cancellation.zod.d.ts +6 -3
  149. package/dist/billing/v1/generated/validators/cancellation.zod.js +4 -4
  150. package/dist/billing/v1/generated/validators/cancellationCreate.zod.js +3 -3
  151. package/dist/billing/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
  152. package/dist/billing/v1/generated/validators/cancellationItem.zod.js +6 -5
  153. package/dist/billing/v1/generated/validators/cancellationList.zod.d.ts +6 -3
  154. package/dist/billing/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
  155. package/dist/billing/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
  156. package/dist/billing/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
  157. package/dist/billing/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
  158. package/dist/billing/v1/generated/validators/contact.zod.js +2 -2
  159. package/dist/billing/v1/generated/validators/creditGrant.zod.d.ts +22 -11
  160. package/dist/billing/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
  161. package/dist/billing/v1/generated/validators/creditGroup.zod.d.ts +22 -11
  162. package/dist/billing/v1/generated/validators/creditGroup.zod.js +1 -1
  163. package/dist/billing/v1/generated/validators/creditNote.zod.js +4 -4
  164. package/dist/billing/v1/generated/validators/currency.zod.js +1 -1
  165. package/dist/billing/v1/generated/validators/discount.zod.d.ts +23 -12
  166. package/dist/billing/v1/generated/validators/discount.zod.js +4 -4
  167. package/dist/billing/v1/generated/validators/discountList.zod.d.ts +23 -12
  168. package/dist/billing/v1/generated/validators/entitlement.zod.js +1 -1
  169. package/dist/billing/v1/generated/validators/funds.zod.js +4 -4
  170. package/dist/billing/v1/generated/validators/invoice.zod.d.ts +0 -1
  171. package/dist/billing/v1/generated/validators/invoice.zod.js +8 -8
  172. package/dist/billing/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
  173. package/dist/billing/v1/generated/validators/invoiceItem.zod.js +6 -4
  174. package/dist/billing/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
  175. package/dist/billing/v1/generated/validators/invoiceItemProration.zod.js +1 -3
  176. package/dist/billing/v1/generated/validators/invoiceList.zod.d.ts +0 -1
  177. package/dist/billing/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
  178. package/dist/billing/v1/generated/validators/invoiceStatus.zod.js +2 -2
  179. package/dist/billing/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
  180. package/dist/billing/v1/generated/validators/invoiceSummary.zod.js +3 -3
  181. package/dist/billing/v1/generated/validators/listInvoicesParams.zod.d.ts +0 -1
  182. package/dist/billing/v1/generated/validators/listPricesParams.zod.d.ts +5 -2
  183. package/dist/billing/v1/generated/validators/listPricesParams.zod.js +4 -1
  184. package/dist/billing/v1/generated/validators/listSpendParams.zod.d.ts +1 -0
  185. package/dist/billing/v1/generated/validators/listSpendParams.zod.js +3 -1
  186. package/dist/billing/v1/generated/validators/monthlyStatement.zod.js +2 -2
  187. package/dist/billing/v1/generated/validators/objectIdentity.zod.js +1 -1
  188. package/dist/billing/v1/generated/validators/order.zod.d.ts +7 -4
  189. package/dist/billing/v1/generated/validators/order.zod.js +10 -12
  190. package/dist/billing/v1/generated/validators/orderItem.zod.d.ts +7 -3
  191. package/dist/billing/v1/generated/validators/orderItem.zod.js +16 -14
  192. package/dist/billing/v1/generated/validators/orderItemList.zod.d.ts +7 -3
  193. package/dist/billing/v1/generated/validators/orderItemStatus.zod.js +1 -1
  194. package/dist/billing/v1/generated/validators/orderList.zod.d.ts +7 -4
  195. package/dist/billing/v1/generated/validators/orderRefundQuote.zod.js +1 -1
  196. package/dist/billing/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
  197. package/dist/billing/v1/generated/validators/orderStatus.zod.js +1 -1
  198. package/dist/billing/v1/generated/validators/paidWith.zod.js +1 -1
  199. package/dist/billing/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
  200. package/dist/billing/v1/generated/validators/payTogetherRequest.zod.js +2 -2
  201. package/dist/billing/v1/generated/validators/paymentAction.zod.js +4 -4
  202. package/dist/billing/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
  203. package/dist/billing/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
  204. package/dist/billing/v1/generated/validators/paymentOption.zod.js +1 -1
  205. package/dist/billing/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
  206. package/dist/billing/v1/generated/validators/paymentPreview.zod.js +4 -4
  207. package/dist/billing/v1/generated/validators/paymentResult.zod.js +5 -8
  208. package/dist/billing/v1/generated/validators/paymentStatus.zod.js +1 -1
  209. package/dist/billing/v1/generated/validators/price.zod.d.ts +7 -5
  210. package/dist/billing/v1/generated/validators/price.zod.js +14 -11
  211. package/dist/billing/v1/generated/validators/priceList.zod.d.ts +7 -5
  212. package/dist/billing/v1/generated/validators/priceOption.zod.d.ts +7 -5
  213. package/dist/billing/v1/generated/validators/priceOption.zod.js +7 -3
  214. package/dist/billing/v1/generated/validators/priceType.zod.d.ts +14 -0
  215. package/dist/billing/v1/generated/validators/priceType.zod.js +11 -0
  216. package/dist/billing/v1/generated/validators/productID.zod.js +1 -1
  217. package/dist/billing/v1/generated/validators/projectAssignment.zod.js +2 -2
  218. package/dist/billing/v1/generated/validators/purchaseOperation.zod.js +1 -1
  219. package/dist/billing/v1/generated/validators/quote.zod.d.ts +6 -3
  220. package/dist/billing/v1/generated/validators/quote.zod.js +4 -4
  221. package/dist/billing/v1/generated/validators/quoteCancellation.zod.js +2 -2
  222. package/dist/billing/v1/generated/validators/quoteItem.zod.js +4 -4
  223. package/dist/billing/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
  224. package/dist/billing/v1/generated/validators/quoteItemInput.zod.js +8 -8
  225. package/dist/billing/v1/generated/validators/quoteRenewal.zod.js +1 -1
  226. package/dist/billing/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
  227. package/dist/billing/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
  228. package/dist/billing/v1/generated/validators/quoteRequest.zod.js +5 -5
  229. package/dist/billing/v1/generated/validators/quotedDiscount.zod.js +1 -1
  230. package/dist/billing/v1/generated/validators/rate.zod.d.ts +11 -0
  231. package/dist/billing/v1/generated/validators/rate.zod.js +14 -6
  232. package/dist/billing/v1/generated/validators/rateList.zod.d.ts +11 -0
  233. package/dist/billing/v1/generated/validators/refund.zod.js +3 -3
  234. package/dist/billing/v1/generated/validators/refundPolicy.zod.js +1 -1
  235. package/dist/billing/v1/generated/validators/refundReason.zod.js +1 -1
  236. package/dist/billing/v1/generated/validators/renewRequest.zod.js +2 -2
  237. package/dist/billing/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
  238. package/dist/billing/v1/generated/validators/renewalPrice.zod.js +1 -1
  239. package/dist/billing/v1/generated/validators/scheduledChange.zod.js +2 -2
  240. package/dist/billing/v1/generated/validators/spendRow.zod.d.ts +8 -0
  241. package/dist/billing/v1/generated/validators/spendRow.zod.js +11 -0
  242. package/dist/billing/v1/generated/validators/spendRowList.zod.d.ts +8 -0
  243. package/dist/billing/v1/generated/validators/spendRowList.zod.js +1 -1
  244. package/dist/billing/v1/generated/validators/statement.zod.js +2 -2
  245. package/dist/billing/v1/generated/validators/statementItem.zod.d.ts +1 -0
  246. package/dist/billing/v1/generated/validators/statementItem.zod.js +4 -0
  247. package/dist/billing/v1/generated/validators/statementSummary.zod.d.ts +1 -0
  248. package/dist/billing/v1/generated/validators/statementType.zod.js +1 -1
  249. package/dist/billing/v1/generated/validators/subscription.zod.d.ts +7 -3
  250. package/dist/billing/v1/generated/validators/subscription.zod.js +20 -14
  251. package/dist/billing/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
  252. package/dist/billing/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
  253. package/dist/billing/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
  254. package/dist/billing/v1/generated/validators/terminationPolicy.zod.js +1 -1
  255. package/dist/billing/v1/generated/validators/tier.zod.js +1 -1
  256. package/dist/billing/v1/generated/validators/topUp.zod.js +8 -8
  257. package/dist/billing/v1/generated/validators/topUpCreate.zod.js +4 -4
  258. package/dist/billing/v1/generated/validators/transaction.zod.js +6 -6
  259. package/dist/billing/v1/generated/validators/usageCharge.zod.js +4 -7
  260. package/dist/billing/v1/generated/validators/usageType.zod.d.ts +14 -0
  261. package/dist/billing/v1/generated/validators/usageType.zod.js +11 -0
  262. package/dist/billing/v1/generated/validators/withdrawal.zod.js +2 -2
  263. package/dist/billing/v1/generated/validators/withdrawalItem.zod.js +2 -2
  264. package/dist/billing/v1/generated/validators/withdrawalSource.zod.js +1 -1
  265. package/dist/canopy/v1/generated/functions.d.ts +66 -1
  266. package/dist/canopy/v1/generated/functions.js +67 -0
  267. package/dist/canopy/v1/generated/models.d.ts +516 -788
  268. package/dist/canopy/v1/generated/models.js +36 -44
  269. package/dist/canopy/v1/generated/schemas.zod.d.ts +27 -0
  270. package/dist/canopy/v1/generated/schemas.zod.js +18 -0
  271. package/dist/canopy/v1/generated/validators/accountBalance.zod.d.ts +22 -11
  272. package/dist/canopy/v1/generated/validators/accountBalance.zod.js +8 -8
  273. package/dist/canopy/v1/generated/validators/activeResource.zod.js +8 -5
  274. package/dist/canopy/v1/generated/validators/allowance.zod.js +3 -3
  275. package/dist/canopy/v1/generated/validators/applicability.zod.d.ts +22 -11
  276. package/dist/canopy/v1/generated/validators/applicability.zod.js +12 -3
  277. package/dist/canopy/v1/generated/validators/applicablePlan.zod.js +1 -1
  278. package/dist/canopy/v1/generated/validators/billingAccount.zod.js +5 -5
  279. package/dist/canopy/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
  280. package/dist/canopy/v1/generated/validators/billingScheme.zod.d.ts +39 -0
  281. package/dist/canopy/v1/generated/validators/billingScheme.zod.js +36 -0
  282. package/dist/canopy/v1/generated/validators/cancellation.zod.d.ts +6 -3
  283. package/dist/canopy/v1/generated/validators/cancellation.zod.js +4 -4
  284. package/dist/canopy/v1/generated/validators/cancellationCreate.zod.js +3 -3
  285. package/dist/canopy/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
  286. package/dist/canopy/v1/generated/validators/cancellationItem.zod.js +6 -5
  287. package/dist/canopy/v1/generated/validators/cancellationList.zod.d.ts +6 -3
  288. package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
  289. package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
  290. package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
  291. package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
  292. package/dist/canopy/v1/generated/validators/contact.zod.js +2 -2
  293. package/dist/canopy/v1/generated/validators/createServiceResponseBody.zod.d.ts +0 -1
  294. package/dist/canopy/v1/generated/validators/creditGrant.zod.d.ts +22 -11
  295. package/dist/canopy/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
  296. package/dist/canopy/v1/generated/validators/creditGroup.zod.d.ts +22 -11
  297. package/dist/canopy/v1/generated/validators/creditGroup.zod.js +1 -1
  298. package/dist/canopy/v1/generated/validators/creditNote.zod.js +4 -4
  299. package/dist/canopy/v1/generated/validators/currency.zod.js +1 -1
  300. package/dist/canopy/v1/generated/validators/cursorPageRequestResource.zod.d.ts +9 -0
  301. package/dist/canopy/v1/generated/validators/discount.zod.d.ts +23 -12
  302. package/dist/canopy/v1/generated/validators/discount.zod.js +4 -4
  303. package/dist/canopy/v1/generated/validators/discountList.zod.d.ts +23 -12
  304. package/dist/canopy/v1/generated/validators/endpointCapabilities.zod.d.ts +50 -0
  305. package/dist/canopy/v1/generated/validators/endpointCapabilities.zod.js +39 -0
  306. package/dist/canopy/v1/generated/validators/entitlement.zod.js +1 -1
  307. package/dist/canopy/v1/generated/validators/funds.zod.js +4 -4
  308. package/dist/canopy/v1/generated/validators/invoice.zod.d.ts +0 -1
  309. package/dist/canopy/v1/generated/validators/invoice.zod.js +8 -8
  310. package/dist/canopy/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
  311. package/dist/canopy/v1/generated/validators/invoiceItem.zod.js +6 -4
  312. package/dist/canopy/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
  313. package/dist/canopy/v1/generated/validators/invoiceItemProration.zod.js +1 -3
  314. package/dist/canopy/v1/generated/validators/invoiceList.zod.d.ts +0 -1
  315. package/dist/canopy/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
  316. package/dist/canopy/v1/generated/validators/invoiceStatus.zod.js +2 -2
  317. package/dist/canopy/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
  318. package/dist/canopy/v1/generated/validators/invoiceSummary.zod.js +3 -3
  319. package/dist/canopy/v1/generated/validators/modality.zod.d.ts +43 -0
  320. package/dist/canopy/v1/generated/validators/modality.zod.js +34 -0
  321. package/dist/canopy/v1/generated/validators/model.zod.d.ts +44 -4
  322. package/dist/canopy/v1/generated/validators/model.zod.js +19 -4
  323. package/dist/canopy/v1/generated/validators/modelCapabilities.zod.d.ts +50 -0
  324. package/dist/canopy/v1/generated/validators/modelCapabilities.zod.js +37 -0
  325. package/dist/canopy/v1/generated/validators/modelEndpoint.zod.d.ts +46 -0
  326. package/dist/canopy/v1/generated/validators/modelEndpoint.zod.js +44 -0
  327. package/dist/canopy/v1/generated/validators/modelList.zod.d.ts +44 -4
  328. package/dist/canopy/v1/generated/validators/modelListResponseBody.zod.d.ts +44 -4
  329. package/dist/canopy/v1/generated/validators/modelResource.zod.d.ts +44 -4
  330. package/dist/canopy/v1/generated/validators/modelResource.zod.js +19 -6
  331. package/dist/canopy/v1/generated/validators/monthlyStatement.zod.js +2 -2
  332. package/dist/canopy/v1/generated/validators/objectIdentity.zod.js +1 -1
  333. package/dist/canopy/v1/generated/validators/order.zod.d.ts +7 -4
  334. package/dist/canopy/v1/generated/validators/order.zod.js +10 -12
  335. package/dist/canopy/v1/generated/validators/orderItem.zod.d.ts +7 -3
  336. package/dist/canopy/v1/generated/validators/orderItem.zod.js +16 -14
  337. package/dist/canopy/v1/generated/validators/orderItemList.zod.d.ts +7 -3
  338. package/dist/canopy/v1/generated/validators/orderItemStatus.zod.js +1 -1
  339. package/dist/canopy/v1/generated/validators/orderList.zod.d.ts +7 -4
  340. package/dist/canopy/v1/generated/validators/orderRefundQuote.zod.js +1 -1
  341. package/dist/canopy/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
  342. package/dist/canopy/v1/generated/validators/orderStatus.zod.js +1 -1
  343. package/dist/canopy/v1/generated/validators/paidWith.zod.js +1 -1
  344. package/dist/canopy/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
  345. package/dist/canopy/v1/generated/validators/payTogetherRequest.zod.js +2 -2
  346. package/dist/canopy/v1/generated/validators/paymentAction.zod.js +4 -4
  347. package/dist/canopy/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
  348. package/dist/canopy/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
  349. package/dist/canopy/v1/generated/validators/paymentOption.zod.js +1 -1
  350. package/dist/canopy/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
  351. package/dist/canopy/v1/generated/validators/paymentPreview.zod.js +4 -4
  352. package/dist/canopy/v1/generated/validators/paymentResult.zod.js +5 -8
  353. package/dist/canopy/v1/generated/validators/paymentStatus.zod.js +1 -1
  354. package/dist/canopy/v1/generated/validators/placedOrder.zod.d.ts +0 -1
  355. package/dist/canopy/v1/generated/validators/price.zod.d.ts +7 -5
  356. package/dist/canopy/v1/generated/validators/price.zod.js +14 -11
  357. package/dist/canopy/v1/generated/validators/priceList.zod.d.ts +7 -5
  358. package/dist/canopy/v1/generated/validators/priceOption.zod.d.ts +7 -5
  359. package/dist/canopy/v1/generated/validators/priceOption.zod.js +7 -3
  360. package/dist/canopy/v1/generated/validators/priceType.zod.d.ts +39 -0
  361. package/dist/canopy/v1/generated/validators/priceType.zod.js +36 -0
  362. package/dist/canopy/v1/generated/validators/productID.zod.js +1 -1
  363. package/dist/canopy/v1/generated/validators/projectAssignment.zod.js +2 -2
  364. package/dist/canopy/v1/generated/validators/purchaseOperation.zod.js +1 -1
  365. package/dist/canopy/v1/generated/validators/quote5f60d00.zod.d.ts +6 -3
  366. package/dist/canopy/v1/generated/validators/quote5f60d00.zod.js +4 -4
  367. package/dist/canopy/v1/generated/validators/quoteA200529.zod.d.ts +6 -3
  368. package/dist/canopy/v1/generated/validators/quoteCancellation.zod.js +2 -2
  369. package/dist/canopy/v1/generated/validators/quoteItem.zod.js +4 -4
  370. package/dist/canopy/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
  371. package/dist/canopy/v1/generated/validators/quoteItemInput.zod.js +8 -8
  372. package/dist/canopy/v1/generated/validators/quoteRenewal.zod.js +1 -1
  373. package/dist/canopy/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
  374. package/dist/canopy/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
  375. package/dist/canopy/v1/generated/validators/quoteRequest.zod.js +5 -5
  376. package/dist/canopy/v1/generated/validators/quotedDiscount.zod.js +1 -1
  377. package/dist/canopy/v1/generated/validators/rate.zod.d.ts +11 -0
  378. package/dist/canopy/v1/generated/validators/rate.zod.js +14 -6
  379. package/dist/canopy/v1/generated/validators/rateList.zod.d.ts +11 -0
  380. package/dist/canopy/v1/generated/validators/reasoningCapabilities.zod.d.ts +48 -0
  381. package/dist/canopy/v1/generated/validators/reasoningCapabilities.zod.js +51 -0
  382. package/dist/canopy/v1/generated/validators/reasoningDiagnostics.zod.d.ts +44 -0
  383. package/dist/canopy/v1/generated/validators/reasoningDiagnostics.zod.js +38 -0
  384. package/dist/canopy/v1/generated/validators/refund.zod.js +3 -3
  385. package/dist/canopy/v1/generated/validators/refundPolicy.zod.js +1 -1
  386. package/dist/canopy/v1/generated/validators/refundReason.zod.js +1 -1
  387. package/dist/canopy/v1/generated/validators/renewRequest.zod.js +2 -2
  388. package/dist/canopy/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
  389. package/dist/canopy/v1/generated/validators/renewalPrice.zod.js +1 -1
  390. package/dist/canopy/v1/generated/validators/requestResource.zod.d.ts +9 -0
  391. package/dist/canopy/v1/generated/validators/requestResource.zod.js +2 -0
  392. package/dist/canopy/v1/generated/validators/responseCreate.zod.d.ts +48 -0
  393. package/dist/canopy/v1/generated/validators/responseCreate.zod.js +48 -0
  394. package/dist/canopy/v1/generated/validators/responseDeleted.zod.d.ts +40 -0
  395. package/dist/canopy/v1/generated/validators/responseDeleted.zod.js +38 -0
  396. package/dist/canopy/v1/generated/validators/responseResource.zod.d.ts +36 -0
  397. package/dist/canopy/v1/generated/validators/responseResource.zod.js +34 -0
  398. package/dist/canopy/v1/generated/validators/scheduledChange.zod.js +2 -2
  399. package/dist/canopy/v1/generated/validators/spendRow.zod.d.ts +8 -0
  400. package/dist/canopy/v1/generated/validators/spendRow.zod.js +11 -0
  401. package/dist/canopy/v1/generated/validators/spendRowList.zod.d.ts +8 -0
  402. package/dist/canopy/v1/generated/validators/spendRowList.zod.js +1 -1
  403. package/dist/canopy/v1/generated/validators/statement.zod.js +2 -2
  404. package/dist/canopy/v1/generated/validators/statementItem.zod.d.ts +1 -0
  405. package/dist/canopy/v1/generated/validators/statementItem.zod.js +4 -0
  406. package/dist/canopy/v1/generated/validators/statementSummary.zod.d.ts +1 -0
  407. package/dist/canopy/v1/generated/validators/statementType.zod.js +1 -1
  408. package/dist/canopy/v1/generated/validators/subscription.zod.d.ts +7 -3
  409. package/dist/canopy/v1/generated/validators/subscription.zod.js +20 -14
  410. package/dist/canopy/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
  411. package/dist/canopy/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
  412. package/dist/canopy/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
  413. package/dist/canopy/v1/generated/validators/terminationPolicy.zod.js +1 -1
  414. package/dist/canopy/v1/generated/validators/tier.zod.js +1 -1
  415. package/dist/canopy/v1/generated/validators/topUp.zod.js +8 -8
  416. package/dist/canopy/v1/generated/validators/topUpCreate.zod.js +4 -4
  417. package/dist/canopy/v1/generated/validators/transaction.zod.js +6 -6
  418. package/dist/canopy/v1/generated/validators/usageCharge.zod.js +4 -7
  419. package/dist/canopy/v1/generated/validators/usageType.zod.d.ts +39 -0
  420. package/dist/canopy/v1/generated/validators/usageType.zod.js +36 -0
  421. package/dist/canopy/v1/generated/validators/withdrawal.zod.js +2 -2
  422. package/dist/canopy/v1/generated/validators/withdrawalItem.zod.js +2 -2
  423. package/dist/canopy/v1/generated/validators/withdrawalSource.zod.js +1 -1
  424. package/dist/compute/v1/generated/models.d.ts +4 -4
  425. package/dist/compute/v1/generated/schemas.zod.d.ts +18 -18
  426. package/dist/compute/v1/generated/validators/allocateFloatingIPQuoteRequestBody.zod.d.ts +1 -1
  427. package/dist/compute/v1/generated/validators/allocateFloatingIPRequestBody.zod.d.ts +1 -1
  428. package/dist/compute/v1/generated/validators/backupService.zod.d.ts +2 -2
  429. package/dist/compute/v1/generated/validators/billingChoice.zod.d.ts +1 -1
  430. package/dist/compute/v1/generated/validators/bootDisk.zod.d.ts +1 -1
  431. package/dist/compute/v1/generated/validators/createBackupCapacityPackQuoteRequestBody.zod.d.ts +1 -1
  432. package/dist/compute/v1/generated/validators/createBackupCapacityPackRequestBody.zod.d.ts +1 -1
  433. package/dist/compute/v1/generated/validators/createBackupServiceResponseBody.zod.d.ts +2 -2
  434. package/dist/compute/v1/generated/validators/createDiskQuoteRequestBody.zod.d.ts +1 -1
  435. package/dist/compute/v1/generated/validators/createDiskRequestBody.zod.d.ts +1 -1
  436. package/dist/compute/v1/generated/validators/createImageQuoteRequestBody.zod.d.ts +1 -1
  437. package/dist/compute/v1/generated/validators/createImageRequestBody.zod.d.ts +1 -1
  438. package/dist/compute/v1/generated/validators/diskTypeListResponseBody.zod.d.ts +1 -1
  439. package/dist/compute/v1/generated/validators/diskTypeResource.zod.d.ts +1 -1
  440. package/dist/compute/v1/generated/validators/funds.zod.js +4 -4
  441. package/dist/compute/v1/generated/validators/iPv4PoolListResponseBody.zod.d.ts +2 -2
  442. package/dist/compute/v1/generated/validators/iPv4PoolResource.zod.d.ts +2 -2
  443. package/dist/compute/v1/generated/validators/instanceTypeListResponseBody.zod.d.ts +1 -1
  444. package/dist/compute/v1/generated/validators/instanceTypeResource.zod.d.ts +1 -1
  445. package/dist/compute/v1/generated/validators/launchInstanceQuoteRequestBody.zod.d.ts +3 -3
  446. package/dist/compute/v1/generated/validators/launchInstanceRequestBody.zod.d.ts +3 -3
  447. package/dist/compute/v1/generated/validators/newBootDisk.zod.d.ts +1 -1
  448. package/dist/compute/v1/generated/validators/newCompute.zod.d.ts +1 -1
  449. package/dist/compute/v1/generated/validators/newFloatingIP.zod.d.ts +1 -1
  450. package/dist/compute/v1/generated/validators/pricing.zod.d.ts +1 -1
  451. package/dist/compute/v1/generated/validators/pricingOption.zod.d.ts +1 -1
  452. package/dist/compute/v1/generated/validators/regionListResponseBody.zod.d.ts +1 -1
  453. package/dist/compute/v1/generated/validators/regionResource.zod.d.ts +1 -1
  454. package/dist/compute/v1/generated/validators/restoreBackupQuoteRequestBody.zod.d.ts +1 -1
  455. package/dist/compute/v1/generated/validators/restoreBackupRequestBody.zod.d.ts +1 -1
  456. package/dist/compute/v1/generated/validators/setSnapshotQuotaQuoteRequestBody.zod.d.ts +1 -1
  457. package/dist/compute/v1/generated/validators/setSnapshotQuotaRequestBody.zod.d.ts +1 -1
  458. package/dist/compute/v1/generated/validators/setSnapshotQuotaResponseBody.zod.d.ts +2 -2
  459. package/dist/compute/v1/generated/validators/snapshotQuota.zod.d.ts +2 -2
  460. package/dist/membership/v1/generated/models.d.ts +375 -779
  461. package/dist/membership/v1/generated/models.js +12 -44
  462. package/dist/membership/v1/generated/validators/accountBalance.zod.d.ts +22 -11
  463. package/dist/membership/v1/generated/validators/accountBalance.zod.js +8 -8
  464. package/dist/membership/v1/generated/validators/activeResource.zod.js +8 -5
  465. package/dist/membership/v1/generated/validators/allowance.zod.js +3 -3
  466. package/dist/membership/v1/generated/validators/applicability.zod.d.ts +22 -11
  467. package/dist/membership/v1/generated/validators/applicability.zod.js +12 -3
  468. package/dist/membership/v1/generated/validators/applicablePlan.zod.js +1 -1
  469. package/dist/membership/v1/generated/validators/billingAccount.zod.js +5 -5
  470. package/dist/membership/v1/generated/validators/billingAccountUpdate.zod.js +1 -1
  471. package/dist/membership/v1/generated/validators/billingScheme.zod.d.ts +14 -0
  472. package/dist/membership/v1/generated/validators/billingScheme.zod.js +11 -0
  473. package/dist/membership/v1/generated/validators/cancellation.zod.d.ts +6 -3
  474. package/dist/membership/v1/generated/validators/cancellation.zod.js +4 -4
  475. package/dist/membership/v1/generated/validators/cancellationCreate.zod.js +3 -3
  476. package/dist/membership/v1/generated/validators/cancellationItem.zod.d.ts +6 -3
  477. package/dist/membership/v1/generated/validators/cancellationItem.zod.js +6 -5
  478. package/dist/membership/v1/generated/validators/cancellationList.zod.d.ts +6 -3
  479. package/dist/membership/v1/generated/validators/cancellationRefundPreview.zod.d.ts +6 -3
  480. package/dist/membership/v1/generated/validators/cancellationRefundPreview.zod.js +1 -1
  481. package/dist/membership/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +6 -3
  482. package/dist/membership/v1/generated/validators/cancellationRefundPreviewItem.zod.js +7 -4
  483. package/dist/membership/v1/generated/validators/contact.zod.js +2 -2
  484. package/dist/membership/v1/generated/validators/creditGrant.zod.d.ts +22 -11
  485. package/dist/membership/v1/generated/validators/creditGrantList.zod.d.ts +22 -11
  486. package/dist/membership/v1/generated/validators/creditGroup.zod.d.ts +22 -11
  487. package/dist/membership/v1/generated/validators/creditGroup.zod.js +1 -1
  488. package/dist/membership/v1/generated/validators/creditNote.zod.js +4 -4
  489. package/dist/membership/v1/generated/validators/currency6ff0ec7.zod.js +1 -1
  490. package/dist/membership/v1/generated/validators/discount.zod.d.ts +23 -12
  491. package/dist/membership/v1/generated/validators/discount.zod.js +4 -4
  492. package/dist/membership/v1/generated/validators/discountList.zod.d.ts +23 -12
  493. package/dist/membership/v1/generated/validators/entitlement.zod.js +1 -1
  494. package/dist/membership/v1/generated/validators/funds.zod.js +4 -4
  495. package/dist/membership/v1/generated/validators/invoice.zod.d.ts +0 -1
  496. package/dist/membership/v1/generated/validators/invoice.zod.js +8 -8
  497. package/dist/membership/v1/generated/validators/invoiceItem.zod.d.ts +1 -0
  498. package/dist/membership/v1/generated/validators/invoiceItem.zod.js +6 -4
  499. package/dist/membership/v1/generated/validators/invoiceItemList.zod.d.ts +1 -0
  500. package/dist/membership/v1/generated/validators/invoiceItemProration.zod.js +1 -3
  501. package/dist/membership/v1/generated/validators/invoiceList.zod.d.ts +0 -1
  502. package/dist/membership/v1/generated/validators/invoiceStatus.zod.d.ts +0 -1
  503. package/dist/membership/v1/generated/validators/invoiceStatus.zod.js +2 -2
  504. package/dist/membership/v1/generated/validators/invoiceSummary.zod.d.ts +0 -1
  505. package/dist/membership/v1/generated/validators/invoiceSummary.zod.js +3 -3
  506. package/dist/membership/v1/generated/validators/membershipPurchase.zod.d.ts +0 -1
  507. package/dist/membership/v1/generated/validators/monthlyStatement.zod.js +2 -2
  508. package/dist/membership/v1/generated/validators/objectIdentity.zod.js +1 -1
  509. package/dist/membership/v1/generated/validators/order.zod.d.ts +7 -4
  510. package/dist/membership/v1/generated/validators/order.zod.js +10 -12
  511. package/dist/membership/v1/generated/validators/orderItem.zod.d.ts +7 -3
  512. package/dist/membership/v1/generated/validators/orderItem.zod.js +16 -14
  513. package/dist/membership/v1/generated/validators/orderItemList.zod.d.ts +7 -3
  514. package/dist/membership/v1/generated/validators/orderItemStatus.zod.js +1 -1
  515. package/dist/membership/v1/generated/validators/orderList.zod.d.ts +7 -4
  516. package/dist/membership/v1/generated/validators/orderRefundQuote.zod.js +1 -1
  517. package/dist/membership/v1/generated/validators/orderRefundQuoteInput.zod.js +1 -1
  518. package/dist/membership/v1/generated/validators/orderStatus.zod.js +1 -1
  519. package/dist/membership/v1/generated/validators/paidWith.zod.js +1 -1
  520. package/dist/membership/v1/generated/validators/payInvoiceRequest.zod.js +6 -6
  521. package/dist/membership/v1/generated/validators/payTogetherRequest.zod.js +2 -2
  522. package/dist/membership/v1/generated/validators/paymentAction.zod.js +4 -4
  523. package/dist/membership/v1/generated/validators/paymentCancellationReason.zod.js +1 -1
  524. package/dist/membership/v1/generated/validators/paymentMethodSetupResult.zod.js +2 -4
  525. package/dist/membership/v1/generated/validators/paymentOption.zod.js +1 -1
  526. package/dist/membership/v1/generated/validators/paymentOptionMethod.zod.js +1 -1
  527. package/dist/membership/v1/generated/validators/paymentPreview.zod.js +4 -4
  528. package/dist/membership/v1/generated/validators/paymentResult.zod.js +5 -8
  529. package/dist/membership/v1/generated/validators/paymentStatus.zod.js +1 -1
  530. package/dist/membership/v1/generated/validators/placedOrder.zod.d.ts +0 -1
  531. package/dist/membership/v1/generated/validators/price.zod.d.ts +7 -5
  532. package/dist/membership/v1/generated/validators/price.zod.js +14 -11
  533. package/dist/membership/v1/generated/validators/priceList.zod.d.ts +7 -5
  534. package/dist/membership/v1/generated/validators/priceOption.zod.d.ts +7 -5
  535. package/dist/membership/v1/generated/validators/priceOption.zod.js +7 -3
  536. package/dist/membership/v1/generated/validators/priceType.zod.d.ts +14 -0
  537. package/dist/membership/v1/generated/validators/priceType.zod.js +11 -0
  538. package/dist/membership/v1/generated/validators/productID.zod.js +1 -1
  539. package/dist/membership/v1/generated/validators/projectAssignment.zod.js +2 -2
  540. package/dist/membership/v1/generated/validators/purchaseOperation.zod.js +1 -1
  541. package/dist/membership/v1/generated/validators/quote.zod.d.ts +6 -3
  542. package/dist/membership/v1/generated/validators/quote.zod.js +4 -4
  543. package/dist/membership/v1/generated/validators/quoteCancellation.zod.js +2 -2
  544. package/dist/membership/v1/generated/validators/quoteItem.zod.js +4 -4
  545. package/dist/membership/v1/generated/validators/quoteItemInput.zod.d.ts +5 -2
  546. package/dist/membership/v1/generated/validators/quoteItemInput.zod.js +8 -8
  547. package/dist/membership/v1/generated/validators/quoteRenewal.zod.js +1 -1
  548. package/dist/membership/v1/generated/validators/quoteRenewalResult.zod.js +2 -2
  549. package/dist/membership/v1/generated/validators/quoteRequest.zod.d.ts +5 -2
  550. package/dist/membership/v1/generated/validators/quoteRequest.zod.js +5 -5
  551. package/dist/membership/v1/generated/validators/quotedDiscount.zod.js +1 -1
  552. package/dist/membership/v1/generated/validators/rate.zod.d.ts +11 -0
  553. package/dist/membership/v1/generated/validators/rate.zod.js +14 -6
  554. package/dist/membership/v1/generated/validators/rateList.zod.d.ts +11 -0
  555. package/dist/membership/v1/generated/validators/refund.zod.js +3 -3
  556. package/dist/membership/v1/generated/validators/refundPolicy.zod.js +1 -1
  557. package/dist/membership/v1/generated/validators/refundReason.zod.js +1 -1
  558. package/dist/membership/v1/generated/validators/renewRequest.zod.js +2 -2
  559. package/dist/membership/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
  560. package/dist/membership/v1/generated/validators/renewalPrice.zod.js +1 -1
  561. package/dist/membership/v1/generated/validators/scheduledChange.zod.js +2 -2
  562. package/dist/membership/v1/generated/validators/spendRow.zod.d.ts +8 -0
  563. package/dist/membership/v1/generated/validators/spendRow.zod.js +11 -0
  564. package/dist/membership/v1/generated/validators/spendRowList.zod.d.ts +8 -0
  565. package/dist/membership/v1/generated/validators/spendRowList.zod.js +1 -1
  566. package/dist/membership/v1/generated/validators/statement.zod.js +2 -2
  567. package/dist/membership/v1/generated/validators/statementItem.zod.d.ts +1 -0
  568. package/dist/membership/v1/generated/validators/statementItem.zod.js +4 -0
  569. package/dist/membership/v1/generated/validators/statementSummary.zod.d.ts +1 -0
  570. package/dist/membership/v1/generated/validators/statementType.zod.js +1 -1
  571. package/dist/membership/v1/generated/validators/subscription.zod.d.ts +7 -3
  572. package/dist/membership/v1/generated/validators/subscription.zod.js +20 -14
  573. package/dist/membership/v1/generated/validators/subscriptionCancellation.zod.js +2 -2
  574. package/dist/membership/v1/generated/validators/subscriptionList.zod.d.ts +7 -3
  575. package/dist/membership/v1/generated/validators/subscriptionRestriction.zod.js +1 -1
  576. package/dist/membership/v1/generated/validators/terminationPolicy.zod.js +1 -1
  577. package/dist/membership/v1/generated/validators/tier.zod.js +1 -1
  578. package/dist/membership/v1/generated/validators/topUp.zod.js +8 -8
  579. package/dist/membership/v1/generated/validators/topUpCreate.zod.js +4 -4
  580. package/dist/membership/v1/generated/validators/transaction.zod.js +6 -6
  581. package/dist/membership/v1/generated/validators/usageCharge.zod.js +4 -7
  582. package/dist/membership/v1/generated/validators/usageType.zod.d.ts +14 -0
  583. package/dist/membership/v1/generated/validators/usageType.zod.js +11 -0
  584. package/dist/membership/v1/generated/validators/withdrawal.zod.js +2 -2
  585. package/dist/membership/v1/generated/validators/withdrawalItem.zod.js +2 -2
  586. package/dist/membership/v1/generated/validators/withdrawalSource.zod.js +1 -1
  587. package/dist/routes.d.ts +28 -4
  588. package/dist/routes.js +31 -4
  589. package/package.json +1 -1
@@ -30,6 +30,23 @@
30
30
  * - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
31
31
  * OpenAPI spec version: 1.0.0
32
32
  */
33
+ export type ReasoningDiagnosticsRequested = {
34
+ [key: string]: unknown;
35
+ };
36
+ export type ReasoningDiagnosticsEffective = {
37
+ [key: string]: unknown;
38
+ };
39
+ export type ReasoningDiagnosticsTranslation = (typeof ReasoningDiagnosticsTranslation)[keyof typeof ReasoningDiagnosticsTranslation];
40
+ export declare const ReasoningDiagnosticsTranslation: {
41
+ readonly translate: "translate";
42
+ readonly passthrough: "passthrough";
43
+ readonly strip: "strip";
44
+ };
45
+ export interface ReasoningDiagnostics {
46
+ requested: ReasoningDiagnosticsRequested;
47
+ effective?: ReasoningDiagnosticsEffective;
48
+ translation?: ReasoningDiagnosticsTranslation;
49
+ }
33
50
  export type ChatCompletionRequestMessagesItem = {
34
51
  [key: string]: unknown;
35
52
  };
@@ -68,6 +85,65 @@ export interface EmbeddingRequest {
68
85
  export interface EmbeddingResponse {
69
86
  [key: string]: unknown;
70
87
  }
88
+ export type Modality = (typeof Modality)[keyof typeof Modality];
89
+ export declare const Modality: {
90
+ readonly text: "text";
91
+ readonly image: "image";
92
+ readonly audio: "audio";
93
+ readonly video: "video";
94
+ readonly file: "file";
95
+ readonly embedding: "embedding";
96
+ };
97
+ /**
98
+ * @nullable
99
+ */
100
+ export type ReasoningCapabilitiesBudgetTokens = {
101
+ /** @minimum 0 */
102
+ min: number;
103
+ /** @minimum 0 */
104
+ max: number;
105
+ } | null;
106
+ export interface ReasoningCapabilities {
107
+ supported: boolean;
108
+ /**
109
+ * Null means unknown; an empty array means effort is not configurable.
110
+ * @nullable
111
+ */
112
+ effort_levels: string[] | null;
113
+ /** @nullable */
114
+ default_effort: string | null;
115
+ /** @nullable */
116
+ modes: string[] | null;
117
+ /** @nullable */
118
+ budget_tokens: ReasoningCapabilitiesBudgetTokens;
119
+ /** @nullable */
120
+ summary: string[] | null;
121
+ }
122
+ export interface EndpointCapabilities {
123
+ /** @nullable */
124
+ function_calling: boolean | null;
125
+ /** @nullable */
126
+ structured_output: boolean | null;
127
+ reasoning: ReasoningCapabilities | null;
128
+ }
129
+ /**
130
+ * Verified capabilities keyed by API endpoint, for example /v1/chat/completions or /v1/responses. Missing keys and null values mean unknown. Current route availability is separate.
131
+ */
132
+ export interface ModelCapabilities {
133
+ [key: string]: EndpointCapabilities;
134
+ }
135
+ export type ModelEndpoint = (typeof ModelEndpoint)[keyof typeof ModelEndpoint];
136
+ export declare const ModelEndpoint: {
137
+ readonly "/v1/chat/completions": "/v1/chat/completions";
138
+ readonly "/v1/responses": "/v1/responses";
139
+ readonly "/v1/embeddings": "/v1/embeddings";
140
+ readonly "/v1/images/generations": "/v1/images/generations";
141
+ readonly "/v1/images/edits": "/v1/images/edits";
142
+ readonly "/v1/audio/transcriptions": "/v1/audio/transcriptions";
143
+ readonly "/v1/audio/translations": "/v1/audio/translations";
144
+ readonly "/v1/audio/speech": "/v1/audio/speech";
145
+ readonly "/v1/realtime": "/v1/realtime";
146
+ };
71
147
  export interface Model {
72
148
  id: string;
73
149
  object: "model";
@@ -76,10 +152,22 @@ export interface Model {
76
152
  display_name: string;
77
153
  context_length: number;
78
154
  max_output_tokens: number;
79
- supports_vision: boolean;
80
- supports_tools: boolean;
81
- supports_reasoning: boolean;
82
- reasoning_tiers: string[];
155
+ /** The model developer; not the upstream provider or model family. */
156
+ developer: string;
157
+ description: string;
158
+ /**
159
+ * Accepted input modalities. Null means unknown.
160
+ * @nullable
161
+ */
162
+ input_modalities: Modality[] | null;
163
+ /**
164
+ * Produced output modalities. Image input does not imply image generation.
165
+ * @nullable
166
+ */
167
+ output_modalities: Modality[] | null;
168
+ capabilities: ModelCapabilities;
169
+ /** Explicitly supported API endpoints. Requests to any other endpoint are rejected before upstream admission. */
170
+ supported_endpoints: ModelEndpoint[];
83
171
  }
84
172
  export interface ModelList {
85
173
  object: "list";
@@ -290,12 +378,23 @@ export interface ModelResource {
290
378
  max_output_tokens: number;
291
379
  /** What requests to this model cost. Null when the project has no billing account. */
292
380
  pricing: ModelPricing | null;
293
- /** The values accepted for `reasoning_effort`. Empty means it is not supported */
294
- reasoning_tiers: string[];
295
381
  status: ModelResourceStatus;
296
- supports_reasoning: boolean;
297
- supports_tools: boolean;
298
- supports_vision: boolean;
382
+ /** The model developer; not the upstream provider or model family. */
383
+ developer: string;
384
+ description: string;
385
+ /**
386
+ * Accepted input modalities. Null means unknown.
387
+ * @nullable
388
+ */
389
+ input_modalities: Modality[] | null;
390
+ /**
391
+ * Produced output modalities. Image input does not imply image generation.
392
+ * @nullable
393
+ */
394
+ output_modalities: Modality[] | null;
395
+ capabilities: ModelCapabilities;
396
+ /** Explicitly supported API endpoints. Requests to any other endpoint are rejected before upstream admission. */
397
+ supported_endpoints: ModelEndpoint[];
299
398
  }
300
399
  export interface ModelListResponseBody {
301
400
  items: ModelResource[];
@@ -348,6 +447,7 @@ export interface RequestResource {
348
447
  upstream_status: number;
349
448
  /** upstream means the figures were reported by the provider; estimated means they were derived from the character classes of the payload */
350
449
  usage_source: RequestResourceUsageSource;
450
+ reasoning: ReasoningDiagnostics | null;
351
451
  }
352
452
  export interface CursorPageRequestResource {
353
453
  /** The items in this page */
@@ -488,12 +588,7 @@ export interface CreateServiceRequestBody {
488
588
  checkout?: CheckoutOptions;
489
589
  }
490
590
  /**
491
- * A draft is not yet issued. The draft invoice of an order shows base prices until it is paid, when
492
- * the discount is applied and it is issued; other drafts are private to administrators.
493
- * An issued invoice is open until settled; a zero-total issued invoice is immediately paid.
494
- * Unbilled usage remains separate from invoices until it is invoiced.
495
- * A refund does not change the status: a paid invoice stays paid, with the refunded part in
496
- * amount_refunded. void means collection has stopped and any funds received have been returned.
591
+ * `draft`: not yet issued; an order's draft invoice shows base prices until it is paid, when the discount is applied and it is issued. Other drafts are visible only to operators. `open`: issued and not yet settled; a zero-total invoice is paid at once. `paid` stays paid after a refund, with the refunded part in amount_refunded. `void`: collection has stopped and any funds received have been returned. Usage not yet invoiced is not on any invoice.
497
592
  */
498
593
  export type InvoiceStatus = (typeof InvoiceStatus)[keyof typeof InvoiceStatus];
499
594
  export declare const InvoiceStatus: {
@@ -501,13 +596,9 @@ export declare const InvoiceStatus: {
501
596
  readonly open: "open";
502
597
  readonly paid: "paid";
503
598
  readonly void: "void";
504
- readonly uncollectible: "uncollectible";
505
599
  };
506
600
  /**
507
- * Purchase-related invoice amounts, without account contact details or payment methods. Every order
508
- * has an invoice from placement. A draft shows base prices until it is paid, when the discount is
509
- * applied and it is issued; a zero-total invoice is issued and paid at placement whatever the
510
- * checkout mode. Neither establishes acceptance or delivery.
601
+ * An order's invoice amounts, without contact details or payment methods. A draft shows base prices until it is paid, when the discount is applied and it is issued; a zero-total invoice is issued and paid at placement.
511
602
  */
512
603
  export interface InvoiceSummary {
513
604
  id: string;
@@ -525,9 +616,9 @@ export interface InvoiceSummary {
525
616
  tax_amount: string;
526
617
  total: string;
527
618
  amount_paid: string;
528
- /** Issued, non-void credit notes that reduced unpaid receivables. Does not rewrite the original invoice total. */
619
+ /** Issued credit notes that reduced unpaid receivables; the original invoice total is unchanged. */
529
620
  pre_payment_credit_notes_amount: Money;
530
- /** Issued credit notes against payments already received. This is a return obligation, not evidence of completed refunds. */
621
+ /** Issued credit notes against payments already received; their refunds may not have completed. */
531
622
  post_payment_credit_notes_amount: Money;
532
623
  /**
533
624
  * What is still collectible after unpaid credit notes and successful payments; never below zero.
@@ -563,16 +654,16 @@ export interface CreateServiceResponseBody {
563
654
  /**
564
655
  * Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.
565
656
  * Credit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.
566
- * A prepaid purchase may instead use an online payment method.
657
+ * A licensed purchase may instead be paid with an online payment method.
567
658
  */
568
659
  export interface Funds {
569
660
  /** Spendable balance after pending returns. */
570
661
  available_balance_amount: Money;
571
- /** Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once. */
662
+ /** Currently effective credits eligible for the quoted purchases or metered usage. Each grant is counted once. */
572
663
  usable_credit_amount: Money;
573
- /** Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted. */
664
+ /** Currently effective credits that cannot fund any quoted purchase or metered target. Unused eligible credits are not restricted. */
574
665
  restricted_credit_amount: Money;
575
- /** Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement. */
666
+ /** Minimum spendable balance needed after eligible credits, covering immediate charges and every new metered purchase's admission requirement. */
576
667
  required_balance_amount: Money;
577
668
  /** Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved. */
578
669
  balance_shortfall_amount: Money;
@@ -659,6 +750,38 @@ export interface Quote {
659
750
  */
660
751
  refundable_amount: Money | null;
661
752
  }
753
+ export type ResponseCreateReasoning = {
754
+ [key: string]: unknown;
755
+ };
756
+ export type ResponseCreateToolsItem = {
757
+ [key: string]: unknown;
758
+ };
759
+ /**
760
+ * Native Responses request. model may be omitted when continuing a project-owned stored response. store defaults to false. Only caller-executed function and custom tools are supported. background, conversation and WebSocket-only fields are rejected over HTTP.
761
+ */
762
+ export interface ResponseCreate {
763
+ model?: string;
764
+ input?: unknown;
765
+ /** @nullable */
766
+ instructions?: string | null;
767
+ store?: boolean;
768
+ stream?: boolean;
769
+ /** @nullable */
770
+ previous_response_id?: string | null;
771
+ reasoning?: ResponseCreateReasoning;
772
+ tools?: ResponseCreateToolsItem[];
773
+ /** @minimum 1 */
774
+ max_output_tokens?: number;
775
+ [key: string]: unknown;
776
+ }
777
+ export interface ResponseResource {
778
+ [key: string]: unknown;
779
+ }
780
+ export interface ResponseDeleted {
781
+ id: string;
782
+ object: string;
783
+ deleted: boolean;
784
+ }
662
785
  /**
663
786
  * Pagination metadata for stable numbered pages. total_count is returned only when the operation can determine it without an unbounded scan.
664
787
  */
@@ -696,7 +819,7 @@ export declare const WithdrawalItemStatus: {
696
819
  readonly reversed: "reversed";
697
820
  };
698
821
  /**
699
- * The original top-up and its refund destination. Card details are included when the original payment method was saved; missing card details do not change the original refund route.
822
+ * The original top-up and where its refund goes. Card details are included when the original payment method was saved.
700
823
  */
701
824
  export interface WithdrawalSource {
702
825
  /** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
@@ -714,7 +837,7 @@ export interface WithdrawalSource {
714
837
  card_last4?: string;
715
838
  }
716
839
  /**
717
- * The fixed principal deduction, withdrawal fee and exact refund obligation for one original top-up. Each item has its own refund; payment_gateway and method_type identify the original route.
840
+ * For one original top-up: the principal deducted, the withdrawal fee and the amount refunded, through its own refund. payment_gateway and method_type identify the original route.
718
841
  */
719
842
  export interface WithdrawalItem {
720
843
  source_transaction_id: string;
@@ -739,7 +862,7 @@ export interface WithdrawalItem {
739
862
  payment_gateway: string;
740
863
  method_type: string;
741
864
  source: WithdrawalSource;
742
- /** The original gateway failure code when a refund failed, or refund_reversed when a completed refund was reversed. Absent while pending or successful. */
865
+ /** The gateway's failure code when a refund failed, or `refund_reversed` when a completed refund was reversed. Absent while pending or successful. */
743
866
  failure_code?: string;
744
867
  }
745
868
  export type WithdrawalStatus = (typeof WithdrawalStatus)[keyof typeof WithdrawalStatus];
@@ -752,7 +875,7 @@ export declare const WithdrawalStatus: {
752
875
  readonly reversed: "reversed";
753
876
  };
754
877
  /**
755
- * An account withdrawal to the original payment methods of its unused top-ups. Accepted amounts are fixed. deducted_amount, settled_amount and charged_fee_amount report completed source items. Failed items release their principal and fee reservations; successful items are retained when another source fails.
878
+ * A withdrawal of account balance to the original payment methods of its unused top-ups. Accepted amounts are fixed. deducted_amount, settled_amount and charged_fee_amount cover completed items. A failed item releases its principal and fee; successful items stand when another item fails.
756
879
  */
757
880
  export interface Withdrawal {
758
881
  id: string;
@@ -777,7 +900,7 @@ export interface Withdrawal {
777
900
  status: WithdrawalStatus;
778
901
  created_at: string;
779
902
  completed_at?: string;
780
- /** Identity that submitted this withdrawal. It can differ from the billing account owner. */
903
+ /** Who submitted the withdrawal; may differ from the account owner. */
781
904
  created_by?: string;
782
905
  }
783
906
  export interface WithdrawalPreviewItem {
@@ -835,7 +958,7 @@ export interface WithdrawalItemList {
835
958
  pagination: OffsetPagination;
836
959
  }
837
960
  /**
838
- * Whether a fulfilled purchase may end immediately or only after its paid term. Does not grant a refund. When absent, the terms are not configured and termination requires review.
961
+ * Whether a delivered purchase may end immediately or only at the end of its paid term; refunds follow the refund policy. When absent, no termination terms were agreed.
839
962
  */
840
963
  export type TerminationPolicy = (typeof TerminationPolicy)[keyof typeof TerminationPolicy];
841
964
  export declare const TerminationPolicy: {
@@ -843,16 +966,7 @@ export declare const TerminationPolicy: {
843
966
  readonly period_end: "period_end";
844
967
  };
845
968
  /**
846
- * none refunds nothing. prorated refunds the amount paid for the current period minus the value of
847
- * the time used, never below zero and never more than what remains unrefunded. The time used runs
848
- * from the period start to the effective cancellation time and is valued at the plan's
849
- * shorter-period prices in the same currency, frozen at purchase as the order item's
850
- * refund_monthly_amount and refund_hourly_amount: each full calendar month at the one-month prepaid
851
- * price, the remainder at the postpaid hourly price or, without one, at the one-month price by the
852
- * second. When the plan has no prepaid period shorter than the one bought, the time used is valued
853
- * at the price paid, pro rata by the second. Discounts are not refunded, as they were never paid,
854
- * and setup fees are excluded. The refunded part returns to the payment sources it came from. Tax
855
- * paid is refunded in the same proportion as the amount it was paid on.
969
+ * `none` refunds nothing. `prorated` refunds the amount paid for the current period minus the value of the time used, never below zero or above what remains unrefunded. Time used runs from the period start to the effective cancellation and is valued at prices frozen on the order item: each full calendar month at `refund_monthly_amount`, the rest at `refund_hourly_amount` or, without it, at the monthly price by the second. When the plan has no licensed period shorter than the one bought, time used is valued pro rata at the price paid. Discounts and setup fees are not refunded. Refunds return to the original payment sources, with tax refunded in proportion.
856
970
  */
857
971
  export type RefundPolicy = (typeof RefundPolicy)[keyof typeof RefundPolicy];
858
972
  export declare const RefundPolicy: {
@@ -874,7 +988,7 @@ export declare const QuoteRenewalInterval: {
874
988
  readonly year: "year";
875
989
  };
876
990
  /**
877
- * Price renewing a prepaid subscription. Give `price_id`, or `interval` with
991
+ * Price renewing a licensed subscription. Give `price_id`, or `interval` with
878
992
  * `interval_count`, to renew for another term at the price currently sold for it. Naming
879
993
  * the current term, or giving neither, renews at the agreed amount. A term sold at several
880
994
  * prices that differ in termination policy is refused with 409
@@ -902,9 +1016,7 @@ export declare const QuoteRenewalResultInterval: {
902
1016
  readonly year: "year";
903
1017
  };
904
1018
  /**
905
- * What renewing would charge. Renewing the same subscription for the same term and number
906
- * of periods charges exactly `total`, unless prices or the discounts the account holds
907
- * change in between.
1019
+ * What renewing would charge. Renewing the same subscription for the same term and periods charges exactly `total` unless prices or the account's discounts change first.
908
1020
  */
909
1021
  export interface QuoteRenewalResult {
910
1022
  /** Which renewal of the request this answers. */
@@ -915,11 +1027,7 @@ export interface QuoteRenewalResult {
915
1027
  interval: QuoteRenewalResultInterval;
916
1028
  interval_count: number;
917
1029
  periods: number;
918
- /**
919
- * The price of the periods before the discounts the account holds. A discount the
920
- * subscription already carries is reflected here. Contains tax only where the price
921
- * itself includes it.
922
- */
1030
+ /** The price of the periods before the account's discounts, with any discount the subscription carries already reflected; includes tax only where the price does. */
923
1031
  amount: Money;
924
1032
  /** The reduction from a discount the account holds. */
925
1033
  discount_amount: Money;
@@ -934,25 +1042,25 @@ export interface QuoteRenewalResult {
934
1042
  total: Money;
935
1043
  }
936
1044
  /**
937
- * One fully calculated purchase, estimated postpaid usage or recorded order item. Amounts use the
1045
+ * One fully calculated purchase, estimated metered usage or recorded order item. Amounts use the
938
1046
  * billing-account currency. An item with no immediate charge has zero checkout amounts.
939
1047
  */
940
1048
  export interface QuoteItem {
941
1049
  tax_amount: Money;
942
1050
  tax_included_amount: Money;
943
1051
  /**
944
- * Zero-based request line index, or the recorded order item's position for an order quote.
1052
+ * The zero-based request line index, or the recorded order item's position for an order quote.
945
1053
  * @minimum 0
946
1054
  */
947
1055
  index: number;
948
1056
  /** Present for an existing order quote; identifies the recorded item being priced. */
949
1057
  order_item_id?: string;
950
- /** The selected price, including when the request identified it indirectly. */
1058
+ /** The selected price, also when the request identified it indirectly. */
951
1059
  price_id: string;
952
1060
  plan_name: string;
953
1061
  /** Unit price before discounts. Null when no single unit price applies, such as tiered or multiple-rate pricing. */
954
1062
  unit_amount: Money | null;
955
- /** The quantity priced. When duration_seconds is supplied for metered usage, this is quantity multiplied by that duration. */
1063
+ /** The quantity priced; with duration_seconds, quantity times the duration. */
956
1064
  quantity: string;
957
1065
  /** Amount before discounts and including any setup charge. For requested future usage this is an estimate, not a collectible checkout amount. */
958
1066
  amount: Money;
@@ -966,8 +1074,7 @@ export declare const QuotedDiscountType: {
966
1074
  readonly account_discount: "account_discount";
967
1075
  };
968
1076
  /**
969
- * The discount selected for this calculation. Its presence in a quote does not apply it or
970
- * reserve a redemption. Discount amounts are reported on the quote and its lines.
1077
+ * The discount selected for this calculation, not applied and not reserved. Amounts are on the quote and its lines.
971
1078
  */
972
1079
  export interface QuotedDiscount {
973
1080
  type: QuotedDiscountType;
@@ -995,30 +1102,35 @@ export interface NamedIdentity {
995
1102
  /** @maxLength 255 */
996
1103
  name: string;
997
1104
  }
998
- export type CancellationRefundPreviewItemChargeType = (typeof CancellationRefundPreviewItemChargeType)[keyof typeof CancellationRefundPreviewItemChargeType];
999
- export declare const CancellationRefundPreviewItemChargeType: {
1000
- readonly postpaid: "postpaid";
1001
- readonly prepaid: "prepaid";
1105
+ /**
1106
+ * `one_time` charges once when bought. `recurring` charges again for every period, or for usage as it is settled.
1107
+ */
1108
+ export type PriceType = (typeof PriceType)[keyof typeof PriceType];
1109
+ export declare const PriceType: {
1002
1110
  readonly one_time: "one_time";
1111
+ readonly recurring: "recurring";
1112
+ };
1113
+ /**
1114
+ * `licensed` charges for the quantity bought, each period paid before it starts. `metered` charges for the usage
1115
+ * reported, after it is settled; a metered subscription lasts until it is canceled. A one-time price is licensed.
1116
+ */
1117
+ export type UsageType = (typeof UsageType)[keyof typeof UsageType];
1118
+ export declare const UsageType: {
1119
+ readonly licensed: "licensed";
1120
+ readonly metered: "metered";
1003
1121
  };
1004
1122
  /**
1005
- * One subscription of the quoted cancellation. The amounts mean what they mean in the total.
1123
+ * One subscription of the quoted cancellation.
1006
1124
  */
1007
1125
  export interface CancellationRefundPreviewItem {
1008
1126
  subscription_id: string;
1009
1127
  plan_id: string;
1010
1128
  plan_name: string;
1011
- /**
1012
- * The project and its current name, for display. Absent for a purchase at account level, and when the
1013
- * project details cannot be read at the moment.
1014
- */
1129
+ /** The project and its current name. Absent for an account-level purchase or when the project cannot be read. */
1015
1130
  project?: NamedIdentity | null;
1016
- charge_type: CancellationRefundPreviewItemChargeType;
1017
- /**
1018
- * Whether automatic renewal is on now. Creating the cancellation turns it off. Withdrawing the
1019
- * cancellation does not turn it back on for a prepaid subscription; a postpaid subscription continues
1020
- * until it is canceled and turns it back on.
1021
- */
1131
+ type: PriceType;
1132
+ usage_type: UsageType;
1133
+ /** Whether automatic renewal is on now. Creating the cancellation turns it off; withdrawing it turns it back on for a metered subscription but not for a licensed one. */
1022
1134
  auto_renew: boolean;
1023
1135
  unused_amount: Money;
1024
1136
  refundable_amount: Money;
@@ -1028,19 +1140,19 @@ export interface CancellationRefundPreviewItem {
1028
1140
  forfeited_amount: Money;
1029
1141
  }
1030
1142
  /**
1031
- * What the cancellation would return, subscription by subscription and in total, as of now. Give
1032
- * `proration_date` and `refundable_amount` when creating the cancellation.
1143
+ * What the cancellation would return, per subscription and in total, as of now. Give `proration_date` and
1144
+ * `refundable_amount` when creating the cancellation.
1033
1145
  *
1034
- * - `unused_amount`: before tax, the amount paid for the current periods minus the value of the
1035
- * time used, valued as refund policy `prorated` describes, whatever the refund terms say.
1036
- * - `refundable_amount`: what is returned the way it was paid, including the tax paid on it;
1037
- * `refund_amount` plus `credit_amount`.
1038
- * - `refund_amount`: the part returned to the balance or to the payment method.
1146
+ * - `unused_amount`: before tax, the amount paid for the current periods minus the value of the time used,
1147
+ * valued as refund policy `prorated` describes, whatever the refund terms say.
1148
+ * - `refundable_amount`: what is returned the way it was paid, tax included; `refund_amount` plus
1149
+ * `credit_amount`.
1150
+ * - `refund_amount`: the part returned to the balance or the payment method.
1039
1151
  * - `credit_amount`: the part restored to the credit grants that paid.
1040
1152
  * - `tax_amount`: the tax included in `refundable_amount`.
1041
1153
  * - `forfeited_amount`: before tax, the part of `unused_amount` the refund terms do not return.
1042
1154
  *
1043
- * Postpaid and one-time subscriptions show zero; usage until release is charged as usual.
1155
+ * Metered and one-time subscriptions show zero; their usage until release is charged as usual.
1044
1156
  */
1045
1157
  export interface CancellationRefundPreview {
1046
1158
  mode: TerminationPolicy;
@@ -1058,11 +1170,7 @@ export interface CancellationRefundPreview {
1058
1170
  items: CancellationRefundPreviewItem[];
1059
1171
  }
1060
1172
  /**
1061
- * An estimated refund to original payment sources. Before acceptance, cancellation returns the
1062
- * collected amount. For delivered service, only value funded by this order is included; renewals
1063
- * are evaluated under their own orders and the agreed termination terms apply. An unknown
1064
- * delivery outcome is not evidence that a refund is eligible. This calculation does not create
1065
- * a refund; the amount returned is determined when cancellation or termination is confirmed.
1173
+ * An estimated refund to the original payment sources. Before acceptance, cancellation returns the collected amount. For delivered service, only value paid by this order is included; renewals are evaluated with their own orders under the agreed termination terms. Nothing is refunded by the quote; the amount is fixed when cancellation or termination is confirmed.
1066
1174
  */
1067
1175
  export interface OrderRefundQuote {
1068
1176
  order_id: string;
@@ -1072,21 +1180,15 @@ export interface OrderRefundQuote {
1072
1180
  currency: string;
1073
1181
  }
1074
1182
  /**
1075
- * A complete calculation in one billing-account currency, without saving a quote or reserving funds or
1076
- * redemptions. The request fails if any item cannot be priced. Requested future usage estimates are
1077
- * included in totals for reporting and are not collectible at checkout. Only an existing-order quote
1078
- * provides that order's checkout amount.
1183
+ * A complete calculation in the billing account's currency; nothing is saved or reserved. The request fails if any item cannot be priced. Usage estimates are included in totals but are not collected at checkout; only an existing-order quote gives that order's checkout amount.
1079
1184
  */
1080
1185
  export interface Quote5f60d00 {
1081
- /** Account funding for an existing-order checkout quote. Absent for usage estimates, refunds and cancellation previews. */
1186
+ /** Account funds for an existing-order checkout quote. Absent for usage estimates, refunds and cancellations. */
1082
1187
  funds?: Funds;
1083
1188
  subtotal: Money;
1084
1189
  discount_amount: Money;
1085
1190
  tax_amount: Money;
1086
- /**
1087
- * The discount evaluated for a purchase or order, without applying it. Null when none is selected or
1088
- * when quoting renewals or a cancellation. A confirmed order reports its recorded discount.
1089
- */
1191
+ /** The discount a purchase or order would get, not yet applied. Null when there is none, and for renewals and cancellations. A confirmed order reports its recorded discount. */
1090
1192
  discount: QuotedDiscount | null;
1091
1193
  items: QuoteItem[];
1092
1194
  renewals: QuoteRenewalResult[];
@@ -1094,21 +1196,16 @@ export interface Quote5f60d00 {
1094
1196
  cancellation?: CancellationRefundPreview;
1095
1197
  total: Money;
1096
1198
  currency: string;
1097
- /** Present only when an order refund was requested. Nothing is collectible for this target. */
1199
+ /** Present when an order refund was requested. */
1098
1200
  refund?: OrderRefundQuote;
1099
1201
  }
1100
1202
  export type QuoteA200529 = Quote5f60d00;
1101
1203
  /**
1102
- * A cancellation to quote: what ending these subscriptions together would return. One mode per
1103
- * request; to compare, quote `immediate` and `period_end` separately.
1104
- *
1105
- * Refused with 409 `BILLING_SUBSCRIPTION_OPERATION_PENDING` when a subscription is already being
1106
- * canceled (`meta.cancellation_id`), is being reclaimed (`meta.reason` `reclaim_requested`) or has a
1107
- * paid change still waiting to switch (`meta.order_id`).
1204
+ * A cancellation to quote: what ending these subscriptions together would return, for one mode; quote `immediate` and `period_end` separately to compare. Refused with 409 `BILLING_SUBSCRIPTION_OPERATION_PENDING` when a subscription is already being canceled (`meta.cancellation_id`), is being reclaimed (`meta.reason` `reclaim_requested`) or has a paid change waiting to switch (`meta.order_id`).
1108
1205
  */
1109
1206
  export interface QuoteCancellation {
1110
1207
  /**
1111
- * The subscriptions to end together, all of one service. Every subscription released with a resource must be included.
1208
+ * The subscriptions to end together, all of one service, including every subscription released with a resource.
1112
1209
  * @minItems 1
1113
1210
  * @maxItems 50
1114
1211
  */
@@ -1123,15 +1220,12 @@ export interface CancellationCreate {
1123
1220
  */
1124
1221
  subscription_ids: string[];
1125
1222
  mode: TerminationPolicy;
1126
- /**
1127
- * For `immediate`, the `proration_date` of the quote: a whole second, not in the future and
1128
- * at most ten minutes old. The refund is computed as of it. Now when omitted.
1129
- */
1223
+ /** For `immediate`, the quote's `proration_date`: a whole second, not in the future and at most ten minutes old; the refund is computed as of it. Now when omitted. */
1130
1224
  proration_date?: string;
1131
- /** The `refundable_amount` of the quote. The cancellation is refused when the refund differs. */
1225
+ /** The quote's `refundable_amount`; the cancellation is refused when the refund differs. */
1132
1226
  expected_refundable_amount: Money & string;
1133
1227
  /**
1134
- * A note from the account holder. It is kept with the cancellation and not shown elsewhere.
1228
+ * A note from the account holder, kept with the cancellation.
1135
1229
  * @maxLength 1024
1136
1230
  */
1137
1231
  reason?: string;
@@ -1146,7 +1240,7 @@ export declare const CancellationStatus: {
1146
1240
  readonly failed: "failed";
1147
1241
  };
1148
1242
  /**
1149
- * Who asked for it. `project_deletion` means the project was deleted.
1243
+ * Who requested it; `project_deletion` means the project was deleted.
1150
1244
  */
1151
1245
  export type CancellationOrigin = (typeof CancellationOrigin)[keyof typeof CancellationOrigin];
1152
1246
  export declare const CancellationOrigin: {
@@ -1154,17 +1248,6 @@ export declare const CancellationOrigin: {
1154
1248
  readonly operator: "operator";
1155
1249
  readonly project_deletion: "project_deletion";
1156
1250
  };
1157
- /**
1158
- * How the subscription is charged. Creating the cancellation turned automatic renewal off;
1159
- * withdrawing it turns renewal back on for a `postpaid` subscription and leaves it off for a
1160
- * `prepaid` one.
1161
- */
1162
- export type CancellationItemChargeType = (typeof CancellationItemChargeType)[keyof typeof CancellationItemChargeType];
1163
- export declare const CancellationItemChargeType: {
1164
- readonly postpaid: "postpaid";
1165
- readonly prepaid: "prepaid";
1166
- readonly one_time: "one_time";
1167
- };
1168
1251
  export type CancellationItemStatus = (typeof CancellationItemStatus)[keyof typeof CancellationItemStatus];
1169
1252
  export declare const CancellationItemStatus: {
1170
1253
  readonly requested: "requested";
@@ -1178,19 +1261,19 @@ export declare const CancellationItemStatus: {
1178
1261
  * One subscription of the cancellation.
1179
1262
  */
1180
1263
  export interface CancellationItem {
1181
- /** The cancellation item of this subscription, the same as `Subscription.cancellation.id`. */
1264
+ /** The subscription's cancellation item, the same as `Subscription.cancellation.id`. */
1182
1265
  id: string;
1183
1266
  subscription_id: string;
1184
1267
  plan_id: string;
1185
1268
  plan_name: string;
1269
+ type: PriceType;
1186
1270
  /**
1187
- * How the subscription is charged. Creating the cancellation turned automatic renewal off;
1188
- * withdrawing it turns renewal back on for a `postpaid` subscription and leaves it off for a
1189
- * `prepaid` one.
1271
+ * Creating the cancellation turned automatic renewal off; withdrawing it turns renewal back on
1272
+ * for a `metered` subscription and leaves it off for a `licensed` one.
1190
1273
  */
1191
- charge_type: CancellationItemChargeType;
1274
+ usage_type: UsageType;
1192
1275
  status: CancellationItemStatus;
1193
- /** Execution stopped or its result is unknown. Present while release still requires resolution; it does not establish refund eligibility. */
1276
+ /** The release stopped or its result is unknown; present while the release needs resolution. */
1194
1277
  failure_code?: string;
1195
1278
  release_started_at?: string;
1196
1279
  /** When the service ended, as confirmed by the service that provides it. */
@@ -1220,20 +1303,14 @@ export interface Cancellation {
1220
1303
  scheduled_at?: string;
1221
1304
  /** For `immediate`, the second the refund is computed as of. */
1222
1305
  proration_date?: string;
1223
- /** Who asked for it. `project_deletion` means the project was deleted. */
1306
+ /** Who requested it; `project_deletion` means the project was deleted. */
1224
1307
  origin: CancellationOrigin;
1225
- /**
1226
- * The billing account that paid for these subscriptions when the cancellation was created: the
1227
- * account of an account-level purchase, or the account the project was linked to.
1228
- */
1308
+ /** The billing account paying for these subscriptions when the cancellation was created: the purchasing account of an account-level purchase, or the project's linked account. */
1229
1309
  billing_account_id: number;
1230
1310
  currency: string;
1231
- /** The refund confirmed when it was created. Absent when the platform created it. */
1311
+ /** The refund confirmed when the cancellation was created. Absent when the platform created it. */
1232
1312
  expected_refundable_amount?: Money;
1233
- /**
1234
- * Present with `failed`. A code of the service that provides the resources, such as a disk
1235
- * that can only be released with its server. Clients map it to their own wording.
1236
- */
1313
+ /** Present with `failed`: the owning service's code, such as for a disk that can only be released with its server. */
1237
1314
  failure_code?: string;
1238
1315
  requested_at: string;
1239
1316
  completed_at?: string;
@@ -1259,13 +1336,11 @@ export declare const SubscriptionCancellationMode: {
1259
1336
  readonly period_end: "period_end";
1260
1337
  };
1261
1338
  /**
1262
- * The latest cancellation that includes the subscription, with this subscription's item. `id` is the
1263
- * item; `cancellation_id` is the cancellation. scheduled_at is the intended time; effective_at is the
1264
- * confirmed end of service. A cancellation alone does not stop metering or issue a refund.
1339
+ * The latest cancellation including the subscription, with this subscription's item: `id` is the item and `cancellation_id` the cancellation. scheduled_at is the intended time and effective_at the confirmed end of service.
1265
1340
  */
1266
1341
  export interface SubscriptionCancellation {
1267
1342
  reason?: string;
1268
- /** The cancellation this request belongs to, with the other subscriptions released together. */
1343
+ /** The cancellation this item belongs to, with the other subscriptions released together. */
1269
1344
  cancellation_id?: string;
1270
1345
  id: string;
1271
1346
  subscription_id: string;
@@ -1283,7 +1358,7 @@ export interface SubscriptionCancellation {
1283
1358
  }
1284
1359
  export type ErrorA200529 = Error;
1285
1360
  /**
1286
- * Immutable platform service identifier, such as compute, canopy or assistant.
1361
+ * The platform service's fixed identifier, such as compute, canopy or assistant.
1287
1362
  * @minLength 1
1288
1363
  * @maxLength 64
1289
1364
  * @pattern ^[a-z][a-z0-9]*(-[a-z0-9]+)*$
@@ -1302,29 +1377,22 @@ export declare const BillingAccountStatus: {
1302
1377
  };
1303
1378
  export interface BillingAccount {
1304
1379
  /**
1305
- * The active contact used for invoicing. Must belong to this account; null clears the selection.
1380
+ * The active contact used for invoices, of this account; null clears it.
1306
1381
  * @nullable
1307
1382
  */
1308
1383
  invoice_contact_id?: string | null;
1309
1384
  id: number;
1310
- /** What you call this account. */
1385
+ /** Your name for the account. */
1311
1386
  name?: string;
1312
1387
  /** Fixed when the account was opened. */
1313
1388
  currency: string;
1314
1389
  status: BillingAccountStatus;
1315
- /**
1316
- * How far past the suspension threshold this account may go before its resources are
1317
- * suspended. "0" means none: the account is suspended as soon as it crosses the threshold.
1318
- */
1390
+ /** How far past the suspension threshold the account may go before its resources are suspended; `0` means none. */
1319
1391
  grace_amount?: string;
1320
- /**
1321
- * How long this account has to top up after crossing the suspension threshold.
1322
- * 0 means none. Whichever runs out first — this or grace_amount — ends the grace.
1323
- */
1392
+ /** How long the account has to top up after crossing the suspension threshold, in seconds; `0` means none. Grace ends when this or grace_amount runs out. */
1324
1393
  grace_period_seconds?: number;
1325
1394
  /**
1326
- * The actual time this account was closed, in UTC (RFC 3339).
1327
- * Null or absent if the account is not closed or its historical close time is unknown.
1395
+ * When the account was closed. Null if it is not closed or the time is unknown.
1328
1396
  * @nullable
1329
1397
  */
1330
1398
  readonly closed_at?: string | null;
@@ -1341,7 +1409,7 @@ export interface Currency {
1341
1409
  */
1342
1410
  code: string;
1343
1411
  /**
1344
- * Decimal places of the currency, the ISO 4217 minor unit.
1412
+ * Decimal places of the ISO 4217 minor unit.
1345
1413
  * @minimum 0
1346
1414
  * @maximum 4
1347
1415
  */
@@ -1368,7 +1436,7 @@ export interface BillingAccountCreate {
1368
1436
  }
1369
1437
  export interface BillingAccountUpdate {
1370
1438
  /**
1371
- * The active contact used for invoicing. Must belong to this account; null clears the selection.
1439
+ * The active contact used for invoices, of this account; null clears it.
1372
1440
  * @nullable
1373
1441
  */
1374
1442
  invoice_contact_id?: string | null;
@@ -1380,7 +1448,7 @@ export interface BillingAccountList {
1380
1448
  pagination: OffsetPagination;
1381
1449
  }
1382
1450
  /**
1383
- * A plan it refers to. active is false once the plan is archived; it still applies to subscriptions already on this plan.
1451
+ * A plan referenced by an applicability; active is false once it is archived, and the reference still applies.
1384
1452
  */
1385
1453
  export interface ApplicablePlan {
1386
1454
  id: string;
@@ -1388,24 +1456,20 @@ export interface ApplicablePlan {
1388
1456
  active: boolean;
1389
1457
  }
1390
1458
  /**
1391
- * A catalog object inlined for display.
1459
+ * A catalog object, inlined for display.
1392
1460
  */
1393
1461
  export interface ObjectIdentity {
1394
1462
  lookup_key?: string;
1395
1463
  id: string;
1396
1464
  name: string;
1397
1465
  }
1398
- export type PriceOptionBillingScheme = (typeof PriceOptionBillingScheme)[keyof typeof PriceOptionBillingScheme];
1399
- export declare const PriceOptionBillingScheme: {
1466
+ /**
1467
+ * `per_unit` multiplies a unit amount; `tiered` walks a ladder.
1468
+ */
1469
+ export type BillingScheme = (typeof BillingScheme)[keyof typeof BillingScheme];
1470
+ export declare const BillingScheme: {
1400
1471
  readonly per_unit: "per_unit";
1401
1472
  readonly tiered: "tiered";
1402
- readonly rated: "rated";
1403
- };
1404
- export type PriceOptionType = (typeof PriceOptionType)[keyof typeof PriceOptionType];
1405
- export declare const PriceOptionType: {
1406
- readonly postpaid: "postpaid";
1407
- readonly prepaid: "prepaid";
1408
- readonly one_time: "one_time";
1409
1473
  };
1410
1474
  export type PriceOptionInterval = (typeof PriceOptionInterval)[keyof typeof PriceOptionInterval];
1411
1475
  export declare const PriceOptionInterval: {
@@ -1415,16 +1479,18 @@ export declare const PriceOptionInterval: {
1415
1479
  readonly year: "year";
1416
1480
  };
1417
1481
  /**
1418
- * A price's display terms, including archived prices referenced by an applicability list.
1482
+ * A price's display terms, including archived prices referenced by an applicability.
1419
1483
  */
1420
1484
  export interface PriceOption {
1421
1485
  product: Product;
1422
1486
  plan: ObjectIdentity;
1423
- billing_scheme: PriceOptionBillingScheme;
1487
+ /** Absent when the price delegates to a rate card. */
1488
+ billing_scheme?: BillingScheme;
1424
1489
  unit_quantity: string;
1425
1490
  id: string;
1426
1491
  currency: string;
1427
- type: PriceOptionType;
1492
+ type: PriceType;
1493
+ usage_type: UsageType;
1428
1494
  interval: PriceOptionInterval;
1429
1495
  /** How many periods one purchase covers. */
1430
1496
  interval_count?: number;
@@ -1433,11 +1499,7 @@ export interface PriceOption {
1433
1499
  active: boolean;
1434
1500
  }
1435
1501
  /**
1436
- * Which purchase operation this applies to. `new` covers every new purchase, including
1437
- * zero-charge purchases. It does not mean the account's first purchase; use
1438
- * `first_purchase_only` for that restriction. `renew` covers renewals. `modify` covers
1439
- * configuration or billing-term changes, including changes that increase or decrease
1440
- * the amount due and changes with no additional charge or refund.
1502
+ * The purchase operation covered. `new`: every new purchase, including zero-charge ones; it does not mean the account's first purchase, which `first_purchase_only` restricts. `renew`: renewals. `modify`: configuration or billing-term changes, whether they charge, refund or neither.
1441
1503
  */
1442
1504
  export type PurchaseOperation = (typeof PurchaseOperation)[keyof typeof PurchaseOperation];
1443
1505
  export declare const PurchaseOperation: {
@@ -1446,20 +1508,18 @@ export declare const PurchaseOperation: {
1446
1508
  readonly modify: "modify";
1447
1509
  };
1448
1510
  /**
1449
- * Anything not excluded that matches an inclusion, or anything not excluded when no inclusion is
1450
- * given, subject to the charge type, operation and term conditions. Entries always include their
1451
- * display fields; archived plans and prices stay listed with active set to false.
1511
+ * Covers anything not excluded that matches an inclusion, or anything not excluded when no inclusion is given, subject to the price type, usage type, operation and term conditions. Archived plans and prices stay listed with active false.
1452
1512
  */
1453
1513
  export interface Applicability {
1454
1514
  products?: Product[];
1455
1515
  plans?: ApplicablePlan[];
1456
1516
  prices?: PriceOption[];
1457
- price_types?: string[];
1517
+ /** The price types covered; empty covers both. */
1518
+ price_types?: PriceType[];
1519
+ /** The usage types covered; empty covers both. */
1520
+ usage_types?: UsageType[];
1458
1521
  operations?: PurchaseOperation[];
1459
- /**
1460
- * The shortest term a purchase may have, in months. A purchase with no term, such as
1461
- * metered usage, never qualifies while this is set.
1462
- */
1522
+ /** The shortest term a purchase may have, in months. Purchases without a term, such as metered usage, do not qualify while this is set. */
1463
1523
  min_term_months?: number;
1464
1524
  /** The longest term a purchase may have, in months. */
1465
1525
  max_term_months?: number;
@@ -1468,56 +1528,42 @@ export interface Applicability {
1468
1528
  excluded_prices?: PriceOption[];
1469
1529
  }
1470
1530
  export interface CreditGroup {
1471
- /** What the credit in this group may pay for. No restrictions means anything on the account. */
1531
+ /** What the credit in this group may pay for; no restrictions means anything on the account. */
1472
1532
  applies_to: Applicability;
1473
1533
  /** Restricted to your first purchase of anything it applies to. */
1474
1534
  first_purchase_only?: boolean;
1475
1535
  amount: Money;
1476
1536
  }
1477
1537
  /**
1478
- * Account balance, credits, and unpaid charges are reported separately.
1538
+ * Balance, credits and unpaid charges, each reported separately.
1479
1539
  */
1480
1540
  export interface AccountBalance {
1481
1541
  /** Balance minus pending balance returns and the part of unbilled_amount and due that estimated_credit_applied does not cover. Negative only when the balance and applicable credit fall short of what the account owes. */
1482
1542
  available_credit: Money;
1483
- /** Credit expected to pay unbilled_amount and due. Each charge is matched to grants whose scope, validity and conditions it meets, in the order credit is applied at payment. Nothing is reserved or deducted until an invoice is paid, so credits still includes this amount. */
1543
+ /** Credit expected to pay unbilled_amount and due, matching each charge to the grants whose scope, validity and conditions it meets, in the order credit is applied at payment. Nothing is deducted until an invoice is paid, so credits still includes this amount. */
1484
1544
  estimated_credit_applied: Money;
1485
- /** Current estimate of rated usage that has not been invoiced. Final pricing and tax are fixed at issuance. */
1545
+ /** Current estimate of priced usage that has not been invoiced. Final pricing and tax are fixed at issuance. */
1486
1546
  unbilled_amount: Money;
1487
1547
  billing_account_id: number;
1488
1548
  currency: string;
1489
- /**
1490
- * Prepaid funds in the account currency, excluding credits. May be negative after a payment
1491
- * dispute. Outstanding charges are reported separately in due; this value is not a withdrawal quote.
1492
- */
1549
+ /** Topped-up funds in the account's currency, excluding credits. May be negative after a payment dispute. Amounts owed are reported in due; this is not a withdrawable amount. */
1493
1550
  balance: Money;
1494
- /**
1495
- * The recorded remaining credit, including restricted grants. It is not withdrawable
1496
- * and is not part of balance. credit_groups describes currently valid credit by permitted use; a positive
1497
- * credits balance does not imply that due is zero.
1498
- */
1551
+ /** Remaining credit, including restricted grants; not withdrawable and not part of balance. credit_groups shows currently valid credit by permitted use; positive credits do not mean due is zero. */
1499
1552
  credits: Money;
1500
- /** Currently valid credit whose use has applicable product, operation or eligibility conditions. Included in credits, separate from the balance. */
1553
+ /** Currently valid credit restricted to certain products, operations or conditions; part of credits, not of balance. */
1501
1554
  restricted_credits: Money;
1502
- /**
1503
- * Currently valid, unspent credit grouped by permitted use. Restrictions and
1504
- * validity dates determine which charges a group can cover, so these groups are not a general
1505
- * spendable balance and may differ from the recorded credits total.
1506
- */
1555
+ /** Currently valid unspent credit grouped by permitted use. Each group covers only the charges its restrictions and validity allow, and the groups may differ from the recorded credits total. */
1507
1556
  credit_groups: CreditGroup[];
1508
- /** Amount still payable on issued invoices. The invoice of an order not yet accepted is a request to pay for that order rather than a debt, so it is excluded here and from available_credit. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms. */
1557
+ /** Amount still payable on issued invoices. The invoice of an order not yet accepted is excluded, here and from available_credit. Usage not yet invoiced is reported separately. */
1509
1558
  due: Money;
1510
1559
  pending_returns_amount: Money;
1511
1560
  }
1512
1561
  /**
1513
- * A project's assignment to a billing account for the interval from effective_from to effective_to. An open-ended assignment has no end time.
1562
+ * A project's assignment to a billing account from effective_from until effective_to; an open assignment has no end.
1514
1563
  */
1515
1564
  export interface ProjectAssignment {
1516
1565
  project_id: string;
1517
- /**
1518
- * The project and its current name, for display. Absent when the project no longer exists or its
1519
- * details cannot be read at the moment; `project_id` still identifies it.
1520
- */
1566
+ /** The project and its current name. Absent when the project cannot be read; `project_id` still identifies it. */
1521
1567
  project?: NamedIdentity | null;
1522
1568
  billing_account_id: number;
1523
1569
  account_name?: string;
@@ -1534,16 +1580,7 @@ export interface SetProjectAssignmentRequest {
1534
1580
  billing_account_id: number;
1535
1581
  }
1536
1582
  /**
1537
- * `pending` until the payment gateway reaches a result. The balance increases on `succeeded`.
1538
- *
1539
- * `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
1540
- * and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
1541
- * `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
1542
- * says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
1543
- * payment.
1544
- *
1545
- * `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
1546
- * attempt, the amount is credited as a separate `succeeded` top-up.
1583
+ * `pending` until the payment gateway reaches a result; the balance increases on `succeeded`. `failed`: the gateway declined the payment, which is withdrawn at the gateway; create a new top-up to pay another way. `canceled`: withdrawn without collecting money, for the reason in `cancellation_reason`. Unknown gateway outcomes stay `pending`; a browser redirect is not proof of payment. `failed` and `canceled` are final; a payment the gateway collects afterwards is credited as a separate `succeeded` top-up.
1547
1584
  */
1548
1585
  export type TopUpStatus = (typeof TopUpStatus)[keyof typeof TopUpStatus];
1549
1586
  export declare const TopUpStatus: {
@@ -1558,8 +1595,7 @@ export interface AccountIdentity {
1558
1595
  currency: string;
1559
1596
  }
1560
1597
  /**
1561
- * Why a gateway payment was withdrawn. `abandoned` means the customer did not complete it within the time
1562
- * allowed for payment. `requested_by_customer` means the customer canceled it.
1598
+ * Why a gateway payment was withdrawn: `abandoned` when the customer did not complete it in time, `requested_by_customer` when the customer canceled it.
1563
1599
  */
1564
1600
  export type PaymentCancellationReason = (typeof PaymentCancellationReason)[keyof typeof PaymentCancellationReason];
1565
1601
  export declare const PaymentCancellationReason: {
@@ -1573,83 +1609,55 @@ export declare const PaymentActionType: {
1573
1609
  readonly sdk: "sdk";
1574
1610
  };
1575
1611
  /**
1576
- * The customer's next interaction. The gateway reports the actual payment outcome separately.
1612
+ * The customer's next step; the payment outcome is reported separately.
1577
1613
  */
1578
1614
  export interface PaymentAction {
1579
1615
  type: PaymentActionType;
1580
- /** Identifies the browser adapter for an SDK action, for example stripe. */
1616
+ /** The browser adapter for the action, for example stripe. */
1581
1617
  provider?: string;
1582
1618
  url?: string;
1583
- /** QR content to render and scan, not an image URL. */
1619
+ /** QR content to render, not an image URL. */
1584
1620
  qr_code?: string;
1585
- /** Short-lived client credential for this payment's browser confirmation. */
1621
+ /** Short-lived client credential for confirming this payment in the browser. */
1586
1622
  client_secret?: string;
1587
1623
  public_key?: string;
1588
1624
  }
1589
1625
  /**
1590
- * A top-up attempt and its outcome. A successful top-up adds a traceable amount to the balance; it is not a credit grant and has no associated invoice.
1626
+ * A top-up attempt and its outcome. A successful top-up adds to the balance; it is not a credit grant and has no invoice.
1591
1627
  */
1592
1628
  export interface TopUp {
1593
1629
  id: string;
1594
1630
  billing_account_id: number;
1595
1631
  account: AccountIdentity;
1596
- /** What is credited to the account, in the account's own currency. */
1632
+ /** What is credited to the account, in its currency. */
1597
1633
  amount: Money;
1598
1634
  currency: string;
1599
- /**
1600
- * The part of this top-up still held in the balance. Pending refunds can temporarily
1601
- * reserve part of it; it is not a promise that the whole amount is immediately withdrawable.
1602
- */
1635
+ /** The part of this top-up still in the balance. Pending refunds may hold part of it, so not all of it is necessarily withdrawable. */
1603
1636
  remaining_amount?: Money;
1604
- /**
1605
- * `pending` until the payment gateway reaches a result. The balance increases on `succeeded`.
1606
- *
1607
- * `failed` means the gateway declined the payment. A declined attempt ends the top-up at once
1608
- * and the payment is withdrawn at the gateway; to pay another way, create a new top-up.
1609
- * `canceled` means the attempt was withdrawn without collecting money; `cancellation_reason`
1610
- * says why. Unknown gateway outcomes remain `pending`, and a browser redirect is not proof of
1611
- * payment.
1612
- *
1613
- * `failed` and `canceled` are final. If the gateway nevertheless collects payment for such an
1614
- * attempt, the amount is credited as a separate `succeeded` top-up.
1615
- */
1637
+ /** `pending` until the payment gateway reaches a result; the balance increases on `succeeded`. `failed`: the gateway declined the payment, which is withdrawn at the gateway; create a new top-up to pay another way. `canceled`: withdrawn without collecting money, for the reason in `cancellation_reason`. Unknown gateway outcomes stay `pending`; a browser redirect is not proof of payment. `failed` and `canceled` are final; a payment the gateway collects afterwards is credited as a separate `succeeded` top-up. */
1616
1638
  status: TopUpStatus;
1617
1639
  cancellation_reason?: PaymentCancellationReason;
1618
1640
  /** Which payment gateway collected it. */
1619
1641
  payment_gateway?: string;
1620
1642
  /** The selected payment method, such as card, wechat_pay or alipay. */
1621
1643
  method_type?: string;
1622
- /**
1623
- * The currency the customer was actually charged in, when the checkout page collected a
1624
- * local one. Absent when it was the same as the account's.
1625
- */
1644
+ /** The currency the customer was charged in when the checkout collected a local currency; absent when it is the account's. */
1626
1645
  presentment_currency?: string;
1627
- /**
1628
- * What was charged, in `presentment_currency`. It will not equal `amount`, and it is
1629
- * the figure that appears on the customer's card or wallet statement.
1630
- */
1646
+ /** The amount charged in `presentment_currency`, as shown on the customer's statement. */
1631
1647
  presentment_amount?: Money;
1632
- /**
1633
- * Why the gateway declined it. Present with `failed`. The value is the gateway's own code,
1634
- * passed on unchanged: the card issuer's decline code when there is one (Stripe's decline_code,
1635
- * such as insufficient_funds or lost_card), otherwise the gateway's error code (Stripe's code,
1636
- * such as card_declined, expired_card or payment_intent_authentication_failure). Clients map it
1637
- * to their own wording and treat an unknown value as a generic decline.
1638
- */
1648
+ /** Why the gateway declined it; present with `failed`. The gateway's code unchanged: the issuer's decline code when there is one (Stripe decline_code, such as insufficient_funds), otherwise the gateway's error code (Stripe code, such as card_declined). Treat an unknown value as a generic decline. */
1639
1649
  failure_reason?: string;
1640
1650
  action?: PaymentAction;
1641
1651
  created_at: string;
1642
1652
  /**
1643
- * When the funds arrived. Later than `created_at` — by days for a bank transfer — so
1644
- * reconciling against a statement uses this rather than the moment it was started.
1645
- * Absent until the payment completes.
1653
+ * When the funds arrived, possibly days after `created_at`. Absent until the payment completes.
1646
1654
  * @nullable
1647
1655
  */
1648
1656
  settled_at?: string | null;
1649
1657
  }
1650
1658
  export interface TopUpCreate {
1651
1659
  /**
1652
- * The gateway explicitly selected from the available payment options.
1660
+ * The gateway selected from the available payment options.
1653
1661
  * @minLength 1
1654
1662
  * @maxLength 32
1655
1663
  */
@@ -1660,21 +1668,12 @@ export interface TopUpCreate {
1660
1668
  * @maxLength 64
1661
1669
  */
1662
1670
  method_type: string;
1663
- /** The ID of this top-up attempt. Keep it before submitting and query it after an uncertain response. */
1671
+ /** The top-up ID, chosen by the caller. Read it after an uncertain response. */
1664
1672
  id: string;
1665
1673
  billing_account_id: number;
1666
- /**
1667
- * In the account's currency, and no finer than that currency's smallest unit:
1668
- * two decimals for most, none for the yen. A finer amount is refused here rather
1669
- * than at the checkout page, where the customer would see the gateway's own wording
1670
- * instead of an explanation.
1671
- *
1672
- * There is a minimum, which differs by currency. Below it the gateway's fee
1673
- * exceeds the top-up itself, so such a payment costs more to accept than it brings.
1674
- * The minimum in force is returned with the rejection.
1675
- */
1674
+ /** In the account's currency, no finer than its smallest unit (two decimals for most currencies, none for JPY). An amount below the currency's minimum top-up is refused, and the minimum is returned with the error. */
1676
1675
  amount: Money & string;
1677
- /** Charge a saved method instead of opening a checkout page. */
1676
+ /** Charge a saved payment method instead of opening a checkout page. */
1678
1677
  payment_method_id?: string;
1679
1678
  /** Where to send the customer after checkout. */
1680
1679
  return_url?: string;
@@ -1686,14 +1685,11 @@ export interface TopUpList {
1686
1685
  export interface PaymentOptionMethod {
1687
1686
  /** The value to send as `method_type`, such as card, wechat_pay or alipay. */
1688
1687
  method_type: string;
1689
- /**
1690
- * Whether a method of this type can be saved with create-payment-method-setup and charged later
1691
- * without the customer present. Methods that are not reusable are paid anew each time.
1692
- */
1688
+ /** Whether this method type can be saved with create-payment-method-setup and charged later without the customer. */
1693
1689
  reusable: boolean;
1694
1690
  }
1695
1691
  /**
1696
- * A payment gateway that accepts payment in the account's currency, with the methods it accepts.
1692
+ * A gateway accepting the account's currency, with its payment methods.
1697
1693
  */
1698
1694
  export interface PaymentOption {
1699
1695
  /** The value to send as `payment_gateway`. */
@@ -1737,15 +1733,10 @@ export interface PaymentMethodSetup {
1737
1733
  billing_account_id: number;
1738
1734
  }
1739
1735
  /**
1740
- * What the payment gateway's browser library needs in order to collect a card. There is
1741
- * no address to redirect to: the form is rendered in the page, and the card goes straight
1742
- * from the browser to the gateway.
1736
+ * What the payment gateway's browser library needs to collect a card in the page; the card goes from the browser straight to the gateway.
1743
1737
  */
1744
1738
  export interface PaymentMethodSetupResult {
1745
- /**
1746
- * The gateway's identifier for this attempt. Use it to tell a reloaded page apart
1747
- * from a second attempt.
1748
- */
1739
+ /** The gateway's identifier for this attempt. */
1749
1740
  setup_id: string;
1750
1741
  payment_gateway: string;
1751
1742
  action: PaymentAction;
@@ -1761,7 +1752,7 @@ export interface PaymentMethodSetupResult {
1761
1752
  */
1762
1753
  export interface PayInvoiceRequest {
1763
1754
  /**
1764
- * Required to collect an online remainder. An existing attempt keeps its original gateway.
1755
+ * Required to collect an online remainder. An existing attempt keeps its gateway.
1765
1756
  * @minLength 1
1766
1757
  * @maxLength 32
1767
1758
  */
@@ -1772,51 +1763,35 @@ export interface PayInvoiceRequest {
1772
1763
  * @maxLength 64
1773
1764
  */
1774
1765
  method_type?: string;
1775
- /** Optional saved card owned by this billing account and belonging to the selected gateway. Omit to complete payment interactively. */
1766
+ /** A saved card of this billing account at the selected gateway. Omit to pay interactively. */
1776
1767
  payment_method_id?: string;
1777
- /** Whether to apply the available balance. Credit grants are controlled separately by use_credits. */
1768
+ /** Whether to apply the balance; credit grants are controlled by use_credits. */
1778
1769
  use_balance?: boolean;
1779
- /** Apply eligible, unexpired credit grants before using the balance. This never withdraws grants or converts them into balance. */
1770
+ /** Apply eligible, unexpired credit grants before the balance. Grants are never converted into balance. */
1780
1771
  use_credits?: boolean;
1781
1772
  return_url?: string;
1782
1773
  /**
1783
- * The code to apply while the order's terms are not yet fixed. Omit to apply the best applicable
1784
- * account discount, or to keep the discount already recorded.
1774
+ * The code to apply while the order's terms are not fixed. Omit to apply the best applicable account discount, or to keep the discount already recorded.
1785
1775
  * @minLength 1
1786
1776
  * @maxLength 64
1787
1777
  */
1788
1778
  promotion_code?: string;
1789
- /**
1790
- * The invoice total to expect, after discounts and tax and before credit grants or balance, as the
1791
- * payment preview or an order quote gave it. A different total fails with BILLING_AMOUNT_CHANGED
1792
- * and nothing is charged. Omit to skip the comparison; an explicit zero is compared.
1793
- */
1779
+ /** The invoice total to expect, after discounts and tax and before credit grants or balance, as the payment preview or an order quote gave it. A different total fails with `BILLING_AMOUNT_CHANGED` and nothing is charged. Omit to skip the check; zero is checked. */
1794
1780
  expected_amount?: Money & string;
1795
1781
  }
1796
1782
  /**
1797
- * Name at least one invoice or order. They must all belong to the same account and share
1798
- * its currency; anything else is refused rather than partly paid.
1783
+ * Name at least one invoice or order. All must belong to one account in its currency.
1799
1784
  */
1800
1785
  export interface PayTogetherRequest {
1801
1786
  /** @maxItems 100 */
1802
1787
  invoice_ids?: string[];
1803
1788
  /** @maxItems 100 */
1804
1789
  order_ids?: string[];
1805
- /**
1806
- * The amount due to expect across all of them, before credit grants or balance, as preview-pay-together
1807
- * gave it. A different amount fails with BILLING_AMOUNT_CHANGED and nothing is charged. Omit to skip
1808
- * the comparison.
1809
- */
1790
+ /** The amount due across all invoices, before credit grants or balance, as preview-pay-together gave it. A different amount fails with `BILLING_AMOUNT_CHANGED` and nothing is charged. Omit to skip the check. */
1810
1791
  expected_amount?: Money & string;
1811
1792
  }
1812
1793
  /**
1813
- * The current payment outcome.
1814
- *
1815
- * succeeded means payment is complete. processing means confirmation is pending; poll the invoice or
1816
- * order rather than submitting another payment. requires_action means the customer must complete the
1817
- * supplied action. failed means the attempt did not succeed and failure_reason explains the outcome; a
1818
- * declined gateway payment is withdrawn at the gateway, and paying again starts a new payment with the
1819
- * same or another method.
1794
+ * `succeeded`: paid. `processing`: confirmation is pending; poll the invoice or order instead of paying again. `requires_action`: the customer must complete the returned action. `failed`: the attempt did not succeed, for the reason in failure_reason; a declined gateway payment is withdrawn, and paying again starts a new payment.
1820
1795
  */
1821
1796
  export type PaymentStatus = (typeof PaymentStatus)[keyof typeof PaymentStatus];
1822
1797
  export declare const PaymentStatus: {
@@ -1842,7 +1817,7 @@ export interface PaymentPreviewInvoice {
1842
1817
  balance_applied: Money;
1843
1818
  }
1844
1819
  /**
1845
- * What paying would take, computed as paying computes it. Nothing is charged or reserved.
1820
+ * What paying would take, calculated as paying does. Nothing is charged or reserved.
1846
1821
  */
1847
1822
  export interface PaymentPreview {
1848
1823
  funds?: Funds;
@@ -1851,23 +1826,19 @@ export interface PaymentPreview {
1851
1826
  amount_due: Money;
1852
1827
  /** What credit grants would pay. Grants restricted to other purchases pay nothing here. */
1853
1828
  credit_applied: Money;
1854
- /** The credit grants that would pay, in the order they would be used. */
1829
+ /** The credit grants that would pay, in the order used. */
1855
1830
  credit_grants: AppliedCredit[];
1856
1831
  /** What the balance would pay. */
1857
1832
  balance_applied: Money;
1858
- /** What would remain to be paid online. Paying without a gateway is refused with `BILLING_INSUFFICIENT_FUNDS` while this is above zero. */
1833
+ /** What would remain to pay online. Paying without a gateway is refused with `BILLING_INSUFFICIENT_FUNDS` while this is above zero. */
1859
1834
  gateway_amount: Money;
1860
1835
  /** The available balance after paying. */
1861
1836
  balance_after: Money;
1862
- /** Paying together only. Each invoice, in the order it would be paid. */
1837
+ /** Paying together only: each invoice, in payment order. */
1863
1838
  invoices?: PaymentPreviewInvoice[];
1864
1839
  }
1865
1840
  /**
1866
- * Present on refunds. Where this part of the refund goes.
1867
- *
1868
- * - `balance`: back to the account balance.
1869
- * - `credit`: back to the credit grant that paid, which keeps its original expiry.
1870
- * - `gateway`: back to the payment method it was paid with.
1841
+ * Present on refunds: where this part goes. `balance`: the account balance. `credit`: the credit grant that paid, keeping its original expiry. `gateway`: the payment method it was paid with.
1871
1842
  */
1872
1843
  export type TransactionRefundDestination = (typeof TransactionRefundDestination)[keyof typeof TransactionRefundDestination];
1873
1844
  export declare const TransactionRefundDestination: {
@@ -1876,9 +1847,7 @@ export declare const TransactionRefundDestination: {
1876
1847
  readonly gateway: "gateway";
1877
1848
  };
1878
1849
  /**
1879
- * `failed` means the operation did not succeed; for a gateway payment, that the gateway declined
1880
- * it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
1881
- * an invoice the payment was meant to pay remains open for another payment.
1850
+ * `failed`: the operation did not succeed; for a gateway payment, the gateway declined it. `canceled`: a gateway payment was withdrawn without collecting money. Either way, the invoice it was for stays open.
1882
1851
  */
1883
1852
  export type TransactionStatus = (typeof TransactionStatus)[keyof typeof TransactionStatus];
1884
1853
  export declare const TransactionStatus: {
@@ -1899,7 +1868,7 @@ export declare const TransactionType: {
1899
1868
  readonly fee: "fee";
1900
1869
  };
1901
1870
  /**
1902
- * A funds operation. Each payment has one source; refunds identify the original successful transaction. Unknown gateway results remain pending. Payments from the balance or a gateway are distinct from credit-grant payments.
1871
+ * A funds movement with one source. Refunds name the original transaction. Unknown gateway results stay pending.
1903
1872
  */
1904
1873
  export interface Transaction {
1905
1874
  invoice_id?: string;
@@ -1908,47 +1877,22 @@ export interface Transaction {
1908
1877
  credit_grant_id?: string;
1909
1878
  credit_grant?: ObjectIdentity;
1910
1879
  refund_id?: string;
1911
- /**
1912
- * Present on refunds. Where this part of the refund goes.
1913
- *
1914
- * - `balance`: back to the account balance.
1915
- * - `credit`: back to the credit grant that paid, which keeps its original expiry.
1916
- * - `gateway`: back to the payment method it was paid with.
1917
- */
1880
+ /** Present on refunds: where this part goes. `balance`: the account balance. `credit`: the credit grant that paid, keeping its original expiry. `gateway`: the payment method it was paid with. */
1918
1881
  refund_destination?: TransactionRefundDestination;
1919
- /**
1920
- * `failed` means the operation did not succeed; for a gateway payment, that the gateway declined
1921
- * it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
1922
- * an invoice the payment was meant to pay remains open for another payment.
1923
- */
1882
+ /** `failed`: the operation did not succeed; for a gateway payment, the gateway declined it. `canceled`: a gateway payment was withdrawn without collecting money. Either way, the invoice it was for stays open. */
1924
1883
  status?: TransactionStatus;
1925
1884
  cancellation_reason?: PaymentCancellationReason;
1926
1885
  payment_gateway?: string;
1927
1886
  method_type?: string;
1928
- /**
1929
- * Why it failed. Present with `failed`. For a declined gateway payment the value is the
1930
- * gateway's own code, passed on unchanged: the card issuer's decline code when there is one
1931
- * (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the gateway's
1932
- * error code (Stripe's code, such as card_declined, expired_card or
1933
- * payment_intent_authentication_failure). Clients map it to their own wording and treat an
1934
- * unknown value as a generic decline.
1935
- */
1887
+ /** Why it failed; present with `failed`. For a declined gateway payment, the gateway's code unchanged: the issuer's decline code when there is one (Stripe decline_code, such as insufficient_funds), otherwise the gateway's error code (Stripe code, such as card_declined). Treat an unknown value as a generic decline. */
1936
1888
  failure_reason?: string;
1937
1889
  settled_at?: string;
1938
1890
  id: string;
1939
1891
  billing_account_id?: number;
1940
1892
  type: TransactionType;
1941
- /**
1942
- * Signed by type: positive for `topup` and `payment`, negative for `refund`.
1943
- * An `adjustment` is positive when it adds to the balance and negative when it takes from
1944
- * it. For the other types the sign does not tell the effect on the balance: a payment from
1945
- * the balance lowers it, while a payment by gateway or by credit leaves it unchanged.
1946
- */
1893
+ /** Signed by type: positive for `topup` and `payment`, negative for `refund`. An `adjustment` is positive when it adds to the balance and negative when it takes from it. For other types the sign does not show the effect on the balance: a payment from balance lowers it, a payment by gateway or credit does not. */
1947
1894
  amount: Money;
1948
- /**
1949
- * How much of this transaction is still available in the balance. Only top-ups, positive
1950
- * adjustments and gateway payments later returned to the balance can be non-zero.
1951
- */
1895
+ /** How much of this transaction is still in the balance. Only top-ups, positive adjustments and gateway payments returned to the balance can be non-zero. */
1952
1896
  remaining_amount: Money;
1953
1897
  currency: string;
1954
1898
  reason?: string;
@@ -1956,49 +1900,31 @@ export interface Transaction {
1956
1900
  }
1957
1901
  export interface PaymentResult {
1958
1902
  transactions: Transaction[];
1959
- /** The gateway transaction, when one is involved. Balance and credit-grant payments are separate transactions. */
1903
+ /** The gateway transaction, when one is involved. */
1960
1904
  transaction_id?: string;
1961
1905
  status: PaymentStatus;
1962
1906
  amount_paid: Money;
1963
- /**
1964
- * What is still outstanding. Zero once the payment succeeds. Unchanged while
1965
- * `processing`: nothing is collected until the gateway confirms it.
1966
- */
1907
+ /** What is still outstanding: zero once the payment succeeds, unchanged while `processing`. */
1967
1908
  amount_due: Money;
1968
1909
  currency: string;
1969
1910
  credit_applied?: Money;
1970
1911
  gateway_amount?: Money;
1971
1912
  payment_gateway?: string;
1972
1913
  method_type?: string;
1973
- /**
1974
- * The amount already paid from the account's balance toward this invoice. Retrying an online remainder
1975
- * does not debit it again. A canceled purchase returns funds through its refund process.
1976
- */
1914
+ /** The amount already paid from balance toward this invoice; retrying the online remainder does not debit it again. */
1977
1915
  balance_applied?: Money;
1978
1916
  action?: PaymentAction;
1979
- /**
1980
- * Whether paying again is worth attempting. False for a refusal that will keep
1981
- * happening — a closed account, an amount over a limit — so that a client does not
1982
- * retry in a loop.
1983
- */
1917
+ /** Whether paying again can succeed. False for a refusal that will repeat, such as a closed account or an amount over a limit. */
1984
1918
  retriable?: boolean;
1985
1919
  /** @nullable */
1986
1920
  invoice_id?: string | null;
1987
1921
  /** @nullable */
1988
1922
  order_id?: string | null;
1989
- /**
1990
- * Why the payment did not go through. Present with `failed`. For a declined gateway payment the
1991
- * value is the gateway's own code, passed on unchanged: the card issuer's decline code when
1992
- * there is one (Stripe's decline_code, such as insufficient_funds or lost_card), otherwise the
1993
- * gateway's error code (Stripe's code, such as card_declined, expired_card or
1994
- * payment_intent_authentication_failure). Clients map it to their own wording and treat an
1995
- * unknown value as a generic decline.
1996
- */
1923
+ /** Why the payment failed; present with `failed`. For a declined gateway payment, the gateway's code unchanged: the issuer's decline code when there is one (Stripe decline_code, such as insufficient_funds), otherwise the gateway's error code (Stripe code, such as card_declined). Treat an unknown value as a generic decline. */
1997
1924
  failure_reason?: string;
1998
1925
  }
1999
1926
  /**
2000
- * How tax applied to the customer when the invoice was issued. `reverse` means no tax was
2001
- * charged because the customer accounts for it under the reverse-charge mechanism.
1927
+ * How tax applied to the customer when the invoice was issued; `reverse` means no tax was charged under the reverse-charge mechanism.
2002
1928
  */
2003
1929
  export type InvoiceCustomerTaxExempt = (typeof InvoiceCustomerTaxExempt)[keyof typeof InvoiceCustomerTaxExempt];
2004
1930
  export declare const InvoiceCustomerTaxExempt: {
@@ -2021,7 +1947,7 @@ export interface TaxItem {
2021
1947
  currency: string;
2022
1948
  }
2023
1949
  export interface Invoice {
2024
- /** Collection has been stopped; any accepted return obligations are completed before final voiding. */
1950
+ /** Collection has stopped; accepted return obligations are completed. */
2025
1951
  void_requested_at?: string;
2026
1952
  due_at?: string;
2027
1953
  amount_refunded?: string;
@@ -2041,16 +1967,16 @@ export interface Invoice {
2041
1967
  /** Sum of the line discounts, taken off before tax. */
2042
1968
  discount_amount?: Money;
2043
1969
  tax_amount?: Money;
2044
- /** Successful credit-grant payments included in amount_paid. Does not reduce the receivable or tax base. */
1970
+ /** Successful credit-grant payments, included in amount_paid; they do not reduce the receivable or tax base. */
2045
1971
  credit_applied?: Money;
2046
- /** Subtotal less discount plus tax. Balance and credit grants are payment sources, not reductions of the receivable. */
1972
+ /** Subtotal less discount plus tax. Balance and credit grants pay it; they do not reduce it. */
2047
1973
  total: Money;
2048
1974
  amount_paid?: Money;
2049
- /** Issued, non-void credit notes that reduced unpaid receivables. Does not rewrite the original invoice total. */
1975
+ /** Issued credit notes that reduced unpaid receivables; the original invoice total is unchanged. */
2050
1976
  pre_payment_credit_notes_amount: Money;
2051
- /** Issued credit notes against payments already received. This is a return obligation, not evidence of completed refunds. */
1977
+ /** Issued credit notes against payments already received; their refunds may not have completed. */
2052
1978
  post_payment_credit_notes_amount: Money;
2053
- /** What is still collectible after unpaid credit notes and successful payments; never below zero. A draft has none; its total is the base price, and a payment preview shows what paying it would collect. A paid or void invoice has none either. */
1979
+ /** What is still collectible after unpaid credit notes and successful payments; never below zero. Zero for a draft, whose total is the base price, and for a paid or void invoice. */
2054
1980
  amount_due: Money;
2055
1981
  /** @nullable */
2056
1982
  period_start?: string | null;
@@ -2059,17 +1985,11 @@ export interface Invoice {
2059
1985
  * @nullable
2060
1986
  */
2061
1987
  period_end?: string | null;
2062
- /**
2063
- * Who this was billed to, as recorded when the invoice was issued. Later changes to
2064
- * the account do not alter it.
2065
- */
1988
+ /** The billing details recorded when the invoice was issued. */
2066
1989
  customer_name?: string;
2067
1990
  customer_email?: string;
2068
1991
  customer_tax_id?: string;
2069
- /**
2070
- * How tax applied to the customer when the invoice was issued. `reverse` means no tax was
2071
- * charged because the customer accounts for it under the reverse-charge mechanism.
2072
- */
1992
+ /** How tax applied to the customer when the invoice was issued; `reverse` means no tax was charged under the reverse-charge mechanism. */
2073
1993
  customer_tax_exempt?: InvoiceCustomerTaxExempt;
2074
1994
  customer_address_line1?: string;
2075
1995
  customer_address_line2?: string;
@@ -2092,13 +2012,19 @@ export declare const InvoiceItemType: {
2092
2012
  readonly setup: "setup";
2093
2013
  readonly adjustment: "adjustment";
2094
2014
  };
2015
+ /**
2016
+ * For a usage line, the values of its meter's presentation dimensions, such as the model and token kind. Empty for other lines.
2017
+ */
2018
+ export type InvoiceItemDimensions = {
2019
+ [key: string]: string;
2020
+ };
2095
2021
  /**
2096
2022
  * The value of one paid period moved to the new configuration of a subscription.
2097
2023
  */
2098
2024
  export interface InvoiceItemProration {
2099
2025
  /** The earlier invoice line that paid for the period. */
2100
2026
  credited_invoice_item_id: string;
2101
- /** The wording of the earlier invoice line as recorded when this invoice was created. */
2027
+ /** The earlier invoice line's wording as recorded. */
2102
2028
  description: string;
2103
2029
  period_start: string;
2104
2030
  /** Exclusive. */
@@ -2130,17 +2056,10 @@ export interface InvoiceItem {
2130
2056
  type?: InvoiceItemType;
2131
2057
  /** @nullable */
2132
2058
  project_id?: string | null;
2133
- /**
2134
- * The project the charge was for and its current name, for display. Absent when the line is
2135
- * not for a project, and when the project no longer exists or its details cannot be read at
2136
- * the moment; `project_id` still identifies it then.
2137
- */
2059
+ /** The project the charge was for and its current name. Absent when the line has no project or the project cannot be read; `project_id` still identifies it. */
2138
2060
  project?: NamedIdentity | null;
2139
2061
  resource_id?: string;
2140
- /**
2141
- * The wording as recorded when the invoice was issued. It is not re-translated
2142
- * afterwards, so that an invoice continues to read as it did when it was sent.
2143
- */
2062
+ /** The line's wording as recorded when the invoice was issued. */
2144
2063
  description: string;
2145
2064
  unit?: string;
2146
2065
  quantity?: string;
@@ -2153,6 +2072,8 @@ export interface InvoiceItem {
2153
2072
  period_start?: string | null;
2154
2073
  /** @nullable */
2155
2074
  period_end?: string | null;
2075
+ /** For a usage line, the values of its meter's presentation dimensions, such as the model and token kind. Empty for other lines. */
2076
+ dimensions?: InvoiceItemDimensions;
2156
2077
  /**
2157
2078
  * Present on a line that changes a subscription immediately, one entry for each paid period it
2158
2079
  * covers. `amount` is the sum of `remaining_amount` minus `credited_amount` over the entries.
@@ -2201,9 +2122,7 @@ export declare const CreditNoteStatus: {
2201
2122
  readonly void: "void";
2202
2123
  };
2203
2124
  /**
2204
- * Why the note was issued. Notes from canceled, expired or failed orders carry the order's reason;
2205
- * `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` is
2206
- * issued by Leaflow on request.
2125
+ * Why the note was issued. Notes for canceled, expired or failed orders carry the order's reason; `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` was issued on request.
2207
2126
  */
2208
2127
  export type CreditNoteReason = (typeof CreditNoteReason)[keyof typeof CreditNoteReason];
2209
2128
  export declare const CreditNoteReason: {
@@ -2217,7 +2136,7 @@ export declare const CreditNoteReason: {
2217
2136
  readonly operator: "operator";
2218
2137
  };
2219
2138
  /**
2220
- * An issued invoice reduction. Its credited amount is pre_payment_amount plus post_payment_amount. A paid credit records a return obligation; refund_id identifies its refund, whose outcome may still be pending. Original invoice amounts remain unchanged.
2139
+ * A reduction of an issued invoice; the original invoice amounts do not change. The credited amount is pre_payment_amount plus post_payment_amount. A paid part creates a refund, identified by refund_id, whose outcome may still be pending.
2221
2140
  */
2222
2141
  export interface CreditNote {
2223
2142
  id: string;
@@ -2232,18 +2151,14 @@ export interface CreditNote {
2232
2151
  voided_at: string | null;
2233
2152
  /** The reduction of unpaid receivables. A void note no longer reduces what is due. */
2234
2153
  pre_payment_amount: Money;
2235
- /** The credited part of payments already received. This is not proof that its refund has completed. */
2154
+ /** The credited part of payments already received; its refund may not have completed. */
2236
2155
  post_payment_amount: Money;
2237
2156
  /**
2238
- * The refund to the original payment sources, or null when no paid amount was credited.
2157
+ * The refund to the original payment sources; null when no paid amount was credited.
2239
2158
  * @nullable
2240
2159
  */
2241
2160
  refund_id: string | null;
2242
- /**
2243
- * Why the note was issued. Notes from canceled, expired or failed orders carry the order's reason;
2244
- * `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` is
2245
- * issued by Leaflow on request.
2246
- */
2161
+ /** Why the note was issued. Notes for canceled, expired or failed orders carry the order's reason; `usage_true_up` returns a tier price reduction settled after the original invoice; `operator` was issued on request. */
2247
2162
  reason: CreditNoteReason;
2248
2163
  }
2249
2164
  export interface CreditNoteItem {
@@ -2262,7 +2177,7 @@ export interface CreditNoteItemList {
2262
2177
  pagination: OffsetPagination;
2263
2178
  }
2264
2179
  /**
2265
- * Use balance_amount, credit_amount and gateway_amount, which also show a refund split between several destinations.
2180
+ * Use balance_amount, credit_amount and gateway_amount, which also show a refund split between destinations.
2266
2181
  * @deprecated
2267
2182
  */
2268
2183
  export type RefundDestination = (typeof RefundDestination)[keyof typeof RefundDestination];
@@ -2290,22 +2205,19 @@ export declare const RefundStatus: {
2290
2205
  readonly failed: "failed";
2291
2206
  };
2292
2207
  /**
2293
- * Why the refund was made. Clients map the code to their own wording. More codes may be added;
2294
- * treat an unknown code as a refund without a stated reason.
2208
+ * Why the refund was made. New codes may be added; treat an unknown code as unspecified.
2295
2209
  *
2296
2210
  * - `provisioning_failed`: the purchase could not be delivered.
2297
- * - `order_expired`: the order expired after part of it had been paid.
2298
- * - `order_canceled`: the account holder canceled the order after part of it had been paid.
2299
- * - `change_canceled`: a scheduled change was withdrawn after part of it had been paid.
2300
- * - `change_expired`: a scheduled change could not take effect before its time passed.
2301
- * - `subscription_canceled`: the subscription was canceled and its unused value returned under
2302
- * its refund terms.
2303
- * - `future_period_canceled`: a renewal that had not started yet was withdrawn.
2304
- * - `downgrade_difference`: after a downgrade, the remaining value of what was paid, valued as refund
2305
- * policy `prorated` describes, minus the new configuration's cost for the remaining time at the
2306
- * change item's `refund_monthly_amount` and `refund_hourly_amount`. Nothing is refunded when that is
2307
- * zero or less.
2308
- * - `usage_true_up`: usage priced again over the whole month cost less than was charged.
2211
+ * - `order_expired`: the order expired after part of it was paid.
2212
+ * - `order_canceled`: the order was canceled after part of it was paid.
2213
+ * - `change_canceled`: a scheduled change was withdrawn after part of it was paid.
2214
+ * - `change_expired`: a scheduled change could not take effect in time.
2215
+ * - `subscription_canceled`: the unused value of a canceled subscription, under its refund terms.
2216
+ * - `future_period_canceled`: a renewal that had not started was withdrawn.
2217
+ * - `downgrade_difference`: after a downgrade, the remaining paid value, valued as refund policy `prorated`
2218
+ * describes, minus the new configuration's cost for the remaining time at the change item's
2219
+ * `refund_monthly_amount` and `refund_hourly_amount`.
2220
+ * - `usage_true_up`: usage priced over the whole month cost less than was charged.
2309
2221
  * - `payment_not_applied`: a payment arrived after its invoice could no longer be paid.
2310
2222
  * - `operator`: made by the platform operator.
2311
2223
  */
@@ -2326,15 +2238,14 @@ export declare const RefundReason: {
2326
2238
  export interface Refund {
2327
2239
  transaction_id?: string;
2328
2240
  cancellation_item_id?: string;
2329
- /** Original funds-return split and each result. Unknown gateway results remain pending. */
2241
+ /** The refund split by original payment source, with each result. Unknown gateway results stay pending. */
2330
2242
  transactions: Transaction[];
2331
2243
  id: string;
2332
2244
  billing_account_id?: number;
2333
2245
  /** @nullable */
2334
2246
  invoice_id?: string | null;
2335
2247
  /**
2336
- * The order the refund belongs to: the order that caused it, such as a downgrade, otherwise
2337
- * the order of the refunded invoice. Null for refunds of top-ups and of usage invoices.
2248
+ * The order the refund belongs to: the order that caused it, such as a downgrade, otherwise the order of the refunded invoice. Null for refunds of top-ups and usage invoices.
2338
2249
  * @nullable
2339
2250
  */
2340
2251
  order_id?: string | null;
@@ -2350,7 +2261,7 @@ export interface Refund {
2350
2261
  settled_amount?: Money;
2351
2262
  currency: string;
2352
2263
  /**
2353
- * Use balance_amount, credit_amount and gateway_amount, which also show a refund split between several destinations.
2264
+ * Use balance_amount, credit_amount and gateway_amount, which also show a refund split between destinations.
2354
2265
  * @deprecated
2355
2266
  */
2356
2267
  destination?: RefundDestination;
@@ -2377,7 +2288,7 @@ export interface RefundList {
2377
2288
  pagination: OffsetPagination;
2378
2289
  }
2379
2290
  /**
2380
- * The attributes the rate was chosen by, such as region and machine type.
2291
+ * The dimension values the rate was matched by, such as region and machine type.
2381
2292
  */
2382
2293
  export type UsageChargeDimensions = {
2383
2294
  [key: string]: string;
@@ -2386,26 +2297,23 @@ export interface UsageCharge {
2386
2297
  subscription_id: string;
2387
2298
  id: string;
2388
2299
  project_id?: string;
2389
- /**
2390
- * The project and its current name, for display. Absent when the project no longer exists or its
2391
- * details cannot be read at the moment; `project_id` still identifies it.
2392
- */
2300
+ /** The project and its current name. Absent when the project cannot be read; `project_id` still identifies it. */
2393
2301
  project?: NamedIdentity | null;
2394
2302
  product: Product;
2395
2303
  /** Which resource this was charged for. Empty for charges not tied to one. */
2396
2304
  resource_id?: string;
2397
2305
  meter: ObjectIdentity;
2398
2306
  unit?: string;
2399
- /** The attributes the rate was chosen by, such as region and machine type. */
2307
+ /** The dimension values the rate was matched by, such as region and machine type. */
2400
2308
  dimensions?: UsageChargeDimensions;
2401
2309
  window_start: string;
2402
2310
  /** Exclusive. */
2403
2311
  window_end: string;
2404
- /** How much was used, before any included allowance. */
2312
+ /** Quantity used before allowances. */
2405
2313
  gross_quantity?: string;
2406
2314
  /** How much of that was covered by an allowance. */
2407
2315
  deducted_quantity?: string;
2408
- /** What was charged for — the gross quantity less the part covered. */
2316
+ /** The quantity charged: gross quantity less the part covered by allowances. */
2409
2317
  quantity: string;
2410
2318
  unit_amount?: Money;
2411
2319
  amount: Money;
@@ -2427,12 +2335,6 @@ export interface UsageChargeList {
2427
2335
  items: UsageCharge[];
2428
2336
  pagination: OffsetPagination;
2429
2337
  }
2430
- export type SubscriptionChargeType = (typeof SubscriptionChargeType)[keyof typeof SubscriptionChargeType];
2431
- export declare const SubscriptionChargeType: {
2432
- readonly postpaid: "postpaid";
2433
- readonly prepaid: "prepaid";
2434
- readonly one_time: "one_time";
2435
- };
2436
2338
  export type SubscriptionInterval = (typeof SubscriptionInterval)[keyof typeof SubscriptionInterval];
2437
2339
  export declare const SubscriptionInterval: {
2438
2340
  readonly none: "none";
@@ -2441,7 +2343,7 @@ export declare const SubscriptionInterval: {
2441
2343
  readonly year: "year";
2442
2344
  };
2443
2345
  /**
2444
- * An operation Leaflow prevents on a subscription. billing.subscriptions.use stops the service. renew prevents renewal and payment of a renewal order. modify prevents placing a change order. cancel prevents cancellation. terminate prevents immediate termination.
2346
+ * An operation prevented on the subscription. `billing.subscriptions.use` stops the service. `renew` prevents renewal and paying a renewal order. `modify` prevents placing a change order. `cancel` prevents cancellation. `terminate` prevents immediate termination.
2445
2347
  */
2446
2348
  export type SubscriptionRestriction = (typeof SubscriptionRestriction)[keyof typeof SubscriptionRestriction];
2447
2349
  export declare const SubscriptionRestriction: {
@@ -2452,13 +2354,7 @@ export declare const SubscriptionRestriction: {
2452
2354
  readonly billingsubscriptionsterminate: "billing.subscriptions.terminate";
2453
2355
  };
2454
2356
  /**
2455
- * Follows the items. `pending` is not yet accepted and may be unpaid or paid; its invoice shows
2456
- * whether payment is still needed, and it can expire or be canceled. `accepted` is accepted with items still
2457
- * being set up. `completed` means every item was set up. `partially_completed` means some items were set up
2458
- * and the others failed or were canceled and were refunded to their original payment sources. `failed` means
2459
- * no item was delivered and at least one failed; collected amounts for the undelivered items are refunded.
2460
- * `canceled` means every item was withdrawn without delivery; collected amounts are returned to their original
2461
- * payment sources. No status establishes service delivery by itself.
2357
+ * Follows the items. `pending`: not yet accepted, paid or unpaid; its invoice shows whether payment is needed, and it can expire or be canceled. `accepted`: items are being set up. `completed`: every item was set up. `partially_completed`: some items were set up and the others failed or were canceled and refunded to their original payment sources. `failed`: no item was delivered and at least one failed; amounts collected for undelivered items are refunded. `canceled`: every item was withdrawn without delivery; collected amounts are returned to their original payment sources. No status by itself means the service was delivered.
2462
2358
  */
2463
2359
  export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus];
2464
2360
  export declare const OrderStatus: {
@@ -2476,7 +2372,7 @@ export declare const ScheduledChangeInterval: {
2476
2372
  readonly year: "year";
2477
2373
  };
2478
2374
  /**
2479
- * The next accepted period-end change for a subscription. It describes the target terms and does not change the current subscription until effective_at.
2375
+ * The next accepted period-end change of the subscription: the target terms, applied at effective_at.
2480
2376
  */
2481
2377
  export interface ScheduledChange {
2482
2378
  order_id: string;
@@ -2487,7 +2383,7 @@ export interface ScheduledChange {
2487
2383
  plan_name: string;
2488
2384
  price_id: string;
2489
2385
  quantity: string;
2490
- /** The target prepaid renewal amount before tax. */
2386
+ /** The target licensed renewal amount before tax. */
2491
2387
  recurring_amount: string;
2492
2388
  currency: string;
2493
2389
  interval: ScheduledChangeInterval;
@@ -2495,11 +2391,7 @@ export interface ScheduledChange {
2495
2391
  interval_count: number;
2496
2392
  }
2497
2393
  /**
2498
- * pending means the purchase relationship exists but its order has not been accepted.
2499
- * provisioning means the service accepted the order and is delivering. For a service-owned
2500
- * purchase, only confirmed delivery moves it to active; paying alone does not.
2501
- * canceled means cancellation completed, or an unfulfilled purchase was canceled or failed without delivery.
2502
- * terminated means an administrator or the owning service immediately ended the commercial relationship.
2394
+ * `pending`: the order has not been accepted. `provisioning`: the owning service accepted the order and is delivering. `active`: delivery was confirmed; payment alone does not make a subscription active. `suspended`: service is stopped while a lien restricts its use. `canceled`: cancellation completed, or an undelivered purchase was canceled or failed. `terminated`: an operator or the owning service ended it immediately.
2503
2395
  */
2504
2396
  export type SubscriptionStatus = (typeof SubscriptionStatus)[keyof typeof SubscriptionStatus];
2505
2397
  export declare const SubscriptionStatus: {
@@ -2511,42 +2403,37 @@ export declare const SubscriptionStatus: {
2511
2403
  readonly terminated: "terminated";
2512
2404
  };
2513
2405
  /**
2514
- * An independently billed purchase relationship, separate from the owning service's resource.
2515
- * Placing a new prepaid or postpaid service order creates a pending subscription for each line
2516
- * in the same purchase transaction. Its ID is returned on the order item and remains stable
2517
- * through checkout and delivery. One order may create several subscriptions, such as an instance,
2518
- * its system disk and its address; it has no single subscription ID.
2519
- *
2520
- * Pending and provisioning do not grant service or accrue usage. A service-owned subscription
2521
- * becomes provisioning when the owning service accepts the order, and active when the service
2522
- * confirms delivery, with started_at set to the confirmed effective time; payment changes neither. Prepaid service periods start
2523
- * then; postpaid usage starts only when the service reports actual delivery and metering.
2406
+ * The dimension values of what was bought, such as region and instance type. Empty when the purchase gave none.
2407
+ */
2408
+ export type SubscriptionDimensions = {
2409
+ [key: string]: string;
2410
+ };
2411
+ /**
2412
+ * A purchase that is billed, renewed and changed on its own, separate from the owning service's resource. A new
2413
+ * recurring purchase creates a pending subscription for each order line; its ID is returned on the order item
2414
+ * and stays the same through checkout, delivery, renewals and changes. A one-time purchase may create none.
2524
2415
  *
2525
- * One-time delivery may omit a subscription. Renewals reference and extend existing subscriptions
2526
- * rather than creating another; a change keeps the subscription ID and switches its terms when it
2527
- * takes effect. Canceling or failing an unfulfilled purchase sets its pending or provisioning
2528
- * subscriptions to canceled without starting a service period.
2529
- * Fixed renewals use the agreed recurring_amount and interval; already paid periods retain their
2530
- * original value. Technical state belongs to the owning service.
2416
+ * Pending and provisioning subscriptions grant no service. A subscription becomes provisioning when the owning
2417
+ * service accepts the order, and active when the service confirms delivery, which sets started_at; payment
2418
+ * changes neither. Licensed service periods start at delivery, and metered usage is charged as the service
2419
+ * reports it. Canceling or failing an undelivered purchase cancels its subscriptions without starting a period.
2420
+ * Renewals use recurring_amount and the agreed interval; paid periods keep their value.
2531
2421
  *
2532
- * A purchased shared capacity limit, such as a regional snapshot count quota, can have its own
2533
- * subscription. Activating that capacity confirms delivery of the quota, not individual snapshots.
2534
- * Creating or deleting snapshots within it does not create, activate or terminate more subscriptions;
2535
- * the owning service enforces current holdings against the purchased count.
2422
+ * A shared capacity limit, such as a regional snapshot quota, has one subscription for the purchased quantity
2423
+ * rather than one per item.
2536
2424
  */
2537
2425
  export interface Subscription {
2538
2426
  /** Whether new account discounts may apply to future renewals. A fixed operator renewal agreement disables automatic discounts; catalog repricing or a newly selected purchase agreement enables them. */
2539
2427
  renewal_discounts_enabled?: boolean;
2540
2428
  currency: string;
2541
- charge_type: SubscriptionChargeType;
2429
+ type: PriceType;
2430
+ usage_type: UsageType;
2431
+ /** The dimension values of what was bought, such as region and instance type. Empty when the purchase gave none. */
2432
+ dimensions: SubscriptionDimensions;
2542
2433
  interval: SubscriptionInterval;
2543
2434
  /** @minimum 1 */
2544
2435
  interval_count?: number;
2545
- /**
2546
- * Whole-subscription prepaid renewal amount, after continuing discounts and before tax.
2547
- * Pending subscriptions show base terms until paying the order fixes any new continuing discount.
2548
- * Absent for other charge types.
2549
- */
2436
+ /** The whole licensed subscription's renewal amount, after continuing discounts and before tax. A pending subscription shows base terms until paying the order fixes any new discount. Absent for metered and one-time subscriptions. */
2550
2437
  recurring_amount?: string;
2551
2438
  termination_policy?: TerminationPolicy;
2552
2439
  refund_policy?: RefundPolicy;
@@ -2555,17 +2442,14 @@ export interface Subscription {
2555
2442
  coupon?: ObjectIdentity;
2556
2443
  /** @minimum 0 */
2557
2444
  discounted_renewals_remaining?: number;
2558
- /** The operations currently prevented on the subscription, sorted. The subscription is suspended while this contains billing.subscriptions.use. */
2445
+ /** The operations currently prevented on the subscription, sorted; it is suspended while this contains `billing.subscriptions.use`. */
2559
2446
  restrictions?: SubscriptionRestriction[];
2560
2447
  billing_cycle_anchor?: string;
2561
2448
  cancellation?: SubscriptionCancellation;
2562
- /** The accepted period-end change currently scheduled for this subscription. Null when no such change exists. */
2449
+ /** The accepted period-end change scheduled for this subscription; null when there is none. */
2563
2450
  scheduled_change?: ScheduledChange | null;
2564
2451
  /**
2565
- * The saved payment method automatic renewal charges after the account's balance and credits,
2566
- * before the account's default payment method. Set when the purchase, a renewal or a change is paid with a
2567
- * saved payment method; paying any other way leaves it unchanged. It is used only while it belongs to the
2568
- * account that pays the renewal.
2452
+ * The saved payment method automatic renewal charges after balance and credits, before the account's default payment method. Set when a purchase, renewal or change is paid with a saved payment method. Used only while it belongs to the account paying the renewal.
2569
2453
  * @nullable
2570
2454
  */
2571
2455
  default_payment_method_id?: string | null;
@@ -2576,16 +2460,11 @@ export interface Subscription {
2576
2460
  account: AccountIdentity;
2577
2461
  product_id: ProductID;
2578
2462
  /**
2579
- * Which project this is for. Absent when it was bought at account level, such as a
2580
- * membership, which belongs to no single project.
2463
+ * The project it is for. Absent for an account-level purchase, such as a membership.
2581
2464
  * @nullable
2582
2465
  */
2583
2466
  project_id?: string | null;
2584
- /**
2585
- * The project and its current name, for display. Absent for a purchase at account level,
2586
- * and when the project no longer exists or its details cannot be read at the moment;
2587
- * `project_id` still identifies it then.
2588
- */
2467
+ /** The project and its current name. Absent for an account-level purchase or when the project cannot be read; `project_id` still identifies it. */
2589
2468
  project?: NamedIdentity | null;
2590
2469
  product: Product;
2591
2470
  plan_id: string;
@@ -2593,35 +2472,26 @@ export interface Subscription {
2593
2472
  price_id: string;
2594
2473
  quantity: string;
2595
2474
  /**
2596
- * When a prepaid subscription renews or expires, the end of the last service period bought.
2597
- * Renewing several periods in advance moves it. Null until a new subscription becomes active, even when
2598
- * its purchase has been paid, and for postpaid subscriptions.
2475
+ * When a licensed subscription renews or expires: the end of the last period bought, moved by renewing in advance. Null until the subscription becomes active, even when its purchase has been paid, and for metered subscriptions.
2599
2476
  * @nullable
2600
2477
  */
2601
2478
  current_term_end?: string | null;
2602
2479
  /**
2603
- * Start of the service period in effect now. Null when none is, including for postpaid subscriptions.
2480
+ * Start of the service period in effect now. Null when none is, including for metered subscriptions.
2604
2481
  * @nullable
2605
2482
  */
2606
2483
  current_period_start?: string | null;
2607
2484
  /**
2608
- * End of the service period in effect now. Renewing in advance moves `current_term_end`, not
2609
- * this. Null when no period is in effect, including for postpaid subscriptions.
2485
+ * End of the service period in effect now; renewing in advance moves `current_term_end`, not this. Null when no period is in effect, including for metered subscriptions.
2610
2486
  * @nullable
2611
2487
  */
2612
2488
  current_period_end?: string | null;
2613
- /** A prepaid subscription renews automatically while this is on. A postpaid subscription always continues until it is canceled; this is true until a cancellation is requested and cannot be set. */
2489
+ /** Whether a licensed subscription renews automatically. A metered subscription continues until it is canceled; for it this is true until a cancellation is requested, and cannot be set. */
2614
2490
  auto_renew: boolean;
2615
- /**
2616
- * pending means the purchase relationship exists but its order has not been accepted.
2617
- * provisioning means the service accepted the order and is delivering. For a service-owned
2618
- * purchase, only confirmed delivery moves it to active; paying alone does not.
2619
- * canceled means cancellation completed, or an unfulfilled purchase was canceled or failed without delivery.
2620
- * terminated means an administrator or the owning service immediately ended the commercial relationship.
2621
- */
2491
+ /** `pending`: the order has not been accepted. `provisioning`: the owning service accepted the order and is delivering. `active`: delivery was confirmed; payment alone does not make a subscription active. `suspended`: service is stopped while a lien restricts its use. `canceled`: cancellation completed, or an undelivered purchase was canceled or failed. `terminated`: an operator or the owning service ended it immediately. */
2622
2492
  status: SubscriptionStatus;
2623
2493
  /**
2624
- * Confirmed start of service. Null until a new subscription becomes active, including after payment.
2494
+ * When service started. Null until a new subscription becomes active, also after payment.
2625
2495
  * @nullable
2626
2496
  */
2627
2497
  started_at?: string | null;
@@ -2648,10 +2518,7 @@ export interface RenewalPrice {
2648
2518
  /** What renewing for this term costs, for the quantity held. */
2649
2519
  amount?: Money;
2650
2520
  currency?: string;
2651
- /**
2652
- * The term this item already bills at. Renewing for it uses the price bought
2653
- * originally, so a later price change does not affect it.
2654
- */
2521
+ /** The term the subscription renews at now; renewing for it keeps the agreed price. */
2655
2522
  current: boolean;
2656
2523
  }
2657
2524
  export interface RenewalPriceList {
@@ -2668,14 +2535,10 @@ export declare const RenewRequestInterval: {
2668
2535
  readonly year: "year";
2669
2536
  };
2670
2537
  export interface RenewRequest {
2671
- /** Purchase ID saved before submitting. Duplicate creation conflicts; query this order after an unknown result. */
2538
+ /** The order ID, chosen by the caller. Creating it again conflicts; read the order after an unknown outcome. */
2672
2539
  order_id: string;
2673
2540
  /**
2674
- * How many further periods to buy, each at the price this item already bills at.
2675
- *
2676
- * Buying twelve monthly periods is not the same as buying one yearly term: a longer
2677
- * term is usually sold at a lower price, and that price is only reached by naming the
2678
- * interval. Use `interval_count` and `interval` for that.
2541
+ * How many further periods to buy, each at the price the subscription already renews at. To buy a longer term at its own price, give `interval` and `interval_count` instead.
2679
2542
  * @minimum 1
2680
2543
  */
2681
2544
  periods?: number;
@@ -2714,10 +2577,10 @@ export declare const RenewalOrderRequestInterval: {
2714
2577
  readonly year: "year";
2715
2578
  };
2716
2579
  /**
2717
- * The periods and price of the renewal, chosen as in renewing.
2580
+ * The renewal's periods and price, chosen as in renewing.
2718
2581
  */
2719
2582
  export interface RenewalOrderRequest {
2720
- /** Purchase ID saved before submitting. Duplicate creation conflicts; query this order after an unknown result. */
2583
+ /** The order ID, chosen by the caller. Creating it again conflicts; read the order after an unknown outcome. */
2721
2584
  order_id: string;
2722
2585
  /**
2723
2586
  * As in renewing.
@@ -2738,10 +2601,7 @@ export interface AutoRenewSet {
2738
2601
  auto_renew: boolean;
2739
2602
  }
2740
2603
  /**
2741
- * `pending` is waiting to be set up. `completed` was confirmed by the service.
2742
- * `failed` was not set up and its amount was refunded to the original payment sources.
2743
- * `canceled` was confirmed withdrawn without delivery; any collected amount is returned. A completed item is ended by canceling
2744
- * its subscription.
2604
+ * `pending`: waiting to be set up. `completed`: set up, as confirmed by the service. `failed`: not set up; its amount was refunded to the original payment sources. `canceled`: withdrawn without delivery; any collected amount is returned. A completed item ends when its subscription is canceled.
2745
2605
  */
2746
2606
  export type OrderItemStatus = (typeof OrderItemStatus)[keyof typeof OrderItemStatus];
2747
2607
  export declare const OrderItemStatus: {
@@ -2751,7 +2611,7 @@ export declare const OrderItemStatus: {
2751
2611
  readonly canceled: "canceled";
2752
2612
  };
2753
2613
  /**
2754
- * `new` buys, `renew` extends a prepaid subscription, `modify` changes a subscription's configuration or billing terms.
2614
+ * `new` buys, `renew` extends a licensed subscription, `modify` changes a subscription's configuration or billing terms.
2755
2615
  */
2756
2616
  export type OrderType = (typeof OrderType)[keyof typeof OrderType];
2757
2617
  export declare const OrderType: {
@@ -2760,12 +2620,7 @@ export declare const OrderType: {
2760
2620
  readonly modify: "modify";
2761
2621
  };
2762
2622
  /**
2763
- * When a plan change takes effect. `none` on anything that is not a change.
2764
- *
2765
- * `period_end` orders stay pending until the first period at the new price is paid. That period
2766
- * is invoiced shortly before the current paid period ends and starts when it ends; if the
2767
- * invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
2768
- * usual. Renewing in the meantime moves all of this along with it.
2623
+ * When a plan change takes effect; `none` for anything that is not a change. A `period_end` order stays pending until the first period at the new price is paid. That period is invoiced shortly before the current paid period ends and starts when it ends; if the invoice is unpaid by then, the order is canceled and the subscription renews or ends as usual. A renewal in the meantime moves the change to the end of the renewed period.
2769
2624
  */
2770
2625
  export type OrderChangeEffective = (typeof OrderChangeEffective)[keyof typeof OrderChangeEffective];
2771
2626
  export declare const OrderChangeEffective: {
@@ -2774,8 +2629,7 @@ export declare const OrderChangeEffective: {
2774
2629
  readonly period_end: "period_end";
2775
2630
  };
2776
2631
  /**
2777
- * How it was paid. Removing the payment method afterwards does not change it; `payment_method_id`
2778
- * then names a removed payment method.
2632
+ * How it was paid. `payment_method_id` still names the payment method after it is removed.
2779
2633
  */
2780
2634
  export interface PaidWith {
2781
2635
  /**
@@ -2797,22 +2651,17 @@ export declare const OrderItemInterval: {
2797
2651
  readonly month: "month";
2798
2652
  readonly year: "year";
2799
2653
  };
2800
- /**
2801
- * The payment timing of the selected price.
2802
- */
2803
- export type OrderItemChargeType = (typeof OrderItemChargeType)[keyof typeof OrderItemChargeType];
2804
- export declare const OrderItemChargeType: {
2805
- readonly postpaid: "postpaid";
2806
- readonly prepaid: "prepaid";
2807
- readonly one_time: "one_time";
2808
- };
2809
2654
  export type OrderItemConfiguration = {
2810
2655
  [key: string]: unknown;
2811
2656
  };
2812
2657
  /**
2813
- * Frozen purchase terms. Monetary fields come from related invoice-line snapshots and are zero
2814
- * for a line with no immediate charge, such as postpaid admission. Later catalog changes do not reprice this line. A new service
2815
- * purchase creates its pending subscription when this item is recorded, not when payment succeeds.
2658
+ * The dimension values the line was bought with, such as region and instance type. Empty when the purchase gave none.
2659
+ */
2660
+ export type OrderItemDimensions = {
2661
+ [key: string]: string;
2662
+ };
2663
+ /**
2664
+ * The purchase terms frozen at placement. Monetary fields come from the order's invoice lines and are zero without an immediate charge, such as for a metered purchase. Later catalog changes do not reprice the line. A new service purchase has its pending subscription from placement.
2816
2665
  */
2817
2666
  export interface OrderItem {
2818
2667
  /** Whether new account discounts may apply to future renewals. A fixed operator renewal agreement disables automatic discounts; catalog repricing or a newly selected purchase agreement enables them. */
@@ -2822,11 +2671,7 @@ export interface OrderItem {
2822
2671
  /** @minimum 0 */
2823
2672
  position?: number;
2824
2673
  configuration?: OrderItemConfiguration;
2825
- /**
2826
- * Stable Billing subscription ID. A new prepaid or postpaid service purchase returns the
2827
- * pending subscription here; renewals and changes reference the existing subscription, which
2828
- * keeps its ID. Absent for delivery without a subscription. This is not a business resource ID.
2829
- */
2674
+ /** The Billing subscription: the new pending subscription of a recurring purchase, or the existing one renewed or changed, which keeps its ID. Absent for a purchase without a subscription. */
2830
2675
  subscription_id?: string;
2831
2676
  interval: OrderItemInterval;
2832
2677
  /** @minimum 1 */
@@ -2834,22 +2679,21 @@ export interface OrderItem {
2834
2679
  termination_policy?: TerminationPolicy;
2835
2680
  refund_policy?: RefundPolicy;
2836
2681
  /**
2837
- * Prepaid items only: the plan's one-month prepaid price for this item's quantity before tax, frozen
2838
- * at purchase, used to value time used under a prorated refund or a downgrade. Null when the plan has
2839
- * no prepaid period shorter than the one bought.
2682
+ * Recurring licensed items only: the plan's one-month licensed price for this item's quantity, before tax and frozen at purchase, used to value time under a prorated refund or a downgrade. Null when the plan has no licensed period shorter than the one bought.
2840
2683
  * @nullable
2841
2684
  */
2842
2685
  refund_monthly_amount?: string | null;
2843
2686
  /**
2844
- * Prepaid items only: the plan's postpaid hourly price for this item's quantity before tax, frozen at
2845
- * purchase, used for time used short of a full month. Null when the plan has no postpaid price.
2687
+ * Recurring licensed items only, the plan's metered hourly price for this item's quantity before tax, frozen at purchase, used for time used short of a full month. Null when the licensed price has no meter.
2846
2688
  * @nullable
2847
2689
  */
2848
2690
  refund_hourly_amount?: string | null;
2849
2691
  recurring_amount?: string;
2850
2692
  setup_amount?: string;
2851
- /** The payment timing of the selected price. */
2852
- charge_type: OrderItemChargeType;
2693
+ type: PriceType;
2694
+ usage_type: UsageType;
2695
+ /** The dimension values the line was bought with, such as region and instance type. Empty when the purchase gave none. */
2696
+ dimensions: OrderItemDimensions;
2853
2697
  /** Total tax after discounts, including any tax already included in the price. */
2854
2698
  tax_amount?: string;
2855
2699
  /** The part of tax_amount already included in gross_amount; it is not charged again. */
@@ -2861,45 +2705,28 @@ export interface OrderItem {
2861
2705
  product?: Product;
2862
2706
  /** Which plan was bought. */
2863
2707
  plan_id: string;
2864
- /**
2865
- * What it was called when bought. It does not follow later catalogue renames and is
2866
- * not translated.
2867
- */
2708
+ /** The name when bought. */
2868
2709
  plan_name: string;
2869
2710
  quantity: string;
2870
- /**
2871
- * The unit amount of the price this line is charged under. Absent for a tiered price, which has no
2872
- * single unit amount, and for a change that takes effect at once, which is charged as `gross_amount`
2873
- * describes.
2874
- */
2711
+ /** The unit amount of the price the line is charged under. Absent for a tiered price, and for an immediate change, which is charged as `gross_amount` describes. */
2875
2712
  unit_amount?: Money;
2876
2713
  /**
2877
- * Before discounts: the price applied to the quantity, which for a per-unit price is `unit_amount`
2878
- * times `quantity`; a minimum charge can make it higher. For an upgrade that takes effect at once it is
2879
- * the new price for the time left in the paid period, at the subscription's own period price, minus
2880
- * the amount paid for that time, and the period end does not move; a downgrade charges nothing and may refund the
2881
- * difference instead. A change between equal period prices charges and refunds nothing. The setup fee is not part of it; see `setup_amount`.
2714
+ * Before discounts and setup fees: the price applied to the quantity, `unit_amount` times `quantity` for a per-
2715
+ * unit price, raised by any minimum charge. For an immediate upgrade it is the new price for the rest of the
2716
+ * paid period minus the amount paid for that time; a downgrade, or a change between equal period prices, charges
2717
+ * nothing.
2882
2718
  *
2883
- * Under an inclusive tax rate it includes tax, as the price does, and the included part is
2884
- * `tax_included_amount`. A renewal at the agreed terms is the exception: the agreed amount excludes
2885
- * tax, and tax is added to it.
2719
+ * Under an inclusive tax rate it includes tax, shown in `tax_included_amount`, except for a renewal at agreed
2720
+ * terms, whose amount excludes tax.
2886
2721
  */
2887
2722
  gross_amount?: Money;
2888
- /**
2889
- * The reduction on this line: from the coupon the order uses and, for a renewal at the agreed terms,
2890
- * from the discount the subscription carries.
2891
- *
2892
- * A carried discount is part of the agreed amount. It is listed here, and `gross_amount` is then
2893
- * `unit_amount` times `quantity`, except in two cases where `gross_amount` is the agreed amount and
2894
- * the carried discount is already reflected in it: the renewal order also uses a coupon the account
2895
- * holds, or the account's tax rate is inclusive.
2896
- */
2723
+ /** The reduction on this line, from the order's coupon and, for a renewal at agreed terms, from the subscription's carried discount. With a carried discount, `gross_amount` is `unit_amount` times `quantity`, except when the renewal order also uses an account coupon or the tax rate is inclusive: then `gross_amount` is the agreed amount, which already reflects the carried discount. */
2897
2724
  discount_amount?: Money;
2898
2725
  /** `gross_amount` less `discount_amount`. */
2899
2726
  amount?: Money;
2900
2727
  currency: string;
2901
2728
  /**
2902
- * The start of the service period this line paid for. Frozen at placement for renewals and period-end changes; for a prepaid line of a new purchase, fixed from the second its invoice is paid and kept when delivery is confirmed. Absent for postpaid and one-time lines.
2729
+ * The start of the service period this line paid for. Fixed at placement for renewals and period-end changes, and for a licensed line of a new purchase when its invoice is paid. Absent for metered and one-time lines.
2903
2730
  * @nullable
2904
2731
  */
2905
2732
  period_start?: string | null;
@@ -2911,17 +2738,13 @@ export interface OrderItem {
2911
2738
  status: OrderItemStatus;
2912
2739
  }
2913
2740
  /**
2914
- * A recorded purchase with its invoice from placement; a zero-total invoice, such as for postpaid
2915
- * admission, is issued and paid at placement whatever the checkout mode. Until checkout_confirmed_at is set, the
2916
- * invoice is a draft at base prices: paying it fixes the discount and amount, issues it and collects it, and the
2917
- * order cannot be accepted before then. Coupon fields describe the discount fixed at that point and are absent
2918
- * before it; a quote never populates them. Payment and acceptance remain separate from resource delivery.
2741
+ * A recorded purchase with its invoice from placement; a zero-total invoice, such as for a metered purchase, is issued and paid at placement in either checkout mode. Until checkout_confirmed_at is set, the invoice is a draft at base prices: paying it fixes the discount and amount, issues it and collects it, and the order cannot be accepted before then. Coupon fields describe the discount fixed then and are absent before. Payment and acceptance do not mean the resources were delivered.
2919
2742
  */
2920
2743
  export interface Order {
2921
2744
  coupon_id?: string;
2922
2745
  coupon?: ObjectIdentity;
2923
2746
  promotion_code_id?: string;
2924
- /** Code text frozen when the coupon was applied. Absent for an account discount. */
2747
+ /** The promotion code applied. Absent for an account discount. */
2925
2748
  promotion_code?: string;
2926
2749
  /** The order's invoice, the same as invoice.id. */
2927
2750
  invoice_id: string;
@@ -2932,53 +2755,32 @@ export interface Order {
2932
2755
  change_effective_at?: string;
2933
2756
  id: string;
2934
2757
  /**
2935
- * Which project it was bought for. Absent for a purchase made at account level, such
2936
- * as a membership.
2758
+ * The project it was bought for. Absent for an account-level purchase, such as a membership.
2937
2759
  * @nullable
2938
2760
  */
2939
2761
  project_id?: string | null;
2940
- /**
2941
- * The project and its current name, for display. Absent for a purchase at account level,
2942
- * and when the project no longer exists or its details cannot be read at the moment;
2943
- * `project_id` still identifies it then.
2944
- */
2762
+ /** The project and its current name. Absent for an account-level purchase or when the project cannot be read; `project_id` still identifies it. */
2945
2763
  project?: NamedIdentity | null;
2946
- /**
2947
- * The billing account the order was placed with. It does not change when the project is later
2948
- * linked to another billing account. While this account is suspended or closed the order cannot
2949
- * be accepted, and the invoice of a change scheduled for the end of a period is not issued and the change is called off
2950
- * when the current period ends; such requests fail with BILLING_ACCOUNT_UNAVAILABLE.
2951
- */
2764
+ /** The billing account the order was placed with, unchanged when the project is later linked to another account. While it is suspended or closed, the order cannot be accepted, and a period-end change's invoice is not issued and the change is called off when the current period ends; such requests fail with `BILLING_ACCOUNT_UNAVAILABLE`. */
2952
2765
  billing_account_id?: number;
2953
2766
  currency: string;
2954
- /** `new` buys, `renew` extends a prepaid subscription, `modify` changes a subscription's configuration or billing terms. */
2767
+ /** `new` buys, `renew` extends a licensed subscription, `modify` changes a subscription's configuration or billing terms. */
2955
2768
  type: OrderType;
2956
2769
  status: OrderStatus;
2957
- /**
2958
- * When a plan change takes effect. `none` on anything that is not a change.
2959
- *
2960
- * `period_end` orders stay pending until the first period at the new price is paid. That period
2961
- * is invoiced shortly before the current paid period ends and starts when it ends; if the
2962
- * invoice is still unpaid by then, the order is canceled and the subscription renews or ends as
2963
- * usual. Renewing in the meantime moves all of this along with it.
2964
- */
2770
+ /** When a plan change takes effect; `none` for anything that is not a change. A `period_end` order stays pending until the first period at the new price is paid. That period is invoiced shortly before the current paid period ends and starts when it ends; if the invoice is unpaid by then, the order is canceled and the subscription renews or ends as usual. A renewal in the meantime moves the change to the end of the renewed period. */
2965
2771
  change_effective?: OrderChangeEffective;
2966
2772
  /**
2967
- * Acceptance deadline. Pending orders can expire automatically.
2773
+ * Acceptance deadline; a pending order expires after it.
2968
2774
  * @nullable
2969
2775
  */
2970
2776
  expires_at?: string | null;
2971
2777
  /**
2972
- * When the discount and amount were fixed: at placement for automatic checkout and for a
2973
- * zero total, otherwise when the invoice was first paid. Null while a deferred order awaits payment.
2778
+ * When the discount and amount were fixed: at placement for automatic checkout or a zero total, otherwise when the invoice was first paid. Null while a deferred order awaits payment.
2974
2779
  * @nullable
2975
2780
  */
2976
2781
  checkout_confirmed_at?: string | null;
2977
2782
  created_at: string;
2978
- /**
2979
- * What was bought. Present on a single order and on every order in a list, so a list
2980
- * can be rendered without a further request per row.
2981
- */
2783
+ /** What was bought. */
2982
2784
  items: OrderItem[];
2983
2785
  }
2984
2786
  export interface OrderList {
@@ -2986,8 +2788,7 @@ export interface OrderList {
2986
2788
  pagination: OffsetPagination;
2987
2789
  }
2988
2790
  /**
2989
- * `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or
2990
- * `voided` once Leaflow withdrew it.
2791
+ * `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or `voided` once withdrawn.
2991
2792
  */
2992
2793
  export type DiscountStatus = (typeof DiscountStatus)[keyof typeof DiscountStatus];
2993
2794
  export declare const DiscountStatus: {
@@ -3004,9 +2805,7 @@ export declare const DiscountType: {
3004
2805
  readonly free_setup: "free_setup";
3005
2806
  };
3006
2807
  /**
3007
- * Whether the discount continues on renewals of the purchased item. `once` applies only to the
3008
- * purchase or renewal that uses the coupon, `recurring` continues for `frequency_duration` billing
3009
- * periods including the first, and `forever` continues on every renewal.
2808
+ * Whether the discount continues on renewals: `once` applies only to the purchase or renewal using the coupon, `recurring` for `frequency_duration` periods including the first, `forever` on every renewal.
3010
2809
  */
3011
2810
  export type DiscountFrequency = (typeof DiscountFrequency)[keyof typeof DiscountFrequency];
3012
2811
  export declare const DiscountFrequency: {
@@ -3015,26 +2814,18 @@ export declare const DiscountFrequency: {
3015
2814
  readonly forever: "forever";
3016
2815
  };
3017
2816
  /**
3018
- * A coupon held on this account for a period. Within the period it applies without a code to purchases and
3019
- * to metered usage that the coupon covers.
2817
+ * A coupon held by the account for a period, applying without a code to the purchases and metered usage it covers.
3020
2818
  */
3021
2819
  export interface Discount {
3022
2820
  min_amount?: string;
3023
2821
  billing_account_id?: number;
3024
2822
  coupon_id: string;
3025
2823
  promotion_code_id?: string;
3026
- /**
3027
- * `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or
3028
- * `voided` once Leaflow withdrew it.
3029
- */
2824
+ /** `scheduled` before valid_from, `active` within the validity, `expired` after valid_until, or `voided` once withdrawn. */
3030
2825
  status: DiscountStatus;
3031
2826
  voided_at?: string;
3032
2827
  type: DiscountType;
3033
- /**
3034
- * Whether the discount continues on renewals of the purchased item. `once` applies only to the
3035
- * purchase or renewal that uses the coupon, `recurring` continues for `frequency_duration` billing
3036
- * periods including the first, and `forever` continues on every renewal.
3037
- */
2828
+ /** Whether the discount continues on renewals: `once` applies only to the purchase or renewal using the coupon, `recurring` for `frequency_duration` periods including the first, `forever` on every renewal. */
3038
2829
  frequency?: DiscountFrequency;
3039
2830
  /** @minimum 1 */
3040
2831
  frequency_duration?: number;
@@ -3046,10 +2837,7 @@ export interface Discount {
3046
2837
  /** Caps a percentage discount. */
3047
2838
  max_discount?: Money;
3048
2839
  currency?: string;
3049
- /**
3050
- * What it may be used for. Absent means it applies to anything on the account,
3051
- * including setup fees and traffic.
3052
- */
2840
+ /** What it may pay for. Absent means anything on the account, including setup fees and usage. */
3053
2841
  applies_to: Applicability;
3054
2842
  /** Restricted to your first purchase of anything it applies to. */
3055
2843
  first_purchase_only?: boolean;
@@ -3069,7 +2857,7 @@ export interface OrderItemList {
3069
2857
  pagination: OffsetPagination;
3070
2858
  }
3071
2859
  /**
3072
- * Whether the quantity was paid for or granted free of charge. Both are consumed the same way.
2860
+ * Whether the quantity was paid for or granted free; both are consumed the same way.
3073
2861
  */
3074
2862
  export type AllowanceCategory = (typeof AllowanceCategory)[keyof typeof AllowanceCategory];
3075
2863
  export declare const AllowanceCategory: {
@@ -3100,7 +2888,7 @@ export interface Allowance {
3100
2888
  meter: ObjectIdentity;
3101
2889
  /** The unit it is counted in, such as `MiB`. */
3102
2890
  unit?: string;
3103
- /** Whether the quantity was paid for or granted free of charge. Both are consumed the same way. */
2891
+ /** Whether the quantity was paid for or granted free; both are consumed the same way. */
3104
2892
  category: AllowanceCategory;
3105
2893
  /**
3106
2894
  * Exact values for a subset of the meter's dimensions. Only usage with these values is deducted;
@@ -3112,16 +2900,12 @@ export interface Allowance {
3112
2900
  quantity: string;
3113
2901
  /** How much is left. */
3114
2902
  remaining_quantity: string;
3115
- /**
3116
- * Lower values are consumed first. At equal priority, earlier expiry and then earlier issuance take
3117
- * precedence.
3118
- */
2903
+ /** Lower values are consumed first; at equal priority, earlier expiry and then earlier issuance. */
3119
2904
  priority?: number;
3120
2905
  status: AllowanceStatus;
3121
2906
  valid_from: string;
3122
2907
  /**
3123
- * When it lapses. Anything unused at that point is lost; it is not refunded and does
3124
- * not carry over. Absent when it does not expire on its own.
2908
+ * When the allowance lapses; unused quantity is lost. Absent when it does not expire.
3125
2909
  * @nullable
3126
2910
  */
3127
2911
  valid_until?: string | null;
@@ -3164,8 +2948,7 @@ export interface Entitlement {
3164
2948
  name?: string;
3165
2949
  enabled: boolean;
3166
2950
  /**
3167
- * When the subscription providing it ends. Absent for a metered subscription, which
3168
- * has no end date.
2951
+ * When the providing subscription ends. Absent for a metered subscription.
3169
2952
  * @nullable
3170
2953
  */
3171
2954
  expires_at?: string | null;
@@ -3198,30 +2981,7 @@ export interface PlanList {
3198
2981
  pagination: OffsetPagination;
3199
2982
  }
3200
2983
  /**
3201
- * `postpaid` charges for what is used, `prepaid` buys a period in advance, `one_time`
3202
- * charges once.
3203
- */
3204
- export type PriceType = (typeof PriceType)[keyof typeof PriceType];
3205
- export declare const PriceType: {
3206
- readonly postpaid: "postpaid";
3207
- readonly prepaid: "prepaid";
3208
- readonly one_time: "one_time";
3209
- };
3210
- /**
3211
- * How the amount is arrived at. `rated` means the rate depends on attributes such as
3212
- * region or machine type, and is looked up on a price list.
3213
- */
3214
- export type PriceBillingScheme = (typeof PriceBillingScheme)[keyof typeof PriceBillingScheme];
3215
- export declare const PriceBillingScheme: {
3216
- readonly per_unit: "per_unit";
3217
- readonly tiered: "tiered";
3218
- readonly rated: "rated";
3219
- };
3220
- /**
3221
- * `none` for a price that is not tiered, which is most of them.
3222
- *
3223
- * Otherwise `graduated` charges each band at its own rate, and `volume` charges
3224
- * everything at the rate of the band the total falls in.
2984
+ * How a ladder is walked: `graduated` charges each band at its own rate, `volume` charges everything at the rate of the band the total falls in. `none` when not tiered.
3225
2985
  */
3226
2986
  export type PriceTiersMode = (typeof PriceTiersMode)[keyof typeof PriceTiersMode];
3227
2987
  export declare const PriceTiersMode: {
@@ -3238,7 +2998,7 @@ export declare const PriceInterval: {
3238
2998
  };
3239
2999
  export interface Tier {
3240
3000
  /**
3241
- * The upper bound of this band. Null on the last band, which has no bound.
3001
+ * The band's inclusive upper bound; null for the last band.
3242
3002
  * @nullable
3243
3003
  */
3244
3004
  up_to?: string | null;
@@ -3251,6 +3011,7 @@ export interface Price {
3251
3011
  lookup_key?: string;
3252
3012
  product: Product;
3253
3013
  plan: ObjectIdentity;
3014
+ /** For a metered price with its own amounts, the meter it charges. For a licensed price, the meter its quantity is held on. Absent otherwise. */
3254
3015
  meter_id?: string;
3255
3016
  meter?: ObjectIdentity;
3256
3017
  unit_quantity: string;
@@ -3262,39 +3023,25 @@ export interface Price {
3262
3023
  id: string;
3263
3024
  plan_id: string;
3264
3025
  currency: string;
3265
- /**
3266
- * `postpaid` charges for what is used, `prepaid` buys a period in advance, `one_time`
3267
- * charges once.
3268
- */
3269
3026
  type: PriceType;
3270
- /**
3271
- * How the amount is arrived at. `rated` means the rate depends on attributes such as
3272
- * region or machine type, and is looked up on a price list.
3273
- */
3274
- billing_scheme: PriceBillingScheme;
3027
+ usage_type: UsageType;
3028
+ /** Absent when the price delegates to a rate card, where the rate depends on attributes such as region or machine type. */
3029
+ billing_scheme?: BillingScheme;
3275
3030
  /** Present for `per_unit`. */
3276
3031
  unit_amount?: Money;
3277
- /**
3278
- * `none` for a price that is not tiered, which is most of them.
3279
- *
3280
- * Otherwise `graduated` charges each band at its own rate, and `volume` charges
3281
- * everything at the rate of the band the total falls in.
3282
- */
3032
+ /** How a ladder is walked: `graduated` charges each band at its own rate, `volume` charges everything at the rate of the band the total falls in. `none` when not tiered. */
3283
3033
  tiers_mode?: PriceTiersMode;
3284
3034
  /** Present for `tiered`, in ascending order. */
3285
3035
  tiers?: Tier[];
3286
- /** For `rated` prices, the price list the rates are read from. */
3036
+ /** Present when the price delegates to a rate card, the price list its rates are read from. */
3287
3037
  rate_card_id?: string;
3288
3038
  /** The smallest quantity that can be bought. Absent means no lower bound. */
3289
3039
  min_quantity?: string;
3290
- /**
3291
- * The largest purchasable quantity. Omitted when no maximum applies. A quantity above this limit is
3292
- * rejected with BILLING_PRICE_INVALID and field=max_quantity.
3293
- */
3040
+ /** The largest quantity that may be bought; absent when there is no limit. A larger quantity is refused with `BILLING_PRICE_INVALID` and `field` `max_quantity`. */
3294
3041
  max_quantity?: string;
3295
3042
  /** Quantities must be a multiple of this. Absent means any quantity within the bounds. */
3296
3043
  quantity_step?: string;
3297
- /** For prepaid prices, how many periods one purchase covers. */
3044
+ /** For recurring licensed prices, how many interval units one period covers. */
3298
3045
  interval_count?: number;
3299
3046
  interval: PriceInterval;
3300
3047
  setup_fee?: Money;
@@ -3304,18 +3051,20 @@ export interface PriceList {
3304
3051
  pagination: OffsetPagination;
3305
3052
  }
3306
3053
  /**
3307
- * The attributes this rate applies to, such as region and machine type.
3054
+ * The dimension values this rate applies to, such as region and machine type.
3308
3055
  */
3309
3056
  export type RateDimensions = {
3310
3057
  [key: string]: string;
3311
3058
  };
3312
3059
  /**
3313
- * `per_unit` multiplies `unit_amount`; `tiered` walks the tiers as `tiers_mode` says.
3060
+ * Licensed rates only, the period the amount buys; `none` for metered rates.
3314
3061
  */
3315
- export type RateBillingScheme = (typeof RateBillingScheme)[keyof typeof RateBillingScheme];
3316
- export declare const RateBillingScheme: {
3317
- readonly per_unit: "per_unit";
3318
- readonly tiered: "tiered";
3062
+ export type RateInterval = (typeof RateInterval)[keyof typeof RateInterval];
3063
+ export declare const RateInterval: {
3064
+ readonly none: "none";
3065
+ readonly day: "day";
3066
+ readonly month: "month";
3067
+ readonly year: "year";
3319
3068
  };
3320
3069
  /**
3321
3070
  * `graduated` charges each band at its own rate; `volume` charges everything at the rate of the band the total lands in. `none` for a `per_unit` rate.
@@ -3328,22 +3077,24 @@ export declare const RateTiersMode: {
3328
3077
  };
3329
3078
  export interface Rate {
3330
3079
  meter: ObjectIdentity;
3331
- /** The unit readings arrive in, such as `core-second`. */
3080
+ /** The unit readings are reported in, such as `core-second`. */
3332
3081
  unit?: string;
3333
- /** The attributes this rate applies to, such as region and machine type. */
3082
+ /** The dimension values this rate applies to, such as region and machine type. */
3334
3083
  dimensions: RateDimensions;
3335
- /** `per_unit` multiplies `unit_amount`; `tiered` walks the tiers as `tiers_mode` says. */
3336
- billing_scheme: RateBillingScheme;
3084
+ billing_scheme: BillingScheme;
3085
+ /** `metered` prices usage; `licensed` prices holding a quantity for one period. */
3086
+ usage_type: UsageType;
3087
+ /** Licensed rates only, the period the amount buys; `none` for metered rates. */
3088
+ interval: RateInterval;
3089
+ /** @nullable */
3090
+ interval_count?: number | null;
3337
3091
  /** `graduated` charges each band at its own rate; `volume` charges everything at the rate of the band the total lands in. `none` for a `per_unit` rate. */
3338
3092
  tiers_mode: RateTiersMode;
3339
3093
  /** Present for `per_unit`. Tiered rates carry their amounts on the tiers. */
3340
3094
  unit_amount?: Money;
3341
3095
  /** Present for a tiered rate, in ascending order. */
3342
3096
  tiers?: Tier[];
3343
- /**
3344
- * How many measured units one amount covers. An hourly rate on a per-second meter is
3345
- * `"3600"`.
3346
- */
3097
+ /** How many measured units one amount covers; an hourly rate on a per-second meter is `"3600"`. */
3347
3098
  unit_quantity?: string;
3348
3099
  currency: string;
3349
3100
  effective_from: string;
@@ -3354,15 +3105,6 @@ export interface RateList {
3354
3105
  items: Rate[];
3355
3106
  pagination: OffsetPagination;
3356
3107
  }
3357
- /**
3358
- * Narrows the selection when a plan offers more than one charge type.
3359
- */
3360
- export type QuoteItemInputPriceType = (typeof QuoteItemInputPriceType)[keyof typeof QuoteItemInputPriceType];
3361
- export declare const QuoteItemInputPriceType: {
3362
- readonly postpaid: "postpaid";
3363
- readonly prepaid: "prepaid";
3364
- readonly one_time: "one_time";
3365
- };
3366
3108
  export type QuoteItemInputInterval = (typeof QuoteItemInputInterval)[keyof typeof QuoteItemInputInterval];
3367
3109
  export declare const QuoteItemInputInterval: {
3368
3110
  readonly none: "none";
@@ -3371,23 +3113,13 @@ export declare const QuoteItemInputInterval: {
3371
3113
  readonly year: "year";
3372
3114
  };
3373
3115
  /**
3374
- * The attributes the price depends on — region, instance type, token class.
3375
- *
3376
- * Required when the price draws its rates from a price list, which is how anything
3377
- * sold by region or by machine type is priced. A price that carries a single unit
3378
- * amount, or a ladder, has no attributes to give and takes none.
3379
- *
3380
- * Every attribute the meter declares must be present. A combination with no rate
3381
- * covering it is refused rather than priced at zero.
3116
+ * The dimension values the rate depends on, such as region, instance type or token kind: those of the usage for a metered estimate, and those of what is bought for a licensed price on a rate card. Required whenever the price uses a rate card; prices with their own amounts ignore them. Every key the meter declares must be given. A combination no rate covers is refused rather than priced at zero.
3382
3117
  */
3383
3118
  export type QuoteItemInputDimensions = {
3384
3119
  [key: string]: string;
3385
3120
  };
3386
3121
  /**
3387
- * Identify a price directly, or select a price for a plan. For each resource give its ID or lookup
3388
- * key, never both. Lookup keys require product_id. Meter, dimensions or duration_seconds request a
3389
- * postpaid usage estimate. Such an estimate cannot be combined with a promotion code or treated as a
3390
- * checkout amount. Without a usage estimate, a postpaid item includes only any setup charge.
3122
+ * Identify a price, or select one for a plan; give each resource's ID or lookup key, never both, and product_id with lookup keys. For a metered price, a meter or duration_seconds requests a usage estimate, which cannot be combined with a promotion code and is not a checkout amount. Without one, a metered item includes only any setup charge.
3391
3123
  */
3392
3124
  export interface QuoteItemInput {
3393
3125
  /**
@@ -3403,12 +3135,14 @@ export interface QuoteItemInput {
3403
3135
  price_id?: string;
3404
3136
  product_id?: ProductID;
3405
3137
  plan_id?: string;
3406
- /** Narrows the selection when a plan offers more than one charge type. */
3407
- price_type?: QuoteItemInputPriceType;
3138
+ /** Narrows the selection when a plan offers more than one price type. */
3139
+ price_type?: PriceType;
3140
+ /** Narrows the selection when a plan offers more than one usage type. */
3141
+ usage_type?: UsageType;
3408
3142
  interval?: QuoteItemInputInterval;
3409
3143
  /** @minimum 1 */
3410
3144
  interval_count?: number;
3411
- /** Selects among prepaid prices with otherwise identical billing terms. Ambiguous terms are refused instead of choosing a price arbitrarily. */
3145
+ /** Selects among licensed prices with otherwise identical billing terms. Ambiguous terms are refused instead of choosing a price arbitrarily. */
3412
3146
  termination_policy?: TerminationPolicy;
3413
3147
  /** @pattern ^(?:(?:[1-9][0-9]{0,27}|0(?:[1-9][0-9]{0,26}|0(?:[1-9][0-9]{0,25}|0(?:[1-9][0-9]{0,24}|0(?:[1-9][0-9]{0,23}|0(?:[1-9][0-9]{0,22}|0(?:[1-9][0-9]{0,21}|0(?:[1-9][0-9]{0,20}|0(?:[1-9][0-9]{0,19}|0(?:[1-9][0-9]{0,18}|0(?:[1-9][0-9]{0,17}|0(?:[1-9][0-9]{0,16}|0(?:[1-9][0-9]{0,15}|0(?:[1-9][0-9]{0,14}|0(?:[1-9][0-9]{0,13}|0(?:[1-9][0-9]{0,12}|0(?:[1-9][0-9]{0,11}|0(?:[1-9][0-9]{0,10}|0(?:[1-9][0-9]{0,9}|0(?:[1-9][0-9]{0,8}|0(?:[1-9][0-9]{0,7}|0(?:[1-9][0-9]{0,6}|0(?:[1-9][0-9]{0,5}|0(?:[1-9][0-9]{0,4}|0(?:[1-9][0-9]{0,3}|0(?:[1-9][0-9]{0,2}|0(?:[1-9][0-9]{0,1}|0[1-9])))))))))))))))))))))))))))([.][0-9]{1,10})?|0{1,28}[.](?:[1-9][0-9]{0,9}|0(?:[1-9][0-9]{0,8}|0(?:[1-9][0-9]{0,7}|0(?:[1-9][0-9]{0,6}|0(?:[1-9][0-9]{0,5}|0(?:[1-9][0-9]{0,4}|0(?:[1-9][0-9]{0,3}|0(?:[1-9][0-9]{0,2}|0(?:[1-9][0-9]{0,1}|0[1-9]))))))))))$ */
3414
3148
  quantity: string;
@@ -3418,36 +3152,37 @@ export interface QuoteItemInput {
3418
3152
  * @maxLength 128
3419
3153
  */
3420
3154
  meter_lookup_key?: string;
3421
- /**
3422
- * The attributes the price depends on — region, instance type, token class.
3423
- *
3424
- * Required when the price draws its rates from a price list, which is how anything
3425
- * sold by region or by machine type is priced. A price that carries a single unit
3426
- * amount, or a ladder, has no attributes to give and takes none.
3427
- *
3428
- * Every attribute the meter declares must be present. A combination with no rate
3429
- * covering it is refused rather than priced at zero.
3430
- */
3155
+ /** The dimension values the rate depends on, such as region, instance type or token kind: those of the usage for a metered estimate, and those of what is bought for a licensed price on a rate card. Required whenever the price uses a rate card; prices with their own amounts ignore them. Every key the meter declares must be given. A combination no rate covers is refused rather than priced at zero. */
3431
3156
  dimensions?: QuoteItemInputDimensions;
3432
- /**
3433
- * For metered items, how long to price for. This allows an estimate such as "about
3434
- * this much per month" to be shown before anything exists. The priced quantity is
3435
- * `quantity` multiplied by this duration.
3436
- */
3157
+ /** For a metered estimate, how long to price for, in seconds; the priced quantity is `quantity` times this duration. */
3437
3158
  duration_seconds?: number;
3438
3159
  }
3160
+ /**
3161
+ * The values of the meter's presentation dimensions, present only when grouped by meter.
3162
+ */
3163
+ export type SpendRowDimensions = {
3164
+ [key: string]: string;
3165
+ };
3439
3166
  export interface SpendRow {
3440
3167
  product?: Product;
3441
3168
  plan_id?: string;
3442
3169
  plan_name?: string;
3443
3170
  /** Present only when grouped by resource. */
3444
3171
  resource_id?: string;
3172
+ /** Present only when grouped by meter. */
3173
+ meter?: ObjectIdentity;
3174
+ /** Present only when grouped by meter. */
3175
+ unit?: string;
3176
+ /** Net usage quantity, present only when grouped by meter. */
3177
+ quantity?: string;
3178
+ /** The values of the meter's presentation dimensions, present only when grouped by meter. */
3179
+ dimensions?: SpendRowDimensions;
3445
3180
  amount: Money;
3446
3181
  currency: string;
3447
3182
  }
3448
3183
  export interface SpendRowList {
3449
3184
  items: SpendRow[];
3450
- /** The sum over the whole period, not only the page returned. */
3185
+ /** The total over all matching groups, not only the page returned. */
3451
3186
  total: Money;
3452
3187
  currency: string;
3453
3188
  pagination: OffsetPagination;
@@ -3463,28 +3198,28 @@ export declare const ActiveResourceStatus: {
3463
3198
  readonly closed: "closed";
3464
3199
  };
3465
3200
  /**
3466
- * A resource currently accruing charges by the second.
3201
+ * A resource charged continuously by the second.
3467
3202
  */
3468
3203
  export interface ActiveResource {
3469
3204
  id: string;
3470
3205
  ended_at?: string;
3471
3206
  suspended_at?: string;
3472
3207
  state_changed_at?: string;
3473
- /** The postpaid subscription charged for this metering record, including shared services. */
3208
+ /** The metered subscription charged for this metering record. */
3474
3209
  subscription_id: string;
3475
3210
  resource_id: string;
3476
3211
  product: Product;
3477
- /** What it is, as its own service names it. */
3212
+ /** The resource type, as the owning service names it. */
3478
3213
  resource_type?: string;
3479
3214
  meter: ObjectIdentity;
3480
3215
  unit?: string;
3481
- /** How much is held — cores, MiB, cards. Not how much has been used. */
3216
+ /** How much is held, such as cores, MiB or cards; not how much was used. */
3482
3217
  quantity: string;
3483
3218
  dimensions?: ActiveResourceDimensions;
3484
3219
  status: ActiveResourceStatus;
3485
3220
  started_at: string;
3486
3221
  project_id?: string;
3487
- /** Usage has been generated up to this boundary; it does not imply invoicing or payment. */
3222
+ /** Usage has been generated up to this boundary; it says nothing about invoicing or payment. */
3488
3223
  usage_generated_until: string;
3489
3224
  }
3490
3225
  export interface ActiveResourceList {
@@ -3492,7 +3227,7 @@ export interface ActiveResourceList {
3492
3227
  pagination: OffsetPagination;
3493
3228
  }
3494
3229
  /**
3495
- * An estimate of the refundable value of one order or selected items. This does not cancel the order, stop service or create a refund.
3230
+ * An estimate of the refundable value of an order or selected items; nothing is canceled or refunded.
3496
3231
  */
3497
3232
  export interface OrderRefundQuoteInput {
3498
3233
  order_id: string;
@@ -3504,33 +3239,24 @@ export interface OrderRefundQuoteInput {
3504
3239
  order_item_ids?: string[];
3505
3240
  }
3506
3241
  /**
3507
- * "Quote exactly one target: proposed items, an existing order, renewals, a cancellation or an order
3508
- * refund. All targets use the specified billing account. Nothing is saved, charged, reserved or
3509
- * canceled. Promotion codes apply only to a purchase basket or an existing order. An invalid
3510
- * combination returns BILLING_PURCHASE_INVALID with the offending field."
3242
+ * Quote exactly one target for the billing account: proposed items, an existing order, renewals, a cancellation or an order refund. Promotion codes apply only to proposed items or an existing order. An invalid combination fails with `BILLING_PURCHASE_INVALID` and the field.
3511
3243
  */
3512
3244
  export interface QuoteRequest {
3513
3245
  /**
3514
- * The billing account to price for. It must belong to you. Existing orders must have been purchased
3515
- * with this account; renewals and cancellations must currently be paid for by it.
3246
+ * The billing account to price for; it must be yours. Existing orders must have been placed with it, and renewals and cancellations must currently be paid by it.
3516
3247
  * @minimum 1
3517
3248
  */
3518
3249
  billing_account_id: number;
3519
3250
  /**
3520
- * A proposed purchase priced in the account currency. Metered items may estimate specified usage
3521
- * quantities; those estimates are not amounts collectible at checkout.
3251
+ * A proposed purchase priced in the account's currency. Metered items may include usage estimates, which are not checkout amounts.
3522
3252
  * @minItems 1
3523
3253
  * @maxItems 100
3524
3254
  */
3525
3255
  items?: QuoteItemInput[];
3526
- /**
3527
- * Preview paying this existing order. Its recorded purchase terms supply every line, and an order
3528
- * whose terms are fixed returns its recorded amounts. A preview does not change the order.
3529
- */
3256
+ /** Preview paying this order. Its recorded terms supply every line, and an order whose terms are fixed returns its recorded amounts. The order does not change. */
3530
3257
  order_id?: string;
3531
3258
  /**
3532
- * Preview renewing these subscriptions, each at most once. Each entry represents a separate
3533
- * renewal order. To preview a new promotion code, create a renewal order and quote it by order_id.
3259
+ * Preview renewing these subscriptions, each at most once; each entry is a separate renewal order. To preview a promotion code, create a renewal order and quote it by order_id.
3534
3260
  * @minItems 1
3535
3261
  * @maxItems 100
3536
3262
  */
@@ -3544,9 +3270,7 @@ export interface QuoteRequest {
3544
3270
  refund?: OrderRefundQuoteInput;
3545
3271
  }
3546
3272
  /**
3547
- * How tax applies to the customer, as in Stripe. `none` taxes normally. `exempt` charges no tax.
3548
- * `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
3549
- * invoices state this. Only operators change it.
3273
+ * How tax applies to the customer, as in Stripe: `none` taxes normally, `exempt` charges no tax, `reverse` charges no tax under the reverse-charge mechanism, stated on invoices. Only operators change it.
3550
3274
  */
3551
3275
  export type ContactTaxExempt = (typeof ContactTaxExempt)[keyof typeof ContactTaxExempt];
3552
3276
  export declare const ContactTaxExempt: {
@@ -3555,7 +3279,7 @@ export declare const ContactTaxExempt: {
3555
3279
  readonly reverse: "reverse";
3556
3280
  };
3557
3281
  /**
3558
- * A billing-account contact profile with one address. An account can hold multiple contacts; this is not a login identity.
3282
+ * A contact of a billing account with one address. An account can hold several; a contact is not a login.
3559
3283
  */
3560
3284
  export interface Contact {
3561
3285
  id: string;
@@ -3583,11 +3307,7 @@ export interface Contact {
3583
3307
  address_postal_code?: string;
3584
3308
  /** @pattern ^([A-Z]{2})?$ */
3585
3309
  address_country?: string;
3586
- /**
3587
- * How tax applies to the customer, as in Stripe. `none` taxes normally. `exempt` charges no tax.
3588
- * `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
3589
- * invoices state this. Only operators change it.
3590
- */
3310
+ /** How tax applies to the customer, as in Stripe: `none` taxes normally, `exempt` charges no tax, `reverse` charges no tax under the reverse-charge mechanism, stated on invoices. Only operators change it. */
3591
3311
  tax_exempt: ContactTaxExempt;
3592
3312
  active: boolean;
3593
3313
  created_at: string;
@@ -3663,14 +3383,14 @@ export interface StatementAmounts {
3663
3383
  total: Money;
3664
3384
  }
3665
3385
  /**
3666
- * One billing account's usage billing for one UTC calendar month, summed over the month's statements. It is a summary, not something to pay; each closing's invoice is collected on its own.
3386
+ * One billing account's usage billing for one UTC calendar month, summed over its statements. Not payable itself; each statement's invoice is collected on its own.
3667
3387
  */
3668
3388
  export interface MonthlyStatement {
3669
3389
  billing_account_id: number;
3670
3390
  currency: string;
3671
3391
  period_start: string;
3672
3392
  period_end: string;
3673
- /** True after the period's final closing, which applies minimum charges for the whole month. Usage priced later is still billed in supplement statements and added here. */
3393
+ /** True after the period's final closing, which applies the month's minimum charges. Usage priced later is billed in supplement statements and added here. */
3674
3394
  finalized: boolean;
3675
3395
  finalized_at?: string;
3676
3396
  /** Statements of the period, including the open one. */
@@ -3693,7 +3413,7 @@ export declare const StatementStatus: {
3693
3413
  readonly closed: "closed";
3694
3414
  };
3695
3415
  /**
3696
- * interim: a closing before the period's usage is final; minimum charges are not applied. final: the first closing after the period ended and its late usage was settled; minimum charges for the whole period are applied. supplement: a closing after the final one, for usage priced late. An open statement is interim.
3416
+ * `interim`: a closing before the period's usage is final, without minimum charges. `final`: the first closing after the period ended and its late usage was settled, applying the period's minimum charges. `supplement`: a closing after the final one, for usage priced late. An open statement is interim.
3697
3417
  */
3698
3418
  export type StatementType = (typeof StatementType)[keyof typeof StatementType];
3699
3419
  export declare const StatementType: {
@@ -3702,7 +3422,7 @@ export declare const StatementType: {
3702
3422
  readonly supplement: "supplement";
3703
3423
  };
3704
3424
  /**
3705
- * An account's consumption for one billing period, collected at one closing. Usage is billed after every settlement run, about hourly; each closing issues an invoice for the usage priced since the previous closing and collects it from credits and balance at once, and later usage is collected in the next statement of the same period. A closed statement is never rewritten. The period's consumption is the sum of its statements.
3425
+ * An account's consumption for one billing period up to one closing. Usage is invoiced after every settlement run, about hourly: each closing issues an invoice for the usage priced since the previous one and collects it from credits and balance, and later usage goes into the next statement of the same period. A closed statement does not change. The period's consumption is the sum of its statements.
3706
3426
  */
3707
3427
  export interface Statement {
3708
3428
  id: string;
@@ -3714,7 +3434,7 @@ export interface Statement {
3714
3434
  sequence: number;
3715
3435
  status: StatementStatus;
3716
3436
  type: StatementType;
3717
- /** True while the statement is open. The estimate applies tier pricing to the period's usage so far and adds tax for the current invoice contact. Minimum charges are added at the period's final closing, and a tier reduction larger than this statement's own charges is credited to earlier invoices of the period at closing. */
3437
+ /** True while the statement is open. The estimate prices the period's usage so far at tier prices and adds tax for the current invoice contact. Minimum charges are added at the period's final closing, and a tier reduction larger than this statement's charges is credited to the period's earlier invoices at closing. */
3718
3438
  estimated: boolean;
3719
3439
  amounts: StatementAmounts;
3720
3440
  closed_at?: string;
@@ -3728,11 +3448,19 @@ export interface StatementList {
3728
3448
  items: Statement[];
3729
3449
  pagination: OffsetPagination;
3730
3450
  }
3451
+ /**
3452
+ * The values of the meter's presentation dimensions, such as the model and token kind. Included only when grouping by meter, which splits each meter by these values.
3453
+ */
3454
+ export type StatementItemDimensions = {
3455
+ [key: string]: string;
3456
+ };
3731
3457
  export interface StatementItem {
3732
3458
  project_id?: string;
3733
3459
  product_id?: string;
3734
3460
  meter_id?: string;
3735
3461
  unit?: string;
3462
+ /** The values of the meter's presentation dimensions, such as the model and token kind. Included only when grouping by meter, which splits each meter by these values. */
3463
+ dimensions?: StatementItemDimensions;
3736
3464
  /** Net usage quantity. Included only when grouping by meter. */
3737
3465
  quantity?: string;
3738
3466
  deducted_quantity?: string;