vayu-ts 0.1.2 → 0.1.4

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