vayu-ts 0.2.6 → 0.2.7-test2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. package/dist/openapi/apis/AuthApi.js +47 -61
  2. package/dist/openapi/apis/ContractsApi.js +203 -232
  3. package/dist/openapi/apis/CreditsApi.js +162 -186
  4. package/dist/openapi/apis/CustomersApi.d.ts +15 -0
  5. package/dist/openapi/apis/CustomersApi.js +378 -353
  6. package/dist/openapi/apis/EventsApi.js +282 -316
  7. package/dist/openapi/apis/IntegrationsApi.js +105 -124
  8. package/dist/openapi/apis/InvoicesApi.js +100 -119
  9. package/dist/openapi/apis/MetersApi.js +211 -240
  10. package/dist/openapi/apis/PlansApi.js +150 -174
  11. package/dist/openapi/apis/ProductConsumptionsApi.d.ts +25 -0
  12. package/dist/openapi/apis/ProductConsumptionsApi.js +82 -0
  13. package/dist/openapi/apis/ReportsApi.js +100 -119
  14. package/dist/openapi/apis/WebhooksApi.js +55 -69
  15. package/dist/openapi/auth/auth.d.ts +1 -0
  16. package/dist/openapi/auth/auth.js +2 -13
  17. package/dist/openapi/http/http.d.ts +7 -20
  18. package/dist/openapi/http/http.js +15 -25
  19. package/dist/openapi/index.d.ts +3 -3
  20. package/dist/openapi/index.js +2 -1
  21. package/dist/openapi/models/Address.d.ts +3 -0
  22. package/dist/openapi/models/Address.js +1 -0
  23. package/dist/openapi/models/AggregationMethod.d.ts +3 -0
  24. package/dist/openapi/models/AggregationMethod.js +1 -0
  25. package/dist/openapi/models/Condition.d.ts +3 -0
  26. package/dist/openapi/models/Condition.js +1 -0
  27. package/dist/openapi/models/Contact.d.ts +4 -1
  28. package/dist/openapi/models/Contact.js +3 -2
  29. package/dist/openapi/models/ContractStatus.d.ts +1 -0
  30. package/dist/openapi/models/ContractStatus.js +1 -0
  31. package/dist/openapi/models/CreateContractRequest.d.ts +3 -0
  32. package/dist/openapi/models/CreateContractRequest.js +1 -0
  33. package/dist/openapi/models/CreateContractResponse.d.ts +3 -0
  34. package/dist/openapi/models/CreateContractResponse.js +1 -0
  35. package/dist/openapi/models/CreateCustomerRequest.d.ts +3 -0
  36. package/dist/openapi/models/CreateCustomerRequest.js +1 -0
  37. package/dist/openapi/models/CreateCustomerResponse.d.ts +3 -0
  38. package/dist/openapi/models/CreateCustomerResponse.js +1 -0
  39. package/dist/openapi/models/CreateCustomerResponseCustomer.d.ts +3 -0
  40. package/dist/openapi/models/CreateCustomerResponseCustomer.js +1 -0
  41. package/dist/openapi/models/CreditLedgerEntry.d.ts +3 -0
  42. package/dist/openapi/models/CreditLedgerEntry.js +1 -0
  43. package/dist/openapi/models/Criterion.d.ts +3 -0
  44. package/dist/openapi/models/Criterion.js +1 -0
  45. package/dist/openapi/models/CriterionOperator.d.ts +3 -1
  46. package/dist/openapi/models/CriterionOperator.js +2 -0
  47. package/dist/openapi/models/DeductCreditsRequest.d.ts +3 -0
  48. package/dist/openapi/models/DeductCreditsRequest.js +1 -0
  49. package/dist/openapi/models/DeleteContractResponse.d.ts +3 -0
  50. package/dist/openapi/models/DeleteContractResponse.js +1 -0
  51. package/dist/openapi/models/DeleteContractResponseContract.d.ts +3 -0
  52. package/dist/openapi/models/DeleteContractResponseContract.js +1 -0
  53. package/dist/openapi/models/DeleteCustomerResponse.d.ts +3 -0
  54. package/dist/openapi/models/DeleteCustomerResponse.js +1 -0
  55. package/dist/openapi/models/DeleteCustomerResponseCustomer.d.ts +3 -0
  56. package/dist/openapi/models/DeleteCustomerResponseCustomer.js +1 -0
  57. package/dist/openapi/models/DeleteEventResponse.d.ts +3 -0
  58. package/dist/openapi/models/DeleteEventResponse.js +1 -0
  59. package/dist/openapi/models/DeleteEventResponseEvent.d.ts +3 -0
  60. package/dist/openapi/models/DeleteEventResponseEvent.js +1 -0
  61. package/dist/openapi/models/DeleteMeterResponse.d.ts +3 -0
  62. package/dist/openapi/models/DeleteMeterResponse.js +1 -0
  63. package/dist/openapi/models/DeleteMeterResponseMeter.d.ts +3 -0
  64. package/dist/openapi/models/DeleteMeterResponseMeter.js +1 -0
  65. package/dist/openapi/models/DeletePlanResponse.d.ts +3 -0
  66. package/dist/openapi/models/DeletePlanResponse.js +1 -0
  67. package/dist/openapi/models/DeletePlanResponsePlan.d.ts +3 -0
  68. package/dist/openapi/models/DeletePlanResponsePlan.js +1 -0
  69. package/dist/openapi/models/Event.d.ts +3 -0
  70. package/dist/openapi/models/Event.js +1 -0
  71. package/dist/openapi/models/EventsDryRunRequest.d.ts +3 -0
  72. package/dist/openapi/models/EventsDryRunRequest.js +1 -0
  73. package/dist/openapi/models/EventsDryRunResponse.d.ts +3 -0
  74. package/dist/openapi/models/EventsDryRunResponse.js +1 -0
  75. package/dist/openapi/models/EventsDryRunResponseObject.d.ts +3 -0
  76. package/dist/openapi/models/EventsDryRunResponseObject.js +1 -0
  77. package/dist/openapi/models/EventsDryRunResponseObjectEvent.d.ts +3 -0
  78. package/dist/openapi/models/EventsDryRunResponseObjectEvent.js +1 -0
  79. package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.d.ts +3 -0
  80. package/dist/openapi/models/EventsDryRunResponseObjectMeterWithValuesInner.js +1 -0
  81. package/dist/openapi/models/Filter.d.ts +3 -0
  82. package/dist/openapi/models/Filter.js +1 -0
  83. package/dist/openapi/models/FullDayPeriod.d.ts +3 -0
  84. package/dist/openapi/models/FullDayPeriod.js +1 -0
  85. package/dist/openapi/models/GetCommitmentReportResponse.d.ts +5 -0
  86. package/dist/openapi/models/GetCommitmentReportResponse.js +13 -0
  87. package/dist/openapi/models/GetContractResponse.d.ts +3 -0
  88. package/dist/openapi/models/GetContractResponse.js +1 -0
  89. package/dist/openapi/models/GetContractResponseContract.d.ts +3 -0
  90. package/dist/openapi/models/GetContractResponseContract.js +1 -0
  91. package/dist/openapi/models/GetCustomerProductsConsumptionsResponse.d.ts +32 -0
  92. package/dist/openapi/models/GetCustomerProductsConsumptionsResponse.js +32 -0
  93. package/dist/openapi/models/GetCustomerResponse.d.ts +3 -0
  94. package/dist/openapi/models/GetCustomerResponse.js +1 -0
  95. package/dist/openapi/models/GetEventResponse.d.ts +3 -0
  96. package/dist/openapi/models/GetEventResponse.js +1 -0
  97. package/dist/openapi/models/GetEventResponseEvent.d.ts +3 -0
  98. package/dist/openapi/models/GetEventResponseEvent.js +1 -0
  99. package/dist/openapi/models/GetInvoiceResponse.d.ts +3 -0
  100. package/dist/openapi/models/GetInvoiceResponse.js +1 -0
  101. package/dist/openapi/models/GetInvoiceResponseInvoice.d.ts +3 -0
  102. package/dist/openapi/models/GetInvoiceResponseInvoice.js +1 -0
  103. package/dist/openapi/models/GetMeterResponse.d.ts +3 -0
  104. package/dist/openapi/models/GetMeterResponse.js +1 -0
  105. package/dist/openapi/models/GetMeterResponseMeter.d.ts +3 -0
  106. package/dist/openapi/models/GetMeterResponseMeter.js +1 -0
  107. package/dist/openapi/models/GetPlanResponse.d.ts +3 -0
  108. package/dist/openapi/models/GetPlanResponse.js +1 -0
  109. package/dist/openapi/models/GetPlanResponsePlan.d.ts +3 -0
  110. package/dist/openapi/models/GetPlanResponsePlan.js +1 -0
  111. package/dist/openapi/models/GetProductConsumptionResponse.d.ts +32 -0
  112. package/dist/openapi/models/GetProductConsumptionResponse.js +32 -0
  113. package/dist/openapi/models/GetProductConsumptionResponseProductConsumption.d.ts +59 -0
  114. package/dist/openapi/models/GetProductConsumptionResponseProductConsumption.js +74 -0
  115. package/dist/openapi/models/GetProductsUsageReportResponse.d.ts +5 -0
  116. package/dist/openapi/models/GetProductsUsageReportResponse.js +13 -0
  117. package/dist/openapi/models/GrantCreditsRequest.d.ts +3 -0
  118. package/dist/openapi/models/GrantCreditsRequest.js +1 -0
  119. package/dist/openapi/models/InvalidEvent.d.ts +3 -0
  120. package/dist/openapi/models/InvalidEvent.js +1 -0
  121. package/dist/openapi/models/LineItem.d.ts +3 -0
  122. package/dist/openapi/models/LineItem.js +1 -0
  123. package/dist/openapi/models/LineItemRevenueBreakdown.d.ts +3 -0
  124. package/dist/openapi/models/LineItemRevenueBreakdown.js +1 -0
  125. package/dist/openapi/models/ListContractsResponse.d.ts +3 -0
  126. package/dist/openapi/models/ListContractsResponse.js +1 -0
  127. package/dist/openapi/models/ListCreditLedgerEntriesResponse.d.ts +3 -0
  128. package/dist/openapi/models/ListCreditLedgerEntriesResponse.js +1 -0
  129. package/dist/openapi/models/ListCustomersResponse.d.ts +3 -0
  130. package/dist/openapi/models/ListCustomersResponse.js +1 -0
  131. package/dist/openapi/models/ListInvoicesResponse.d.ts +3 -0
  132. package/dist/openapi/models/ListInvoicesResponse.js +1 -0
  133. package/dist/openapi/models/ListMetersResponse.d.ts +3 -0
  134. package/dist/openapi/models/ListMetersResponse.js +1 -0
  135. package/dist/openapi/models/ListPlansResponse.d.ts +3 -0
  136. package/dist/openapi/models/ListPlansResponse.js +1 -0
  137. package/dist/openapi/models/LoginRequest.d.ts +3 -0
  138. package/dist/openapi/models/LoginRequest.js +1 -0
  139. package/dist/openapi/models/LoginResponse.d.ts +3 -0
  140. package/dist/openapi/models/LoginResponse.js +1 -0
  141. package/dist/openapi/models/Meter.d.ts +3 -0
  142. package/dist/openapi/models/Meter.js +1 -0
  143. package/dist/openapi/models/NetSuiteExportSalesOrderRequest.d.ts +3 -0
  144. package/dist/openapi/models/NetSuiteExportSalesOrderRequest.js +1 -0
  145. package/dist/openapi/models/NetSuiteSyncInvoicesRequest.d.ts +3 -0
  146. package/dist/openapi/models/NetSuiteSyncInvoicesRequest.js +1 -0
  147. package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.d.ts +3 -0
  148. package/dist/openapi/models/NetSuiteSyncInvoicesRequestData.js +1 -0
  149. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataEntity.d.ts +3 -0
  150. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataEntity.js +1 -0
  151. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.d.ts +3 -0
  152. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItem.js +1 -0
  153. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.d.ts +3 -0
  154. package/dist/openapi/models/NetSuiteSyncInvoicesRequestDataItemItemsInner.js +1 -0
  155. package/dist/openapi/models/NetSuiteSyncInvoicesResponse.d.ts +3 -0
  156. package/dist/openapi/models/NetSuiteSyncInvoicesResponse.js +1 -0
  157. package/dist/openapi/models/NotificationEventType.d.ts +2 -1
  158. package/dist/openapi/models/NotificationEventType.js +1 -0
  159. package/dist/openapi/models/ObjectSerializer.d.ts +6 -0
  160. package/dist/openapi/models/ObjectSerializer.js +68 -11
  161. package/dist/openapi/models/PlanBillingData.d.ts +5 -1
  162. package/dist/openapi/models/PlanBillingData.js +2 -1
  163. package/dist/openapi/models/PlanDuration.d.ts +30 -0
  164. package/dist/openapi/models/PlanDuration.js +25 -0
  165. package/dist/openapi/models/ProductConsumption.d.ts +59 -0
  166. package/dist/openapi/models/ProductConsumption.js +74 -0
  167. package/dist/openapi/models/QueryEventsResponse.d.ts +3 -0
  168. package/dist/openapi/models/QueryEventsResponse.js +1 -0
  169. package/dist/openapi/models/QueryEventsResponseEventsInner.d.ts +3 -0
  170. package/dist/openapi/models/QueryEventsResponseEventsInner.js +1 -0
  171. package/dist/openapi/models/SendEventsRequest.d.ts +3 -0
  172. package/dist/openapi/models/SendEventsRequest.js +1 -0
  173. package/dist/openapi/models/SendEventsResponse.d.ts +3 -0
  174. package/dist/openapi/models/SendEventsResponse.js +1 -0
  175. package/dist/openapi/models/UnlimitedDuration.d.ts +14 -0
  176. package/dist/openapi/models/UnlimitedDuration.js +18 -0
  177. package/dist/openapi/models/UpdateCustomerRequest.d.ts +3 -0
  178. package/dist/openapi/models/UpdateCustomerRequest.js +1 -0
  179. package/dist/openapi/models/UpdateCustomerResponse.d.ts +3 -0
  180. package/dist/openapi/models/UpdateCustomerResponse.js +1 -0
  181. package/dist/openapi/models/UpdateMeterRequest.d.ts +3 -0
  182. package/dist/openapi/models/UpdateMeterRequest.js +1 -0
  183. package/dist/openapi/models/UpdateMeterResponse.d.ts +3 -0
  184. package/dist/openapi/models/UpdateMeterResponse.js +1 -0
  185. package/dist/openapi/models/WebhookSubscribeRequest.d.ts +3 -0
  186. package/dist/openapi/models/WebhookSubscribeRequest.js +1 -0
  187. package/dist/openapi/models/all.d.ts +6 -0
  188. package/dist/openapi/models/all.js +6 -0
  189. package/dist/openapi/servers.js +2 -3
  190. package/dist/openapi/types/ObservableAPI.d.ts +71 -38
  191. package/dist/openapi/types/ObservableAPI.js +172 -105
  192. package/dist/openapi/types/PromiseAPI.d.ts +69 -38
  193. package/dist/openapi/types/PromiseAPI.js +85 -42
  194. package/dist/openapi-v2/apis/AuthenticationApi.js +35 -49
  195. package/dist/openapi-v2/apis/CustomersApi.js +230 -269
  196. package/dist/openapi-v2/apis/EntitlementsApi.js +98 -122
  197. package/dist/openapi-v2/apis/EventsApi.js +136 -165
  198. package/dist/openapi-v2/apis/InvoicesApi.js +214 -253
  199. package/dist/openapi-v2/apis/ProductsApi.js +182 -216
  200. package/dist/openapi-v2/auth/auth.d.ts +1 -0
  201. package/dist/openapi-v2/http/http.d.ts +7 -20
  202. package/dist/openapi-v2/http/http.js +15 -25
  203. package/dist/openapi-v2/index.d.ts +2 -2
  204. package/dist/openapi-v2/models/APICreateCustomerPayload.d.ts +3 -0
  205. package/dist/openapi-v2/models/APICreateCustomerPayload.js +1 -0
  206. package/dist/openapi-v2/models/APICreateInvoicePayload.d.ts +3 -0
  207. package/dist/openapi-v2/models/APICreateInvoicePayload.js +1 -0
  208. package/dist/openapi-v2/models/APICreateProductPayload.d.ts +3 -0
  209. package/dist/openapi-v2/models/APICreateProductPayload.js +1 -0
  210. package/dist/openapi-v2/models/APICustomer.d.ts +3 -0
  211. package/dist/openapi-v2/models/APICustomer.js +1 -0
  212. package/dist/openapi-v2/models/APIEntitlement.d.ts +3 -0
  213. package/dist/openapi-v2/models/APIEntitlement.js +1 -0
  214. package/dist/openapi-v2/models/APIEvent.d.ts +3 -0
  215. package/dist/openapi-v2/models/APIEvent.js +1 -0
  216. package/dist/openapi-v2/models/APIIngestEventPayload.d.ts +3 -0
  217. package/dist/openapi-v2/models/APIIngestEventPayload.js +1 -0
  218. package/dist/openapi-v2/models/APIInvoice.d.ts +3 -0
  219. package/dist/openapi-v2/models/APIInvoice.js +1 -0
  220. package/dist/openapi-v2/models/APIInvoiceBillingPeriod.d.ts +3 -0
  221. package/dist/openapi-v2/models/APIInvoiceBillingPeriod.js +1 -0
  222. package/dist/openapi-v2/models/APIProduct.d.ts +3 -0
  223. package/dist/openapi-v2/models/APIProduct.js +1 -0
  224. package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.d.ts +3 -0
  225. package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.js +1 -0
  226. package/dist/openapi-v2/models/APIQueryPayloadAPIEntitlement.d.ts +3 -0
  227. package/dist/openapi-v2/models/APIQueryPayloadAPIEntitlement.js +1 -0
  228. package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.d.ts +3 -0
  229. package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.js +1 -0
  230. package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.d.ts +3 -0
  231. package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.js +1 -0
  232. package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.d.ts +3 -0
  233. package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.js +1 -0
  234. package/dist/openapi-v2/models/APIUpdateCustomerPayload.d.ts +3 -0
  235. package/dist/openapi-v2/models/APIUpdateCustomerPayload.js +1 -0
  236. package/dist/openapi-v2/models/APIUpdateInvoicePayload.d.ts +3 -0
  237. package/dist/openapi-v2/models/APIUpdateInvoicePayload.js +1 -0
  238. package/dist/openapi-v2/models/APIUpdateProductPayload.d.ts +3 -0
  239. package/dist/openapi-v2/models/APIUpdateProductPayload.js +1 -0
  240. package/dist/openapi-v2/models/Aggregation.d.ts +3 -0
  241. package/dist/openapi-v2/models/Aggregation.js +1 -0
  242. package/dist/openapi-v2/models/Condition.d.ts +3 -0
  243. package/dist/openapi-v2/models/Condition.js +1 -0
  244. package/dist/openapi-v2/models/Criterion.d.ts +3 -0
  245. package/dist/openapi-v2/models/Criterion.js +1 -0
  246. package/dist/openapi-v2/models/CriterionValue.d.ts +3 -0
  247. package/dist/openapi-v2/models/CriterionValue.js +1 -0
  248. package/dist/openapi-v2/models/EntitlementRevision.d.ts +3 -0
  249. package/dist/openapi-v2/models/EntitlementRevision.js +1 -0
  250. package/dist/openapi-v2/models/IngestEventToTheSystem201Response.d.ts +3 -0
  251. package/dist/openapi-v2/models/IngestEventToTheSystem201Response.js +1 -0
  252. package/dist/openapi-v2/models/InvoiceProductBreakdown.d.ts +3 -0
  253. package/dist/openapi-v2/models/InvoiceProductBreakdown.js +1 -0
  254. package/dist/openapi-v2/models/Login200Response.d.ts +3 -0
  255. package/dist/openapi-v2/models/Login200Response.js +1 -0
  256. package/dist/openapi-v2/models/LoginRequest.d.ts +3 -0
  257. package/dist/openapi-v2/models/LoginRequest.js +1 -0
  258. package/dist/openapi-v2/models/ObjectSerializer.js +51 -11
  259. package/dist/openapi-v2/models/Pricing.d.ts +3 -0
  260. package/dist/openapi-v2/models/Pricing.js +1 -0
  261. package/dist/openapi-v2/models/PricingTiersInner.d.ts +3 -0
  262. package/dist/openapi-v2/models/PricingTiersInner.js +1 -0
  263. package/dist/openapi-v2/models/ProductBreakdown.d.ts +3 -0
  264. package/dist/openapi-v2/models/ProductBreakdown.js +1 -0
  265. package/dist/openapi-v2/models/QueryResultAPICustomer.d.ts +3 -0
  266. package/dist/openapi-v2/models/QueryResultAPICustomer.js +1 -0
  267. package/dist/openapi-v2/models/QueryResultAPIEntitlement.d.ts +3 -0
  268. package/dist/openapi-v2/models/QueryResultAPIEntitlement.js +1 -0
  269. package/dist/openapi-v2/models/QueryResultAPIEvent.d.ts +3 -0
  270. package/dist/openapi-v2/models/QueryResultAPIEvent.js +1 -0
  271. package/dist/openapi-v2/models/QueryResultAPIInvoice.d.ts +3 -0
  272. package/dist/openapi-v2/models/QueryResultAPIInvoice.js +1 -0
  273. package/dist/openapi-v2/models/QueryResultAPIProduct.d.ts +3 -0
  274. package/dist/openapi-v2/models/QueryResultAPIProduct.js +1 -0
  275. package/dist/openapi-v2/models/ReviseEntitlementPayload.d.ts +3 -0
  276. package/dist/openapi-v2/models/ReviseEntitlementPayload.js +1 -0
  277. package/dist/openapi-v2/servers.js +2 -3
  278. package/dist/openapi-v2/types/ObservableAPI.js +50 -50
  279. package/dist/sdk/clients/ContractsClient.js +10 -27
  280. package/dist/sdk/clients/CustomersClient.d.ts +1 -0
  281. package/dist/sdk/clients/CustomersClient.js +22 -40
  282. package/dist/sdk/clients/EventsClient.js +13 -32
  283. package/dist/sdk/clients/InvoicesClient.js +6 -19
  284. package/dist/sdk/clients/MetersClient.js +10 -27
  285. package/dist/sdk/clients/PlansClient.js +8 -23
  286. package/dist/sdk/clients/ProductsConsumptionsClient.d.ts +5 -0
  287. package/dist/sdk/clients/ProductsConsumptionsClient.js +14 -0
  288. package/dist/sdk/clients/WebhooksClient.js +2 -13
  289. package/dist/sdk/clients/index.d.ts +1 -0
  290. package/dist/sdk/clients/index.js +1 -0
  291. package/dist/sdk/index.d.ts +2 -1
  292. package/dist/sdk/index.js +5 -13
  293. package/dist/sdk/services/configuration.service.js +21 -33
  294. package/dist/sdk-v2/clients/CustomersClient.js +12 -33
  295. package/dist/sdk-v2/clients/EntitlementsClient.js +6 -21
  296. package/dist/sdk-v2/clients/EventsClient.js +8 -25
  297. package/dist/sdk-v2/clients/InvoicesClient.js +12 -33
  298. package/dist/sdk-v2/clients/ProductsClient.js +10 -29
  299. package/dist/sdk-v2/index.js +2 -13
  300. package/dist/sdk-v2/services/configuration.service.js +22 -34
  301. package/package.json +1 -1
@@ -14,11 +14,13 @@ import { EventsDryRunRequest } from '../models/EventsDryRunRequest';
14
14
  import { EventsDryRunResponse } from '../models/EventsDryRunResponse';
15
15
  import { GetCommitmentReportResponse } from '../models/GetCommitmentReportResponse';
16
16
  import { GetContractResponse } from '../models/GetContractResponse';
17
+ import { GetCustomerProductsConsumptionsResponse } from '../models/GetCustomerProductsConsumptionsResponse';
17
18
  import { GetCustomerResponse } from '../models/GetCustomerResponse';
18
19
  import { GetEventResponse } from '../models/GetEventResponse';
19
20
  import { GetInvoiceResponse } from '../models/GetInvoiceResponse';
20
21
  import { GetMeterResponse } from '../models/GetMeterResponse';
21
22
  import { GetPlanResponse } from '../models/GetPlanResponse';
23
+ import { GetProductConsumptionResponse } from '../models/GetProductConsumptionResponse';
22
24
  import { GetProductsUsageReportResponse } from '../models/GetProductsUsageReportResponse';
23
25
  import { GrantCreditsRequest } from '../models/GrantCreditsRequest';
24
26
  import { ListContractsResponse } from '../models/ListContractsResponse';
@@ -100,15 +102,15 @@ export declare class PromiseContractsApi {
100
102
  /**
101
103
  * Get a list of Contracts.
102
104
  * List Contracts
103
- * @param limit
104
- * @param cursor
105
+ * @param [limit]
106
+ * @param [cursor]
105
107
  */
106
108
  listContractsWithHttpInfo(limit?: number, cursor?: string, _options?: Configuration): Promise<HttpInfo<ListContractsResponse>>;
107
109
  /**
108
110
  * Get a list of Contracts.
109
111
  * List Contracts
110
- * @param limit
111
- * @param cursor
112
+ * @param [limit]
113
+ * @param [cursor]
112
114
  */
113
115
  listContracts(limit?: number, cursor?: string, _options?: Configuration): Promise<ListContractsResponse>;
114
116
  }
@@ -144,16 +146,16 @@ export declare class PromiseCreditsApi {
144
146
  * This endpoint is used to retrieve the credit ledger entries for a specific customer.
145
147
  * Retrieve credit ledger entries for customer.
146
148
  * @param customerId
147
- * @param limit
148
- * @param cursor
149
+ * @param [limit]
150
+ * @param [cursor]
149
151
  */
150
152
  listCreditLedgerEntriesWithHttpInfo(customerId: string, limit?: number, cursor?: string, _options?: Configuration): Promise<HttpInfo<ListCreditLedgerEntriesResponse>>;
151
153
  /**
152
154
  * This endpoint is used to retrieve the credit ledger entries for a specific customer.
153
155
  * Retrieve credit ledger entries for customer.
154
156
  * @param customerId
155
- * @param limit
156
- * @param cursor
157
+ * @param [limit]
158
+ * @param [cursor]
157
159
  */
158
160
  listCreditLedgerEntries(customerId: string, limit?: number, cursor?: string, _options?: Configuration): Promise<ListCreditLedgerEntriesResponse>;
159
161
  }
@@ -209,18 +211,30 @@ export declare class PromiseCustomersApi {
209
211
  * @param externalId
210
212
  */
211
213
  getCustomerByExternalId(externalId: string, _options?: Configuration): Promise<GetCustomerResponse>;
214
+ /**
215
+ * Use this endpoint to get the products consumptions by the customer id.
216
+ * Get products consumptions by customer id
217
+ * @param customerId
218
+ */
219
+ getCustomerProductsConsumptionsWithHttpInfo(customerId: string, _options?: Configuration): Promise<HttpInfo<GetCustomerProductsConsumptionsResponse>>;
220
+ /**
221
+ * Use this endpoint to get the products consumptions by the customer id.
222
+ * Get products consumptions by customer id
223
+ * @param customerId
224
+ */
225
+ getCustomerProductsConsumptions(customerId: string, _options?: Configuration): Promise<GetCustomerProductsConsumptionsResponse>;
212
226
  /**
213
227
  * Get a list of Customers.
214
228
  * List Customers
215
- * @param limit
216
- * @param cursor
229
+ * @param [limit]
230
+ * @param [cursor]
217
231
  */
218
232
  listCustomersWithHttpInfo(limit?: number, cursor?: string, _options?: Configuration): Promise<HttpInfo<ListCustomersResponse>>;
219
233
  /**
220
234
  * Get a list of Customers.
221
235
  * List Customers
222
- * @param limit
223
- * @param cursor
236
+ * @param [limit]
237
+ * @param [cursor]
224
238
  */
225
239
  listCustomers(limit?: number, cursor?: string, _options?: Configuration): Promise<ListCustomersResponse>;
226
240
  /**
@@ -271,9 +285,9 @@ export declare class PromiseEventsApi {
271
285
  * Query events by timestamp period and optional event name
272
286
  * @param startTime
273
287
  * @param endTime
274
- * @param eventName
275
- * @param limit
276
- * @param cursor
288
+ * @param [eventName]
289
+ * @param [limit]
290
+ * @param [cursor]
277
291
  */
278
292
  queryEventsWithHttpInfo(startTime: Date, endTime: Date, eventName?: string, limit?: number, cursor?: string, _options?: Configuration): Promise<HttpInfo<QueryEventsResponse>>;
279
293
  /**
@@ -281,9 +295,9 @@ export declare class PromiseEventsApi {
281
295
  * Query events by timestamp period and optional event name
282
296
  * @param startTime
283
297
  * @param endTime
284
- * @param eventName
285
- * @param limit
286
- * @param cursor
298
+ * @param [eventName]
299
+ * @param [limit]
300
+ * @param [cursor]
287
301
  */
288
302
  queryEvents(startTime: Date, endTime: Date, eventName?: string, limit?: number, cursor?: string, _options?: Configuration): Promise<QueryEventsResponse>;
289
303
  /**
@@ -359,15 +373,15 @@ export declare class PromiseInvoicesApi {
359
373
  /**
360
374
  * Get a list of Invoices.
361
375
  * List Invoices
362
- * @param limit
363
- * @param cursor
376
+ * @param [limit]
377
+ * @param [cursor]
364
378
  */
365
379
  listInvoicesWithHttpInfo(limit?: number, cursor?: string, _options?: Configuration): Promise<HttpInfo<ListInvoicesResponse>>;
366
380
  /**
367
381
  * Get a list of Invoices.
368
382
  * List Invoices
369
- * @param limit
370
- * @param cursor
383
+ * @param [limit]
384
+ * @param [cursor]
371
385
  */
372
386
  listInvoices(limit?: number, cursor?: string, _options?: Configuration): Promise<ListInvoicesResponse>;
373
387
  }
@@ -402,15 +416,15 @@ export declare class PromiseMetersApi {
402
416
  /**
403
417
  * Get a list of Meters.
404
418
  * List Meters
405
- * @param limit
406
- * @param cursor
419
+ * @param [limit]
420
+ * @param [cursor]
407
421
  */
408
422
  listMetersWithHttpInfo(limit?: number, cursor?: string, _options?: Configuration): Promise<HttpInfo<ListMetersResponse>>;
409
423
  /**
410
424
  * Get a list of Meters.
411
425
  * List Meters
412
- * @param limit
413
- * @param cursor
426
+ * @param [limit]
427
+ * @param [cursor]
414
428
  */
415
429
  listMeters(limit?: number, cursor?: string, _options?: Configuration): Promise<ListMetersResponse>;
416
430
  /**
@@ -459,46 +473,63 @@ export declare class PromisePlansApi {
459
473
  /**
460
474
  * Get a list of Plans.
461
475
  * List Plans
462
- * @param limit
463
- * @param cursor
476
+ * @param [limit]
477
+ * @param [cursor]
464
478
  */
465
479
  listPlansWithHttpInfo(limit?: number, cursor?: string, _options?: Configuration): Promise<HttpInfo<ListPlansResponse>>;
466
480
  /**
467
481
  * Get a list of Plans.
468
482
  * List Plans
469
- * @param limit
470
- * @param cursor
483
+ * @param [limit]
484
+ * @param [cursor]
471
485
  */
472
486
  listPlans(limit?: number, cursor?: string, _options?: Configuration): Promise<ListPlansResponse>;
473
487
  }
488
+ import { ProductConsumptionsApiRequestFactory, ProductConsumptionsApiResponseProcessor } from "../apis/ProductConsumptionsApi";
489
+ export declare class PromiseProductConsumptionsApi {
490
+ private api;
491
+ constructor(configuration: Configuration, requestFactory?: ProductConsumptionsApiRequestFactory, responseProcessor?: ProductConsumptionsApiResponseProcessor);
492
+ /**
493
+ * Use this action to get the consumption data for a product
494
+ * Get product consumption
495
+ * @param productId
496
+ */
497
+ getProductConsumptionWithHttpInfo(productId: string, _options?: Configuration): Promise<HttpInfo<GetProductConsumptionResponse>>;
498
+ /**
499
+ * Use this action to get the consumption data for a product
500
+ * Get product consumption
501
+ * @param productId
502
+ */
503
+ getProductConsumption(productId: string, _options?: Configuration): Promise<GetProductConsumptionResponse>;
504
+ }
474
505
  import { ReportsApiRequestFactory, ReportsApiResponseProcessor } from "../apis/ReportsApi";
475
506
  export declare class PromiseReportsApi {
476
507
  private api;
477
508
  constructor(configuration: Configuration, requestFactory?: ReportsApiRequestFactory, responseProcessor?: ReportsApiResponseProcessor);
478
509
  /**
479
510
  * Get commitment report
480
- * @param reportId
511
+ * @param [reportId]
481
512
  */
482
513
  getCommitmentReportResponseWithHttpInfo(reportId?: string, _options?: Configuration): Promise<HttpInfo<GetCommitmentReportResponse>>;
483
514
  /**
484
515
  * Get commitment report
485
- * @param reportId
516
+ * @param [reportId]
486
517
  */
487
518
  getCommitmentReportResponse(reportId?: string, _options?: Configuration): Promise<GetCommitmentReportResponse>;
488
519
  /**
489
520
  * Use this endpoint to get the products usage report.
490
521
  * Get products usage report
491
- * @param reportId
492
- * @param limit
493
- * @param cursor
522
+ * @param [reportId]
523
+ * @param [limit]
524
+ * @param [cursor]
494
525
  */
495
526
  getProductsUsageReportWithHttpInfo(reportId?: string, limit?: number, cursor?: string, _options?: Configuration): Promise<HttpInfo<GetProductsUsageReportResponse>>;
496
527
  /**
497
528
  * Use this endpoint to get the products usage report.
498
529
  * Get products usage report
499
- * @param reportId
500
- * @param limit
501
- * @param cursor
530
+ * @param [reportId]
531
+ * @param [limit]
532
+ * @param [cursor]
502
533
  */
503
534
  getProductsUsageReport(reportId?: string, limit?: number, cursor?: string, _options?: Configuration): Promise<GetProductsUsageReportResponse>;
504
535
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PromiseWebhooksApi = exports.PromiseReportsApi = exports.PromisePlansApi = exports.PromiseMetersApi = exports.PromiseInvoicesApi = exports.PromiseIntegrationsApi = exports.PromiseEventsApi = exports.PromiseCustomersApi = exports.PromiseCreditsApi = exports.PromiseContractsApi = exports.PromiseAuthApi = void 0;
3
+ exports.PromiseWebhooksApi = exports.PromiseReportsApi = exports.PromiseProductConsumptionsApi = exports.PromisePlansApi = exports.PromiseMetersApi = exports.PromiseInvoicesApi = exports.PromiseIntegrationsApi = exports.PromiseEventsApi = exports.PromiseCustomersApi = exports.PromiseCreditsApi = exports.PromiseContractsApi = exports.PromiseAuthApi = void 0;
4
4
  const ObservableAPI_1 = require("./ObservableAPI");
5
5
  class PromiseAuthApi {
6
6
  constructor(configuration, requestFactory, responseProcessor) {
@@ -88,8 +88,8 @@ class PromiseContractsApi {
88
88
  /**
89
89
  * Get a list of Contracts.
90
90
  * List Contracts
91
- * @param limit
92
- * @param cursor
91
+ * @param [limit]
92
+ * @param [cursor]
93
93
  */
94
94
  listContractsWithHttpInfo(limit, cursor, _options) {
95
95
  const result = this.api.listContractsWithHttpInfo(limit, cursor, _options);
@@ -98,8 +98,8 @@ class PromiseContractsApi {
98
98
  /**
99
99
  * Get a list of Contracts.
100
100
  * List Contracts
101
- * @param limit
102
- * @param cursor
101
+ * @param [limit]
102
+ * @param [cursor]
103
103
  */
104
104
  listContracts(limit, cursor, _options) {
105
105
  const result = this.api.listContracts(limit, cursor, _options);
@@ -152,8 +152,8 @@ class PromiseCreditsApi {
152
152
  * This endpoint is used to retrieve the credit ledger entries for a specific customer.
153
153
  * Retrieve credit ledger entries for customer.
154
154
  * @param customerId
155
- * @param limit
156
- * @param cursor
155
+ * @param [limit]
156
+ * @param [cursor]
157
157
  */
158
158
  listCreditLedgerEntriesWithHttpInfo(customerId, limit, cursor, _options) {
159
159
  const result = this.api.listCreditLedgerEntriesWithHttpInfo(customerId, limit, cursor, _options);
@@ -163,8 +163,8 @@ class PromiseCreditsApi {
163
163
  * This endpoint is used to retrieve the credit ledger entries for a specific customer.
164
164
  * Retrieve credit ledger entries for customer.
165
165
  * @param customerId
166
- * @param limit
167
- * @param cursor
166
+ * @param [limit]
167
+ * @param [cursor]
168
168
  */
169
169
  listCreditLedgerEntries(customerId, limit, cursor, _options) {
170
170
  const result = this.api.listCreditLedgerEntries(customerId, limit, cursor, _options);
@@ -249,11 +249,29 @@ class PromiseCustomersApi {
249
249
  const result = this.api.getCustomerByExternalId(externalId, _options);
250
250
  return result.toPromise();
251
251
  }
252
+ /**
253
+ * Use this endpoint to get the products consumptions by the customer id.
254
+ * Get products consumptions by customer id
255
+ * @param customerId
256
+ */
257
+ getCustomerProductsConsumptionsWithHttpInfo(customerId, _options) {
258
+ const result = this.api.getCustomerProductsConsumptionsWithHttpInfo(customerId, _options);
259
+ return result.toPromise();
260
+ }
261
+ /**
262
+ * Use this endpoint to get the products consumptions by the customer id.
263
+ * Get products consumptions by customer id
264
+ * @param customerId
265
+ */
266
+ getCustomerProductsConsumptions(customerId, _options) {
267
+ const result = this.api.getCustomerProductsConsumptions(customerId, _options);
268
+ return result.toPromise();
269
+ }
252
270
  /**
253
271
  * Get a list of Customers.
254
272
  * List Customers
255
- * @param limit
256
- * @param cursor
273
+ * @param [limit]
274
+ * @param [cursor]
257
275
  */
258
276
  listCustomersWithHttpInfo(limit, cursor, _options) {
259
277
  const result = this.api.listCustomersWithHttpInfo(limit, cursor, _options);
@@ -262,8 +280,8 @@ class PromiseCustomersApi {
262
280
  /**
263
281
  * Get a list of Customers.
264
282
  * List Customers
265
- * @param limit
266
- * @param cursor
283
+ * @param [limit]
284
+ * @param [cursor]
267
285
  */
268
286
  listCustomers(limit, cursor, _options) {
269
287
  const result = this.api.listCustomers(limit, cursor, _options);
@@ -337,9 +355,9 @@ class PromiseEventsApi {
337
355
  * Query events by timestamp period and optional event name
338
356
  * @param startTime
339
357
  * @param endTime
340
- * @param eventName
341
- * @param limit
342
- * @param cursor
358
+ * @param [eventName]
359
+ * @param [limit]
360
+ * @param [cursor]
343
361
  */
344
362
  queryEventsWithHttpInfo(startTime, endTime, eventName, limit, cursor, _options) {
345
363
  const result = this.api.queryEventsWithHttpInfo(startTime, endTime, eventName, limit, cursor, _options);
@@ -350,9 +368,9 @@ class PromiseEventsApi {
350
368
  * Query events by timestamp period and optional event name
351
369
  * @param startTime
352
370
  * @param endTime
353
- * @param eventName
354
- * @param limit
355
- * @param cursor
371
+ * @param [eventName]
372
+ * @param [limit]
373
+ * @param [cursor]
356
374
  */
357
375
  queryEvents(startTime, endTime, eventName, limit, cursor, _options) {
358
376
  const result = this.api.queryEvents(startTime, endTime, eventName, limit, cursor, _options);
@@ -465,8 +483,8 @@ class PromiseInvoicesApi {
465
483
  /**
466
484
  * Get a list of Invoices.
467
485
  * List Invoices
468
- * @param limit
469
- * @param cursor
486
+ * @param [limit]
487
+ * @param [cursor]
470
488
  */
471
489
  listInvoicesWithHttpInfo(limit, cursor, _options) {
472
490
  const result = this.api.listInvoicesWithHttpInfo(limit, cursor, _options);
@@ -475,8 +493,8 @@ class PromiseInvoicesApi {
475
493
  /**
476
494
  * Get a list of Invoices.
477
495
  * List Invoices
478
- * @param limit
479
- * @param cursor
496
+ * @param [limit]
497
+ * @param [cursor]
480
498
  */
481
499
  listInvoices(limit, cursor, _options) {
482
500
  const result = this.api.listInvoices(limit, cursor, _options);
@@ -528,8 +546,8 @@ class PromiseMetersApi {
528
546
  /**
529
547
  * Get a list of Meters.
530
548
  * List Meters
531
- * @param limit
532
- * @param cursor
549
+ * @param [limit]
550
+ * @param [cursor]
533
551
  */
534
552
  listMetersWithHttpInfo(limit, cursor, _options) {
535
553
  const result = this.api.listMetersWithHttpInfo(limit, cursor, _options);
@@ -538,8 +556,8 @@ class PromiseMetersApi {
538
556
  /**
539
557
  * Get a list of Meters.
540
558
  * List Meters
541
- * @param limit
542
- * @param cursor
559
+ * @param [limit]
560
+ * @param [cursor]
543
561
  */
544
562
  listMeters(limit, cursor, _options) {
545
563
  const result = this.api.listMeters(limit, cursor, _options);
@@ -611,8 +629,8 @@ class PromisePlansApi {
611
629
  /**
612
630
  * Get a list of Plans.
613
631
  * List Plans
614
- * @param limit
615
- * @param cursor
632
+ * @param [limit]
633
+ * @param [cursor]
616
634
  */
617
635
  listPlansWithHttpInfo(limit, cursor, _options) {
618
636
  const result = this.api.listPlansWithHttpInfo(limit, cursor, _options);
@@ -621,8 +639,8 @@ class PromisePlansApi {
621
639
  /**
622
640
  * Get a list of Plans.
623
641
  * List Plans
624
- * @param limit
625
- * @param cursor
642
+ * @param [limit]
643
+ * @param [cursor]
626
644
  */
627
645
  listPlans(limit, cursor, _options) {
628
646
  const result = this.api.listPlans(limit, cursor, _options);
@@ -631,13 +649,38 @@ class PromisePlansApi {
631
649
  }
632
650
  exports.PromisePlansApi = PromisePlansApi;
633
651
  const ObservableAPI_10 = require("./ObservableAPI");
652
+ class PromiseProductConsumptionsApi {
653
+ constructor(configuration, requestFactory, responseProcessor) {
654
+ this.api = new ObservableAPI_10.ObservableProductConsumptionsApi(configuration, requestFactory, responseProcessor);
655
+ }
656
+ /**
657
+ * Use this action to get the consumption data for a product
658
+ * Get product consumption
659
+ * @param productId
660
+ */
661
+ getProductConsumptionWithHttpInfo(productId, _options) {
662
+ const result = this.api.getProductConsumptionWithHttpInfo(productId, _options);
663
+ return result.toPromise();
664
+ }
665
+ /**
666
+ * Use this action to get the consumption data for a product
667
+ * Get product consumption
668
+ * @param productId
669
+ */
670
+ getProductConsumption(productId, _options) {
671
+ const result = this.api.getProductConsumption(productId, _options);
672
+ return result.toPromise();
673
+ }
674
+ }
675
+ exports.PromiseProductConsumptionsApi = PromiseProductConsumptionsApi;
676
+ const ObservableAPI_11 = require("./ObservableAPI");
634
677
  class PromiseReportsApi {
635
678
  constructor(configuration, requestFactory, responseProcessor) {
636
- this.api = new ObservableAPI_10.ObservableReportsApi(configuration, requestFactory, responseProcessor);
679
+ this.api = new ObservableAPI_11.ObservableReportsApi(configuration, requestFactory, responseProcessor);
637
680
  }
638
681
  /**
639
682
  * Get commitment report
640
- * @param reportId
683
+ * @param [reportId]
641
684
  */
642
685
  getCommitmentReportResponseWithHttpInfo(reportId, _options) {
643
686
  const result = this.api.getCommitmentReportResponseWithHttpInfo(reportId, _options);
@@ -645,7 +688,7 @@ class PromiseReportsApi {
645
688
  }
646
689
  /**
647
690
  * Get commitment report
648
- * @param reportId
691
+ * @param [reportId]
649
692
  */
650
693
  getCommitmentReportResponse(reportId, _options) {
651
694
  const result = this.api.getCommitmentReportResponse(reportId, _options);
@@ -654,9 +697,9 @@ class PromiseReportsApi {
654
697
  /**
655
698
  * Use this endpoint to get the products usage report.
656
699
  * Get products usage report
657
- * @param reportId
658
- * @param limit
659
- * @param cursor
700
+ * @param [reportId]
701
+ * @param [limit]
702
+ * @param [cursor]
660
703
  */
661
704
  getProductsUsageReportWithHttpInfo(reportId, limit, cursor, _options) {
662
705
  const result = this.api.getProductsUsageReportWithHttpInfo(reportId, limit, cursor, _options);
@@ -665,9 +708,9 @@ class PromiseReportsApi {
665
708
  /**
666
709
  * Use this endpoint to get the products usage report.
667
710
  * Get products usage report
668
- * @param reportId
669
- * @param limit
670
- * @param cursor
711
+ * @param [reportId]
712
+ * @param [limit]
713
+ * @param [cursor]
671
714
  */
672
715
  getProductsUsageReport(reportId, limit, cursor, _options) {
673
716
  const result = this.api.getProductsUsageReport(reportId, limit, cursor, _options);
@@ -675,10 +718,10 @@ class PromiseReportsApi {
675
718
  }
676
719
  }
677
720
  exports.PromiseReportsApi = PromiseReportsApi;
678
- const ObservableAPI_11 = require("./ObservableAPI");
721
+ const ObservableAPI_12 = require("./ObservableAPI");
679
722
  class PromiseWebhooksApi {
680
723
  constructor(configuration, requestFactory, responseProcessor) {
681
- this.api = new ObservableAPI_11.ObservableWebhooksApi(configuration, requestFactory, responseProcessor);
724
+ this.api = new ObservableAPI_12.ObservableWebhooksApi(configuration, requestFactory, responseProcessor);
682
725
  }
683
726
  /**
684
727
  * Use this endpoint to subscribe to webhooks and receive event notifications.
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.AuthenticationApiResponseProcessor = exports.AuthenticationApiRequestFactory = void 0;
13
4
  // TODO: better import syntax?
@@ -23,32 +14,29 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
23
14
  /**
24
15
  * @param loginRequest
25
16
  */
26
- login(loginRequest, _options) {
27
- var _a, _b, _c;
28
- return __awaiter(this, void 0, void 0, function* () {
29
- let _config = _options || this.configuration;
30
- // verify required parameter 'loginRequest' is not null or undefined
31
- if (loginRequest === null || loginRequest === undefined) {
32
- throw new baseapi_1.RequiredError("AuthenticationApi", "login", "loginRequest");
33
- }
34
- // Path Params
35
- const localVarPath = '/auth/login';
36
- // Make Request Context
37
- const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
38
- requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
39
- // Body Params
40
- const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
41
- "application/json"
42
- ]);
43
- requestContext.setHeaderParam("Content-Type", contentType);
44
- const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(loginRequest, "LoginRequest", ""), contentType);
45
- requestContext.setBody(serializedBody);
46
- const defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
47
- if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
48
- yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
49
- }
50
- return requestContext;
51
- });
17
+ async login(loginRequest, _options) {
18
+ let _config = _options || this.configuration;
19
+ // verify required parameter 'loginRequest' is not null or undefined
20
+ if (loginRequest === null || loginRequest === undefined) {
21
+ throw new baseapi_1.RequiredError("AuthenticationApi", "login", "loginRequest");
22
+ }
23
+ // Path Params
24
+ const localVarPath = '/auth/login';
25
+ // Make Request Context
26
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
27
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
28
+ // Body Params
29
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
30
+ "application/json"
31
+ ]);
32
+ requestContext.setHeaderParam("Content-Type", contentType);
33
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(loginRequest, "LoginRequest", ""), contentType);
34
+ requestContext.setBody(serializedBody);
35
+ const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
36
+ if (defaultAuth?.applySecurityAuthentication) {
37
+ await defaultAuth?.applySecurityAuthentication(requestContext);
38
+ }
39
+ return requestContext;
52
40
  }
53
41
  }
54
42
  exports.AuthenticationApiRequestFactory = AuthenticationApiRequestFactory;
@@ -60,20 +48,18 @@ class AuthenticationApiResponseProcessor {
60
48
  * @params response Response returned by the server for a request to login
61
49
  * @throws ApiException if the response code was not in [200, 299]
62
50
  */
63
- loginWithHttpInfo(response) {
64
- return __awaiter(this, void 0, void 0, function* () {
65
- const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
66
- if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
67
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Login200Response", "");
68
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
69
- }
70
- // Work around for missing responses in specification, e.g. for petstore.yaml
71
- if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
72
- const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Login200Response", "");
73
- return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
74
- }
75
- throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
76
- });
51
+ async loginWithHttpInfo(response) {
52
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
53
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
54
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Login200Response", "");
55
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
56
+ }
57
+ // Work around for missing responses in specification, e.g. for petstore.yaml
58
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
59
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Login200Response", "");
60
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
61
+ }
62
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
77
63
  }
78
64
  }
79
65
  exports.AuthenticationApiResponseProcessor = AuthenticationApiResponseProcessor;