@paid-ai/paid-node 1.2.1 → 1.5.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 (388) hide show
  1. package/dist/cjs/Client.d.ts +9 -0
  2. package/dist/cjs/Client.js +33 -18
  3. package/dist/cjs/api/errors/ConflictError.d.ts +6 -0
  4. package/dist/cjs/api/errors/ConflictError.js +50 -0
  5. package/dist/cjs/api/errors/index.d.ts +1 -0
  6. package/dist/cjs/api/errors/index.js +1 -0
  7. package/dist/cjs/api/resources/checkouts/client/Client.d.ts +1 -1
  8. package/dist/cjs/api/resources/cost/client/Client.d.ts +38 -0
  9. package/dist/cjs/api/resources/cost/client/Client.js +139 -0
  10. package/dist/cjs/api/resources/cost/client/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/cost/client/index.js +17 -0
  12. package/dist/cjs/api/resources/cost/client/requests/CostIngestRequest.d.ts +17 -0
  13. package/dist/cjs/api/resources/cost/client/requests/CostIngestRequest.js +3 -0
  14. package/dist/cjs/api/resources/cost/client/requests/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/cost/client/requests/index.js +2 -0
  16. package/dist/cjs/api/resources/cost/index.d.ts +1 -0
  17. package/dist/cjs/api/resources/cost/index.js +17 -0
  18. package/dist/cjs/api/resources/customers/client/Client.d.ts +19 -0
  19. package/dist/cjs/api/resources/customers/client/Client.js +86 -0
  20. package/dist/cjs/api/resources/customers/client/requests/UpsertCustomerUserRequest.d.ts +16 -0
  21. package/dist/cjs/api/resources/customers/client/requests/UpsertCustomerUserRequest.js +3 -0
  22. package/dist/cjs/api/resources/customers/client/requests/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/index.d.ts +9 -0
  24. package/dist/cjs/api/resources/index.js +10 -1
  25. package/dist/cjs/api/resources/orders/client/Client.d.ts +60 -0
  26. package/dist/cjs/api/resources/orders/client/Client.js +242 -0
  27. package/dist/cjs/api/resources/orders/client/requests/BatchSeatAssignmentsRequest.d.ts +22 -0
  28. package/dist/cjs/api/resources/orders/client/requests/BatchSeatAssignmentsRequest.js +3 -0
  29. package/dist/cjs/api/resources/orders/client/requests/CreateOrderRequest.d.ts +1 -0
  30. package/dist/cjs/api/resources/orders/client/requests/ListOrderSeatsRequest.d.ts +14 -0
  31. package/dist/cjs/api/resources/orders/client/requests/ListOrderSeatsRequest.js +3 -0
  32. package/dist/cjs/api/resources/orders/client/requests/UpdateSeatAssignmentRequest.d.ts +12 -0
  33. package/dist/cjs/api/resources/orders/client/requests/UpdateSeatAssignmentRequest.js +3 -0
  34. package/dist/cjs/api/resources/orders/client/requests/index.d.ts +3 -0
  35. package/dist/cjs/api/resources/orders/index.d.ts +1 -0
  36. package/dist/cjs/api/resources/orders/index.js +1 -0
  37. package/dist/cjs/api/resources/orders/types/ListOrderSeatsRequestStatus.d.ts +5 -0
  38. package/dist/cjs/api/resources/orders/types/ListOrderSeatsRequestStatus.js +8 -0
  39. package/dist/cjs/api/resources/orders/types/index.d.ts +1 -0
  40. package/dist/cjs/api/resources/orders/types/index.js +17 -0
  41. package/dist/cjs/api/resources/pricing/client/Client.d.ts +71 -0
  42. package/dist/cjs/api/resources/pricing/client/Client.js +284 -0
  43. package/dist/cjs/api/resources/pricing/client/index.d.ts +1 -0
  44. package/dist/cjs/api/resources/pricing/client/index.js +17 -0
  45. package/dist/cjs/api/resources/pricing/client/requests/GetPricingRequest.d.ts +9 -0
  46. package/dist/cjs/api/resources/pricing/client/requests/GetPricingRequest.js +3 -0
  47. package/dist/cjs/api/resources/pricing/client/requests/ListPricingRequest.d.ts +10 -0
  48. package/dist/cjs/api/resources/pricing/client/requests/ListPricingRequest.js +3 -0
  49. package/dist/cjs/api/resources/pricing/client/requests/UpdatePricingRequest.d.ts +20 -0
  50. package/dist/cjs/api/resources/pricing/client/requests/UpdatePricingRequest.js +3 -0
  51. package/dist/cjs/api/resources/pricing/client/requests/index.d.ts +3 -0
  52. package/dist/cjs/api/resources/pricing/client/requests/index.js +2 -0
  53. package/dist/cjs/api/resources/pricing/index.d.ts +1 -0
  54. package/dist/cjs/api/resources/pricing/index.js +17 -0
  55. package/dist/cjs/api/resources/valueReceipts/client/Client.d.ts +85 -0
  56. package/dist/cjs/api/resources/valueReceipts/client/Client.js +362 -1
  57. package/dist/cjs/api/resources/valueReceipts/client/requests/ArchiveValueReceiptRequest.d.ts +9 -0
  58. package/dist/cjs/api/resources/valueReceipts/client/requests/ArchiveValueReceiptRequest.js +3 -0
  59. package/dist/cjs/api/resources/valueReceipts/client/requests/ListValueReceiptsRequest.d.ts +7 -0
  60. package/dist/cjs/api/resources/valueReceipts/client/requests/RefreshValueReceiptRequest.d.ts +9 -0
  61. package/dist/cjs/api/resources/valueReceipts/client/requests/RefreshValueReceiptRequest.js +3 -0
  62. package/dist/cjs/api/resources/valueReceipts/client/requests/SealValueReceiptRequest.d.ts +9 -0
  63. package/dist/cjs/api/resources/valueReceipts/client/requests/SealValueReceiptRequest.js +3 -0
  64. package/dist/cjs/api/resources/valueReceipts/client/requests/SyncValueReceiptRequest.d.ts +28 -0
  65. package/dist/cjs/api/resources/valueReceipts/client/requests/SyncValueReceiptRequest.js +3 -0
  66. package/dist/cjs/api/resources/valueReceipts/client/requests/UnarchiveValueReceiptRequest.d.ts +9 -0
  67. package/dist/cjs/api/resources/valueReceipts/client/requests/UnarchiveValueReceiptRequest.js +3 -0
  68. package/dist/cjs/api/resources/valueReceipts/client/requests/index.d.ts +5 -0
  69. package/dist/cjs/api/resources/valueReceipts/index.d.ts +1 -0
  70. package/dist/cjs/api/resources/valueReceipts/index.js +1 -0
  71. package/dist/cjs/api/resources/valueReceipts/types/ListValueReceiptsRequestArchived.d.ts +5 -0
  72. package/dist/cjs/api/resources/valueReceipts/types/ListValueReceiptsRequestArchived.js +8 -0
  73. package/dist/cjs/api/resources/valueReceipts/types/index.d.ts +1 -0
  74. package/dist/cjs/api/resources/valueReceipts/types/index.js +17 -0
  75. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +63 -0
  76. package/dist/cjs/api/resources/webhooks/client/Client.js +282 -0
  77. package/dist/cjs/api/resources/webhooks/client/index.d.ts +1 -0
  78. package/dist/cjs/api/resources/webhooks/client/index.js +17 -0
  79. package/dist/cjs/api/resources/webhooks/client/requests/TestWebhookRequest.d.ts +10 -0
  80. package/dist/cjs/api/resources/webhooks/client/requests/TestWebhookRequest.js +3 -0
  81. package/dist/cjs/api/resources/webhooks/client/requests/UpdateWebhookRequest.d.ts +14 -0
  82. package/dist/cjs/api/resources/webhooks/client/requests/UpdateWebhookRequest.js +3 -0
  83. package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +2 -0
  84. package/dist/cjs/api/resources/webhooks/client/requests/index.js +2 -0
  85. package/dist/cjs/api/resources/webhooks/index.d.ts +2 -0
  86. package/dist/cjs/api/resources/webhooks/index.js +18 -0
  87. package/dist/cjs/api/resources/webhooks/types/TestWebhookRequestWebhookName.d.ts +12 -0
  88. package/dist/cjs/api/resources/webhooks/types/TestWebhookRequestWebhookName.js +15 -0
  89. package/dist/cjs/api/resources/webhooks/types/UpdateWebhookRequestWebhookName.d.ts +12 -0
  90. package/dist/cjs/api/resources/webhooks/types/UpdateWebhookRequestWebhookName.js +15 -0
  91. package/dist/cjs/api/resources/webhooks/types/index.d.ts +2 -0
  92. package/dist/cjs/api/resources/webhooks/types/index.js +18 -0
  93. package/dist/cjs/api/types/BatchSeatAssignmentsResponse.d.ts +4 -0
  94. package/dist/cjs/api/types/BatchSeatAssignmentsResponse.js +3 -0
  95. package/dist/cjs/api/types/CheckoutDetails.d.ts +21 -0
  96. package/dist/cjs/api/types/CheckoutDetails.js +3 -0
  97. package/dist/cjs/api/types/Cost.d.ts +10 -0
  98. package/dist/cjs/api/types/Cost.js +3 -0
  99. package/dist/cjs/api/types/CostIngestResponse.d.ts +6 -0
  100. package/dist/cjs/api/types/CostIngestResponse.js +3 -0
  101. package/dist/cjs/api/types/CostOverride.d.ts +8 -0
  102. package/dist/cjs/api/types/CostOverride.js +3 -0
  103. package/dist/cjs/api/types/CreateOrderLineAttributeRequest.d.ts +1 -0
  104. package/dist/cjs/api/types/CreditBalance.d.ts +6 -0
  105. package/dist/cjs/api/types/CreditBenefitInput.d.ts +30 -0
  106. package/dist/cjs/api/types/CreditBenefitInput.js +20 -0
  107. package/dist/cjs/api/types/CreditBenefitOutput.d.ts +13 -0
  108. package/dist/cjs/api/types/CreditBenefitOutput.js +3 -0
  109. package/dist/cjs/api/types/CreditGrant.d.ts +11 -0
  110. package/dist/cjs/api/types/CreditGrant.js +3 -0
  111. package/dist/cjs/api/types/CustomerUser.d.ts +13 -0
  112. package/dist/cjs/api/types/CustomerUser.js +3 -0
  113. package/dist/cjs/api/types/CustomerUserStatus.d.ts +5 -0
  114. package/dist/cjs/api/types/CustomerUserStatus.js +8 -0
  115. package/dist/cjs/api/types/OneTimePerUnitInput.d.ts +21 -0
  116. package/dist/cjs/api/types/OneTimePerUnitInput.js +18 -0
  117. package/dist/cjs/api/types/Order.d.ts +2 -0
  118. package/dist/cjs/api/types/OrderBillingFrequencyOverride.d.ts +14 -0
  119. package/dist/cjs/api/types/OrderBillingFrequencyOverride.js +14 -0
  120. package/dist/cjs/api/types/OrderSeat.d.ts +10 -0
  121. package/dist/cjs/api/types/OrderSeat.js +3 -0
  122. package/dist/cjs/api/types/OrderSeatListResponse.d.ts +5 -0
  123. package/dist/cjs/api/types/OrderSeatListResponse.js +3 -0
  124. package/dist/cjs/api/types/PrecomputedCost.d.ts +17 -0
  125. package/dist/cjs/api/types/PrecomputedCost.js +3 -0
  126. package/dist/cjs/api/types/PricingInput.d.ts +46 -0
  127. package/dist/cjs/api/types/PricingInput.js +3 -0
  128. package/dist/cjs/api/types/PricingListResponse.d.ts +4 -0
  129. package/dist/cjs/api/types/PricingListResponse.js +3 -0
  130. package/dist/cjs/api/types/PricingOutput.d.ts +36 -0
  131. package/dist/cjs/api/types/PricingOutput.js +23 -0
  132. package/dist/cjs/api/types/PricingPricePointOutput.d.ts +29 -0
  133. package/dist/cjs/api/types/PricingPricePointOutput.js +17 -0
  134. package/dist/cjs/api/types/PricingResponse.d.ts +7 -0
  135. package/dist/cjs/api/types/PricingResponse.js +3 -0
  136. package/dist/cjs/api/types/ProductAttribution.d.ts +2 -0
  137. package/dist/cjs/api/types/ProductAttribution.js +3 -0
  138. package/dist/cjs/api/types/RecurringGraduatedInput.d.ts +22 -0
  139. package/dist/cjs/api/types/RecurringGraduatedInput.js +18 -0
  140. package/dist/cjs/api/types/RecurringPerUnitInput.d.ts +22 -0
  141. package/dist/cjs/api/types/RecurringPerUnitInput.js +18 -0
  142. package/dist/cjs/api/types/RecurringPercentOfTotalInput.d.ts +23 -0
  143. package/dist/cjs/api/types/RecurringPercentOfTotalInput.js +18 -0
  144. package/dist/cjs/api/types/RecurringVolumeInput.d.ts +22 -0
  145. package/dist/cjs/api/types/RecurringVolumeInput.js +18 -0
  146. package/dist/cjs/api/types/SeatAssignee.d.ts +5 -0
  147. package/dist/cjs/api/types/SeatAssignee.js +3 -0
  148. package/dist/cjs/api/types/SeatAssignmentStatus.d.ts +5 -0
  149. package/dist/cjs/api/types/SeatAssignmentStatus.js +8 -0
  150. package/dist/cjs/api/types/SeatBasedGraduatedInput.d.ts +22 -0
  151. package/dist/cjs/api/types/SeatBasedGraduatedInput.js +18 -0
  152. package/dist/cjs/api/types/SeatBasedPerUnitInput.d.ts +22 -0
  153. package/dist/cjs/api/types/SeatBasedPerUnitInput.js +18 -0
  154. package/dist/cjs/api/types/SeatBasedPrepaidCreditsInput.d.ts +25 -0
  155. package/dist/cjs/api/types/SeatBasedPrepaidCreditsInput.js +18 -0
  156. package/dist/cjs/api/types/SeatBasedVolumeInput.d.ts +22 -0
  157. package/dist/cjs/api/types/SeatBasedVolumeInput.js +18 -0
  158. package/dist/cjs/api/types/SimplePricePoint.d.ts +29 -0
  159. package/dist/cjs/api/types/SimplePricePoint.js +17 -0
  160. package/dist/cjs/api/types/SuccessResponse.d.ts +3 -0
  161. package/dist/cjs/api/types/SuccessResponse.js +3 -0
  162. package/dist/cjs/api/types/TieredPricePoint.d.ts +29 -0
  163. package/dist/cjs/api/types/TieredPricePoint.js +17 -0
  164. package/dist/cjs/api/types/TokenUsage.d.ts +12 -0
  165. package/dist/cjs/api/types/TokenUsage.js +3 -0
  166. package/dist/cjs/api/types/UsageCost.d.ts +15 -0
  167. package/dist/cjs/api/types/UsageCost.js +3 -0
  168. package/dist/cjs/api/types/UsageCostPlusInput.d.ts +23 -0
  169. package/dist/cjs/api/types/UsageCostPlusInput.js +18 -0
  170. package/dist/cjs/api/types/UsageGraduatedInput.d.ts +23 -0
  171. package/dist/cjs/api/types/UsageGraduatedInput.js +18 -0
  172. package/dist/cjs/api/types/UsagePerUnitInput.d.ts +23 -0
  173. package/dist/cjs/api/types/UsagePerUnitInput.js +18 -0
  174. package/dist/cjs/api/types/UsagePrepaidCreditsInput.d.ts +26 -0
  175. package/dist/cjs/api/types/UsagePrepaidCreditsInput.js +18 -0
  176. package/dist/cjs/api/types/UsageVolumeInput.d.ts +23 -0
  177. package/dist/cjs/api/types/UsageVolumeInput.js +18 -0
  178. package/dist/cjs/api/types/ValueReceiptDetail.d.ts +2 -0
  179. package/dist/cjs/api/types/ValueReceiptSummary.d.ts +2 -0
  180. package/dist/cjs/api/types/ValueReceiptSyncResponse.d.ts +6 -0
  181. package/dist/cjs/api/types/ValueReceiptSyncResponse.js +3 -0
  182. package/dist/cjs/api/types/Webhook.d.ts +24 -0
  183. package/dist/cjs/api/types/Webhook.js +18 -0
  184. package/dist/cjs/api/types/WebhookDeliveryStatus.d.ts +5 -0
  185. package/dist/cjs/api/types/WebhookDeliveryStatus.js +8 -0
  186. package/dist/cjs/api/types/WebhookListResponse.d.ts +4 -0
  187. package/dist/cjs/api/types/WebhookListResponse.js +3 -0
  188. package/dist/cjs/api/types/WebhookTestResponse.d.ts +3 -0
  189. package/dist/cjs/api/types/WebhookTestResponse.js +3 -0
  190. package/dist/cjs/api/types/index.d.ts +46 -0
  191. package/dist/cjs/api/types/index.js +46 -0
  192. package/dist/cjs/version.d.ts +1 -1
  193. package/dist/cjs/version.js +1 -1
  194. package/dist/esm/Client.d.mts +9 -0
  195. package/dist/esm/Client.mjs +17 -2
  196. package/dist/esm/api/errors/ConflictError.d.mts +6 -0
  197. package/dist/esm/api/errors/ConflictError.mjs +13 -0
  198. package/dist/esm/api/errors/index.d.mts +1 -0
  199. package/dist/esm/api/errors/index.mjs +1 -0
  200. package/dist/esm/api/resources/checkouts/client/Client.d.mts +1 -1
  201. package/dist/esm/api/resources/cost/client/Client.d.mts +38 -0
  202. package/dist/esm/api/resources/cost/client/Client.mjs +102 -0
  203. package/dist/esm/api/resources/cost/client/index.d.mts +1 -0
  204. package/dist/esm/api/resources/cost/client/index.mjs +1 -0
  205. package/dist/esm/api/resources/cost/client/requests/CostIngestRequest.d.mts +17 -0
  206. package/dist/esm/api/resources/cost/client/requests/CostIngestRequest.mjs +2 -0
  207. package/dist/esm/api/resources/cost/client/requests/index.d.mts +1 -0
  208. package/dist/esm/api/resources/cost/client/requests/index.mjs +1 -0
  209. package/dist/esm/api/resources/cost/index.d.mts +1 -0
  210. package/dist/esm/api/resources/cost/index.mjs +1 -0
  211. package/dist/esm/api/resources/customers/client/Client.d.mts +19 -0
  212. package/dist/esm/api/resources/customers/client/Client.mjs +86 -0
  213. package/dist/esm/api/resources/customers/client/requests/UpsertCustomerUserRequest.d.mts +16 -0
  214. package/dist/esm/api/resources/customers/client/requests/UpsertCustomerUserRequest.mjs +2 -0
  215. package/dist/esm/api/resources/customers/client/requests/index.d.mts +1 -0
  216. package/dist/esm/api/resources/index.d.mts +9 -0
  217. package/dist/esm/api/resources/index.mjs +9 -0
  218. package/dist/esm/api/resources/orders/client/Client.d.mts +60 -0
  219. package/dist/esm/api/resources/orders/client/Client.mjs +242 -0
  220. package/dist/esm/api/resources/orders/client/requests/BatchSeatAssignmentsRequest.d.mts +22 -0
  221. package/dist/esm/api/resources/orders/client/requests/BatchSeatAssignmentsRequest.mjs +2 -0
  222. package/dist/esm/api/resources/orders/client/requests/CreateOrderRequest.d.mts +1 -0
  223. package/dist/esm/api/resources/orders/client/requests/ListOrderSeatsRequest.d.mts +14 -0
  224. package/dist/esm/api/resources/orders/client/requests/ListOrderSeatsRequest.mjs +2 -0
  225. package/dist/esm/api/resources/orders/client/requests/UpdateSeatAssignmentRequest.d.mts +12 -0
  226. package/dist/esm/api/resources/orders/client/requests/UpdateSeatAssignmentRequest.mjs +2 -0
  227. package/dist/esm/api/resources/orders/client/requests/index.d.mts +3 -0
  228. package/dist/esm/api/resources/orders/index.d.mts +1 -0
  229. package/dist/esm/api/resources/orders/index.mjs +1 -0
  230. package/dist/esm/api/resources/orders/types/ListOrderSeatsRequestStatus.d.mts +5 -0
  231. package/dist/esm/api/resources/orders/types/ListOrderSeatsRequestStatus.mjs +5 -0
  232. package/dist/esm/api/resources/orders/types/index.d.mts +1 -0
  233. package/dist/esm/api/resources/orders/types/index.mjs +1 -0
  234. package/dist/esm/api/resources/pricing/client/Client.d.mts +71 -0
  235. package/dist/esm/api/resources/pricing/client/Client.mjs +247 -0
  236. package/dist/esm/api/resources/pricing/client/index.d.mts +1 -0
  237. package/dist/esm/api/resources/pricing/client/index.mjs +1 -0
  238. package/dist/esm/api/resources/pricing/client/requests/GetPricingRequest.d.mts +9 -0
  239. package/dist/esm/api/resources/pricing/client/requests/GetPricingRequest.mjs +2 -0
  240. package/dist/esm/api/resources/pricing/client/requests/ListPricingRequest.d.mts +10 -0
  241. package/dist/esm/api/resources/pricing/client/requests/ListPricingRequest.mjs +2 -0
  242. package/dist/esm/api/resources/pricing/client/requests/UpdatePricingRequest.d.mts +20 -0
  243. package/dist/esm/api/resources/pricing/client/requests/UpdatePricingRequest.mjs +2 -0
  244. package/dist/esm/api/resources/pricing/client/requests/index.d.mts +3 -0
  245. package/dist/esm/api/resources/pricing/client/requests/index.mjs +1 -0
  246. package/dist/esm/api/resources/pricing/index.d.mts +1 -0
  247. package/dist/esm/api/resources/pricing/index.mjs +1 -0
  248. package/dist/esm/api/resources/valueReceipts/client/Client.d.mts +85 -0
  249. package/dist/esm/api/resources/valueReceipts/client/Client.mjs +362 -1
  250. package/dist/esm/api/resources/valueReceipts/client/requests/ArchiveValueReceiptRequest.d.mts +9 -0
  251. package/dist/esm/api/resources/valueReceipts/client/requests/ArchiveValueReceiptRequest.mjs +2 -0
  252. package/dist/esm/api/resources/valueReceipts/client/requests/ListValueReceiptsRequest.d.mts +7 -0
  253. package/dist/esm/api/resources/valueReceipts/client/requests/RefreshValueReceiptRequest.d.mts +9 -0
  254. package/dist/esm/api/resources/valueReceipts/client/requests/RefreshValueReceiptRequest.mjs +2 -0
  255. package/dist/esm/api/resources/valueReceipts/client/requests/SealValueReceiptRequest.d.mts +9 -0
  256. package/dist/esm/api/resources/valueReceipts/client/requests/SealValueReceiptRequest.mjs +2 -0
  257. package/dist/esm/api/resources/valueReceipts/client/requests/SyncValueReceiptRequest.d.mts +28 -0
  258. package/dist/esm/api/resources/valueReceipts/client/requests/SyncValueReceiptRequest.mjs +2 -0
  259. package/dist/esm/api/resources/valueReceipts/client/requests/UnarchiveValueReceiptRequest.d.mts +9 -0
  260. package/dist/esm/api/resources/valueReceipts/client/requests/UnarchiveValueReceiptRequest.mjs +2 -0
  261. package/dist/esm/api/resources/valueReceipts/client/requests/index.d.mts +5 -0
  262. package/dist/esm/api/resources/valueReceipts/index.d.mts +1 -0
  263. package/dist/esm/api/resources/valueReceipts/index.mjs +1 -0
  264. package/dist/esm/api/resources/valueReceipts/types/ListValueReceiptsRequestArchived.d.mts +5 -0
  265. package/dist/esm/api/resources/valueReceipts/types/ListValueReceiptsRequestArchived.mjs +5 -0
  266. package/dist/esm/api/resources/valueReceipts/types/index.d.mts +1 -0
  267. package/dist/esm/api/resources/valueReceipts/types/index.mjs +1 -0
  268. package/dist/esm/api/resources/webhooks/client/Client.d.mts +63 -0
  269. package/dist/esm/api/resources/webhooks/client/Client.mjs +245 -0
  270. package/dist/esm/api/resources/webhooks/client/index.d.mts +1 -0
  271. package/dist/esm/api/resources/webhooks/client/index.mjs +1 -0
  272. package/dist/esm/api/resources/webhooks/client/requests/TestWebhookRequest.d.mts +10 -0
  273. package/dist/esm/api/resources/webhooks/client/requests/TestWebhookRequest.mjs +2 -0
  274. package/dist/esm/api/resources/webhooks/client/requests/UpdateWebhookRequest.d.mts +14 -0
  275. package/dist/esm/api/resources/webhooks/client/requests/UpdateWebhookRequest.mjs +2 -0
  276. package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +2 -0
  277. package/dist/esm/api/resources/webhooks/client/requests/index.mjs +1 -0
  278. package/dist/esm/api/resources/webhooks/index.d.mts +2 -0
  279. package/dist/esm/api/resources/webhooks/index.mjs +2 -0
  280. package/dist/esm/api/resources/webhooks/types/TestWebhookRequestWebhookName.d.mts +12 -0
  281. package/dist/esm/api/resources/webhooks/types/TestWebhookRequestWebhookName.mjs +12 -0
  282. package/dist/esm/api/resources/webhooks/types/UpdateWebhookRequestWebhookName.d.mts +12 -0
  283. package/dist/esm/api/resources/webhooks/types/UpdateWebhookRequestWebhookName.mjs +12 -0
  284. package/dist/esm/api/resources/webhooks/types/index.d.mts +2 -0
  285. package/dist/esm/api/resources/webhooks/types/index.mjs +2 -0
  286. package/dist/esm/api/types/BatchSeatAssignmentsResponse.d.mts +4 -0
  287. package/dist/esm/api/types/BatchSeatAssignmentsResponse.mjs +2 -0
  288. package/dist/esm/api/types/CheckoutDetails.d.mts +21 -0
  289. package/dist/esm/api/types/CheckoutDetails.mjs +2 -0
  290. package/dist/esm/api/types/Cost.d.mts +10 -0
  291. package/dist/esm/api/types/Cost.mjs +2 -0
  292. package/dist/esm/api/types/CostIngestResponse.d.mts +6 -0
  293. package/dist/esm/api/types/CostIngestResponse.mjs +2 -0
  294. package/dist/esm/api/types/CostOverride.d.mts +8 -0
  295. package/dist/esm/api/types/CostOverride.mjs +2 -0
  296. package/dist/esm/api/types/CreateOrderLineAttributeRequest.d.mts +1 -0
  297. package/dist/esm/api/types/CreditBalance.d.mts +6 -0
  298. package/dist/esm/api/types/CreditBenefitInput.d.mts +30 -0
  299. package/dist/esm/api/types/CreditBenefitInput.mjs +17 -0
  300. package/dist/esm/api/types/CreditBenefitOutput.d.mts +13 -0
  301. package/dist/esm/api/types/CreditBenefitOutput.mjs +2 -0
  302. package/dist/esm/api/types/CreditGrant.d.mts +11 -0
  303. package/dist/esm/api/types/CreditGrant.mjs +2 -0
  304. package/dist/esm/api/types/CustomerUser.d.mts +13 -0
  305. package/dist/esm/api/types/CustomerUser.mjs +2 -0
  306. package/dist/esm/api/types/CustomerUserStatus.d.mts +5 -0
  307. package/dist/esm/api/types/CustomerUserStatus.mjs +5 -0
  308. package/dist/esm/api/types/OneTimePerUnitInput.d.mts +21 -0
  309. package/dist/esm/api/types/OneTimePerUnitInput.mjs +15 -0
  310. package/dist/esm/api/types/Order.d.mts +2 -0
  311. package/dist/esm/api/types/OrderBillingFrequencyOverride.d.mts +14 -0
  312. package/dist/esm/api/types/OrderBillingFrequencyOverride.mjs +11 -0
  313. package/dist/esm/api/types/OrderSeat.d.mts +10 -0
  314. package/dist/esm/api/types/OrderSeat.mjs +2 -0
  315. package/dist/esm/api/types/OrderSeatListResponse.d.mts +5 -0
  316. package/dist/esm/api/types/OrderSeatListResponse.mjs +2 -0
  317. package/dist/esm/api/types/PrecomputedCost.d.mts +17 -0
  318. package/dist/esm/api/types/PrecomputedCost.mjs +2 -0
  319. package/dist/esm/api/types/PricingInput.d.mts +46 -0
  320. package/dist/esm/api/types/PricingInput.mjs +2 -0
  321. package/dist/esm/api/types/PricingListResponse.d.mts +4 -0
  322. package/dist/esm/api/types/PricingListResponse.mjs +2 -0
  323. package/dist/esm/api/types/PricingOutput.d.mts +36 -0
  324. package/dist/esm/api/types/PricingOutput.mjs +20 -0
  325. package/dist/esm/api/types/PricingPricePointOutput.d.mts +29 -0
  326. package/dist/esm/api/types/PricingPricePointOutput.mjs +14 -0
  327. package/dist/esm/api/types/PricingResponse.d.mts +7 -0
  328. package/dist/esm/api/types/PricingResponse.mjs +2 -0
  329. package/dist/esm/api/types/ProductAttribution.d.mts +2 -0
  330. package/dist/esm/api/types/ProductAttribution.mjs +2 -0
  331. package/dist/esm/api/types/RecurringGraduatedInput.d.mts +22 -0
  332. package/dist/esm/api/types/RecurringGraduatedInput.mjs +15 -0
  333. package/dist/esm/api/types/RecurringPerUnitInput.d.mts +22 -0
  334. package/dist/esm/api/types/RecurringPerUnitInput.mjs +15 -0
  335. package/dist/esm/api/types/RecurringPercentOfTotalInput.d.mts +23 -0
  336. package/dist/esm/api/types/RecurringPercentOfTotalInput.mjs +15 -0
  337. package/dist/esm/api/types/RecurringVolumeInput.d.mts +22 -0
  338. package/dist/esm/api/types/RecurringVolumeInput.mjs +15 -0
  339. package/dist/esm/api/types/SeatAssignee.d.mts +5 -0
  340. package/dist/esm/api/types/SeatAssignee.mjs +2 -0
  341. package/dist/esm/api/types/SeatAssignmentStatus.d.mts +5 -0
  342. package/dist/esm/api/types/SeatAssignmentStatus.mjs +5 -0
  343. package/dist/esm/api/types/SeatBasedGraduatedInput.d.mts +22 -0
  344. package/dist/esm/api/types/SeatBasedGraduatedInput.mjs +15 -0
  345. package/dist/esm/api/types/SeatBasedPerUnitInput.d.mts +22 -0
  346. package/dist/esm/api/types/SeatBasedPerUnitInput.mjs +15 -0
  347. package/dist/esm/api/types/SeatBasedPrepaidCreditsInput.d.mts +25 -0
  348. package/dist/esm/api/types/SeatBasedPrepaidCreditsInput.mjs +15 -0
  349. package/dist/esm/api/types/SeatBasedVolumeInput.d.mts +22 -0
  350. package/dist/esm/api/types/SeatBasedVolumeInput.mjs +15 -0
  351. package/dist/esm/api/types/SimplePricePoint.d.mts +29 -0
  352. package/dist/esm/api/types/SimplePricePoint.mjs +14 -0
  353. package/dist/esm/api/types/SuccessResponse.d.mts +3 -0
  354. package/dist/esm/api/types/SuccessResponse.mjs +2 -0
  355. package/dist/esm/api/types/TieredPricePoint.d.mts +29 -0
  356. package/dist/esm/api/types/TieredPricePoint.mjs +14 -0
  357. package/dist/esm/api/types/TokenUsage.d.mts +12 -0
  358. package/dist/esm/api/types/TokenUsage.mjs +2 -0
  359. package/dist/esm/api/types/UsageCost.d.mts +15 -0
  360. package/dist/esm/api/types/UsageCost.mjs +2 -0
  361. package/dist/esm/api/types/UsageCostPlusInput.d.mts +23 -0
  362. package/dist/esm/api/types/UsageCostPlusInput.mjs +15 -0
  363. package/dist/esm/api/types/UsageGraduatedInput.d.mts +23 -0
  364. package/dist/esm/api/types/UsageGraduatedInput.mjs +15 -0
  365. package/dist/esm/api/types/UsagePerUnitInput.d.mts +23 -0
  366. package/dist/esm/api/types/UsagePerUnitInput.mjs +15 -0
  367. package/dist/esm/api/types/UsagePrepaidCreditsInput.d.mts +26 -0
  368. package/dist/esm/api/types/UsagePrepaidCreditsInput.mjs +15 -0
  369. package/dist/esm/api/types/UsageVolumeInput.d.mts +23 -0
  370. package/dist/esm/api/types/UsageVolumeInput.mjs +15 -0
  371. package/dist/esm/api/types/ValueReceiptDetail.d.mts +2 -0
  372. package/dist/esm/api/types/ValueReceiptSummary.d.mts +2 -0
  373. package/dist/esm/api/types/ValueReceiptSyncResponse.d.mts +6 -0
  374. package/dist/esm/api/types/ValueReceiptSyncResponse.mjs +2 -0
  375. package/dist/esm/api/types/Webhook.d.mts +24 -0
  376. package/dist/esm/api/types/Webhook.mjs +15 -0
  377. package/dist/esm/api/types/WebhookDeliveryStatus.d.mts +5 -0
  378. package/dist/esm/api/types/WebhookDeliveryStatus.mjs +5 -0
  379. package/dist/esm/api/types/WebhookListResponse.d.mts +4 -0
  380. package/dist/esm/api/types/WebhookListResponse.mjs +2 -0
  381. package/dist/esm/api/types/WebhookTestResponse.d.mts +3 -0
  382. package/dist/esm/api/types/WebhookTestResponse.mjs +2 -0
  383. package/dist/esm/api/types/index.d.mts +46 -0
  384. package/dist/esm/api/types/index.mjs +46 -0
  385. package/dist/esm/version.d.mts +1 -1
  386. package/dist/esm/version.mjs +1 -1
  387. package/package.json +1 -1
  388. package/reference.md +1159 -105
@@ -1,6 +1,8 @@
1
1
  export * from "./Attribution.js";
2
+ export * from "./BatchSeatAssignmentsResponse.js";
2
3
  export * from "./BulkSignalsResponse.js";
3
4
  export * from "./Checkout.js";
5
+ export * from "./CheckoutDetails.js";
4
6
  export * from "./CheckoutListResponse.js";
5
7
  export * from "./CheckoutProduct.js";
6
8
  export * from "./CheckoutProductInput.js";
@@ -8,12 +10,18 @@ export * from "./CheckoutStatus.js";
8
10
  export * from "./Contact.js";
9
11
  export * from "./ContactBillingAddress.js";
10
12
  export * from "./ContactListResponse.js";
13
+ export * from "./Cost.js";
14
+ export * from "./CostIngestResponse.js";
15
+ export * from "./CostOverride.js";
11
16
  export * from "./CreateOrderLineAttributeRequest.js";
12
17
  export * from "./CreateOrderLineRequest.js";
13
18
  export * from "./CreditBalance.js";
14
19
  export * from "./CreditBalanceListResponse.js";
20
+ export * from "./CreditBenefitInput.js";
21
+ export * from "./CreditBenefitOutput.js";
15
22
  export * from "./CreditCurrency.js";
16
23
  export * from "./CreditCurrencyListResponse.js";
24
+ export * from "./CreditGrant.js";
17
25
  export * from "./Customer.js";
18
26
  export * from "./CustomerAttribution.js";
19
27
  export * from "./CustomerBillingAddress.js";
@@ -23,26 +31,64 @@ export * from "./CustomerCreationState.js";
23
31
  export * from "./CustomerListResponse.js";
24
32
  export * from "./CustomerPortal.js";
25
33
  export * from "./CustomerPortalStatus.js";
34
+ export * from "./CustomerUser.js";
35
+ export * from "./CustomerUserStatus.js";
26
36
  export * from "./EmptyResponse.js";
27
37
  export * from "./ErrorResponse.js";
28
38
  export * from "./Invoice.js";
29
39
  export * from "./InvoiceLine.js";
30
40
  export * from "./InvoiceLinesResponse.js";
31
41
  export * from "./InvoiceListResponse.js";
42
+ export * from "./OneTimePerUnitInput.js";
32
43
  export * from "./Order.js";
44
+ export * from "./OrderBillingFrequencyOverride.js";
33
45
  export * from "./OrderCreationState.js";
34
46
  export * from "./OrderLine.js";
35
47
  export * from "./OrderLinesResponse.js";
36
48
  export * from "./OrderListResponse.js";
49
+ export * from "./OrderSeat.js";
50
+ export * from "./OrderSeatListResponse.js";
37
51
  export * from "./Pagination.js";
52
+ export * from "./PrecomputedCost.js";
53
+ export * from "./PricingInput.js";
54
+ export * from "./PricingListResponse.js";
55
+ export * from "./PricingOutput.js";
56
+ export * from "./PricingPricePointOutput.js";
57
+ export * from "./PricingResponse.js";
38
58
  export * from "./Product.js";
59
+ export * from "./ProductAttribution.js";
39
60
  export * from "./ProductByExternalId.js";
40
61
  export * from "./ProductById.js";
41
62
  export * from "./ProductListResponse.js";
63
+ export * from "./RecurringGraduatedInput.js";
64
+ export * from "./RecurringPercentOfTotalInput.js";
65
+ export * from "./RecurringPerUnitInput.js";
66
+ export * from "./RecurringVolumeInput.js";
67
+ export * from "./SeatAssignee.js";
68
+ export * from "./SeatAssignmentStatus.js";
69
+ export * from "./SeatBasedGraduatedInput.js";
70
+ export * from "./SeatBasedPerUnitInput.js";
71
+ export * from "./SeatBasedPrepaidCreditsInput.js";
72
+ export * from "./SeatBasedVolumeInput.js";
42
73
  export * from "./Signal.js";
74
+ export * from "./SimplePricePoint.js";
75
+ export * from "./SuccessResponse.js";
76
+ export * from "./TieredPricePoint.js";
77
+ export * from "./TokenUsage.js";
43
78
  export * from "./UpdateContactRequest.js";
44
79
  export * from "./UpdateCustomerRequest.js";
45
80
  export * from "./UpdateProductRequest.js";
81
+ export * from "./UsageCost.js";
82
+ export * from "./UsageCostPlusInput.js";
83
+ export * from "./UsageGraduatedInput.js";
84
+ export * from "./UsagePerUnitInput.js";
85
+ export * from "./UsagePrepaidCreditsInput.js";
86
+ export * from "./UsageVolumeInput.js";
46
87
  export * from "./ValueReceiptDetail.js";
47
88
  export * from "./ValueReceiptListResponse.js";
48
89
  export * from "./ValueReceiptSummary.js";
90
+ export * from "./ValueReceiptSyncResponse.js";
91
+ export * from "./Webhook.js";
92
+ export * from "./WebhookDeliveryStatus.js";
93
+ export * from "./WebhookListResponse.js";
94
+ export * from "./WebhookTestResponse.js";
@@ -15,8 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Attribution.js"), exports);
18
+ __exportStar(require("./BatchSeatAssignmentsResponse.js"), exports);
18
19
  __exportStar(require("./BulkSignalsResponse.js"), exports);
19
20
  __exportStar(require("./Checkout.js"), exports);
21
+ __exportStar(require("./CheckoutDetails.js"), exports);
20
22
  __exportStar(require("./CheckoutListResponse.js"), exports);
21
23
  __exportStar(require("./CheckoutProduct.js"), exports);
22
24
  __exportStar(require("./CheckoutProductInput.js"), exports);
@@ -24,12 +26,18 @@ __exportStar(require("./CheckoutStatus.js"), exports);
24
26
  __exportStar(require("./Contact.js"), exports);
25
27
  __exportStar(require("./ContactBillingAddress.js"), exports);
26
28
  __exportStar(require("./ContactListResponse.js"), exports);
29
+ __exportStar(require("./Cost.js"), exports);
30
+ __exportStar(require("./CostIngestResponse.js"), exports);
31
+ __exportStar(require("./CostOverride.js"), exports);
27
32
  __exportStar(require("./CreateOrderLineAttributeRequest.js"), exports);
28
33
  __exportStar(require("./CreateOrderLineRequest.js"), exports);
29
34
  __exportStar(require("./CreditBalance.js"), exports);
30
35
  __exportStar(require("./CreditBalanceListResponse.js"), exports);
36
+ __exportStar(require("./CreditBenefitInput.js"), exports);
37
+ __exportStar(require("./CreditBenefitOutput.js"), exports);
31
38
  __exportStar(require("./CreditCurrency.js"), exports);
32
39
  __exportStar(require("./CreditCurrencyListResponse.js"), exports);
40
+ __exportStar(require("./CreditGrant.js"), exports);
33
41
  __exportStar(require("./Customer.js"), exports);
34
42
  __exportStar(require("./CustomerAttribution.js"), exports);
35
43
  __exportStar(require("./CustomerBillingAddress.js"), exports);
@@ -39,26 +47,64 @@ __exportStar(require("./CustomerCreationState.js"), exports);
39
47
  __exportStar(require("./CustomerListResponse.js"), exports);
40
48
  __exportStar(require("./CustomerPortal.js"), exports);
41
49
  __exportStar(require("./CustomerPortalStatus.js"), exports);
50
+ __exportStar(require("./CustomerUser.js"), exports);
51
+ __exportStar(require("./CustomerUserStatus.js"), exports);
42
52
  __exportStar(require("./EmptyResponse.js"), exports);
43
53
  __exportStar(require("./ErrorResponse.js"), exports);
44
54
  __exportStar(require("./Invoice.js"), exports);
45
55
  __exportStar(require("./InvoiceLine.js"), exports);
46
56
  __exportStar(require("./InvoiceLinesResponse.js"), exports);
47
57
  __exportStar(require("./InvoiceListResponse.js"), exports);
58
+ __exportStar(require("./OneTimePerUnitInput.js"), exports);
48
59
  __exportStar(require("./Order.js"), exports);
60
+ __exportStar(require("./OrderBillingFrequencyOverride.js"), exports);
49
61
  __exportStar(require("./OrderCreationState.js"), exports);
50
62
  __exportStar(require("./OrderLine.js"), exports);
51
63
  __exportStar(require("./OrderLinesResponse.js"), exports);
52
64
  __exportStar(require("./OrderListResponse.js"), exports);
65
+ __exportStar(require("./OrderSeat.js"), exports);
66
+ __exportStar(require("./OrderSeatListResponse.js"), exports);
53
67
  __exportStar(require("./Pagination.js"), exports);
68
+ __exportStar(require("./PrecomputedCost.js"), exports);
69
+ __exportStar(require("./PricingInput.js"), exports);
70
+ __exportStar(require("./PricingListResponse.js"), exports);
71
+ __exportStar(require("./PricingOutput.js"), exports);
72
+ __exportStar(require("./PricingPricePointOutput.js"), exports);
73
+ __exportStar(require("./PricingResponse.js"), exports);
54
74
  __exportStar(require("./Product.js"), exports);
75
+ __exportStar(require("./ProductAttribution.js"), exports);
55
76
  __exportStar(require("./ProductByExternalId.js"), exports);
56
77
  __exportStar(require("./ProductById.js"), exports);
57
78
  __exportStar(require("./ProductListResponse.js"), exports);
79
+ __exportStar(require("./RecurringGraduatedInput.js"), exports);
80
+ __exportStar(require("./RecurringPercentOfTotalInput.js"), exports);
81
+ __exportStar(require("./RecurringPerUnitInput.js"), exports);
82
+ __exportStar(require("./RecurringVolumeInput.js"), exports);
83
+ __exportStar(require("./SeatAssignee.js"), exports);
84
+ __exportStar(require("./SeatAssignmentStatus.js"), exports);
85
+ __exportStar(require("./SeatBasedGraduatedInput.js"), exports);
86
+ __exportStar(require("./SeatBasedPerUnitInput.js"), exports);
87
+ __exportStar(require("./SeatBasedPrepaidCreditsInput.js"), exports);
88
+ __exportStar(require("./SeatBasedVolumeInput.js"), exports);
58
89
  __exportStar(require("./Signal.js"), exports);
90
+ __exportStar(require("./SimplePricePoint.js"), exports);
91
+ __exportStar(require("./SuccessResponse.js"), exports);
92
+ __exportStar(require("./TieredPricePoint.js"), exports);
93
+ __exportStar(require("./TokenUsage.js"), exports);
59
94
  __exportStar(require("./UpdateContactRequest.js"), exports);
60
95
  __exportStar(require("./UpdateCustomerRequest.js"), exports);
61
96
  __exportStar(require("./UpdateProductRequest.js"), exports);
97
+ __exportStar(require("./UsageCost.js"), exports);
98
+ __exportStar(require("./UsageCostPlusInput.js"), exports);
99
+ __exportStar(require("./UsageGraduatedInput.js"), exports);
100
+ __exportStar(require("./UsagePerUnitInput.js"), exports);
101
+ __exportStar(require("./UsagePrepaidCreditsInput.js"), exports);
102
+ __exportStar(require("./UsageVolumeInput.js"), exports);
62
103
  __exportStar(require("./ValueReceiptDetail.js"), exports);
63
104
  __exportStar(require("./ValueReceiptListResponse.js"), exports);
64
105
  __exportStar(require("./ValueReceiptSummary.js"), exports);
106
+ __exportStar(require("./ValueReceiptSyncResponse.js"), exports);
107
+ __exportStar(require("./Webhook.js"), exports);
108
+ __exportStar(require("./WebhookDeliveryStatus.js"), exports);
109
+ __exportStar(require("./WebhookListResponse.js"), exports);
110
+ __exportStar(require("./WebhookTestResponse.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.2.1";
1
+ export declare const SDK_VERSION = "1.5.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.2.1";
4
+ exports.SDK_VERSION = "1.5.0";
@@ -1,13 +1,16 @@
1
1
  import { Checkouts } from "./api/resources/checkouts/client/Client.mjs";
2
2
  import { Contacts } from "./api/resources/contacts/client/Client.mjs";
3
+ import { Cost } from "./api/resources/cost/client/Client.mjs";
3
4
  import { Credits } from "./api/resources/credits/client/Client.mjs";
4
5
  import { CustomerPortals } from "./api/resources/customerPortals/client/Client.mjs";
5
6
  import { Customers } from "./api/resources/customers/client/Client.mjs";
6
7
  import { Invoices } from "./api/resources/invoices/client/Client.mjs";
7
8
  import { Orders } from "./api/resources/orders/client/Client.mjs";
9
+ import { Pricing } from "./api/resources/pricing/client/Client.mjs";
8
10
  import { Products } from "./api/resources/products/client/Client.mjs";
9
11
  import { Signals } from "./api/resources/signals/client/Client.mjs";
10
12
  import { ValueReceipts } from "./api/resources/valueReceipts/client/Client.mjs";
13
+ import { Webhooks } from "./api/resources/webhooks/client/Client.mjs";
11
14
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
12
15
  export declare namespace PaidClient {
13
16
  interface Options extends BaseClientOptions {
@@ -27,6 +30,9 @@ export declare class PaidClient {
27
30
  protected _checkouts: Checkouts | undefined;
28
31
  protected _customerPortals: CustomerPortals | undefined;
29
32
  protected _valueReceipts: ValueReceipts | undefined;
33
+ protected _webhooks: Webhooks | undefined;
34
+ protected _pricing: Pricing | undefined;
35
+ protected _cost: Cost | undefined;
30
36
  constructor(_options: PaidClient.Options);
31
37
  get products(): Products;
32
38
  get customers(): Customers;
@@ -38,4 +44,7 @@ export declare class PaidClient {
38
44
  get checkouts(): Checkouts;
39
45
  get customerPortals(): CustomerPortals;
40
46
  get valueReceipts(): ValueReceipts;
47
+ get webhooks(): Webhooks;
48
+ get pricing(): Pricing;
49
+ get cost(): Cost;
41
50
  }
@@ -1,14 +1,17 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import { Checkouts } from "./api/resources/checkouts/client/Client.mjs";
3
3
  import { Contacts } from "./api/resources/contacts/client/Client.mjs";
4
+ import { Cost } from "./api/resources/cost/client/Client.mjs";
4
5
  import { Credits } from "./api/resources/credits/client/Client.mjs";
5
6
  import { CustomerPortals } from "./api/resources/customerPortals/client/Client.mjs";
6
7
  import { Customers } from "./api/resources/customers/client/Client.mjs";
7
8
  import { Invoices } from "./api/resources/invoices/client/Client.mjs";
8
9
  import { Orders } from "./api/resources/orders/client/Client.mjs";
10
+ import { Pricing } from "./api/resources/pricing/client/Client.mjs";
9
11
  import { Products } from "./api/resources/products/client/Client.mjs";
10
12
  import { Signals } from "./api/resources/signals/client/Client.mjs";
11
13
  import { ValueReceipts } from "./api/resources/valueReceipts/client/Client.mjs";
14
+ import { Webhooks } from "./api/resources/webhooks/client/Client.mjs";
12
15
  import { mergeHeaders } from "./core/headers.mjs";
13
16
  import * as core from "./core/index.mjs";
14
17
  export class PaidClient {
@@ -16,8 +19,8 @@ export class PaidClient {
16
19
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
17
20
  "X-Fern-Language": "JavaScript",
18
21
  "X-Fern-SDK-Name": "@paid-ai/paid-node",
19
- "X-Fern-SDK-Version": "1.2.1",
20
- "User-Agent": "@paid-ai/paid-node/1.2.1",
22
+ "X-Fern-SDK-Version": "1.5.0",
23
+ "User-Agent": "@paid-ai/paid-node/1.5.0",
21
24
  "X-Fern-Runtime": core.RUNTIME.type,
22
25
  "X-Fern-Runtime-Version": core.RUNTIME.version,
23
26
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -62,4 +65,16 @@ export class PaidClient {
62
65
  var _a;
63
66
  return ((_a = this._valueReceipts) !== null && _a !== void 0 ? _a : (this._valueReceipts = new ValueReceipts(this._options)));
64
67
  }
68
+ get webhooks() {
69
+ var _a;
70
+ return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Webhooks(this._options)));
71
+ }
72
+ get pricing() {
73
+ var _a;
74
+ return ((_a = this._pricing) !== null && _a !== void 0 ? _a : (this._pricing = new Pricing(this._options)));
75
+ }
76
+ get cost() {
77
+ var _a;
78
+ return ((_a = this._cost) !== null && _a !== void 0 ? _a : (this._cost = new Cost(this._options)));
79
+ }
65
80
  }
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../core/index.mjs";
2
+ import * as errors from "../../errors/index.mjs";
3
+ import type * as Paid from "../index.mjs";
4
+ export declare class ConflictError extends errors.PaidError {
5
+ constructor(body: Paid.ErrorResponse, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../errors/index.mjs";
3
+ export class ConflictError extends errors.PaidError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "ConflictError",
7
+ statusCode: 409,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, ConflictError.prototype);
12
+ }
13
+ }
@@ -1,4 +1,5 @@
1
1
  export * from "./BadRequestError.mjs";
2
+ export * from "./ConflictError.mjs";
2
3
  export * from "./ForbiddenError.mjs";
3
4
  export * from "./InternalServerError.mjs";
4
5
  export * from "./NotFoundError.mjs";
@@ -1,4 +1,5 @@
1
1
  export * from "./BadRequestError.mjs";
2
+ export * from "./ConflictError.mjs";
2
3
  export * from "./ForbiddenError.mjs";
3
4
  export * from "./InternalServerError.mjs";
4
5
  export * from "./NotFoundError.mjs";
@@ -61,7 +61,7 @@ export declare class Checkouts {
61
61
  * id: "id"
62
62
  * })
63
63
  */
64
- getCheckout(request: Paid.GetCheckoutRequest, requestOptions?: Checkouts.RequestOptions): core.HttpResponsePromise<Paid.Checkout>;
64
+ getCheckout(request: Paid.GetCheckoutRequest, requestOptions?: Checkouts.RequestOptions): core.HttpResponsePromise<Paid.CheckoutDetails>;
65
65
  private __getCheckout;
66
66
  /**
67
67
  * Archive a checkout by ID
@@ -0,0 +1,38 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
+ import * as core from "../../../../core/index.mjs";
3
+ import * as Paid from "../../../index.mjs";
4
+ export declare namespace Cost {
5
+ interface Options extends BaseClientOptions {
6
+ }
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class Cost {
11
+ protected readonly _options: Cost.Options;
12
+ constructor(_options: Cost.Options);
13
+ /**
14
+ * Ingests a batch of cost records. Each record is either a pre-computed `cost` (caller supplies amount + currency) or a `usage` record (caller supplies vendor/model/token counts and Paid prices it server-side). The batch is all-or-nothing: if any record fails validation, the entire request is rejected with a 400 and nothing is persisted. Records may carry an optional `idempotencyKey`; matches against previously ingested records are skipped and reported in the `duplicates` count.
15
+ *
16
+ * @param {Paid.CostIngestRequest} request
17
+ * @param {Cost.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @throws {@link Paid.BadRequestError}
20
+ * @throws {@link Paid.ForbiddenError}
21
+ * @throws {@link Paid.InternalServerError}
22
+ *
23
+ * @example
24
+ * await client.cost.ingestCost({
25
+ * costs: [{
26
+ * type: "cost",
27
+ * customer: {
28
+ * customerId: "customerId"
29
+ * },
30
+ * amount: 1.1,
31
+ * currency: "currency"
32
+ * }]
33
+ * })
34
+ */
35
+ ingestCost(request: Paid.CostIngestRequest, requestOptions?: Cost.RequestOptions): core.HttpResponsePromise<Paid.CostIngestResponse>;
36
+ private __ingestCost;
37
+ protected _getAuthorizationHeader(): Promise<string>;
38
+ }
@@ -0,0 +1,102 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
12
+ import * as core from "../../../../core/index.mjs";
13
+ import * as environments from "../../../../environments.mjs";
14
+ import * as errors from "../../../../errors/index.mjs";
15
+ import * as Paid from "../../../index.mjs";
16
+ export class Cost {
17
+ constructor(_options) {
18
+ this._options = _options;
19
+ }
20
+ /**
21
+ * Ingests a batch of cost records. Each record is either a pre-computed `cost` (caller supplies amount + currency) or a `usage` record (caller supplies vendor/model/token counts and Paid prices it server-side). The batch is all-or-nothing: if any record fails validation, the entire request is rejected with a 400 and nothing is persisted. Records may carry an optional `idempotencyKey`; matches against previously ingested records are skipped and reported in the `duplicates` count.
22
+ *
23
+ * @param {Paid.CostIngestRequest} request
24
+ * @param {Cost.RequestOptions} requestOptions - Request-specific configuration.
25
+ *
26
+ * @throws {@link Paid.BadRequestError}
27
+ * @throws {@link Paid.ForbiddenError}
28
+ * @throws {@link Paid.InternalServerError}
29
+ *
30
+ * @example
31
+ * await client.cost.ingestCost({
32
+ * costs: [{
33
+ * type: "cost",
34
+ * customer: {
35
+ * customerId: "customerId"
36
+ * },
37
+ * amount: 1.1,
38
+ * currency: "currency"
39
+ * }]
40
+ * })
41
+ */
42
+ ingestCost(request, requestOptions) {
43
+ return core.HttpResponsePromise.fromPromise(this.__ingestCost(request, requestOptions));
44
+ }
45
+ __ingestCost(request, requestOptions) {
46
+ return __awaiter(this, void 0, void 0, function* () {
47
+ var _a, _b, _c, _d, _e, _f, _g, _h;
48
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
49
+ const _response = yield core.fetcher({
50
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, "cost/"),
51
+ method: "POST",
52
+ headers: _headers,
53
+ contentType: "application/json",
54
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
55
+ requestType: "json",
56
+ body: request,
57
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
58
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
59
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
60
+ });
61
+ if (_response.ok) {
62
+ return { data: _response.body, rawResponse: _response.rawResponse };
63
+ }
64
+ if (_response.error.reason === "status-code") {
65
+ switch (_response.error.statusCode) {
66
+ case 400:
67
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
68
+ case 403:
69
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
70
+ case 500:
71
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
72
+ default:
73
+ throw new errors.PaidError({
74
+ statusCode: _response.error.statusCode,
75
+ body: _response.error.body,
76
+ rawResponse: _response.rawResponse,
77
+ });
78
+ }
79
+ }
80
+ switch (_response.error.reason) {
81
+ case "non-json":
82
+ throw new errors.PaidError({
83
+ statusCode: _response.error.statusCode,
84
+ body: _response.error.rawBody,
85
+ rawResponse: _response.rawResponse,
86
+ });
87
+ case "timeout":
88
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /cost/.");
89
+ case "unknown":
90
+ throw new errors.PaidError({
91
+ message: _response.error.errorMessage,
92
+ rawResponse: _response.rawResponse,
93
+ });
94
+ }
95
+ });
96
+ }
97
+ _getAuthorizationHeader() {
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
100
+ });
101
+ }
102
+ }
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,17 @@
1
+ import type * as Paid from "../../../../index.mjs";
2
+ /**
3
+ * @example
4
+ * {
5
+ * costs: [{
6
+ * type: "cost",
7
+ * customer: {
8
+ * customerId: "customerId"
9
+ * },
10
+ * amount: 1.1,
11
+ * currency: "currency"
12
+ * }]
13
+ * }
14
+ */
15
+ export interface CostIngestRequest {
16
+ costs: Paid.Cost[];
17
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { CostIngestRequest } from "./CostIngestRequest.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -184,5 +184,24 @@ export declare class Customers {
184
184
  */
185
185
  getCustomerCreditBalancesByExternalId(request: Paid.GetCustomerCreditBalancesByExternalIdRequest, requestOptions?: Customers.RequestOptions): core.HttpResponsePromise<Paid.CreditBalanceListResponse>;
186
186
  private __getCustomerCreditBalancesByExternalId;
187
+ /**
188
+ * Create or update a customer user using customer and user external IDs
189
+ *
190
+ * @param {Paid.UpsertCustomerUserRequest} request
191
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
192
+ *
193
+ * @throws {@link Paid.BadRequestError}
194
+ * @throws {@link Paid.ForbiddenError}
195
+ * @throws {@link Paid.NotFoundError}
196
+ * @throws {@link Paid.InternalServerError}
197
+ *
198
+ * @example
199
+ * await client.customers.upsertCustomerUserByExternalId({
200
+ * customerExternalId: "customerExternalId",
201
+ * userExternalId: "userExternalId"
202
+ * })
203
+ */
204
+ upsertCustomerUserByExternalId(request: Paid.UpsertCustomerUserRequest, requestOptions?: Customers.RequestOptions): core.HttpResponsePromise<Paid.CustomerUser>;
205
+ private __upsertCustomerUserByExternalId;
187
206
  protected _getAuthorizationHeader(): Promise<string>;
188
207
  }
@@ -8,6 +8,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
11
22
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
12
23
  import * as core from "../../../../core/index.mjs";
13
24
  import * as environments from "../../../../environments.mjs";
@@ -724,6 +735,81 @@ export class Customers {
724
735
  }
725
736
  });
726
737
  }
738
+ /**
739
+ * Create or update a customer user using customer and user external IDs
740
+ *
741
+ * @param {Paid.UpsertCustomerUserRequest} request
742
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
743
+ *
744
+ * @throws {@link Paid.BadRequestError}
745
+ * @throws {@link Paid.ForbiddenError}
746
+ * @throws {@link Paid.NotFoundError}
747
+ * @throws {@link Paid.InternalServerError}
748
+ *
749
+ * @example
750
+ * await client.customers.upsertCustomerUserByExternalId({
751
+ * customerExternalId: "customerExternalId",
752
+ * userExternalId: "userExternalId"
753
+ * })
754
+ */
755
+ upsertCustomerUserByExternalId(request, requestOptions) {
756
+ return core.HttpResponsePromise.fromPromise(this.__upsertCustomerUserByExternalId(request, requestOptions));
757
+ }
758
+ __upsertCustomerUserByExternalId(request, requestOptions) {
759
+ return __awaiter(this, void 0, void 0, function* () {
760
+ var _a, _b, _c, _d, _e, _f, _g, _h;
761
+ const { customerExternalId, userExternalId } = request, _body = __rest(request, ["customerExternalId", "userExternalId"]);
762
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
763
+ const _response = yield core.fetcher({
764
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PaidEnvironment.Default, `customers/${core.url.encodePathParam(customerExternalId)}/users/${core.url.encodePathParam(userExternalId)}`),
765
+ method: "PUT",
766
+ headers: _headers,
767
+ contentType: "application/json",
768
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
769
+ requestType: "json",
770
+ body: _body,
771
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
772
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
773
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
774
+ });
775
+ if (_response.ok) {
776
+ return { data: _response.body, rawResponse: _response.rawResponse };
777
+ }
778
+ if (_response.error.reason === "status-code") {
779
+ switch (_response.error.statusCode) {
780
+ case 400:
781
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
782
+ case 403:
783
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
784
+ case 404:
785
+ throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
786
+ case 500:
787
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
788
+ default:
789
+ throw new errors.PaidError({
790
+ statusCode: _response.error.statusCode,
791
+ body: _response.error.body,
792
+ rawResponse: _response.rawResponse,
793
+ });
794
+ }
795
+ }
796
+ switch (_response.error.reason) {
797
+ case "non-json":
798
+ throw new errors.PaidError({
799
+ statusCode: _response.error.statusCode,
800
+ body: _response.error.rawBody,
801
+ rawResponse: _response.rawResponse,
802
+ });
803
+ case "timeout":
804
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /customers/{customerExternalId}/users/{userExternalId}.");
805
+ case "unknown":
806
+ throw new errors.PaidError({
807
+ message: _response.error.errorMessage,
808
+ rawResponse: _response.rawResponse,
809
+ });
810
+ }
811
+ });
812
+ }
727
813
  _getAuthorizationHeader() {
728
814
  return __awaiter(this, void 0, void 0, function* () {
729
815
  return `Bearer ${yield core.Supplier.get(this._options.token)}`;