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,1089 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ObservableWebhooksApi = exports.ObservableReportsApi = exports.ObservablePlansApi = exports.ObservableMetersApi = exports.ObservableInvoicesApi = exports.ObservableIntegrationsApi = exports.ObservableEventsApi = exports.ObservableCustomersApi = exports.ObservableCreditsApi = exports.ObservableContractsApi = exports.ObservableAuthApi = void 0;
4
+ const rxjsStub_1 = require("../rxjsStub");
5
+ const rxjsStub_2 = require("../rxjsStub");
6
+ const AuthApi_1 = require("../apis/AuthApi");
7
+ class ObservableAuthApi {
8
+ constructor(configuration, requestFactory, responseProcessor) {
9
+ this.configuration = configuration;
10
+ this.requestFactory = requestFactory || new AuthApi_1.AuthApiRequestFactory(configuration);
11
+ this.responseProcessor = responseProcessor || new AuthApi_1.AuthApiResponseProcessor();
12
+ }
13
+ /**
14
+ * This endpoint is designed to acquire a temporary access token. Submit the auth token in the request body to obtain a new access token. Use this new token for subsequent API calls. Token is set to expire every hour.
15
+ * Login by obtaining a new access token
16
+ * @param loginRequest
17
+ */
18
+ loginWithHttpInfo(loginRequest, _options) {
19
+ const requestContextPromise = this.requestFactory.login(loginRequest, _options);
20
+ // build promise chain
21
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
22
+ for (let middleware of this.configuration.middleware) {
23
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
24
+ }
25
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
26
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
27
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
28
+ for (let middleware of this.configuration.middleware) {
29
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
30
+ }
31
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.loginWithHttpInfo(rsp)));
32
+ }));
33
+ }
34
+ /**
35
+ * This endpoint is designed to acquire a temporary access token. Submit the auth token in the request body to obtain a new access token. Use this new token for subsequent API calls. Token is set to expire every hour.
36
+ * Login by obtaining a new access token
37
+ * @param loginRequest
38
+ */
39
+ login(loginRequest, _options) {
40
+ return this.loginWithHttpInfo(loginRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
41
+ }
42
+ }
43
+ exports.ObservableAuthApi = ObservableAuthApi;
44
+ const ContractsApi_1 = require("../apis/ContractsApi");
45
+ class ObservableContractsApi {
46
+ constructor(configuration, requestFactory, responseProcessor) {
47
+ this.configuration = configuration;
48
+ this.requestFactory = requestFactory || new ContractsApi_1.ContractsApiRequestFactory(configuration);
49
+ this.responseProcessor = responseProcessor || new ContractsApi_1.ContractsApiResponseProcessor();
50
+ }
51
+ /**
52
+ * Create a new Contract.
53
+ * Create Contract
54
+ * @param createContractRequest
55
+ */
56
+ createContractWithHttpInfo(createContractRequest, _options) {
57
+ const requestContextPromise = this.requestFactory.createContract(createContractRequest, _options);
58
+ // build promise chain
59
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
60
+ for (let middleware of this.configuration.middleware) {
61
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
62
+ }
63
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
64
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
65
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
66
+ for (let middleware of this.configuration.middleware) {
67
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
68
+ }
69
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.createContractWithHttpInfo(rsp)));
70
+ }));
71
+ }
72
+ /**
73
+ * Create a new Contract.
74
+ * Create Contract
75
+ * @param createContractRequest
76
+ */
77
+ createContract(createContractRequest, _options) {
78
+ return this.createContractWithHttpInfo(createContractRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
79
+ }
80
+ /**
81
+ * Delete a Contract by id.
82
+ * Delete Contract
83
+ * @param contractId
84
+ */
85
+ deleteContractWithHttpInfo(contractId, _options) {
86
+ const requestContextPromise = this.requestFactory.deleteContract(contractId, _options);
87
+ // build promise chain
88
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
89
+ for (let middleware of this.configuration.middleware) {
90
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
91
+ }
92
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
93
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
94
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
95
+ for (let middleware of this.configuration.middleware) {
96
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
97
+ }
98
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteContractWithHttpInfo(rsp)));
99
+ }));
100
+ }
101
+ /**
102
+ * Delete a Contract by id.
103
+ * Delete Contract
104
+ * @param contractId
105
+ */
106
+ deleteContract(contractId, _options) {
107
+ return this.deleteContractWithHttpInfo(contractId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
108
+ }
109
+ /**
110
+ * Get a Contract by id.
111
+ * Get Contract
112
+ * @param contractId
113
+ */
114
+ getContractWithHttpInfo(contractId, _options) {
115
+ const requestContextPromise = this.requestFactory.getContract(contractId, _options);
116
+ // build promise chain
117
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
118
+ for (let middleware of this.configuration.middleware) {
119
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
120
+ }
121
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
122
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
123
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
124
+ for (let middleware of this.configuration.middleware) {
125
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
126
+ }
127
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getContractWithHttpInfo(rsp)));
128
+ }));
129
+ }
130
+ /**
131
+ * Get a Contract by id.
132
+ * Get Contract
133
+ * @param contractId
134
+ */
135
+ getContract(contractId, _options) {
136
+ return this.getContractWithHttpInfo(contractId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
137
+ }
138
+ /**
139
+ * Get a list of Contracts.
140
+ * List Contracts
141
+ * @param limit
142
+ * @param cursor
143
+ */
144
+ listContractsWithHttpInfo(limit, cursor, _options) {
145
+ const requestContextPromise = this.requestFactory.listContracts(limit, cursor, _options);
146
+ // build promise chain
147
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
148
+ for (let middleware of this.configuration.middleware) {
149
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
150
+ }
151
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
152
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
153
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
154
+ for (let middleware of this.configuration.middleware) {
155
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
156
+ }
157
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listContractsWithHttpInfo(rsp)));
158
+ }));
159
+ }
160
+ /**
161
+ * Get a list of Contracts.
162
+ * List Contracts
163
+ * @param limit
164
+ * @param cursor
165
+ */
166
+ listContracts(limit, cursor, _options) {
167
+ return this.listContractsWithHttpInfo(limit, cursor, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
168
+ }
169
+ }
170
+ exports.ObservableContractsApi = ObservableContractsApi;
171
+ const CreditsApi_1 = require("../apis/CreditsApi");
172
+ class ObservableCreditsApi {
173
+ constructor(configuration, requestFactory, responseProcessor) {
174
+ this.configuration = configuration;
175
+ this.requestFactory = requestFactory || new CreditsApi_1.CreditsApiRequestFactory(configuration);
176
+ this.responseProcessor = responseProcessor || new CreditsApi_1.CreditsApiResponseProcessor();
177
+ }
178
+ /**
179
+ * This endpoint is used to deduct credits from the specified customer account. Submit the credit amount and customer ID in the request body to deduct the credits. The deducted credits will be subtracted from the customer\'s account.
180
+ * Deduct credits from customer credit ledger
181
+ * @param deductCreditsRequest
182
+ */
183
+ deductCreditsWithHttpInfo(deductCreditsRequest, _options) {
184
+ const requestContextPromise = this.requestFactory.deductCredits(deductCreditsRequest, _options);
185
+ // build promise chain
186
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
187
+ for (let middleware of this.configuration.middleware) {
188
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
189
+ }
190
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
191
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
192
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
193
+ for (let middleware of this.configuration.middleware) {
194
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
195
+ }
196
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deductCreditsWithHttpInfo(rsp)));
197
+ }));
198
+ }
199
+ /**
200
+ * This endpoint is used to deduct credits from the specified customer account. Submit the credit amount and customer ID in the request body to deduct the credits. The deducted credits will be subtracted from the customer\'s account.
201
+ * Deduct credits from customer credit ledger
202
+ * @param deductCreditsRequest
203
+ */
204
+ deductCredits(deductCreditsRequest, _options) {
205
+ return this.deductCreditsWithHttpInfo(deductCreditsRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
206
+ }
207
+ /**
208
+ * This endpoint is used to grant credits to a customer. Submit the credit amount and customer ID in the request body to grant the credits. The granted credits will be added to the customer\'s account.
209
+ * Grant credits to a customer credit ledger
210
+ * @param grantCreditsRequest
211
+ */
212
+ grantCreditsWithHttpInfo(grantCreditsRequest, _options) {
213
+ const requestContextPromise = this.requestFactory.grantCredits(grantCreditsRequest, _options);
214
+ // build promise chain
215
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
216
+ for (let middleware of this.configuration.middleware) {
217
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
218
+ }
219
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
220
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
221
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
222
+ for (let middleware of this.configuration.middleware) {
223
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
224
+ }
225
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.grantCreditsWithHttpInfo(rsp)));
226
+ }));
227
+ }
228
+ /**
229
+ * This endpoint is used to grant credits to a customer. Submit the credit amount and customer ID in the request body to grant the credits. The granted credits will be added to the customer\'s account.
230
+ * Grant credits to a customer credit ledger
231
+ * @param grantCreditsRequest
232
+ */
233
+ grantCredits(grantCreditsRequest, _options) {
234
+ return this.grantCreditsWithHttpInfo(grantCreditsRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
235
+ }
236
+ /**
237
+ * This endpoint is used to retrieve the credit ledger entries for a specific customer.
238
+ * Retrieve credit ledger entries for customer.
239
+ * @param customerId
240
+ * @param limit
241
+ * @param cursor
242
+ */
243
+ listCreditLedgerEntriesWithHttpInfo(customerId, limit, cursor, _options) {
244
+ const requestContextPromise = this.requestFactory.listCreditLedgerEntries(customerId, limit, cursor, _options);
245
+ // build promise chain
246
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
247
+ for (let middleware of this.configuration.middleware) {
248
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
249
+ }
250
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
251
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
252
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
253
+ for (let middleware of this.configuration.middleware) {
254
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
255
+ }
256
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listCreditLedgerEntriesWithHttpInfo(rsp)));
257
+ }));
258
+ }
259
+ /**
260
+ * This endpoint is used to retrieve the credit ledger entries for a specific customer.
261
+ * Retrieve credit ledger entries for customer.
262
+ * @param customerId
263
+ * @param limit
264
+ * @param cursor
265
+ */
266
+ listCreditLedgerEntries(customerId, limit, cursor, _options) {
267
+ return this.listCreditLedgerEntriesWithHttpInfo(customerId, limit, cursor, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
268
+ }
269
+ }
270
+ exports.ObservableCreditsApi = ObservableCreditsApi;
271
+ const CustomersApi_1 = require("../apis/CustomersApi");
272
+ class ObservableCustomersApi {
273
+ constructor(configuration, requestFactory, responseProcessor) {
274
+ this.configuration = configuration;
275
+ this.requestFactory = requestFactory || new CustomersApi_1.CustomersApiRequestFactory(configuration);
276
+ this.responseProcessor = responseProcessor || new CustomersApi_1.CustomersApiResponseProcessor();
277
+ }
278
+ /**
279
+ * Create a new Customer.
280
+ * Create Customer
281
+ * @param createCustomerRequest
282
+ */
283
+ createCustomerWithHttpInfo(createCustomerRequest, _options) {
284
+ const requestContextPromise = this.requestFactory.createCustomer(createCustomerRequest, _options);
285
+ // build promise chain
286
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
287
+ for (let middleware of this.configuration.middleware) {
288
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
289
+ }
290
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
291
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
292
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
293
+ for (let middleware of this.configuration.middleware) {
294
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
295
+ }
296
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.createCustomerWithHttpInfo(rsp)));
297
+ }));
298
+ }
299
+ /**
300
+ * Create a new Customer.
301
+ * Create Customer
302
+ * @param createCustomerRequest
303
+ */
304
+ createCustomer(createCustomerRequest, _options) {
305
+ return this.createCustomerWithHttpInfo(createCustomerRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
306
+ }
307
+ /**
308
+ * Delete a Customer by id.
309
+ * Delete Customer
310
+ * @param customerId
311
+ */
312
+ deleteCustomerWithHttpInfo(customerId, _options) {
313
+ const requestContextPromise = this.requestFactory.deleteCustomer(customerId, _options);
314
+ // build promise chain
315
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
316
+ for (let middleware of this.configuration.middleware) {
317
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
318
+ }
319
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
320
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
321
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
322
+ for (let middleware of this.configuration.middleware) {
323
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
324
+ }
325
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteCustomerWithHttpInfo(rsp)));
326
+ }));
327
+ }
328
+ /**
329
+ * Delete a Customer by id.
330
+ * Delete Customer
331
+ * @param customerId
332
+ */
333
+ deleteCustomer(customerId, _options) {
334
+ return this.deleteCustomerWithHttpInfo(customerId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
335
+ }
336
+ /**
337
+ * Get a Customer by id.
338
+ * Get Customer
339
+ * @param customerId
340
+ */
341
+ getCustomerWithHttpInfo(customerId, _options) {
342
+ const requestContextPromise = this.requestFactory.getCustomer(customerId, _options);
343
+ // build promise chain
344
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
345
+ for (let middleware of this.configuration.middleware) {
346
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
347
+ }
348
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
349
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
350
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
351
+ for (let middleware of this.configuration.middleware) {
352
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
353
+ }
354
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getCustomerWithHttpInfo(rsp)));
355
+ }));
356
+ }
357
+ /**
358
+ * Get a Customer by id.
359
+ * Get Customer
360
+ * @param customerId
361
+ */
362
+ getCustomer(customerId, _options) {
363
+ return this.getCustomerWithHttpInfo(customerId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
364
+ }
365
+ /**
366
+ * Use this endpoint to get a specific customer using its external Id.
367
+ * Get customer by externalId
368
+ * @param externalId
369
+ */
370
+ getCustomerByExternalIdWithHttpInfo(externalId, _options) {
371
+ const requestContextPromise = this.requestFactory.getCustomerByExternalId(externalId, _options);
372
+ // build promise chain
373
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
374
+ for (let middleware of this.configuration.middleware) {
375
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
376
+ }
377
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
378
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
379
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
380
+ for (let middleware of this.configuration.middleware) {
381
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
382
+ }
383
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getCustomerByExternalIdWithHttpInfo(rsp)));
384
+ }));
385
+ }
386
+ /**
387
+ * Use this endpoint to get a specific customer using its external Id.
388
+ * Get customer by externalId
389
+ * @param externalId
390
+ */
391
+ getCustomerByExternalId(externalId, _options) {
392
+ return this.getCustomerByExternalIdWithHttpInfo(externalId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
393
+ }
394
+ /**
395
+ * Get a list of Customers.
396
+ * List Customers
397
+ * @param limit
398
+ * @param cursor
399
+ */
400
+ listCustomersWithHttpInfo(limit, cursor, _options) {
401
+ const requestContextPromise = this.requestFactory.listCustomers(limit, cursor, _options);
402
+ // build promise chain
403
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
404
+ for (let middleware of this.configuration.middleware) {
405
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
406
+ }
407
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
408
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
409
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
410
+ for (let middleware of this.configuration.middleware) {
411
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
412
+ }
413
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listCustomersWithHttpInfo(rsp)));
414
+ }));
415
+ }
416
+ /**
417
+ * Get a list of Customers.
418
+ * List Customers
419
+ * @param limit
420
+ * @param cursor
421
+ */
422
+ listCustomers(limit, cursor, _options) {
423
+ return this.listCustomersWithHttpInfo(limit, cursor, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
424
+ }
425
+ /**
426
+ * Update a Customer by id.
427
+ * Update Customer
428
+ * @param updateCustomerRequest
429
+ * @param customerId
430
+ */
431
+ updateCustomerWithHttpInfo(updateCustomerRequest, customerId, _options) {
432
+ const requestContextPromise = this.requestFactory.updateCustomer(updateCustomerRequest, customerId, _options);
433
+ // build promise chain
434
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
435
+ for (let middleware of this.configuration.middleware) {
436
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
437
+ }
438
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
439
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
440
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
441
+ for (let middleware of this.configuration.middleware) {
442
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
443
+ }
444
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.updateCustomerWithHttpInfo(rsp)));
445
+ }));
446
+ }
447
+ /**
448
+ * Update a Customer by id.
449
+ * Update Customer
450
+ * @param updateCustomerRequest
451
+ * @param customerId
452
+ */
453
+ updateCustomer(updateCustomerRequest, customerId, _options) {
454
+ return this.updateCustomerWithHttpInfo(updateCustomerRequest, customerId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
455
+ }
456
+ }
457
+ exports.ObservableCustomersApi = ObservableCustomersApi;
458
+ const EventsApi_1 = require("../apis/EventsApi");
459
+ class ObservableEventsApi {
460
+ constructor(configuration, requestFactory, responseProcessor) {
461
+ this.configuration = configuration;
462
+ this.requestFactory = requestFactory || new EventsApi_1.EventsApiRequestFactory(configuration);
463
+ this.responseProcessor = responseProcessor || new EventsApi_1.EventsApiResponseProcessor();
464
+ }
465
+ /**
466
+ * Use this endpoint to remove a specific event using its reference ID.
467
+ * Delete an event by refId
468
+ * @param refId
469
+ */
470
+ deleteEventByRefIdWithHttpInfo(refId, _options) {
471
+ const requestContextPromise = this.requestFactory.deleteEventByRefId(refId, _options);
472
+ // build promise chain
473
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
474
+ for (let middleware of this.configuration.middleware) {
475
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
476
+ }
477
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
478
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
479
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
480
+ for (let middleware of this.configuration.middleware) {
481
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
482
+ }
483
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteEventByRefIdWithHttpInfo(rsp)));
484
+ }));
485
+ }
486
+ /**
487
+ * Use this endpoint to remove a specific event using its reference ID.
488
+ * Delete an event by refId
489
+ * @param refId
490
+ */
491
+ deleteEventByRefId(refId, _options) {
492
+ return this.deleteEventByRefIdWithHttpInfo(refId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
493
+ }
494
+ /**
495
+ * Use this endpoint to get a specific event using its reference ID.
496
+ * Get event by refId
497
+ * @param refId
498
+ */
499
+ getEventByRefIdWithHttpInfo(refId, _options) {
500
+ const requestContextPromise = this.requestFactory.getEventByRefId(refId, _options);
501
+ // build promise chain
502
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
503
+ for (let middleware of this.configuration.middleware) {
504
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
505
+ }
506
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
507
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
508
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
509
+ for (let middleware of this.configuration.middleware) {
510
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
511
+ }
512
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getEventByRefIdWithHttpInfo(rsp)));
513
+ }));
514
+ }
515
+ /**
516
+ * Use this endpoint to get a specific event using its reference ID.
517
+ * Get event by refId
518
+ * @param refId
519
+ */
520
+ getEventByRefId(refId, _options) {
521
+ return this.getEventByRefIdWithHttpInfo(refId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
522
+ }
523
+ /**
524
+ * Fetch events occurring within a specified timestamp range. An optional event name can be provided to further filter the events.
525
+ * Query events by timestamp period and optional event name
526
+ * @param startTime
527
+ * @param endTime
528
+ * @param eventName
529
+ * @param limit
530
+ * @param cursor
531
+ */
532
+ queryEventsWithHttpInfo(startTime, endTime, eventName, limit, cursor, _options) {
533
+ const requestContextPromise = this.requestFactory.queryEvents(startTime, endTime, eventName, limit, cursor, _options);
534
+ // build promise chain
535
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
536
+ for (let middleware of this.configuration.middleware) {
537
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
538
+ }
539
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
540
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
541
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
542
+ for (let middleware of this.configuration.middleware) {
543
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
544
+ }
545
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.queryEventsWithHttpInfo(rsp)));
546
+ }));
547
+ }
548
+ /**
549
+ * Fetch events occurring within a specified timestamp range. An optional event name can be provided to further filter the events.
550
+ * Query events by timestamp period and optional event name
551
+ * @param startTime
552
+ * @param endTime
553
+ * @param eventName
554
+ * @param limit
555
+ * @param cursor
556
+ */
557
+ queryEvents(startTime, endTime, eventName, limit, cursor, _options) {
558
+ return this.queryEventsWithHttpInfo(startTime, endTime, eventName, limit, cursor, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
559
+ }
560
+ /**
561
+ * Use this endpoint to send an array of events for processing and storage. Make sure to comply with the request schema for each event.
562
+ * Submit a batch of events for ingestion
563
+ * @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
564
+ */
565
+ sendEventsWithHttpInfo(sendEventsRequest, _options) {
566
+ const requestContextPromise = this.requestFactory.sendEvents(sendEventsRequest, _options);
567
+ // build promise chain
568
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
569
+ for (let middleware of this.configuration.middleware) {
570
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
571
+ }
572
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
573
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
574
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
575
+ for (let middleware of this.configuration.middleware) {
576
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
577
+ }
578
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.sendEventsWithHttpInfo(rsp)));
579
+ }));
580
+ }
581
+ /**
582
+ * Use this endpoint to send an array of events for processing and storage. Make sure to comply with the request schema for each event.
583
+ * Submit a batch of events for ingestion
584
+ * @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
585
+ */
586
+ sendEvents(sendEventsRequest, _options) {
587
+ return this.sendEventsWithHttpInfo(sendEventsRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
588
+ }
589
+ /**
590
+ * 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.
591
+ * Submit a batch of events for testing
592
+ * @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
593
+ */
594
+ sendEventsDryRunWithHttpInfo(eventsDryRunRequest, _options) {
595
+ const requestContextPromise = this.requestFactory.sendEventsDryRun(eventsDryRunRequest, _options);
596
+ // build promise chain
597
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
598
+ for (let middleware of this.configuration.middleware) {
599
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
600
+ }
601
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
602
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
603
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
604
+ for (let middleware of this.configuration.middleware) {
605
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
606
+ }
607
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.sendEventsDryRunWithHttpInfo(rsp)));
608
+ }));
609
+ }
610
+ /**
611
+ * 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.
612
+ * Submit a batch of events for testing
613
+ * @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
614
+ */
615
+ sendEventsDryRun(eventsDryRunRequest, _options) {
616
+ return this.sendEventsDryRunWithHttpInfo(eventsDryRunRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
617
+ }
618
+ }
619
+ exports.ObservableEventsApi = ObservableEventsApi;
620
+ const IntegrationsApi_1 = require("../apis/IntegrationsApi");
621
+ class ObservableIntegrationsApi {
622
+ constructor(configuration, requestFactory, responseProcessor) {
623
+ this.configuration = configuration;
624
+ this.requestFactory = requestFactory || new IntegrationsApi_1.IntegrationsApiRequestFactory(configuration);
625
+ this.responseProcessor = responseProcessor || new IntegrationsApi_1.IntegrationsApiResponseProcessor();
626
+ }
627
+ /**
628
+ * This endpoint is used to export sales order to NetSuite.
629
+ * Export sales order to NetSuite
630
+ * @param netSuiteExportSalesOrderRequest
631
+ */
632
+ exportNetSuiteSalesOrderWithHttpInfo(netSuiteExportSalesOrderRequest, _options) {
633
+ const requestContextPromise = this.requestFactory.exportNetSuiteSalesOrder(netSuiteExportSalesOrderRequest, _options);
634
+ // build promise chain
635
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
636
+ for (let middleware of this.configuration.middleware) {
637
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
638
+ }
639
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
640
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
641
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
642
+ for (let middleware of this.configuration.middleware) {
643
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
644
+ }
645
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.exportNetSuiteSalesOrderWithHttpInfo(rsp)));
646
+ }));
647
+ }
648
+ /**
649
+ * This endpoint is used to export sales order to NetSuite.
650
+ * Export sales order to NetSuite
651
+ * @param netSuiteExportSalesOrderRequest
652
+ */
653
+ exportNetSuiteSalesOrder(netSuiteExportSalesOrderRequest, _options) {
654
+ return this.exportNetSuiteSalesOrderWithHttpInfo(netSuiteExportSalesOrderRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
655
+ }
656
+ /**
657
+ * This endpoint is used to sync invoices to NetSuite.
658
+ * Sync invoices to NetSuite
659
+ * @param netSuiteSyncInvoicesRequest
660
+ */
661
+ netSuiteSyncInvoicesWithHttpInfo(netSuiteSyncInvoicesRequest, _options) {
662
+ const requestContextPromise = this.requestFactory.netSuiteSyncInvoices(netSuiteSyncInvoicesRequest, _options);
663
+ // build promise chain
664
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
665
+ for (let middleware of this.configuration.middleware) {
666
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
667
+ }
668
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
669
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
670
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
671
+ for (let middleware of this.configuration.middleware) {
672
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
673
+ }
674
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.netSuiteSyncInvoicesWithHttpInfo(rsp)));
675
+ }));
676
+ }
677
+ /**
678
+ * This endpoint is used to sync invoices to NetSuite.
679
+ * Sync invoices to NetSuite
680
+ * @param netSuiteSyncInvoicesRequest
681
+ */
682
+ netSuiteSyncInvoices(netSuiteSyncInvoicesRequest, _options) {
683
+ return this.netSuiteSyncInvoicesWithHttpInfo(netSuiteSyncInvoicesRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
684
+ }
685
+ }
686
+ exports.ObservableIntegrationsApi = ObservableIntegrationsApi;
687
+ const InvoicesApi_1 = require("../apis/InvoicesApi");
688
+ class ObservableInvoicesApi {
689
+ constructor(configuration, requestFactory, responseProcessor) {
690
+ this.configuration = configuration;
691
+ this.requestFactory = requestFactory || new InvoicesApi_1.InvoicesApiRequestFactory(configuration);
692
+ this.responseProcessor = responseProcessor || new InvoicesApi_1.InvoicesApiResponseProcessor();
693
+ }
694
+ /**
695
+ * Get a Invoice by id.
696
+ * Get Invoice
697
+ * @param invoiceId
698
+ */
699
+ getInvoiceWithHttpInfo(invoiceId, _options) {
700
+ const requestContextPromise = this.requestFactory.getInvoice(invoiceId, _options);
701
+ // build promise chain
702
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
703
+ for (let middleware of this.configuration.middleware) {
704
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
705
+ }
706
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
707
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
708
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
709
+ for (let middleware of this.configuration.middleware) {
710
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
711
+ }
712
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getInvoiceWithHttpInfo(rsp)));
713
+ }));
714
+ }
715
+ /**
716
+ * Get a Invoice by id.
717
+ * Get Invoice
718
+ * @param invoiceId
719
+ */
720
+ getInvoice(invoiceId, _options) {
721
+ return this.getInvoiceWithHttpInfo(invoiceId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
722
+ }
723
+ /**
724
+ * Get a list of Invoices.
725
+ * List Invoices
726
+ * @param limit
727
+ * @param cursor
728
+ */
729
+ listInvoicesWithHttpInfo(limit, cursor, _options) {
730
+ const requestContextPromise = this.requestFactory.listInvoices(limit, cursor, _options);
731
+ // build promise chain
732
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
733
+ for (let middleware of this.configuration.middleware) {
734
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
735
+ }
736
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
737
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
738
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
739
+ for (let middleware of this.configuration.middleware) {
740
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
741
+ }
742
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listInvoicesWithHttpInfo(rsp)));
743
+ }));
744
+ }
745
+ /**
746
+ * Get a list of Invoices.
747
+ * List Invoices
748
+ * @param limit
749
+ * @param cursor
750
+ */
751
+ listInvoices(limit, cursor, _options) {
752
+ return this.listInvoicesWithHttpInfo(limit, cursor, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
753
+ }
754
+ }
755
+ exports.ObservableInvoicesApi = ObservableInvoicesApi;
756
+ const MetersApi_1 = require("../apis/MetersApi");
757
+ class ObservableMetersApi {
758
+ constructor(configuration, requestFactory, responseProcessor) {
759
+ this.configuration = configuration;
760
+ this.requestFactory = requestFactory || new MetersApi_1.MetersApiRequestFactory(configuration);
761
+ this.responseProcessor = responseProcessor || new MetersApi_1.MetersApiResponseProcessor();
762
+ }
763
+ /**
764
+ * Delete a Meter by id.
765
+ * Delete Meter
766
+ * @param meterId
767
+ */
768
+ deleteMeterWithHttpInfo(meterId, _options) {
769
+ const requestContextPromise = this.requestFactory.deleteMeter(meterId, _options);
770
+ // build promise chain
771
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
772
+ for (let middleware of this.configuration.middleware) {
773
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
774
+ }
775
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
776
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
777
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
778
+ for (let middleware of this.configuration.middleware) {
779
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
780
+ }
781
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteMeterWithHttpInfo(rsp)));
782
+ }));
783
+ }
784
+ /**
785
+ * Delete a Meter by id.
786
+ * Delete Meter
787
+ * @param meterId
788
+ */
789
+ deleteMeter(meterId, _options) {
790
+ return this.deleteMeterWithHttpInfo(meterId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
791
+ }
792
+ /**
793
+ * Get a Meter by id.
794
+ * Get Meter
795
+ * @param meterId
796
+ */
797
+ getMeterWithHttpInfo(meterId, _options) {
798
+ const requestContextPromise = this.requestFactory.getMeter(meterId, _options);
799
+ // build promise chain
800
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
801
+ for (let middleware of this.configuration.middleware) {
802
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
803
+ }
804
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
805
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
806
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
807
+ for (let middleware of this.configuration.middleware) {
808
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
809
+ }
810
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getMeterWithHttpInfo(rsp)));
811
+ }));
812
+ }
813
+ /**
814
+ * Get a Meter by id.
815
+ * Get Meter
816
+ * @param meterId
817
+ */
818
+ getMeter(meterId, _options) {
819
+ return this.getMeterWithHttpInfo(meterId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
820
+ }
821
+ /**
822
+ * Get a list of Meters.
823
+ * List Meters
824
+ * @param limit
825
+ * @param cursor
826
+ */
827
+ listMetersWithHttpInfo(limit, cursor, _options) {
828
+ const requestContextPromise = this.requestFactory.listMeters(limit, cursor, _options);
829
+ // build promise chain
830
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
831
+ for (let middleware of this.configuration.middleware) {
832
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
833
+ }
834
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
835
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
836
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
837
+ for (let middleware of this.configuration.middleware) {
838
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
839
+ }
840
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listMetersWithHttpInfo(rsp)));
841
+ }));
842
+ }
843
+ /**
844
+ * Get a list of Meters.
845
+ * List Meters
846
+ * @param limit
847
+ * @param cursor
848
+ */
849
+ listMeters(limit, cursor, _options) {
850
+ return this.listMetersWithHttpInfo(limit, cursor, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
851
+ }
852
+ /**
853
+ * Update a Meter by id.
854
+ * Update Meter
855
+ * @param updateMeterRequest
856
+ * @param meterId
857
+ */
858
+ updateMeterWithHttpInfo(updateMeterRequest, meterId, _options) {
859
+ const requestContextPromise = this.requestFactory.updateMeter(updateMeterRequest, meterId, _options);
860
+ // build promise chain
861
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
862
+ for (let middleware of this.configuration.middleware) {
863
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
864
+ }
865
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
866
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
867
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
868
+ for (let middleware of this.configuration.middleware) {
869
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
870
+ }
871
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.updateMeterWithHttpInfo(rsp)));
872
+ }));
873
+ }
874
+ /**
875
+ * Update a Meter by id.
876
+ * Update Meter
877
+ * @param updateMeterRequest
878
+ * @param meterId
879
+ */
880
+ updateMeter(updateMeterRequest, meterId, _options) {
881
+ return this.updateMeterWithHttpInfo(updateMeterRequest, meterId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
882
+ }
883
+ }
884
+ exports.ObservableMetersApi = ObservableMetersApi;
885
+ const PlansApi_1 = require("../apis/PlansApi");
886
+ class ObservablePlansApi {
887
+ constructor(configuration, requestFactory, responseProcessor) {
888
+ this.configuration = configuration;
889
+ this.requestFactory = requestFactory || new PlansApi_1.PlansApiRequestFactory(configuration);
890
+ this.responseProcessor = responseProcessor || new PlansApi_1.PlansApiResponseProcessor();
891
+ }
892
+ /**
893
+ * Delete a Plan by id.
894
+ * Delete Plan
895
+ * @param planId
896
+ */
897
+ deletePlanWithHttpInfo(planId, _options) {
898
+ const requestContextPromise = this.requestFactory.deletePlan(planId, _options);
899
+ // build promise chain
900
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
901
+ for (let middleware of this.configuration.middleware) {
902
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
903
+ }
904
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
905
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
906
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
907
+ for (let middleware of this.configuration.middleware) {
908
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
909
+ }
910
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deletePlanWithHttpInfo(rsp)));
911
+ }));
912
+ }
913
+ /**
914
+ * Delete a Plan by id.
915
+ * Delete Plan
916
+ * @param planId
917
+ */
918
+ deletePlan(planId, _options) {
919
+ return this.deletePlanWithHttpInfo(planId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
920
+ }
921
+ /**
922
+ * Get a Plan by id.
923
+ * Get Plan
924
+ * @param planId
925
+ */
926
+ getPlanWithHttpInfo(planId, _options) {
927
+ const requestContextPromise = this.requestFactory.getPlan(planId, _options);
928
+ // build promise chain
929
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
930
+ for (let middleware of this.configuration.middleware) {
931
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
932
+ }
933
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
934
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
935
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
936
+ for (let middleware of this.configuration.middleware) {
937
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
938
+ }
939
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getPlanWithHttpInfo(rsp)));
940
+ }));
941
+ }
942
+ /**
943
+ * Get a Plan by id.
944
+ * Get Plan
945
+ * @param planId
946
+ */
947
+ getPlan(planId, _options) {
948
+ return this.getPlanWithHttpInfo(planId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
949
+ }
950
+ /**
951
+ * Get a list of Plans.
952
+ * List Plans
953
+ * @param limit
954
+ * @param cursor
955
+ */
956
+ listPlansWithHttpInfo(limit, cursor, _options) {
957
+ const requestContextPromise = this.requestFactory.listPlans(limit, cursor, _options);
958
+ // build promise chain
959
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
960
+ for (let middleware of this.configuration.middleware) {
961
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
962
+ }
963
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
964
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
965
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
966
+ for (let middleware of this.configuration.middleware) {
967
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
968
+ }
969
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listPlansWithHttpInfo(rsp)));
970
+ }));
971
+ }
972
+ /**
973
+ * Get a list of Plans.
974
+ * List Plans
975
+ * @param limit
976
+ * @param cursor
977
+ */
978
+ listPlans(limit, cursor, _options) {
979
+ return this.listPlansWithHttpInfo(limit, cursor, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
980
+ }
981
+ }
982
+ exports.ObservablePlansApi = ObservablePlansApi;
983
+ const ReportsApi_1 = require("../apis/ReportsApi");
984
+ class ObservableReportsApi {
985
+ constructor(configuration, requestFactory, responseProcessor) {
986
+ this.configuration = configuration;
987
+ this.requestFactory = requestFactory || new ReportsApi_1.ReportsApiRequestFactory(configuration);
988
+ this.responseProcessor = responseProcessor || new ReportsApi_1.ReportsApiResponseProcessor();
989
+ }
990
+ /**
991
+ * Get commitment report
992
+ * @param reportId
993
+ */
994
+ getCommitmentReportResponseWithHttpInfo(reportId, _options) {
995
+ const requestContextPromise = this.requestFactory.getCommitmentReportResponse(reportId, _options);
996
+ // build promise chain
997
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
998
+ for (let middleware of this.configuration.middleware) {
999
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
1000
+ }
1001
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
1002
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
1003
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
1004
+ for (let middleware of this.configuration.middleware) {
1005
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
1006
+ }
1007
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getCommitmentReportResponseWithHttpInfo(rsp)));
1008
+ }));
1009
+ }
1010
+ /**
1011
+ * Get commitment report
1012
+ * @param reportId
1013
+ */
1014
+ getCommitmentReportResponse(reportId, _options) {
1015
+ return this.getCommitmentReportResponseWithHttpInfo(reportId, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
1016
+ }
1017
+ /**
1018
+ * Use this endpoint to get the products usage report.
1019
+ * Get products usage report
1020
+ * @param reportId
1021
+ * @param limit
1022
+ * @param cursor
1023
+ */
1024
+ getProductsUsageReportWithHttpInfo(reportId, limit, cursor, _options) {
1025
+ const requestContextPromise = this.requestFactory.getProductsUsageReport(reportId, limit, cursor, _options);
1026
+ // build promise chain
1027
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
1028
+ for (let middleware of this.configuration.middleware) {
1029
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
1030
+ }
1031
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
1032
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
1033
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
1034
+ for (let middleware of this.configuration.middleware) {
1035
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
1036
+ }
1037
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getProductsUsageReportWithHttpInfo(rsp)));
1038
+ }));
1039
+ }
1040
+ /**
1041
+ * Use this endpoint to get the products usage report.
1042
+ * Get products usage report
1043
+ * @param reportId
1044
+ * @param limit
1045
+ * @param cursor
1046
+ */
1047
+ getProductsUsageReport(reportId, limit, cursor, _options) {
1048
+ return this.getProductsUsageReportWithHttpInfo(reportId, limit, cursor, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
1049
+ }
1050
+ }
1051
+ exports.ObservableReportsApi = ObservableReportsApi;
1052
+ const WebhooksApi_1 = require("../apis/WebhooksApi");
1053
+ class ObservableWebhooksApi {
1054
+ constructor(configuration, requestFactory, responseProcessor) {
1055
+ this.configuration = configuration;
1056
+ this.requestFactory = requestFactory || new WebhooksApi_1.WebhooksApiRequestFactory(configuration);
1057
+ this.responseProcessor = responseProcessor || new WebhooksApi_1.WebhooksApiResponseProcessor();
1058
+ }
1059
+ /**
1060
+ * Use this endpoint to subscribe to webhooks and receive event notifications.
1061
+ * Subscribe to webhooks
1062
+ * @param webhookSubscribeRequest Subscribe to webhooks and receive event notifications.
1063
+ */
1064
+ webhookSubscribeWithHttpInfo(webhookSubscribeRequest, _options) {
1065
+ const requestContextPromise = this.requestFactory.webhookSubscribe(webhookSubscribeRequest, _options);
1066
+ // build promise chain
1067
+ let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
1068
+ for (let middleware of this.configuration.middleware) {
1069
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
1070
+ }
1071
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
1072
+ pipe((0, rxjsStub_2.mergeMap)((response) => {
1073
+ let middlewarePostObservable = (0, rxjsStub_1.of)(response);
1074
+ for (let middleware of this.configuration.middleware) {
1075
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
1076
+ }
1077
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.webhookSubscribeWithHttpInfo(rsp)));
1078
+ }));
1079
+ }
1080
+ /**
1081
+ * Use this endpoint to subscribe to webhooks and receive event notifications.
1082
+ * Subscribe to webhooks
1083
+ * @param webhookSubscribeRequest Subscribe to webhooks and receive event notifications.
1084
+ */
1085
+ webhookSubscribe(webhookSubscribeRequest, _options) {
1086
+ return this.webhookSubscribeWithHttpInfo(webhookSubscribeRequest, _options).pipe((0, rxjsStub_2.map)((apiResponse) => apiResponse.data));
1087
+ }
1088
+ }
1089
+ exports.ObservableWebhooksApi = ObservableWebhooksApi;