vayu-ts 0.1.4 → 0.2.3

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 (158) 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 +92 -0
  4. package/dist/openapi-v2/apis/CustomersApi.js +362 -0
  5. package/dist/openapi-v2/apis/EntitlementsApi.d.ts +49 -0
  6. package/dist/openapi-v2/apis/EntitlementsApi.js +176 -0
  7. package/dist/openapi-v2/apis/EventsApi.d.ts +63 -0
  8. package/dist/openapi-v2/apis/EventsApi.js +231 -0
  9. package/dist/openapi-v2/apis/InvoicesApi.d.ts +88 -0
  10. package/dist/openapi-v2/apis/InvoicesApi.js +344 -0
  11. package/dist/openapi-v2/apis/ProductsApi.d.ts +76 -0
  12. package/dist/openapi-v2/apis/ProductsApi.js +295 -0
  13. package/dist/openapi-v2/apis/baseapi.d.ts +33 -0
  14. package/dist/openapi-v2/apis/baseapi.js +41 -0
  15. package/dist/openapi-v2/apis/exception.d.ts +19 -0
  16. package/dist/openapi-v2/apis/exception.js +22 -0
  17. package/dist/openapi-v2/auth/auth.d.ts +38 -0
  18. package/dist/openapi-v2/auth/auth.js +16 -0
  19. package/dist/openapi-v2/configuration.d.ts +63 -0
  20. package/dist/openapi-v2/configuration.js +34 -0
  21. package/dist/openapi-v2/http/http.d.ts +142 -0
  22. package/dist/openapi-v2/http/http.js +229 -0
  23. package/dist/openapi-v2/http/isomorphic-fetch.d.ts +5 -0
  24. package/dist/openapi-v2/http/isomorphic-fetch.js +33 -0
  25. package/dist/openapi-v2/index.d.ts +10 -0
  26. package/dist/openapi-v2/index.js +33 -0
  27. package/dist/openapi-v2/middleware.d.ts +54 -0
  28. package/dist/openapi-v2/middleware.js +16 -0
  29. package/dist/openapi-v2/models/APICreateCustomerPayload.d.ts +45 -0
  30. package/dist/openapi-v2/models/APICreateCustomerPayload.js +49 -0
  31. package/dist/openapi-v2/models/APICreateInvoicePayload.d.ts +41 -0
  32. package/dist/openapi-v2/models/APICreateInvoicePayload.js +49 -0
  33. package/dist/openapi-v2/models/APICreateProductPayload.d.ts +43 -0
  34. package/dist/openapi-v2/models/APICreateProductPayload.js +55 -0
  35. package/dist/openapi-v2/models/APICustomer.d.ts +64 -0
  36. package/dist/openapi-v2/models/APICustomer.js +76 -0
  37. package/dist/openapi-v2/models/APIEntitlement.d.ts +56 -0
  38. package/dist/openapi-v2/models/APIEntitlement.js +79 -0
  39. package/dist/openapi-v2/models/APIEvent.d.ts +72 -0
  40. package/dist/openapi-v2/models/APIEvent.js +88 -0
  41. package/dist/openapi-v2/models/APIIngestEventPayload.d.ts +49 -0
  42. package/dist/openapi-v2/models/APIIngestEventPayload.js +55 -0
  43. package/dist/openapi-v2/models/APIInvoice.d.ts +71 -0
  44. package/dist/openapi-v2/models/APIInvoice.js +88 -0
  45. package/dist/openapi-v2/models/APIInvoiceBillingPeriod.d.ts +38 -0
  46. package/dist/openapi-v2/models/APIInvoiceBillingPeriod.js +40 -0
  47. package/dist/openapi-v2/models/APIProduct.d.ts +62 -0
  48. package/dist/openapi-v2/models/APIProduct.js +82 -0
  49. package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.d.ts +43 -0
  50. package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.js +49 -0
  51. package/dist/openapi-v2/models/APIQueryPayloadAPIEntitlement.d.ts +43 -0
  52. package/dist/openapi-v2/models/APIQueryPayloadAPIEntitlement.js +49 -0
  53. package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.d.ts +43 -0
  54. package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.js +49 -0
  55. package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.d.ts +43 -0
  56. package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.js +49 -0
  57. package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.d.ts +43 -0
  58. package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.js +49 -0
  59. package/dist/openapi-v2/models/APIUpdateCustomerPayload.d.ts +45 -0
  60. package/dist/openapi-v2/models/APIUpdateCustomerPayload.js +49 -0
  61. package/dist/openapi-v2/models/APIUpdateInvoicePayload.d.ts +41 -0
  62. package/dist/openapi-v2/models/APIUpdateInvoicePayload.js +49 -0
  63. package/dist/openapi-v2/models/APIUpdateProductPayload.d.ts +43 -0
  64. package/dist/openapi-v2/models/APIUpdateProductPayload.js +55 -0
  65. package/dist/openapi-v2/models/Aggregation.d.ts +32 -0
  66. package/dist/openapi-v2/models/Aggregation.js +43 -0
  67. package/dist/openapi-v2/models/AggregationMethods.d.ts +18 -0
  68. package/dist/openapi-v2/models/AggregationMethods.js +22 -0
  69. package/dist/openapi-v2/models/Condition.d.ts +29 -0
  70. package/dist/openapi-v2/models/Condition.js +31 -0
  71. package/dist/openapi-v2/models/Criterion.d.ts +32 -0
  72. package/dist/openapi-v2/models/Criterion.js +43 -0
  73. package/dist/openapi-v2/models/CriterionOperators.d.ts +23 -0
  74. package/dist/openapi-v2/models/CriterionOperators.js +27 -0
  75. package/dist/openapi-v2/models/CriterionValue.d.ts +27 -0
  76. package/dist/openapi-v2/models/CriterionValue.js +24 -0
  77. package/dist/openapi-v2/models/EntitlementRevision.d.ts +36 -0
  78. package/dist/openapi-v2/models/EntitlementRevision.js +55 -0
  79. package/dist/openapi-v2/models/Event.d.ts +54 -0
  80. package/dist/openapi-v2/models/Event.js +85 -0
  81. package/dist/openapi-v2/models/IngestEventToTheSystem201Response.d.ts +31 -0
  82. package/dist/openapi-v2/models/IngestEventToTheSystem201Response.js +43 -0
  83. package/dist/openapi-v2/models/InvoiceProductBreakdown.d.ts +36 -0
  84. package/dist/openapi-v2/models/InvoiceProductBreakdown.js +46 -0
  85. package/dist/openapi-v2/models/Login200Response.d.ts +28 -0
  86. package/dist/openapi-v2/models/Login200Response.js +31 -0
  87. package/dist/openapi-v2/models/LoginRequest.d.ts +28 -0
  88. package/dist/openapi-v2/models/LoginRequest.js +31 -0
  89. package/dist/openapi-v2/models/ObjectSerializer.d.ts +67 -0
  90. package/dist/openapi-v2/models/ObjectSerializer.js +377 -0
  91. package/dist/openapi-v2/models/Pricing.d.ts +30 -0
  92. package/dist/openapi-v2/models/Pricing.js +37 -0
  93. package/dist/openapi-v2/models/PricingTiersInner.d.ts +31 -0
  94. package/dist/openapi-v2/models/PricingTiersInner.js +49 -0
  95. package/dist/openapi-v2/models/ProductBreakdown.d.ts +29 -0
  96. package/dist/openapi-v2/models/ProductBreakdown.js +37 -0
  97. package/dist/openapi-v2/models/QueryResultAPICustomer.d.ts +40 -0
  98. package/dist/openapi-v2/models/QueryResultAPICustomer.js +43 -0
  99. package/dist/openapi-v2/models/QueryResultAPIEntitlement.d.ts +40 -0
  100. package/dist/openapi-v2/models/QueryResultAPIEntitlement.js +43 -0
  101. package/dist/openapi-v2/models/QueryResultAPIEvent.d.ts +40 -0
  102. package/dist/openapi-v2/models/QueryResultAPIEvent.js +43 -0
  103. package/dist/openapi-v2/models/QueryResultAPIInvoice.d.ts +40 -0
  104. package/dist/openapi-v2/models/QueryResultAPIInvoice.js +43 -0
  105. package/dist/openapi-v2/models/QueryResultAPIProduct.d.ts +40 -0
  106. package/dist/openapi-v2/models/QueryResultAPIProduct.js +43 -0
  107. package/dist/openapi-v2/models/ReviseEntitlementPayload.d.ts +37 -0
  108. package/dist/openapi-v2/models/ReviseEntitlementPayload.js +43 -0
  109. package/dist/openapi-v2/models/UpdateEventPayload.d.ts +33 -0
  110. package/dist/openapi-v2/models/UpdateEventPayload.js +31 -0
  111. package/dist/openapi-v2/models/all.d.ts +40 -0
  112. package/dist/openapi-v2/models/all.js +56 -0
  113. package/dist/openapi-v2/rxjsStub.d.ts +10 -0
  114. package/dist/openapi-v2/rxjsStub.js +31 -0
  115. package/dist/openapi-v2/servers.d.ts +38 -0
  116. package/dist/openapi-v2/servers.js +51 -0
  117. package/dist/openapi-v2/types/ObservableAPI.d.ts +281 -0
  118. package/dist/openapi-v2/types/ObservableAPI.js +694 -0
  119. package/dist/openapi-v2/types/PromiseAPI.d.ts +268 -0
  120. package/dist/openapi-v2/types/PromiseAPI.js +405 -0
  121. package/dist/openapi-v2/util.d.ts +15 -0
  122. package/dist/openapi-v2/util.js +42 -0
  123. package/dist/sdk/services/configuration.service.js +1 -1
  124. package/dist/sdk-v2/clients/CustomersClient.d.ts +11 -0
  125. package/dist/sdk-v2/clients/CustomersClient.js +50 -0
  126. package/dist/sdk-v2/clients/EntitlementsClient.d.ts +8 -0
  127. package/dist/sdk-v2/clients/EntitlementsClient.js +35 -0
  128. package/dist/sdk-v2/clients/EventsClient.d.ts +9 -0
  129. package/dist/sdk-v2/clients/EventsClient.js +40 -0
  130. package/dist/sdk-v2/clients/InvoicesClient.d.ts +11 -0
  131. package/dist/sdk-v2/clients/InvoicesClient.js +50 -0
  132. package/dist/sdk-v2/clients/ProductsClient.d.ts +10 -0
  133. package/dist/sdk-v2/clients/ProductsClient.js +45 -0
  134. package/dist/sdk-v2/clients/index.d.ts +4 -0
  135. package/dist/sdk-v2/clients/index.js +20 -0
  136. package/dist/sdk-v2/index.d.ts +11 -0
  137. package/dist/sdk-v2/index.js +53 -0
  138. package/dist/sdk-v2/services/configuration.service.d.ts +21 -0
  139. package/dist/sdk-v2/services/configuration.service.js +98 -0
  140. package/dist/sdk-v2/services/index.d.ts +1 -0
  141. package/dist/sdk-v2/services/index.js +17 -0
  142. package/dist/sdk-v2/types/Customers.d.ts +1 -0
  143. package/dist/sdk-v2/types/Customers.js +2 -0
  144. package/dist/sdk-v2/types/Entitlements.d.ts +1 -0
  145. package/dist/sdk-v2/types/Entitlements.js +2 -0
  146. package/dist/sdk-v2/types/Events.d.ts +1 -0
  147. package/dist/sdk-v2/types/Events.js +2 -0
  148. package/dist/sdk-v2/types/Invoices.d.ts +1 -0
  149. package/dist/sdk-v2/types/Invoices.js +2 -0
  150. package/dist/sdk-v2/types/Products.d.ts +1 -0
  151. package/dist/sdk-v2/types/Products.js +2 -0
  152. package/dist/sdk-v2/types/index.d.ts +6 -0
  153. package/dist/sdk-v2/types/index.js +24 -0
  154. package/dist/v2.d.ts +1 -0
  155. package/dist/v2.js +17 -0
  156. package/package.json +17 -1
  157. package/dist/openapi/types/ObjectParamAPI.d.ts +0 -845
  158. package/dist/openapi/types/ObjectParamAPI.js +0 -606
@@ -0,0 +1,176 @@
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.EntitlementsApiResponseProcessor = exports.EntitlementsApiRequestFactory = 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 EntitlementsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
23
+ /**
24
+ * @param id
25
+ */
26
+ deleteEntitlement(id, _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 'id' is not null or undefined
31
+ if (id === null || id === undefined) {
32
+ throw new baseapi_1.RequiredError("EntitlementsApi", "deleteEntitlement", "id");
33
+ }
34
+ // Path Params
35
+ const localVarPath = '/entitlements/{id}'
36
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
37
+ // Make Request Context
38
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
39
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
40
+ 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);
41
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
42
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
43
+ }
44
+ return requestContext;
45
+ });
46
+ }
47
+ /**
48
+ * @param id
49
+ */
50
+ getEntitlement(id, _options) {
51
+ var _a, _b, _c;
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ let _config = _options || this.configuration;
54
+ // verify required parameter 'id' is not null or undefined
55
+ if (id === null || id === undefined) {
56
+ throw new baseapi_1.RequiredError("EntitlementsApi", "getEntitlement", "id");
57
+ }
58
+ // Path Params
59
+ const localVarPath = '/entitlements/{id}'
60
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
61
+ // Make Request Context
62
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
63
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
64
+ 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);
65
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
66
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
67
+ }
68
+ return requestContext;
69
+ });
70
+ }
71
+ /**
72
+ * @param aPIQueryPayloadAPIEntitlement
73
+ */
74
+ queryEntitlements(aPIQueryPayloadAPIEntitlement, _options) {
75
+ var _a, _b, _c;
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ let _config = _options || this.configuration;
78
+ // verify required parameter 'aPIQueryPayloadAPIEntitlement' is not null or undefined
79
+ if (aPIQueryPayloadAPIEntitlement === null || aPIQueryPayloadAPIEntitlement === undefined) {
80
+ throw new baseapi_1.RequiredError("EntitlementsApi", "queryEntitlements", "aPIQueryPayloadAPIEntitlement");
81
+ }
82
+ // Path Params
83
+ const localVarPath = '/entitlements/query';
84
+ // Make Request Context
85
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
86
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
87
+ // Body Params
88
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
89
+ "application/json"
90
+ ]);
91
+ requestContext.setHeaderParam("Content-Type", contentType);
92
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIQueryPayloadAPIEntitlement, "APIQueryPayloadAPIEntitlement", ""), contentType);
93
+ requestContext.setBody(serializedBody);
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
+ exports.EntitlementsApiRequestFactory = EntitlementsApiRequestFactory;
103
+ class EntitlementsApiResponseProcessor {
104
+ /**
105
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
106
+ * to the expected objects
107
+ *
108
+ * @params response Response returned by the server for a request to deleteEntitlement
109
+ * @throws ApiException if the response code was not in [200, 299]
110
+ */
111
+ deleteEntitlementWithHttpInfo(response) {
112
+ return __awaiter(this, void 0, void 0, function* () {
113
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
114
+ if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
115
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
116
+ }
117
+ // Work around for missing responses in specification, e.g. for petstore.yaml
118
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
119
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
120
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
121
+ }
122
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
123
+ });
124
+ }
125
+ /**
126
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
127
+ * to the expected objects
128
+ *
129
+ * @params response Response returned by the server for a request to getEntitlement
130
+ * @throws ApiException if the response code was not in [200, 299]
131
+ */
132
+ getEntitlementWithHttpInfo(response) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
135
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
136
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIEntitlement", "");
137
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
138
+ }
139
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
140
+ throw new exception_1.ApiException(response.httpStatusCode, "Entitlement not found", undefined, response.headers);
141
+ }
142
+ // Work around for missing responses in specification, e.g. for petstore.yaml
143
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
144
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIEntitlement", "");
145
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
146
+ }
147
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
148
+ });
149
+ }
150
+ /**
151
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
152
+ * to the expected objects
153
+ *
154
+ * @params response Response returned by the server for a request to queryEntitlements
155
+ * @throws ApiException if the response code was not in [200, 299]
156
+ */
157
+ queryEntitlementsWithHttpInfo(response) {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
160
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
161
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "QueryResultAPIEntitlement", "");
162
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
163
+ }
164
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
165
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid query", undefined, response.headers);
166
+ }
167
+ // Work around for missing responses in specification, e.g. for petstore.yaml
168
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
169
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "QueryResultAPIEntitlement", "");
170
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
171
+ }
172
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
173
+ });
174
+ }
175
+ }
176
+ exports.EntitlementsApiResponseProcessor = EntitlementsApiResponseProcessor;
@@ -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
+ }
@@ -0,0 +1,231 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.EventsApiResponseProcessor = exports.EventsApiRequestFactory = void 0;
13
+ // TODO: better import syntax?
14
+ const baseapi_1 = require("./baseapi");
15
+ const http_1 = require("../http/http");
16
+ const ObjectSerializer_1 = require("../models/ObjectSerializer");
17
+ const exception_1 = require("./exception");
18
+ const util_1 = require("../util");
19
+ /**
20
+ * no description
21
+ */
22
+ class EventsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
23
+ /**
24
+ * @param id
25
+ */
26
+ deleteEvent(id, _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 'id' is not null or undefined
31
+ if (id === null || id === undefined) {
32
+ throw new baseapi_1.RequiredError("EventsApi", "deleteEvent", "id");
33
+ }
34
+ // Path Params
35
+ const localVarPath = '/events/{id}'
36
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
37
+ // Make Request Context
38
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
39
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
40
+ 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);
41
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
42
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
43
+ }
44
+ return requestContext;
45
+ });
46
+ }
47
+ /**
48
+ * @param id
49
+ */
50
+ getEvent(id, _options) {
51
+ var _a, _b, _c;
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ let _config = _options || this.configuration;
54
+ // verify required parameter 'id' is not null or undefined
55
+ if (id === null || id === undefined) {
56
+ throw new baseapi_1.RequiredError("EventsApi", "getEvent", "id");
57
+ }
58
+ // Path Params
59
+ const localVarPath = '/events/{id}'
60
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
61
+ // Make Request Context
62
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
63
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
64
+ 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);
65
+ if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
66
+ yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
67
+ }
68
+ return requestContext;
69
+ });
70
+ }
71
+ /**
72
+ * @param aPIIngestEventPayload
73
+ */
74
+ ingestEventToTheSystem(aPIIngestEventPayload, _options) {
75
+ var _a, _b, _c;
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ let _config = _options || this.configuration;
78
+ // verify required parameter 'aPIIngestEventPayload' is not null or undefined
79
+ if (aPIIngestEventPayload === null || aPIIngestEventPayload === undefined) {
80
+ throw new baseapi_1.RequiredError("EventsApi", "ingestEventToTheSystem", "aPIIngestEventPayload");
81
+ }
82
+ // Path Params
83
+ const localVarPath = '/events/ingest';
84
+ // Make Request Context
85
+ const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
86
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
87
+ // Body Params
88
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
89
+ "application/json"
90
+ ]);
91
+ requestContext.setHeaderParam("Content-Type", contentType);
92
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIIngestEventPayload, "Array<APIIngestEventPayload>", ""), contentType);
93
+ requestContext.setBody(serializedBody);
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 aPIQueryPayloadAPIEvent
103
+ */
104
+ queryEvents(aPIQueryPayloadAPIEvent, _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 'aPIQueryPayloadAPIEvent' is not null or undefined
109
+ if (aPIQueryPayloadAPIEvent === null || aPIQueryPayloadAPIEvent === undefined) {
110
+ throw new baseapi_1.RequiredError("EventsApi", "queryEvents", "aPIQueryPayloadAPIEvent");
111
+ }
112
+ // Path Params
113
+ const localVarPath = '/events/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(aPIQueryPayloadAPIEvent, "APIQueryPayloadAPIEvent", ""), 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
+ exports.EventsApiRequestFactory = EventsApiRequestFactory;
133
+ class EventsApiResponseProcessor {
134
+ /**
135
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
136
+ * to the expected objects
137
+ *
138
+ * @params response Response returned by the server for a request to deleteEvent
139
+ * @throws ApiException if the response code was not in [200, 299]
140
+ */
141
+ deleteEventWithHttpInfo(response) {
142
+ return __awaiter(this, void 0, void 0, function* () {
143
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
144
+ if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
145
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
146
+ }
147
+ // Work around for missing responses in specification, e.g. for petstore.yaml
148
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
149
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
150
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
151
+ }
152
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
153
+ });
154
+ }
155
+ /**
156
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
157
+ * to the expected objects
158
+ *
159
+ * @params response Response returned by the server for a request to getEvent
160
+ * @throws ApiException if the response code was not in [200, 299]
161
+ */
162
+ getEventWithHttpInfo(response) {
163
+ return __awaiter(this, void 0, void 0, function* () {
164
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
165
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
166
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIEvent", "");
167
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
168
+ }
169
+ if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
170
+ throw new exception_1.ApiException(response.httpStatusCode, "Event not found", undefined, response.headers);
171
+ }
172
+ // Work around for missing responses in specification, e.g. for petstore.yaml
173
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
174
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIEvent", "");
175
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
176
+ }
177
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
178
+ });
179
+ }
180
+ /**
181
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
182
+ * to the expected objects
183
+ *
184
+ * @params response Response returned by the server for a request to ingestEventToTheSystem
185
+ * @throws ApiException if the response code was not in [200, 299]
186
+ */
187
+ ingestEventToTheSystemWithHttpInfo(response) {
188
+ return __awaiter(this, void 0, void 0, function* () {
189
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
190
+ if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
191
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "IngestEventToTheSystem201Response", "");
192
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
193
+ }
194
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
195
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
196
+ }
197
+ // Work around for missing responses in specification, e.g. for petstore.yaml
198
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
199
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "IngestEventToTheSystem201Response", "");
200
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
201
+ }
202
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
203
+ });
204
+ }
205
+ /**
206
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
207
+ * to the expected objects
208
+ *
209
+ * @params response Response returned by the server for a request to queryEvents
210
+ * @throws ApiException if the response code was not in [200, 299]
211
+ */
212
+ queryEventsWithHttpInfo(response) {
213
+ return __awaiter(this, void 0, void 0, function* () {
214
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
215
+ if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
216
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "QueryResultAPIEvent", "");
217
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
218
+ }
219
+ if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
220
+ throw new exception_1.ApiException(response.httpStatusCode, "Invalid query", undefined, response.headers);
221
+ }
222
+ // Work around for missing responses in specification, e.g. for petstore.yaml
223
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
224
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "QueryResultAPIEvent", "");
225
+ return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
226
+ }
227
+ throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
228
+ });
229
+ }
230
+ }
231
+ exports.EventsApiResponseProcessor = EventsApiResponseProcessor;
@@ -0,0 +1,88 @@
1
+ import { BaseAPIRequestFactory } from './baseapi';
2
+ import { Configuration } from '../configuration';
3
+ import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
4
+ import { APICreateInvoicePayload } from '../models/APICreateInvoicePayload';
5
+ import { APIInvoice } from '../models/APIInvoice';
6
+ import { APIQueryPayloadAPIInvoice } from '../models/APIQueryPayloadAPIInvoice';
7
+ import { APIUpdateInvoicePayload } from '../models/APIUpdateInvoicePayload';
8
+ import { QueryResultAPIInvoice } from '../models/QueryResultAPIInvoice';
9
+ /**
10
+ * no description
11
+ */
12
+ export declare class InvoicesApiRequestFactory extends BaseAPIRequestFactory {
13
+ /**
14
+ * @param id
15
+ */
16
+ calculateInvoice(id: string, _options?: Configuration): Promise<RequestContext>;
17
+ /**
18
+ * @param aPICreateInvoicePayload
19
+ */
20
+ createInvoice(aPICreateInvoicePayload: APICreateInvoicePayload, _options?: Configuration): Promise<RequestContext>;
21
+ /**
22
+ * @param id
23
+ */
24
+ deleteInvoice(id: string, _options?: Configuration): Promise<RequestContext>;
25
+ /**
26
+ * @param id
27
+ */
28
+ getInvoice(id: string, _options?: Configuration): Promise<RequestContext>;
29
+ /**
30
+ * @param aPIQueryPayloadAPIInvoice
31
+ */
32
+ queryInvoices(aPIQueryPayloadAPIInvoice: APIQueryPayloadAPIInvoice, _options?: Configuration): Promise<RequestContext>;
33
+ /**
34
+ * @param aPIUpdateInvoicePayload
35
+ * @param id
36
+ */
37
+ updateInvoice(aPIUpdateInvoicePayload: APIUpdateInvoicePayload, id: string, _options?: Configuration): Promise<RequestContext>;
38
+ }
39
+ export declare class InvoicesApiResponseProcessor {
40
+ /**
41
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
42
+ * to the expected objects
43
+ *
44
+ * @params response Response returned by the server for a request to calculateInvoice
45
+ * @throws ApiException if the response code was not in [200, 299]
46
+ */
47
+ calculateInvoiceWithHttpInfo(response: ResponseContext): Promise<HttpInfo<APIInvoice>>;
48
+ /**
49
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
50
+ * to the expected objects
51
+ *
52
+ * @params response Response returned by the server for a request to createInvoice
53
+ * @throws ApiException if the response code was not in [200, 299]
54
+ */
55
+ createInvoiceWithHttpInfo(response: ResponseContext): Promise<HttpInfo<APIInvoice>>;
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 deleteInvoice
61
+ * @throws ApiException if the response code was not in [200, 299]
62
+ */
63
+ deleteInvoiceWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void>>;
64
+ /**
65
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
66
+ * to the expected objects
67
+ *
68
+ * @params response Response returned by the server for a request to getInvoice
69
+ * @throws ApiException if the response code was not in [200, 299]
70
+ */
71
+ getInvoiceWithHttpInfo(response: ResponseContext): Promise<HttpInfo<APIInvoice>>;
72
+ /**
73
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
74
+ * to the expected objects
75
+ *
76
+ * @params response Response returned by the server for a request to queryInvoices
77
+ * @throws ApiException if the response code was not in [200, 299]
78
+ */
79
+ queryInvoicesWithHttpInfo(response: ResponseContext): Promise<HttpInfo<QueryResultAPIInvoice>>;
80
+ /**
81
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
82
+ * to the expected objects
83
+ *
84
+ * @params response Response returned by the server for a request to updateInvoice
85
+ * @throws ApiException if the response code was not in [200, 299]
86
+ */
87
+ updateInvoiceWithHttpInfo(response: ResponseContext): Promise<HttpInfo<APIInvoice>>;
88
+ }