vayu-ts 0.1.4 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/dist/openapi-v2/apis/AuthenticationApi.d.ts +24 -0
  2. package/dist/openapi-v2/apis/AuthenticationApi.js +79 -0
  3. package/dist/openapi-v2/apis/CustomersApi.d.ts +76 -0
  4. package/dist/openapi-v2/apis/CustomersApi.js +295 -0
  5. package/dist/openapi-v2/apis/EventsApi.d.ts +63 -0
  6. package/dist/openapi-v2/apis/EventsApi.js +231 -0
  7. package/dist/openapi-v2/apis/InvoicesApi.d.ts +88 -0
  8. package/dist/openapi-v2/apis/InvoicesApi.js +344 -0
  9. package/dist/openapi-v2/apis/ProductsApi.d.ts +90 -0
  10. package/dist/openapi-v2/apis/ProductsApi.js +359 -0
  11. package/dist/openapi-v2/apis/baseapi.d.ts +33 -0
  12. package/dist/openapi-v2/apis/baseapi.js +41 -0
  13. package/dist/openapi-v2/apis/exception.d.ts +19 -0
  14. package/dist/openapi-v2/apis/exception.js +22 -0
  15. package/dist/openapi-v2/auth/auth.d.ts +38 -0
  16. package/dist/openapi-v2/auth/auth.js +16 -0
  17. package/dist/openapi-v2/configuration.d.ts +63 -0
  18. package/dist/openapi-v2/configuration.js +34 -0
  19. package/dist/openapi-v2/http/http.d.ts +142 -0
  20. package/dist/openapi-v2/http/http.js +229 -0
  21. package/dist/openapi-v2/http/isomorphic-fetch.d.ts +5 -0
  22. package/dist/openapi-v2/http/isomorphic-fetch.js +33 -0
  23. package/dist/openapi-v2/index.d.ts +10 -0
  24. package/dist/openapi-v2/index.js +32 -0
  25. package/dist/openapi-v2/middleware.d.ts +54 -0
  26. package/dist/openapi-v2/middleware.js +16 -0
  27. package/dist/openapi-v2/models/APICreateCustomerPayload.d.ts +45 -0
  28. package/dist/openapi-v2/models/APICreateCustomerPayload.js +49 -0
  29. package/dist/openapi-v2/models/APICreateInvoicePayload.d.ts +41 -0
  30. package/dist/openapi-v2/models/APICreateInvoicePayload.js +49 -0
  31. package/dist/openapi-v2/models/APICreateProductPayload.d.ts +39 -0
  32. package/dist/openapi-v2/models/APICreateProductPayload.js +49 -0
  33. package/dist/openapi-v2/models/APICustomer.d.ts +64 -0
  34. package/dist/openapi-v2/models/APICustomer.js +76 -0
  35. package/dist/openapi-v2/models/APIEvent.d.ts +72 -0
  36. package/dist/openapi-v2/models/APIEvent.js +88 -0
  37. package/dist/openapi-v2/models/APIIngestEventPayload.d.ts +49 -0
  38. package/dist/openapi-v2/models/APIIngestEventPayload.js +55 -0
  39. package/dist/openapi-v2/models/APIInvoice.d.ts +71 -0
  40. package/dist/openapi-v2/models/APIInvoice.js +88 -0
  41. package/dist/openapi-v2/models/APIInvoiceBillingPeriod.d.ts +38 -0
  42. package/dist/openapi-v2/models/APIInvoiceBillingPeriod.js +40 -0
  43. package/dist/openapi-v2/models/APIProduct.d.ts +63 -0
  44. package/dist/openapi-v2/models/APIProduct.js +82 -0
  45. package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.d.ts +43 -0
  46. package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.js +49 -0
  47. package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.d.ts +43 -0
  48. package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.js +49 -0
  49. package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.d.ts +43 -0
  50. package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.js +49 -0
  51. package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.d.ts +43 -0
  52. package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.js +49 -0
  53. package/dist/openapi-v2/models/APIUpdateCustomerPayload.d.ts +45 -0
  54. package/dist/openapi-v2/models/APIUpdateCustomerPayload.js +49 -0
  55. package/dist/openapi-v2/models/APIUpdateInvoicePayload.d.ts +41 -0
  56. package/dist/openapi-v2/models/APIUpdateInvoicePayload.js +49 -0
  57. package/dist/openapi-v2/models/APIUpdateProductPayload.d.ts +39 -0
  58. package/dist/openapi-v2/models/APIUpdateProductPayload.js +49 -0
  59. package/dist/openapi-v2/models/Aggregation.d.ts +32 -0
  60. package/dist/openapi-v2/models/Aggregation.js +43 -0
  61. package/dist/openapi-v2/models/AggregationMethods.d.ts +18 -0
  62. package/dist/openapi-v2/models/AggregationMethods.js +22 -0
  63. package/dist/openapi-v2/models/Condition.d.ts +29 -0
  64. package/dist/openapi-v2/models/Condition.js +31 -0
  65. package/dist/openapi-v2/models/Criterion.d.ts +32 -0
  66. package/dist/openapi-v2/models/Criterion.js +43 -0
  67. package/dist/openapi-v2/models/CriterionOperators.d.ts +23 -0
  68. package/dist/openapi-v2/models/CriterionOperators.js +27 -0
  69. package/dist/openapi-v2/models/CriterionValue.d.ts +27 -0
  70. package/dist/openapi-v2/models/CriterionValue.js +24 -0
  71. package/dist/openapi-v2/models/Event.d.ts +54 -0
  72. package/dist/openapi-v2/models/Event.js +85 -0
  73. package/dist/openapi-v2/models/IngestEventToTheSystem201Response.d.ts +31 -0
  74. package/dist/openapi-v2/models/IngestEventToTheSystem201Response.js +43 -0
  75. package/dist/openapi-v2/models/InvoiceProductBreakdown.d.ts +36 -0
  76. package/dist/openapi-v2/models/InvoiceProductBreakdown.js +46 -0
  77. package/dist/openapi-v2/models/Login200Response.d.ts +28 -0
  78. package/dist/openapi-v2/models/Login200Response.js +31 -0
  79. package/dist/openapi-v2/models/LoginRequest.d.ts +28 -0
  80. package/dist/openapi-v2/models/LoginRequest.js +31 -0
  81. package/dist/openapi-v2/models/ObjectSerializer.d.ts +64 -0
  82. package/dist/openapi-v2/models/ObjectSerializer.js +368 -0
  83. package/dist/openapi-v2/models/Pricing.d.ts +30 -0
  84. package/dist/openapi-v2/models/Pricing.js +37 -0
  85. package/dist/openapi-v2/models/PricingTiersInner.d.ts +31 -0
  86. package/dist/openapi-v2/models/PricingTiersInner.js +49 -0
  87. package/dist/openapi-v2/models/ProductBreakdown.d.ts +29 -0
  88. package/dist/openapi-v2/models/ProductBreakdown.js +37 -0
  89. package/dist/openapi-v2/models/ProductRevision.d.ts +36 -0
  90. package/dist/openapi-v2/models/ProductRevision.js +55 -0
  91. package/dist/openapi-v2/models/QueryResultAPICustomer.d.ts +40 -0
  92. package/dist/openapi-v2/models/QueryResultAPICustomer.js +43 -0
  93. package/dist/openapi-v2/models/QueryResultAPIEvent.d.ts +40 -0
  94. package/dist/openapi-v2/models/QueryResultAPIEvent.js +43 -0
  95. package/dist/openapi-v2/models/QueryResultAPIInvoice.d.ts +40 -0
  96. package/dist/openapi-v2/models/QueryResultAPIInvoice.js +43 -0
  97. package/dist/openapi-v2/models/QueryResultAPIProduct.d.ts +40 -0
  98. package/dist/openapi-v2/models/QueryResultAPIProduct.js +43 -0
  99. package/dist/openapi-v2/models/ReviseProductPayload.d.ts +37 -0
  100. package/dist/openapi-v2/models/ReviseProductPayload.js +43 -0
  101. package/dist/openapi-v2/models/UpdateEventPayload.d.ts +33 -0
  102. package/dist/openapi-v2/models/UpdateEventPayload.js +31 -0
  103. package/dist/openapi-v2/models/all.d.ts +37 -0
  104. package/dist/openapi-v2/models/all.js +53 -0
  105. package/dist/openapi-v2/rxjsStub.d.ts +10 -0
  106. package/dist/openapi-v2/rxjsStub.js +31 -0
  107. package/dist/openapi-v2/servers.d.ts +38 -0
  108. package/dist/openapi-v2/servers.js +51 -0
  109. package/dist/openapi-v2/types/ObservableAPI.d.ts +245 -0
  110. package/dist/openapi-v2/types/ObservableAPI.js +608 -0
  111. package/dist/openapi-v2/types/PromiseAPI.d.ts +234 -0
  112. package/dist/openapi-v2/types/PromiseAPI.js +354 -0
  113. package/dist/openapi-v2/util.d.ts +15 -0
  114. package/dist/openapi-v2/util.js +42 -0
  115. package/dist/sdk/services/configuration.service.js +1 -1
  116. package/dist/sdk-v2/clients/CustomersClient.d.ts +10 -0
  117. package/dist/sdk-v2/clients/CustomersClient.js +45 -0
  118. package/dist/sdk-v2/clients/EventsClient.d.ts +9 -0
  119. package/dist/sdk-v2/clients/EventsClient.js +46 -0
  120. package/dist/sdk-v2/clients/InvoicesClient.d.ts +11 -0
  121. package/dist/sdk-v2/clients/InvoicesClient.js +50 -0
  122. package/dist/sdk-v2/clients/ProductsClient.d.ts +11 -0
  123. package/dist/sdk-v2/clients/ProductsClient.js +50 -0
  124. package/dist/sdk-v2/clients/index.d.ts +4 -0
  125. package/dist/sdk-v2/clients/index.js +20 -0
  126. package/dist/sdk-v2/index.d.ts +11 -0
  127. package/dist/sdk-v2/index.js +53 -0
  128. package/dist/sdk-v2/services/configuration.service.d.ts +21 -0
  129. package/dist/sdk-v2/services/configuration.service.js +98 -0
  130. package/dist/sdk-v2/services/index.d.ts +1 -0
  131. package/dist/sdk-v2/services/index.js +17 -0
  132. package/dist/sdk-v2/types/Customers.d.ts +1 -0
  133. package/dist/sdk-v2/types/Customers.js +2 -0
  134. package/dist/sdk-v2/types/Events.d.ts +1 -0
  135. package/dist/sdk-v2/types/Events.js +2 -0
  136. package/dist/sdk-v2/types/Invoices.d.ts +1 -0
  137. package/dist/sdk-v2/types/Invoices.js +2 -0
  138. package/dist/sdk-v2/types/Products.d.ts +1 -0
  139. package/dist/sdk-v2/types/Products.js +2 -0
  140. package/dist/sdk-v2/types/index.d.ts +6 -0
  141. package/dist/sdk-v2/types/index.js +23 -0
  142. package/dist/v2.d.ts +1 -0
  143. package/dist/v2.js +17 -0
  144. package/package.json +17 -1
  145. package/dist/openapi/types/ObjectParamAPI.d.ts +0 -845
  146. package/dist/openapi/types/ObjectParamAPI.js +0 -606
@@ -0,0 +1,24 @@
1
+ import { BaseAPIRequestFactory } from './baseapi';
2
+ import { Configuration } from '../configuration';
3
+ import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
4
+ import { Login200Response } from '../models/Login200Response';
5
+ import { LoginRequest } from '../models/LoginRequest';
6
+ /**
7
+ * no description
8
+ */
9
+ export declare class AuthenticationApiRequestFactory extends BaseAPIRequestFactory {
10
+ /**
11
+ * @param loginRequest
12
+ */
13
+ login(loginRequest: LoginRequest, _options?: Configuration): Promise<RequestContext>;
14
+ }
15
+ export declare class AuthenticationApiResponseProcessor {
16
+ /**
17
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
18
+ * to the expected objects
19
+ *
20
+ * @params response Response returned by the server for a request to login
21
+ * @throws ApiException if the response code was not in [200, 299]
22
+ */
23
+ loginWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Login200Response>>;
24
+ }
@@ -0,0 +1,79 @@
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.AuthenticationApiResponseProcessor = exports.AuthenticationApiRequestFactory = 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 AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
23
+ /**
24
+ * @param loginRequest
25
+ */
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
+ });
52
+ }
53
+ }
54
+ exports.AuthenticationApiRequestFactory = AuthenticationApiRequestFactory;
55
+ class AuthenticationApiResponseProcessor {
56
+ /**
57
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
58
+ * to the expected objects
59
+ *
60
+ * @params response Response returned by the server for a request to login
61
+ * @throws ApiException if the response code was not in [200, 299]
62
+ */
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
+ });
77
+ }
78
+ }
79
+ exports.AuthenticationApiResponseProcessor = AuthenticationApiResponseProcessor;
@@ -0,0 +1,76 @@
1
+ import { BaseAPIRequestFactory } from './baseapi';
2
+ import { Configuration } from '../configuration';
3
+ import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
4
+ import { APICreateCustomerPayload } from '../models/APICreateCustomerPayload';
5
+ import { APICustomer } from '../models/APICustomer';
6
+ import { APIQueryPayloadAPICustomer } from '../models/APIQueryPayloadAPICustomer';
7
+ import { APIUpdateCustomerPayload } from '../models/APIUpdateCustomerPayload';
8
+ import { QueryResultAPICustomer } from '../models/QueryResultAPICustomer';
9
+ /**
10
+ * no description
11
+ */
12
+ export declare class CustomersApiRequestFactory extends BaseAPIRequestFactory {
13
+ /**
14
+ * @param aPICreateCustomerPayload
15
+ */
16
+ createCustomer(aPICreateCustomerPayload: APICreateCustomerPayload, _options?: Configuration): Promise<RequestContext>;
17
+ /**
18
+ * @param id
19
+ */
20
+ deleteCustomer(id: string, _options?: Configuration): Promise<RequestContext>;
21
+ /**
22
+ * @param id
23
+ */
24
+ getCustomer(id: string, _options?: Configuration): Promise<RequestContext>;
25
+ /**
26
+ * @param aPIQueryPayloadAPICustomer
27
+ */
28
+ queryCustomers(aPIQueryPayloadAPICustomer: APIQueryPayloadAPICustomer, _options?: Configuration): Promise<RequestContext>;
29
+ /**
30
+ * @param aPIUpdateCustomerPayload
31
+ * @param id
32
+ */
33
+ updateCustomer(aPIUpdateCustomerPayload: APIUpdateCustomerPayload, id: string, _options?: Configuration): Promise<RequestContext>;
34
+ }
35
+ export declare class CustomersApiResponseProcessor {
36
+ /**
37
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
38
+ * to the expected objects
39
+ *
40
+ * @params response Response returned by the server for a request to createCustomer
41
+ * @throws ApiException if the response code was not in [200, 299]
42
+ */
43
+ createCustomerWithHttpInfo(response: ResponseContext): Promise<HttpInfo<APICustomer>>;
44
+ /**
45
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
46
+ * to the expected objects
47
+ *
48
+ * @params response Response returned by the server for a request to deleteCustomer
49
+ * @throws ApiException if the response code was not in [200, 299]
50
+ */
51
+ deleteCustomerWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void>>;
52
+ /**
53
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
54
+ * to the expected objects
55
+ *
56
+ * @params response Response returned by the server for a request to getCustomer
57
+ * @throws ApiException if the response code was not in [200, 299]
58
+ */
59
+ getCustomerWithHttpInfo(response: ResponseContext): Promise<HttpInfo<APICustomer>>;
60
+ /**
61
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
62
+ * to the expected objects
63
+ *
64
+ * @params response Response returned by the server for a request to queryCustomers
65
+ * @throws ApiException if the response code was not in [200, 299]
66
+ */
67
+ queryCustomersWithHttpInfo(response: ResponseContext): Promise<HttpInfo<QueryResultAPICustomer>>;
68
+ /**
69
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
70
+ * to the expected objects
71
+ *
72
+ * @params response Response returned by the server for a request to updateCustomer
73
+ * @throws ApiException if the response code was not in [200, 299]
74
+ */
75
+ updateCustomerWithHttpInfo(response: ResponseContext): Promise<HttpInfo<APICustomer>>;
76
+ }
@@ -0,0 +1,295 @@
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
+ * @param aPICreateCustomerPayload
25
+ */
26
+ createCustomer(aPICreateCustomerPayload, _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 'aPICreateCustomerPayload' is not null or undefined
31
+ if (aPICreateCustomerPayload === null || aPICreateCustomerPayload === undefined) {
32
+ throw new baseapi_1.RequiredError("CustomersApi", "createCustomer", "aPICreateCustomerPayload");
33
+ }
34
+ // Path Params
35
+ const localVarPath = '/customers';
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(aPICreateCustomerPayload, "APICreateCustomerPayload", ""), 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
+ });
52
+ }
53
+ /**
54
+ * @param id
55
+ */
56
+ deleteCustomer(id, _options) {
57
+ var _a, _b, _c;
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ let _config = _options || this.configuration;
60
+ // verify required parameter 'id' is not null or undefined
61
+ if (id === null || id === undefined) {
62
+ throw new baseapi_1.RequiredError("CustomersApi", "deleteCustomer", "id");
63
+ }
64
+ // Path Params
65
+ const localVarPath = '/customers/{id}'
66
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
67
+ // Make Request Context
68
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
69
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
70
+ 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);
71
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
72
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
73
+ }
74
+ return requestContext;
75
+ });
76
+ }
77
+ /**
78
+ * @param id
79
+ */
80
+ getCustomer(id, _options) {
81
+ var _a, _b, _c;
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ let _config = _options || this.configuration;
84
+ // verify required parameter 'id' is not null or undefined
85
+ if (id === null || id === undefined) {
86
+ throw new baseapi_1.RequiredError("CustomersApi", "getCustomer", "id");
87
+ }
88
+ // Path Params
89
+ const localVarPath = '/customers/{id}'
90
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
91
+ // Make Request Context
92
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
93
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
94
+ 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);
95
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
96
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
97
+ }
98
+ return requestContext;
99
+ });
100
+ }
101
+ /**
102
+ * @param aPIQueryPayloadAPICustomer
103
+ */
104
+ queryCustomers(aPIQueryPayloadAPICustomer, _options) {
105
+ var _a, _b, _c;
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ let _config = _options || this.configuration;
108
+ // verify required parameter 'aPIQueryPayloadAPICustomer' is not null or undefined
109
+ if (aPIQueryPayloadAPICustomer === null || aPIQueryPayloadAPICustomer === undefined) {
110
+ throw new baseapi_1.RequiredError("CustomersApi", "queryCustomers", "aPIQueryPayloadAPICustomer");
111
+ }
112
+ // Path Params
113
+ const localVarPath = '/customers/query';
114
+ // Make Request Context
115
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
116
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
117
+ // Body Params
118
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
119
+ "application/json"
120
+ ]);
121
+ requestContext.setHeaderParam("Content-Type", contentType);
122
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIQueryPayloadAPICustomer, "APIQueryPayloadAPICustomer", ""), contentType);
123
+ requestContext.setBody(serializedBody);
124
+ 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);
125
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
126
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
127
+ }
128
+ return requestContext;
129
+ });
130
+ }
131
+ /**
132
+ * @param aPIUpdateCustomerPayload
133
+ * @param id
134
+ */
135
+ updateCustomer(aPIUpdateCustomerPayload, id, _options) {
136
+ var _a, _b, _c;
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ let _config = _options || this.configuration;
139
+ // verify required parameter 'aPIUpdateCustomerPayload' is not null or undefined
140
+ if (aPIUpdateCustomerPayload === null || aPIUpdateCustomerPayload === undefined) {
141
+ throw new baseapi_1.RequiredError("CustomersApi", "updateCustomer", "aPIUpdateCustomerPayload");
142
+ }
143
+ // verify required parameter 'id' is not null or undefined
144
+ if (id === null || id === undefined) {
145
+ throw new baseapi_1.RequiredError("CustomersApi", "updateCustomer", "id");
146
+ }
147
+ // Path Params
148
+ const localVarPath = '/customers/{id}'
149
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
150
+ // Make Request Context
151
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
152
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
153
+ // Body Params
154
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
155
+ "application/json"
156
+ ]);
157
+ requestContext.setHeaderParam("Content-Type", contentType);
158
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIUpdateCustomerPayload, "APIUpdateCustomerPayload", ""), contentType);
159
+ requestContext.setBody(serializedBody);
160
+ 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);
161
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
162
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
163
+ }
164
+ return requestContext;
165
+ });
166
+ }
167
+ }
168
+ exports.CustomersApiRequestFactory = CustomersApiRequestFactory;
169
+ class CustomersApiResponseProcessor {
170
+ /**
171
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
172
+ * to the expected objects
173
+ *
174
+ * @params response Response returned by the server for a request to createCustomer
175
+ * @throws ApiException if the response code was not in [200, 299]
176
+ */
177
+ createCustomerWithHttpInfo(response) {
178
+ return __awaiter(this, void 0, void 0, function* () {
179
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
180
+ if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
181
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APICustomer", "");
182
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
183
+ }
184
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
185
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
186
+ }
187
+ // Work around for missing responses in specification, e.g. for petstore.yaml
188
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
189
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APICustomer", "");
190
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
191
+ }
192
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
193
+ });
194
+ }
195
+ /**
196
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
197
+ * to the expected objects
198
+ *
199
+ * @params response Response returned by the server for a request to deleteCustomer
200
+ * @throws ApiException if the response code was not in [200, 299]
201
+ */
202
+ deleteCustomerWithHttpInfo(response) {
203
+ return __awaiter(this, void 0, void 0, function* () {
204
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
205
+ if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
206
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
207
+ }
208
+ // Work around for missing responses in specification, e.g. for petstore.yaml
209
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
210
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
211
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
212
+ }
213
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
214
+ });
215
+ }
216
+ /**
217
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
218
+ * to the expected objects
219
+ *
220
+ * @params response Response returned by the server for a request to getCustomer
221
+ * @throws ApiException if the response code was not in [200, 299]
222
+ */
223
+ getCustomerWithHttpInfo(response) {
224
+ return __awaiter(this, void 0, void 0, function* () {
225
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
226
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
227
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APICustomer", "");
228
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
229
+ }
230
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
231
+ throw new exception_1.ApiException(response.httpStatusCode, "Customer not found", undefined, response.headers);
232
+ }
233
+ // Work around for missing responses in specification, e.g. for petstore.yaml
234
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
235
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APICustomer", "");
236
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
237
+ }
238
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
239
+ });
240
+ }
241
+ /**
242
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
243
+ * to the expected objects
244
+ *
245
+ * @params response Response returned by the server for a request to queryCustomers
246
+ * @throws ApiException if the response code was not in [200, 299]
247
+ */
248
+ queryCustomersWithHttpInfo(response) {
249
+ return __awaiter(this, void 0, void 0, function* () {
250
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
251
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
252
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "QueryResultAPICustomer", "");
253
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
254
+ }
255
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
256
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid query", undefined, response.headers);
257
+ }
258
+ // Work around for missing responses in specification, e.g. for petstore.yaml
259
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
260
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "QueryResultAPICustomer", "");
261
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
262
+ }
263
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
264
+ });
265
+ }
266
+ /**
267
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
268
+ * to the expected objects
269
+ *
270
+ * @params response Response returned by the server for a request to updateCustomer
271
+ * @throws ApiException if the response code was not in [200, 299]
272
+ */
273
+ updateCustomerWithHttpInfo(response) {
274
+ return __awaiter(this, void 0, void 0, function* () {
275
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
276
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
277
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APICustomer", "");
278
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
279
+ }
280
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
281
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
282
+ }
283
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
284
+ throw new exception_1.ApiException(response.httpStatusCode, "Customer not found", undefined, response.headers);
285
+ }
286
+ // Work around for missing responses in specification, e.g. for petstore.yaml
287
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
288
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APICustomer", "");
289
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
290
+ }
291
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
292
+ });
293
+ }
294
+ }
295
+ exports.CustomersApiResponseProcessor = CustomersApiResponseProcessor;
@@ -0,0 +1,63 @@
1
+ import { BaseAPIRequestFactory } from './baseapi';
2
+ import { Configuration } from '../configuration';
3
+ import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
4
+ import { APIEvent } from '../models/APIEvent';
5
+ import { APIIngestEventPayload } from '../models/APIIngestEventPayload';
6
+ import { APIQueryPayloadAPIEvent } from '../models/APIQueryPayloadAPIEvent';
7
+ import { IngestEventToTheSystem201Response } from '../models/IngestEventToTheSystem201Response';
8
+ import { QueryResultAPIEvent } from '../models/QueryResultAPIEvent';
9
+ /**
10
+ * no description
11
+ */
12
+ export declare class EventsApiRequestFactory extends BaseAPIRequestFactory {
13
+ /**
14
+ * @param id
15
+ */
16
+ deleteEvent(id: string, _options?: Configuration): Promise<RequestContext>;
17
+ /**
18
+ * @param id
19
+ */
20
+ getEvent(id: string, _options?: Configuration): Promise<RequestContext>;
21
+ /**
22
+ * @param aPIIngestEventPayload
23
+ */
24
+ ingestEventToTheSystem(aPIIngestEventPayload: Array<APIIngestEventPayload>, _options?: Configuration): Promise<RequestContext>;
25
+ /**
26
+ * @param aPIQueryPayloadAPIEvent
27
+ */
28
+ queryEvents(aPIQueryPayloadAPIEvent: APIQueryPayloadAPIEvent, _options?: Configuration): Promise<RequestContext>;
29
+ }
30
+ export declare class EventsApiResponseProcessor {
31
+ /**
32
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
33
+ * to the expected objects
34
+ *
35
+ * @params response Response returned by the server for a request to deleteEvent
36
+ * @throws ApiException if the response code was not in [200, 299]
37
+ */
38
+ deleteEventWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void>>;
39
+ /**
40
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
41
+ * to the expected objects
42
+ *
43
+ * @params response Response returned by the server for a request to getEvent
44
+ * @throws ApiException if the response code was not in [200, 299]
45
+ */
46
+ getEventWithHttpInfo(response: ResponseContext): Promise<HttpInfo<APIEvent>>;
47
+ /**
48
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
49
+ * to the expected objects
50
+ *
51
+ * @params response Response returned by the server for a request to ingestEventToTheSystem
52
+ * @throws ApiException if the response code was not in [200, 299]
53
+ */
54
+ ingestEventToTheSystemWithHttpInfo(response: ResponseContext): Promise<HttpInfo<IngestEventToTheSystem201Response>>;
55
+ /**
56
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
57
+ * to the expected objects
58
+ *
59
+ * @params response Response returned by the server for a request to queryEvents
60
+ * @throws ApiException if the response code was not in [200, 299]
61
+ */
62
+ queryEventsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<QueryResultAPIEvent>>;
63
+ }