@paid-ai/paid-node 0.5.1 → 1.0.1-alpha0

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 (578) hide show
  1. package/README.md +11 -11
  2. package/dist/cjs/BaseClient.d.ts +26 -0
  3. package/dist/cjs/BaseClient.js +3 -0
  4. package/dist/cjs/Client.d.ts +6 -69
  5. package/dist/cjs/Client.js +20 -88
  6. package/dist/cjs/api/errors/BadRequestError.d.ts +2 -5
  7. package/dist/cjs/api/errors/BadRequestError.js +1 -3
  8. package/dist/cjs/api/errors/ForbiddenError.d.ts +2 -5
  9. package/dist/cjs/api/errors/ForbiddenError.js +1 -3
  10. package/dist/cjs/api/errors/InternalServerError.d.ts +2 -5
  11. package/dist/cjs/api/errors/InternalServerError.js +1 -3
  12. package/dist/cjs/api/errors/NotFoundError.d.ts +2 -5
  13. package/dist/cjs/api/errors/NotFoundError.js +1 -3
  14. package/dist/cjs/api/errors/index.d.ts +2 -2
  15. package/dist/cjs/api/errors/index.js +2 -2
  16. package/dist/cjs/api/index.d.ts +1 -1
  17. package/dist/cjs/api/index.js +1 -1
  18. package/dist/cjs/api/resources/agents/client/Client.d.ts +4 -21
  19. package/dist/cjs/api/resources/agents/client/Client.js +59 -49
  20. package/dist/cjs/api/resources/agents/client/requests/AgentCreate.d.ts +0 -3
  21. package/dist/cjs/api/resources/agents/client/requests/AgentCreate.js +1 -3
  22. package/dist/cjs/api/resources/agents/client/requests/index.d.ts +1 -1
  23. package/dist/cjs/api/resources/contacts/client/Client.d.ts +4 -21
  24. package/dist/cjs/api/resources/contacts/client/Client.js +45 -39
  25. package/dist/cjs/api/resources/contacts/client/requests/ContactCreate.d.ts +1 -4
  26. package/dist/cjs/api/resources/contacts/client/requests/ContactCreate.js +1 -3
  27. package/dist/cjs/api/resources/contacts/client/requests/index.d.ts +1 -1
  28. package/dist/cjs/api/resources/customers/client/Client.d.ts +84 -21
  29. package/dist/cjs/api/resources/customers/client/Client.js +376 -76
  30. package/dist/cjs/api/resources/customers/client/requests/CustomerCreate.d.ts +17 -5
  31. package/dist/cjs/api/resources/customers/client/requests/CustomerCreate.js +1 -3
  32. package/dist/cjs/api/resources/customers/client/requests/CustomersCheckEntitlementRequest.d.ts +14 -0
  33. package/dist/cjs/api/resources/customers/client/requests/CustomersCheckEntitlementRequest.js +3 -0
  34. package/dist/cjs/api/resources/customers/client/requests/CustomersCreatePaymentMethodRequest.d.ts +18 -0
  35. package/dist/cjs/api/resources/customers/client/requests/CustomersCreatePaymentMethodRequest.js +3 -0
  36. package/dist/cjs/api/resources/customers/client/requests/CustomersGetCostsByExternalIdRequest.d.ts +4 -15
  37. package/dist/cjs/api/resources/customers/client/requests/CustomersGetCostsByExternalIdRequest.js +1 -3
  38. package/dist/cjs/api/resources/customers/client/requests/CustomersGetUsageByExternalIdRequest.d.ts +4 -15
  39. package/dist/cjs/api/resources/customers/client/requests/CustomersGetUsageByExternalIdRequest.js +1 -3
  40. package/dist/cjs/api/resources/customers/client/requests/index.d.ts +5 -3
  41. package/dist/cjs/api/resources/customers/index.d.ts +1 -0
  42. package/dist/cjs/api/resources/customers/index.js +1 -0
  43. package/dist/cjs/api/resources/customers/types/CustomersCheckEntitlementRequestView.d.ts +5 -0
  44. package/dist/cjs/api/resources/customers/types/CustomersCheckEntitlementRequestView.js +8 -0
  45. package/dist/cjs/api/resources/customers/types/CustomersCheckEntitlementResponse.d.ts +4 -0
  46. package/dist/cjs/api/resources/customers/types/CustomersCheckEntitlementResponse.js +3 -0
  47. package/dist/cjs/api/resources/customers/types/index.d.ts +2 -0
  48. package/dist/cjs/api/resources/customers/types/index.js +18 -0
  49. package/dist/cjs/api/resources/index.d.ts +12 -11
  50. package/dist/cjs/api/resources/index.js +16 -15
  51. package/dist/cjs/api/resources/orders/client/Client.d.ts +82 -20
  52. package/dist/cjs/api/resources/orders/client/Client.js +325 -34
  53. package/dist/cjs/api/resources/orders/client/requests/CancelRenewalRequest.d.ts +13 -0
  54. package/dist/cjs/api/resources/orders/client/requests/CancelRenewalRequest.js +3 -0
  55. package/dist/cjs/api/resources/orders/client/requests/OrderCreate.d.ts +1 -4
  56. package/dist/cjs/api/resources/orders/client/requests/OrderCreate.js +1 -3
  57. package/dist/cjs/api/resources/orders/client/requests/OrdersActivateAndPayRequest.d.ts +13 -0
  58. package/dist/cjs/api/resources/orders/client/requests/OrdersActivateAndPayRequest.js +3 -0
  59. package/dist/cjs/api/resources/orders/client/requests/ProrationUpgradeRequest.d.ts +24 -0
  60. package/dist/cjs/api/resources/orders/client/requests/ProrationUpgradeRequest.js +3 -0
  61. package/dist/cjs/api/resources/orders/client/requests/index.d.ts +4 -1
  62. package/dist/cjs/api/resources/orders/resources/index.d.ts +1 -1
  63. package/dist/cjs/api/resources/orders/resources/index.js +4 -4
  64. package/dist/cjs/api/resources/orders/resources/lines/client/Client.d.ts +4 -21
  65. package/dist/cjs/api/resources/orders/resources/lines/client/Client.js +10 -14
  66. package/dist/cjs/api/resources/orders/resources/lines/client/requests/LinesUpdateRequest.d.ts +1 -4
  67. package/dist/cjs/api/resources/orders/resources/lines/client/requests/LinesUpdateRequest.js +1 -3
  68. package/dist/cjs/api/resources/orders/resources/lines/client/requests/index.d.ts +1 -1
  69. package/dist/cjs/api/resources/plans/client/Client.d.ts +3 -20
  70. package/dist/cjs/api/resources/plans/client/Client.js +30 -31
  71. package/dist/cjs/api/resources/plans/client/requests/PlansGetUsageRequest.d.ts +5 -18
  72. package/dist/cjs/api/resources/plans/client/requests/PlansGetUsageRequest.js +1 -3
  73. package/dist/cjs/api/resources/plans/client/requests/index.d.ts +1 -1
  74. package/dist/cjs/api/resources/products/client/Client.d.ts +4 -21
  75. package/dist/cjs/api/resources/products/client/Client.js +59 -49
  76. package/dist/cjs/api/resources/products/client/requests/ProductCreate.d.ts +1 -4
  77. package/dist/cjs/api/resources/products/client/requests/ProductCreate.js +1 -3
  78. package/dist/cjs/api/resources/products/client/requests/index.d.ts +1 -1
  79. package/dist/cjs/api/resources/traces/client/Client.d.ts +3 -20
  80. package/dist/cjs/api/resources/traces/client/Client.js +19 -24
  81. package/dist/cjs/api/resources/traces/client/requests/GetTracesRequest.d.ts +8 -27
  82. package/dist/cjs/api/resources/traces/client/requests/GetTracesRequest.js +1 -3
  83. package/dist/cjs/api/resources/traces/client/requests/index.d.ts +1 -1
  84. package/dist/cjs/api/resources/usage/client/Client.d.ts +3 -20
  85. package/dist/cjs/api/resources/usage/client/Client.js +25 -25
  86. package/dist/cjs/api/resources/usage/client/requests/UsageCheckUsageRequest.d.ts +0 -3
  87. package/dist/cjs/api/resources/usage/client/requests/UsageCheckUsageRequest.js +1 -3
  88. package/dist/cjs/api/resources/usage/client/requests/UsageRecordBulkRequest.d.ts +1 -4
  89. package/dist/cjs/api/resources/usage/client/requests/UsageRecordBulkRequest.js +1 -3
  90. package/dist/cjs/api/resources/usage/client/requests/UsageRecordBulkV2Request.d.ts +1 -4
  91. package/dist/cjs/api/resources/usage/client/requests/UsageRecordBulkV2Request.js +1 -3
  92. package/dist/cjs/api/resources/usage/client/requests/index.d.ts +3 -3
  93. package/dist/cjs/api/resources/usage/index.d.ts +1 -1
  94. package/dist/cjs/api/resources/usage/index.js +1 -1
  95. package/dist/cjs/api/resources/usage/types/UsageCheckUsageResponse.d.ts +0 -3
  96. package/dist/cjs/api/resources/usage/types/UsageCheckUsageResponse.js +1 -3
  97. package/dist/cjs/api/types/Address.d.ts +0 -3
  98. package/dist/cjs/api/types/Address.js +1 -3
  99. package/dist/cjs/api/types/Agent.d.ts +1 -4
  100. package/dist/cjs/api/types/Agent.js +1 -3
  101. package/dist/cjs/api/types/AgentAttribute.d.ts +1 -4
  102. package/dist/cjs/api/types/AgentAttribute.js +1 -3
  103. package/dist/cjs/api/types/AgentPricePoint.d.ts +1 -4
  104. package/dist/cjs/api/types/AgentPricePoint.js +1 -3
  105. package/dist/cjs/api/types/AgentPricePointTiers.d.ts +0 -3
  106. package/dist/cjs/api/types/AgentPricePointTiers.js +1 -3
  107. package/dist/cjs/api/types/AgentUpdate.d.ts +1 -4
  108. package/dist/cjs/api/types/AgentUpdate.js +1 -3
  109. package/dist/cjs/api/types/ApiError.d.ts +0 -3
  110. package/dist/cjs/api/types/ApiError.js +1 -3
  111. package/dist/cjs/api/types/BillingFrequency.d.ts +1 -4
  112. package/dist/cjs/api/types/BillingFrequency.js +1 -3
  113. package/dist/cjs/api/types/CancelRenewalResponse.d.ts +15 -0
  114. package/dist/cjs/api/types/CancelRenewalResponse.js +3 -0
  115. package/dist/cjs/api/types/ChargeType.d.ts +1 -4
  116. package/dist/cjs/api/types/ChargeType.js +1 -3
  117. package/dist/cjs/api/types/Contact.d.ts +1 -4
  118. package/dist/cjs/api/types/Contact.js +1 -3
  119. package/dist/cjs/api/types/ContactCreateForCustomer.d.ts +15 -0
  120. package/dist/cjs/api/types/ContactCreateForCustomer.js +3 -0
  121. package/dist/cjs/api/types/CostAmount.d.ts +0 -3
  122. package/dist/cjs/api/types/CostAmount.js +1 -3
  123. package/dist/cjs/api/types/CostTrace.d.ts +1 -4
  124. package/dist/cjs/api/types/CostTrace.js +1 -3
  125. package/dist/cjs/api/types/CostTracesResponse.d.ts +1 -4
  126. package/dist/cjs/api/types/CostTracesResponse.js +1 -3
  127. package/dist/cjs/api/types/CreationSource.d.ts +1 -4
  128. package/dist/cjs/api/types/CreationSource.js +1 -3
  129. package/dist/cjs/api/types/CreationState.d.ts +1 -4
  130. package/dist/cjs/api/types/CreationState.js +1 -3
  131. package/dist/cjs/api/types/Customer.d.ts +1 -4
  132. package/dist/cjs/api/types/Customer.js +1 -3
  133. package/dist/cjs/api/types/CustomerUpdate.d.ts +1 -4
  134. package/dist/cjs/api/types/CustomerUpdate.js +1 -3
  135. package/dist/cjs/api/types/EntitlementUsage.d.ts +0 -3
  136. package/dist/cjs/api/types/EntitlementUsage.js +1 -3
  137. package/dist/cjs/api/types/Error_.d.ts +1 -4
  138. package/dist/cjs/api/types/Error_.js +1 -3
  139. package/dist/cjs/api/types/Invoice.d.ts +40 -0
  140. package/dist/cjs/api/types/Invoice.js +14 -0
  141. package/dist/cjs/api/types/Order.d.ts +1 -4
  142. package/dist/cjs/api/types/Order.js +1 -3
  143. package/dist/cjs/api/types/OrderLine.d.ts +1 -4
  144. package/dist/cjs/api/types/OrderLine.js +1 -3
  145. package/dist/cjs/api/types/OrderLineAttribute.d.ts +1 -4
  146. package/dist/cjs/api/types/OrderLineAttribute.js +1 -3
  147. package/dist/cjs/api/types/OrderLineAttributeCreateOne.d.ts +0 -3
  148. package/dist/cjs/api/types/OrderLineAttributeCreateOne.js +1 -3
  149. package/dist/cjs/api/types/OrderLineAttributePricing.d.ts +1 -4
  150. package/dist/cjs/api/types/OrderLineAttributePricing.js +1 -3
  151. package/dist/cjs/api/types/OrderLineCreate.d.ts +1 -4
  152. package/dist/cjs/api/types/OrderLineCreate.js +1 -3
  153. package/dist/cjs/api/types/PaginationMeta.d.ts +0 -3
  154. package/dist/cjs/api/types/PaginationMeta.js +1 -3
  155. package/dist/cjs/api/types/PaymentMethod.d.ts +54 -0
  156. package/dist/cjs/api/types/PaymentMethod.js +20 -0
  157. package/dist/cjs/api/types/Plan.d.ts +3 -3
  158. package/dist/cjs/api/types/Plan.js +1 -3
  159. package/dist/cjs/api/types/PlanGroup.d.ts +1 -4
  160. package/dist/cjs/api/types/PlanGroup.js +1 -3
  161. package/dist/cjs/api/types/PricePoint.d.ts +1 -4
  162. package/dist/cjs/api/types/PricePoint.js +1 -3
  163. package/dist/cjs/api/types/Pricing.d.ts +1 -4
  164. package/dist/cjs/api/types/Pricing.js +1 -3
  165. package/dist/cjs/api/types/PricingModelType.d.ts +1 -4
  166. package/dist/cjs/api/types/PricingModelType.js +1 -3
  167. package/dist/cjs/api/types/Product.d.ts +3 -8
  168. package/dist/cjs/api/types/Product.js +2 -3
  169. package/dist/cjs/api/types/ProductUpdate.d.ts +2 -5
  170. package/dist/cjs/api/types/ProductUpdate.js +1 -3
  171. package/dist/cjs/api/types/ProrationAttributeUpdate.d.ts +11 -0
  172. package/dist/cjs/api/types/ProrationAttributeUpdate.js +3 -0
  173. package/dist/cjs/api/types/ProrationDetail.d.ts +16 -0
  174. package/dist/cjs/api/types/ProrationDetail.js +3 -0
  175. package/dist/cjs/api/types/ProrationUpgradeResponse.d.ts +22 -0
  176. package/dist/cjs/api/types/ProrationUpgradeResponse.js +3 -0
  177. package/dist/cjs/api/types/Salutation.d.ts +1 -4
  178. package/dist/cjs/api/types/Salutation.js +1 -3
  179. package/dist/cjs/api/types/Signal.d.ts +0 -3
  180. package/dist/cjs/api/types/Signal.js +1 -3
  181. package/dist/cjs/api/types/SignalV2.d.ts +0 -3
  182. package/dist/cjs/api/types/SignalV2.js +1 -3
  183. package/dist/cjs/api/types/TaxExemptStatus.d.ts +1 -4
  184. package/dist/cjs/api/types/TaxExemptStatus.js +1 -3
  185. package/dist/cjs/api/types/Tier.d.ts +0 -3
  186. package/dist/cjs/api/types/Tier.js +1 -3
  187. package/dist/cjs/api/types/Trace.d.ts +1 -4
  188. package/dist/cjs/api/types/Trace.js +1 -3
  189. package/dist/cjs/api/types/TracesResponse.d.ts +1 -4
  190. package/dist/cjs/api/types/TracesResponse.js +1 -3
  191. package/dist/cjs/api/types/UsagePaginationMeta.d.ts +0 -3
  192. package/dist/cjs/api/types/UsagePaginationMeta.js +1 -3
  193. package/dist/cjs/api/types/UsageSummariesResponse.d.ts +1 -4
  194. package/dist/cjs/api/types/UsageSummariesResponse.js +1 -3
  195. package/dist/cjs/api/types/UsageSummary.d.ts +0 -3
  196. package/dist/cjs/api/types/UsageSummary.js +1 -3
  197. package/dist/cjs/api/types/index.d.ts +33 -26
  198. package/dist/cjs/api/types/index.js +33 -26
  199. package/dist/cjs/core/auth/AuthProvider.d.ts +4 -0
  200. package/dist/cjs/core/auth/AuthProvider.js +2 -0
  201. package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
  202. package/dist/cjs/core/auth/AuthRequest.js +2 -0
  203. package/dist/cjs/core/auth/BasicAuth.js +5 -4
  204. package/dist/cjs/core/auth/index.d.ts +2 -0
  205. package/dist/cjs/core/base64.d.ts +2 -0
  206. package/dist/cjs/core/base64.js +26 -0
  207. package/dist/cjs/core/fetcher/APIResponse.d.ts +1 -1
  208. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +20 -0
  209. package/dist/cjs/core/fetcher/BinaryResponse.js +17 -0
  210. package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
  211. package/dist/cjs/core/fetcher/EndpointMetadata.js +2 -0
  212. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
  213. package/dist/{esm/core/fetcher/stream-wrappers/chooseStreamWrapper.mjs → cjs/core/fetcher/EndpointSupplier.js} +10 -11
  214. package/dist/cjs/core/fetcher/Fetcher.d.ts +7 -5
  215. package/dist/cjs/core/fetcher/Fetcher.js +9 -7
  216. package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +1 -1
  217. package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +4 -0
  218. package/dist/cjs/core/fetcher/ResponseWithBody.js +6 -0
  219. package/dist/cjs/core/fetcher/createRequestUrl.d.ts +1 -1
  220. package/dist/cjs/core/fetcher/createRequestUrl.js +3 -7
  221. package/dist/cjs/core/fetcher/getErrorResponseBody.d.ts +1 -0
  222. package/dist/cjs/core/fetcher/getErrorResponseBody.js +45 -0
  223. package/dist/cjs/core/fetcher/getFetchFn.d.ts +1 -4
  224. package/dist/cjs/core/fetcher/getFetchFn.js +1 -52
  225. package/dist/cjs/core/fetcher/getResponseBody.js +34 -33
  226. package/dist/cjs/core/fetcher/index.d.ts +7 -4
  227. package/dist/cjs/core/fetcher/index.js +7 -5
  228. package/dist/cjs/core/fetcher/makeRequest.js +2 -2
  229. package/dist/cjs/core/fetcher/requestWithRetries.js +44 -8
  230. package/dist/cjs/core/headers.d.ts +2 -3
  231. package/dist/cjs/core/index.d.ts +3 -1
  232. package/dist/cjs/core/index.js +26 -1
  233. package/dist/cjs/core/runtime/runtime.js +0 -1
  234. package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
  235. package/dist/cjs/core/url/encodePathParam.js +21 -0
  236. package/dist/cjs/core/url/index.d.ts +3 -0
  237. package/dist/cjs/core/url/index.js +9 -0
  238. package/dist/cjs/core/url/join.d.ts +1 -0
  239. package/dist/cjs/core/url/join.js +69 -0
  240. package/dist/cjs/core/url/qs.d.ts +6 -0
  241. package/dist/cjs/core/url/qs.js +64 -0
  242. package/dist/cjs/environments.d.ts +0 -3
  243. package/dist/cjs/environments.js +1 -3
  244. package/dist/cjs/errors/PaidError.d.ts +1 -4
  245. package/dist/cjs/errors/PaidError.js +2 -4
  246. package/dist/cjs/errors/PaidTimeoutError.d.ts +0 -3
  247. package/dist/cjs/errors/PaidTimeoutError.js +1 -3
  248. package/dist/cjs/index.d.ts +1 -2
  249. package/dist/cjs/index.js +1 -6
  250. package/dist/cjs/integrations/adapters/expressjs/base-adapter.d.ts +8 -5
  251. package/dist/cjs/integrations/adapters/expressjs/base-adapter.js +6 -11
  252. package/dist/cjs/integrations/adapters/expressjs/routes.d.ts +14 -12
  253. package/dist/cjs/integrations/adapters/expressjs/routes.js +18 -9
  254. package/dist/cjs/integrations/adapters/nextjs/base-adapter.d.ts +3 -2
  255. package/dist/cjs/integrations/adapters/nextjs/routes.d.ts +13 -11
  256. package/dist/cjs/integrations/adapters/nextjs/routes.js +18 -9
  257. package/dist/cjs/integrations/controllers/billing.d.ts +3 -17
  258. package/dist/cjs/integrations/controllers/contacts.d.ts +1 -1
  259. package/dist/cjs/integrations/controllers/customers.d.ts +2 -2
  260. package/dist/cjs/integrations/controllers/invoices.d.ts +2 -6
  261. package/dist/cjs/integrations/controllers/orders.d.ts +1 -5
  262. package/dist/cjs/integrations/controllers/provision-users.d.ts +1 -1
  263. package/dist/cjs/integrations/utils/create-adapter.d.ts +2 -1
  264. package/dist/cjs/integrations/utils/create-adapter.js +2 -1
  265. package/dist/cjs/tracing/autoInstrumentation.js +5 -5
  266. package/dist/cjs/tracing/spanProcessor.d.ts +2 -2
  267. package/dist/cjs/tracing/spanProcessor.js +0 -5
  268. package/dist/cjs/tracing/tracing.d.ts +1 -1
  269. package/dist/cjs/tracing/tracing.js +2 -0
  270. package/dist/cjs/tracing/wrappers/anthropicWrapper.d.ts +2 -2
  271. package/dist/cjs/tracing/wrappers/mistralWrapper.d.ts +3 -3
  272. package/dist/cjs/tracing/wrappers/openAiWrapper.d.ts +5 -5
  273. package/dist/cjs/tracing/wrappers/vercelAIWrapper.d.ts +2 -2
  274. package/dist/cjs/tracing/wrappers/vercelAIWrapper.js +8 -7
  275. package/dist/cjs/version.d.ts +1 -1
  276. package/dist/cjs/version.js +1 -1
  277. package/dist/esm/BaseClient.d.mts +26 -0
  278. package/dist/esm/BaseClient.mjs +2 -0
  279. package/dist/esm/Client.d.mts +6 -69
  280. package/dist/esm/Client.mjs +9 -77
  281. package/dist/esm/api/errors/BadRequestError.d.mts +2 -5
  282. package/dist/esm/api/errors/BadRequestError.mjs +1 -3
  283. package/dist/esm/api/errors/ForbiddenError.d.mts +2 -5
  284. package/dist/esm/api/errors/ForbiddenError.mjs +1 -3
  285. package/dist/esm/api/errors/InternalServerError.d.mts +2 -5
  286. package/dist/esm/api/errors/InternalServerError.mjs +1 -3
  287. package/dist/esm/api/errors/NotFoundError.d.mts +2 -5
  288. package/dist/esm/api/errors/NotFoundError.mjs +1 -3
  289. package/dist/esm/api/errors/index.d.mts +2 -2
  290. package/dist/esm/api/errors/index.mjs +2 -2
  291. package/dist/esm/api/index.d.mts +1 -1
  292. package/dist/esm/api/index.mjs +1 -1
  293. package/dist/esm/api/resources/agents/client/Client.d.mts +4 -21
  294. package/dist/esm/api/resources/agents/client/Client.mjs +59 -46
  295. package/dist/esm/api/resources/agents/client/requests/AgentCreate.d.mts +0 -3
  296. package/dist/esm/api/resources/agents/client/requests/AgentCreate.mjs +1 -3
  297. package/dist/esm/api/resources/agents/client/requests/index.d.mts +1 -1
  298. package/dist/esm/api/resources/contacts/client/Client.d.mts +4 -21
  299. package/dist/esm/api/resources/contacts/client/Client.mjs +45 -36
  300. package/dist/esm/api/resources/contacts/client/requests/ContactCreate.d.mts +1 -4
  301. package/dist/esm/api/resources/contacts/client/requests/ContactCreate.mjs +1 -3
  302. package/dist/esm/api/resources/contacts/client/requests/index.d.mts +1 -1
  303. package/dist/esm/api/resources/customers/client/Client.d.mts +84 -21
  304. package/dist/esm/api/resources/customers/client/Client.mjs +376 -73
  305. package/dist/esm/api/resources/customers/client/requests/CustomerCreate.d.mts +17 -5
  306. package/dist/esm/api/resources/customers/client/requests/CustomerCreate.mjs +1 -3
  307. package/dist/esm/api/resources/customers/client/requests/CustomersCheckEntitlementRequest.d.mts +14 -0
  308. package/dist/esm/api/resources/customers/client/requests/CustomersCheckEntitlementRequest.mjs +2 -0
  309. package/dist/esm/api/resources/customers/client/requests/CustomersCreatePaymentMethodRequest.d.mts +18 -0
  310. package/dist/esm/api/resources/customers/client/requests/CustomersCreatePaymentMethodRequest.mjs +2 -0
  311. package/dist/esm/api/resources/customers/client/requests/CustomersGetCostsByExternalIdRequest.d.mts +4 -15
  312. package/dist/esm/api/resources/customers/client/requests/CustomersGetCostsByExternalIdRequest.mjs +1 -3
  313. package/dist/esm/api/resources/customers/client/requests/CustomersGetUsageByExternalIdRequest.d.mts +4 -15
  314. package/dist/esm/api/resources/customers/client/requests/CustomersGetUsageByExternalIdRequest.mjs +1 -3
  315. package/dist/esm/api/resources/customers/client/requests/index.d.mts +5 -3
  316. package/dist/esm/api/resources/customers/index.d.mts +1 -0
  317. package/dist/esm/api/resources/customers/index.mjs +1 -0
  318. package/dist/esm/api/resources/customers/types/CustomersCheckEntitlementRequestView.d.mts +5 -0
  319. package/dist/esm/api/resources/customers/types/CustomersCheckEntitlementRequestView.mjs +5 -0
  320. package/dist/esm/api/resources/customers/types/CustomersCheckEntitlementResponse.d.mts +4 -0
  321. package/dist/esm/api/resources/customers/types/CustomersCheckEntitlementResponse.mjs +2 -0
  322. package/dist/esm/api/resources/customers/types/index.d.mts +2 -0
  323. package/dist/esm/api/resources/customers/types/index.mjs +2 -0
  324. package/dist/esm/api/resources/index.d.mts +12 -11
  325. package/dist/esm/api/resources/index.mjs +12 -11
  326. package/dist/esm/api/resources/orders/client/Client.d.mts +82 -20
  327. package/dist/esm/api/resources/orders/client/Client.mjs +325 -31
  328. package/dist/esm/api/resources/orders/client/requests/CancelRenewalRequest.d.mts +13 -0
  329. package/dist/esm/api/resources/orders/client/requests/CancelRenewalRequest.mjs +2 -0
  330. package/dist/esm/api/resources/orders/client/requests/OrderCreate.d.mts +1 -4
  331. package/dist/esm/api/resources/orders/client/requests/OrderCreate.mjs +1 -3
  332. package/dist/esm/api/resources/orders/client/requests/OrdersActivateAndPayRequest.d.mts +13 -0
  333. package/dist/esm/api/resources/orders/client/requests/OrdersActivateAndPayRequest.mjs +2 -0
  334. package/dist/esm/api/resources/orders/client/requests/ProrationUpgradeRequest.d.mts +24 -0
  335. package/dist/esm/api/resources/orders/client/requests/ProrationUpgradeRequest.mjs +2 -0
  336. package/dist/esm/api/resources/orders/client/requests/index.d.mts +4 -1
  337. package/dist/esm/api/resources/orders/resources/index.d.mts +1 -1
  338. package/dist/esm/api/resources/orders/resources/index.mjs +1 -1
  339. package/dist/esm/api/resources/orders/resources/lines/client/Client.d.mts +4 -21
  340. package/dist/esm/api/resources/orders/resources/lines/client/Client.mjs +10 -11
  341. package/dist/esm/api/resources/orders/resources/lines/client/requests/LinesUpdateRequest.d.mts +1 -4
  342. package/dist/esm/api/resources/orders/resources/lines/client/requests/LinesUpdateRequest.mjs +1 -3
  343. package/dist/esm/api/resources/orders/resources/lines/client/requests/index.d.mts +1 -1
  344. package/dist/esm/api/resources/plans/client/Client.d.mts +3 -20
  345. package/dist/esm/api/resources/plans/client/Client.mjs +30 -28
  346. package/dist/esm/api/resources/plans/client/requests/PlansGetUsageRequest.d.mts +5 -18
  347. package/dist/esm/api/resources/plans/client/requests/PlansGetUsageRequest.mjs +1 -3
  348. package/dist/esm/api/resources/plans/client/requests/index.d.mts +1 -1
  349. package/dist/esm/api/resources/products/client/Client.d.mts +4 -21
  350. package/dist/esm/api/resources/products/client/Client.mjs +59 -46
  351. package/dist/esm/api/resources/products/client/requests/ProductCreate.d.mts +1 -4
  352. package/dist/esm/api/resources/products/client/requests/ProductCreate.mjs +1 -3
  353. package/dist/esm/api/resources/products/client/requests/index.d.mts +1 -1
  354. package/dist/esm/api/resources/traces/client/Client.d.mts +3 -20
  355. package/dist/esm/api/resources/traces/client/Client.mjs +19 -21
  356. package/dist/esm/api/resources/traces/client/requests/GetTracesRequest.d.mts +8 -27
  357. package/dist/esm/api/resources/traces/client/requests/GetTracesRequest.mjs +1 -3
  358. package/dist/esm/api/resources/traces/client/requests/index.d.mts +1 -1
  359. package/dist/esm/api/resources/usage/client/Client.d.mts +3 -20
  360. package/dist/esm/api/resources/usage/client/Client.mjs +25 -22
  361. package/dist/esm/api/resources/usage/client/requests/UsageCheckUsageRequest.d.mts +0 -3
  362. package/dist/esm/api/resources/usage/client/requests/UsageCheckUsageRequest.mjs +1 -3
  363. package/dist/esm/api/resources/usage/client/requests/UsageRecordBulkRequest.d.mts +1 -4
  364. package/dist/esm/api/resources/usage/client/requests/UsageRecordBulkRequest.mjs +1 -3
  365. package/dist/esm/api/resources/usage/client/requests/UsageRecordBulkV2Request.d.mts +1 -4
  366. package/dist/esm/api/resources/usage/client/requests/UsageRecordBulkV2Request.mjs +1 -3
  367. package/dist/esm/api/resources/usage/client/requests/index.d.mts +3 -3
  368. package/dist/esm/api/resources/usage/index.d.mts +1 -1
  369. package/dist/esm/api/resources/usage/index.mjs +1 -1
  370. package/dist/esm/api/resources/usage/types/UsageCheckUsageResponse.d.mts +0 -3
  371. package/dist/esm/api/resources/usage/types/UsageCheckUsageResponse.mjs +1 -3
  372. package/dist/esm/api/types/Address.d.mts +0 -3
  373. package/dist/esm/api/types/Address.mjs +1 -3
  374. package/dist/esm/api/types/Agent.d.mts +1 -4
  375. package/dist/esm/api/types/Agent.mjs +1 -3
  376. package/dist/esm/api/types/AgentAttribute.d.mts +1 -4
  377. package/dist/esm/api/types/AgentAttribute.mjs +1 -3
  378. package/dist/esm/api/types/AgentPricePoint.d.mts +1 -4
  379. package/dist/esm/api/types/AgentPricePoint.mjs +1 -3
  380. package/dist/esm/api/types/AgentPricePointTiers.d.mts +0 -3
  381. package/dist/esm/api/types/AgentPricePointTiers.mjs +1 -3
  382. package/dist/esm/api/types/AgentUpdate.d.mts +1 -4
  383. package/dist/esm/api/types/AgentUpdate.mjs +1 -3
  384. package/dist/esm/api/types/ApiError.d.mts +0 -3
  385. package/dist/esm/api/types/ApiError.mjs +1 -3
  386. package/dist/esm/api/types/BillingFrequency.d.mts +1 -4
  387. package/dist/esm/api/types/BillingFrequency.mjs +1 -3
  388. package/dist/esm/api/types/CancelRenewalResponse.d.mts +15 -0
  389. package/dist/esm/api/types/CancelRenewalResponse.mjs +2 -0
  390. package/dist/esm/api/types/ChargeType.d.mts +1 -4
  391. package/dist/esm/api/types/ChargeType.mjs +1 -3
  392. package/dist/esm/api/types/Contact.d.mts +1 -4
  393. package/dist/esm/api/types/Contact.mjs +1 -3
  394. package/dist/esm/api/types/ContactCreateForCustomer.d.mts +15 -0
  395. package/dist/esm/api/types/ContactCreateForCustomer.mjs +2 -0
  396. package/dist/esm/api/types/CostAmount.d.mts +0 -3
  397. package/dist/esm/api/types/CostAmount.mjs +1 -3
  398. package/dist/esm/api/types/CostTrace.d.mts +1 -4
  399. package/dist/esm/api/types/CostTrace.mjs +1 -3
  400. package/dist/esm/api/types/CostTracesResponse.d.mts +1 -4
  401. package/dist/esm/api/types/CostTracesResponse.mjs +1 -3
  402. package/dist/esm/api/types/CreationSource.d.mts +1 -4
  403. package/dist/esm/api/types/CreationSource.mjs +1 -3
  404. package/dist/esm/api/types/CreationState.d.mts +1 -4
  405. package/dist/esm/api/types/CreationState.mjs +1 -3
  406. package/dist/esm/api/types/Customer.d.mts +1 -4
  407. package/dist/esm/api/types/Customer.mjs +1 -3
  408. package/dist/esm/api/types/CustomerUpdate.d.mts +1 -4
  409. package/dist/esm/api/types/CustomerUpdate.mjs +1 -3
  410. package/dist/esm/api/types/EntitlementUsage.d.mts +0 -3
  411. package/dist/esm/api/types/EntitlementUsage.mjs +1 -3
  412. package/dist/esm/api/types/Error_.d.mts +1 -4
  413. package/dist/esm/api/types/Error_.mjs +1 -3
  414. package/dist/esm/api/types/Invoice.d.mts +40 -0
  415. package/dist/esm/api/types/Invoice.mjs +11 -0
  416. package/dist/esm/api/types/Order.d.mts +1 -4
  417. package/dist/esm/api/types/Order.mjs +1 -3
  418. package/dist/esm/api/types/OrderLine.d.mts +1 -4
  419. package/dist/esm/api/types/OrderLine.mjs +1 -3
  420. package/dist/esm/api/types/OrderLineAttribute.d.mts +1 -4
  421. package/dist/esm/api/types/OrderLineAttribute.mjs +1 -3
  422. package/dist/esm/api/types/OrderLineAttributeCreateOne.d.mts +0 -3
  423. package/dist/esm/api/types/OrderLineAttributeCreateOne.mjs +1 -3
  424. package/dist/esm/api/types/OrderLineAttributePricing.d.mts +1 -4
  425. package/dist/esm/api/types/OrderLineAttributePricing.mjs +1 -3
  426. package/dist/esm/api/types/OrderLineCreate.d.mts +1 -4
  427. package/dist/esm/api/types/OrderLineCreate.mjs +1 -3
  428. package/dist/esm/api/types/PaginationMeta.d.mts +0 -3
  429. package/dist/esm/api/types/PaginationMeta.mjs +1 -3
  430. package/dist/esm/api/types/PaymentMethod.d.mts +54 -0
  431. package/dist/esm/api/types/PaymentMethod.mjs +17 -0
  432. package/dist/esm/api/types/Plan.d.mts +3 -3
  433. package/dist/esm/api/types/Plan.mjs +1 -3
  434. package/dist/esm/api/types/PlanGroup.d.mts +1 -4
  435. package/dist/esm/api/types/PlanGroup.mjs +1 -3
  436. package/dist/esm/api/types/PricePoint.d.mts +1 -4
  437. package/dist/esm/api/types/PricePoint.mjs +1 -3
  438. package/dist/esm/api/types/Pricing.d.mts +1 -4
  439. package/dist/esm/api/types/Pricing.mjs +1 -3
  440. package/dist/esm/api/types/PricingModelType.d.mts +1 -4
  441. package/dist/esm/api/types/PricingModelType.mjs +1 -3
  442. package/dist/esm/api/types/Product.d.mts +3 -8
  443. package/dist/esm/api/types/Product.mjs +2 -3
  444. package/dist/esm/api/types/ProductUpdate.d.mts +2 -5
  445. package/dist/esm/api/types/ProductUpdate.mjs +1 -3
  446. package/dist/esm/api/types/ProrationAttributeUpdate.d.mts +11 -0
  447. package/dist/esm/api/types/ProrationAttributeUpdate.mjs +2 -0
  448. package/dist/esm/api/types/ProrationDetail.d.mts +16 -0
  449. package/dist/esm/api/types/ProrationDetail.mjs +2 -0
  450. package/dist/esm/api/types/ProrationUpgradeResponse.d.mts +22 -0
  451. package/dist/esm/api/types/ProrationUpgradeResponse.mjs +2 -0
  452. package/dist/esm/api/types/Salutation.d.mts +1 -4
  453. package/dist/esm/api/types/Salutation.mjs +1 -3
  454. package/dist/esm/api/types/Signal.d.mts +0 -3
  455. package/dist/esm/api/types/Signal.mjs +1 -3
  456. package/dist/esm/api/types/SignalV2.d.mts +0 -3
  457. package/dist/esm/api/types/SignalV2.mjs +1 -3
  458. package/dist/esm/api/types/TaxExemptStatus.d.mts +1 -4
  459. package/dist/esm/api/types/TaxExemptStatus.mjs +1 -3
  460. package/dist/esm/api/types/Tier.d.mts +0 -3
  461. package/dist/esm/api/types/Tier.mjs +1 -3
  462. package/dist/esm/api/types/Trace.d.mts +1 -4
  463. package/dist/esm/api/types/Trace.mjs +1 -3
  464. package/dist/esm/api/types/TracesResponse.d.mts +1 -4
  465. package/dist/esm/api/types/TracesResponse.mjs +1 -3
  466. package/dist/esm/api/types/UsagePaginationMeta.d.mts +0 -3
  467. package/dist/esm/api/types/UsagePaginationMeta.mjs +1 -3
  468. package/dist/esm/api/types/UsageSummariesResponse.d.mts +1 -4
  469. package/dist/esm/api/types/UsageSummariesResponse.mjs +1 -3
  470. package/dist/esm/api/types/UsageSummary.d.mts +0 -3
  471. package/dist/esm/api/types/UsageSummary.mjs +1 -3
  472. package/dist/esm/api/types/index.d.mts +33 -26
  473. package/dist/esm/api/types/index.mjs +33 -26
  474. package/dist/esm/core/auth/AuthProvider.d.mts +4 -0
  475. package/dist/esm/core/auth/AuthProvider.mjs +1 -0
  476. package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
  477. package/dist/esm/core/auth/AuthRequest.mjs +1 -0
  478. package/dist/esm/core/auth/BasicAuth.mjs +5 -4
  479. package/dist/esm/core/auth/index.d.mts +2 -0
  480. package/dist/esm/core/base64.d.mts +2 -0
  481. package/dist/esm/core/base64.mjs +22 -0
  482. package/dist/esm/core/fetcher/APIResponse.d.mts +1 -1
  483. package/dist/esm/core/fetcher/BinaryResponse.d.mts +20 -0
  484. package/dist/esm/core/fetcher/BinaryResponse.mjs +14 -0
  485. package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
  486. package/dist/esm/core/fetcher/EndpointMetadata.mjs +1 -0
  487. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
  488. package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
  489. package/dist/esm/core/fetcher/Fetcher.d.mts +7 -5
  490. package/dist/esm/core/fetcher/Fetcher.mjs +9 -7
  491. package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +1 -1
  492. package/dist/esm/core/fetcher/ResponseWithBody.d.mts +4 -0
  493. package/dist/esm/core/fetcher/ResponseWithBody.mjs +3 -0
  494. package/dist/esm/core/fetcher/createRequestUrl.d.mts +1 -1
  495. package/dist/esm/core/fetcher/createRequestUrl.mjs +3 -4
  496. package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +1 -0
  497. package/dist/esm/core/fetcher/getErrorResponseBody.mjs +42 -0
  498. package/dist/esm/core/fetcher/getFetchFn.d.mts +1 -4
  499. package/dist/esm/core/fetcher/getFetchFn.mjs +1 -19
  500. package/dist/esm/core/fetcher/getResponseBody.mjs +34 -33
  501. package/dist/esm/core/fetcher/index.d.mts +7 -4
  502. package/dist/esm/core/fetcher/index.mjs +3 -2
  503. package/dist/esm/core/fetcher/makeRequest.mjs +2 -2
  504. package/dist/esm/core/fetcher/requestWithRetries.mjs +44 -8
  505. package/dist/esm/core/headers.d.mts +2 -3
  506. package/dist/esm/core/index.d.mts +3 -1
  507. package/dist/esm/core/index.mjs +3 -1
  508. package/dist/esm/core/runtime/runtime.mjs +0 -1
  509. package/dist/esm/core/url/encodePathParam.d.mts +1 -0
  510. package/dist/esm/core/url/encodePathParam.mjs +18 -0
  511. package/dist/esm/core/url/index.d.mts +3 -0
  512. package/dist/esm/core/url/index.mjs +3 -0
  513. package/dist/esm/core/url/join.d.mts +1 -0
  514. package/dist/esm/core/url/join.mjs +66 -0
  515. package/dist/esm/core/url/qs.d.mts +6 -0
  516. package/dist/esm/core/url/qs.mjs +61 -0
  517. package/dist/esm/environments.d.mts +0 -3
  518. package/dist/esm/environments.mjs +1 -3
  519. package/dist/esm/errors/PaidError.d.mts +1 -4
  520. package/dist/esm/errors/PaidError.mjs +2 -4
  521. package/dist/esm/errors/PaidTimeoutError.d.mts +0 -3
  522. package/dist/esm/errors/PaidTimeoutError.mjs +1 -3
  523. package/dist/esm/index.d.mts +1 -2
  524. package/dist/esm/index.mjs +0 -2
  525. package/dist/esm/integrations/adapters/expressjs/base-adapter.d.mts +8 -5
  526. package/dist/esm/integrations/adapters/expressjs/base-adapter.mjs +6 -11
  527. package/dist/esm/integrations/adapters/expressjs/routes.d.mts +14 -12
  528. package/dist/esm/integrations/adapters/expressjs/routes.mjs +18 -9
  529. package/dist/esm/integrations/adapters/nextjs/base-adapter.d.mts +3 -2
  530. package/dist/esm/integrations/adapters/nextjs/base-adapter.mjs +1 -1
  531. package/dist/esm/integrations/adapters/nextjs/routes.d.mts +13 -11
  532. package/dist/esm/integrations/adapters/nextjs/routes.mjs +18 -9
  533. package/dist/esm/integrations/controllers/billing.d.mts +3 -17
  534. package/dist/esm/integrations/controllers/contacts.d.mts +1 -1
  535. package/dist/esm/integrations/controllers/contacts.mjs +1 -0
  536. package/dist/esm/integrations/controllers/customers.d.mts +2 -2
  537. package/dist/esm/integrations/controllers/customers.mjs +1 -0
  538. package/dist/esm/integrations/controllers/invoices.d.mts +2 -6
  539. package/dist/esm/integrations/controllers/orders.d.mts +1 -5
  540. package/dist/esm/integrations/controllers/provision-users.d.mts +1 -1
  541. package/dist/esm/integrations/utils/create-adapter.d.mts +2 -1
  542. package/dist/esm/integrations/utils/create-adapter.mjs +2 -1
  543. package/dist/esm/tracing/autoInstrumentation.mjs +1 -1
  544. package/dist/esm/tracing/spanProcessor.d.mts +2 -2
  545. package/dist/esm/tracing/spanProcessor.mjs +0 -5
  546. package/dist/esm/tracing/tracing.d.mts +1 -1
  547. package/dist/esm/tracing/tracing.mjs +3 -0
  548. package/dist/esm/tracing/wrappers/anthropicWrapper.d.mts +2 -2
  549. package/dist/esm/tracing/wrappers/anthropicWrapper.mjs +1 -0
  550. package/dist/esm/tracing/wrappers/mistralWrapper.d.mts +3 -3
  551. package/dist/esm/tracing/wrappers/mistralWrapper.mjs +1 -0
  552. package/dist/esm/tracing/wrappers/openAiWrapper.d.mts +5 -5
  553. package/dist/esm/tracing/wrappers/openAiWrapper.mjs +1 -0
  554. package/dist/esm/tracing/wrappers/vercelAIWrapper.d.mts +2 -2
  555. package/dist/esm/tracing/wrappers/vercelAIWrapper.mjs +8 -7
  556. package/dist/esm/version.d.mts +1 -1
  557. package/dist/esm/version.mjs +1 -1
  558. package/package.json +40 -28
  559. package/reference.md +985 -396
  560. package/dist/cjs/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
  561. package/dist/cjs/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
  562. package/dist/cjs/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
  563. package/dist/cjs/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
  564. package/dist/cjs/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
  565. package/dist/cjs/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
  566. package/dist/cjs/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
  567. package/dist/cjs/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
  568. package/dist/cjs/wrapper/BatchUsage.d.ts +0 -8
  569. package/dist/cjs/wrapper/BatchUsage.js +0 -62
  570. package/dist/esm/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.mts +0 -30
  571. package/dist/esm/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.mjs +0 -243
  572. package/dist/esm/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.mts +0 -21
  573. package/dist/esm/core/fetcher/stream-wrappers/NodePre18StreamWrapper.mjs +0 -122
  574. package/dist/esm/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.mts +0 -31
  575. package/dist/esm/core/fetcher/stream-wrappers/UndiciStreamWrapper.mjs +0 -225
  576. package/dist/esm/core/fetcher/stream-wrappers/chooseStreamWrapper.d.mts +0 -18
  577. package/dist/esm/wrapper/BatchUsage.d.mts +0 -8
  578. package/dist/esm/wrapper/BatchUsage.mjs +0 -25
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
2
+ // This file was auto-generated by Fern from our API Definition.
5
3
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
4
  if (k2 === undefined) k2 = k;
7
5
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -44,15 +42,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
42
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
43
  });
46
44
  };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
45
  Object.defineProperty(exports, "__esModule", { value: true });
51
46
  exports.Agents = void 0;
52
- const environments = __importStar(require("../../../../environments.js"));
53
- const core = __importStar(require("../../../../core/index.js"));
54
47
  const headers_js_1 = require("../../../../core/headers.js");
55
- const url_join_1 = __importDefault(require("url-join"));
48
+ const core = __importStar(require("../../../../core/index.js"));
49
+ const environments = __importStar(require("../../../../environments.js"));
56
50
  const errors = __importStar(require("../../../../errors/index.js"));
57
51
  class Agents {
58
52
  constructor(_options = {}) {
@@ -71,13 +65,15 @@ class Agents {
71
65
  }
72
66
  __list(requestOptions) {
73
67
  return __awaiter(this, void 0, void 0, function* () {
74
- var _a, _b, _c;
68
+ var _a, _b, _c, _d, _e, _f, _g, _h;
69
+ 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);
75
70
  const _response = yield core.fetcher({
76
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PaidEnvironment.Production, "agents"),
71
+ 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, "agents"),
77
72
  method: "GET",
78
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
80
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
73
+ headers: _headers,
74
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
75
+ 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,
76
+ 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
77
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
82
78
  });
83
79
  if (_response.ok) {
@@ -125,16 +121,18 @@ class Agents {
125
121
  }
126
122
  __create(request, requestOptions) {
127
123
  return __awaiter(this, void 0, void 0, function* () {
128
- var _a, _b, _c;
124
+ var _a, _b, _c, _d, _e, _f, _g, _h;
125
+ 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);
129
126
  const _response = yield core.fetcher({
130
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PaidEnvironment.Production, "agents"),
127
+ 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, "agents"),
131
128
  method: "POST",
132
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
129
+ headers: _headers,
133
130
  contentType: "application/json",
131
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
134
132
  requestType: "json",
135
133
  body: request,
136
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
137
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
134
+ 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,
135
+ 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,
138
136
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
139
137
  });
140
138
  if (_response.ok) {
@@ -178,13 +176,15 @@ class Agents {
178
176
  }
179
177
  __get(agentId, requestOptions) {
180
178
  return __awaiter(this, void 0, void 0, function* () {
181
- var _a, _b, _c;
179
+ var _a, _b, _c, _d, _e, _f, _g, _h;
180
+ 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);
182
181
  const _response = yield core.fetcher({
183
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PaidEnvironment.Production, `agents/${encodeURIComponent(agentId)}`),
182
+ 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, `agents/${core.url.encodePathParam(agentId)}`),
184
183
  method: "GET",
185
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
186
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
187
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
184
+ headers: _headers,
185
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
186
+ 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,
187
+ 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,
188
188
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
189
189
  });
190
190
  if (_response.ok) {
@@ -258,16 +258,18 @@ class Agents {
258
258
  }
259
259
  __update(agentId, request, requestOptions) {
260
260
  return __awaiter(this, void 0, void 0, function* () {
261
- var _a, _b, _c;
261
+ var _a, _b, _c, _d, _e, _f, _g, _h;
262
+ 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);
262
263
  const _response = yield core.fetcher({
263
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PaidEnvironment.Production, `agents/${encodeURIComponent(agentId)}`),
264
+ 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, `agents/${core.url.encodePathParam(agentId)}`),
264
265
  method: "PUT",
265
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
266
+ headers: _headers,
266
267
  contentType: "application/json",
268
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
267
269
  requestType: "json",
268
270
  body: request,
269
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
270
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
271
+ 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,
272
+ 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,
271
273
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
272
274
  });
273
275
  if (_response.ok) {
@@ -311,13 +313,15 @@ class Agents {
311
313
  }
312
314
  __delete(agentId, requestOptions) {
313
315
  return __awaiter(this, void 0, void 0, function* () {
314
- var _a, _b, _c;
316
+ var _a, _b, _c, _d, _e, _f, _g, _h;
317
+ 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);
315
318
  const _response = yield core.fetcher({
316
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PaidEnvironment.Production, `agents/${encodeURIComponent(agentId)}`),
319
+ 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, `agents/${core.url.encodePathParam(agentId)}`),
317
320
  method: "DELETE",
318
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
319
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
320
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
321
+ headers: _headers,
322
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
323
+ 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,
324
+ 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,
321
325
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
322
326
  });
323
327
  if (_response.ok) {
@@ -361,13 +365,15 @@ class Agents {
361
365
  }
362
366
  __getByExternalId(externalId, requestOptions) {
363
367
  return __awaiter(this, void 0, void 0, function* () {
364
- var _a, _b, _c;
368
+ var _a, _b, _c, _d, _e, _f, _g, _h;
369
+ 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);
365
370
  const _response = yield core.fetcher({
366
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PaidEnvironment.Production, `agents/external/${encodeURIComponent(externalId)}`),
371
+ 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, `agents/external/${core.url.encodePathParam(externalId)}`),
367
372
  method: "GET",
368
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
369
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
370
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
373
+ headers: _headers,
374
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
375
+ 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,
376
+ 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,
371
377
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
372
378
  });
373
379
  if (_response.ok) {
@@ -430,16 +436,18 @@ class Agents {
430
436
  }
431
437
  __updateByExternalId(externalId, request, requestOptions) {
432
438
  return __awaiter(this, void 0, void 0, function* () {
433
- var _a, _b, _c;
439
+ var _a, _b, _c, _d, _e, _f, _g, _h;
440
+ 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);
434
441
  const _response = yield core.fetcher({
435
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PaidEnvironment.Production, `agents/external/${encodeURIComponent(externalId)}`),
442
+ 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, `agents/external/${core.url.encodePathParam(externalId)}`),
436
443
  method: "PUT",
437
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
444
+ headers: _headers,
438
445
  contentType: "application/json",
446
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
439
447
  requestType: "json",
440
448
  body: request,
441
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
442
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
449
+ 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,
450
+ 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,
443
451
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
444
452
  });
445
453
  if (_response.ok) {
@@ -483,13 +491,15 @@ class Agents {
483
491
  }
484
492
  __deleteByExternalId(externalId, requestOptions) {
485
493
  return __awaiter(this, void 0, void 0, function* () {
486
- var _a, _b, _c;
494
+ var _a, _b, _c, _d, _e, _f, _g, _h;
495
+ 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);
487
496
  const _response = yield core.fetcher({
488
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PaidEnvironment.Production, `agents/external/${encodeURIComponent(externalId)}`),
497
+ 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, `agents/external/${core.url.encodePathParam(externalId)}`),
489
498
  method: "DELETE",
490
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
491
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
492
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
499
+ headers: _headers,
500
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
501
+ 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,
502
+ 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,
493
503
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
494
504
  });
495
505
  if (_response.ok) {
@@ -1,6 +1,3 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
1
  /**
5
2
  * @example
6
3
  * {
@@ -1,5 +1,3 @@
1
1
  "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
2
+ // This file was auto-generated by Fern from our API Definition.
5
3
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1 @@
1
- export { type AgentCreate } from "./AgentCreate.js";
1
+ export type { AgentCreate } from "./AgentCreate.js";
@@ -1,27 +1,10 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as environments from "../../../../environments.js";
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
5
2
  import * as core from "../../../../core/index.js";
6
- import * as Paid from "../../../index.js";
3
+ import type * as Paid from "../../../index.js";
7
4
  export declare namespace Contacts {
8
- interface Options {
9
- environment?: core.Supplier<environments.PaidEnvironment | string>;
10
- /** Specify a custom URL to connect the client to. */
11
- baseUrl?: core.Supplier<string>;
12
- token?: core.Supplier<core.BearerToken | undefined>;
13
- /** Additional headers to include in requests. */
14
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
5
+ interface Options extends BaseClientOptions {
15
6
  }
16
- interface RequestOptions {
17
- /** The maximum time to wait for a response in seconds. */
18
- timeoutInSeconds?: number;
19
- /** The number of times to retry the request. Defaults to 2. */
20
- maxRetries?: number;
21
- /** A hook to abort the request. */
22
- abortSignal?: AbortSignal;
23
- /** Additional headers to include in the request. */
24
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
7
+ interface RequestOptions extends BaseRequestOptions {
25
8
  }
26
9
  }
27
10
  export declare class Contacts {
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
2
+ // This file was auto-generated by Fern from our API Definition.
5
3
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
4
  if (k2 === undefined) k2 = k;
7
5
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -44,15 +42,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
42
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
43
  });
46
44
  };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
45
  Object.defineProperty(exports, "__esModule", { value: true });
51
46
  exports.Contacts = void 0;
52
- const environments = __importStar(require("../../../../environments.js"));
53
- const core = __importStar(require("../../../../core/index.js"));
54
47
  const headers_js_1 = require("../../../../core/headers.js");
55
- const url_join_1 = __importDefault(require("url-join"));
48
+ const core = __importStar(require("../../../../core/index.js"));
49
+ const environments = __importStar(require("../../../../environments.js"));
56
50
  const errors = __importStar(require("../../../../errors/index.js"));
57
51
  class Contacts {
58
52
  constructor(_options = {}) {
@@ -69,13 +63,15 @@ class Contacts {
69
63
  }
70
64
  __list(requestOptions) {
71
65
  return __awaiter(this, void 0, void 0, function* () {
72
- var _a, _b, _c;
66
+ var _a, _b, _c, _d, _e, _f, _g, _h;
67
+ 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);
73
68
  const _response = yield core.fetcher({
74
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PaidEnvironment.Production, "contacts"),
69
+ 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, "contacts"),
75
70
  method: "GET",
76
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
77
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
78
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
71
+ headers: _headers,
72
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
73
+ 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,
74
+ 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,
79
75
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
80
76
  });
81
77
  if (_response.ok) {
@@ -123,16 +119,18 @@ class Contacts {
123
119
  }
124
120
  __create(request, requestOptions) {
125
121
  return __awaiter(this, void 0, void 0, function* () {
126
- var _a, _b, _c;
122
+ var _a, _b, _c, _d, _e, _f, _g, _h;
123
+ 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);
127
124
  const _response = yield core.fetcher({
128
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PaidEnvironment.Production, "contacts"),
125
+ 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, "contacts"),
129
126
  method: "POST",
130
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
127
+ headers: _headers,
131
128
  contentType: "application/json",
129
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
132
130
  requestType: "json",
133
131
  body: request,
134
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
135
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
132
+ 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,
133
+ 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,
136
134
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
137
135
  });
138
136
  if (_response.ok) {
@@ -174,13 +172,15 @@ class Contacts {
174
172
  }
175
173
  __get(contactId, requestOptions) {
176
174
  return __awaiter(this, void 0, void 0, function* () {
177
- var _a, _b, _c;
175
+ var _a, _b, _c, _d, _e, _f, _g, _h;
176
+ 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);
178
177
  const _response = yield core.fetcher({
179
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PaidEnvironment.Production, `contacts/${encodeURIComponent(contactId)}`),
178
+ 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, `contacts/${core.url.encodePathParam(contactId)}`),
180
179
  method: "GET",
181
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
182
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
183
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
180
+ headers: _headers,
181
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
182
+ 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,
183
+ 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,
184
184
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
185
185
  });
186
186
  if (_response.ok) {
@@ -222,13 +222,15 @@ class Contacts {
222
222
  }
223
223
  __delete(contactId, requestOptions) {
224
224
  return __awaiter(this, void 0, void 0, function* () {
225
- var _a, _b, _c;
225
+ var _a, _b, _c, _d, _e, _f, _g, _h;
226
+ 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);
226
227
  const _response = yield core.fetcher({
227
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PaidEnvironment.Production, `contacts/${encodeURIComponent(contactId)}`),
228
+ 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, `contacts/${core.url.encodePathParam(contactId)}`),
228
229
  method: "DELETE",
229
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
230
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
231
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
230
+ headers: _headers,
231
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
232
+ 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,
233
+ 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,
232
234
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
233
235
  });
234
236
  if (_response.ok) {
@@ -270,13 +272,15 @@ class Contacts {
270
272
  }
271
273
  __getByExternalId(externalId, requestOptions) {
272
274
  return __awaiter(this, void 0, void 0, function* () {
273
- var _a, _b, _c;
275
+ var _a, _b, _c, _d, _e, _f, _g, _h;
276
+ 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);
274
277
  const _response = yield core.fetcher({
275
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PaidEnvironment.Production, `contacts/external/${encodeURIComponent(externalId)}`),
278
+ 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, `contacts/external/${core.url.encodePathParam(externalId)}`),
276
279
  method: "GET",
277
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
278
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
279
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
280
+ headers: _headers,
281
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
282
+ 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,
283
+ 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,
280
284
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
281
285
  });
282
286
  if (_response.ok) {
@@ -318,13 +322,15 @@ class Contacts {
318
322
  }
319
323
  __deleteByExternalId(externalId, requestOptions) {
320
324
  return __awaiter(this, void 0, void 0, function* () {
321
- var _a, _b, _c;
325
+ var _a, _b, _c, _d, _e, _f, _g, _h;
326
+ 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);
322
327
  const _response = yield core.fetcher({
323
- url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PaidEnvironment.Production, `contacts/external/${encodeURIComponent(externalId)}`),
328
+ 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, `contacts/external/${core.url.encodePathParam(externalId)}`),
324
329
  method: "DELETE",
325
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
326
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
327
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
330
+ headers: _headers,
331
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
332
+ 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,
333
+ 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,
328
334
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
329
335
  });
330
336
  if (_response.ok) {
@@ -1,7 +1,4 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Paid from "../../../../index.js";
1
+ import type * as Paid from "../../../../index.js";
5
2
  /**
6
3
  * @example
7
4
  * {
@@ -1,5 +1,3 @@
1
1
  "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
2
+ // This file was auto-generated by Fern from our API Definition.
5
3
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1 @@
1
- export { type ContactCreate } from "./ContactCreate.js";
1
+ export type { ContactCreate } from "./ContactCreate.js";
@@ -1,27 +1,10 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as environments from "../../../../environments.js";
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
5
2
  import * as core from "../../../../core/index.js";
6
3
  import * as Paid from "../../../index.js";
7
4
  export declare namespace Customers {
8
- interface Options {
9
- environment?: core.Supplier<environments.PaidEnvironment | string>;
10
- /** Specify a custom URL to connect the client to. */
11
- baseUrl?: core.Supplier<string>;
12
- token?: core.Supplier<core.BearerToken | undefined>;
13
- /** Additional headers to include in requests. */
14
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
5
+ interface Options extends BaseClientOptions {
15
6
  }
16
- interface RequestOptions {
17
- /** The maximum time to wait for a response in seconds. */
18
- timeoutInSeconds?: number;
19
- /** The number of times to retry the request. Defaults to 2. */
20
- maxRetries?: number;
21
- /** A hook to abort the request. */
22
- abortSignal?: AbortSignal;
23
- /** Additional headers to include in the request. */
24
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
7
+ interface RequestOptions extends BaseRequestOptions {
25
8
  }
26
9
  }
27
10
  export declare class Customers {
@@ -42,7 +25,20 @@ export declare class Customers {
42
25
  * @example
43
26
  * await client.customers.create({
44
27
  * name: "Acme, Inc.",
45
- * externalId: "acme-inc"
28
+ * externalId: "acme-inc",
29
+ * contacts: [{
30
+ * salutation: "Mr.",
31
+ * firstName: "John",
32
+ * lastName: "Doe",
33
+ * accountName: "Acme, Inc.",
34
+ * email: "john.doe@acme.com",
35
+ * phone: "+1-555-0100",
36
+ * billingStreet: "123 Main Street",
37
+ * billingCity: "San Francisco",
38
+ * billingStateProvince: "CA",
39
+ * billingCountry: "USA",
40
+ * billingPostalCode: "94102"
41
+ * }]
46
42
  * })
47
43
  */
48
44
  create(request: Paid.CustomerCreate, requestOptions?: Customers.RequestOptions): core.HttpResponsePromise<Paid.Customer>;
@@ -80,6 +76,22 @@ export declare class Customers {
80
76
  */
81
77
  delete(customerId: string, requestOptions?: Customers.RequestOptions): core.HttpResponsePromise<void>;
82
78
  private __delete;
79
+ /**
80
+ * @param {string} customerId - The customer ID
81
+ * @param {Paid.CustomersCheckEntitlementRequest} request
82
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
83
+ *
84
+ * @throws {@link Paid.BadRequestError}
85
+ * @throws {@link Paid.NotFoundError}
86
+ *
87
+ * @example
88
+ * await client.customers.checkEntitlement("customerId", {
89
+ * event_name: "event_name",
90
+ * view: "all"
91
+ * })
92
+ */
93
+ checkEntitlement(customerId: string, request: Paid.CustomersCheckEntitlementRequest, requestOptions?: Customers.RequestOptions): core.HttpResponsePromise<Paid.CustomersCheckEntitlementResponse>;
94
+ private __checkEntitlement;
83
95
  /**
84
96
  * @param {string} customerId - The customer ID
85
97
  * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
@@ -157,5 +169,56 @@ export declare class Customers {
157
169
  */
158
170
  getUsageByExternalId(externalId: string, request?: Paid.CustomersGetUsageByExternalIdRequest, requestOptions?: Customers.RequestOptions): core.HttpResponsePromise<Paid.UsageSummariesResponse>;
159
171
  private __getUsageByExternalId;
172
+ /**
173
+ * Retrieves all payment methods associated with a customer identified by their external ID.
174
+ *
175
+ * @param {string} externalId - The external ID of the customer
176
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
177
+ *
178
+ * @throws {@link Paid.ForbiddenError}
179
+ * @throws {@link Paid.NotFoundError}
180
+ *
181
+ * @example
182
+ * await client.customers.listPaymentMethods("externalId")
183
+ */
184
+ listPaymentMethods(externalId: string, requestOptions?: Customers.RequestOptions): core.HttpResponsePromise<Paid.PaymentMethod[]>;
185
+ private __listPaymentMethods;
186
+ /**
187
+ * Creates a new payment method for a customer using a Stripe confirmation token.
188
+ *
189
+ * @param {string} externalId - The external ID of the customer
190
+ * @param {Paid.CustomersCreatePaymentMethodRequest} request
191
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
192
+ *
193
+ * @throws {@link Paid.BadRequestError}
194
+ * @throws {@link Paid.ForbiddenError}
195
+ * @throws {@link Paid.NotFoundError}
196
+ *
197
+ * @example
198
+ * await client.customers.createPaymentMethod("externalId", {
199
+ * confirmationToken: "ctoken_1234567890",
200
+ * returnUrl: "https://example.com/payment-method-added",
201
+ * metadata: {
202
+ * "source": "api"
203
+ * }
204
+ * })
205
+ */
206
+ createPaymentMethod(externalId: string, request: Paid.CustomersCreatePaymentMethodRequest, requestOptions?: Customers.RequestOptions): core.HttpResponsePromise<Paid.PaymentMethod>;
207
+ private __createPaymentMethod;
208
+ /**
209
+ * Deletes a specific payment method from a customer's account.
210
+ *
211
+ * @param {string} externalId - The external ID of the customer
212
+ * @param {string} paymentMethodId - The ID of the payment method to delete
213
+ * @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
214
+ *
215
+ * @throws {@link Paid.ForbiddenError}
216
+ * @throws {@link Paid.NotFoundError}
217
+ *
218
+ * @example
219
+ * await client.customers.deletePaymentMethod("externalId", "paymentMethodId")
220
+ */
221
+ deletePaymentMethod(externalId: string, paymentMethodId: string, requestOptions?: Customers.RequestOptions): core.HttpResponsePromise<void>;
222
+ private __deletePaymentMethod;
160
223
  protected _getAuthorizationHeader(): Promise<string | undefined>;
161
224
  }