vayu-ts 0.2.6 → 0.2.7-test2

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 (301) 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/http/http.d.ts +7 -20
  18. package/dist/openapi/http/http.js +15 -25
  19. package/dist/openapi/index.d.ts +3 -3
  20. package/dist/openapi/index.js +2 -1
  21. package/dist/openapi/models/Address.d.ts +3 -0
  22. package/dist/openapi/models/Address.js +1 -0
  23. package/dist/openapi/models/AggregationMethod.d.ts +3 -0
  24. package/dist/openapi/models/AggregationMethod.js +1 -0
  25. package/dist/openapi/models/Condition.d.ts +3 -0
  26. package/dist/openapi/models/Condition.js +1 -0
  27. package/dist/openapi/models/Contact.d.ts +4 -1
  28. package/dist/openapi/models/Contact.js +3 -2
  29. package/dist/openapi/models/ContractStatus.d.ts +1 -0
  30. package/dist/openapi/models/ContractStatus.js +1 -0
  31. package/dist/openapi/models/CreateContractRequest.d.ts +3 -0
  32. package/dist/openapi/models/CreateContractRequest.js +1 -0
  33. package/dist/openapi/models/CreateContractResponse.d.ts +3 -0
  34. package/dist/openapi/models/CreateContractResponse.js +1 -0
  35. package/dist/openapi/models/CreateCustomerRequest.d.ts +3 -0
  36. package/dist/openapi/models/CreateCustomerRequest.js +1 -0
  37. package/dist/openapi/models/CreateCustomerResponse.d.ts +3 -0
  38. package/dist/openapi/models/CreateCustomerResponse.js +1 -0
  39. package/dist/openapi/models/CreateCustomerResponseCustomer.d.ts +3 -0
  40. package/dist/openapi/models/CreateCustomerResponseCustomer.js +1 -0
  41. package/dist/openapi/models/CreditLedgerEntry.d.ts +3 -0
  42. package/dist/openapi/models/CreditLedgerEntry.js +1 -0
  43. package/dist/openapi/models/Criterion.d.ts +3 -0
  44. package/dist/openapi/models/Criterion.js +1 -0
  45. package/dist/openapi/models/CriterionOperator.d.ts +3 -1
  46. package/dist/openapi/models/CriterionOperator.js +2 -0
  47. package/dist/openapi/models/DeductCreditsRequest.d.ts +3 -0
  48. package/dist/openapi/models/DeductCreditsRequest.js +1 -0
  49. package/dist/openapi/models/DeleteContractResponse.d.ts +3 -0
  50. package/dist/openapi/models/DeleteContractResponse.js +1 -0
  51. package/dist/openapi/models/DeleteContractResponseContract.d.ts +3 -0
  52. package/dist/openapi/models/DeleteContractResponseContract.js +1 -0
  53. package/dist/openapi/models/DeleteCustomerResponse.d.ts +3 -0
  54. package/dist/openapi/models/DeleteCustomerResponse.js +1 -0
  55. package/dist/openapi/models/DeleteCustomerResponseCustomer.d.ts +3 -0
  56. package/dist/openapi/models/DeleteCustomerResponseCustomer.js +1 -0
  57. package/dist/openapi/models/DeleteEventResponse.d.ts +3 -0
  58. package/dist/openapi/models/DeleteEventResponse.js +1 -0
  59. package/dist/openapi/models/DeleteEventResponseEvent.d.ts +3 -0
  60. package/dist/openapi/models/DeleteEventResponseEvent.js +1 -0
  61. package/dist/openapi/models/DeleteMeterResponse.d.ts +3 -0
  62. package/dist/openapi/models/DeleteMeterResponse.js +1 -0
  63. package/dist/openapi/models/DeleteMeterResponseMeter.d.ts +3 -0
  64. package/dist/openapi/models/DeleteMeterResponseMeter.js +1 -0
  65. package/dist/openapi/models/DeletePlanResponse.d.ts +3 -0
  66. package/dist/openapi/models/DeletePlanResponse.js +1 -0
  67. package/dist/openapi/models/DeletePlanResponsePlan.d.ts +3 -0
  68. package/dist/openapi/models/DeletePlanResponsePlan.js +1 -0
  69. package/dist/openapi/models/Event.d.ts +3 -0
  70. package/dist/openapi/models/Event.js +1 -0
  71. package/dist/openapi/models/EventsDryRunRequest.d.ts +3 -0
  72. package/dist/openapi/models/EventsDryRunRequest.js +1 -0
  73. package/dist/openapi/models/EventsDryRunResponse.d.ts +3 -0
  74. package/dist/openapi/models/EventsDryRunResponse.js +1 -0
  75. package/dist/openapi/models/EventsDryRunResponseObject.d.ts +3 -0
  76. package/dist/openapi/models/EventsDryRunResponseObject.js +1 -0
  77. package/dist/openapi/models/EventsDryRunResponseObjectEvent.d.ts +3 -0
  78. package/dist/openapi/models/EventsDryRunResponseObjectEvent.js +1 -0
  79. package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.d.ts +3 -0
  80. package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.js +1 -0
  81. package/dist/openapi/models/Filter.d.ts +3 -0
  82. package/dist/openapi/models/Filter.js +1 -0
  83. package/dist/openapi/models/FullDayPeriod.d.ts +3 -0
  84. package/dist/openapi/models/FullDayPeriod.js +1 -0
  85. package/dist/openapi/models/GetCommitmentReportResponse.d.ts +5 -0
  86. package/dist/openapi/models/GetCommitmentReportResponse.js +13 -0
  87. package/dist/openapi/models/GetContractResponse.d.ts +3 -0
  88. package/dist/openapi/models/GetContractResponse.js +1 -0
  89. package/dist/openapi/models/GetContractResponseContract.d.ts +3 -0
  90. package/dist/openapi/models/GetContractResponseContract.js +1 -0
  91. package/dist/openapi/models/GetCustomerProductsConsumptionsResponse.d.ts +32 -0
  92. package/dist/openapi/models/GetCustomerProductsConsumptionsResponse.js +32 -0
  93. package/dist/openapi/models/GetCustomerResponse.d.ts +3 -0
  94. package/dist/openapi/models/GetCustomerResponse.js +1 -0
  95. package/dist/openapi/models/GetEventResponse.d.ts +3 -0
  96. package/dist/openapi/models/GetEventResponse.js +1 -0
  97. package/dist/openapi/models/GetEventResponseEvent.d.ts +3 -0
  98. package/dist/openapi/models/GetEventResponseEvent.js +1 -0
  99. package/dist/openapi/models/GetInvoiceResponse.d.ts +3 -0
  100. package/dist/openapi/models/GetInvoiceResponse.js +1 -0
  101. package/dist/openapi/models/GetInvoiceResponseInvoice.d.ts +3 -0
  102. package/dist/openapi/models/GetInvoiceResponseInvoice.js +1 -0
  103. package/dist/openapi/models/GetMeterResponse.d.ts +3 -0
  104. package/dist/openapi/models/GetMeterResponse.js +1 -0
  105. package/dist/openapi/models/GetMeterResponseMeter.d.ts +3 -0
  106. package/dist/openapi/models/GetMeterResponseMeter.js +1 -0
  107. package/dist/openapi/models/GetPlanResponse.d.ts +3 -0
  108. package/dist/openapi/models/GetPlanResponse.js +1 -0
  109. package/dist/openapi/models/GetPlanResponsePlan.d.ts +3 -0
  110. package/dist/openapi/models/GetPlanResponsePlan.js +1 -0
  111. package/dist/openapi/models/GetProductConsumptionResponse.d.ts +32 -0
  112. package/dist/openapi/models/GetProductConsumptionResponse.js +32 -0
  113. package/dist/openapi/models/GetProductConsumptionResponseProductConsumption.d.ts +59 -0
  114. package/dist/openapi/models/GetProductConsumptionResponseProductConsumption.js +74 -0
  115. package/dist/openapi/models/GetProductsUsageReportResponse.d.ts +5 -0
  116. package/dist/openapi/models/GetProductsUsageReportResponse.js +13 -0
  117. package/dist/openapi/models/GrantCreditsRequest.d.ts +3 -0
  118. package/dist/openapi/models/GrantCreditsRequest.js +1 -0
  119. package/dist/openapi/models/InvalidEvent.d.ts +3 -0
  120. package/dist/openapi/models/InvalidEvent.js +1 -0
  121. package/dist/openapi/models/LineItem.d.ts +3 -0
  122. package/dist/openapi/models/LineItem.js +1 -0
  123. package/dist/openapi/models/LineItemRevenueBreakdown.d.ts +3 -0
  124. package/dist/openapi/models/LineItemRevenueBreakdown.js +1 -0
  125. package/dist/openapi/models/ListContractsResponse.d.ts +3 -0
  126. package/dist/openapi/models/ListContractsResponse.js +1 -0
  127. package/dist/openapi/models/ListCreditLedgerEntriesResponse.d.ts +3 -0
  128. package/dist/openapi/models/ListCreditLedgerEntriesResponse.js +1 -0
  129. package/dist/openapi/models/ListCustomersResponse.d.ts +3 -0
  130. package/dist/openapi/models/ListCustomersResponse.js +1 -0
  131. package/dist/openapi/models/ListInvoicesResponse.d.ts +3 -0
  132. package/dist/openapi/models/ListInvoicesResponse.js +1 -0
  133. package/dist/openapi/models/ListMetersResponse.d.ts +3 -0
  134. package/dist/openapi/models/ListMetersResponse.js +1 -0
  135. package/dist/openapi/models/ListPlansResponse.d.ts +3 -0
  136. package/dist/openapi/models/ListPlansResponse.js +1 -0
  137. package/dist/openapi/models/LoginRequest.d.ts +3 -0
  138. package/dist/openapi/models/LoginRequest.js +1 -0
  139. package/dist/openapi/models/LoginResponse.d.ts +3 -0
  140. package/dist/openapi/models/LoginResponse.js +1 -0
  141. package/dist/openapi/models/Meter.d.ts +3 -0
  142. package/dist/openapi/models/Meter.js +1 -0
  143. package/dist/openapi/models/NetSuiteExportSalesOrderRequest.d.ts +3 -0
  144. package/dist/openapi/models/NetSuiteExportSalesOrderRequest.js +1 -0
  145. package/dist/openapi/models/NetSuiteSyncInvoicesRequest.d.ts +3 -0
  146. package/dist/openapi/models/NetSuiteSyncInvoicesRequest.js +1 -0
  147. package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.d.ts +3 -0
  148. package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.js +1 -0
  149. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataEntity.d.ts +3 -0
  150. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataEntity.js +1 -0
  151. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.d.ts +3 -0
  152. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.js +1 -0
  153. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.d.ts +3 -0
  154. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.js +1 -0
  155. package/dist/openapi/models/NetSuiteSyncInvoicesResponse.d.ts +3 -0
  156. package/dist/openapi/models/NetSuiteSyncInvoicesResponse.js +1 -0
  157. package/dist/openapi/models/NotificationEventType.d.ts +2 -1
  158. package/dist/openapi/models/NotificationEventType.js +1 -0
  159. package/dist/openapi/models/ObjectSerializer.d.ts +6 -0
  160. package/dist/openapi/models/ObjectSerializer.js +68 -11
  161. package/dist/openapi/models/PlanBillingData.d.ts +5 -1
  162. package/dist/openapi/models/PlanBillingData.js +2 -1
  163. package/dist/openapi/models/PlanDuration.d.ts +30 -0
  164. package/dist/openapi/models/PlanDuration.js +25 -0
  165. package/dist/openapi/models/ProductConsumption.d.ts +59 -0
  166. package/dist/openapi/models/ProductConsumption.js +74 -0
  167. package/dist/openapi/models/QueryEventsResponse.d.ts +3 -0
  168. package/dist/openapi/models/QueryEventsResponse.js +1 -0
  169. package/dist/openapi/models/QueryEventsResponseEventsInner.d.ts +3 -0
  170. package/dist/openapi/models/QueryEventsResponseEventsInner.js +1 -0
  171. package/dist/openapi/models/SendEventsRequest.d.ts +3 -0
  172. package/dist/openapi/models/SendEventsRequest.js +1 -0
  173. package/dist/openapi/models/SendEventsResponse.d.ts +3 -0
  174. package/dist/openapi/models/SendEventsResponse.js +1 -0
  175. package/dist/openapi/models/UnlimitedDuration.d.ts +14 -0
  176. package/dist/openapi/models/UnlimitedDuration.js +18 -0
  177. package/dist/openapi/models/UpdateCustomerRequest.d.ts +3 -0
  178. package/dist/openapi/models/UpdateCustomerRequest.js +1 -0
  179. package/dist/openapi/models/UpdateCustomerResponse.d.ts +3 -0
  180. package/dist/openapi/models/UpdateCustomerResponse.js +1 -0
  181. package/dist/openapi/models/UpdateMeterRequest.d.ts +3 -0
  182. package/dist/openapi/models/UpdateMeterRequest.js +1 -0
  183. package/dist/openapi/models/UpdateMeterResponse.d.ts +3 -0
  184. package/dist/openapi/models/UpdateMeterResponse.js +1 -0
  185. package/dist/openapi/models/WebhookSubscribeRequest.d.ts +3 -0
  186. package/dist/openapi/models/WebhookSubscribeRequest.js +1 -0
  187. package/dist/openapi/models/all.d.ts +6 -0
  188. package/dist/openapi/models/all.js +6 -0
  189. package/dist/openapi/servers.js +2 -3
  190. package/dist/openapi/types/ObservableAPI.d.ts +71 -38
  191. package/dist/openapi/types/ObservableAPI.js +172 -105
  192. package/dist/openapi/types/PromiseAPI.d.ts +69 -38
  193. package/dist/openapi/types/PromiseAPI.js +85 -42
  194. package/dist/openapi-v2/apis/AuthenticationApi.js +35 -49
  195. package/dist/openapi-v2/apis/CustomersApi.js +230 -269
  196. package/dist/openapi-v2/apis/EntitlementsApi.js +98 -122
  197. package/dist/openapi-v2/apis/EventsApi.js +136 -165
  198. package/dist/openapi-v2/apis/InvoicesApi.js +214 -253
  199. package/dist/openapi-v2/apis/ProductsApi.js +182 -216
  200. package/dist/openapi-v2/auth/auth.d.ts +1 -0
  201. package/dist/openapi-v2/http/http.d.ts +7 -20
  202. package/dist/openapi-v2/http/http.js +15 -25
  203. package/dist/openapi-v2/index.d.ts +2 -2
  204. package/dist/openapi-v2/models/APICreateCustomerPayload.d.ts +3 -0
  205. package/dist/openapi-v2/models/APICreateCustomerPayload.js +1 -0
  206. package/dist/openapi-v2/models/APICreateInvoicePayload.d.ts +3 -0
  207. package/dist/openapi-v2/models/APICreateInvoicePayload.js +1 -0
  208. package/dist/openapi-v2/models/APICreateProductPayload.d.ts +3 -0
  209. package/dist/openapi-v2/models/APICreateProductPayload.js +1 -0
  210. package/dist/openapi-v2/models/APICustomer.d.ts +3 -0
  211. package/dist/openapi-v2/models/APICustomer.js +1 -0
  212. package/dist/openapi-v2/models/APIEntitlement.d.ts +3 -0
  213. package/dist/openapi-v2/models/APIEntitlement.js +1 -0
  214. package/dist/openapi-v2/models/APIEvent.d.ts +3 -0
  215. package/dist/openapi-v2/models/APIEvent.js +1 -0
  216. package/dist/openapi-v2/models/APIIngestEventPayload.d.ts +3 -0
  217. package/dist/openapi-v2/models/APIIngestEventPayload.js +1 -0
  218. package/dist/openapi-v2/models/APIInvoice.d.ts +3 -0
  219. package/dist/openapi-v2/models/APIInvoice.js +1 -0
  220. package/dist/openapi-v2/models/APIInvoiceBillingPeriod.d.ts +3 -0
  221. package/dist/openapi-v2/models/APIInvoiceBillingPeriod.js +1 -0
  222. package/dist/openapi-v2/models/APIProduct.d.ts +3 -0
  223. package/dist/openapi-v2/models/APIProduct.js +1 -0
  224. package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.d.ts +3 -0
  225. package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.js +1 -0
  226. package/dist/openapi-v2/models/APIQueryPayloadAPIEntitlement.d.ts +3 -0
  227. package/dist/openapi-v2/models/APIQueryPayloadAPIEntitlement.js +1 -0
  228. package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.d.ts +3 -0
  229. package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.js +1 -0
  230. package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.d.ts +3 -0
  231. package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.js +1 -0
  232. package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.d.ts +3 -0
  233. package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.js +1 -0
  234. package/dist/openapi-v2/models/APIUpdateCustomerPayload.d.ts +3 -0
  235. package/dist/openapi-v2/models/APIUpdateCustomerPayload.js +1 -0
  236. package/dist/openapi-v2/models/APIUpdateInvoicePayload.d.ts +3 -0
  237. package/dist/openapi-v2/models/APIUpdateInvoicePayload.js +1 -0
  238. package/dist/openapi-v2/models/APIUpdateProductPayload.d.ts +3 -0
  239. package/dist/openapi-v2/models/APIUpdateProductPayload.js +1 -0
  240. package/dist/openapi-v2/models/Aggregation.d.ts +3 -0
  241. package/dist/openapi-v2/models/Aggregation.js +1 -0
  242. package/dist/openapi-v2/models/Condition.d.ts +3 -0
  243. package/dist/openapi-v2/models/Condition.js +1 -0
  244. package/dist/openapi-v2/models/Criterion.d.ts +3 -0
  245. package/dist/openapi-v2/models/Criterion.js +1 -0
  246. package/dist/openapi-v2/models/CriterionValue.d.ts +3 -0
  247. package/dist/openapi-v2/models/CriterionValue.js +1 -0
  248. package/dist/openapi-v2/models/EntitlementRevision.d.ts +3 -0
  249. package/dist/openapi-v2/models/EntitlementRevision.js +1 -0
  250. package/dist/openapi-v2/models/IngestEventToTheSystem201Response.d.ts +3 -0
  251. package/dist/openapi-v2/models/IngestEventToTheSystem201Response.js +1 -0
  252. package/dist/openapi-v2/models/InvoiceProductBreakdown.d.ts +3 -0
  253. package/dist/openapi-v2/models/InvoiceProductBreakdown.js +1 -0
  254. package/dist/openapi-v2/models/Login200Response.d.ts +3 -0
  255. package/dist/openapi-v2/models/Login200Response.js +1 -0
  256. package/dist/openapi-v2/models/LoginRequest.d.ts +3 -0
  257. package/dist/openapi-v2/models/LoginRequest.js +1 -0
  258. package/dist/openapi-v2/models/ObjectSerializer.js +51 -11
  259. package/dist/openapi-v2/models/Pricing.d.ts +3 -0
  260. package/dist/openapi-v2/models/Pricing.js +1 -0
  261. package/dist/openapi-v2/models/PricingTiersInner.d.ts +3 -0
  262. package/dist/openapi-v2/models/PricingTiersInner.js +1 -0
  263. package/dist/openapi-v2/models/ProductBreakdown.d.ts +3 -0
  264. package/dist/openapi-v2/models/ProductBreakdown.js +1 -0
  265. package/dist/openapi-v2/models/QueryResultAPICustomer.d.ts +3 -0
  266. package/dist/openapi-v2/models/QueryResultAPICustomer.js +1 -0
  267. package/dist/openapi-v2/models/QueryResultAPIEntitlement.d.ts +3 -0
  268. package/dist/openapi-v2/models/QueryResultAPIEntitlement.js +1 -0
  269. package/dist/openapi-v2/models/QueryResultAPIEvent.d.ts +3 -0
  270. package/dist/openapi-v2/models/QueryResultAPIEvent.js +1 -0
  271. package/dist/openapi-v2/models/QueryResultAPIInvoice.d.ts +3 -0
  272. package/dist/openapi-v2/models/QueryResultAPIInvoice.js +1 -0
  273. package/dist/openapi-v2/models/QueryResultAPIProduct.d.ts +3 -0
  274. package/dist/openapi-v2/models/QueryResultAPIProduct.js +1 -0
  275. package/dist/openapi-v2/models/ReviseEntitlementPayload.d.ts +3 -0
  276. package/dist/openapi-v2/models/ReviseEntitlementPayload.js +1 -0
  277. package/dist/openapi-v2/servers.js +2 -3
  278. package/dist/openapi-v2/types/ObservableAPI.js +50 -50
  279. package/dist/sdk/clients/ContractsClient.js +10 -27
  280. package/dist/sdk/clients/CustomersClient.d.ts +1 -0
  281. package/dist/sdk/clients/CustomersClient.js +22 -40
  282. package/dist/sdk/clients/EventsClient.js +13 -32
  283. package/dist/sdk/clients/InvoicesClient.js +6 -19
  284. package/dist/sdk/clients/MetersClient.js +10 -27
  285. package/dist/sdk/clients/PlansClient.js +8 -23
  286. package/dist/sdk/clients/ProductsConsumptionsClient.d.ts +5 -0
  287. package/dist/sdk/clients/ProductsConsumptionsClient.js +14 -0
  288. package/dist/sdk/clients/WebhooksClient.js +2 -13
  289. package/dist/sdk/clients/index.d.ts +1 -0
  290. package/dist/sdk/clients/index.js +1 -0
  291. package/dist/sdk/index.d.ts +2 -1
  292. package/dist/sdk/index.js +5 -13
  293. package/dist/sdk/services/configuration.service.js +21 -33
  294. package/dist/sdk-v2/clients/CustomersClient.js +12 -33
  295. package/dist/sdk-v2/clients/EntitlementsClient.js +6 -21
  296. package/dist/sdk-v2/clients/EventsClient.js +8 -25
  297. package/dist/sdk-v2/clients/InvoicesClient.js +12 -33
  298. package/dist/sdk-v2/clients/ProductsClient.js +10 -29
  299. package/dist/sdk-v2/index.js +2 -13
  300. package/dist/sdk-v2/services/configuration.service.js +22 -34
  301. package/package.json +1 -1
@@ -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.ProductsApiResponseProcessor = exports.ProductsApiRequestFactory = void 0;
13
4
  // TODO: better import syntax?
@@ -24,150 +15,135 @@ class ProductsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
24
15
  * Create a new product.
25
16
  * @param aPICreateProductPayload - The details of the product to create.
26
17
  */
27
- createProduct(aPICreateProductPayload, _options) {
28
- var _a, _b, _c;
29
- return __awaiter(this, void 0, void 0, function* () {
30
- let _config = _options || this.configuration;
31
- // verify required parameter 'aPICreateProductPayload' is not null or undefined
32
- if (aPICreateProductPayload === null || aPICreateProductPayload === undefined) {
33
- throw new baseapi_1.RequiredError("ProductsApi", "createProduct", "aPICreateProductPayload");
34
- }
35
- // Path Params
36
- const localVarPath = '/products';
37
- // Make Request Context
38
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
39
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
40
- // Body Params
41
- const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
42
- "application/json"
43
- ]);
44
- requestContext.setHeaderParam("Content-Type", contentType);
45
- const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPICreateProductPayload, "APICreateProductPayload", ""), contentType);
46
- requestContext.setBody(serializedBody);
47
- 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);
48
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
49
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
50
- }
51
- return requestContext;
52
- });
18
+ async createProduct(aPICreateProductPayload, _options) {
19
+ let _config = _options || this.configuration;
20
+ // verify required parameter 'aPICreateProductPayload' is not null or undefined
21
+ if (aPICreateProductPayload === null || aPICreateProductPayload === undefined) {
22
+ throw new baseapi_1.RequiredError("ProductsApi", "createProduct", "aPICreateProductPayload");
23
+ }
24
+ // Path Params
25
+ const localVarPath = '/products';
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(aPICreateProductPayload, "APICreateProductPayload", ""), contentType);
35
+ requestContext.setBody(serializedBody);
36
+ const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
37
+ if (defaultAuth?.applySecurityAuthentication) {
38
+ await defaultAuth?.applySecurityAuthentication(requestContext);
39
+ }
40
+ return requestContext;
53
41
  }
54
42
  /**
55
43
  * Delete a product by ID.
56
44
  * @param id - The ID of the product to delete.
57
45
  */
58
- deleteProduct(id, _options) {
59
- var _a, _b, _c;
60
- return __awaiter(this, void 0, void 0, function* () {
61
- let _config = _options || this.configuration;
62
- // verify required parameter 'id' is not null or undefined
63
- if (id === null || id === undefined) {
64
- throw new baseapi_1.RequiredError("ProductsApi", "deleteProduct", "id");
65
- }
66
- // Path Params
67
- const localVarPath = '/products/{id}'
68
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
69
- // Make Request Context
70
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
71
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
72
- 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);
73
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
74
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
75
- }
76
- return requestContext;
77
- });
46
+ async deleteProduct(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("ProductsApi", "deleteProduct", "id");
51
+ }
52
+ // Path Params
53
+ const localVarPath = '/products/{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 = _options?.authMethods?.default || this.configuration?.authMethods?.default;
59
+ if (defaultAuth?.applySecurityAuthentication) {
60
+ await defaultAuth?.applySecurityAuthentication(requestContext);
61
+ }
62
+ return requestContext;
78
63
  }
79
64
  /**
80
65
  * Get a single product by ID.
81
66
  * @param id - The ID of the product to fetch.
82
67
  */
83
- getProduct(id, _options) {
84
- var _a, _b, _c;
85
- return __awaiter(this, void 0, void 0, function* () {
86
- let _config = _options || this.configuration;
87
- // verify required parameter 'id' is not null or undefined
88
- if (id === null || id === undefined) {
89
- throw new baseapi_1.RequiredError("ProductsApi", "getProduct", "id");
90
- }
91
- // Path Params
92
- const localVarPath = '/products/{id}'
93
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
94
- // Make Request Context
95
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
96
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
97
- 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);
98
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
99
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
100
- }
101
- return requestContext;
102
- });
68
+ async getProduct(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("ProductsApi", "getProduct", "id");
73
+ }
74
+ // Path Params
75
+ const localVarPath = '/products/{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 = _options?.authMethods?.default || this.configuration?.authMethods?.default;
81
+ if (defaultAuth?.applySecurityAuthentication) {
82
+ await defaultAuth?.applySecurityAuthentication(requestContext);
83
+ }
84
+ return requestContext;
103
85
  }
104
86
  /**
105
87
  * Query products based on filters and pagination.
106
88
  * @param aPIQueryPayloadAPIProduct - The query filters and pagination details.
107
89
  */
108
- queryProducts(aPIQueryPayloadAPIProduct, _options) {
109
- var _a, _b, _c;
110
- return __awaiter(this, void 0, void 0, function* () {
111
- let _config = _options || this.configuration;
112
- // verify required parameter 'aPIQueryPayloadAPIProduct' is not null or undefined
113
- if (aPIQueryPayloadAPIProduct === null || aPIQueryPayloadAPIProduct === undefined) {
114
- throw new baseapi_1.RequiredError("ProductsApi", "queryProducts", "aPIQueryPayloadAPIProduct");
115
- }
116
- // Path Params
117
- const localVarPath = '/products/query';
118
- // Make Request Context
119
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
120
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
121
- // Body Params
122
- const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
123
- "application/json"
124
- ]);
125
- requestContext.setHeaderParam("Content-Type", contentType);
126
- const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIQueryPayloadAPIProduct, "APIQueryPayloadAPIProduct", ""), contentType);
127
- requestContext.setBody(serializedBody);
128
- 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);
129
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
130
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
131
- }
132
- return requestContext;
133
- });
90
+ async queryProducts(aPIQueryPayloadAPIProduct, _options) {
91
+ let _config = _options || this.configuration;
92
+ // verify required parameter 'aPIQueryPayloadAPIProduct' is not null or undefined
93
+ if (aPIQueryPayloadAPIProduct === null || aPIQueryPayloadAPIProduct === undefined) {
94
+ throw new baseapi_1.RequiredError("ProductsApi", "queryProducts", "aPIQueryPayloadAPIProduct");
95
+ }
96
+ // Path Params
97
+ const localVarPath = '/products/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(aPIQueryPayloadAPIProduct, "APIQueryPayloadAPIProduct", ""), contentType);
107
+ requestContext.setBody(serializedBody);
108
+ const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
109
+ if (defaultAuth?.applySecurityAuthentication) {
110
+ await defaultAuth?.applySecurityAuthentication(requestContext);
111
+ }
112
+ return requestContext;
134
113
  }
135
114
  /**
136
115
  * Update an existing product.
137
116
  * @param aPIUpdateProductPayload - The updated details of the product.
138
117
  * @param id - The ID of the product to update.
139
118
  */
140
- updateProduct(aPIUpdateProductPayload, id, _options) {
141
- var _a, _b, _c;
142
- return __awaiter(this, void 0, void 0, function* () {
143
- let _config = _options || this.configuration;
144
- // verify required parameter 'aPIUpdateProductPayload' is not null or undefined
145
- if (aPIUpdateProductPayload === null || aPIUpdateProductPayload === undefined) {
146
- throw new baseapi_1.RequiredError("ProductsApi", "updateProduct", "aPIUpdateProductPayload");
147
- }
148
- // verify required parameter 'id' is not null or undefined
149
- if (id === null || id === undefined) {
150
- throw new baseapi_1.RequiredError("ProductsApi", "updateProduct", "id");
151
- }
152
- // Path Params
153
- const localVarPath = '/products/{id}'
154
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
155
- // Make Request Context
156
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
157
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
158
- // Body Params
159
- const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
160
- "application/json"
161
- ]);
162
- requestContext.setHeaderParam("Content-Type", contentType);
163
- const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIUpdateProductPayload, "APIUpdateProductPayload", ""), contentType);
164
- requestContext.setBody(serializedBody);
165
- 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);
166
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
167
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
168
- }
169
- return requestContext;
170
- });
119
+ async updateProduct(aPIUpdateProductPayload, id, _options) {
120
+ let _config = _options || this.configuration;
121
+ // verify required parameter 'aPIUpdateProductPayload' is not null or undefined
122
+ if (aPIUpdateProductPayload === null || aPIUpdateProductPayload === undefined) {
123
+ throw new baseapi_1.RequiredError("ProductsApi", "updateProduct", "aPIUpdateProductPayload");
124
+ }
125
+ // verify required parameter 'id' is not null or undefined
126
+ if (id === null || id === undefined) {
127
+ throw new baseapi_1.RequiredError("ProductsApi", "updateProduct", "id");
128
+ }
129
+ // Path Params
130
+ const localVarPath = '/products/{id}'
131
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
132
+ // Make Request Context
133
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
134
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
135
+ // Body Params
136
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
137
+ "application/json"
138
+ ]);
139
+ requestContext.setHeaderParam("Content-Type", contentType);
140
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIUpdateProductPayload, "APIUpdateProductPayload", ""), contentType);
141
+ requestContext.setBody(serializedBody);
142
+ const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
143
+ if (defaultAuth?.applySecurityAuthentication) {
144
+ await defaultAuth?.applySecurityAuthentication(requestContext);
145
+ }
146
+ return requestContext;
171
147
  }
172
148
  }
173
149
  exports.ProductsApiRequestFactory = ProductsApiRequestFactory;
@@ -179,23 +155,21 @@ class ProductsApiResponseProcessor {
179
155
  * @params response Response returned by the server for a request to createProduct
180
156
  * @throws ApiException if the response code was not in [200, 299]
181
157
  */
182
- createProductWithHttpInfo(response) {
183
- return __awaiter(this, void 0, void 0, function* () {
184
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
185
- if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
186
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIProduct", "");
187
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
188
- }
189
- if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
190
- throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
191
- }
192
- // Work around for missing responses in specification, e.g. for petstore.yaml
193
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
194
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIProduct", "");
195
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
196
- }
197
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
198
- });
158
+ async createProductWithHttpInfo(response) {
159
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
160
+ if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
161
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIProduct", "");
162
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
163
+ }
164
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
165
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
166
+ }
167
+ // Work around for missing responses in specification, e.g. for petstore.yaml
168
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
169
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIProduct", "");
170
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
171
+ }
172
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
199
173
  }
200
174
  /**
201
175
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
@@ -204,19 +178,17 @@ class ProductsApiResponseProcessor {
204
178
  * @params response Response returned by the server for a request to deleteProduct
205
179
  * @throws ApiException if the response code was not in [200, 299]
206
180
  */
207
- deleteProductWithHttpInfo(response) {
208
- return __awaiter(this, void 0, void 0, function* () {
209
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
210
- if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
211
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
212
- }
213
- // Work around for missing responses in specification, e.g. for petstore.yaml
214
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
215
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
216
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
217
- }
218
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
219
- });
181
+ async deleteProductWithHttpInfo(response) {
182
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
183
+ if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
184
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
185
+ }
186
+ // Work around for missing responses in specification, e.g. for petstore.yaml
187
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
188
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "void", "");
189
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
190
+ }
191
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
220
192
  }
221
193
  /**
222
194
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
@@ -225,23 +197,21 @@ class ProductsApiResponseProcessor {
225
197
  * @params response Response returned by the server for a request to getProduct
226
198
  * @throws ApiException if the response code was not in [200, 299]
227
199
  */
228
- getProductWithHttpInfo(response) {
229
- return __awaiter(this, void 0, void 0, function* () {
230
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
231
- if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
232
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIProduct", "");
233
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
234
- }
235
- if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
236
- throw new exception_1.ApiException(response.httpStatusCode, "Product not found", undefined, response.headers);
237
- }
238
- // Work around for missing responses in specification, e.g. for petstore.yaml
239
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
240
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIProduct", "");
241
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
242
- }
243
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
244
- });
200
+ async getProductWithHttpInfo(response) {
201
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
202
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
203
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIProduct", "");
204
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
205
+ }
206
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
207
+ throw new exception_1.ApiException(response.httpStatusCode, "Product not found", undefined, response.headers);
208
+ }
209
+ // Work around for missing responses in specification, e.g. for petstore.yaml
210
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
211
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIProduct", "");
212
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
213
+ }
214
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
245
215
  }
246
216
  /**
247
217
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
@@ -250,23 +220,21 @@ class ProductsApiResponseProcessor {
250
220
  * @params response Response returned by the server for a request to queryProducts
251
221
  * @throws ApiException if the response code was not in [200, 299]
252
222
  */
253
- queryProductsWithHttpInfo(response) {
254
- return __awaiter(this, void 0, void 0, function* () {
255
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
256
- if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
257
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "QueryResultAPIProduct", "");
258
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
259
- }
260
- if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
261
- throw new exception_1.ApiException(response.httpStatusCode, "Invalid query", undefined, response.headers);
262
- }
263
- // Work around for missing responses in specification, e.g. for petstore.yaml
264
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
265
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "QueryResultAPIProduct", "");
266
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
267
- }
268
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
269
- });
223
+ async queryProductsWithHttpInfo(response) {
224
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
225
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
226
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "QueryResultAPIProduct", "");
227
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
228
+ }
229
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
230
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid query", undefined, response.headers);
231
+ }
232
+ // Work around for missing responses in specification, e.g. for petstore.yaml
233
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
234
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "QueryResultAPIProduct", "");
235
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
236
+ }
237
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
270
238
  }
271
239
  /**
272
240
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
@@ -275,26 +243,24 @@ class ProductsApiResponseProcessor {
275
243
  * @params response Response returned by the server for a request to updateProduct
276
244
  * @throws ApiException if the response code was not in [200, 299]
277
245
  */
278
- updateProductWithHttpInfo(response) {
279
- return __awaiter(this, void 0, void 0, function* () {
280
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
281
- if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
282
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIProduct", "");
283
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
284
- }
285
- if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
286
- throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
287
- }
288
- if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
289
- throw new exception_1.ApiException(response.httpStatusCode, "Product not found", undefined, response.headers);
290
- }
291
- // Work around for missing responses in specification, e.g. for petstore.yaml
292
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
293
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIProduct", "");
294
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
295
- }
296
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
297
- });
246
+ async updateProductWithHttpInfo(response) {
247
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
248
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
249
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIProduct", "");
250
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
251
+ }
252
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
253
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
254
+ }
255
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
256
+ throw new exception_1.ApiException(response.httpStatusCode, "Product not found", undefined, response.headers);
257
+ }
258
+ // Work around for missing responses in specification, e.g. for petstore.yaml
259
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
260
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "APIProduct", "");
261
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
262
+ }
263
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
298
264
  }
299
265
  }
300
266
  exports.ProductsApiResponseProcessor = ProductsApiResponseProcessor;
@@ -28,6 +28,7 @@ export type HttpBearerConfiguration = {
28
28
  export type OAuth2Configuration = {
29
29
  accessToken: string;
30
30
  };
31
+ export type HttpSignatureConfiguration = unknown;
31
32
  export type AuthMethodsConfiguration = {
32
33
  "default"?: SecurityAuthentication;
33
34
  };
@@ -36,6 +36,7 @@ export declare class HttpException extends Error {
36
36
  * Represents the body of an outgoing HTTP request.
37
37
  */
38
38
  export type RequestBody = undefined | string | FormData | URLSearchParams;
39
+ type Headers = Record<string, string>;
39
40
  /**
40
41
  * Represents an HTTP request context
41
42
  */
@@ -69,11 +70,10 @@ export declare class RequestContext {
69
70
  */
70
71
  setBody(body: RequestBody): void;
71
72
  getHttpMethod(): HttpMethod;
72
- getHeaders(): {
73
- [key: string]: string;
74
- };
73
+ getHeaders(): Headers;
75
74
  getBody(): RequestBody;
76
75
  setQueryParam(name: string, value: string): void;
76
+ appendQueryParam(name: string, value: string): void;
77
77
  /**
78
78
  * Sets a cookie with the name and value. NO check for duplicate cookies is performed
79
79
  *
@@ -98,13 +98,9 @@ export declare class SelfDecodingBody implements ResponseBody {
98
98
  }
99
99
  export declare class ResponseContext {
100
100
  httpStatusCode: number;
101
- headers: {
102
- [key: string]: string;
103
- };
101
+ headers: Headers;
104
102
  body: ResponseBody;
105
- constructor(httpStatusCode: number, headers: {
106
- [key: string]: string;
107
- }, body: ResponseBody);
103
+ constructor(httpStatusCode: number, headers: Headers, body: ResponseBody);
108
104
  /**
109
105
  * Parse header value in the form `value; param1="value1"`
110
106
  *
@@ -112,9 +108,7 @@ export declare class ResponseContext {
112
108
  * Parameter names are converted to lower case
113
109
  * The first parameter is returned with the key `""`
114
110
  */
115
- getParsedHeader(headerName: string): {
116
- [parameter: string]: string;
117
- };
111
+ getParsedHeader(headerName: string): Headers;
118
112
  getBodyAsFile(): Promise<HttpFile>;
119
113
  /**
120
114
  * Use a heuristic to get a body of unknown data structure.
@@ -130,13 +124,6 @@ export interface PromiseHttpLibrary {
130
124
  }
131
125
  export declare function wrapHttpLibrary(promiseHttpLibrary: PromiseHttpLibrary): HttpLibrary;
132
126
  export declare class HttpInfo<T> extends ResponseContext {
133
- httpStatusCode: number;
134
- headers: {
135
- [key: string]: string;
136
- };
137
- body: ResponseBody;
138
127
  data: T;
139
- constructor(httpStatusCode: number, headers: {
140
- [key: string]: string;
141
- }, body: ResponseBody, data: T);
128
+ constructor(httpStatusCode: number, headers: Headers, body: ResponseBody, data: T);
142
129
  }