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.
- package/dist/openapi-v2/apis/AuthenticationApi.d.ts +24 -0
- package/dist/openapi-v2/apis/AuthenticationApi.js +79 -0
- package/dist/openapi-v2/apis/CustomersApi.d.ts +76 -0
- package/dist/openapi-v2/apis/CustomersApi.js +295 -0
- package/dist/openapi-v2/apis/EventsApi.d.ts +63 -0
- package/dist/openapi-v2/apis/EventsApi.js +231 -0
- package/dist/openapi-v2/apis/InvoicesApi.d.ts +88 -0
- package/dist/openapi-v2/apis/InvoicesApi.js +344 -0
- package/dist/openapi-v2/apis/ProductsApi.d.ts +90 -0
- package/dist/openapi-v2/apis/ProductsApi.js +359 -0
- package/dist/openapi-v2/apis/baseapi.d.ts +33 -0
- package/dist/openapi-v2/apis/baseapi.js +41 -0
- package/dist/openapi-v2/apis/exception.d.ts +19 -0
- package/dist/openapi-v2/apis/exception.js +22 -0
- package/dist/openapi-v2/auth/auth.d.ts +38 -0
- package/dist/openapi-v2/auth/auth.js +16 -0
- package/dist/openapi-v2/configuration.d.ts +63 -0
- package/dist/openapi-v2/configuration.js +34 -0
- package/dist/openapi-v2/http/http.d.ts +142 -0
- package/dist/openapi-v2/http/http.js +229 -0
- package/dist/openapi-v2/http/isomorphic-fetch.d.ts +5 -0
- package/dist/openapi-v2/http/isomorphic-fetch.js +33 -0
- package/dist/openapi-v2/index.d.ts +10 -0
- package/dist/openapi-v2/index.js +32 -0
- package/dist/openapi-v2/middleware.d.ts +54 -0
- package/dist/openapi-v2/middleware.js +16 -0
- package/dist/openapi-v2/models/APICreateCustomerPayload.d.ts +45 -0
- package/dist/openapi-v2/models/APICreateCustomerPayload.js +49 -0
- package/dist/openapi-v2/models/APICreateInvoicePayload.d.ts +41 -0
- package/dist/openapi-v2/models/APICreateInvoicePayload.js +49 -0
- package/dist/openapi-v2/models/APICreateProductPayload.d.ts +39 -0
- package/dist/openapi-v2/models/APICreateProductPayload.js +49 -0
- package/dist/openapi-v2/models/APICustomer.d.ts +64 -0
- package/dist/openapi-v2/models/APICustomer.js +76 -0
- package/dist/openapi-v2/models/APIEvent.d.ts +72 -0
- package/dist/openapi-v2/models/APIEvent.js +88 -0
- package/dist/openapi-v2/models/APIIngestEventPayload.d.ts +49 -0
- package/dist/openapi-v2/models/APIIngestEventPayload.js +55 -0
- package/dist/openapi-v2/models/APIInvoice.d.ts +71 -0
- package/dist/openapi-v2/models/APIInvoice.js +88 -0
- package/dist/openapi-v2/models/APIInvoiceBillingPeriod.d.ts +38 -0
- package/dist/openapi-v2/models/APIInvoiceBillingPeriod.js +40 -0
- package/dist/openapi-v2/models/APIProduct.d.ts +63 -0
- package/dist/openapi-v2/models/APIProduct.js +82 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.d.ts +43 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPICustomer.js +49 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.d.ts +43 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIEvent.js +49 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.d.ts +43 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIInvoice.js +49 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.d.ts +43 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIProduct.js +49 -0
- package/dist/openapi-v2/models/APIUpdateCustomerPayload.d.ts +45 -0
- package/dist/openapi-v2/models/APIUpdateCustomerPayload.js +49 -0
- package/dist/openapi-v2/models/APIUpdateInvoicePayload.d.ts +41 -0
- package/dist/openapi-v2/models/APIUpdateInvoicePayload.js +49 -0
- package/dist/openapi-v2/models/APIUpdateProductPayload.d.ts +39 -0
- package/dist/openapi-v2/models/APIUpdateProductPayload.js +49 -0
- package/dist/openapi-v2/models/Aggregation.d.ts +32 -0
- package/dist/openapi-v2/models/Aggregation.js +43 -0
- package/dist/openapi-v2/models/AggregationMethods.d.ts +18 -0
- package/dist/openapi-v2/models/AggregationMethods.js +22 -0
- package/dist/openapi-v2/models/Condition.d.ts +29 -0
- package/dist/openapi-v2/models/Condition.js +31 -0
- package/dist/openapi-v2/models/Criterion.d.ts +32 -0
- package/dist/openapi-v2/models/Criterion.js +43 -0
- package/dist/openapi-v2/models/CriterionOperators.d.ts +23 -0
- package/dist/openapi-v2/models/CriterionOperators.js +27 -0
- package/dist/openapi-v2/models/CriterionValue.d.ts +27 -0
- package/dist/openapi-v2/models/CriterionValue.js +24 -0
- package/dist/openapi-v2/models/Event.d.ts +54 -0
- package/dist/openapi-v2/models/Event.js +85 -0
- package/dist/openapi-v2/models/IngestEventToTheSystem201Response.d.ts +31 -0
- package/dist/openapi-v2/models/IngestEventToTheSystem201Response.js +43 -0
- package/dist/openapi-v2/models/InvoiceProductBreakdown.d.ts +36 -0
- package/dist/openapi-v2/models/InvoiceProductBreakdown.js +46 -0
- package/dist/openapi-v2/models/Login200Response.d.ts +28 -0
- package/dist/openapi-v2/models/Login200Response.js +31 -0
- package/dist/openapi-v2/models/LoginRequest.d.ts +28 -0
- package/dist/openapi-v2/models/LoginRequest.js +31 -0
- package/dist/openapi-v2/models/ObjectSerializer.d.ts +64 -0
- package/dist/openapi-v2/models/ObjectSerializer.js +368 -0
- package/dist/openapi-v2/models/Pricing.d.ts +30 -0
- package/dist/openapi-v2/models/Pricing.js +37 -0
- package/dist/openapi-v2/models/PricingTiersInner.d.ts +31 -0
- package/dist/openapi-v2/models/PricingTiersInner.js +49 -0
- package/dist/openapi-v2/models/ProductBreakdown.d.ts +29 -0
- package/dist/openapi-v2/models/ProductBreakdown.js +37 -0
- package/dist/openapi-v2/models/ProductRevision.d.ts +36 -0
- package/dist/openapi-v2/models/ProductRevision.js +55 -0
- package/dist/openapi-v2/models/QueryResultAPICustomer.d.ts +40 -0
- package/dist/openapi-v2/models/QueryResultAPICustomer.js +43 -0
- package/dist/openapi-v2/models/QueryResultAPIEvent.d.ts +40 -0
- package/dist/openapi-v2/models/QueryResultAPIEvent.js +43 -0
- package/dist/openapi-v2/models/QueryResultAPIInvoice.d.ts +40 -0
- package/dist/openapi-v2/models/QueryResultAPIInvoice.js +43 -0
- package/dist/openapi-v2/models/QueryResultAPIProduct.d.ts +40 -0
- package/dist/openapi-v2/models/QueryResultAPIProduct.js +43 -0
- package/dist/openapi-v2/models/ReviseProductPayload.d.ts +37 -0
- package/dist/openapi-v2/models/ReviseProductPayload.js +43 -0
- package/dist/openapi-v2/models/UpdateEventPayload.d.ts +33 -0
- package/dist/openapi-v2/models/UpdateEventPayload.js +31 -0
- package/dist/openapi-v2/models/all.d.ts +37 -0
- package/dist/openapi-v2/models/all.js +53 -0
- package/dist/openapi-v2/rxjsStub.d.ts +10 -0
- package/dist/openapi-v2/rxjsStub.js +31 -0
- package/dist/openapi-v2/servers.d.ts +38 -0
- package/dist/openapi-v2/servers.js +51 -0
- package/dist/openapi-v2/types/ObservableAPI.d.ts +245 -0
- package/dist/openapi-v2/types/ObservableAPI.js +608 -0
- package/dist/openapi-v2/types/PromiseAPI.d.ts +234 -0
- package/dist/openapi-v2/types/PromiseAPI.js +354 -0
- package/dist/openapi-v2/util.d.ts +15 -0
- package/dist/openapi-v2/util.js +42 -0
- package/dist/sdk/services/configuration.service.js +1 -1
- package/dist/sdk-v2/clients/CustomersClient.d.ts +10 -0
- package/dist/sdk-v2/clients/CustomersClient.js +45 -0
- package/dist/sdk-v2/clients/EventsClient.d.ts +9 -0
- package/dist/sdk-v2/clients/EventsClient.js +46 -0
- package/dist/sdk-v2/clients/InvoicesClient.d.ts +11 -0
- package/dist/sdk-v2/clients/InvoicesClient.js +50 -0
- package/dist/sdk-v2/clients/ProductsClient.d.ts +11 -0
- package/dist/sdk-v2/clients/ProductsClient.js +50 -0
- package/dist/sdk-v2/clients/index.d.ts +4 -0
- package/dist/sdk-v2/clients/index.js +20 -0
- package/dist/sdk-v2/index.d.ts +11 -0
- package/dist/sdk-v2/index.js +53 -0
- package/dist/sdk-v2/services/configuration.service.d.ts +21 -0
- package/dist/sdk-v2/services/configuration.service.js +98 -0
- package/dist/sdk-v2/services/index.d.ts +1 -0
- package/dist/sdk-v2/services/index.js +17 -0
- package/dist/sdk-v2/types/Customers.d.ts +1 -0
- package/dist/sdk-v2/types/Customers.js +2 -0
- package/dist/sdk-v2/types/Events.d.ts +1 -0
- package/dist/sdk-v2/types/Events.js +2 -0
- package/dist/sdk-v2/types/Invoices.d.ts +1 -0
- package/dist/sdk-v2/types/Invoices.js +2 -0
- package/dist/sdk-v2/types/Products.d.ts +1 -0
- package/dist/sdk-v2/types/Products.js +2 -0
- package/dist/sdk-v2/types/index.d.ts +6 -0
- package/dist/sdk-v2/types/index.js +23 -0
- package/dist/v2.d.ts +1 -0
- package/dist/v2.js +17 -0
- package/package.json +17 -1
- package/dist/openapi/types/ObjectParamAPI.d.ts +0 -845
- package/dist/openapi/types/ObjectParamAPI.js +0 -606
|
@@ -0,0 +1,344 @@
|
|
|
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.InvoicesApiResponseProcessor = exports.InvoicesApiRequestFactory = 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 InvoicesApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
23
|
+
/**
|
|
24
|
+
* @param id
|
|
25
|
+
*/
|
|
26
|
+
calculateInvoice(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("InvoicesApi", "calculateInvoice", "id");
|
|
33
|
+
}
|
|
34
|
+
// Path Params
|
|
35
|
+
const localVarPath = '/invoices/{id}/calculate'
|
|
36
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
37
|
+
// Make Request Context
|
|
38
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
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 aPICreateInvoicePayload
|
|
49
|
+
*/
|
|
50
|
+
createInvoice(aPICreateInvoicePayload, _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 'aPICreateInvoicePayload' is not null or undefined
|
|
55
|
+
if (aPICreateInvoicePayload === null || aPICreateInvoicePayload === undefined) {
|
|
56
|
+
throw new baseapi_1.RequiredError("InvoicesApi", "createInvoice", "aPICreateInvoicePayload");
|
|
57
|
+
}
|
|
58
|
+
// Path Params
|
|
59
|
+
const localVarPath = '/invoices';
|
|
60
|
+
// Make Request Context
|
|
61
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
62
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
63
|
+
// Body Params
|
|
64
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
65
|
+
"application/json"
|
|
66
|
+
]);
|
|
67
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
68
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPICreateInvoicePayload, "APICreateInvoicePayload", ""), contentType);
|
|
69
|
+
requestContext.setBody(serializedBody);
|
|
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
|
+
deleteInvoice(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("InvoicesApi", "deleteInvoice", "id");
|
|
87
|
+
}
|
|
88
|
+
// Path Params
|
|
89
|
+
const localVarPath = '/invoices/{id}'
|
|
90
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
91
|
+
// Make Request Context
|
|
92
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
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 id
|
|
103
|
+
*/
|
|
104
|
+
getInvoice(id, _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 'id' is not null or undefined
|
|
109
|
+
if (id === null || id === undefined) {
|
|
110
|
+
throw new baseapi_1.RequiredError("InvoicesApi", "getInvoice", "id");
|
|
111
|
+
}
|
|
112
|
+
// Path Params
|
|
113
|
+
const localVarPath = '/invoices/{id}'
|
|
114
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
115
|
+
// Make Request Context
|
|
116
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
117
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
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
|
+
* @param aPIQueryPayloadAPIInvoice
|
|
127
|
+
*/
|
|
128
|
+
queryInvoices(aPIQueryPayloadAPIInvoice, _options) {
|
|
129
|
+
var _a, _b, _c;
|
|
130
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
+
let _config = _options || this.configuration;
|
|
132
|
+
// verify required parameter 'aPIQueryPayloadAPIInvoice' is not null or undefined
|
|
133
|
+
if (aPIQueryPayloadAPIInvoice === null || aPIQueryPayloadAPIInvoice === undefined) {
|
|
134
|
+
throw new baseapi_1.RequiredError("InvoicesApi", "queryInvoices", "aPIQueryPayloadAPIInvoice");
|
|
135
|
+
}
|
|
136
|
+
// Path Params
|
|
137
|
+
const localVarPath = '/invoices/query';
|
|
138
|
+
// Make Request Context
|
|
139
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
140
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
141
|
+
// Body Params
|
|
142
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
143
|
+
"application/json"
|
|
144
|
+
]);
|
|
145
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
146
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIQueryPayloadAPIInvoice, "APIQueryPayloadAPIInvoice", ""), contentType);
|
|
147
|
+
requestContext.setBody(serializedBody);
|
|
148
|
+
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);
|
|
149
|
+
if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
|
|
150
|
+
yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
|
|
151
|
+
}
|
|
152
|
+
return requestContext;
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* @param aPIUpdateInvoicePayload
|
|
157
|
+
* @param id
|
|
158
|
+
*/
|
|
159
|
+
updateInvoice(aPIUpdateInvoicePayload, id, _options) {
|
|
160
|
+
var _a, _b, _c;
|
|
161
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
let _config = _options || this.configuration;
|
|
163
|
+
// verify required parameter 'aPIUpdateInvoicePayload' is not null or undefined
|
|
164
|
+
if (aPIUpdateInvoicePayload === null || aPIUpdateInvoicePayload === undefined) {
|
|
165
|
+
throw new baseapi_1.RequiredError("InvoicesApi", "updateInvoice", "aPIUpdateInvoicePayload");
|
|
166
|
+
}
|
|
167
|
+
// verify required parameter 'id' is not null or undefined
|
|
168
|
+
if (id === null || id === undefined) {
|
|
169
|
+
throw new baseapi_1.RequiredError("InvoicesApi", "updateInvoice", "id");
|
|
170
|
+
}
|
|
171
|
+
// Path Params
|
|
172
|
+
const localVarPath = '/invoices/{id}'
|
|
173
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
174
|
+
// Make Request Context
|
|
175
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PUT);
|
|
176
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
177
|
+
// Body Params
|
|
178
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
179
|
+
"application/json"
|
|
180
|
+
]);
|
|
181
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
182
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(aPIUpdateInvoicePayload, "APIUpdateInvoicePayload", ""), contentType);
|
|
183
|
+
requestContext.setBody(serializedBody);
|
|
184
|
+
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);
|
|
185
|
+
if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
|
|
186
|
+
yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
|
|
187
|
+
}
|
|
188
|
+
return requestContext;
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
exports.InvoicesApiRequestFactory = InvoicesApiRequestFactory;
|
|
193
|
+
class InvoicesApiResponseProcessor {
|
|
194
|
+
/**
|
|
195
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
196
|
+
* to the expected objects
|
|
197
|
+
*
|
|
198
|
+
* @params response Response returned by the server for a request to calculateInvoice
|
|
199
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
200
|
+
*/
|
|
201
|
+
calculateInvoiceWithHttpInfo(response) {
|
|
202
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
203
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
204
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
205
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIInvoice", "");
|
|
206
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
207
|
+
}
|
|
208
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
209
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Invoice Products not found", undefined, response.headers);
|
|
210
|
+
}
|
|
211
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
212
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
213
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIInvoice", "");
|
|
214
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
215
|
+
}
|
|
216
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
221
|
+
* to the expected objects
|
|
222
|
+
*
|
|
223
|
+
* @params response Response returned by the server for a request to createInvoice
|
|
224
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
225
|
+
*/
|
|
226
|
+
createInvoiceWithHttpInfo(response) {
|
|
227
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
228
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
229
|
+
if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
|
|
230
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIInvoice", "");
|
|
231
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
232
|
+
}
|
|
233
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
234
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
|
|
235
|
+
}
|
|
236
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
237
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
238
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIInvoice", "");
|
|
239
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
240
|
+
}
|
|
241
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
246
|
+
* to the expected objects
|
|
247
|
+
*
|
|
248
|
+
* @params response Response returned by the server for a request to deleteInvoice
|
|
249
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
250
|
+
*/
|
|
251
|
+
deleteInvoiceWithHttpInfo(response) {
|
|
252
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
253
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
254
|
+
if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
|
|
255
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, undefined);
|
|
256
|
+
}
|
|
257
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
258
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
259
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
|
|
260
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
261
|
+
}
|
|
262
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
267
|
+
* to the expected objects
|
|
268
|
+
*
|
|
269
|
+
* @params response Response returned by the server for a request to getInvoice
|
|
270
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
271
|
+
*/
|
|
272
|
+
getInvoiceWithHttpInfo(response) {
|
|
273
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
274
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
275
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
276
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIInvoice", "");
|
|
277
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
278
|
+
}
|
|
279
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
280
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Invoice not found", undefined, response.headers);
|
|
281
|
+
}
|
|
282
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
283
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
284
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIInvoice", "");
|
|
285
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
286
|
+
}
|
|
287
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
292
|
+
* to the expected objects
|
|
293
|
+
*
|
|
294
|
+
* @params response Response returned by the server for a request to queryInvoices
|
|
295
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
296
|
+
*/
|
|
297
|
+
queryInvoicesWithHttpInfo(response) {
|
|
298
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
299
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
300
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
301
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "QueryResultAPIInvoice", "");
|
|
302
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
303
|
+
}
|
|
304
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
305
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Invalid query", undefined, response.headers);
|
|
306
|
+
}
|
|
307
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
308
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
309
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "QueryResultAPIInvoice", "");
|
|
310
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
311
|
+
}
|
|
312
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
317
|
+
* to the expected objects
|
|
318
|
+
*
|
|
319
|
+
* @params response Response returned by the server for a request to updateInvoice
|
|
320
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
321
|
+
*/
|
|
322
|
+
updateInvoiceWithHttpInfo(response) {
|
|
323
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
324
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
325
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
326
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIInvoice", "");
|
|
327
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
328
|
+
}
|
|
329
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
330
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
|
|
331
|
+
}
|
|
332
|
+
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
333
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Invoice not found", undefined, response.headers);
|
|
334
|
+
}
|
|
335
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
336
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
337
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIInvoice", "");
|
|
338
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
339
|
+
}
|
|
340
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
exports.InvoicesApiResponseProcessor = InvoicesApiResponseProcessor;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { BaseAPIRequestFactory } from './baseapi';
|
|
2
|
+
import { Configuration } from '../configuration';
|
|
3
|
+
import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
|
|
4
|
+
import { APICreateProductPayload } from '../models/APICreateProductPayload';
|
|
5
|
+
import { APIProduct } from '../models/APIProduct';
|
|
6
|
+
import { APIQueryPayloadAPIProduct } from '../models/APIQueryPayloadAPIProduct';
|
|
7
|
+
import { APIUpdateProductPayload } from '../models/APIUpdateProductPayload';
|
|
8
|
+
import { QueryResultAPIProduct } from '../models/QueryResultAPIProduct';
|
|
9
|
+
import { ReviseProductPayload } from '../models/ReviseProductPayload';
|
|
10
|
+
/**
|
|
11
|
+
* no description
|
|
12
|
+
*/
|
|
13
|
+
export declare class ProductsApiRequestFactory extends BaseAPIRequestFactory {
|
|
14
|
+
/**
|
|
15
|
+
* @param aPICreateProductPayload
|
|
16
|
+
*/
|
|
17
|
+
createProduct(aPICreateProductPayload: APICreateProductPayload, _options?: Configuration): Promise<RequestContext>;
|
|
18
|
+
/**
|
|
19
|
+
* @param id
|
|
20
|
+
*/
|
|
21
|
+
deleteProduct(id: string, _options?: Configuration): Promise<RequestContext>;
|
|
22
|
+
/**
|
|
23
|
+
* @param id
|
|
24
|
+
*/
|
|
25
|
+
getProduct(id: string, _options?: Configuration): Promise<RequestContext>;
|
|
26
|
+
/**
|
|
27
|
+
* @param aPIQueryPayloadAPIProduct
|
|
28
|
+
*/
|
|
29
|
+
queryProducts(aPIQueryPayloadAPIProduct: APIQueryPayloadAPIProduct, _options?: Configuration): Promise<RequestContext>;
|
|
30
|
+
/**
|
|
31
|
+
* @param body
|
|
32
|
+
* @param id
|
|
33
|
+
*/
|
|
34
|
+
reviseAProduct(body: ReviseProductPayload, id: string, _options?: Configuration): Promise<RequestContext>;
|
|
35
|
+
/**
|
|
36
|
+
* @param aPIUpdateProductPayload
|
|
37
|
+
* @param id
|
|
38
|
+
*/
|
|
39
|
+
updateProduct(aPIUpdateProductPayload: APIUpdateProductPayload, id: string, _options?: Configuration): Promise<RequestContext>;
|
|
40
|
+
}
|
|
41
|
+
export declare class ProductsApiResponseProcessor {
|
|
42
|
+
/**
|
|
43
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
44
|
+
* to the expected objects
|
|
45
|
+
*
|
|
46
|
+
* @params response Response returned by the server for a request to createProduct
|
|
47
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
48
|
+
*/
|
|
49
|
+
createProductWithHttpInfo(response: ResponseContext): Promise<HttpInfo<APIProduct>>;
|
|
50
|
+
/**
|
|
51
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
52
|
+
* to the expected objects
|
|
53
|
+
*
|
|
54
|
+
* @params response Response returned by the server for a request to deleteProduct
|
|
55
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
56
|
+
*/
|
|
57
|
+
deleteProductWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void>>;
|
|
58
|
+
/**
|
|
59
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
60
|
+
* to the expected objects
|
|
61
|
+
*
|
|
62
|
+
* @params response Response returned by the server for a request to getProduct
|
|
63
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
64
|
+
*/
|
|
65
|
+
getProductWithHttpInfo(response: ResponseContext): Promise<HttpInfo<APIProduct>>;
|
|
66
|
+
/**
|
|
67
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
68
|
+
* to the expected objects
|
|
69
|
+
*
|
|
70
|
+
* @params response Response returned by the server for a request to queryProducts
|
|
71
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
72
|
+
*/
|
|
73
|
+
queryProductsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<QueryResultAPIProduct>>;
|
|
74
|
+
/**
|
|
75
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
76
|
+
* to the expected objects
|
|
77
|
+
*
|
|
78
|
+
* @params response Response returned by the server for a request to reviseAProduct
|
|
79
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
80
|
+
*/
|
|
81
|
+
reviseAProductWithHttpInfo(response: ResponseContext): Promise<HttpInfo<APIProduct>>;
|
|
82
|
+
/**
|
|
83
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
84
|
+
* to the expected objects
|
|
85
|
+
*
|
|
86
|
+
* @params response Response returned by the server for a request to updateProduct
|
|
87
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
88
|
+
*/
|
|
89
|
+
updateProductWithHttpInfo(response: ResponseContext): Promise<HttpInfo<APIProduct>>;
|
|
90
|
+
}
|