@paid-ai/paid-node 1.0.1-alpha2 → 1.0.1-alpha8

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 (683) hide show
  1. package/README.md +4 -5
  2. package/dist/cjs/BaseClient.d.ts +1 -1
  3. package/dist/cjs/Client.d.ts +9 -15
  4. package/dist/cjs/Client.js +17 -27
  5. package/dist/cjs/api/errors/BadRequestError.d.ts +1 -1
  6. package/dist/cjs/api/errors/ForbiddenError.d.ts +1 -1
  7. package/dist/cjs/api/errors/InternalServerError.d.ts +1 -1
  8. package/dist/cjs/api/errors/NotFoundError.d.ts +1 -1
  9. package/dist/cjs/api/resources/contacts/client/Client.d.ts +113 -31
  10. package/dist/cjs/api/resources/contacts/client/Client.js +341 -84
  11. package/dist/cjs/api/resources/contacts/client/requests/CreateContactRequest.d.ts +19 -0
  12. package/dist/cjs/api/resources/contacts/client/requests/DeleteContactByExternalIdRequest.d.ts +9 -0
  13. package/dist/cjs/api/resources/contacts/client/requests/DeleteContactByIdRequest.d.ts +9 -0
  14. package/dist/cjs/api/resources/contacts/client/requests/GetContactByExternalIdRequest.d.ts +9 -0
  15. package/dist/cjs/api/resources/contacts/client/requests/GetContactByIdRequest.d.ts +9 -0
  16. package/dist/cjs/api/resources/contacts/client/requests/ListContactsRequest.d.ts +8 -0
  17. package/dist/cjs/api/resources/contacts/client/requests/UpdateContactByExternalIdRequest.d.ts +12 -0
  18. package/dist/cjs/api/resources/contacts/client/requests/UpdateContactByIdRequest.d.ts +12 -0
  19. package/dist/cjs/api/resources/contacts/client/requests/index.d.ts +8 -1
  20. package/dist/cjs/api/resources/customers/client/Client.d.ts +68 -140
  21. package/dist/cjs/api/resources/customers/client/Client.js +155 -521
  22. package/dist/cjs/api/resources/customers/client/requests/CreateCustomerRequest.d.ts +20 -0
  23. package/dist/cjs/api/resources/customers/client/requests/DeleteCustomerByExternalIdRequest.d.ts +9 -0
  24. package/dist/cjs/api/resources/customers/client/requests/DeleteCustomerByIdRequest.d.ts +9 -0
  25. package/dist/cjs/api/resources/customers/client/requests/GetCustomerByExternalIdRequest.d.ts +9 -0
  26. package/dist/cjs/api/resources/customers/client/requests/GetCustomerByIdRequest.d.ts +9 -0
  27. package/dist/cjs/api/resources/customers/client/requests/ListCustomersRequest.d.ts +8 -0
  28. package/dist/cjs/api/resources/customers/client/requests/UpdateCustomerByExternalIdRequest.d.ts +12 -0
  29. package/dist/cjs/api/resources/customers/client/requests/UpdateCustomerByIdRequest.d.ts +12 -0
  30. package/dist/cjs/api/resources/customers/client/requests/index.d.ts +8 -5
  31. package/dist/cjs/api/resources/customers/index.d.ts +0 -1
  32. package/dist/cjs/api/resources/customers/index.js +0 -1
  33. package/dist/cjs/api/resources/index.d.ts +4 -10
  34. package/dist/cjs/api/resources/index.js +5 -11
  35. package/dist/cjs/api/resources/invoices/client/Client.d.ts +81 -0
  36. package/dist/cjs/api/resources/{usage → invoices}/client/Client.js +170 -77
  37. package/dist/cjs/api/resources/invoices/client/requests/GetInvoiceByIdRequest.d.ts +9 -0
  38. package/dist/cjs/api/resources/invoices/client/requests/GetInvoiceLinesRequest.d.ts +11 -0
  39. package/dist/cjs/api/resources/invoices/client/requests/ListInvoicesRequest.d.ts +8 -0
  40. package/dist/cjs/api/resources/invoices/client/requests/UpdateInvoiceRequest.d.ts +10 -0
  41. package/dist/cjs/api/resources/invoices/client/requests/index.d.ts +4 -0
  42. package/dist/cjs/api/resources/orders/client/Client.d.ts +49 -91
  43. package/dist/cjs/api/resources/orders/client/Client.js +142 -267
  44. package/dist/cjs/api/resources/orders/client/requests/CreateOrderRequest.d.ts +22 -0
  45. package/dist/cjs/api/resources/orders/client/requests/DeleteOrderByIdRequest.d.ts +9 -0
  46. package/dist/cjs/api/resources/orders/client/requests/GetOrderByIdRequest.d.ts +9 -0
  47. package/dist/cjs/api/resources/orders/client/requests/GetOrderLinesRequest.d.ts +11 -0
  48. package/dist/cjs/api/resources/orders/client/requests/ListOrdersRequest.d.ts +8 -0
  49. package/dist/cjs/api/resources/orders/client/requests/UpdateOrderRequest.d.ts +22 -0
  50. package/dist/cjs/api/resources/orders/client/requests/index.d.ts +6 -4
  51. package/dist/cjs/api/resources/orders/index.d.ts +0 -1
  52. package/dist/cjs/api/resources/orders/index.js +0 -1
  53. package/dist/cjs/api/resources/products/client/Client.d.ts +74 -48
  54. package/dist/cjs/api/resources/products/client/Client.js +195 -184
  55. package/dist/cjs/api/resources/products/client/requests/CreateProductRequest.d.ts +14 -0
  56. package/dist/cjs/api/resources/products/client/requests/GetProductByExternalIdRequest.d.ts +9 -0
  57. package/dist/cjs/api/resources/products/client/requests/GetProductByIdRequest.d.ts +9 -0
  58. package/dist/cjs/api/resources/products/client/requests/ListProductsRequest.d.ts +8 -0
  59. package/dist/cjs/api/resources/products/client/requests/UpdateProductByExternalIdRequest.d.ts +12 -0
  60. package/dist/cjs/api/resources/products/client/requests/UpdateProductByIdRequest.d.ts +12 -0
  61. package/dist/cjs/api/resources/products/client/requests/index.d.ts +6 -1
  62. package/dist/cjs/api/resources/signals/client/Client.d.ts +36 -0
  63. package/dist/cjs/api/resources/{traces → signals}/client/Client.js +30 -54
  64. package/dist/cjs/api/resources/signals/client/requests/BulkSignalsRequest.d.ts +15 -0
  65. package/dist/cjs/api/resources/signals/client/requests/index.d.ts +1 -0
  66. package/dist/cjs/api/types/Attribution.d.ts +2 -0
  67. package/dist/cjs/api/types/BulkSignalsResponse.d.ts +5 -0
  68. package/dist/cjs/api/types/Contact.d.ts +10 -15
  69. package/dist/cjs/api/types/ContactBillingAddress.d.ts +7 -0
  70. package/dist/cjs/api/types/ContactListResponse.d.ts +5 -0
  71. package/dist/cjs/api/types/Customer.d.ts +13 -12
  72. package/dist/cjs/api/types/CustomerAttribution.d.ts +2 -0
  73. package/dist/cjs/api/types/CustomerBillingAddress.d.ts +8 -0
  74. package/dist/cjs/api/types/CustomerByExternalId.d.ts +4 -0
  75. package/dist/cjs/api/types/CustomerById.d.ts +4 -0
  76. package/dist/cjs/api/types/CustomerCreationState.d.ts +5 -0
  77. package/dist/cjs/api/types/CustomerCreationState.js +8 -0
  78. package/dist/cjs/api/types/CustomerListResponse.d.ts +5 -0
  79. package/dist/cjs/api/types/EmptyResponse.d.ts +1 -0
  80. package/dist/cjs/api/types/ErrorResponse.d.ts +5 -0
  81. package/dist/cjs/api/types/Invoice.d.ts +57 -32
  82. package/dist/cjs/api/types/Invoice.js +23 -3
  83. package/dist/cjs/api/types/InvoiceLine.d.ts +30 -0
  84. package/dist/cjs/api/types/InvoiceLine.js +14 -0
  85. package/dist/cjs/api/types/InvoiceLinesResponse.d.ts +5 -0
  86. package/dist/cjs/api/types/InvoiceListResponse.d.ts +5 -0
  87. package/dist/cjs/api/types/Order.d.ts +24 -16
  88. package/dist/cjs/api/types/OrderCreationState.d.ts +5 -0
  89. package/dist/cjs/api/types/{CreationState.js → OrderCreationState.js} +3 -3
  90. package/dist/cjs/api/types/OrderLine.d.ts +6 -15
  91. package/dist/cjs/api/types/OrderLinesResponse.d.ts +5 -0
  92. package/dist/cjs/api/types/OrderListResponse.d.ts +5 -0
  93. package/dist/cjs/api/types/Pagination.d.ts +6 -0
  94. package/dist/cjs/api/types/Product.d.ts +7 -26
  95. package/dist/cjs/api/types/Product.js +0 -10
  96. package/dist/cjs/api/types/ProductByExternalId.d.ts +4 -0
  97. package/dist/cjs/api/types/ProductById.d.ts +4 -0
  98. package/dist/cjs/api/types/ProductListResponse.d.ts +5 -0
  99. package/dist/cjs/api/types/Signal.d.ts +5 -16
  100. package/dist/cjs/api/types/UpdateContactRequest.d.ts +10 -0
  101. package/dist/cjs/api/types/UpdateCustomerRequest.d.ts +14 -0
  102. package/dist/cjs/api/types/UpdateProductRequest.d.ts +8 -0
  103. package/dist/cjs/api/types/index.d.ts +25 -44
  104. package/dist/cjs/api/types/index.js +25 -44
  105. package/dist/cjs/environments.d.ts +2 -2
  106. package/dist/cjs/environments.js +1 -1
  107. package/dist/cjs/tracing/aiSdkSpanProcessor.d.ts +17 -0
  108. package/dist/cjs/tracing/aiSdkSpanProcessor.js +101 -0
  109. package/dist/cjs/tracing/autoInstrumentation.d.ts +1 -3
  110. package/dist/cjs/tracing/autoInstrumentation.js +99 -41
  111. package/dist/cjs/tracing/index.d.ts +2 -1
  112. package/dist/cjs/tracing/index.js +3 -1
  113. package/dist/cjs/tracing/signal.js +1 -4
  114. package/dist/cjs/tracing/spanProcessor.js +12 -0
  115. package/dist/cjs/tracing/tracing.js +10 -11
  116. package/dist/cjs/tracing/wrappers/anthropicWrapper.js +2 -2
  117. package/dist/cjs/tracing/wrappers/openAiWrapper.js +2 -2
  118. package/dist/cjs/tracing/wrappers/vercelAIWrapper.js +2 -2
  119. package/dist/cjs/version.d.ts +1 -1
  120. package/dist/cjs/version.js +1 -1
  121. package/dist/esm/BaseClient.d.mts +1 -1
  122. package/dist/esm/Client.d.mts +9 -15
  123. package/dist/esm/Client.mjs +13 -23
  124. package/dist/esm/api/errors/BadRequestError.d.mts +1 -1
  125. package/dist/esm/api/errors/ForbiddenError.d.mts +1 -1
  126. package/dist/esm/api/errors/InternalServerError.d.mts +1 -1
  127. package/dist/esm/api/errors/NotFoundError.d.mts +1 -1
  128. package/dist/esm/api/resources/contacts/client/Client.d.mts +113 -31
  129. package/dist/esm/api/resources/contacts/client/Client.mjs +341 -84
  130. package/dist/esm/api/resources/contacts/client/requests/CreateContactRequest.d.mts +19 -0
  131. package/dist/esm/api/resources/contacts/client/requests/DeleteContactByExternalIdRequest.d.mts +9 -0
  132. package/dist/esm/api/resources/contacts/client/requests/DeleteContactByIdRequest.d.mts +9 -0
  133. package/dist/esm/api/resources/contacts/client/requests/GetContactByExternalIdRequest.d.mts +9 -0
  134. package/dist/esm/api/resources/contacts/client/requests/GetContactByIdRequest.d.mts +9 -0
  135. package/dist/esm/api/resources/contacts/client/requests/ListContactsRequest.d.mts +8 -0
  136. package/dist/esm/api/resources/contacts/client/requests/UpdateContactByExternalIdRequest.d.mts +12 -0
  137. package/dist/esm/api/resources/contacts/client/requests/UpdateContactByIdRequest.d.mts +12 -0
  138. package/dist/esm/api/resources/contacts/client/requests/index.d.mts +8 -1
  139. package/dist/esm/api/resources/customers/client/Client.d.mts +68 -140
  140. package/dist/esm/api/resources/customers/client/Client.mjs +155 -521
  141. package/dist/esm/api/resources/customers/client/requests/CreateCustomerRequest.d.mts +20 -0
  142. package/dist/esm/api/resources/customers/client/requests/DeleteCustomerByExternalIdRequest.d.mts +9 -0
  143. package/dist/esm/api/resources/customers/client/requests/DeleteCustomerByIdRequest.d.mts +9 -0
  144. package/dist/esm/api/resources/customers/client/requests/GetCustomerByExternalIdRequest.d.mts +9 -0
  145. package/dist/esm/api/resources/customers/client/requests/GetCustomerByIdRequest.d.mts +9 -0
  146. package/dist/esm/api/resources/customers/client/requests/ListCustomersRequest.d.mts +8 -0
  147. package/dist/esm/api/resources/customers/client/requests/UpdateCustomerByExternalIdRequest.d.mts +12 -0
  148. package/dist/esm/api/resources/customers/client/requests/UpdateCustomerByIdRequest.d.mts +12 -0
  149. package/dist/esm/api/resources/customers/client/requests/index.d.mts +8 -5
  150. package/dist/esm/api/resources/customers/index.d.mts +0 -1
  151. package/dist/esm/api/resources/customers/index.mjs +0 -1
  152. package/dist/esm/api/resources/index.d.mts +4 -10
  153. package/dist/esm/api/resources/index.mjs +4 -10
  154. package/dist/esm/api/resources/invoices/client/Client.d.mts +81 -0
  155. package/dist/esm/api/resources/{usage → invoices}/client/Client.mjs +168 -75
  156. package/dist/esm/api/resources/invoices/client/requests/GetInvoiceByIdRequest.d.mts +9 -0
  157. package/dist/esm/api/resources/invoices/client/requests/GetInvoiceLinesRequest.d.mts +11 -0
  158. package/dist/esm/api/resources/invoices/client/requests/ListInvoicesRequest.d.mts +8 -0
  159. package/dist/esm/api/resources/invoices/client/requests/UpdateInvoiceRequest.d.mts +10 -0
  160. package/dist/esm/api/resources/invoices/client/requests/index.d.mts +4 -0
  161. package/dist/esm/api/resources/orders/client/Client.d.mts +49 -91
  162. package/dist/esm/api/resources/orders/client/Client.mjs +142 -267
  163. package/dist/esm/api/resources/orders/client/requests/CreateOrderRequest.d.mts +22 -0
  164. package/dist/esm/api/resources/orders/client/requests/DeleteOrderByIdRequest.d.mts +9 -0
  165. package/dist/esm/api/resources/orders/client/requests/GetOrderByIdRequest.d.mts +9 -0
  166. package/dist/esm/api/resources/orders/client/requests/GetOrderLinesRequest.d.mts +11 -0
  167. package/dist/esm/api/resources/orders/client/requests/ListOrdersRequest.d.mts +8 -0
  168. package/dist/esm/api/resources/orders/client/requests/UpdateOrderRequest.d.mts +22 -0
  169. package/dist/esm/api/resources/orders/client/requests/index.d.mts +6 -4
  170. package/dist/esm/api/resources/orders/index.d.mts +0 -1
  171. package/dist/esm/api/resources/orders/index.mjs +0 -1
  172. package/dist/esm/api/resources/products/client/Client.d.mts +74 -48
  173. package/dist/esm/api/resources/products/client/Client.mjs +195 -184
  174. package/dist/esm/api/resources/products/client/requests/CreateProductRequest.d.mts +14 -0
  175. package/dist/esm/api/resources/products/client/requests/GetProductByExternalIdRequest.d.mts +9 -0
  176. package/dist/esm/api/resources/products/client/requests/GetProductByIdRequest.d.mts +9 -0
  177. package/dist/esm/api/resources/products/client/requests/ListProductsRequest.d.mts +8 -0
  178. package/dist/esm/api/resources/products/client/requests/UpdateProductByExternalIdRequest.d.mts +12 -0
  179. package/dist/esm/api/resources/products/client/requests/UpdateProductByIdRequest.d.mts +12 -0
  180. package/dist/esm/api/resources/products/client/requests/index.d.mts +6 -1
  181. package/dist/esm/api/resources/signals/client/Client.d.mts +36 -0
  182. package/dist/esm/api/resources/{traces → signals}/client/Client.mjs +28 -52
  183. package/dist/esm/api/resources/signals/client/requests/BulkSignalsRequest.d.mts +15 -0
  184. package/dist/esm/api/resources/signals/client/requests/index.d.mts +1 -0
  185. package/dist/esm/api/types/Attribution.d.mts +2 -0
  186. package/dist/esm/api/types/BulkSignalsResponse.d.mts +5 -0
  187. package/dist/esm/api/types/Contact.d.mts +10 -15
  188. package/dist/esm/api/types/ContactBillingAddress.d.mts +7 -0
  189. package/dist/esm/api/types/ContactListResponse.d.mts +5 -0
  190. package/dist/esm/api/types/Customer.d.mts +13 -12
  191. package/dist/esm/api/types/CustomerAttribution.d.mts +2 -0
  192. package/dist/esm/api/types/CustomerBillingAddress.d.mts +8 -0
  193. package/dist/esm/api/types/CustomerByExternalId.d.mts +4 -0
  194. package/dist/esm/api/types/CustomerById.d.mts +4 -0
  195. package/dist/esm/api/types/CustomerCreationState.d.mts +5 -0
  196. package/dist/esm/api/types/CustomerCreationState.mjs +5 -0
  197. package/dist/esm/api/types/CustomerListResponse.d.mts +5 -0
  198. package/dist/esm/api/types/EmptyResponse.d.mts +1 -0
  199. package/dist/esm/api/types/ErrorResponse.d.mts +5 -0
  200. package/dist/esm/api/types/Invoice.d.mts +57 -32
  201. package/dist/esm/api/types/Invoice.mjs +23 -3
  202. package/dist/esm/api/types/InvoiceLine.d.mts +30 -0
  203. package/dist/esm/api/types/InvoiceLine.mjs +11 -0
  204. package/dist/esm/api/types/InvoiceLinesResponse.d.mts +5 -0
  205. package/dist/esm/api/types/InvoiceListResponse.d.mts +5 -0
  206. package/dist/esm/api/types/Order.d.mts +24 -16
  207. package/dist/esm/api/types/OrderCreationState.d.mts +5 -0
  208. package/dist/esm/api/types/{CreationState.mjs → OrderCreationState.mjs} +2 -2
  209. package/dist/esm/api/types/OrderLine.d.mts +6 -15
  210. package/dist/esm/api/types/OrderLinesResponse.d.mts +5 -0
  211. package/dist/esm/api/types/OrderListResponse.d.mts +5 -0
  212. package/dist/esm/api/types/Pagination.d.mts +6 -0
  213. package/dist/esm/api/types/Product.d.mts +7 -26
  214. package/dist/esm/api/types/Product.mjs +1 -9
  215. package/dist/esm/api/types/ProductByExternalId.d.mts +4 -0
  216. package/dist/esm/api/types/ProductById.d.mts +4 -0
  217. package/dist/esm/api/types/ProductListResponse.d.mts +5 -0
  218. package/dist/esm/api/types/Signal.d.mts +5 -16
  219. package/dist/esm/api/types/UpdateContactRequest.d.mts +10 -0
  220. package/dist/esm/api/types/UpdateCustomerRequest.d.mts +14 -0
  221. package/dist/esm/api/types/UpdateProductRequest.d.mts +8 -0
  222. package/dist/esm/api/types/index.d.mts +25 -44
  223. package/dist/esm/api/types/index.mjs +25 -44
  224. package/dist/esm/environments.d.mts +2 -2
  225. package/dist/esm/environments.mjs +1 -1
  226. package/dist/esm/tracing/aiSdkSpanProcessor.d.mts +17 -0
  227. package/dist/esm/tracing/aiSdkSpanProcessor.mjs +97 -0
  228. package/dist/esm/tracing/autoInstrumentation.d.mts +1 -3
  229. package/dist/esm/tracing/autoInstrumentation.mjs +66 -41
  230. package/dist/esm/tracing/index.d.mts +2 -1
  231. package/dist/esm/tracing/index.mjs +2 -1
  232. package/dist/esm/tracing/signal.mjs +1 -4
  233. package/dist/esm/tracing/spanProcessor.mjs +12 -0
  234. package/dist/esm/tracing/tracing.mjs +10 -11
  235. package/dist/esm/tracing/wrappers/anthropicWrapper.mjs +2 -2
  236. package/dist/esm/tracing/wrappers/openAiWrapper.mjs +2 -2
  237. package/dist/esm/tracing/wrappers/vercelAIWrapper.mjs +2 -2
  238. package/dist/esm/version.d.mts +1 -1
  239. package/dist/esm/version.mjs +1 -1
  240. package/package.json +5 -74
  241. package/reference.md +410 -1671
  242. package/dist/cjs/api/resources/agents/client/Client.d.ts +0 -154
  243. package/dist/cjs/api/resources/agents/client/Client.js +0 -542
  244. package/dist/cjs/api/resources/agents/client/requests/AgentCreate.d.ts +0 -15
  245. package/dist/cjs/api/resources/agents/client/requests/index.d.ts +0 -1
  246. package/dist/cjs/api/resources/contacts/client/requests/ContactCreate.d.ts +0 -26
  247. package/dist/cjs/api/resources/customers/client/requests/CustomerCreate.d.ts +0 -36
  248. package/dist/cjs/api/resources/customers/client/requests/CustomersCheckEntitlementRequest.d.ts +0 -14
  249. package/dist/cjs/api/resources/customers/client/requests/CustomersCreatePaymentMethodRequest.d.ts +0 -18
  250. package/dist/cjs/api/resources/customers/client/requests/CustomersGetCostsByExternalIdRequest.d.ts +0 -19
  251. package/dist/cjs/api/resources/customers/client/requests/CustomersGetUsageByExternalIdRequest.d.ts +0 -19
  252. package/dist/cjs/api/resources/customers/types/CustomersCheckEntitlementRequestView.d.ts +0 -5
  253. package/dist/cjs/api/resources/customers/types/CustomersCheckEntitlementRequestView.js +0 -8
  254. package/dist/cjs/api/resources/customers/types/CustomersCheckEntitlementResponse.d.ts +0 -4
  255. package/dist/cjs/api/resources/customers/types/index.d.ts +0 -2
  256. package/dist/cjs/api/resources/customers/types/index.js +0 -18
  257. package/dist/cjs/api/resources/orders/client/requests/CancelRenewalRequest.d.ts +0 -13
  258. package/dist/cjs/api/resources/orders/client/requests/OrderCreate.d.ts +0 -35
  259. package/dist/cjs/api/resources/orders/client/requests/OrdersActivateAndPayRequest.d.ts +0 -13
  260. package/dist/cjs/api/resources/orders/client/requests/ProrationUpgradeRequest.d.ts +0 -24
  261. package/dist/cjs/api/resources/orders/resources/index.d.ts +0 -2
  262. package/dist/cjs/api/resources/orders/resources/index.js +0 -41
  263. package/dist/cjs/api/resources/orders/resources/lines/client/Client.d.ts +0 -32
  264. package/dist/cjs/api/resources/orders/resources/lines/client/Client.js +0 -127
  265. package/dist/cjs/api/resources/orders/resources/lines/client/requests/LinesUpdateRequest.d.ts +0 -16
  266. package/dist/cjs/api/resources/orders/resources/lines/client/requests/index.d.ts +0 -1
  267. package/dist/cjs/api/resources/plans/client/Client.d.ts +0 -128
  268. package/dist/cjs/api/resources/plans/client/Client.js +0 -551
  269. package/dist/cjs/api/resources/plans/client/index.d.ts +0 -1
  270. package/dist/cjs/api/resources/plans/client/index.js +0 -17
  271. package/dist/cjs/api/resources/plans/client/requests/PlansGetUsageRequest.d.ts +0 -22
  272. package/dist/cjs/api/resources/plans/client/requests/PlansSubscribeRequest.d.ts +0 -13
  273. package/dist/cjs/api/resources/plans/client/requests/PlansUnsubscribeRequest.d.ts +0 -10
  274. package/dist/cjs/api/resources/plans/client/requests/PlansUpgradeRequest.d.ts +0 -16
  275. package/dist/cjs/api/resources/plans/client/requests/index.d.ts +0 -4
  276. package/dist/cjs/api/resources/plans/client/requests/index.js +0 -2
  277. package/dist/cjs/api/resources/plans/index.d.ts +0 -1
  278. package/dist/cjs/api/resources/plans/index.js +0 -17
  279. package/dist/cjs/api/resources/products/client/requests/ProductCreate.d.ts +0 -26
  280. package/dist/cjs/api/resources/products/client/requests/ProductCreate.js +0 -12
  281. package/dist/cjs/api/resources/traces/client/Client.d.ts +0 -35
  282. package/dist/cjs/api/resources/traces/client/index.d.ts +0 -1
  283. package/dist/cjs/api/resources/traces/client/index.js +0 -17
  284. package/dist/cjs/api/resources/traces/client/requests/GetTracesRequest.d.ts +0 -31
  285. package/dist/cjs/api/resources/traces/client/requests/index.d.ts +0 -1
  286. package/dist/cjs/api/resources/traces/client/requests/index.js +0 -2
  287. package/dist/cjs/api/resources/traces/index.d.ts +0 -1
  288. package/dist/cjs/api/resources/traces/index.js +0 -17
  289. package/dist/cjs/api/resources/usage/client/Client.d.ts +0 -72
  290. package/dist/cjs/api/resources/usage/client/index.d.ts +0 -1
  291. package/dist/cjs/api/resources/usage/client/index.js +0 -17
  292. package/dist/cjs/api/resources/usage/client/requests/UsageCheckUsageRequest.d.ts +0 -25
  293. package/dist/cjs/api/resources/usage/client/requests/UsageRecordBulkRequest.d.ts +0 -10
  294. package/dist/cjs/api/resources/usage/client/requests/UsageRecordBulkV2Request.d.ts +0 -26
  295. package/dist/cjs/api/resources/usage/client/requests/index.d.ts +0 -3
  296. package/dist/cjs/api/resources/usage/client/requests/index.js +0 -2
  297. package/dist/cjs/api/resources/usage/index.d.ts +0 -2
  298. package/dist/cjs/api/resources/usage/index.js +0 -18
  299. package/dist/cjs/api/resources/usage/types/UsageCheckUsageResponse.d.ts +0 -14
  300. package/dist/cjs/api/resources/usage/types/index.d.ts +0 -1
  301. package/dist/cjs/api/resources/usage/types/index.js +0 -17
  302. package/dist/cjs/api/types/Address.d.ts +0 -8
  303. package/dist/cjs/api/types/Agent.d.ts +0 -11
  304. package/dist/cjs/api/types/AgentAttribute.d.ts +0 -6
  305. package/dist/cjs/api/types/AgentPricePoint.d.ts +0 -7
  306. package/dist/cjs/api/types/AgentPricePointTiers.d.ts +0 -5
  307. package/dist/cjs/api/types/AgentUpdate.d.ts +0 -9
  308. package/dist/cjs/api/types/ApiError.d.ts +0 -9
  309. package/dist/cjs/api/types/BillingFrequency.d.ts +0 -6
  310. package/dist/cjs/api/types/BillingFrequency.js +0 -9
  311. package/dist/cjs/api/types/CancelRenewalResponse.d.ts +0 -15
  312. package/dist/cjs/api/types/ChargeType.d.ts +0 -7
  313. package/dist/cjs/api/types/ChargeType.js +0 -10
  314. package/dist/cjs/api/types/ContactCreateForCustomer.d.ts +0 -15
  315. package/dist/cjs/api/types/CostAmount.d.ts +0 -9
  316. package/dist/cjs/api/types/CostTrace.d.ts +0 -19
  317. package/dist/cjs/api/types/CostTracesResponse.d.ts +0 -8
  318. package/dist/cjs/api/types/CreationSource.d.ts +0 -7
  319. package/dist/cjs/api/types/CreationSource.js +0 -10
  320. package/dist/cjs/api/types/CreationState.d.ts +0 -5
  321. package/dist/cjs/api/types/CustomerUpdate.d.ts +0 -14
  322. package/dist/cjs/api/types/EntitlementUsage.d.ts +0 -20
  323. package/dist/cjs/api/types/Error_.d.ts +0 -7
  324. package/dist/cjs/api/types/OrderLineAttribute.d.ts +0 -7
  325. package/dist/cjs/api/types/OrderLineAttributeCreateOne.d.ts +0 -1
  326. package/dist/cjs/api/types/OrderLineAttributePricing.d.ts +0 -8
  327. package/dist/cjs/api/types/OrderLineCreate.d.ts +0 -19
  328. package/dist/cjs/api/types/PaginationMeta.d.ts +0 -25
  329. package/dist/cjs/api/types/PaymentMethod.d.ts +0 -54
  330. package/dist/cjs/api/types/PaymentMethod.js +0 -20
  331. package/dist/cjs/api/types/Plan.d.ts +0 -91
  332. package/dist/cjs/api/types/Plan.js +0 -22
  333. package/dist/cjs/api/types/PlanGroup.d.ts +0 -20
  334. package/dist/cjs/api/types/PlanWithFeatures.d.ts +0 -67
  335. package/dist/cjs/api/types/PlanWithFeatures.js +0 -22
  336. package/dist/cjs/api/types/PricePoint.d.ts +0 -7
  337. package/dist/cjs/api/types/Pricing.d.ts +0 -10
  338. package/dist/cjs/api/types/PricingModelType.d.ts +0 -7
  339. package/dist/cjs/api/types/PricingModelType.js +0 -10
  340. package/dist/cjs/api/types/ProductUpdate.d.ts +0 -20
  341. package/dist/cjs/api/types/ProductUpdate.js +0 -12
  342. package/dist/cjs/api/types/ProrationAttributeUpdate.d.ts +0 -11
  343. package/dist/cjs/api/types/ProrationDetail.d.ts +0 -16
  344. package/dist/cjs/api/types/ProrationUpgradeResponse.d.ts +0 -22
  345. package/dist/cjs/api/types/Salutation.d.ts +0 -9
  346. package/dist/cjs/api/types/Salutation.js +0 -12
  347. package/dist/cjs/api/types/SignalV2.d.ts +0 -19
  348. package/dist/cjs/api/types/TaxExemptStatus.d.ts +0 -6
  349. package/dist/cjs/api/types/TaxExemptStatus.js +0 -9
  350. package/dist/cjs/api/types/Tier.d.ts +0 -5
  351. package/dist/cjs/api/types/Trace.d.ts +0 -23
  352. package/dist/cjs/api/types/TracesResponse.d.ts +0 -8
  353. package/dist/cjs/api/types/UsagePaginationMeta.d.ts +0 -13
  354. package/dist/cjs/api/types/UsageSummariesResponse.d.ts +0 -8
  355. package/dist/cjs/api/types/UsageSummary.d.ts +0 -55
  356. package/dist/cjs/integrations/adapters/expressjs/base-adapter.d.ts +0 -20
  357. package/dist/cjs/integrations/adapters/expressjs/base-adapter.js +0 -66
  358. package/dist/cjs/integrations/adapters/expressjs/index.d.ts +0 -6
  359. package/dist/cjs/integrations/adapters/expressjs/index.js +0 -21
  360. package/dist/cjs/integrations/adapters/expressjs/routes.d.ts +0 -180
  361. package/dist/cjs/integrations/adapters/expressjs/routes.js +0 -306
  362. package/dist/cjs/integrations/adapters/nestjs/index.d.ts +0 -7
  363. package/dist/cjs/integrations/adapters/nestjs/index.js +0 -23
  364. package/dist/cjs/integrations/adapters/nextjs/base-adapter.d.ts +0 -11
  365. package/dist/cjs/integrations/adapters/nextjs/base-adapter.js +0 -58
  366. package/dist/cjs/integrations/adapters/nextjs/index.d.ts +0 -5
  367. package/dist/cjs/integrations/adapters/nextjs/index.js +0 -22
  368. package/dist/cjs/integrations/adapters/nextjs/routes.d.ts +0 -302
  369. package/dist/cjs/integrations/adapters/nextjs/routes.js +0 -356
  370. package/dist/cjs/integrations/client.d.ts +0 -49
  371. package/dist/cjs/integrations/client.js +0 -93
  372. package/dist/cjs/integrations/controllers/billing.d.ts +0 -182
  373. package/dist/cjs/integrations/controllers/billing.js +0 -267
  374. package/dist/cjs/integrations/controllers/contacts.d.ts +0 -66
  375. package/dist/cjs/integrations/controllers/contacts.js +0 -145
  376. package/dist/cjs/integrations/controllers/customers.d.ts +0 -96
  377. package/dist/cjs/integrations/controllers/customers.js +0 -206
  378. package/dist/cjs/integrations/controllers/index.d.ts +0 -7
  379. package/dist/cjs/integrations/controllers/index.js +0 -42
  380. package/dist/cjs/integrations/controllers/invoices.d.ts +0 -36
  381. package/dist/cjs/integrations/controllers/invoices.js +0 -72
  382. package/dist/cjs/integrations/controllers/orders.d.ts +0 -68
  383. package/dist/cjs/integrations/controllers/orders.js +0 -229
  384. package/dist/cjs/integrations/controllers/plans.d.ts +0 -208
  385. package/dist/cjs/integrations/controllers/plans.js +0 -365
  386. package/dist/cjs/integrations/controllers/provision-users.d.ts +0 -62
  387. package/dist/cjs/integrations/controllers/provision-users.js +0 -130
  388. package/dist/cjs/integrations/index.d.ts +0 -29
  389. package/dist/cjs/integrations/index.js +0 -44
  390. package/dist/cjs/integrations/types.d.ts +0 -122
  391. package/dist/cjs/integrations/types.js +0 -2
  392. package/dist/cjs/integrations/utils/api-fetch.d.ts +0 -18
  393. package/dist/cjs/integrations/utils/api-fetch.js +0 -53
  394. package/dist/cjs/integrations/utils/base-handler.d.ts +0 -79
  395. package/dist/cjs/integrations/utils/base-handler.js +0 -168
  396. package/dist/cjs/integrations/utils/create-adapter.d.ts +0 -30
  397. package/dist/cjs/integrations/utils/create-adapter.js +0 -57
  398. package/dist/esm/api/resources/agents/client/Client.d.mts +0 -154
  399. package/dist/esm/api/resources/agents/client/Client.mjs +0 -505
  400. package/dist/esm/api/resources/agents/client/requests/AgentCreate.d.mts +0 -15
  401. package/dist/esm/api/resources/agents/client/requests/index.d.mts +0 -1
  402. package/dist/esm/api/resources/contacts/client/requests/ContactCreate.d.mts +0 -26
  403. package/dist/esm/api/resources/customers/client/requests/CustomerCreate.d.mts +0 -36
  404. package/dist/esm/api/resources/customers/client/requests/CustomersCheckEntitlementRequest.d.mts +0 -14
  405. package/dist/esm/api/resources/customers/client/requests/CustomersCreatePaymentMethodRequest.d.mts +0 -18
  406. package/dist/esm/api/resources/customers/client/requests/CustomersGetCostsByExternalIdRequest.d.mts +0 -19
  407. package/dist/esm/api/resources/customers/client/requests/CustomersGetUsageByExternalIdRequest.d.mts +0 -19
  408. package/dist/esm/api/resources/customers/types/CustomersCheckEntitlementRequestView.d.mts +0 -5
  409. package/dist/esm/api/resources/customers/types/CustomersCheckEntitlementRequestView.mjs +0 -5
  410. package/dist/esm/api/resources/customers/types/CustomersCheckEntitlementResponse.d.mts +0 -4
  411. package/dist/esm/api/resources/customers/types/index.d.mts +0 -2
  412. package/dist/esm/api/resources/customers/types/index.mjs +0 -2
  413. package/dist/esm/api/resources/orders/client/requests/CancelRenewalRequest.d.mts +0 -13
  414. package/dist/esm/api/resources/orders/client/requests/OrderCreate.d.mts +0 -35
  415. package/dist/esm/api/resources/orders/client/requests/OrdersActivateAndPayRequest.d.mts +0 -13
  416. package/dist/esm/api/resources/orders/client/requests/ProrationUpgradeRequest.d.mts +0 -24
  417. package/dist/esm/api/resources/orders/resources/index.d.mts +0 -2
  418. package/dist/esm/api/resources/orders/resources/index.mjs +0 -2
  419. package/dist/esm/api/resources/orders/resources/lines/client/Client.d.mts +0 -32
  420. package/dist/esm/api/resources/orders/resources/lines/client/Client.mjs +0 -90
  421. package/dist/esm/api/resources/orders/resources/lines/client/requests/LinesUpdateRequest.d.mts +0 -16
  422. package/dist/esm/api/resources/orders/resources/lines/client/requests/index.d.mts +0 -1
  423. package/dist/esm/api/resources/plans/client/Client.d.mts +0 -128
  424. package/dist/esm/api/resources/plans/client/Client.mjs +0 -514
  425. package/dist/esm/api/resources/plans/client/index.d.mts +0 -1
  426. package/dist/esm/api/resources/plans/client/index.mjs +0 -1
  427. package/dist/esm/api/resources/plans/client/requests/PlansGetUsageRequest.d.mts +0 -22
  428. package/dist/esm/api/resources/plans/client/requests/PlansSubscribeRequest.d.mts +0 -13
  429. package/dist/esm/api/resources/plans/client/requests/PlansUnsubscribeRequest.d.mts +0 -10
  430. package/dist/esm/api/resources/plans/client/requests/PlansUpgradeRequest.d.mts +0 -16
  431. package/dist/esm/api/resources/plans/client/requests/index.d.mts +0 -4
  432. package/dist/esm/api/resources/plans/client/requests/index.mjs +0 -1
  433. package/dist/esm/api/resources/plans/index.d.mts +0 -1
  434. package/dist/esm/api/resources/plans/index.mjs +0 -1
  435. package/dist/esm/api/resources/products/client/requests/ProductCreate.d.mts +0 -26
  436. package/dist/esm/api/resources/products/client/requests/ProductCreate.mjs +0 -9
  437. package/dist/esm/api/resources/traces/client/Client.d.mts +0 -35
  438. package/dist/esm/api/resources/traces/client/index.d.mts +0 -1
  439. package/dist/esm/api/resources/traces/client/index.mjs +0 -1
  440. package/dist/esm/api/resources/traces/client/requests/GetTracesRequest.d.mts +0 -31
  441. package/dist/esm/api/resources/traces/client/requests/index.d.mts +0 -1
  442. package/dist/esm/api/resources/traces/client/requests/index.mjs +0 -1
  443. package/dist/esm/api/resources/traces/index.d.mts +0 -1
  444. package/dist/esm/api/resources/traces/index.mjs +0 -1
  445. package/dist/esm/api/resources/usage/client/Client.d.mts +0 -72
  446. package/dist/esm/api/resources/usage/client/index.d.mts +0 -1
  447. package/dist/esm/api/resources/usage/client/index.mjs +0 -1
  448. package/dist/esm/api/resources/usage/client/requests/UsageCheckUsageRequest.d.mts +0 -25
  449. package/dist/esm/api/resources/usage/client/requests/UsageRecordBulkRequest.d.mts +0 -10
  450. package/dist/esm/api/resources/usage/client/requests/UsageRecordBulkV2Request.d.mts +0 -26
  451. package/dist/esm/api/resources/usage/client/requests/index.d.mts +0 -3
  452. package/dist/esm/api/resources/usage/client/requests/index.mjs +0 -1
  453. package/dist/esm/api/resources/usage/index.d.mts +0 -2
  454. package/dist/esm/api/resources/usage/index.mjs +0 -2
  455. package/dist/esm/api/resources/usage/types/UsageCheckUsageResponse.d.mts +0 -14
  456. package/dist/esm/api/resources/usage/types/index.d.mts +0 -1
  457. package/dist/esm/api/resources/usage/types/index.mjs +0 -1
  458. package/dist/esm/api/types/Address.d.mts +0 -8
  459. package/dist/esm/api/types/Agent.d.mts +0 -11
  460. package/dist/esm/api/types/AgentAttribute.d.mts +0 -6
  461. package/dist/esm/api/types/AgentPricePoint.d.mts +0 -7
  462. package/dist/esm/api/types/AgentPricePointTiers.d.mts +0 -5
  463. package/dist/esm/api/types/AgentUpdate.d.mts +0 -9
  464. package/dist/esm/api/types/ApiError.d.mts +0 -9
  465. package/dist/esm/api/types/BillingFrequency.d.mts +0 -6
  466. package/dist/esm/api/types/BillingFrequency.mjs +0 -6
  467. package/dist/esm/api/types/CancelRenewalResponse.d.mts +0 -15
  468. package/dist/esm/api/types/ChargeType.d.mts +0 -7
  469. package/dist/esm/api/types/ChargeType.mjs +0 -7
  470. package/dist/esm/api/types/ContactCreateForCustomer.d.mts +0 -15
  471. package/dist/esm/api/types/CostAmount.d.mts +0 -9
  472. package/dist/esm/api/types/CostTrace.d.mts +0 -19
  473. package/dist/esm/api/types/CostTracesResponse.d.mts +0 -8
  474. package/dist/esm/api/types/CreationSource.d.mts +0 -7
  475. package/dist/esm/api/types/CreationSource.mjs +0 -7
  476. package/dist/esm/api/types/CreationState.d.mts +0 -5
  477. package/dist/esm/api/types/CustomerUpdate.d.mts +0 -14
  478. package/dist/esm/api/types/EntitlementUsage.d.mts +0 -20
  479. package/dist/esm/api/types/Error_.d.mts +0 -7
  480. package/dist/esm/api/types/OrderLineAttribute.d.mts +0 -7
  481. package/dist/esm/api/types/OrderLineAttributeCreateOne.d.mts +0 -1
  482. package/dist/esm/api/types/OrderLineAttributePricing.d.mts +0 -8
  483. package/dist/esm/api/types/OrderLineCreate.d.mts +0 -19
  484. package/dist/esm/api/types/PaginationMeta.d.mts +0 -25
  485. package/dist/esm/api/types/PaymentMethod.d.mts +0 -54
  486. package/dist/esm/api/types/PaymentMethod.mjs +0 -17
  487. package/dist/esm/api/types/Plan.d.mts +0 -91
  488. package/dist/esm/api/types/Plan.mjs +0 -19
  489. package/dist/esm/api/types/PlanGroup.d.mts +0 -20
  490. package/dist/esm/api/types/PlanWithFeatures.d.mts +0 -67
  491. package/dist/esm/api/types/PlanWithFeatures.mjs +0 -19
  492. package/dist/esm/api/types/PricePoint.d.mts +0 -7
  493. package/dist/esm/api/types/Pricing.d.mts +0 -10
  494. package/dist/esm/api/types/PricingModelType.d.mts +0 -7
  495. package/dist/esm/api/types/PricingModelType.mjs +0 -7
  496. package/dist/esm/api/types/ProductUpdate.d.mts +0 -20
  497. package/dist/esm/api/types/ProductUpdate.mjs +0 -9
  498. package/dist/esm/api/types/ProrationAttributeUpdate.d.mts +0 -11
  499. package/dist/esm/api/types/ProrationDetail.d.mts +0 -16
  500. package/dist/esm/api/types/ProrationUpgradeResponse.d.mts +0 -22
  501. package/dist/esm/api/types/Salutation.d.mts +0 -9
  502. package/dist/esm/api/types/Salutation.mjs +0 -9
  503. package/dist/esm/api/types/SignalV2.d.mts +0 -19
  504. package/dist/esm/api/types/TaxExemptStatus.d.mts +0 -6
  505. package/dist/esm/api/types/TaxExemptStatus.mjs +0 -6
  506. package/dist/esm/api/types/Tier.d.mts +0 -5
  507. package/dist/esm/api/types/Trace.d.mts +0 -23
  508. package/dist/esm/api/types/TracesResponse.d.mts +0 -8
  509. package/dist/esm/api/types/UsagePaginationMeta.d.mts +0 -13
  510. package/dist/esm/api/types/UsageSummariesResponse.d.mts +0 -8
  511. package/dist/esm/api/types/UsageSummary.d.mts +0 -55
  512. package/dist/esm/integrations/adapters/expressjs/base-adapter.d.mts +0 -20
  513. package/dist/esm/integrations/adapters/expressjs/base-adapter.mjs +0 -62
  514. package/dist/esm/integrations/adapters/expressjs/index.d.mts +0 -6
  515. package/dist/esm/integrations/adapters/expressjs/index.mjs +0 -6
  516. package/dist/esm/integrations/adapters/expressjs/routes.d.mts +0 -180
  517. package/dist/esm/integrations/adapters/expressjs/routes.mjs +0 -294
  518. package/dist/esm/integrations/adapters/nestjs/index.d.mts +0 -7
  519. package/dist/esm/integrations/adapters/nestjs/index.mjs +0 -7
  520. package/dist/esm/integrations/adapters/nextjs/base-adapter.d.mts +0 -11
  521. package/dist/esm/integrations/adapters/nextjs/base-adapter.mjs +0 -55
  522. package/dist/esm/integrations/adapters/nextjs/index.d.mts +0 -5
  523. package/dist/esm/integrations/adapters/nextjs/index.mjs +0 -5
  524. package/dist/esm/integrations/adapters/nextjs/routes.d.mts +0 -302
  525. package/dist/esm/integrations/adapters/nextjs/routes.mjs +0 -340
  526. package/dist/esm/integrations/client.d.mts +0 -49
  527. package/dist/esm/integrations/client.mjs +0 -89
  528. package/dist/esm/integrations/controllers/billing.d.mts +0 -182
  529. package/dist/esm/integrations/controllers/billing.mjs +0 -259
  530. package/dist/esm/integrations/controllers/contacts.d.mts +0 -66
  531. package/dist/esm/integrations/controllers/contacts.mjs +0 -141
  532. package/dist/esm/integrations/controllers/customers.d.mts +0 -96
  533. package/dist/esm/integrations/controllers/customers.mjs +0 -200
  534. package/dist/esm/integrations/controllers/index.d.mts +0 -7
  535. package/dist/esm/integrations/controllers/index.mjs +0 -7
  536. package/dist/esm/integrations/controllers/invoices.d.mts +0 -36
  537. package/dist/esm/integrations/controllers/invoices.mjs +0 -68
  538. package/dist/esm/integrations/controllers/orders.d.mts +0 -68
  539. package/dist/esm/integrations/controllers/orders.mjs +0 -224
  540. package/dist/esm/integrations/controllers/plans.d.mts +0 -208
  541. package/dist/esm/integrations/controllers/plans.mjs +0 -353
  542. package/dist/esm/integrations/controllers/provision-users.d.mts +0 -62
  543. package/dist/esm/integrations/controllers/provision-users.mjs +0 -126
  544. package/dist/esm/integrations/index.d.mts +0 -29
  545. package/dist/esm/integrations/index.mjs +0 -28
  546. package/dist/esm/integrations/types.d.mts +0 -122
  547. package/dist/esm/integrations/types.mjs +0 -1
  548. package/dist/esm/integrations/utils/api-fetch.d.mts +0 -18
  549. package/dist/esm/integrations/utils/api-fetch.mjs +0 -50
  550. package/dist/esm/integrations/utils/base-handler.d.mts +0 -79
  551. package/dist/esm/integrations/utils/base-handler.mjs +0 -164
  552. package/dist/esm/integrations/utils/create-adapter.d.mts +0 -30
  553. package/dist/esm/integrations/utils/create-adapter.mjs +0 -54
  554. /package/dist/cjs/api/resources/{agents/client/requests/AgentCreate.js → contacts/client/requests/CreateContactRequest.js} +0 -0
  555. /package/dist/cjs/api/resources/contacts/client/requests/{ContactCreate.js → DeleteContactByExternalIdRequest.js} +0 -0
  556. /package/dist/cjs/api/resources/{customers/client/requests/CustomerCreate.js → contacts/client/requests/DeleteContactByIdRequest.js} +0 -0
  557. /package/dist/cjs/api/resources/{customers/client/requests/CustomersCheckEntitlementRequest.js → contacts/client/requests/GetContactByExternalIdRequest.js} +0 -0
  558. /package/dist/cjs/api/resources/{customers/client/requests/CustomersCreatePaymentMethodRequest.js → contacts/client/requests/GetContactByIdRequest.js} +0 -0
  559. /package/dist/cjs/api/resources/{customers/client/requests/CustomersGetCostsByExternalIdRequest.js → contacts/client/requests/ListContactsRequest.js} +0 -0
  560. /package/dist/cjs/api/resources/{customers/client/requests/CustomersGetUsageByExternalIdRequest.js → contacts/client/requests/UpdateContactByExternalIdRequest.js} +0 -0
  561. /package/dist/cjs/api/resources/{customers/types/CustomersCheckEntitlementResponse.js → contacts/client/requests/UpdateContactByIdRequest.js} +0 -0
  562. /package/dist/cjs/api/resources/{orders/client/requests/CancelRenewalRequest.js → customers/client/requests/CreateCustomerRequest.js} +0 -0
  563. /package/dist/cjs/api/resources/{orders/client/requests/OrderCreate.js → customers/client/requests/DeleteCustomerByExternalIdRequest.js} +0 -0
  564. /package/dist/cjs/api/resources/{orders/client/requests/OrdersActivateAndPayRequest.js → customers/client/requests/DeleteCustomerByIdRequest.js} +0 -0
  565. /package/dist/cjs/api/resources/{orders/client/requests/ProrationUpgradeRequest.js → customers/client/requests/GetCustomerByExternalIdRequest.js} +0 -0
  566. /package/dist/cjs/api/resources/{orders/resources/lines/client/requests/LinesUpdateRequest.js → customers/client/requests/GetCustomerByIdRequest.js} +0 -0
  567. /package/dist/cjs/api/resources/{plans/client/requests/PlansGetUsageRequest.js → customers/client/requests/ListCustomersRequest.js} +0 -0
  568. /package/dist/cjs/api/resources/{plans/client/requests/PlansSubscribeRequest.js → customers/client/requests/UpdateCustomerByExternalIdRequest.js} +0 -0
  569. /package/dist/cjs/api/resources/{plans/client/requests/PlansUnsubscribeRequest.js → customers/client/requests/UpdateCustomerByIdRequest.js} +0 -0
  570. /package/dist/cjs/api/resources/{agents → invoices}/client/index.d.ts +0 -0
  571. /package/dist/cjs/api/resources/{agents → invoices}/client/index.js +0 -0
  572. /package/dist/cjs/api/resources/{plans/client/requests/PlansUpgradeRequest.js → invoices/client/requests/GetInvoiceByIdRequest.js} +0 -0
  573. /package/dist/cjs/api/resources/{traces/client/requests/GetTracesRequest.js → invoices/client/requests/GetInvoiceLinesRequest.js} +0 -0
  574. /package/dist/cjs/api/resources/{usage/client/requests/UsageCheckUsageRequest.js → invoices/client/requests/ListInvoicesRequest.js} +0 -0
  575. /package/dist/cjs/api/resources/{usage/client/requests/UsageRecordBulkRequest.js → invoices/client/requests/UpdateInvoiceRequest.js} +0 -0
  576. /package/dist/cjs/api/resources/{agents → invoices}/client/requests/index.js +0 -0
  577. /package/dist/cjs/api/resources/{agents → invoices}/index.d.ts +0 -0
  578. /package/dist/cjs/api/resources/{agents → invoices}/index.js +0 -0
  579. /package/dist/cjs/api/resources/{usage/client/requests/UsageRecordBulkV2Request.js → orders/client/requests/CreateOrderRequest.js} +0 -0
  580. /package/dist/cjs/api/resources/{usage/types/UsageCheckUsageResponse.js → orders/client/requests/DeleteOrderByIdRequest.js} +0 -0
  581. /package/dist/cjs/api/{types/Address.js → resources/orders/client/requests/GetOrderByIdRequest.js} +0 -0
  582. /package/dist/cjs/api/{types/Agent.js → resources/orders/client/requests/GetOrderLinesRequest.js} +0 -0
  583. /package/dist/cjs/api/{types/AgentAttribute.js → resources/orders/client/requests/ListOrdersRequest.js} +0 -0
  584. /package/dist/cjs/api/{types/AgentPricePoint.js → resources/orders/client/requests/UpdateOrderRequest.js} +0 -0
  585. /package/dist/cjs/api/{types/AgentPricePointTiers.js → resources/products/client/requests/CreateProductRequest.js} +0 -0
  586. /package/dist/cjs/api/{types/AgentUpdate.js → resources/products/client/requests/GetProductByExternalIdRequest.js} +0 -0
  587. /package/dist/cjs/api/{types/ApiError.js → resources/products/client/requests/GetProductByIdRequest.js} +0 -0
  588. /package/dist/cjs/api/{types/CancelRenewalResponse.js → resources/products/client/requests/ListProductsRequest.js} +0 -0
  589. /package/dist/cjs/api/{types/ContactCreateForCustomer.js → resources/products/client/requests/UpdateProductByExternalIdRequest.js} +0 -0
  590. /package/dist/cjs/api/{types/CostAmount.js → resources/products/client/requests/UpdateProductByIdRequest.js} +0 -0
  591. /package/dist/cjs/api/resources/{orders/resources/lines → signals}/client/index.d.ts +0 -0
  592. /package/dist/cjs/api/resources/{orders/resources/lines → signals}/client/index.js +0 -0
  593. /package/dist/cjs/api/{types/CostTrace.js → resources/signals/client/requests/BulkSignalsRequest.js} +0 -0
  594. /package/dist/cjs/api/resources/{orders/resources/lines → signals}/client/requests/index.js +0 -0
  595. /package/dist/cjs/api/resources/{orders/resources/lines → signals}/index.d.ts +0 -0
  596. /package/dist/cjs/api/resources/{orders/resources/lines → signals}/index.js +0 -0
  597. /package/dist/cjs/api/types/{CostTracesResponse.js → Attribution.js} +0 -0
  598. /package/dist/cjs/api/types/{CustomerUpdate.js → BulkSignalsResponse.js} +0 -0
  599. /package/dist/cjs/api/types/{EntitlementUsage.js → ContactBillingAddress.js} +0 -0
  600. /package/dist/cjs/api/types/{Error_.js → ContactListResponse.js} +0 -0
  601. /package/dist/cjs/api/types/{OrderLineAttribute.js → CustomerAttribution.js} +0 -0
  602. /package/dist/cjs/api/types/{OrderLineAttributeCreateOne.js → CustomerBillingAddress.js} +0 -0
  603. /package/dist/cjs/api/types/{OrderLineAttributePricing.js → CustomerByExternalId.js} +0 -0
  604. /package/dist/cjs/api/types/{OrderLineCreate.js → CustomerById.js} +0 -0
  605. /package/dist/cjs/api/types/{PaginationMeta.js → CustomerListResponse.js} +0 -0
  606. /package/dist/cjs/api/types/{PlanGroup.js → EmptyResponse.js} +0 -0
  607. /package/dist/cjs/api/types/{PricePoint.js → ErrorResponse.js} +0 -0
  608. /package/dist/cjs/api/types/{Pricing.js → InvoiceLinesResponse.js} +0 -0
  609. /package/dist/cjs/api/types/{ProrationAttributeUpdate.js → InvoiceListResponse.js} +0 -0
  610. /package/dist/cjs/api/types/{ProrationDetail.js → OrderLinesResponse.js} +0 -0
  611. /package/dist/cjs/api/types/{ProrationUpgradeResponse.js → OrderListResponse.js} +0 -0
  612. /package/dist/cjs/api/types/{SignalV2.js → Pagination.js} +0 -0
  613. /package/dist/cjs/api/types/{Tier.js → ProductByExternalId.js} +0 -0
  614. /package/dist/cjs/api/types/{Trace.js → ProductById.js} +0 -0
  615. /package/dist/cjs/api/types/{TracesResponse.js → ProductListResponse.js} +0 -0
  616. /package/dist/cjs/api/types/{UsagePaginationMeta.js → UpdateContactRequest.js} +0 -0
  617. /package/dist/cjs/api/types/{UsageSummariesResponse.js → UpdateCustomerRequest.js} +0 -0
  618. /package/dist/cjs/api/types/{UsageSummary.js → UpdateProductRequest.js} +0 -0
  619. /package/dist/esm/api/resources/{agents/client/requests/AgentCreate.mjs → contacts/client/requests/CreateContactRequest.mjs} +0 -0
  620. /package/dist/esm/api/resources/contacts/client/requests/{ContactCreate.mjs → DeleteContactByExternalIdRequest.mjs} +0 -0
  621. /package/dist/esm/api/resources/{customers/client/requests/CustomerCreate.mjs → contacts/client/requests/DeleteContactByIdRequest.mjs} +0 -0
  622. /package/dist/esm/api/resources/{customers/client/requests/CustomersCheckEntitlementRequest.mjs → contacts/client/requests/GetContactByExternalIdRequest.mjs} +0 -0
  623. /package/dist/esm/api/resources/{customers/client/requests/CustomersCreatePaymentMethodRequest.mjs → contacts/client/requests/GetContactByIdRequest.mjs} +0 -0
  624. /package/dist/esm/api/resources/{customers/client/requests/CustomersGetCostsByExternalIdRequest.mjs → contacts/client/requests/ListContactsRequest.mjs} +0 -0
  625. /package/dist/esm/api/resources/{customers/client/requests/CustomersGetUsageByExternalIdRequest.mjs → contacts/client/requests/UpdateContactByExternalIdRequest.mjs} +0 -0
  626. /package/dist/esm/api/resources/{customers/types/CustomersCheckEntitlementResponse.mjs → contacts/client/requests/UpdateContactByIdRequest.mjs} +0 -0
  627. /package/dist/esm/api/resources/{orders/client/requests/CancelRenewalRequest.mjs → customers/client/requests/CreateCustomerRequest.mjs} +0 -0
  628. /package/dist/esm/api/resources/{orders/client/requests/OrderCreate.mjs → customers/client/requests/DeleteCustomerByExternalIdRequest.mjs} +0 -0
  629. /package/dist/esm/api/resources/{orders/client/requests/OrdersActivateAndPayRequest.mjs → customers/client/requests/DeleteCustomerByIdRequest.mjs} +0 -0
  630. /package/dist/esm/api/resources/{orders/client/requests/ProrationUpgradeRequest.mjs → customers/client/requests/GetCustomerByExternalIdRequest.mjs} +0 -0
  631. /package/dist/esm/api/resources/{orders/resources/lines/client/requests/LinesUpdateRequest.mjs → customers/client/requests/GetCustomerByIdRequest.mjs} +0 -0
  632. /package/dist/esm/api/resources/{plans/client/requests/PlansGetUsageRequest.mjs → customers/client/requests/ListCustomersRequest.mjs} +0 -0
  633. /package/dist/esm/api/resources/{plans/client/requests/PlansSubscribeRequest.mjs → customers/client/requests/UpdateCustomerByExternalIdRequest.mjs} +0 -0
  634. /package/dist/esm/api/resources/{plans/client/requests/PlansUnsubscribeRequest.mjs → customers/client/requests/UpdateCustomerByIdRequest.mjs} +0 -0
  635. /package/dist/esm/api/resources/{agents → invoices}/client/index.d.mts +0 -0
  636. /package/dist/esm/api/resources/{agents → invoices}/client/index.mjs +0 -0
  637. /package/dist/esm/api/resources/{plans/client/requests/PlansUpgradeRequest.mjs → invoices/client/requests/GetInvoiceByIdRequest.mjs} +0 -0
  638. /package/dist/esm/api/resources/{traces/client/requests/GetTracesRequest.mjs → invoices/client/requests/GetInvoiceLinesRequest.mjs} +0 -0
  639. /package/dist/esm/api/resources/{usage/client/requests/UsageCheckUsageRequest.mjs → invoices/client/requests/ListInvoicesRequest.mjs} +0 -0
  640. /package/dist/esm/api/resources/{usage/client/requests/UsageRecordBulkRequest.mjs → invoices/client/requests/UpdateInvoiceRequest.mjs} +0 -0
  641. /package/dist/esm/api/resources/{agents → invoices}/client/requests/index.mjs +0 -0
  642. /package/dist/esm/api/resources/{agents → invoices}/index.d.mts +0 -0
  643. /package/dist/esm/api/resources/{agents → invoices}/index.mjs +0 -0
  644. /package/dist/esm/api/resources/{usage/client/requests/UsageRecordBulkV2Request.mjs → orders/client/requests/CreateOrderRequest.mjs} +0 -0
  645. /package/dist/esm/api/resources/{usage/types/UsageCheckUsageResponse.mjs → orders/client/requests/DeleteOrderByIdRequest.mjs} +0 -0
  646. /package/dist/esm/api/{types/Address.mjs → resources/orders/client/requests/GetOrderByIdRequest.mjs} +0 -0
  647. /package/dist/esm/api/{types/Agent.mjs → resources/orders/client/requests/GetOrderLinesRequest.mjs} +0 -0
  648. /package/dist/esm/api/{types/AgentAttribute.mjs → resources/orders/client/requests/ListOrdersRequest.mjs} +0 -0
  649. /package/dist/esm/api/{types/AgentPricePoint.mjs → resources/orders/client/requests/UpdateOrderRequest.mjs} +0 -0
  650. /package/dist/esm/api/{types/AgentPricePointTiers.mjs → resources/products/client/requests/CreateProductRequest.mjs} +0 -0
  651. /package/dist/esm/api/{types/AgentUpdate.mjs → resources/products/client/requests/GetProductByExternalIdRequest.mjs} +0 -0
  652. /package/dist/esm/api/{types/ApiError.mjs → resources/products/client/requests/GetProductByIdRequest.mjs} +0 -0
  653. /package/dist/esm/api/{types/CancelRenewalResponse.mjs → resources/products/client/requests/ListProductsRequest.mjs} +0 -0
  654. /package/dist/esm/api/{types/ContactCreateForCustomer.mjs → resources/products/client/requests/UpdateProductByExternalIdRequest.mjs} +0 -0
  655. /package/dist/esm/api/{types/CostAmount.mjs → resources/products/client/requests/UpdateProductByIdRequest.mjs} +0 -0
  656. /package/dist/esm/api/resources/{orders/resources/lines → signals}/client/index.d.mts +0 -0
  657. /package/dist/esm/api/resources/{orders/resources/lines → signals}/client/index.mjs +0 -0
  658. /package/dist/esm/api/{types/CostTrace.mjs → resources/signals/client/requests/BulkSignalsRequest.mjs} +0 -0
  659. /package/dist/esm/api/resources/{orders/resources/lines → signals}/client/requests/index.mjs +0 -0
  660. /package/dist/esm/api/resources/{orders/resources/lines → signals}/index.d.mts +0 -0
  661. /package/dist/esm/api/resources/{orders/resources/lines → signals}/index.mjs +0 -0
  662. /package/dist/esm/api/types/{CostTracesResponse.mjs → Attribution.mjs} +0 -0
  663. /package/dist/esm/api/types/{CustomerUpdate.mjs → BulkSignalsResponse.mjs} +0 -0
  664. /package/dist/esm/api/types/{EntitlementUsage.mjs → ContactBillingAddress.mjs} +0 -0
  665. /package/dist/esm/api/types/{Error_.mjs → ContactListResponse.mjs} +0 -0
  666. /package/dist/esm/api/types/{OrderLineAttribute.mjs → CustomerAttribution.mjs} +0 -0
  667. /package/dist/esm/api/types/{OrderLineAttributeCreateOne.mjs → CustomerBillingAddress.mjs} +0 -0
  668. /package/dist/esm/api/types/{OrderLineAttributePricing.mjs → CustomerByExternalId.mjs} +0 -0
  669. /package/dist/esm/api/types/{OrderLineCreate.mjs → CustomerById.mjs} +0 -0
  670. /package/dist/esm/api/types/{PaginationMeta.mjs → CustomerListResponse.mjs} +0 -0
  671. /package/dist/esm/api/types/{PlanGroup.mjs → EmptyResponse.mjs} +0 -0
  672. /package/dist/esm/api/types/{PricePoint.mjs → ErrorResponse.mjs} +0 -0
  673. /package/dist/esm/api/types/{Pricing.mjs → InvoiceLinesResponse.mjs} +0 -0
  674. /package/dist/esm/api/types/{ProrationAttributeUpdate.mjs → InvoiceListResponse.mjs} +0 -0
  675. /package/dist/esm/api/types/{ProrationDetail.mjs → OrderLinesResponse.mjs} +0 -0
  676. /package/dist/esm/api/types/{ProrationUpgradeResponse.mjs → OrderListResponse.mjs} +0 -0
  677. /package/dist/esm/api/types/{SignalV2.mjs → Pagination.mjs} +0 -0
  678. /package/dist/esm/api/types/{Tier.mjs → ProductByExternalId.mjs} +0 -0
  679. /package/dist/esm/api/types/{Trace.mjs → ProductById.mjs} +0 -0
  680. /package/dist/esm/api/types/{TracesResponse.mjs → ProductListResponse.mjs} +0 -0
  681. /package/dist/esm/api/types/{UsagePaginationMeta.mjs → UpdateContactRequest.mjs} +0 -0
  682. /package/dist/esm/api/types/{UsageSummariesResponse.mjs → UpdateCustomerRequest.mjs} +0 -0
  683. /package/dist/esm/api/types/{UsageSummary.mjs → UpdateProductRequest.mjs} +0 -0
@@ -42,6 +42,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
42
42
  step((generator = generator.apply(thisArg, _arguments || [])).next());
43
43
  });
44
44
  };
45
+ var __rest = (this && this.__rest) || function (s, e) {
46
+ var t = {};
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
+ t[p] = s[p];
49
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
+ t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ };
45
56
  Object.defineProperty(exports, "__esModule", { value: true });
46
57
  exports.Orders = void 0;
47
58
  const headers_js_1 = require("../../../../core/headers.js");
@@ -49,153 +60,43 @@ const core = __importStar(require("../../../../core/index.js"));
49
60
  const environments = __importStar(require("../../../../environments.js"));
50
61
  const errors = __importStar(require("../../../../errors/index.js"));
51
62
  const Paid = __importStar(require("../../../index.js"));
52
- const Client_js_1 = require("../resources/lines/client/Client.js");
53
63
  class Orders {
54
- constructor(_options = {}) {
64
+ constructor(_options) {
55
65
  this._options = _options;
56
66
  }
57
- get lines() {
58
- var _a;
59
- return ((_a = this._lines) !== null && _a !== void 0 ? _a : (this._lines = new Client_js_1.Lines(this._options)));
60
- }
61
67
  /**
62
- * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
68
+ * Get a list of orders for the organization
63
69
  *
64
- * @example
65
- * await client.orders.list()
66
- */
67
- list(requestOptions) {
68
- return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
69
- }
70
- __list(requestOptions) {
71
- return __awaiter(this, void 0, void 0, function* () {
72
- var _a, _b, _c, _d, _e, _f, _g, _h;
73
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
74
- const _response = yield core.fetcher({
75
- 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.Production, "orders"),
76
- method: "GET",
77
- headers: _headers,
78
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
79
- 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,
80
- 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,
81
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
82
- });
83
- if (_response.ok) {
84
- return { data: _response.body, rawResponse: _response.rawResponse };
85
- }
86
- if (_response.error.reason === "status-code") {
87
- throw new errors.PaidError({
88
- statusCode: _response.error.statusCode,
89
- body: _response.error.body,
90
- rawResponse: _response.rawResponse,
91
- });
92
- }
93
- switch (_response.error.reason) {
94
- case "non-json":
95
- throw new errors.PaidError({
96
- statusCode: _response.error.statusCode,
97
- body: _response.error.rawBody,
98
- rawResponse: _response.rawResponse,
99
- });
100
- case "timeout":
101
- throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /orders.");
102
- case "unknown":
103
- throw new errors.PaidError({
104
- message: _response.error.errorMessage,
105
- rawResponse: _response.rawResponse,
106
- });
107
- }
108
- });
109
- }
110
- /**
111
- * @param {Paid.OrderCreate} request
70
+ * @param {Paid.ListOrdersRequest} request
112
71
  * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
113
72
  *
114
- * @example
115
- * await client.orders.create({
116
- * customerExternalId: "acme-inc",
117
- * name: "Acme Order",
118
- * description: "Acme Order is an order for Acme, Inc.",
119
- * startDate: "2025-01-01",
120
- * endDate: "2026-01-01",
121
- * currency: "USD"
122
- * })
73
+ * @throws {@link Paid.BadRequestError}
74
+ * @throws {@link Paid.ForbiddenError}
75
+ * @throws {@link Paid.InternalServerError}
123
76
  *
124
77
  * @example
125
- * await client.orders.create({
126
- * customerExternalId: "acme-inc",
127
- * name: "Acme Order with Custom Pricing",
128
- * description: "Order with customized attribute pricing",
129
- * startDate: "2025-01-01",
130
- * endDate: "2026-01-01",
131
- * currency: "USD"
132
- * })
78
+ * await client.orders.listOrders()
133
79
  */
134
- create(request, requestOptions) {
135
- return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
80
+ listOrders(request = {}, requestOptions) {
81
+ return core.HttpResponsePromise.fromPromise(this.__listOrders(request, requestOptions));
136
82
  }
137
- __create(request, requestOptions) {
138
- return __awaiter(this, void 0, void 0, function* () {
83
+ __listOrders() {
84
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
139
85
  var _a, _b, _c, _d, _e, _f, _g, _h;
140
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
141
- const _response = yield core.fetcher({
142
- 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.Production, "orders"),
143
- method: "POST",
144
- headers: _headers,
145
- contentType: "application/json",
146
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
147
- requestType: "json",
148
- body: request,
149
- 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,
150
- 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,
151
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
152
- });
153
- if (_response.ok) {
154
- return { data: _response.body, rawResponse: _response.rawResponse };
155
- }
156
- if (_response.error.reason === "status-code") {
157
- throw new errors.PaidError({
158
- statusCode: _response.error.statusCode,
159
- body: _response.error.body,
160
- rawResponse: _response.rawResponse,
161
- });
86
+ const { limit, offset } = request;
87
+ const _queryParams = {};
88
+ if (limit != null) {
89
+ _queryParams.limit = limit.toString();
162
90
  }
163
- switch (_response.error.reason) {
164
- case "non-json":
165
- throw new errors.PaidError({
166
- statusCode: _response.error.statusCode,
167
- body: _response.error.rawBody,
168
- rawResponse: _response.rawResponse,
169
- });
170
- case "timeout":
171
- throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /orders.");
172
- case "unknown":
173
- throw new errors.PaidError({
174
- message: _response.error.errorMessage,
175
- rawResponse: _response.rawResponse,
176
- });
91
+ if (offset != null) {
92
+ _queryParams.offset = offset.toString();
177
93
  }
178
- });
179
- }
180
- /**
181
- * @param {string} orderId
182
- * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
183
- *
184
- * @example
185
- * await client.orders.get("orderId")
186
- */
187
- get(orderId, requestOptions) {
188
- return core.HttpResponsePromise.fromPromise(this.__get(orderId, requestOptions));
189
- }
190
- __get(orderId, requestOptions) {
191
- return __awaiter(this, void 0, void 0, function* () {
192
- var _a, _b, _c, _d, _e, _f, _g, _h;
193
94
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
194
95
  const _response = yield core.fetcher({
195
- 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.Production, `orders/${core.url.encodePathParam(orderId)}`),
96
+ 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, "orders/"),
196
97
  method: "GET",
197
98
  headers: _headers,
198
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
99
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
199
100
  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,
200
101
  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,
201
102
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -204,11 +105,20 @@ class Orders {
204
105
  return { data: _response.body, rawResponse: _response.rawResponse };
205
106
  }
206
107
  if (_response.error.reason === "status-code") {
207
- throw new errors.PaidError({
208
- statusCode: _response.error.statusCode,
209
- body: _response.error.body,
210
- rawResponse: _response.rawResponse,
211
- });
108
+ switch (_response.error.statusCode) {
109
+ case 400:
110
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
111
+ case 403:
112
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
113
+ case 500:
114
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
115
+ default:
116
+ throw new errors.PaidError({
117
+ statusCode: _response.error.statusCode,
118
+ body: _response.error.body,
119
+ rawResponse: _response.rawResponse,
120
+ });
121
+ }
212
122
  }
213
123
  switch (_response.error.reason) {
214
124
  case "non-json":
@@ -218,7 +128,7 @@ class Orders {
218
128
  rawResponse: _response.rawResponse,
219
129
  });
220
130
  case "timeout":
221
- throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /orders/{orderId}.");
131
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /orders/.");
222
132
  case "unknown":
223
133
  throw new errors.PaidError({
224
134
  message: _response.error.errorMessage,
@@ -228,74 +138,35 @@ class Orders {
228
138
  });
229
139
  }
230
140
  /**
231
- * @param {string} orderId
232
- * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
141
+ * Creates a new order for the organization
233
142
  *
234
- * @example
235
- * await client.orders.delete("orderId")
236
- */
237
- delete(orderId, requestOptions) {
238
- return core.HttpResponsePromise.fromPromise(this.__delete(orderId, requestOptions));
239
- }
240
- __delete(orderId, requestOptions) {
241
- return __awaiter(this, void 0, void 0, function* () {
242
- var _a, _b, _c, _d, _e, _f, _g, _h;
243
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
244
- const _response = yield core.fetcher({
245
- 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.Production, `orders/${core.url.encodePathParam(orderId)}`),
246
- method: "DELETE",
247
- headers: _headers,
248
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
249
- 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,
250
- 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,
251
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
252
- });
253
- if (_response.ok) {
254
- return { data: undefined, rawResponse: _response.rawResponse };
255
- }
256
- if (_response.error.reason === "status-code") {
257
- throw new errors.PaidError({
258
- statusCode: _response.error.statusCode,
259
- body: _response.error.body,
260
- rawResponse: _response.rawResponse,
261
- });
262
- }
263
- switch (_response.error.reason) {
264
- case "non-json":
265
- throw new errors.PaidError({
266
- statusCode: _response.error.statusCode,
267
- body: _response.error.rawBody,
268
- rawResponse: _response.rawResponse,
269
- });
270
- case "timeout":
271
- throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /orders/{orderId}.");
272
- case "unknown":
273
- throw new errors.PaidError({
274
- message: _response.error.errorMessage,
275
- rawResponse: _response.rawResponse,
276
- });
277
- }
278
- });
279
- }
280
- /**
281
- * @param {string} orderId
143
+ * @param {Paid.CreateOrderRequest} request
282
144
  * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
283
145
  *
146
+ * @throws {@link Paid.BadRequestError}
147
+ * @throws {@link Paid.ForbiddenError}
148
+ * @throws {@link Paid.InternalServerError}
149
+ *
284
150
  * @example
285
- * await client.orders.activate("orderId")
151
+ * await client.orders.createOrder({
152
+ * customerId: "customerId"
153
+ * })
286
154
  */
287
- activate(orderId, requestOptions) {
288
- return core.HttpResponsePromise.fromPromise(this.__activate(orderId, requestOptions));
155
+ createOrder(request, requestOptions) {
156
+ return core.HttpResponsePromise.fromPromise(this.__createOrder(request, requestOptions));
289
157
  }
290
- __activate(orderId, requestOptions) {
158
+ __createOrder(request, requestOptions) {
291
159
  return __awaiter(this, void 0, void 0, function* () {
292
160
  var _a, _b, _c, _d, _e, _f, _g, _h;
293
161
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
294
162
  const _response = yield core.fetcher({
295
- 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.Production, `orders/${core.url.encodePathParam(orderId)}/activate`),
163
+ 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, "orders/"),
296
164
  method: "POST",
297
165
  headers: _headers,
166
+ contentType: "application/json",
298
167
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
168
+ requestType: "json",
169
+ body: request,
299
170
  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,
300
171
  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,
301
172
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -304,11 +175,20 @@ class Orders {
304
175
  return { data: _response.body, rawResponse: _response.rawResponse };
305
176
  }
306
177
  if (_response.error.reason === "status-code") {
307
- throw new errors.PaidError({
308
- statusCode: _response.error.statusCode,
309
- body: _response.error.body,
310
- rawResponse: _response.rawResponse,
311
- });
178
+ switch (_response.error.statusCode) {
179
+ case 400:
180
+ throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
181
+ case 403:
182
+ throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
183
+ case 500:
184
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
185
+ default:
186
+ throw new errors.PaidError({
187
+ statusCode: _response.error.statusCode,
188
+ body: _response.error.body,
189
+ rawResponse: _response.rawResponse,
190
+ });
191
+ }
312
192
  }
313
193
  switch (_response.error.reason) {
314
194
  case "non-json":
@@ -318,7 +198,7 @@ class Orders {
318
198
  rawResponse: _response.rawResponse,
319
199
  });
320
200
  case "timeout":
321
- throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /orders/{orderId}/activate.");
201
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /orders/.");
322
202
  case "unknown":
323
203
  throw new errors.PaidError({
324
204
  message: _response.error.errorMessage,
@@ -328,37 +208,33 @@ class Orders {
328
208
  });
329
209
  }
330
210
  /**
331
- * Activates the order and processes the initial payment using the provided Stripe confirmation token.
211
+ * Get an order by ID
332
212
  *
333
- * @param {string} orderId - The order ID (can be internal ID or display ID)
334
- * @param {Paid.OrdersActivateAndPayRequest} request
213
+ * @param {Paid.GetOrderByIdRequest} request
335
214
  * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
336
215
  *
337
- * @throws {@link Paid.BadRequestError}
338
216
  * @throws {@link Paid.ForbiddenError}
339
217
  * @throws {@link Paid.NotFoundError}
218
+ * @throws {@link Paid.InternalServerError}
340
219
  *
341
220
  * @example
342
- * await client.orders.activateAndPay("orderId", {
343
- * confirmationToken: "ctoken_1234567890",
344
- * returnUrl: "https://example.com/payment-complete"
221
+ * await client.orders.getOrderById({
222
+ * id: "id"
345
223
  * })
346
224
  */
347
- activateAndPay(orderId, request, requestOptions) {
348
- return core.HttpResponsePromise.fromPromise(this.__activateAndPay(orderId, request, requestOptions));
225
+ getOrderById(request, requestOptions) {
226
+ return core.HttpResponsePromise.fromPromise(this.__getOrderById(request, requestOptions));
349
227
  }
350
- __activateAndPay(orderId, request, requestOptions) {
228
+ __getOrderById(request, requestOptions) {
351
229
  return __awaiter(this, void 0, void 0, function* () {
352
230
  var _a, _b, _c, _d, _e, _f, _g, _h;
231
+ const { id } = request;
353
232
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
354
233
  const _response = yield core.fetcher({
355
- 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.Production, `orders/${core.url.encodePathParam(orderId)}/activate-and-pay`),
356
- method: "POST",
234
+ 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, `orders/${core.url.encodePathParam(id)}`),
235
+ method: "GET",
357
236
  headers: _headers,
358
- contentType: "application/json",
359
237
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
360
- requestType: "json",
361
- body: request,
362
238
  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,
363
239
  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,
364
240
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -368,12 +244,12 @@ class Orders {
368
244
  }
369
245
  if (_response.error.reason === "status-code") {
370
246
  switch (_response.error.statusCode) {
371
- case 400:
372
- throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
373
247
  case 403:
374
248
  throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
375
249
  case 404:
376
250
  throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
251
+ case 500:
252
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
377
253
  default:
378
254
  throw new errors.PaidError({
379
255
  statusCode: _response.error.statusCode,
@@ -390,7 +266,7 @@ class Orders {
390
266
  rawResponse: _response.rawResponse,
391
267
  });
392
268
  case "timeout":
393
- throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /orders/{orderId}/activate-and-pay.");
269
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /orders/{id}.");
394
270
  case "unknown":
395
271
  throw new errors.PaidError({
396
272
  message: _response.error.errorMessage,
@@ -400,37 +276,37 @@ class Orders {
400
276
  });
401
277
  }
402
278
  /**
403
- * Schedules the cancellation of an order's renewal from a specified date. The order will remain active until the cancellation date.
279
+ * Update an order by ID
404
280
  *
405
- * @param {string} orderId - The order ID (can be internal ID or display ID)
406
- * @param {Paid.CancelRenewalRequest} request
281
+ * @param {Paid.UpdateOrderRequest} request
407
282
  * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
408
283
  *
409
284
  * @throws {@link Paid.BadRequestError}
410
285
  * @throws {@link Paid.ForbiddenError}
411
286
  * @throws {@link Paid.NotFoundError}
287
+ * @throws {@link Paid.InternalServerError}
412
288
  *
413
289
  * @example
414
- * await client.orders.cancelRenewal("orderId", {
415
- * orderVersion: 1,
416
- * cancelFromDate: "2025-12-31T00:00:00Z"
290
+ * await client.orders.updateOrderById({
291
+ * id: "id"
417
292
  * })
418
293
  */
419
- cancelRenewal(orderId, request, requestOptions) {
420
- return core.HttpResponsePromise.fromPromise(this.__cancelRenewal(orderId, request, requestOptions));
294
+ updateOrderById(request, requestOptions) {
295
+ return core.HttpResponsePromise.fromPromise(this.__updateOrderById(request, requestOptions));
421
296
  }
422
- __cancelRenewal(orderId, request, requestOptions) {
297
+ __updateOrderById(request, requestOptions) {
423
298
  return __awaiter(this, void 0, void 0, function* () {
424
299
  var _a, _b, _c, _d, _e, _f, _g, _h;
300
+ const { id } = request, _body = __rest(request, ["id"]);
425
301
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
426
302
  const _response = yield core.fetcher({
427
- 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.Production, `orders/${core.url.encodePathParam(orderId)}/cancel`),
428
- method: "POST",
303
+ 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, `orders/${core.url.encodePathParam(id)}`),
304
+ method: "PUT",
429
305
  headers: _headers,
430
306
  contentType: "application/json",
431
307
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
432
308
  requestType: "json",
433
- body: request,
309
+ body: _body,
434
310
  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,
435
311
  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,
436
312
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -446,6 +322,8 @@ class Orders {
446
322
  throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
447
323
  case 404:
448
324
  throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
325
+ case 500:
326
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
449
327
  default:
450
328
  throw new errors.PaidError({
451
329
  statusCode: _response.error.statusCode,
@@ -462,7 +340,7 @@ class Orders {
462
340
  rawResponse: _response.rawResponse,
463
341
  });
464
342
  case "timeout":
465
- throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /orders/{orderId}/cancel.");
343
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling PUT /orders/{id}.");
466
344
  case "unknown":
467
345
  throw new errors.PaidError({
468
346
  message: _response.error.errorMessage,
@@ -472,45 +350,33 @@ class Orders {
472
350
  });
473
351
  }
474
352
  /**
475
- * Schedules a plan upgrade or downgrade for an order with automatic proration calculation. Credits are applied for the unused portion of the current billing period.
353
+ * Delete an order by ID
476
354
  *
477
- * @param {string} orderId - The order ID (can be internal ID or display ID)
478
- * @param {Paid.ProrationUpgradeRequest} request
355
+ * @param {Paid.DeleteOrderByIdRequest} request
479
356
  * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
480
357
  *
481
- * @throws {@link Paid.BadRequestError}
482
358
  * @throws {@link Paid.ForbiddenError}
483
359
  * @throws {@link Paid.NotFoundError}
360
+ * @throws {@link Paid.InternalServerError}
484
361
  *
485
362
  * @example
486
- * await client.orders.schedulePlanChange("orderId", {
487
- * orderVersion: 1,
488
- * effectiveDate: "2025-02-01T00:00:00Z",
489
- * updatedOrderLineAttributes: [{
490
- * orderLineAttributeId: "a1b2c3d4-5678-90ab-cdef-1234567890ab",
491
- * newPricing: {
492
- * "unitPrice": 200,
493
- * "currency": "USD"
494
- * },
495
- * newQuantity: 10
496
- * }]
363
+ * await client.orders.deleteOrderById({
364
+ * id: "id"
497
365
  * })
498
366
  */
499
- schedulePlanChange(orderId, request, requestOptions) {
500
- return core.HttpResponsePromise.fromPromise(this.__schedulePlanChange(orderId, request, requestOptions));
367
+ deleteOrderById(request, requestOptions) {
368
+ return core.HttpResponsePromise.fromPromise(this.__deleteOrderById(request, requestOptions));
501
369
  }
502
- __schedulePlanChange(orderId, request, requestOptions) {
370
+ __deleteOrderById(request, requestOptions) {
503
371
  return __awaiter(this, void 0, void 0, function* () {
504
372
  var _a, _b, _c, _d, _e, _f, _g, _h;
373
+ const { id } = request;
505
374
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
506
375
  const _response = yield core.fetcher({
507
- 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.Production, `orders/${core.url.encodePathParam(orderId)}/schedule-plan-change`),
508
- method: "POST",
376
+ 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, `orders/${core.url.encodePathParam(id)}`),
377
+ method: "DELETE",
509
378
  headers: _headers,
510
- contentType: "application/json",
511
379
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
512
- requestType: "json",
513
- body: request,
514
380
  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,
515
381
  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,
516
382
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -520,12 +386,12 @@ class Orders {
520
386
  }
521
387
  if (_response.error.reason === "status-code") {
522
388
  switch (_response.error.statusCode) {
523
- case 400:
524
- throw new Paid.BadRequestError(_response.error.body, _response.rawResponse);
525
389
  case 403:
526
390
  throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
527
391
  case 404:
528
392
  throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
393
+ case 500:
394
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
529
395
  default:
530
396
  throw new errors.PaidError({
531
397
  statusCode: _response.error.statusCode,
@@ -542,7 +408,7 @@ class Orders {
542
408
  rawResponse: _response.rawResponse,
543
409
  });
544
410
  case "timeout":
545
- throw new errors.PaidTimeoutError("Timeout exceeded when calling POST /orders/{orderId}/schedule-plan-change.");
411
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling DELETE /orders/{id}.");
546
412
  case "unknown":
547
413
  throw new errors.PaidError({
548
414
  message: _response.error.errorMessage,
@@ -552,29 +418,40 @@ class Orders {
552
418
  });
553
419
  }
554
420
  /**
555
- * Retrieves all invoices associated with a specific order.
421
+ * Get the order lines for an order by ID
556
422
  *
557
- * @param {string} orderId - The order ID (can be internal ID or display ID)
423
+ * @param {Paid.GetOrderLinesRequest} request
558
424
  * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
559
425
  *
560
426
  * @throws {@link Paid.ForbiddenError}
561
427
  * @throws {@link Paid.NotFoundError}
428
+ * @throws {@link Paid.InternalServerError}
562
429
  *
563
430
  * @example
564
- * await client.orders.getInvoices("orderId")
431
+ * await client.orders.getOrderLines({
432
+ * id: "id"
433
+ * })
565
434
  */
566
- getInvoices(orderId, requestOptions) {
567
- return core.HttpResponsePromise.fromPromise(this.__getInvoices(orderId, requestOptions));
435
+ getOrderLines(request, requestOptions) {
436
+ return core.HttpResponsePromise.fromPromise(this.__getOrderLines(request, requestOptions));
568
437
  }
569
- __getInvoices(orderId, requestOptions) {
438
+ __getOrderLines(request, requestOptions) {
570
439
  return __awaiter(this, void 0, void 0, function* () {
571
440
  var _a, _b, _c, _d, _e, _f, _g, _h;
441
+ const { id, limit, offset } = request;
442
+ const _queryParams = {};
443
+ if (limit != null) {
444
+ _queryParams.limit = limit.toString();
445
+ }
446
+ if (offset != null) {
447
+ _queryParams.offset = offset.toString();
448
+ }
572
449
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
573
450
  const _response = yield core.fetcher({
574
- 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.Production, `orders/${core.url.encodePathParam(orderId)}/invoices`),
451
+ 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, `orders/${core.url.encodePathParam(id)}/lines`),
575
452
  method: "GET",
576
453
  headers: _headers,
577
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
454
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
578
455
  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,
579
456
  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,
580
457
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -588,6 +465,8 @@ class Orders {
588
465
  throw new Paid.ForbiddenError(_response.error.body, _response.rawResponse);
589
466
  case 404:
590
467
  throw new Paid.NotFoundError(_response.error.body, _response.rawResponse);
468
+ case 500:
469
+ throw new Paid.InternalServerError(_response.error.body, _response.rawResponse);
591
470
  default:
592
471
  throw new errors.PaidError({
593
472
  statusCode: _response.error.statusCode,
@@ -604,7 +483,7 @@ class Orders {
604
483
  rawResponse: _response.rawResponse,
605
484
  });
606
485
  case "timeout":
607
- throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /orders/{orderId}/invoices.");
486
+ throw new errors.PaidTimeoutError("Timeout exceeded when calling GET /orders/{id}/lines.");
608
487
  case "unknown":
609
488
  throw new errors.PaidError({
610
489
  message: _response.error.errorMessage,
@@ -615,11 +494,7 @@ class Orders {
615
494
  }
616
495
  _getAuthorizationHeader() {
617
496
  return __awaiter(this, void 0, void 0, function* () {
618
- const bearer = yield core.Supplier.get(this._options.token);
619
- if (bearer != null) {
620
- return `Bearer ${bearer}`;
621
- }
622
- return undefined;
497
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
623
498
  });
624
499
  }
625
500
  }