vayu-ts 0.2.5 → 0.2.7

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 (321) hide show
  1. package/dist/openapi/apis/AuthApi.js +47 -61
  2. package/dist/openapi/apis/ContractsApi.js +203 -232
  3. package/dist/openapi/apis/CreditsApi.js +162 -186
  4. package/dist/openapi/apis/CustomersApi.d.ts +15 -0
  5. package/dist/openapi/apis/CustomersApi.js +378 -353
  6. package/dist/openapi/apis/EventsApi.js +282 -316
  7. package/dist/openapi/apis/IntegrationsApi.js +105 -124
  8. package/dist/openapi/apis/InvoicesApi.js +100 -119
  9. package/dist/openapi/apis/MetersApi.js +211 -240
  10. package/dist/openapi/apis/PlansApi.js +150 -174
  11. package/dist/openapi/apis/ProductConsumptionsApi.d.ts +25 -0
  12. package/dist/openapi/apis/ProductConsumptionsApi.js +82 -0
  13. package/dist/openapi/apis/ReportsApi.js +100 -119
  14. package/dist/openapi/apis/WebhooksApi.js +55 -69
  15. package/dist/openapi/auth/auth.d.ts +1 -0
  16. package/dist/openapi/auth/auth.js +2 -13
  17. package/dist/openapi/configuration.d.ts +8 -2
  18. package/dist/openapi/http/http.d.ts +7 -20
  19. package/dist/openapi/http/http.js +15 -25
  20. package/dist/openapi/index.d.ts +4 -3
  21. package/dist/openapi/index.js +4 -1
  22. package/dist/openapi/models/Address.d.ts +3 -0
  23. package/dist/openapi/models/Address.js +1 -0
  24. package/dist/openapi/models/AggregationMethod.d.ts +3 -0
  25. package/dist/openapi/models/AggregationMethod.js +1 -0
  26. package/dist/openapi/models/Condition.d.ts +3 -0
  27. package/dist/openapi/models/Condition.js +1 -0
  28. package/dist/openapi/models/Contact.d.ts +4 -1
  29. package/dist/openapi/models/Contact.js +3 -2
  30. package/dist/openapi/models/ContractStatus.d.ts +1 -0
  31. package/dist/openapi/models/ContractStatus.js +1 -0
  32. package/dist/openapi/models/CreateContractRequest.d.ts +3 -0
  33. package/dist/openapi/models/CreateContractRequest.js +1 -0
  34. package/dist/openapi/models/CreateContractResponse.d.ts +3 -0
  35. package/dist/openapi/models/CreateContractResponse.js +1 -0
  36. package/dist/openapi/models/CreateCustomerRequest.d.ts +3 -0
  37. package/dist/openapi/models/CreateCustomerRequest.js +1 -0
  38. package/dist/openapi/models/CreateCustomerResponse.d.ts +3 -0
  39. package/dist/openapi/models/CreateCustomerResponse.js +1 -0
  40. package/dist/openapi/models/CreateCustomerResponseCustomer.d.ts +3 -0
  41. package/dist/openapi/models/CreateCustomerResponseCustomer.js +1 -0
  42. package/dist/openapi/models/CreditLedgerEntry.d.ts +3 -0
  43. package/dist/openapi/models/CreditLedgerEntry.js +1 -0
  44. package/dist/openapi/models/Criterion.d.ts +3 -0
  45. package/dist/openapi/models/Criterion.js +1 -0
  46. package/dist/openapi/models/CriterionOperator.d.ts +3 -1
  47. package/dist/openapi/models/CriterionOperator.js +2 -0
  48. package/dist/openapi/models/DeductCreditsRequest.d.ts +3 -0
  49. package/dist/openapi/models/DeductCreditsRequest.js +1 -0
  50. package/dist/openapi/models/DeleteContractResponse.d.ts +3 -0
  51. package/dist/openapi/models/DeleteContractResponse.js +1 -0
  52. package/dist/openapi/models/DeleteContractResponseContract.d.ts +3 -0
  53. package/dist/openapi/models/DeleteContractResponseContract.js +1 -0
  54. package/dist/openapi/models/DeleteCustomerResponse.d.ts +3 -0
  55. package/dist/openapi/models/DeleteCustomerResponse.js +1 -0
  56. package/dist/openapi/models/DeleteCustomerResponseCustomer.d.ts +3 -0
  57. package/dist/openapi/models/DeleteCustomerResponseCustomer.js +1 -0
  58. package/dist/openapi/models/DeleteEventResponse.d.ts +3 -0
  59. package/dist/openapi/models/DeleteEventResponse.js +1 -0
  60. package/dist/openapi/models/DeleteEventResponseEvent.d.ts +3 -0
  61. package/dist/openapi/models/DeleteEventResponseEvent.js +1 -0
  62. package/dist/openapi/models/DeleteMeterResponse.d.ts +3 -0
  63. package/dist/openapi/models/DeleteMeterResponse.js +1 -0
  64. package/dist/openapi/models/DeleteMeterResponseMeter.d.ts +3 -0
  65. package/dist/openapi/models/DeleteMeterResponseMeter.js +1 -0
  66. package/dist/openapi/models/DeletePlanResponse.d.ts +3 -0
  67. package/dist/openapi/models/DeletePlanResponse.js +1 -0
  68. package/dist/openapi/models/DeletePlanResponsePlan.d.ts +3 -0
  69. package/dist/openapi/models/DeletePlanResponsePlan.js +1 -0
  70. package/dist/openapi/models/Event.d.ts +3 -0
  71. package/dist/openapi/models/Event.js +1 -0
  72. package/dist/openapi/models/EventsDryRunRequest.d.ts +3 -0
  73. package/dist/openapi/models/EventsDryRunRequest.js +1 -0
  74. package/dist/openapi/models/EventsDryRunResponse.d.ts +3 -0
  75. package/dist/openapi/models/EventsDryRunResponse.js +1 -0
  76. package/dist/openapi/models/EventsDryRunResponseObject.d.ts +3 -0
  77. package/dist/openapi/models/EventsDryRunResponseObject.js +1 -0
  78. package/dist/openapi/models/EventsDryRunResponseObjectEvent.d.ts +3 -0
  79. package/dist/openapi/models/EventsDryRunResponseObjectEvent.js +1 -0
  80. package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.d.ts +3 -0
  81. package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.js +1 -0
  82. package/dist/openapi/models/Filter.d.ts +3 -0
  83. package/dist/openapi/models/Filter.js +1 -0
  84. package/dist/openapi/models/FullDayPeriod.d.ts +3 -0
  85. package/dist/openapi/models/FullDayPeriod.js +1 -0
  86. package/dist/openapi/models/GetCommitmentReportResponse.d.ts +5 -0
  87. package/dist/openapi/models/GetCommitmentReportResponse.js +13 -0
  88. package/dist/openapi/models/GetContractResponse.d.ts +3 -0
  89. package/dist/openapi/models/GetContractResponse.js +1 -0
  90. package/dist/openapi/models/GetContractResponseContract.d.ts +3 -0
  91. package/dist/openapi/models/GetContractResponseContract.js +1 -0
  92. package/dist/openapi/models/GetCustomerProductsConsumptionsResponse.d.ts +32 -0
  93. package/dist/openapi/models/GetCustomerProductsConsumptionsResponse.js +32 -0
  94. package/dist/openapi/models/GetCustomerResponse.d.ts +3 -0
  95. package/dist/openapi/models/GetCustomerResponse.js +1 -0
  96. package/dist/openapi/models/GetEventResponse.d.ts +3 -0
  97. package/dist/openapi/models/GetEventResponse.js +1 -0
  98. package/dist/openapi/models/GetEventResponseEvent.d.ts +3 -0
  99. package/dist/openapi/models/GetEventResponseEvent.js +1 -0
  100. package/dist/openapi/models/GetInvoiceResponse.d.ts +3 -0
  101. package/dist/openapi/models/GetInvoiceResponse.js +1 -0
  102. package/dist/openapi/models/GetInvoiceResponseInvoice.d.ts +3 -0
  103. package/dist/openapi/models/GetInvoiceResponseInvoice.js +1 -0
  104. package/dist/openapi/models/GetMeterResponse.d.ts +3 -0
  105. package/dist/openapi/models/GetMeterResponse.js +1 -0
  106. package/dist/openapi/models/GetMeterResponseMeter.d.ts +3 -0
  107. package/dist/openapi/models/GetMeterResponseMeter.js +1 -0
  108. package/dist/openapi/models/GetPlanResponse.d.ts +3 -0
  109. package/dist/openapi/models/GetPlanResponse.js +1 -0
  110. package/dist/openapi/models/GetPlanResponsePlan.d.ts +3 -0
  111. package/dist/openapi/models/GetPlanResponsePlan.js +1 -0
  112. package/dist/openapi/models/GetProductConsumptionResponse.d.ts +32 -0
  113. package/dist/openapi/models/GetProductConsumptionResponse.js +32 -0
  114. package/dist/openapi/models/GetProductConsumptionResponseProductConsumption.d.ts +59 -0
  115. package/dist/openapi/models/GetProductConsumptionResponseProductConsumption.js +74 -0
  116. package/dist/openapi/models/GetProductsUsageReportResponse.d.ts +5 -0
  117. package/dist/openapi/models/GetProductsUsageReportResponse.js +13 -0
  118. package/dist/openapi/models/GrantCreditsRequest.d.ts +3 -0
  119. package/dist/openapi/models/GrantCreditsRequest.js +1 -0
  120. package/dist/openapi/models/InvalidEvent.d.ts +3 -0
  121. package/dist/openapi/models/InvalidEvent.js +1 -0
  122. package/dist/openapi/models/LineItem.d.ts +3 -0
  123. package/dist/openapi/models/LineItem.js +1 -0
  124. package/dist/openapi/models/LineItemRevenueBreakdown.d.ts +3 -0
  125. package/dist/openapi/models/LineItemRevenueBreakdown.js +1 -0
  126. package/dist/openapi/models/ListContractsResponse.d.ts +3 -0
  127. package/dist/openapi/models/ListContractsResponse.js +1 -0
  128. package/dist/openapi/models/ListCreditLedgerEntriesResponse.d.ts +3 -0
  129. package/dist/openapi/models/ListCreditLedgerEntriesResponse.js +1 -0
  130. package/dist/openapi/models/ListCustomersResponse.d.ts +3 -0
  131. package/dist/openapi/models/ListCustomersResponse.js +1 -0
  132. package/dist/openapi/models/ListInvoicesResponse.d.ts +3 -0
  133. package/dist/openapi/models/ListInvoicesResponse.js +1 -0
  134. package/dist/openapi/models/ListMetersResponse.d.ts +3 -0
  135. package/dist/openapi/models/ListMetersResponse.js +1 -0
  136. package/dist/openapi/models/ListPlansResponse.d.ts +3 -0
  137. package/dist/openapi/models/ListPlansResponse.js +1 -0
  138. package/dist/openapi/models/LoginRequest.d.ts +3 -0
  139. package/dist/openapi/models/LoginRequest.js +1 -0
  140. package/dist/openapi/models/LoginResponse.d.ts +3 -0
  141. package/dist/openapi/models/LoginResponse.js +1 -0
  142. package/dist/openapi/models/Meter.d.ts +3 -0
  143. package/dist/openapi/models/Meter.js +1 -0
  144. package/dist/openapi/models/NetSuiteExportSalesOrderRequest.d.ts +3 -0
  145. package/dist/openapi/models/NetSuiteExportSalesOrderRequest.js +1 -0
  146. package/dist/openapi/models/NetSuiteSyncInvoicesRequest.d.ts +3 -0
  147. package/dist/openapi/models/NetSuiteSyncInvoicesRequest.js +1 -0
  148. package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.d.ts +3 -0
  149. package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.js +1 -0
  150. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataEntity.d.ts +3 -0
  151. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataEntity.js +1 -0
  152. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.d.ts +3 -0
  153. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.js +1 -0
  154. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.d.ts +3 -0
  155. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.js +1 -0
  156. package/dist/openapi/models/NetSuiteSyncInvoicesResponse.d.ts +3 -0
  157. package/dist/openapi/models/NetSuiteSyncInvoicesResponse.js +1 -0
  158. package/dist/openapi/models/NotificationEventType.d.ts +2 -1
  159. package/dist/openapi/models/NotificationEventType.js +1 -0
  160. package/dist/openapi/models/ObjectSerializer.d.ts +6 -0
  161. package/dist/openapi/models/ObjectSerializer.js +68 -11
  162. package/dist/openapi/models/PlanBillingData.d.ts +5 -1
  163. package/dist/openapi/models/PlanBillingData.js +2 -1
  164. package/dist/{openapi-v2/models/UpdateEventPayload.d.ts → openapi/models/PlanDuration.d.ts} +7 -10
  165. package/dist/openapi/models/PlanDuration.js +25 -0
  166. package/dist/openapi/models/ProductConsumption.d.ts +59 -0
  167. package/dist/openapi/models/ProductConsumption.js +74 -0
  168. package/dist/openapi/models/QueryEventsResponse.d.ts +3 -0
  169. package/dist/openapi/models/QueryEventsResponse.js +1 -0
  170. package/dist/openapi/models/QueryEventsResponseEventsInner.d.ts +3 -0
  171. package/dist/openapi/models/QueryEventsResponseEventsInner.js +1 -0
  172. package/dist/openapi/models/SendEventsRequest.d.ts +3 -0
  173. package/dist/openapi/models/SendEventsRequest.js +1 -0
  174. package/dist/openapi/models/SendEventsResponse.d.ts +3 -0
  175. package/dist/openapi/models/SendEventsResponse.js +1 -0
  176. package/dist/openapi/models/UnlimitedDuration.d.ts +14 -0
  177. package/dist/openapi/models/UnlimitedDuration.js +18 -0
  178. package/dist/openapi/models/UpdateCustomerRequest.d.ts +3 -0
  179. package/dist/openapi/models/UpdateCustomerRequest.js +1 -0
  180. package/dist/openapi/models/UpdateCustomerResponse.d.ts +3 -0
  181. package/dist/openapi/models/UpdateCustomerResponse.js +1 -0
  182. package/dist/openapi/models/UpdateMeterRequest.d.ts +3 -0
  183. package/dist/openapi/models/UpdateMeterRequest.js +1 -0
  184. package/dist/openapi/models/UpdateMeterResponse.d.ts +3 -0
  185. package/dist/openapi/models/UpdateMeterResponse.js +1 -0
  186. package/dist/openapi/models/WebhookSubscribeRequest.d.ts +3 -0
  187. package/dist/openapi/models/WebhookSubscribeRequest.js +1 -0
  188. package/dist/openapi/models/all.d.ts +6 -0
  189. package/dist/openapi/models/all.js +6 -0
  190. package/dist/openapi/servers.js +2 -3
  191. package/dist/openapi/types/ObservableAPI.d.ts +138 -105
  192. package/dist/openapi/types/ObservableAPI.js +1185 -138
  193. package/dist/openapi/types/PromiseAPI.d.ts +136 -105
  194. package/dist/openapi/types/PromiseAPI.js +852 -108
  195. package/dist/openapi-v2/apis/AuthenticationApi.js +35 -49
  196. package/dist/openapi-v2/apis/CustomersApi.d.ts +15 -9
  197. package/dist/openapi-v2/apis/CustomersApi.js +245 -278
  198. package/dist/openapi-v2/apis/EntitlementsApi.d.ts +6 -3
  199. package/dist/openapi-v2/apis/EntitlementsApi.js +104 -125
  200. package/dist/openapi-v2/apis/EventsApi.d.ts +8 -4
  201. package/dist/openapi-v2/apis/EventsApi.js +144 -169
  202. package/dist/openapi-v2/apis/InvoicesApi.d.ts +13 -7
  203. package/dist/openapi-v2/apis/InvoicesApi.js +227 -260
  204. package/dist/openapi-v2/apis/ProductsApi.d.ts +11 -6
  205. package/dist/openapi-v2/apis/ProductsApi.js +193 -222
  206. package/dist/openapi-v2/auth/auth.d.ts +1 -0
  207. package/dist/openapi-v2/configuration.d.ts +8 -2
  208. package/dist/openapi-v2/http/http.d.ts +7 -20
  209. package/dist/openapi-v2/http/http.js +15 -25
  210. package/dist/openapi-v2/index.d.ts +3 -2
  211. package/dist/openapi-v2/index.js +3 -1
  212. package/dist/openapi-v2/models/APICreateCustomerPayload.d.ts +3 -0
  213. package/dist/openapi-v2/models/APICreateCustomerPayload.js +1 -0
  214. package/dist/openapi-v2/models/APICreateInvoicePayload.d.ts +3 -0
  215. package/dist/openapi-v2/models/APICreateInvoicePayload.js +1 -0
  216. package/dist/openapi-v2/models/APICreateProductPayload.d.ts +3 -0
  217. package/dist/openapi-v2/models/APICreateProductPayload.js +1 -0
  218. package/dist/openapi-v2/models/APICustomer.d.ts +3 -0
  219. package/dist/openapi-v2/models/APICustomer.js +1 -0
  220. package/dist/openapi-v2/models/APIEntitlement.d.ts +3 -0
  221. package/dist/openapi-v2/models/APIEntitlement.js +1 -0
  222. package/dist/openapi-v2/models/APIEvent.d.ts +3 -0
  223. package/dist/openapi-v2/models/APIEvent.js +1 -0
  224. package/dist/openapi-v2/models/APIIngestEventPayload.d.ts +3 -0
  225. package/dist/openapi-v2/models/APIIngestEventPayload.js +1 -0
  226. package/dist/openapi-v2/models/APIInvoice.d.ts +3 -0
  227. package/dist/openapi-v2/models/APIInvoice.js +1 -0
  228. package/dist/openapi-v2/models/APIInvoiceBillingPeriod.d.ts +3 -0
  229. package/dist/openapi-v2/models/APIInvoiceBillingPeriod.js +1 -0
  230. package/dist/openapi-v2/models/APIProduct.d.ts +3 -0
  231. package/dist/openapi-v2/models/APIProduct.js +1 -0
  232. package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.d.ts +3 -0
  233. package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.js +1 -0
  234. package/dist/openapi-v2/models/APIQueryPayloadAPIEntitlement.d.ts +3 -0
  235. package/dist/openapi-v2/models/APIQueryPayloadAPIEntitlement.js +1 -0
  236. package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.d.ts +3 -0
  237. package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.js +1 -0
  238. package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.d.ts +3 -0
  239. package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.js +1 -0
  240. package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.d.ts +3 -0
  241. package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.js +1 -0
  242. package/dist/openapi-v2/models/APIUpdateCustomerPayload.d.ts +3 -0
  243. package/dist/openapi-v2/models/APIUpdateCustomerPayload.js +1 -0
  244. package/dist/openapi-v2/models/APIUpdateInvoicePayload.d.ts +3 -0
  245. package/dist/openapi-v2/models/APIUpdateInvoicePayload.js +1 -0
  246. package/dist/openapi-v2/models/APIUpdateProductPayload.d.ts +3 -0
  247. package/dist/openapi-v2/models/APIUpdateProductPayload.js +1 -0
  248. package/dist/openapi-v2/models/Aggregation.d.ts +3 -0
  249. package/dist/openapi-v2/models/Aggregation.js +1 -0
  250. package/dist/openapi-v2/models/Condition.d.ts +3 -0
  251. package/dist/openapi-v2/models/Condition.js +1 -0
  252. package/dist/openapi-v2/models/Criterion.d.ts +3 -0
  253. package/dist/openapi-v2/models/Criterion.js +1 -0
  254. package/dist/openapi-v2/models/CriterionValue.d.ts +3 -0
  255. package/dist/openapi-v2/models/CriterionValue.js +1 -0
  256. package/dist/openapi-v2/models/EntitlementRevision.d.ts +3 -0
  257. package/dist/openapi-v2/models/EntitlementRevision.js +1 -0
  258. package/dist/openapi-v2/models/IngestEventToTheSystem201Response.d.ts +3 -0
  259. package/dist/openapi-v2/models/IngestEventToTheSystem201Response.js +1 -0
  260. package/dist/openapi-v2/models/InvoiceProductBreakdown.d.ts +3 -0
  261. package/dist/openapi-v2/models/InvoiceProductBreakdown.js +1 -0
  262. package/dist/openapi-v2/models/Login200Response.d.ts +3 -0
  263. package/dist/openapi-v2/models/Login200Response.js +1 -0
  264. package/dist/openapi-v2/models/LoginRequest.d.ts +3 -0
  265. package/dist/openapi-v2/models/LoginRequest.js +1 -0
  266. package/dist/openapi-v2/models/ObjectSerializer.d.ts +1 -2
  267. package/dist/openapi-v2/models/ObjectSerializer.js +53 -17
  268. package/dist/openapi-v2/models/Pricing.d.ts +5 -0
  269. package/dist/openapi-v2/models/Pricing.js +7 -0
  270. package/dist/openapi-v2/models/PricingCadence.d.ts +18 -0
  271. package/dist/openapi-v2/models/PricingCadence.js +22 -0
  272. package/dist/openapi-v2/models/PricingTiersInner.d.ts +3 -0
  273. package/dist/openapi-v2/models/PricingTiersInner.js +1 -0
  274. package/dist/openapi-v2/models/ProductBreakdown.d.ts +3 -0
  275. package/dist/openapi-v2/models/ProductBreakdown.js +1 -0
  276. package/dist/openapi-v2/models/QueryResultAPICustomer.d.ts +3 -0
  277. package/dist/openapi-v2/models/QueryResultAPICustomer.js +1 -0
  278. package/dist/openapi-v2/models/QueryResultAPIEntitlement.d.ts +3 -0
  279. package/dist/openapi-v2/models/QueryResultAPIEntitlement.js +1 -0
  280. package/dist/openapi-v2/models/QueryResultAPIEvent.d.ts +3 -0
  281. package/dist/openapi-v2/models/QueryResultAPIEvent.js +1 -0
  282. package/dist/openapi-v2/models/QueryResultAPIInvoice.d.ts +3 -0
  283. package/dist/openapi-v2/models/QueryResultAPIInvoice.js +1 -0
  284. package/dist/openapi-v2/models/QueryResultAPIProduct.d.ts +3 -0
  285. package/dist/openapi-v2/models/QueryResultAPIProduct.js +1 -0
  286. package/dist/openapi-v2/models/ReviseEntitlementPayload.d.ts +3 -0
  287. package/dist/openapi-v2/models/ReviseEntitlementPayload.js +1 -0
  288. package/dist/openapi-v2/models/all.d.ts +1 -2
  289. package/dist/openapi-v2/models/all.js +1 -2
  290. package/dist/openapi-v2/servers.js +2 -3
  291. package/dist/openapi-v2/types/ObservableAPI.d.ts +157 -109
  292. package/dist/openapi-v2/types/ObservableAPI.js +881 -133
  293. package/dist/openapi-v2/types/PromiseAPI.d.ts +157 -109
  294. package/dist/openapi-v2/types/PromiseAPI.js +657 -108
  295. package/dist/sdk/clients/ContractsClient.js +10 -27
  296. package/dist/sdk/clients/CustomersClient.js +14 -35
  297. package/dist/sdk/clients/EventsClient.js +13 -32
  298. package/dist/sdk/clients/InvoicesClient.js +6 -19
  299. package/dist/sdk/clients/MetersClient.js +10 -27
  300. package/dist/sdk/clients/PlansClient.js +8 -23
  301. package/dist/sdk/clients/ProductsConsumptionsClient.d.ts +5 -0
  302. package/dist/sdk/clients/ProductsConsumptionsClient.js +14 -0
  303. package/dist/sdk/clients/WebhooksClient.js +2 -13
  304. package/dist/sdk/clients/index.d.ts +1 -0
  305. package/dist/sdk/clients/index.js +1 -0
  306. package/dist/sdk/index.d.ts +2 -1
  307. package/dist/sdk/index.js +5 -13
  308. package/dist/sdk/services/configuration.service.js +21 -33
  309. package/dist/sdk-v2/clients/CustomersClient.js +12 -33
  310. package/dist/sdk-v2/clients/EntitlementsClient.js +6 -21
  311. package/dist/sdk-v2/clients/EventsClient.js +8 -25
  312. package/dist/sdk-v2/clients/InvoicesClient.js +12 -33
  313. package/dist/sdk-v2/clients/ProductsClient.js +10 -29
  314. package/dist/sdk-v2/index.js +2 -13
  315. package/dist/sdk-v2/services/configuration.service.js +22 -34
  316. package/dist/sdk-v2/types/index.d.ts +1 -1
  317. package/dist/sdk-v2/types/index.js +2 -1
  318. package/package.json +1 -1
  319. package/dist/openapi-v2/models/Event.d.ts +0 -54
  320. package/dist/openapi-v2/models/Event.js +0 -85
  321. package/dist/openapi-v2/models/UpdateEventPayload.js +0 -31
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.CustomersApiResponseProcessor = exports.CustomersApiRequestFactory = void 0;
13
4
  // TODO: better import syntax?
@@ -21,190 +12,178 @@ const util_1 = require("../util");
21
12
  */
22
13
  class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
23
14
  /**
24
- * @param aPICreateCustomerPayload
15
+ * Create a new customer.
16
+ * @param aPICreateCustomerPayload - The details of the customer to create.
25
17
  */
26
- createCustomer(aPICreateCustomerPayload, _options) {
27
- var _a, _b, _c;
28
- return __awaiter(this, void 0, void 0, function* () {
29
- let _config = _options || this.configuration;
30
- // verify required parameter 'aPICreateCustomerPayload' is not null or undefined
31
- if (aPICreateCustomerPayload === null || aPICreateCustomerPayload === undefined) {
32
- throw new baseapi_1.RequiredError("CustomersApi", "createCustomer", "aPICreateCustomerPayload");
33
- }
34
- // Path Params
35
- const localVarPath = '/customers';
36
- // Make Request Context
37
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
38
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
39
- // Body Params
40
- const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
41
- "application/json"
42
- ]);
43
- requestContext.setHeaderParam("Content-Type", contentType);
44
- const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPICreateCustomerPayload, "APICreateCustomerPayload", ""), contentType);
45
- requestContext.setBody(serializedBody);
46
- const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
47
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
48
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
49
- }
50
- return requestContext;
51
- });
18
+ async createCustomer(aPICreateCustomerPayload, _options) {
19
+ let _config = _options || this.configuration;
20
+ // verify required parameter 'aPICreateCustomerPayload' is not null or undefined
21
+ if (aPICreateCustomerPayload === null || aPICreateCustomerPayload === undefined) {
22
+ throw new baseapi_1.RequiredError("CustomersApi", "createCustomer", "aPICreateCustomerPayload");
23
+ }
24
+ // Path Params
25
+ const localVarPath = '/customers';
26
+ // Make Request Context
27
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
28
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
29
+ // Body Params
30
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
31
+ "application/json"
32
+ ]);
33
+ requestContext.setHeaderParam("Content-Type", contentType);
34
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPICreateCustomerPayload, "APICreateCustomerPayload", ""), contentType);
35
+ requestContext.setBody(serializedBody);
36
+ const defaultAuth = _config?.authMethods?.default;
37
+ if (defaultAuth?.applySecurityAuthentication) {
38
+ await defaultAuth?.applySecurityAuthentication(requestContext);
39
+ }
40
+ return requestContext;
52
41
  }
53
42
  /**
54
- * @param id
43
+ * Delete a customer by ID.
44
+ * @param id - The ID of the customer to delete.
55
45
  */
56
- deleteCustomer(id, _options) {
57
- var _a, _b, _c;
58
- return __awaiter(this, void 0, void 0, function* () {
59
- let _config = _options || this.configuration;
60
- // verify required parameter 'id' is not null or undefined
61
- if (id === null || id === undefined) {
62
- throw new baseapi_1.RequiredError("CustomersApi", "deleteCustomer", "id");
63
- }
64
- // Path Params
65
- const localVarPath = '/customers/{id}'
66
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
67
- // Make Request Context
68
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
69
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
70
- const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
71
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
72
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
73
- }
74
- return requestContext;
75
- });
46
+ async deleteCustomer(id, _options) {
47
+ let _config = _options || this.configuration;
48
+ // verify required parameter 'id' is not null or undefined
49
+ if (id === null || id === undefined) {
50
+ throw new baseapi_1.RequiredError("CustomersApi", "deleteCustomer", "id");
51
+ }
52
+ // Path Params
53
+ const localVarPath = '/customers/{id}'
54
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
55
+ // Make Request Context
56
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
57
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
58
+ const defaultAuth = _config?.authMethods?.default;
59
+ if (defaultAuth?.applySecurityAuthentication) {
60
+ await defaultAuth?.applySecurityAuthentication(requestContext);
61
+ }
62
+ return requestContext;
76
63
  }
77
64
  /**
78
- * @param id
65
+ * Get a single customer by ID.
66
+ * @param id - The ID of the customer to fetch.
79
67
  */
80
- getCustomer(id, _options) {
81
- var _a, _b, _c;
82
- return __awaiter(this, void 0, void 0, function* () {
83
- let _config = _options || this.configuration;
84
- // verify required parameter 'id' is not null or undefined
85
- if (id === null || id === undefined) {
86
- throw new baseapi_1.RequiredError("CustomersApi", "getCustomer", "id");
87
- }
88
- // Path Params
89
- const localVarPath = '/customers/{id}'
90
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
91
- // Make Request Context
92
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
93
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
94
- const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
95
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
96
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
97
- }
98
- return requestContext;
99
- });
68
+ async getCustomer(id, _options) {
69
+ let _config = _options || this.configuration;
70
+ // verify required parameter 'id' is not null or undefined
71
+ if (id === null || id === undefined) {
72
+ throw new baseapi_1.RequiredError("CustomersApi", "getCustomer", "id");
73
+ }
74
+ // Path Params
75
+ const localVarPath = '/customers/{id}'
76
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
77
+ // Make Request Context
78
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
79
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
80
+ const defaultAuth = _config?.authMethods?.default;
81
+ if (defaultAuth?.applySecurityAuthentication) {
82
+ await defaultAuth?.applySecurityAuthentication(requestContext);
83
+ }
84
+ return requestContext;
100
85
  }
101
86
  /**
102
- * @param aPIQueryPayloadAPICustomer
87
+ * Query customers based on filters and pagination.
88
+ * @param aPIQueryPayloadAPICustomer - The query filters and pagination options.
103
89
  */
104
- queryCustomers(aPIQueryPayloadAPICustomer, _options) {
105
- var _a, _b, _c;
106
- return __awaiter(this, void 0, void 0, function* () {
107
- let _config = _options || this.configuration;
108
- // verify required parameter 'aPIQueryPayloadAPICustomer' is not null or undefined
109
- if (aPIQueryPayloadAPICustomer === null || aPIQueryPayloadAPICustomer === undefined) {
110
- throw new baseapi_1.RequiredError("CustomersApi", "queryCustomers", "aPIQueryPayloadAPICustomer");
111
- }
112
- // Path Params
113
- const localVarPath = '/customers/query';
114
- // Make Request Context
115
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
116
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
117
- // Body Params
118
- const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
119
- "application/json"
120
- ]);
121
- requestContext.setHeaderParam("Content-Type", contentType);
122
- const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIQueryPayloadAPICustomer, "APIQueryPayloadAPICustomer", ""), contentType);
123
- requestContext.setBody(serializedBody);
124
- const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
125
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
126
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
127
- }
128
- return requestContext;
129
- });
90
+ async queryCustomers(aPIQueryPayloadAPICustomer, _options) {
91
+ let _config = _options || this.configuration;
92
+ // verify required parameter 'aPIQueryPayloadAPICustomer' is not null or undefined
93
+ if (aPIQueryPayloadAPICustomer === null || aPIQueryPayloadAPICustomer === undefined) {
94
+ throw new baseapi_1.RequiredError("CustomersApi", "queryCustomers", "aPIQueryPayloadAPICustomer");
95
+ }
96
+ // Path Params
97
+ const localVarPath = '/customers/query';
98
+ // Make Request Context
99
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
100
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
101
+ // Body Params
102
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
103
+ "application/json"
104
+ ]);
105
+ requestContext.setHeaderParam("Content-Type", contentType);
106
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIQueryPayloadAPICustomer, "APIQueryPayloadAPICustomer", ""), contentType);
107
+ requestContext.setBody(serializedBody);
108
+ const defaultAuth = _config?.authMethods?.default;
109
+ if (defaultAuth?.applySecurityAuthentication) {
110
+ await defaultAuth?.applySecurityAuthentication(requestContext);
111
+ }
112
+ return requestContext;
130
113
  }
131
114
  /**
132
- * @param body
133
- * @param id
134
- * @param productId
115
+ * Revise a customer\'s product.
116
+ * @param body - The details of the revision to apply.
117
+ * @param id - The ID of the customer to revise.
118
+ * @param productId - The ID of the product to revise.
135
119
  */
136
- updateACustomersProduct(body, id, productId, _options) {
137
- var _a, _b, _c;
138
- return __awaiter(this, void 0, void 0, function* () {
139
- let _config = _options || this.configuration;
140
- // verify required parameter 'body' is not null or undefined
141
- if (body === null || body === undefined) {
142
- throw new baseapi_1.RequiredError("CustomersApi", "updateACustomersProduct", "body");
143
- }
144
- // verify required parameter 'id' is not null or undefined
145
- if (id === null || id === undefined) {
146
- throw new baseapi_1.RequiredError("CustomersApi", "updateACustomersProduct", "id");
147
- }
148
- // verify required parameter 'productId' is not null or undefined
149
- if (productId === null || productId === undefined) {
150
- throw new baseapi_1.RequiredError("CustomersApi", "updateACustomersProduct", "productId");
151
- }
152
- // Path Params
153
- const localVarPath = '/customers/{id}/products/{productId}'
154
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)))
155
- .replace('{' + 'productId' + '}', encodeURIComponent(String(productId)));
156
- // Make Request Context
157
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
158
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
159
- // Body Params
160
- const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
161
- "application/json"
162
- ]);
163
- requestContext.setHeaderParam("Content-Type", contentType);
164
- const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "ReviseEntitlementPayload", ""), contentType);
165
- requestContext.setBody(serializedBody);
166
- const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
167
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
168
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
169
- }
170
- return requestContext;
171
- });
120
+ async updateACustomersProduct(body, id, productId, _options) {
121
+ let _config = _options || this.configuration;
122
+ // verify required parameter 'body' is not null or undefined
123
+ if (body === null || body === undefined) {
124
+ throw new baseapi_1.RequiredError("CustomersApi", "updateACustomersProduct", "body");
125
+ }
126
+ // verify required parameter 'id' is not null or undefined
127
+ if (id === null || id === undefined) {
128
+ throw new baseapi_1.RequiredError("CustomersApi", "updateACustomersProduct", "id");
129
+ }
130
+ // verify required parameter 'productId' is not null or undefined
131
+ if (productId === null || productId === undefined) {
132
+ throw new baseapi_1.RequiredError("CustomersApi", "updateACustomersProduct", "productId");
133
+ }
134
+ // Path Params
135
+ const localVarPath = '/customers/{id}/products/{productId}'
136
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)))
137
+ .replace('{' + 'productId' + '}', encodeURIComponent(String(productId)));
138
+ // Make Request Context
139
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
140
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
141
+ // Body Params
142
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
143
+ "application/json"
144
+ ]);
145
+ requestContext.setHeaderParam("Content-Type", contentType);
146
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "ReviseEntitlementPayload", ""), contentType);
147
+ requestContext.setBody(serializedBody);
148
+ const defaultAuth = _config?.authMethods?.default;
149
+ if (defaultAuth?.applySecurityAuthentication) {
150
+ await defaultAuth?.applySecurityAuthentication(requestContext);
151
+ }
152
+ return requestContext;
172
153
  }
173
154
  /**
174
- * @param aPIUpdateCustomerPayload
175
- * @param id
155
+ * Update an existing customer.
156
+ * @param aPIUpdateCustomerPayload - The updated details of the customer.
157
+ * @param id - The ID of the customer to update.
176
158
  */
177
- updateCustomer(aPIUpdateCustomerPayload, id, _options) {
178
- var _a, _b, _c;
179
- return __awaiter(this, void 0, void 0, function* () {
180
- let _config = _options || this.configuration;
181
- // verify required parameter 'aPIUpdateCustomerPayload' is not null or undefined
182
- if (aPIUpdateCustomerPayload === null || aPIUpdateCustomerPayload === undefined) {
183
- throw new baseapi_1.RequiredError("CustomersApi", "updateCustomer", "aPIUpdateCustomerPayload");
184
- }
185
- // verify required parameter 'id' is not null or undefined
186
- if (id === null || id === undefined) {
187
- throw new baseapi_1.RequiredError("CustomersApi", "updateCustomer", "id");
188
- }
189
- // Path Params
190
- const localVarPath = '/customers/{id}'
191
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
192
- // Make Request Context
193
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
194
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
195
- // Body Params
196
- const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
197
- "application/json"
198
- ]);
199
- requestContext.setHeaderParam("Content-Type", contentType);
200
- const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIUpdateCustomerPayload, "APIUpdateCustomerPayload", ""), contentType);
201
- requestContext.setBody(serializedBody);
202
- const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
203
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
204
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
205
- }
206
- return requestContext;
207
- });
159
+ async updateCustomer(aPIUpdateCustomerPayload, id, _options) {
160
+ let _config = _options || this.configuration;
161
+ // verify required parameter 'aPIUpdateCustomerPayload' is not null or undefined
162
+ if (aPIUpdateCustomerPayload === null || aPIUpdateCustomerPayload === undefined) {
163
+ throw new baseapi_1.RequiredError("CustomersApi", "updateCustomer", "aPIUpdateCustomerPayload");
164
+ }
165
+ // verify required parameter 'id' is not null or undefined
166
+ if (id === null || id === undefined) {
167
+ throw new baseapi_1.RequiredError("CustomersApi", "updateCustomer", "id");
168
+ }
169
+ // Path Params
170
+ const localVarPath = '/customers/{id}'
171
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
172
+ // Make Request Context
173
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
174
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
175
+ // Body Params
176
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
177
+ "application/json"
178
+ ]);
179
+ requestContext.setHeaderParam("Content-Type", contentType);
180
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIUpdateCustomerPayload, "APIUpdateCustomerPayload", ""), contentType);
181
+ requestContext.setBody(serializedBody);
182
+ const defaultAuth = _config?.authMethods?.default;
183
+ if (defaultAuth?.applySecurityAuthentication) {
184
+ await defaultAuth?.applySecurityAuthentication(requestContext);
185
+ }
186
+ return requestContext;
208
187
  }
209
188
  }
210
189
  exports.CustomersApiRequestFactory = CustomersApiRequestFactory;
@@ -216,23 +195,21 @@ class CustomersApiResponseProcessor {
216
195
  * @params response Response returned by the server for a request to createCustomer
217
196
  * @throws ApiException if the response code was not in [200, 299]
218
197
  */
219
- createCustomerWithHttpInfo(response) {
220
- return __awaiter(this, void 0, void 0, function* () {
221
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
222
- if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
223
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APICustomer", "");
224
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
225
- }
226
- if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
227
- throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
228
- }
229
- // Work around for missing responses in specification, e.g. for petstore.yaml
230
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
231
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APICustomer", "");
232
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
233
- }
234
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
235
- });
198
+ async createCustomerWithHttpInfo(response) {
199
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
200
+ if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
201
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APICustomer", "");
202
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
203
+ }
204
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
205
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
206
+ }
207
+ // Work around for missing responses in specification, e.g. for petstore.yaml
208
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
209
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APICustomer", "");
210
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
211
+ }
212
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
236
213
  }
237
214
  /**
238
215
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
@@ -241,19 +218,17 @@ class CustomersApiResponseProcessor {
241
218
  * @params response Response returned by the server for a request to deleteCustomer
242
219
  * @throws ApiException if the response code was not in [200, 299]
243
220
  */
244
- deleteCustomerWithHttpInfo(response) {
245
- return __awaiter(this, void 0, void 0, function* () {
246
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
247
- if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
248
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
249
- }
250
- // Work around for missing responses in specification, e.g. for petstore.yaml
251
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
252
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
253
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
254
- }
255
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
256
- });
221
+ async deleteCustomerWithHttpInfo(response) {
222
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
223
+ if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
224
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
225
+ }
226
+ // Work around for missing responses in specification, e.g. for petstore.yaml
227
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
228
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "void", "");
229
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
230
+ }
231
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
257
232
  }
258
233
  /**
259
234
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
@@ -262,23 +237,21 @@ class CustomersApiResponseProcessor {
262
237
  * @params response Response returned by the server for a request to getCustomer
263
238
  * @throws ApiException if the response code was not in [200, 299]
264
239
  */
265
- getCustomerWithHttpInfo(response) {
266
- return __awaiter(this, void 0, void 0, function* () {
267
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
268
- if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
269
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APICustomer", "");
270
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
271
- }
272
- if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
273
- throw new exception_1.ApiException(response.httpStatusCode, "Customer not found", undefined, response.headers);
274
- }
275
- // Work around for missing responses in specification, e.g. for petstore.yaml
276
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
277
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APICustomer", "");
278
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
279
- }
280
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
281
- });
240
+ async getCustomerWithHttpInfo(response) {
241
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
242
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
243
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APICustomer", "");
244
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
245
+ }
246
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
247
+ throw new exception_1.ApiException(response.httpStatusCode, "Customer not found", undefined, response.headers);
248
+ }
249
+ // Work around for missing responses in specification, e.g. for petstore.yaml
250
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
251
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APICustomer", "");
252
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
253
+ }
254
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
282
255
  }
283
256
  /**
284
257
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
@@ -287,23 +260,21 @@ class CustomersApiResponseProcessor {
287
260
  * @params response Response returned by the server for a request to queryCustomers
288
261
  * @throws ApiException if the response code was not in [200, 299]
289
262
  */
290
- queryCustomersWithHttpInfo(response) {
291
- return __awaiter(this, void 0, void 0, function* () {
292
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
293
- if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
294
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "QueryResultAPICustomer", "");
295
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
296
- }
297
- if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
298
- throw new exception_1.ApiException(response.httpStatusCode, "Invalid query", undefined, response.headers);
299
- }
300
- // Work around for missing responses in specification, e.g. for petstore.yaml
301
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
302
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "QueryResultAPICustomer", "");
303
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
304
- }
305
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
306
- });
263
+ async queryCustomersWithHttpInfo(response) {
264
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
265
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
266
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "QueryResultAPICustomer", "");
267
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
268
+ }
269
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
270
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid query", undefined, response.headers);
271
+ }
272
+ // Work around for missing responses in specification, e.g. for petstore.yaml
273
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
274
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "QueryResultAPICustomer", "");
275
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
276
+ }
277
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
307
278
  }
308
279
  /**
309
280
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
@@ -312,23 +283,21 @@ class CustomersApiResponseProcessor {
312
283
  * @params response Response returned by the server for a request to updateACustomersProduct
313
284
  * @throws ApiException if the response code was not in [200, 299]
314
285
  */
315
- updateACustomersProductWithHttpInfo(response) {
316
- return __awaiter(this, void 0, void 0, function* () {
317
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
318
- if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
319
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIEntitlement", "");
320
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
321
- }
322
- if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
323
- throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
324
- }
325
- // Work around for missing responses in specification, e.g. for petstore.yaml
326
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
327
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIEntitlement", "");
328
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
329
- }
330
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
331
- });
286
+ async updateACustomersProductWithHttpInfo(response) {
287
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
288
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
289
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIEntitlement", "");
290
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
291
+ }
292
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
293
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
294
+ }
295
+ // Work around for missing responses in specification, e.g. for petstore.yaml
296
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
297
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIEntitlement", "");
298
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
299
+ }
300
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
332
301
  }
333
302
  /**
334
303
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
@@ -337,26 +306,24 @@ class CustomersApiResponseProcessor {
337
306
  * @params response Response returned by the server for a request to updateCustomer
338
307
  * @throws ApiException if the response code was not in [200, 299]
339
308
  */
340
- updateCustomerWithHttpInfo(response) {
341
- return __awaiter(this, void 0, void 0, function* () {
342
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
343
- if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
344
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APICustomer", "");
345
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
346
- }
347
- if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
348
- throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
349
- }
350
- if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
351
- throw new exception_1.ApiException(response.httpStatusCode, "Customer not found", undefined, response.headers);
352
- }
353
- // Work around for missing responses in specification, e.g. for petstore.yaml
354
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
355
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APICustomer", "");
356
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
357
- }
358
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
359
- });
309
+ async updateCustomerWithHttpInfo(response) {
310
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
311
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
312
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APICustomer", "");
313
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
314
+ }
315
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
316
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
317
+ }
318
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
319
+ throw new exception_1.ApiException(response.httpStatusCode, "Customer not found", undefined, response.headers);
320
+ }
321
+ // Work around for missing responses in specification, e.g. for petstore.yaml
322
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
323
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APICustomer", "");
324
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
325
+ }
326
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
360
327
  }
361
328
  }
362
329
  exports.CustomersApiResponseProcessor = CustomersApiResponseProcessor;