vayu-ts 0.2.15 → 0.3.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 (334) hide show
  1. package/dist/example/index.d.ts +1 -0
  2. package/dist/example/index.js +74 -0
  3. package/dist/openapi/apis/AuthApi.js +8 -4
  4. package/dist/openapi/apis/CatalogProductsApi.d.ts +89 -0
  5. package/dist/openapi/apis/CatalogProductsApi.js +377 -0
  6. package/dist/openapi/apis/CloudUsageSubmissionApi.d.ts +25 -0
  7. package/dist/openapi/apis/CloudUsageSubmissionApi.js +89 -0
  8. package/dist/openapi/apis/ContractsApi.d.ts +21 -3
  9. package/dist/openapi/apis/ContractsApi.js +119 -21
  10. package/dist/openapi/apis/CreditsApi.js +24 -12
  11. package/dist/openapi/apis/CustomFieldsApi.d.ts +89 -0
  12. package/dist/openapi/apis/CustomFieldsApi.js +377 -0
  13. package/dist/openapi/apis/CustomersApi.d.ts +63 -0
  14. package/dist/openapi/apis/CustomersApi.js +360 -38
  15. package/dist/openapi/apis/EventsApi.d.ts +132 -1
  16. package/dist/openapi/apis/EventsApi.js +660 -25
  17. package/dist/openapi/apis/InvoicesApi.d.ts +19 -3
  18. package/dist/openapi/apis/InvoicesApi.js +91 -12
  19. package/dist/openapi/apis/MeasurementsApi.js +36 -18
  20. package/dist/openapi/apis/MetersApi.js +38 -19
  21. package/dist/openapi/apis/PlansApi.d.ts +56 -0
  22. package/dist/openapi/apis/PlansApi.js +225 -0
  23. package/dist/openapi/apis/ProductConsumptionsApi.js +10 -5
  24. package/dist/openapi/apis/WebhooksApi.js +10 -5
  25. package/dist/openapi/http/http.d.ts +6 -18
  26. package/dist/openapi/http/http.js +25 -13
  27. package/dist/openapi/http/isomorphic-fetch.d.ts +1 -0
  28. package/dist/openapi/http/isomorphic-fetch.js +4 -7
  29. package/dist/openapi/index.d.ts +1 -1
  30. package/dist/openapi/index.js +5 -1
  31. package/dist/openapi/models/Address.d.ts +5 -5
  32. package/dist/openapi/models/BillingInterval.d.ts +18 -0
  33. package/dist/openapi/models/BillingInterval.js +22 -0
  34. package/dist/openapi/models/CloudUsageResult.d.ts +83 -0
  35. package/dist/openapi/models/CloudUsageResult.js +103 -0
  36. package/dist/openapi/models/ConflictErrorResponse.d.ts +42 -0
  37. package/dist/openapi/models/ConflictErrorResponse.js +52 -0
  38. package/dist/openapi/models/Contact.d.ts +3 -1
  39. package/dist/openapi/models/Contact.js +13 -1
  40. package/dist/openapi/models/ContractStatus.d.ts +23 -0
  41. package/dist/openapi/models/ContractStatus.js +27 -0
  42. package/dist/openapi/models/CreateCatalogProductRequest.d.ts +42 -0
  43. package/dist/openapi/models/CreateCatalogProductRequest.js +44 -0
  44. package/dist/openapi/models/CreateCatalogProductResponse.d.ts +32 -0
  45. package/dist/openapi/models/CreateCatalogProductResponse.js +32 -0
  46. package/dist/openapi/models/CreateCatalogProductResponseCatalogProduct.d.ts +45 -0
  47. package/dist/openapi/models/CreateCatalogProductResponseCatalogProduct.js +62 -0
  48. package/dist/openapi/models/CreateContractRequest.d.ts +53 -5
  49. package/dist/openapi/models/CreateContractRequest.js +76 -4
  50. package/dist/openapi/models/CreateCustomFieldRequest.d.ts +71 -0
  51. package/dist/openapi/models/CreateCustomFieldRequest.js +90 -0
  52. package/dist/openapi/models/CreateCustomFieldResponse.d.ts +32 -0
  53. package/dist/openapi/models/CreateCustomFieldResponse.js +32 -0
  54. package/dist/openapi/models/CreateCustomFieldResponseCustomField.d.ts +74 -0
  55. package/dist/openapi/models/CreateCustomFieldResponseCustomField.js +108 -0
  56. package/dist/openapi/models/CreateCustomerRelationRequest.d.ts +38 -0
  57. package/dist/openapi/models/CreateCustomerRelationRequest.js +38 -0
  58. package/dist/openapi/models/CreateCustomerRelationResponse.d.ts +32 -0
  59. package/dist/openapi/models/CreateCustomerRelationResponse.js +32 -0
  60. package/dist/openapi/models/CreateCustomerRelationResponseCustomerRelation.d.ts +41 -0
  61. package/dist/openapi/models/CreateCustomerRelationResponseCustomerRelation.js +56 -0
  62. package/dist/openapi/models/CreateCustomerRequest.d.ts +70 -2
  63. package/dist/openapi/models/CreateCustomerRequest.js +112 -6
  64. package/dist/openapi/models/CreateCustomerResponseCustomer.d.ts +70 -2
  65. package/dist/openapi/models/CreateCustomerResponseCustomer.js +112 -6
  66. package/dist/openapi/models/CreditLedgerEntry.d.ts +3 -1
  67. package/dist/openapi/models/CreditLedgerEntry.js +8 -2
  68. package/dist/openapi/models/Currency.d.ts +24 -0
  69. package/dist/openapi/models/Currency.js +28 -0
  70. package/dist/openapi/models/CustomField.d.ts +65 -0
  71. package/dist/openapi/models/CustomField.js +78 -0
  72. package/dist/openapi/models/CustomFieldEntities.d.ts +20 -0
  73. package/dist/openapi/models/CustomFieldEntities.js +24 -0
  74. package/dist/openapi/models/CustomFieldValue.d.ts +33 -0
  75. package/dist/openapi/models/CustomFieldValue.js +44 -0
  76. package/dist/openapi/models/CustomFieldValueTypes.d.ts +20 -0
  77. package/dist/openapi/models/CustomFieldValueTypes.js +24 -0
  78. package/dist/openapi/models/CustomerCloudProviderSettings.d.ts +39 -0
  79. package/dist/openapi/models/CustomerCloudProviderSettings.js +51 -0
  80. package/dist/openapi/models/CustomerSource.d.ts +21 -0
  81. package/dist/openapi/models/CustomerSource.js +25 -0
  82. package/dist/openapi/models/DeleteCatalogProductResponse.d.ts +32 -0
  83. package/dist/openapi/models/DeleteCatalogProductResponse.js +32 -0
  84. package/dist/openapi/models/DeleteCatalogProductResponseCatalogProduct.d.ts +46 -0
  85. package/dist/openapi/models/DeleteCatalogProductResponseCatalogProduct.js +68 -0
  86. package/dist/openapi/models/DeleteContractResponseContract.d.ts +53 -5
  87. package/dist/openapi/models/DeleteContractResponseContract.js +76 -4
  88. package/dist/openapi/models/DeleteCustomFieldResponse.d.ts +32 -0
  89. package/dist/openapi/models/DeleteCustomFieldResponse.js +32 -0
  90. package/dist/openapi/models/DeleteCustomFieldResponseCustomField.d.ts +75 -0
  91. package/dist/openapi/models/DeleteCustomFieldResponseCustomField.js +114 -0
  92. package/dist/openapi/models/DeleteCustomerResponseCustomer.d.ts +70 -2
  93. package/dist/openapi/models/DeleteCustomerResponseCustomer.js +112 -6
  94. package/dist/openapi/models/DeleteEventsByRefsRequest.d.ts +31 -0
  95. package/dist/openapi/models/DeleteEventsByRefsRequest.js +32 -0
  96. package/dist/openapi/models/DeleteEventsByRefsResponse.d.ts +35 -0
  97. package/dist/openapi/models/DeleteEventsByRefsResponse.js +32 -0
  98. package/dist/openapi/models/DeleteEventsByRefsResponseEventsInner.d.ts +56 -0
  99. package/dist/openapi/models/DeleteEventsByRefsResponseEventsInner.js +80 -0
  100. package/dist/openapi/models/DeletePlanResponse.d.ts +32 -0
  101. package/dist/openapi/models/DeletePlanResponse.js +32 -0
  102. package/dist/openapi/models/DeletePlanResponsePlan.d.ts +42 -0
  103. package/dist/openapi/models/DeletePlanResponsePlan.js +68 -0
  104. package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.d.ts +1 -1
  105. package/dist/openapi/models/ExternalOverageStrategy.d.ts +20 -0
  106. package/dist/openapi/models/ExternalOverageStrategy.js +24 -0
  107. package/dist/openapi/models/GetCatalogProductResponse.d.ts +32 -0
  108. package/dist/openapi/models/GetCatalogProductResponse.js +32 -0
  109. package/dist/openapi/models/GetContractByIntegrationIdResponse.d.ts +32 -0
  110. package/dist/openapi/models/GetContractByIntegrationIdResponse.js +32 -0
  111. package/dist/openapi/models/GetContractResponseContract.d.ts +53 -5
  112. package/dist/openapi/models/GetContractResponseContract.js +76 -4
  113. package/dist/openapi/models/GetCustomFieldResponse.d.ts +32 -0
  114. package/dist/openapi/models/GetCustomFieldResponse.js +32 -0
  115. package/dist/openapi/models/GetCustomerByIntegrationIdResponse.d.ts +32 -0
  116. package/dist/openapi/models/GetCustomerByIntegrationIdResponse.js +32 -0
  117. package/dist/openapi/models/GetCustomerByNameResponse.d.ts +32 -0
  118. package/dist/openapi/models/GetCustomerByNameResponse.js +32 -0
  119. package/dist/openapi/models/GetCustomerByNameResponseCustomer.d.ts +123 -0
  120. package/dist/openapi/models/GetCustomerByNameResponseCustomer.js +183 -0
  121. package/dist/openapi/models/GetCustomerRelationResponse.d.ts +32 -0
  122. package/dist/openapi/models/GetCustomerRelationResponse.js +32 -0
  123. package/dist/openapi/models/GetInvoiceResponseInvoice.d.ts +14 -0
  124. package/dist/openapi/models/GetInvoiceResponseInvoice.js +30 -0
  125. package/dist/openapi/models/GetInvoiceResponseInvoiceRevenueBreakdown.d.ts +39 -0
  126. package/dist/openapi/models/GetInvoiceResponseInvoiceRevenueBreakdown.js +65 -0
  127. package/dist/openapi/models/GetPlanResponse.d.ts +32 -0
  128. package/dist/openapi/models/GetPlanResponse.js +32 -0
  129. package/dist/openapi/models/GetPlanResponsePlan.d.ts +41 -0
  130. package/dist/openapi/models/GetPlanResponsePlan.js +62 -0
  131. package/dist/openapi/models/IntegrationEntity.d.ts +42 -0
  132. package/dist/openapi/models/IntegrationEntity.js +62 -0
  133. package/dist/openapi/models/IntegrationEntityTypes.d.ts +23 -0
  134. package/dist/openapi/models/IntegrationEntityTypes.js +27 -0
  135. package/dist/openapi/models/IntegrationProviders.d.ts +26 -0
  136. package/dist/openapi/models/IntegrationProviders.js +30 -0
  137. package/dist/openapi/models/IntegrationType.d.ts +26 -0
  138. package/dist/openapi/models/IntegrationType.js +30 -0
  139. package/dist/openapi/models/InternalServerErrorResponse.d.ts +42 -0
  140. package/dist/openapi/models/InternalServerErrorResponse.js +52 -0
  141. package/dist/openapi/models/InvoiceBillingStatus.d.ts +21 -0
  142. package/dist/openapi/models/InvoiceBillingStatus.js +25 -0
  143. package/dist/openapi/models/InvoicePaymentStatusResponse.d.ts +39 -0
  144. package/dist/openapi/models/InvoicePaymentStatusResponse.js +74 -0
  145. package/dist/openapi/models/ListCatalogProductsResponse.d.ts +35 -0
  146. package/dist/openapi/models/ListCatalogProductsResponse.js +50 -0
  147. package/dist/openapi/models/ListCustomFieldsResponse.d.ts +35 -0
  148. package/dist/openapi/models/ListCustomFieldsResponse.js +50 -0
  149. package/dist/openapi/models/ListPlansResponse.d.ts +35 -0
  150. package/dist/openapi/models/ListPlansResponse.js +50 -0
  151. package/dist/openapi/models/NotFoundErrorResponse.d.ts +42 -0
  152. package/dist/openapi/models/NotFoundErrorResponse.js +52 -0
  153. package/dist/openapi/models/NotificationEventType.d.ts +7 -1
  154. package/dist/openapi/models/NotificationEventType.js +6 -0
  155. package/dist/openapi/models/ObjectSerializer.d.ts +112 -0
  156. package/dist/openapi/models/ObjectSerializer.js +367 -0
  157. package/dist/openapi/models/PartnerSubmissionDetail.d.ts +46 -0
  158. package/dist/openapi/models/PartnerSubmissionDetail.js +49 -0
  159. package/dist/openapi/models/PaymentInfo.d.ts +45 -0
  160. package/dist/openapi/models/PaymentInfo.js +89 -0
  161. package/dist/openapi/models/PaymentInfoDepositTo.d.ts +32 -0
  162. package/dist/openapi/models/PaymentInfoDepositTo.js +38 -0
  163. package/dist/openapi/models/PaymentTerm.d.ts +18 -0
  164. package/dist/openapi/models/PaymentTerm.js +22 -0
  165. package/dist/openapi/models/PlanBillingData.d.ts +41 -0
  166. package/dist/openapi/models/PlanBillingData.js +59 -0
  167. package/dist/openapi/models/PlanDuration.d.ts +30 -0
  168. package/dist/openapi/models/PlanDuration.js +25 -0
  169. package/dist/openapi/models/PlanStatus.d.ts +19 -0
  170. package/dist/openapi/models/PlanStatus.js +23 -0
  171. package/dist/openapi/models/ProductCloudProviderSettings.d.ts +39 -0
  172. package/dist/openapi/models/ProductCloudProviderSettings.js +51 -0
  173. package/dist/openapi/models/ProductGroup.d.ts +65 -0
  174. package/dist/openapi/models/ProductGroup.js +80 -0
  175. package/dist/openapi/models/ProductGroupCommitment.d.ts +53 -0
  176. package/dist/openapi/models/ProductGroupCommitment.js +64 -0
  177. package/dist/openapi/models/ProductGroupProductsInner.d.ts +68 -0
  178. package/dist/openapi/models/ProductGroupProductsInner.js +98 -0
  179. package/dist/openapi/models/ProductGroupProductsInnerCommitment.d.ts +53 -0
  180. package/dist/openapi/models/ProductGroupProductsInnerCommitment.js +64 -0
  181. package/dist/openapi/models/ProductGroupProductsInnerCommitmentScheduling.d.ts +39 -0
  182. package/dist/openapi/models/ProductGroupProductsInnerCommitmentScheduling.js +41 -0
  183. package/dist/openapi/models/ProductGroupProductsInnerCommitmentSchedulingDuration.d.ts +41 -0
  184. package/dist/openapi/models/ProductGroupProductsInnerCommitmentSchedulingDuration.js +48 -0
  185. package/dist/openapi/models/ProductGroupProductsInnerPricing.d.ts +38 -0
  186. package/dist/openapi/models/ProductGroupProductsInnerPricing.js +24 -0
  187. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf.d.ts +41 -0
  188. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf.js +54 -0
  189. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1.d.ts +39 -0
  190. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1.js +54 -0
  191. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1InstallmentsInner.d.ts +32 -0
  192. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf1InstallmentsInner.js +38 -0
  193. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2.d.ts +39 -0
  194. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2.js +54 -0
  195. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2SubscriptionCadence.d.ts +38 -0
  196. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf2SubscriptionCadence.js +45 -0
  197. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3.d.ts +46 -0
  198. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3.js +78 -0
  199. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3SubscriptionCadence.d.ts +38 -0
  200. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3SubscriptionCadence.js +45 -0
  201. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3TiersInner.d.ts +35 -0
  202. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf3TiersInner.js +56 -0
  203. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf4.d.ts +41 -0
  204. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf4.js +60 -0
  205. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf5.d.ts +42 -0
  206. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf5.js +48 -0
  207. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf6.d.ts +42 -0
  208. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOf6.js +48 -0
  209. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOfDiscount.d.ts +53 -0
  210. package/dist/openapi/models/ProductGroupProductsInnerPricingOneOfDiscount.js +58 -0
  211. package/dist/openapi/models/ProductGroupProductsInnerScheduling.d.ts +39 -0
  212. package/dist/openapi/models/ProductGroupProductsInnerScheduling.js +41 -0
  213. package/dist/openapi/models/ProductGroupProductsInnerSchedulingDuration.d.ts +41 -0
  214. package/dist/openapi/models/ProductGroupProductsInnerSchedulingDuration.js +48 -0
  215. package/dist/openapi/models/QueryEventsResponse.d.ts +3 -3
  216. package/dist/openapi/models/QueryEventsResponse.js +18 -0
  217. package/dist/openapi/models/RateLimitErrorResponse.d.ts +42 -0
  218. package/dist/openapi/models/RateLimitErrorResponse.js +52 -0
  219. package/dist/openapi/models/RequestTooLongErrorResponse.d.ts +42 -0
  220. package/dist/openapi/models/RequestTooLongErrorResponse.js +52 -0
  221. package/dist/openapi/models/SubmitCloudUsageRequest.d.ts +39 -0
  222. package/dist/openapi/models/SubmitCloudUsageRequest.js +38 -0
  223. package/dist/openapi/models/SyncStatus.d.ts +16 -0
  224. package/dist/openapi/models/SyncStatus.js +20 -0
  225. package/dist/openapi/models/UnauthorizedErrorResponse.d.ts +42 -0
  226. package/dist/openapi/models/UnauthorizedErrorResponse.js +52 -0
  227. package/dist/openapi/models/UnlimitedDuration.d.ts +14 -0
  228. package/dist/openapi/models/UnlimitedDuration.js +18 -0
  229. package/dist/openapi/models/UpdateCatalogProductRequest.d.ts +42 -0
  230. package/dist/openapi/models/UpdateCatalogProductRequest.js +44 -0
  231. package/dist/openapi/models/UpdateCatalogProductResponse.d.ts +32 -0
  232. package/dist/openapi/models/UpdateCatalogProductResponse.js +32 -0
  233. package/dist/openapi/models/UpdateCustomFieldRequest.d.ts +71 -0
  234. package/dist/openapi/models/UpdateCustomFieldRequest.js +90 -0
  235. package/dist/openapi/models/UpdateCustomFieldResponse.d.ts +32 -0
  236. package/dist/openapi/models/UpdateCustomFieldResponse.js +32 -0
  237. package/dist/openapi/models/UpdateCustomerRequest.d.ts +70 -2
  238. package/dist/openapi/models/UpdateCustomerRequest.js +112 -6
  239. package/dist/openapi/models/UsageWindow.d.ts +41 -0
  240. package/dist/openapi/models/UsageWindow.js +41 -0
  241. package/dist/openapi/models/V2DeleteEventResponse.d.ts +32 -0
  242. package/dist/openapi/models/V2DeleteEventResponse.js +32 -0
  243. package/dist/openapi/models/V2DeleteEventsByRefsRequest.d.ts +31 -0
  244. package/dist/openapi/models/V2DeleteEventsByRefsRequest.js +32 -0
  245. package/dist/openapi/models/V2DeleteEventsByRefsResponse.d.ts +35 -0
  246. package/dist/openapi/models/V2DeleteEventsByRefsResponse.js +32 -0
  247. package/dist/openapi/models/V2EventsDryRunRequest.d.ts +32 -0
  248. package/dist/openapi/models/V2EventsDryRunRequest.js +32 -0
  249. package/dist/openapi/models/V2EventsDryRunResponse.d.ts +32 -0
  250. package/dist/openapi/models/V2EventsDryRunResponse.js +32 -0
  251. package/dist/openapi/models/V2GetEventResponse.d.ts +32 -0
  252. package/dist/openapi/models/V2GetEventResponse.js +32 -0
  253. package/dist/openapi/models/V2QueryEventsAggregationRequest.d.ts +45 -0
  254. package/dist/openapi/models/V2QueryEventsAggregationRequest.js +70 -0
  255. package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInner.d.ts +39 -0
  256. package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInner.js +62 -0
  257. package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregation.d.ts +35 -0
  258. package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregation.js +44 -0
  259. package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregationFieldArithmetic.d.ts +38 -0
  260. package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerAggregationFieldArithmetic.js +45 -0
  261. package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInner.d.ts +43 -0
  262. package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInner.js +54 -0
  263. package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInnerValue.d.ts +30 -0
  264. package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerFiltersInnerValue.js +25 -0
  265. package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerSqlFullQuery.d.ts +34 -0
  266. package/dist/openapi/models/V2QueryEventsAggregationRequestMetersInnerSqlFullQuery.js +38 -0
  267. package/dist/openapi/models/V2QueryEventsAggregationRequestPeriod.d.ts +32 -0
  268. package/dist/openapi/models/V2QueryEventsAggregationRequestPeriod.js +38 -0
  269. package/dist/openapi/models/V2QueryEventsAggregationResponse.d.ts +42 -0
  270. package/dist/openapi/models/V2QueryEventsAggregationResponse.js +52 -0
  271. package/dist/openapi/models/V2QueryEventsAggregationResponseDataPointsInner.d.ts +34 -0
  272. package/dist/openapi/models/V2QueryEventsAggregationResponseDataPointsInner.js +38 -0
  273. package/dist/openapi/models/V2QueryEventsResponse.d.ts +35 -0
  274. package/dist/openapi/models/V2QueryEventsResponse.js +50 -0
  275. package/dist/openapi/models/V2SendEventsRequest.d.ts +32 -0
  276. package/dist/openapi/models/V2SendEventsRequest.js +32 -0
  277. package/dist/openapi/models/V2SendEventsResponse.d.ts +40 -0
  278. package/dist/openapi/models/V2SendEventsResponse.js +38 -0
  279. package/dist/openapi/models/ValidationErrorResponse.d.ts +51 -0
  280. package/dist/openapi/models/ValidationErrorResponse.js +60 -0
  281. package/dist/openapi/models/ValidationErrorResponseParamsInner.d.ts +38 -0
  282. package/dist/openapi/models/ValidationErrorResponseParamsInner.js +38 -0
  283. package/dist/openapi/models/WebhookSubscribeRequest.d.ts +1 -0
  284. package/dist/openapi/models/WebhookSubscribeRequest.js +6 -0
  285. package/dist/openapi/models/all.d.ts +112 -0
  286. package/dist/openapi/models/all.js +112 -0
  287. package/dist/openapi/types/ObservableAPI.d.ts +447 -14
  288. package/dist/openapi/types/ObservableAPI.js +907 -29
  289. package/dist/openapi/types/PromiseAPI.d.ts +439 -14
  290. package/dist/openapi/types/PromiseAPI.js +600 -38
  291. package/dist/sdk/clients/CatalogProductsClient.d.ts +11 -0
  292. package/dist/sdk/clients/CatalogProductsClient.js +28 -0
  293. package/dist/sdk/clients/CloudUsageSubmissionClient.d.ts +6 -0
  294. package/dist/sdk/clients/CloudUsageSubmissionClient.js +14 -0
  295. package/dist/sdk/clients/ContractsClient.d.ts +2 -1
  296. package/dist/sdk/clients/ContractsClient.js +3 -0
  297. package/dist/sdk/clients/CreditsClient.d.ts +9 -0
  298. package/dist/sdk/clients/CreditsClient.js +22 -0
  299. package/dist/sdk/clients/CustomersClient.d.ts +5 -1
  300. package/dist/sdk/clients/CustomersClient.js +12 -0
  301. package/dist/sdk/clients/EventsClient.d.ts +2 -1
  302. package/dist/sdk/clients/EventsClient.js +4 -1
  303. package/dist/sdk/clients/InvoicesClient.d.ts +1 -0
  304. package/dist/sdk/clients/InvoicesClient.js +3 -0
  305. package/dist/sdk/clients/MeasurementsClient.d.ts +10 -0
  306. package/dist/sdk/clients/MeasurementsClient.js +25 -0
  307. package/dist/sdk/clients/WebhooksClient.d.ts +2 -0
  308. package/dist/sdk/clients/WebhooksClient.js +14 -0
  309. package/dist/sdk/clients/index.d.ts +4 -0
  310. package/dist/sdk/clients/index.js +4 -0
  311. package/dist/sdk/index.d.ts +6 -1
  312. package/dist/sdk/index.js +13 -0
  313. package/dist/sdk/services/authenticated-http-library.d.ts +11 -0
  314. package/dist/sdk/services/authenticated-http-library.js +29 -0
  315. package/dist/sdk/services/authenticator.d.ts +11 -0
  316. package/dist/sdk/services/authenticator.js +57 -0
  317. package/dist/sdk/services/configuration.service.d.ts +7 -6
  318. package/dist/sdk/services/configuration.service.js +12 -44
  319. package/dist/sdk/types/CatalogProducts.d.ts +1 -0
  320. package/dist/sdk/types/CatalogProducts.js +2 -0
  321. package/dist/sdk/types/CloudUsageSubmission.d.ts +1 -0
  322. package/dist/sdk/types/CloudUsageSubmission.js +2 -0
  323. package/dist/sdk/types/Contracts.d.ts +1 -1
  324. package/dist/sdk/types/Credits.d.ts +1 -0
  325. package/dist/sdk/types/Credits.js +2 -0
  326. package/dist/sdk/types/Customers.d.ts +1 -1
  327. package/dist/sdk/types/Events.d.ts +1 -1
  328. package/dist/sdk/types/Invoices.d.ts +1 -1
  329. package/dist/sdk/types/Measurements.d.ts +1 -0
  330. package/dist/sdk/types/Measurements.js +2 -0
  331. package/dist/sdk/types/index.d.ts +4 -0
  332. package/dist/sdk/types/index.js +4 -0
  333. package/dist/sdk-v2/services/configuration.service.js +16 -8
  334. package/package.json +3 -4
@@ -40,6 +40,41 @@ class EventsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
40
40
  }
41
41
  return requestContext;
42
42
  }
43
+ /**
44
+ * Delete multiple events, identified by ref, in a single request.
45
+ * Delete events by refs
46
+ * @param deleteEventsByRefsRequest A list of event refs to delete. The request deletes the matching events for the authenticated account.
47
+ */
48
+ async deleteEventsByRefs(deleteEventsByRefsRequest, _options) {
49
+ let _config = _options || this.configuration;
50
+ // verify required parameter 'deleteEventsByRefsRequest' is not null or undefined
51
+ if (deleteEventsByRefsRequest === null || deleteEventsByRefsRequest === undefined) {
52
+ throw new baseapi_1.RequiredError("EventsApi", "deleteEventsByRefs", "deleteEventsByRefsRequest");
53
+ }
54
+ // Path Params
55
+ const localVarPath = '/events/delete-by-refs';
56
+ // Make Request Context
57
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
58
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
59
+ // Body Params
60
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
61
+ "application/json"
62
+ ]);
63
+ requestContext.setHeaderParam("Content-Type", contentType);
64
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(deleteEventsByRefsRequest, "DeleteEventsByRefsRequest", ""), contentType);
65
+ requestContext.setBody(serializedBody);
66
+ let authMethod;
67
+ // Apply auth methods
68
+ authMethod = _config.authMethods["BearerAuthorizer"];
69
+ if (authMethod?.applySecurityAuthentication) {
70
+ await authMethod?.applySecurityAuthentication(requestContext);
71
+ }
72
+ const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
73
+ if (defaultAuth?.applySecurityAuthentication) {
74
+ await defaultAuth?.applySecurityAuthentication(requestContext);
75
+ }
76
+ return requestContext;
77
+ }
43
78
  /**
44
79
  * Use this endpoint to get a specific event using its reference ID.
45
80
  * Get event by refId
@@ -75,10 +110,11 @@ class EventsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
75
110
  * @param startTime
76
111
  * @param endTime
77
112
  * @param eventName
113
+ * @param customerAlias
78
114
  * @param limit
79
115
  * @param cursor
80
116
  */
81
- async queryEvents(startTime, endTime, eventName, limit, cursor, _options) {
117
+ async queryEvents(startTime, endTime, eventName, customerAlias, limit, cursor, _options) {
82
118
  let _config = _options || this.configuration;
83
119
  // verify required parameter 'startTime' is not null or undefined
84
120
  if (startTime === null || startTime === undefined) {
@@ -106,6 +142,10 @@ class EventsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
106
142
  requestContext.setQueryParam("eventName", ObjectSerializer_1.ObjectSerializer.serialize(eventName, "string", ""));
107
143
  }
108
144
  // Query Params
145
+ if (customerAlias !== undefined) {
146
+ requestContext.setQueryParam("customerAlias", ObjectSerializer_1.ObjectSerializer.serialize(customerAlias, "string", ""));
147
+ }
148
+ // Query Params
109
149
  if (limit !== undefined) {
110
150
  requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
111
151
  }
@@ -195,6 +235,265 @@ class EventsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
195
235
  }
196
236
  return requestContext;
197
237
  }
238
+ /**
239
+ * Use this endpoint to remove a specific event using its reference ID (v2).
240
+ * Delete an event by refId (v2)
241
+ * @param refId
242
+ */
243
+ async v2DeleteEventByRefId(refId, _options) {
244
+ let _config = _options || this.configuration;
245
+ // verify required parameter 'refId' is not null or undefined
246
+ if (refId === null || refId === undefined) {
247
+ throw new baseapi_1.RequiredError("EventsApi", "v2DeleteEventByRefId", "refId");
248
+ }
249
+ // Path Params
250
+ const localVarPath = '/v2/events/{refId}'
251
+ .replace('{' + 'refId' + '}', encodeURIComponent(String(refId)));
252
+ // Make Request Context
253
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
254
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
255
+ let authMethod;
256
+ // Apply auth methods
257
+ authMethod = _config.authMethods["BearerAuthorizer"];
258
+ if (authMethod?.applySecurityAuthentication) {
259
+ await authMethod?.applySecurityAuthentication(requestContext);
260
+ }
261
+ const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
262
+ if (defaultAuth?.applySecurityAuthentication) {
263
+ await defaultAuth?.applySecurityAuthentication(requestContext);
264
+ }
265
+ return requestContext;
266
+ }
267
+ /**
268
+ * Delete multiple events, identified by ref, in a single request (v2).
269
+ * Delete events by refs (v2)
270
+ * @param v2DeleteEventsByRefsRequest A list of event refs to delete. The request deletes the matching events for the authenticated account.
271
+ */
272
+ async v2DeleteEventsByRefs(v2DeleteEventsByRefsRequest, _options) {
273
+ let _config = _options || this.configuration;
274
+ // verify required parameter 'v2DeleteEventsByRefsRequest' is not null or undefined
275
+ if (v2DeleteEventsByRefsRequest === null || v2DeleteEventsByRefsRequest === undefined) {
276
+ throw new baseapi_1.RequiredError("EventsApi", "v2DeleteEventsByRefs", "v2DeleteEventsByRefsRequest");
277
+ }
278
+ // Path Params
279
+ const localVarPath = '/v2/events/delete-by-refs';
280
+ // Make Request Context
281
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
282
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
283
+ // Body Params
284
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
285
+ "application/json"
286
+ ]);
287
+ requestContext.setHeaderParam("Content-Type", contentType);
288
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(v2DeleteEventsByRefsRequest, "V2DeleteEventsByRefsRequest", ""), contentType);
289
+ requestContext.setBody(serializedBody);
290
+ let authMethod;
291
+ // Apply auth methods
292
+ authMethod = _config.authMethods["BearerAuthorizer"];
293
+ if (authMethod?.applySecurityAuthentication) {
294
+ await authMethod?.applySecurityAuthentication(requestContext);
295
+ }
296
+ const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
297
+ if (defaultAuth?.applySecurityAuthentication) {
298
+ await defaultAuth?.applySecurityAuthentication(requestContext);
299
+ }
300
+ return requestContext;
301
+ }
302
+ /**
303
+ * Use this endpoint to get a specific event using its reference ID (v2).
304
+ * Get event by refId (v2)
305
+ * @param refId
306
+ */
307
+ async v2GetEventByRefId(refId, _options) {
308
+ let _config = _options || this.configuration;
309
+ // verify required parameter 'refId' is not null or undefined
310
+ if (refId === null || refId === undefined) {
311
+ throw new baseapi_1.RequiredError("EventsApi", "v2GetEventByRefId", "refId");
312
+ }
313
+ // Path Params
314
+ const localVarPath = '/v2/events/{refId}'
315
+ .replace('{' + 'refId' + '}', encodeURIComponent(String(refId)));
316
+ // Make Request Context
317
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
318
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
319
+ let authMethod;
320
+ // Apply auth methods
321
+ authMethod = _config.authMethods["BearerAuthorizer"];
322
+ if (authMethod?.applySecurityAuthentication) {
323
+ await authMethod?.applySecurityAuthentication(requestContext);
324
+ }
325
+ const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
326
+ if (defaultAuth?.applySecurityAuthentication) {
327
+ await defaultAuth?.applySecurityAuthentication(requestContext);
328
+ }
329
+ return requestContext;
330
+ }
331
+ /**
332
+ * Fetch events occurring within a specified timestamp range via the events-service (ClickHouse-backed).
333
+ * Query events by timestamp period and optional event name (v2)
334
+ * @param startTime
335
+ * @param endTime
336
+ * @param eventName
337
+ * @param customerAlias
338
+ * @param limit
339
+ * @param cursor
340
+ */
341
+ async v2QueryEvents(startTime, endTime, eventName, customerAlias, limit, cursor, _options) {
342
+ let _config = _options || this.configuration;
343
+ // verify required parameter 'startTime' is not null or undefined
344
+ if (startTime === null || startTime === undefined) {
345
+ throw new baseapi_1.RequiredError("EventsApi", "v2QueryEvents", "startTime");
346
+ }
347
+ // verify required parameter 'endTime' is not null or undefined
348
+ if (endTime === null || endTime === undefined) {
349
+ throw new baseapi_1.RequiredError("EventsApi", "v2QueryEvents", "endTime");
350
+ }
351
+ // Path Params
352
+ const localVarPath = '/v2/events';
353
+ // Make Request Context
354
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
355
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
356
+ // Query Params
357
+ if (startTime !== undefined) {
358
+ requestContext.setQueryParam("startTime", ObjectSerializer_1.ObjectSerializer.serialize(startTime, "Date", "date-time"));
359
+ }
360
+ // Query Params
361
+ if (endTime !== undefined) {
362
+ requestContext.setQueryParam("endTime", ObjectSerializer_1.ObjectSerializer.serialize(endTime, "Date", "date-time"));
363
+ }
364
+ // Query Params
365
+ if (eventName !== undefined) {
366
+ requestContext.setQueryParam("eventName", ObjectSerializer_1.ObjectSerializer.serialize(eventName, "string", ""));
367
+ }
368
+ // Query Params
369
+ if (customerAlias !== undefined) {
370
+ requestContext.setQueryParam("customerAlias", ObjectSerializer_1.ObjectSerializer.serialize(customerAlias, "string", ""));
371
+ }
372
+ // Query Params
373
+ if (limit !== undefined) {
374
+ requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
375
+ }
376
+ // Query Params
377
+ if (cursor !== undefined) {
378
+ requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
379
+ }
380
+ let authMethod;
381
+ // Apply auth methods
382
+ authMethod = _config.authMethods["BearerAuthorizer"];
383
+ if (authMethod?.applySecurityAuthentication) {
384
+ await authMethod?.applySecurityAuthentication(requestContext);
385
+ }
386
+ const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
387
+ if (defaultAuth?.applySecurityAuthentication) {
388
+ await defaultAuth?.applySecurityAuthentication(requestContext);
389
+ }
390
+ return requestContext;
391
+ }
392
+ /**
393
+ * Aggregate events by meters and time grouping via the events-service.
394
+ * Aggregate events (v2)
395
+ * @param v2QueryEventsAggregationRequest Configuration for aggregating events by meters and time grouping.
396
+ */
397
+ async v2QueryEventsAggregation(v2QueryEventsAggregationRequest, _options) {
398
+ let _config = _options || this.configuration;
399
+ // verify required parameter 'v2QueryEventsAggregationRequest' is not null or undefined
400
+ if (v2QueryEventsAggregationRequest === null || v2QueryEventsAggregationRequest === undefined) {
401
+ throw new baseapi_1.RequiredError("EventsApi", "v2QueryEventsAggregation", "v2QueryEventsAggregationRequest");
402
+ }
403
+ // Path Params
404
+ const localVarPath = '/v2/events/aggregation';
405
+ // Make Request Context
406
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
407
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
408
+ // Body Params
409
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
410
+ "application/json"
411
+ ]);
412
+ requestContext.setHeaderParam("Content-Type", contentType);
413
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(v2QueryEventsAggregationRequest, "V2QueryEventsAggregationRequest", ""), contentType);
414
+ requestContext.setBody(serializedBody);
415
+ let authMethod;
416
+ // Apply auth methods
417
+ authMethod = _config.authMethods["BearerAuthorizer"];
418
+ if (authMethod?.applySecurityAuthentication) {
419
+ await authMethod?.applySecurityAuthentication(requestContext);
420
+ }
421
+ const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
422
+ if (defaultAuth?.applySecurityAuthentication) {
423
+ await defaultAuth?.applySecurityAuthentication(requestContext);
424
+ }
425
+ return requestContext;
426
+ }
427
+ /**
428
+ * Submit a batch of events for ingestion via the events-service.
429
+ * Submit a batch of events for ingestion (v2)
430
+ * @param v2SendEventsRequest An array of events following the EventInput schema. Up to 1000 events or a total payload max size of 256KB
431
+ */
432
+ async v2SendEvents(v2SendEventsRequest, _options) {
433
+ let _config = _options || this.configuration;
434
+ // verify required parameter 'v2SendEventsRequest' is not null or undefined
435
+ if (v2SendEventsRequest === null || v2SendEventsRequest === undefined) {
436
+ throw new baseapi_1.RequiredError("EventsApi", "v2SendEvents", "v2SendEventsRequest");
437
+ }
438
+ // Path Params
439
+ const localVarPath = '/v2/events';
440
+ // Make Request Context
441
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
442
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
443
+ // Body Params
444
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
445
+ "application/json"
446
+ ]);
447
+ requestContext.setHeaderParam("Content-Type", contentType);
448
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(v2SendEventsRequest, "V2SendEventsRequest", ""), contentType);
449
+ requestContext.setBody(serializedBody);
450
+ let authMethod;
451
+ // Apply auth methods
452
+ authMethod = _config.authMethods["BearerAuthorizer"];
453
+ if (authMethod?.applySecurityAuthentication) {
454
+ await authMethod?.applySecurityAuthentication(requestContext);
455
+ }
456
+ const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
457
+ if (defaultAuth?.applySecurityAuthentication) {
458
+ await defaultAuth?.applySecurityAuthentication(requestContext);
459
+ }
460
+ return requestContext;
461
+ }
462
+ /**
463
+ * Submit a batch of events for testing via the events-service. NOTE: this is a dry run and will not store the events.
464
+ * Submit a batch of events for testing (v2)
465
+ * @param v2EventsDryRunRequest An array of events following the EventInput schema. Up to 1000 events or a total payload max size of 256KB
466
+ */
467
+ async v2SendEventsDryRun(v2EventsDryRunRequest, _options) {
468
+ let _config = _options || this.configuration;
469
+ // verify required parameter 'v2EventsDryRunRequest' is not null or undefined
470
+ if (v2EventsDryRunRequest === null || v2EventsDryRunRequest === undefined) {
471
+ throw new baseapi_1.RequiredError("EventsApi", "v2SendEventsDryRun", "v2EventsDryRunRequest");
472
+ }
473
+ // Path Params
474
+ const localVarPath = '/v2/events/dry-run';
475
+ // Make Request Context
476
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
477
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
478
+ // Body Params
479
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
480
+ "application/json"
481
+ ]);
482
+ requestContext.setHeaderParam("Content-Type", contentType);
483
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(v2EventsDryRunRequest, "V2EventsDryRunRequest", ""), contentType);
484
+ requestContext.setBody(serializedBody);
485
+ let authMethod;
486
+ // Apply auth methods
487
+ authMethod = _config.authMethods["BearerAuthorizer"];
488
+ if (authMethod?.applySecurityAuthentication) {
489
+ await authMethod?.applySecurityAuthentication(requestContext);
490
+ }
491
+ const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
492
+ if (defaultAuth?.applySecurityAuthentication) {
493
+ await defaultAuth?.applySecurityAuthentication(requestContext);
494
+ }
495
+ return requestContext;
496
+ }
198
497
  }
199
498
  exports.EventsApiRequestFactory = EventsApiRequestFactory;
200
499
  class EventsApiResponseProcessor {
@@ -212,19 +511,24 @@ class EventsApiResponseProcessor {
212
511
  return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
213
512
  }
214
513
  if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
215
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
514
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
515
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
216
516
  }
217
517
  if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
218
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
518
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
519
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
219
520
  }
220
521
  if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
221
- throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
522
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
523
+ throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
222
524
  }
223
525
  if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
224
- throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
526
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
527
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
225
528
  }
226
529
  if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
227
- throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
530
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
531
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
228
532
  }
229
533
  // Work around for missing responses in specification, e.g. for petstore.yaml
230
534
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
@@ -233,6 +537,46 @@ class EventsApiResponseProcessor {
233
537
  }
234
538
  throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
235
539
  }
540
+ /**
541
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
542
+ * to the expected objects
543
+ *
544
+ * @params response Response returned by the server for a request to deleteEventsByRefs
545
+ * @throws ApiException if the response code was not in [200, 299]
546
+ */
547
+ async deleteEventsByRefsWithHttpInfo(response) {
548
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
549
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
550
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "DeleteEventsByRefsResponse", "");
551
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
552
+ }
553
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
554
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
555
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
556
+ }
557
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
558
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
559
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
560
+ }
561
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
562
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
563
+ throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
564
+ }
565
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
566
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
567
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
568
+ }
569
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
570
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
571
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
572
+ }
573
+ // Work around for missing responses in specification, e.g. for petstore.yaml
574
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
575
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "DeleteEventsByRefsResponse", "");
576
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
577
+ }
578
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
579
+ }
236
580
  /**
237
581
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
238
582
  * to the expected objects
@@ -247,19 +591,24 @@ class EventsApiResponseProcessor {
247
591
  return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
248
592
  }
249
593
  if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
250
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
594
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
595
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
251
596
  }
252
597
  if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
253
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
598
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
599
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
254
600
  }
255
601
  if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
256
- throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
602
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
603
+ throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
257
604
  }
258
605
  if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
259
- throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
606
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
607
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
260
608
  }
261
609
  if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
262
- throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
610
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
611
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
263
612
  }
264
613
  // Work around for missing responses in specification, e.g. for petstore.yaml
265
614
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
@@ -282,16 +631,20 @@ class EventsApiResponseProcessor {
282
631
  return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
283
632
  }
284
633
  if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
285
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
634
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
635
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
286
636
  }
287
637
  if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
288
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
638
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
639
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
289
640
  }
290
641
  if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
291
- throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
642
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
643
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
292
644
  }
293
645
  if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
294
- throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
646
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
647
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
295
648
  }
296
649
  // Work around for missing responses in specification, e.g. for petstore.yaml
297
650
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
@@ -314,19 +667,24 @@ class EventsApiResponseProcessor {
314
667
  return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
315
668
  }
316
669
  if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
317
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
670
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
671
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
318
672
  }
319
673
  if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
320
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
674
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
675
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
321
676
  }
322
677
  if ((0, util_1.isCodeInRange)("413", response.httpStatusCode)) {
323
- throw new exception_1.ApiException(response.httpStatusCode, "Request Entity Too Large", undefined, response.headers);
678
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RequestTooLongErrorResponse", "");
679
+ throw new exception_1.ApiException(response.httpStatusCode, "Request Entity Too Large", body, response.headers);
324
680
  }
325
681
  if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
326
- throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
682
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
683
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
327
684
  }
328
685
  if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
329
- throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
686
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
687
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
330
688
  }
331
689
  // Work around for missing responses in specification, e.g. for petstore.yaml
332
690
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
@@ -349,19 +707,24 @@ class EventsApiResponseProcessor {
349
707
  return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
350
708
  }
351
709
  if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
352
- throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
710
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
711
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
353
712
  }
354
713
  if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
355
- throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
714
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
715
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
356
716
  }
357
717
  if ((0, util_1.isCodeInRange)("413", response.httpStatusCode)) {
358
- throw new exception_1.ApiException(response.httpStatusCode, "Request Entity Too Large", undefined, response.headers);
718
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RequestTooLongErrorResponse", "");
719
+ throw new exception_1.ApiException(response.httpStatusCode, "Request Entity Too Large", body, response.headers);
359
720
  }
360
721
  if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
361
- throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
722
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
723
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
362
724
  }
363
725
  if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
364
- throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
726
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
727
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
365
728
  }
366
729
  // Work around for missing responses in specification, e.g. for petstore.yaml
367
730
  if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
@@ -370,5 +733,277 @@ class EventsApiResponseProcessor {
370
733
  }
371
734
  throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
372
735
  }
736
+ /**
737
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
738
+ * to the expected objects
739
+ *
740
+ * @params response Response returned by the server for a request to v2DeleteEventByRefId
741
+ * @throws ApiException if the response code was not in [200, 299]
742
+ */
743
+ async v2DeleteEventByRefIdWithHttpInfo(response) {
744
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
745
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
746
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "V2DeleteEventResponse", "");
747
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
748
+ }
749
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
750
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
751
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
752
+ }
753
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
754
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
755
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
756
+ }
757
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
758
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
759
+ throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
760
+ }
761
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
762
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
763
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
764
+ }
765
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
766
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
767
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
768
+ }
769
+ // Work around for missing responses in specification, e.g. for petstore.yaml
770
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
771
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "V2DeleteEventResponse", "");
772
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
773
+ }
774
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
775
+ }
776
+ /**
777
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
778
+ * to the expected objects
779
+ *
780
+ * @params response Response returned by the server for a request to v2DeleteEventsByRefs
781
+ * @throws ApiException if the response code was not in [200, 299]
782
+ */
783
+ async v2DeleteEventsByRefsWithHttpInfo(response) {
784
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
785
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
786
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "V2DeleteEventsByRefsResponse", "");
787
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
788
+ }
789
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
790
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
791
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
792
+ }
793
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
794
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
795
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
796
+ }
797
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
798
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
799
+ throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
800
+ }
801
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
802
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
803
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
804
+ }
805
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
806
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
807
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
808
+ }
809
+ // Work around for missing responses in specification, e.g. for petstore.yaml
810
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
811
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "V2DeleteEventsByRefsResponse", "");
812
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
813
+ }
814
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
815
+ }
816
+ /**
817
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
818
+ * to the expected objects
819
+ *
820
+ * @params response Response returned by the server for a request to v2GetEventByRefId
821
+ * @throws ApiException if the response code was not in [200, 299]
822
+ */
823
+ async v2GetEventByRefIdWithHttpInfo(response) {
824
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
825
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
826
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "V2GetEventResponse", "");
827
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
828
+ }
829
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
830
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
831
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
832
+ }
833
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
834
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
835
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
836
+ }
837
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
838
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "NotFoundErrorResponse", "");
839
+ throw new exception_1.ApiException(response.httpStatusCode, "Not Found", body, response.headers);
840
+ }
841
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
842
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
843
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
844
+ }
845
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
846
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
847
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
848
+ }
849
+ // Work around for missing responses in specification, e.g. for petstore.yaml
850
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
851
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "V2GetEventResponse", "");
852
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
853
+ }
854
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
855
+ }
856
+ /**
857
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
858
+ * to the expected objects
859
+ *
860
+ * @params response Response returned by the server for a request to v2QueryEvents
861
+ * @throws ApiException if the response code was not in [200, 299]
862
+ */
863
+ async v2QueryEventsWithHttpInfo(response) {
864
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
865
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
866
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "V2QueryEventsResponse", "");
867
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
868
+ }
869
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
870
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
871
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
872
+ }
873
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
874
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
875
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
876
+ }
877
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
878
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
879
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
880
+ }
881
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
882
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
883
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
884
+ }
885
+ // Work around for missing responses in specification, e.g. for petstore.yaml
886
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
887
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "V2QueryEventsResponse", "");
888
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
889
+ }
890
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
891
+ }
892
+ /**
893
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
894
+ * to the expected objects
895
+ *
896
+ * @params response Response returned by the server for a request to v2QueryEventsAggregation
897
+ * @throws ApiException if the response code was not in [200, 299]
898
+ */
899
+ async v2QueryEventsAggregationWithHttpInfo(response) {
900
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
901
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
902
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "V2QueryEventsAggregationResponse", "");
903
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
904
+ }
905
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
906
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
907
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
908
+ }
909
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
910
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
911
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
912
+ }
913
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
914
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
915
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
916
+ }
917
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
918
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
919
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
920
+ }
921
+ // Work around for missing responses in specification, e.g. for petstore.yaml
922
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
923
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "V2QueryEventsAggregationResponse", "");
924
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
925
+ }
926
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
927
+ }
928
+ /**
929
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
930
+ * to the expected objects
931
+ *
932
+ * @params response Response returned by the server for a request to v2SendEvents
933
+ * @throws ApiException if the response code was not in [200, 299]
934
+ */
935
+ async v2SendEventsWithHttpInfo(response) {
936
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
937
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
938
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "V2SendEventsResponse", "");
939
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
940
+ }
941
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
942
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
943
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
944
+ }
945
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
946
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
947
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
948
+ }
949
+ if ((0, util_1.isCodeInRange)("413", response.httpStatusCode)) {
950
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RequestTooLongErrorResponse", "");
951
+ throw new exception_1.ApiException(response.httpStatusCode, "Request Entity Too Large", body, response.headers);
952
+ }
953
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
954
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
955
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
956
+ }
957
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
958
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
959
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
960
+ }
961
+ // Work around for missing responses in specification, e.g. for petstore.yaml
962
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
963
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "V2SendEventsResponse", "");
964
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
965
+ }
966
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
967
+ }
968
+ /**
969
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
970
+ * to the expected objects
971
+ *
972
+ * @params response Response returned by the server for a request to v2SendEventsDryRun
973
+ * @throws ApiException if the response code was not in [200, 299]
974
+ */
975
+ async v2SendEventsDryRunWithHttpInfo(response) {
976
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
977
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
978
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "V2EventsDryRunResponse", "");
979
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
980
+ }
981
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
982
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "ValidationErrorResponse", "");
983
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", body, response.headers);
984
+ }
985
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
986
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "UnauthorizedErrorResponse", "");
987
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", body, response.headers);
988
+ }
989
+ if ((0, util_1.isCodeInRange)("413", response.httpStatusCode)) {
990
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RequestTooLongErrorResponse", "");
991
+ throw new exception_1.ApiException(response.httpStatusCode, "Request Entity Too Large", body, response.headers);
992
+ }
993
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
994
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "RateLimitErrorResponse", "");
995
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", body, response.headers);
996
+ }
997
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
998
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "InternalServerErrorResponse", "");
999
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers);
1000
+ }
1001
+ // Work around for missing responses in specification, e.g. for petstore.yaml
1002
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1003
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "V2EventsDryRunResponse", "");
1004
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
1005
+ }
1006
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
1007
+ }
373
1008
  }
374
1009
  exports.EventsApiResponseProcessor = EventsApiResponseProcessor;