vayu-ts 0.1.3 → 0.2.1

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 (401) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +17 -0
  3. package/dist/openapi/apis/AuthApi.d.ts +26 -0
  4. package/dist/openapi/apis/AuthApi.js +93 -0
  5. package/dist/openapi/apis/ContractsApi.d.ts +72 -0
  6. package/dist/openapi/apis/ContractsApi.js +307 -0
  7. package/dist/openapi/apis/CreditsApi.d.ts +57 -0
  8. package/dist/openapi/apis/CreditsApi.js +248 -0
  9. package/dist/openapi/apis/CustomersApi.d.ts +103 -0
  10. package/dist/openapi/apis/CustomersApi.js +457 -0
  11. package/dist/openapi/apis/EventsApi.d.ts +91 -0
  12. package/dist/openapi/apis/EventsApi.js +408 -0
  13. package/dist/openapi/apis/IntegrationsApi.d.ts +41 -0
  14. package/dist/openapi/apis/IntegrationsApi.js +170 -0
  15. package/dist/openapi/apis/InvoicesApi.d.ts +41 -0
  16. package/dist/openapi/apis/InvoicesApi.js +166 -0
  17. package/dist/openapi/apis/MetersApi.d.ts +73 -0
  18. package/dist/openapi/apis/MetersApi.js +316 -0
  19. package/dist/openapi/apis/PlansApi.d.ts +56 -0
  20. package/dist/openapi/apis/PlansApi.js +235 -0
  21. package/dist/openapi/apis/ReportsApi.d.ts +41 -0
  22. package/dist/openapi/apis/ReportsApi.js +166 -0
  23. package/dist/openapi/apis/WebhooksApi.d.ts +25 -0
  24. package/dist/openapi/apis/WebhooksApi.js +101 -0
  25. package/dist/openapi/apis/baseapi.d.ts +33 -0
  26. package/dist/openapi/apis/baseapi.js +41 -0
  27. package/dist/openapi/apis/exception.d.ts +19 -0
  28. package/dist/openapi/apis/exception.js +22 -0
  29. package/dist/openapi/auth/auth.d.ts +54 -0
  30. package/dist/openapi/auth/auth.js +50 -0
  31. package/dist/openapi/configuration.d.ts +63 -0
  32. package/dist/openapi/configuration.js +34 -0
  33. package/dist/openapi/http/http.d.ts +142 -0
  34. package/dist/openapi/http/http.js +229 -0
  35. package/dist/openapi/http/isomorphic-fetch.d.ts +5 -0
  36. package/dist/openapi/http/isomorphic-fetch.js +33 -0
  37. package/dist/openapi/index.d.ts +10 -0
  38. package/dist/openapi/index.js +38 -0
  39. package/dist/openapi/middleware.d.ts +54 -0
  40. package/dist/openapi/middleware.js +16 -0
  41. package/dist/openapi/models/Address.d.ts +35 -0
  42. package/dist/openapi/models/Address.js +58 -0
  43. package/dist/openapi/models/AggregationMethod.d.ts +40 -0
  44. package/dist/openapi/models/AggregationMethod.js +46 -0
  45. package/dist/openapi/models/AggregationOperator.d.ts +24 -0
  46. package/dist/openapi/models/AggregationOperator.js +28 -0
  47. package/dist/openapi/models/BillingCycleStatus.d.ts +15 -0
  48. package/dist/openapi/models/BillingCycleStatus.js +19 -0
  49. package/dist/openapi/models/BillingInterval.d.ts +18 -0
  50. package/dist/openapi/models/BillingInterval.js +22 -0
  51. package/dist/openapi/models/Condition.d.ts +29 -0
  52. package/dist/openapi/models/Condition.js +31 -0
  53. package/dist/openapi/models/Contact.d.ts +30 -0
  54. package/dist/openapi/models/Contact.js +43 -0
  55. package/dist/openapi/models/ContractStatus.d.ts +18 -0
  56. package/dist/openapi/models/ContractStatus.js +22 -0
  57. package/dist/openapi/models/CreateContractRequest.d.ts +43 -0
  58. package/dist/openapi/models/CreateContractRequest.js +49 -0
  59. package/dist/openapi/models/CreateContractResponse.d.ts +29 -0
  60. package/dist/openapi/models/CreateContractResponse.js +31 -0
  61. package/dist/openapi/models/CreateCustomerRequest.d.ts +46 -0
  62. package/dist/openapi/models/CreateCustomerRequest.js +55 -0
  63. package/dist/openapi/models/CreateCustomerResponse.d.ts +29 -0
  64. package/dist/openapi/models/CreateCustomerResponse.js +31 -0
  65. package/dist/openapi/models/CreateCustomerResponseCustomer.d.ts +49 -0
  66. package/dist/openapi/models/CreateCustomerResponseCustomer.js +73 -0
  67. package/dist/openapi/models/CreditLedgerEntry.d.ts +32 -0
  68. package/dist/openapi/models/CreditLedgerEntry.js +49 -0
  69. package/dist/openapi/models/Criterion.d.ts +31 -0
  70. package/dist/openapi/models/Criterion.js +43 -0
  71. package/dist/openapi/models/CriterionOperator.d.ts +23 -0
  72. package/dist/openapi/models/CriterionOperator.js +27 -0
  73. package/dist/openapi/models/Currency.d.ts +17 -0
  74. package/dist/openapi/models/Currency.js +21 -0
  75. package/dist/openapi/models/DeductCreditsRequest.d.ts +35 -0
  76. package/dist/openapi/models/DeductCreditsRequest.js +37 -0
  77. package/dist/openapi/models/DeleteContractResponse.d.ts +29 -0
  78. package/dist/openapi/models/DeleteContractResponse.js +31 -0
  79. package/dist/openapi/models/DeleteContractResponseContract.d.ts +47 -0
  80. package/dist/openapi/models/DeleteContractResponseContract.js +73 -0
  81. package/dist/openapi/models/DeleteCustomerResponse.d.ts +29 -0
  82. package/dist/openapi/models/DeleteCustomerResponse.js +31 -0
  83. package/dist/openapi/models/DeleteCustomerResponseCustomer.d.ts +50 -0
  84. package/dist/openapi/models/DeleteCustomerResponseCustomer.js +79 -0
  85. package/dist/openapi/models/DeleteEventResponse.d.ts +29 -0
  86. package/dist/openapi/models/DeleteEventResponse.js +31 -0
  87. package/dist/openapi/models/DeleteEventResponseEvent.d.ts +56 -0
  88. package/dist/openapi/models/DeleteEventResponseEvent.js +82 -0
  89. package/dist/openapi/models/DeleteMeterResponse.d.ts +29 -0
  90. package/dist/openapi/models/DeleteMeterResponse.js +31 -0
  91. package/dist/openapi/models/DeleteMeterResponseMeter.d.ts +43 -0
  92. package/dist/openapi/models/DeleteMeterResponseMeter.js +73 -0
  93. package/dist/openapi/models/DeletePlanResponse.d.ts +29 -0
  94. package/dist/openapi/models/DeletePlanResponse.js +31 -0
  95. package/dist/openapi/models/DeletePlanResponsePlan.d.ts +39 -0
  96. package/dist/openapi/models/DeletePlanResponsePlan.js +67 -0
  97. package/dist/openapi/models/Event.d.ts +49 -0
  98. package/dist/openapi/models/Event.js +55 -0
  99. package/dist/openapi/models/EventsDryRunRequest.d.ts +29 -0
  100. package/dist/openapi/models/EventsDryRunRequest.js +31 -0
  101. package/dist/openapi/models/EventsDryRunResponse.d.ts +29 -0
  102. package/dist/openapi/models/EventsDryRunResponse.js +31 -0
  103. package/dist/openapi/models/EventsDryRunResponseObject.d.ts +32 -0
  104. package/dist/openapi/models/EventsDryRunResponseObject.js +43 -0
  105. package/dist/openapi/models/EventsDryRunResponseObjectEvent.d.ts +35 -0
  106. package/dist/openapi/models/EventsDryRunResponseObjectEvent.js +61 -0
  107. package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.d.ts +41 -0
  108. package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.js +61 -0
  109. package/dist/openapi/models/Filter.d.ts +32 -0
  110. package/dist/openapi/models/Filter.js +34 -0
  111. package/dist/openapi/models/FullDayPeriod.d.ts +32 -0
  112. package/dist/openapi/models/FullDayPeriod.js +40 -0
  113. package/dist/openapi/models/GetCommitmentReportResponse.d.ts +44 -0
  114. package/dist/openapi/models/GetCommitmentReportResponse.js +115 -0
  115. package/dist/openapi/models/GetContractResponse.d.ts +29 -0
  116. package/dist/openapi/models/GetContractResponse.js +31 -0
  117. package/dist/openapi/models/GetContractResponseContract.d.ts +46 -0
  118. package/dist/openapi/models/GetContractResponseContract.js +67 -0
  119. package/dist/openapi/models/GetCustomerResponse.d.ts +29 -0
  120. package/dist/openapi/models/GetCustomerResponse.js +31 -0
  121. package/dist/openapi/models/GetEventResponse.d.ts +29 -0
  122. package/dist/openapi/models/GetEventResponse.js +31 -0
  123. package/dist/openapi/models/GetEventResponseEvent.d.ts +55 -0
  124. package/dist/openapi/models/GetEventResponseEvent.js +76 -0
  125. package/dist/openapi/models/GetInvoiceResponse.d.ts +29 -0
  126. package/dist/openapi/models/GetInvoiceResponse.js +31 -0
  127. package/dist/openapi/models/GetInvoiceResponseInvoice.d.ts +50 -0
  128. package/dist/openapi/models/GetInvoiceResponseInvoice.js +79 -0
  129. package/dist/openapi/models/GetMeterResponse.d.ts +29 -0
  130. package/dist/openapi/models/GetMeterResponse.js +31 -0
  131. package/dist/openapi/models/GetMeterResponseMeter.d.ts +42 -0
  132. package/dist/openapi/models/GetMeterResponseMeter.js +67 -0
  133. package/dist/openapi/models/GetPlanResponse.d.ts +29 -0
  134. package/dist/openapi/models/GetPlanResponse.js +31 -0
  135. package/dist/openapi/models/GetPlanResponsePlan.d.ts +38 -0
  136. package/dist/openapi/models/GetPlanResponsePlan.js +61 -0
  137. package/dist/openapi/models/GetProductsUsageReportResponse.d.ts +44 -0
  138. package/dist/openapi/models/GetProductsUsageReportResponse.js +115 -0
  139. package/dist/openapi/models/GrantCreditsRequest.d.ts +35 -0
  140. package/dist/openapi/models/GrantCreditsRequest.js +37 -0
  141. package/dist/openapi/models/InvalidEvent.d.ts +33 -0
  142. package/dist/openapi/models/InvalidEvent.js +37 -0
  143. package/dist/openapi/models/LineItem.d.ts +33 -0
  144. package/dist/openapi/models/LineItem.js +37 -0
  145. package/dist/openapi/models/LineItemRevenueBreakdown.d.ts +36 -0
  146. package/dist/openapi/models/LineItemRevenueBreakdown.js +64 -0
  147. package/dist/openapi/models/ListContractsResponse.d.ts +32 -0
  148. package/dist/openapi/models/ListContractsResponse.js +49 -0
  149. package/dist/openapi/models/ListCreditLedgerEntriesResponse.d.ts +32 -0
  150. package/dist/openapi/models/ListCreditLedgerEntriesResponse.js +31 -0
  151. package/dist/openapi/models/ListCustomersResponse.d.ts +32 -0
  152. package/dist/openapi/models/ListCustomersResponse.js +49 -0
  153. package/dist/openapi/models/ListInvoicesResponse.d.ts +32 -0
  154. package/dist/openapi/models/ListInvoicesResponse.js +49 -0
  155. package/dist/openapi/models/ListMetersResponse.d.ts +32 -0
  156. package/dist/openapi/models/ListMetersResponse.js +49 -0
  157. package/dist/openapi/models/ListPlansResponse.d.ts +32 -0
  158. package/dist/openapi/models/ListPlansResponse.js +49 -0
  159. package/dist/openapi/models/LoginRequest.d.ts +31 -0
  160. package/dist/openapi/models/LoginRequest.js +31 -0
  161. package/dist/openapi/models/LoginResponse.d.ts +31 -0
  162. package/dist/openapi/models/LoginResponse.js +31 -0
  163. package/dist/openapi/models/Meter.d.ts +39 -0
  164. package/dist/openapi/models/Meter.js +49 -0
  165. package/dist/openapi/models/NetSuiteExportSalesOrderRequest.d.ts +30 -0
  166. package/dist/openapi/models/NetSuiteExportSalesOrderRequest.js +43 -0
  167. package/dist/openapi/models/NetSuiteSyncInvoicesRequest.d.ts +34 -0
  168. package/dist/openapi/models/NetSuiteSyncInvoicesRequest.js +47 -0
  169. package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.d.ts +39 -0
  170. package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.js +85 -0
  171. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataEntity.d.ts +28 -0
  172. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataEntity.js +31 -0
  173. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.d.ts +29 -0
  174. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.js +31 -0
  175. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.d.ts +33 -0
  176. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.js +55 -0
  177. package/dist/openapi/models/NetSuiteSyncInvoicesResponse.d.ts +29 -0
  178. package/dist/openapi/models/NetSuiteSyncInvoicesResponse.js +37 -0
  179. package/dist/openapi/models/NotificationEventType.d.ts +17 -0
  180. package/dist/openapi/models/NotificationEventType.js +21 -0
  181. package/dist/openapi/models/ObjectSerializer.d.ts +109 -0
  182. package/dist/openapi/models/ObjectSerializer.js +497 -0
  183. package/dist/openapi/models/PaymentTerm.d.ts +18 -0
  184. package/dist/openapi/models/PaymentTerm.js +22 -0
  185. package/dist/openapi/models/PlanBillingData.d.ts +37 -0
  186. package/dist/openapi/models/PlanBillingData.js +58 -0
  187. package/dist/openapi/models/PlanStatus.d.ts +19 -0
  188. package/dist/openapi/models/PlanStatus.js +23 -0
  189. package/dist/openapi/models/QueryEventsResponse.d.ts +32 -0
  190. package/dist/openapi/models/QueryEventsResponse.js +31 -0
  191. package/dist/openapi/models/QueryEventsResponseEventsInner.d.ts +52 -0
  192. package/dist/openapi/models/QueryEventsResponseEventsInner.js +73 -0
  193. package/dist/openapi/models/SendEventsRequest.d.ts +29 -0
  194. package/dist/openapi/models/SendEventsRequest.js +31 -0
  195. package/dist/openapi/models/SendEventsResponse.d.ts +37 -0
  196. package/dist/openapi/models/SendEventsResponse.js +37 -0
  197. package/dist/openapi/models/UpdateCustomerRequest.d.ts +46 -0
  198. package/dist/openapi/models/UpdateCustomerRequest.js +55 -0
  199. package/dist/openapi/models/UpdateCustomerResponse.d.ts +29 -0
  200. package/dist/openapi/models/UpdateCustomerResponse.js +31 -0
  201. package/dist/openapi/models/UpdateMeterRequest.d.ts +39 -0
  202. package/dist/openapi/models/UpdateMeterRequest.js +49 -0
  203. package/dist/openapi/models/UpdateMeterResponse.d.ts +29 -0
  204. package/dist/openapi/models/UpdateMeterResponse.js +31 -0
  205. package/dist/openapi/models/WebhookSubscribeRequest.d.ts +30 -0
  206. package/dist/openapi/models/WebhookSubscribeRequest.js +37 -0
  207. package/dist/openapi/models/all.d.ts +82 -0
  208. package/dist/openapi/models/all.js +98 -0
  209. package/dist/openapi/rxjsStub.d.ts +10 -0
  210. package/dist/openapi/rxjsStub.js +31 -0
  211. package/dist/openapi/servers.d.ts +39 -0
  212. package/dist/openapi/servers.js +52 -0
  213. package/dist/openapi/types/ObservableAPI.d.ts +544 -0
  214. package/dist/openapi/types/ObservableAPI.js +1089 -0
  215. package/dist/openapi/types/PromiseAPI.d.ts +521 -0
  216. package/dist/openapi/types/PromiseAPI.js +702 -0
  217. package/dist/openapi/util.d.ts +15 -0
  218. package/dist/openapi/util.js +42 -0
  219. package/dist/openapi-v2/apis/AuthenticationApi.d.ts +24 -0
  220. package/dist/openapi-v2/apis/AuthenticationApi.js +79 -0
  221. package/dist/openapi-v2/apis/CustomersApi.d.ts +76 -0
  222. package/dist/openapi-v2/apis/CustomersApi.js +295 -0
  223. package/dist/openapi-v2/apis/EventsApi.d.ts +63 -0
  224. package/dist/openapi-v2/apis/EventsApi.js +231 -0
  225. package/dist/openapi-v2/apis/InvoicesApi.d.ts +88 -0
  226. package/dist/openapi-v2/apis/InvoicesApi.js +344 -0
  227. package/dist/openapi-v2/apis/ProductsApi.d.ts +90 -0
  228. package/dist/openapi-v2/apis/ProductsApi.js +359 -0
  229. package/dist/openapi-v2/apis/baseapi.d.ts +33 -0
  230. package/dist/openapi-v2/apis/baseapi.js +41 -0
  231. package/dist/openapi-v2/apis/exception.d.ts +19 -0
  232. package/dist/openapi-v2/apis/exception.js +22 -0
  233. package/dist/openapi-v2/auth/auth.d.ts +38 -0
  234. package/dist/openapi-v2/auth/auth.js +16 -0
  235. package/dist/openapi-v2/configuration.d.ts +63 -0
  236. package/dist/openapi-v2/configuration.js +34 -0
  237. package/dist/openapi-v2/http/http.d.ts +142 -0
  238. package/dist/openapi-v2/http/http.js +229 -0
  239. package/dist/openapi-v2/http/isomorphic-fetch.d.ts +5 -0
  240. package/dist/openapi-v2/http/isomorphic-fetch.js +33 -0
  241. package/dist/openapi-v2/index.d.ts +10 -0
  242. package/dist/openapi-v2/index.js +32 -0
  243. package/dist/openapi-v2/middleware.d.ts +54 -0
  244. package/dist/openapi-v2/middleware.js +16 -0
  245. package/dist/openapi-v2/models/APICreateCustomerPayload.d.ts +45 -0
  246. package/dist/openapi-v2/models/APICreateCustomerPayload.js +49 -0
  247. package/dist/openapi-v2/models/APICreateInvoicePayload.d.ts +41 -0
  248. package/dist/openapi-v2/models/APICreateInvoicePayload.js +49 -0
  249. package/dist/openapi-v2/models/APICreateProductPayload.d.ts +39 -0
  250. package/dist/openapi-v2/models/APICreateProductPayload.js +49 -0
  251. package/dist/openapi-v2/models/APICustomer.d.ts +64 -0
  252. package/dist/openapi-v2/models/APICustomer.js +76 -0
  253. package/dist/openapi-v2/models/APIEvent.d.ts +72 -0
  254. package/dist/openapi-v2/models/APIEvent.js +88 -0
  255. package/dist/openapi-v2/models/APIIngestEventPayload.d.ts +49 -0
  256. package/dist/openapi-v2/models/APIIngestEventPayload.js +55 -0
  257. package/dist/openapi-v2/models/APIInvoice.d.ts +71 -0
  258. package/dist/openapi-v2/models/APIInvoice.js +88 -0
  259. package/dist/openapi-v2/models/APIInvoiceBillingPeriod.d.ts +38 -0
  260. package/dist/openapi-v2/models/APIInvoiceBillingPeriod.js +40 -0
  261. package/dist/openapi-v2/models/APIProduct.d.ts +63 -0
  262. package/dist/openapi-v2/models/APIProduct.js +82 -0
  263. package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.d.ts +43 -0
  264. package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.js +49 -0
  265. package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.d.ts +43 -0
  266. package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.js +49 -0
  267. package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.d.ts +43 -0
  268. package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.js +49 -0
  269. package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.d.ts +43 -0
  270. package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.js +49 -0
  271. package/dist/openapi-v2/models/APIUpdateCustomerPayload.d.ts +45 -0
  272. package/dist/openapi-v2/models/APIUpdateCustomerPayload.js +49 -0
  273. package/dist/openapi-v2/models/APIUpdateInvoicePayload.d.ts +41 -0
  274. package/dist/openapi-v2/models/APIUpdateInvoicePayload.js +49 -0
  275. package/dist/openapi-v2/models/APIUpdateProductPayload.d.ts +39 -0
  276. package/dist/openapi-v2/models/APIUpdateProductPayload.js +49 -0
  277. package/dist/openapi-v2/models/Aggregation.d.ts +32 -0
  278. package/dist/openapi-v2/models/Aggregation.js +43 -0
  279. package/dist/openapi-v2/models/AggregationMethods.d.ts +18 -0
  280. package/dist/openapi-v2/models/AggregationMethods.js +22 -0
  281. package/dist/openapi-v2/models/Condition.d.ts +29 -0
  282. package/dist/openapi-v2/models/Condition.js +31 -0
  283. package/dist/openapi-v2/models/Criterion.d.ts +32 -0
  284. package/dist/openapi-v2/models/Criterion.js +43 -0
  285. package/dist/openapi-v2/models/CriterionOperators.d.ts +23 -0
  286. package/dist/openapi-v2/models/CriterionOperators.js +27 -0
  287. package/dist/openapi-v2/models/CriterionValue.d.ts +27 -0
  288. package/dist/openapi-v2/models/CriterionValue.js +24 -0
  289. package/dist/openapi-v2/models/Event.d.ts +54 -0
  290. package/dist/openapi-v2/models/Event.js +85 -0
  291. package/dist/openapi-v2/models/IngestEventToTheSystem201Response.d.ts +31 -0
  292. package/dist/openapi-v2/models/IngestEventToTheSystem201Response.js +43 -0
  293. package/dist/openapi-v2/models/InvoiceProductBreakdown.d.ts +36 -0
  294. package/dist/openapi-v2/models/InvoiceProductBreakdown.js +46 -0
  295. package/dist/openapi-v2/models/Login200Response.d.ts +28 -0
  296. package/dist/openapi-v2/models/Login200Response.js +31 -0
  297. package/dist/openapi-v2/models/LoginRequest.d.ts +28 -0
  298. package/dist/openapi-v2/models/LoginRequest.js +31 -0
  299. package/dist/openapi-v2/models/ObjectSerializer.d.ts +64 -0
  300. package/dist/openapi-v2/models/ObjectSerializer.js +368 -0
  301. package/dist/openapi-v2/models/Pricing.d.ts +30 -0
  302. package/dist/openapi-v2/models/Pricing.js +37 -0
  303. package/dist/openapi-v2/models/PricingTiersInner.d.ts +31 -0
  304. package/dist/openapi-v2/models/PricingTiersInner.js +49 -0
  305. package/dist/openapi-v2/models/ProductBreakdown.d.ts +29 -0
  306. package/dist/openapi-v2/models/ProductBreakdown.js +37 -0
  307. package/dist/openapi-v2/models/ProductRevision.d.ts +36 -0
  308. package/dist/openapi-v2/models/ProductRevision.js +55 -0
  309. package/dist/openapi-v2/models/QueryResultAPICustomer.d.ts +40 -0
  310. package/dist/openapi-v2/models/QueryResultAPICustomer.js +43 -0
  311. package/dist/openapi-v2/models/QueryResultAPIEvent.d.ts +40 -0
  312. package/dist/openapi-v2/models/QueryResultAPIEvent.js +43 -0
  313. package/dist/openapi-v2/models/QueryResultAPIInvoice.d.ts +40 -0
  314. package/dist/openapi-v2/models/QueryResultAPIInvoice.js +43 -0
  315. package/dist/openapi-v2/models/QueryResultAPIProduct.d.ts +40 -0
  316. package/dist/openapi-v2/models/QueryResultAPIProduct.js +43 -0
  317. package/dist/openapi-v2/models/ReviseProductPayload.d.ts +37 -0
  318. package/dist/openapi-v2/models/ReviseProductPayload.js +43 -0
  319. package/dist/openapi-v2/models/UpdateEventPayload.d.ts +33 -0
  320. package/dist/openapi-v2/models/UpdateEventPayload.js +31 -0
  321. package/dist/openapi-v2/models/all.d.ts +37 -0
  322. package/dist/openapi-v2/models/all.js +53 -0
  323. package/dist/openapi-v2/rxjsStub.d.ts +10 -0
  324. package/dist/openapi-v2/rxjsStub.js +31 -0
  325. package/dist/openapi-v2/servers.d.ts +38 -0
  326. package/dist/openapi-v2/servers.js +51 -0
  327. package/dist/openapi-v2/types/ObservableAPI.d.ts +245 -0
  328. package/dist/openapi-v2/types/ObservableAPI.js +608 -0
  329. package/dist/openapi-v2/types/PromiseAPI.d.ts +234 -0
  330. package/dist/openapi-v2/types/PromiseAPI.js +354 -0
  331. package/dist/openapi-v2/util.d.ts +15 -0
  332. package/dist/openapi-v2/util.js +42 -0
  333. package/dist/sdk/clients/ContractsClient.d.ts +10 -0
  334. package/dist/sdk/clients/ContractsClient.js +42 -0
  335. package/dist/sdk/clients/CustomersClient.d.ts +12 -0
  336. package/dist/sdk/clients/CustomersClient.js +52 -0
  337. package/dist/sdk/clients/EventsClient.d.ts +11 -0
  338. package/dist/sdk/clients/EventsClient.js +49 -0
  339. package/dist/sdk/clients/InvoicesClient.d.ts +7 -0
  340. package/dist/sdk/clients/InvoicesClient.js +32 -0
  341. package/dist/sdk/clients/MetersClient.d.ts +10 -0
  342. package/dist/sdk/clients/MetersClient.js +42 -0
  343. package/dist/sdk/clients/PlansClient.d.ts +8 -0
  344. package/dist/sdk/clients/PlansClient.js +37 -0
  345. package/dist/sdk/clients/WebhooksClient.d.ts +6 -0
  346. package/dist/sdk/clients/WebhooksClient.js +25 -0
  347. package/dist/sdk/clients/index.d.ts +7 -0
  348. package/dist/sdk/clients/index.js +23 -0
  349. package/dist/sdk/index.d.ts +14 -0
  350. package/dist/sdk/index.js +62 -0
  351. package/dist/sdk/services/configuration.service.d.ts +21 -0
  352. package/dist/sdk/services/configuration.service.js +104 -0
  353. package/dist/sdk/services/index.d.ts +1 -0
  354. package/dist/sdk/services/index.js +17 -0
  355. package/dist/sdk/types/Contracts.d.ts +1 -0
  356. package/dist/sdk/types/Contracts.js +2 -0
  357. package/dist/sdk/types/Customers.d.ts +1 -0
  358. package/dist/sdk/types/Customers.js +2 -0
  359. package/dist/sdk/types/Events.d.ts +1 -0
  360. package/dist/sdk/types/Events.js +2 -0
  361. package/dist/sdk/types/Invoices.d.ts +1 -0
  362. package/dist/sdk/types/Invoices.js +2 -0
  363. package/dist/sdk/types/Meters.d.ts +1 -0
  364. package/dist/sdk/types/Meters.js +2 -0
  365. package/dist/sdk/types/Plans.d.ts +1 -0
  366. package/dist/sdk/types/Plans.js +2 -0
  367. package/dist/sdk/types/index.d.ts +7 -0
  368. package/dist/sdk/types/index.js +23 -0
  369. package/dist/sdk/types/pagination-options.d.ts +4 -0
  370. package/dist/sdk/types/pagination-options.js +2 -0
  371. package/dist/sdk-v2/clients/CustomersClient.d.ts +10 -0
  372. package/dist/sdk-v2/clients/CustomersClient.js +45 -0
  373. package/dist/sdk-v2/clients/EventsClient.d.ts +9 -0
  374. package/dist/sdk-v2/clients/EventsClient.js +46 -0
  375. package/dist/sdk-v2/clients/InvoicesClient.d.ts +11 -0
  376. package/dist/sdk-v2/clients/InvoicesClient.js +50 -0
  377. package/dist/sdk-v2/clients/ProductsClient.d.ts +11 -0
  378. package/dist/sdk-v2/clients/ProductsClient.js +50 -0
  379. package/dist/sdk-v2/clients/index.d.ts +4 -0
  380. package/dist/sdk-v2/clients/index.js +20 -0
  381. package/dist/sdk-v2/index.d.ts +11 -0
  382. package/dist/sdk-v2/index.js +53 -0
  383. package/dist/sdk-v2/services/configuration.service.d.ts +21 -0
  384. package/dist/sdk-v2/services/configuration.service.js +98 -0
  385. package/dist/sdk-v2/services/index.d.ts +1 -0
  386. package/dist/sdk-v2/services/index.js +17 -0
  387. package/dist/sdk-v2/types/Customers.d.ts +1 -0
  388. package/dist/sdk-v2/types/Customers.js +2 -0
  389. package/dist/sdk-v2/types/Events.d.ts +1 -0
  390. package/dist/sdk-v2/types/Events.js +2 -0
  391. package/dist/sdk-v2/types/Invoices.d.ts +1 -0
  392. package/dist/sdk-v2/types/Invoices.js +2 -0
  393. package/dist/sdk-v2/types/Products.d.ts +1 -0
  394. package/dist/sdk-v2/types/Products.js +2 -0
  395. package/dist/sdk-v2/types/index.d.ts +6 -0
  396. package/dist/sdk-v2/types/index.js +23 -0
  397. package/dist/types.d.ts +1 -0
  398. package/dist/types.js +17 -0
  399. package/dist/v2.d.ts +1 -0
  400. package/dist/v2.js +17 -0
  401. package/package.json +17 -1
@@ -0,0 +1,408 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.EventsApiResponseProcessor = exports.EventsApiRequestFactory = void 0;
13
+ // TODO: better import syntax?
14
+ const baseapi_1 = require("./baseapi");
15
+ const http_1 = require("../http/http");
16
+ const ObjectSerializer_1 = require("../models/ObjectSerializer");
17
+ const exception_1 = require("./exception");
18
+ const util_1 = require("../util");
19
+ /**
20
+ * no description
21
+ */
22
+ class EventsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
23
+ /**
24
+ * Use this endpoint to remove a specific event using its reference ID.
25
+ * Delete an event by refId
26
+ * @param refId
27
+ */
28
+ deleteEventByRefId(refId, _options) {
29
+ var _a, _b, _c;
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ let _config = _options || this.configuration;
32
+ // verify required parameter 'refId' is not null or undefined
33
+ if (refId === null || refId === undefined) {
34
+ throw new baseapi_1.RequiredError("EventsApi", "deleteEventByRefId", "refId");
35
+ }
36
+ // Path Params
37
+ const localVarPath = '/events/{refId}'
38
+ .replace('{' + 'refId' + '}', encodeURIComponent(String(refId)));
39
+ // Make Request Context
40
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
41
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
42
+ let authMethod;
43
+ // Apply auth methods
44
+ authMethod = _config.authMethods["BearerAuthorizer"];
45
+ if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
46
+ yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
47
+ }
48
+ 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);
49
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
50
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
51
+ }
52
+ return requestContext;
53
+ });
54
+ }
55
+ /**
56
+ * Use this endpoint to get a specific event using its reference ID.
57
+ * Get event by refId
58
+ * @param refId
59
+ */
60
+ getEventByRefId(refId, _options) {
61
+ var _a, _b, _c;
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ let _config = _options || this.configuration;
64
+ // verify required parameter 'refId' is not null or undefined
65
+ if (refId === null || refId === undefined) {
66
+ throw new baseapi_1.RequiredError("EventsApi", "getEventByRefId", "refId");
67
+ }
68
+ // Path Params
69
+ const localVarPath = '/events/{refId}'
70
+ .replace('{' + 'refId' + '}', encodeURIComponent(String(refId)));
71
+ // Make Request Context
72
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
73
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
74
+ let authMethod;
75
+ // Apply auth methods
76
+ authMethod = _config.authMethods["BearerAuthorizer"];
77
+ if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
78
+ yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
79
+ }
80
+ 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);
81
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
82
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
83
+ }
84
+ return requestContext;
85
+ });
86
+ }
87
+ /**
88
+ * Fetch events occurring within a specified timestamp range. An optional event name can be provided to further filter the events.
89
+ * Query events by timestamp period and optional event name
90
+ * @param startTime
91
+ * @param endTime
92
+ * @param eventName
93
+ * @param limit
94
+ * @param cursor
95
+ */
96
+ queryEvents(startTime, endTime, eventName, limit, cursor, _options) {
97
+ var _a, _b, _c;
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ let _config = _options || this.configuration;
100
+ // verify required parameter 'startTime' is not null or undefined
101
+ if (startTime === null || startTime === undefined) {
102
+ throw new baseapi_1.RequiredError("EventsApi", "queryEvents", "startTime");
103
+ }
104
+ // verify required parameter 'endTime' is not null or undefined
105
+ if (endTime === null || endTime === undefined) {
106
+ throw new baseapi_1.RequiredError("EventsApi", "queryEvents", "endTime");
107
+ }
108
+ // Path Params
109
+ const localVarPath = '/events';
110
+ // Make Request Context
111
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
112
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
113
+ // Query Params
114
+ if (startTime !== undefined) {
115
+ requestContext.setQueryParam("startTime", ObjectSerializer_1.ObjectSerializer.serialize(startTime, "Date", "date-time"));
116
+ }
117
+ // Query Params
118
+ if (endTime !== undefined) {
119
+ requestContext.setQueryParam("endTime", ObjectSerializer_1.ObjectSerializer.serialize(endTime, "Date", "date-time"));
120
+ }
121
+ // Query Params
122
+ if (eventName !== undefined) {
123
+ requestContext.setQueryParam("eventName", ObjectSerializer_1.ObjectSerializer.serialize(eventName, "string", ""));
124
+ }
125
+ // Query Params
126
+ if (limit !== undefined) {
127
+ requestContext.setQueryParam("limit", ObjectSerializer_1.ObjectSerializer.serialize(limit, "number", ""));
128
+ }
129
+ // Query Params
130
+ if (cursor !== undefined) {
131
+ requestContext.setQueryParam("cursor", ObjectSerializer_1.ObjectSerializer.serialize(cursor, "string", ""));
132
+ }
133
+ let authMethod;
134
+ // Apply auth methods
135
+ authMethod = _config.authMethods["BearerAuthorizer"];
136
+ if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
137
+ yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
138
+ }
139
+ 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);
140
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
141
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
142
+ }
143
+ return requestContext;
144
+ });
145
+ }
146
+ /**
147
+ * Use this endpoint to send an array of events for processing and storage. Make sure to comply with the request schema for each event.
148
+ * Submit a batch of events for ingestion
149
+ * @param sendEventsRequest An array of events following the EventInput schema. This request body should be included in the PUT request to \'/events\' Up to 1000 events or a total payload max size of 256KB
150
+ */
151
+ sendEvents(sendEventsRequest, _options) {
152
+ var _a, _b, _c;
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ let _config = _options || this.configuration;
155
+ // verify required parameter 'sendEventsRequest' is not null or undefined
156
+ if (sendEventsRequest === null || sendEventsRequest === undefined) {
157
+ throw new baseapi_1.RequiredError("EventsApi", "sendEvents", "sendEventsRequest");
158
+ }
159
+ // Path Params
160
+ const localVarPath = '/events';
161
+ // Make Request Context
162
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
163
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
164
+ // Body Params
165
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
166
+ "application/json"
167
+ ]);
168
+ requestContext.setHeaderParam("Content-Type", contentType);
169
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(sendEventsRequest, "SendEventsRequest", ""), contentType);
170
+ requestContext.setBody(serializedBody);
171
+ let authMethod;
172
+ // Apply auth methods
173
+ authMethod = _config.authMethods["BearerAuthorizer"];
174
+ if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
175
+ yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
176
+ }
177
+ 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);
178
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
179
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
180
+ }
181
+ return requestContext;
182
+ });
183
+ }
184
+ /**
185
+ * Use this endpoint to send an array of events for processing. Make sure to comply with the request schema for each event. NOTE: this is a dry run and will not result in actual storage of the events.
186
+ * Submit a batch of events for testing
187
+ * @param eventsDryRunRequest An array of events following the EventInput schema. This request body should be included in the PUT request to \'/events\' Up to 1000 events or a total payload max size of 256KB
188
+ */
189
+ sendEventsDryRun(eventsDryRunRequest, _options) {
190
+ var _a, _b, _c;
191
+ return __awaiter(this, void 0, void 0, function* () {
192
+ let _config = _options || this.configuration;
193
+ // verify required parameter 'eventsDryRunRequest' is not null or undefined
194
+ if (eventsDryRunRequest === null || eventsDryRunRequest === undefined) {
195
+ throw new baseapi_1.RequiredError("EventsApi", "sendEventsDryRun", "eventsDryRunRequest");
196
+ }
197
+ // Path Params
198
+ const localVarPath = '/events/dry-run';
199
+ // Make Request Context
200
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
201
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
202
+ // Body Params
203
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
204
+ "application/json"
205
+ ]);
206
+ requestContext.setHeaderParam("Content-Type", contentType);
207
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(eventsDryRunRequest, "EventsDryRunRequest", ""), contentType);
208
+ requestContext.setBody(serializedBody);
209
+ let authMethod;
210
+ // Apply auth methods
211
+ authMethod = _config.authMethods["BearerAuthorizer"];
212
+ if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
213
+ yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
214
+ }
215
+ 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);
216
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
217
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
218
+ }
219
+ return requestContext;
220
+ });
221
+ }
222
+ }
223
+ exports.EventsApiRequestFactory = EventsApiRequestFactory;
224
+ class EventsApiResponseProcessor {
225
+ /**
226
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
227
+ * to the expected objects
228
+ *
229
+ * @params response Response returned by the server for a request to deleteEventByRefId
230
+ * @throws ApiException if the response code was not in [200, 299]
231
+ */
232
+ deleteEventByRefIdWithHttpInfo(response) {
233
+ return __awaiter(this, void 0, void 0, function* () {
234
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
235
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
236
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "DeleteEventResponse", "");
237
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
238
+ }
239
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
240
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
241
+ }
242
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
243
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
244
+ }
245
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
246
+ throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
247
+ }
248
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
249
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
250
+ }
251
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
252
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
253
+ }
254
+ // Work around for missing responses in specification, e.g. for petstore.yaml
255
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
256
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "DeleteEventResponse", "");
257
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
258
+ }
259
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
260
+ });
261
+ }
262
+ /**
263
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
264
+ * to the expected objects
265
+ *
266
+ * @params response Response returned by the server for a request to getEventByRefId
267
+ * @throws ApiException if the response code was not in [200, 299]
268
+ */
269
+ getEventByRefIdWithHttpInfo(response) {
270
+ return __awaiter(this, void 0, void 0, function* () {
271
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
272
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
273
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "GetEventResponse", "");
274
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
275
+ }
276
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
277
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
278
+ }
279
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
280
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
281
+ }
282
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
283
+ throw new exception_1.ApiException(response.httpStatusCode, "Not Found", undefined, response.headers);
284
+ }
285
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
286
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
287
+ }
288
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
289
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", 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), "GetEventResponse", "");
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
+ });
298
+ }
299
+ /**
300
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
301
+ * to the expected objects
302
+ *
303
+ * @params response Response returned by the server for a request to queryEvents
304
+ * @throws ApiException if the response code was not in [200, 299]
305
+ */
306
+ queryEventsWithHttpInfo(response) {
307
+ return __awaiter(this, void 0, void 0, function* () {
308
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
309
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
310
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "QueryEventsResponse", "");
311
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
312
+ }
313
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
314
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
315
+ }
316
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
317
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
318
+ }
319
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
320
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
321
+ }
322
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
323
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
324
+ }
325
+ // Work around for missing responses in specification, e.g. for petstore.yaml
326
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
327
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "QueryEventsResponse", "");
328
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
329
+ }
330
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
331
+ });
332
+ }
333
+ /**
334
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
335
+ * to the expected objects
336
+ *
337
+ * @params response Response returned by the server for a request to sendEvents
338
+ * @throws ApiException if the response code was not in [200, 299]
339
+ */
340
+ sendEventsWithHttpInfo(response) {
341
+ return __awaiter(this, void 0, void 0, function* () {
342
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
343
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
344
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "SendEventsResponse", "");
345
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
346
+ }
347
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
348
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
349
+ }
350
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
351
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
352
+ }
353
+ if ((0, util_1.isCodeInRange)("413", response.httpStatusCode)) {
354
+ throw new exception_1.ApiException(response.httpStatusCode, "Request Entity Too Large", undefined, response.headers);
355
+ }
356
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
357
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
358
+ }
359
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
360
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
361
+ }
362
+ // Work around for missing responses in specification, e.g. for petstore.yaml
363
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
364
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "SendEventsResponse", "");
365
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
366
+ }
367
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
368
+ });
369
+ }
370
+ /**
371
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
372
+ * to the expected objects
373
+ *
374
+ * @params response Response returned by the server for a request to sendEventsDryRun
375
+ * @throws ApiException if the response code was not in [200, 299]
376
+ */
377
+ sendEventsDryRunWithHttpInfo(response) {
378
+ return __awaiter(this, void 0, void 0, function* () {
379
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
380
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
381
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "EventsDryRunResponse", "");
382
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
383
+ }
384
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
385
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
386
+ }
387
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
388
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
389
+ }
390
+ if ((0, util_1.isCodeInRange)("413", response.httpStatusCode)) {
391
+ throw new exception_1.ApiException(response.httpStatusCode, "Request Entity Too Large", undefined, response.headers);
392
+ }
393
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
394
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
395
+ }
396
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
397
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
398
+ }
399
+ // Work around for missing responses in specification, e.g. for petstore.yaml
400
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
401
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "EventsDryRunResponse", "");
402
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
403
+ }
404
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
405
+ });
406
+ }
407
+ }
408
+ exports.EventsApiResponseProcessor = EventsApiResponseProcessor;
@@ -0,0 +1,41 @@
1
+ import { BaseAPIRequestFactory } from './baseapi';
2
+ import { Configuration } from '../configuration';
3
+ import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
4
+ import { NetSuiteExportSalesOrderRequest } from '../models/NetSuiteExportSalesOrderRequest';
5
+ import { NetSuiteSyncInvoicesRequest } from '../models/NetSuiteSyncInvoicesRequest';
6
+ import { NetSuiteSyncInvoicesResponse } from '../models/NetSuiteSyncInvoicesResponse';
7
+ /**
8
+ * no description
9
+ */
10
+ export declare class IntegrationsApiRequestFactory extends BaseAPIRequestFactory {
11
+ /**
12
+ * This endpoint is used to export sales order to NetSuite.
13
+ * Export sales order to NetSuite
14
+ * @param netSuiteExportSalesOrderRequest
15
+ */
16
+ exportNetSuiteSalesOrder(netSuiteExportSalesOrderRequest: NetSuiteExportSalesOrderRequest, _options?: Configuration): Promise<RequestContext>;
17
+ /**
18
+ * This endpoint is used to sync invoices to NetSuite.
19
+ * Sync invoices to NetSuite
20
+ * @param netSuiteSyncInvoicesRequest
21
+ */
22
+ netSuiteSyncInvoices(netSuiteSyncInvoicesRequest: NetSuiteSyncInvoicesRequest, _options?: Configuration): Promise<RequestContext>;
23
+ }
24
+ export declare class IntegrationsApiResponseProcessor {
25
+ /**
26
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
27
+ * to the expected objects
28
+ *
29
+ * @params response Response returned by the server for a request to exportNetSuiteSalesOrder
30
+ * @throws ApiException if the response code was not in [200, 299]
31
+ */
32
+ exportNetSuiteSalesOrderWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void>>;
33
+ /**
34
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
35
+ * to the expected objects
36
+ *
37
+ * @params response Response returned by the server for a request to netSuiteSyncInvoices
38
+ * @throws ApiException if the response code was not in [200, 299]
39
+ */
40
+ netSuiteSyncInvoicesWithHttpInfo(response: ResponseContext): Promise<HttpInfo<NetSuiteSyncInvoicesResponse>>;
41
+ }
@@ -0,0 +1,170 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.IntegrationsApiResponseProcessor = exports.IntegrationsApiRequestFactory = void 0;
13
+ // TODO: better import syntax?
14
+ const baseapi_1 = require("./baseapi");
15
+ const http_1 = require("../http/http");
16
+ const ObjectSerializer_1 = require("../models/ObjectSerializer");
17
+ const exception_1 = require("./exception");
18
+ const util_1 = require("../util");
19
+ /**
20
+ * no description
21
+ */
22
+ class IntegrationsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
23
+ /**
24
+ * This endpoint is used to export sales order to NetSuite.
25
+ * Export sales order to NetSuite
26
+ * @param netSuiteExportSalesOrderRequest
27
+ */
28
+ exportNetSuiteSalesOrder(netSuiteExportSalesOrderRequest, _options) {
29
+ var _a, _b, _c;
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ let _config = _options || this.configuration;
32
+ // verify required parameter 'netSuiteExportSalesOrderRequest' is not null or undefined
33
+ if (netSuiteExportSalesOrderRequest === null || netSuiteExportSalesOrderRequest === undefined) {
34
+ throw new baseapi_1.RequiredError("IntegrationsApi", "exportNetSuiteSalesOrder", "netSuiteExportSalesOrderRequest");
35
+ }
36
+ // Path Params
37
+ const localVarPath = '/integrations/netsuite/export-sales-order';
38
+ // Make Request Context
39
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
40
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
41
+ // Body Params
42
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
43
+ "application/json"
44
+ ]);
45
+ requestContext.setHeaderParam("Content-Type", contentType);
46
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(netSuiteExportSalesOrderRequest, "NetSuiteExportSalesOrderRequest", ""), contentType);
47
+ requestContext.setBody(serializedBody);
48
+ let authMethod;
49
+ // Apply auth methods
50
+ authMethod = _config.authMethods["BearerAuthorizer"];
51
+ if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
52
+ yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
53
+ }
54
+ 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);
55
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
56
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
57
+ }
58
+ return requestContext;
59
+ });
60
+ }
61
+ /**
62
+ * This endpoint is used to sync invoices to NetSuite.
63
+ * Sync invoices to NetSuite
64
+ * @param netSuiteSyncInvoicesRequest
65
+ */
66
+ netSuiteSyncInvoices(netSuiteSyncInvoicesRequest, _options) {
67
+ var _a, _b, _c;
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ let _config = _options || this.configuration;
70
+ // verify required parameter 'netSuiteSyncInvoicesRequest' is not null or undefined
71
+ if (netSuiteSyncInvoicesRequest === null || netSuiteSyncInvoicesRequest === undefined) {
72
+ throw new baseapi_1.RequiredError("IntegrationsApi", "netSuiteSyncInvoices", "netSuiteSyncInvoicesRequest");
73
+ }
74
+ // Path Params
75
+ const localVarPath = '/integrations/netsuite/sync-invoices';
76
+ // Make Request Context
77
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
78
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
79
+ // Body Params
80
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
81
+ "application/json"
82
+ ]);
83
+ requestContext.setHeaderParam("Content-Type", contentType);
84
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(netSuiteSyncInvoicesRequest, "NetSuiteSyncInvoicesRequest", ""), contentType);
85
+ requestContext.setBody(serializedBody);
86
+ let authMethod;
87
+ // Apply auth methods
88
+ authMethod = _config.authMethods["BearerAuthorizer"];
89
+ if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) {
90
+ yield (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext));
91
+ }
92
+ 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);
93
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
94
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
95
+ }
96
+ return requestContext;
97
+ });
98
+ }
99
+ }
100
+ exports.IntegrationsApiRequestFactory = IntegrationsApiRequestFactory;
101
+ class IntegrationsApiResponseProcessor {
102
+ /**
103
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
104
+ * to the expected objects
105
+ *
106
+ * @params response Response returned by the server for a request to exportNetSuiteSalesOrder
107
+ * @throws ApiException if the response code was not in [200, 299]
108
+ */
109
+ exportNetSuiteSalesOrderWithHttpInfo(response) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
112
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
113
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
114
+ }
115
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
116
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
117
+ }
118
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
119
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
120
+ }
121
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
122
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
123
+ }
124
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
125
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
126
+ }
127
+ // Work around for missing responses in specification, e.g. for petstore.yaml
128
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
129
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
130
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
131
+ }
132
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
133
+ });
134
+ }
135
+ /**
136
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
137
+ * to the expected objects
138
+ *
139
+ * @params response Response returned by the server for a request to netSuiteSyncInvoices
140
+ * @throws ApiException if the response code was not in [200, 299]
141
+ */
142
+ netSuiteSyncInvoicesWithHttpInfo(response) {
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
145
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
146
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "NetSuiteSyncInvoicesResponse", "");
147
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
148
+ }
149
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
150
+ throw new exception_1.ApiException(response.httpStatusCode, "Bad Request", undefined, response.headers);
151
+ }
152
+ if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
153
+ throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized", undefined, response.headers);
154
+ }
155
+ if ((0, util_1.isCodeInRange)("429", response.httpStatusCode)) {
156
+ throw new exception_1.ApiException(response.httpStatusCode, "Too Many Requests", undefined, response.headers);
157
+ }
158
+ if ((0, util_1.isCodeInRange)("500", response.httpStatusCode)) {
159
+ throw new exception_1.ApiException(response.httpStatusCode, "Internal Server Error", undefined, response.headers);
160
+ }
161
+ // Work around for missing responses in specification, e.g. for petstore.yaml
162
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
163
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "NetSuiteSyncInvoicesResponse", "");
164
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
165
+ }
166
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
167
+ });
168
+ }
169
+ }
170
+ exports.IntegrationsApiResponseProcessor = IntegrationsApiResponseProcessor;