vayu-ts 0.2.1 → 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.
- package/dist/openapi-v2/apis/CustomersApi.d.ts +16 -0
- package/dist/openapi-v2/apis/CustomersApi.js +67 -0
- package/dist/openapi-v2/apis/EntitlementsApi.d.ts +49 -0
- package/dist/openapi-v2/apis/EntitlementsApi.js +176 -0
- package/dist/openapi-v2/apis/ProductsApi.d.ts +0 -14
- package/dist/openapi-v2/apis/ProductsApi.js +0 -64
- package/dist/openapi-v2/index.d.ts +1 -1
- package/dist/openapi-v2/index.js +2 -1
- package/dist/openapi-v2/models/APICreateProductPayload.d.ts +4 -0
- package/dist/openapi-v2/models/APICreateProductPayload.js +6 -0
- package/dist/openapi-v2/models/APIEntitlement.d.ts +56 -0
- package/dist/openapi-v2/models/APIEntitlement.js +79 -0
- package/dist/openapi-v2/models/APIProduct.d.ts +4 -5
- package/dist/openapi-v2/models/APIProduct.js +6 -6
- package/dist/openapi-v2/models/APIQueryPayloadAPIEntitlement.d.ts +43 -0
- package/dist/openapi-v2/models/APIQueryPayloadAPIEntitlement.js +49 -0
- package/dist/openapi-v2/models/APIUpdateProductPayload.d.ts +4 -0
- package/dist/openapi-v2/models/APIUpdateProductPayload.js +6 -0
- package/dist/openapi-v2/models/{ProductRevision.d.ts → EntitlementRevision.d.ts} +1 -1
- package/dist/openapi-v2/models/{ProductRevision.js → EntitlementRevision.js} +6 -6
- package/dist/openapi-v2/models/ObjectSerializer.d.ts +5 -2
- package/dist/openapi-v2/models/ObjectSerializer.js +15 -6
- package/dist/openapi-v2/models/PricingTiersInner.d.ts +1 -1
- package/dist/openapi-v2/models/QueryResultAPIEntitlement.d.ts +40 -0
- package/dist/openapi-v2/models/QueryResultAPIEntitlement.js +43 -0
- package/dist/openapi-v2/models/{ReviseProductPayload.d.ts → ReviseEntitlementPayload.d.ts} +1 -1
- package/dist/openapi-v2/models/{ReviseProductPayload.js → ReviseEntitlementPayload.js} +6 -6
- package/dist/openapi-v2/models/all.d.ts +5 -2
- package/dist/openapi-v2/models/all.js +5 -2
- package/dist/openapi-v2/types/ObservableAPI.d.ts +47 -11
- package/dist/openapi-v2/types/ObservableAPI.js +114 -28
- package/dist/openapi-v2/types/PromiseAPI.d.ts +45 -11
- package/dist/openapi-v2/types/PromiseAPI.js +73 -22
- package/dist/sdk-v2/clients/CustomersClient.d.ts +2 -1
- package/dist/sdk-v2/clients/CustomersClient.js +5 -0
- package/dist/sdk-v2/clients/EntitlementsClient.d.ts +8 -0
- package/dist/sdk-v2/clients/EntitlementsClient.js +35 -0
- package/dist/sdk-v2/clients/EventsClient.js +0 -6
- package/dist/sdk-v2/clients/ProductsClient.d.ts +1 -2
- package/dist/sdk-v2/clients/ProductsClient.js +0 -5
- package/dist/sdk-v2/types/Entitlements.d.ts +1 -0
- package/dist/sdk-v2/types/Entitlements.js +2 -0
- package/dist/sdk-v2/types/Products.d.ts +1 -1
- package/dist/sdk-v2/types/index.d.ts +2 -2
- package/dist/sdk-v2/types/index.js +2 -1
- package/package.json +1 -1
|
@@ -3,9 +3,11 @@ import { Configuration } from '../configuration';
|
|
|
3
3
|
import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
|
|
4
4
|
import { APICreateCustomerPayload } from '../models/APICreateCustomerPayload';
|
|
5
5
|
import { APICustomer } from '../models/APICustomer';
|
|
6
|
+
import { APIEntitlement } from '../models/APIEntitlement';
|
|
6
7
|
import { APIQueryPayloadAPICustomer } from '../models/APIQueryPayloadAPICustomer';
|
|
7
8
|
import { APIUpdateCustomerPayload } from '../models/APIUpdateCustomerPayload';
|
|
8
9
|
import { QueryResultAPICustomer } from '../models/QueryResultAPICustomer';
|
|
10
|
+
import { ReviseEntitlementPayload } from '../models/ReviseEntitlementPayload';
|
|
9
11
|
/**
|
|
10
12
|
* no description
|
|
11
13
|
*/
|
|
@@ -26,6 +28,12 @@ export declare class CustomersApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
26
28
|
* @param aPIQueryPayloadAPICustomer
|
|
27
29
|
*/
|
|
28
30
|
queryCustomers(aPIQueryPayloadAPICustomer: APIQueryPayloadAPICustomer, _options?: Configuration): Promise<RequestContext>;
|
|
31
|
+
/**
|
|
32
|
+
* @param body
|
|
33
|
+
* @param id
|
|
34
|
+
* @param productId
|
|
35
|
+
*/
|
|
36
|
+
updateACustomersProduct(body: ReviseEntitlementPayload, id: string, productId: string, _options?: Configuration): Promise<RequestContext>;
|
|
29
37
|
/**
|
|
30
38
|
* @param aPIUpdateCustomerPayload
|
|
31
39
|
* @param id
|
|
@@ -65,6 +73,14 @@ export declare class CustomersApiResponseProcessor {
|
|
|
65
73
|
* @throws ApiException if the response code was not in [200, 299]
|
|
66
74
|
*/
|
|
67
75
|
queryCustomersWithHttpInfo(response: ResponseContext): Promise<HttpInfo<QueryResultAPICustomer>>;
|
|
76
|
+
/**
|
|
77
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
78
|
+
* to the expected objects
|
|
79
|
+
*
|
|
80
|
+
* @params response Response returned by the server for a request to updateACustomersProduct
|
|
81
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
82
|
+
*/
|
|
83
|
+
updateACustomersProductWithHttpInfo(response: ResponseContext): Promise<HttpInfo<APIEntitlement>>;
|
|
68
84
|
/**
|
|
69
85
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
70
86
|
* to the expected objects
|
|
@@ -128,6 +128,48 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
128
128
|
return requestContext;
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* @param body
|
|
133
|
+
* @param id
|
|
134
|
+
* @param productId
|
|
135
|
+
*/
|
|
136
|
+
updateACustomersProduct(body, id, productId, _options) {
|
|
137
|
+
var _a, _b, _c;
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
let _config = _options || this.configuration;
|
|
140
|
+
// verify required parameter 'body' is not null or undefined
|
|
141
|
+
if (body === null || body === undefined) {
|
|
142
|
+
throw new baseapi_1.RequiredError("CustomersApi", "updateACustomersProduct", "body");
|
|
143
|
+
}
|
|
144
|
+
// verify required parameter 'id' is not null or undefined
|
|
145
|
+
if (id === null || id === undefined) {
|
|
146
|
+
throw new baseapi_1.RequiredError("CustomersApi", "updateACustomersProduct", "id");
|
|
147
|
+
}
|
|
148
|
+
// verify required parameter 'productId' is not null or undefined
|
|
149
|
+
if (productId === null || productId === undefined) {
|
|
150
|
+
throw new baseapi_1.RequiredError("CustomersApi", "updateACustomersProduct", "productId");
|
|
151
|
+
}
|
|
152
|
+
// Path Params
|
|
153
|
+
const localVarPath = '/customers/{id}/products/{productId}'
|
|
154
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
|
|
155
|
+
.replace('{' + 'productId' + '}', encodeURIComponent(String(productId)));
|
|
156
|
+
// Make Request Context
|
|
157
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
|
|
158
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
159
|
+
// Body Params
|
|
160
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
161
|
+
"application/json"
|
|
162
|
+
]);
|
|
163
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
164
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "ReviseEntitlementPayload", ""), contentType);
|
|
165
|
+
requestContext.setBody(serializedBody);
|
|
166
|
+
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);
|
|
167
|
+
if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) {
|
|
168
|
+
yield (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext));
|
|
169
|
+
}
|
|
170
|
+
return requestContext;
|
|
171
|
+
});
|
|
172
|
+
}
|
|
131
173
|
/**
|
|
132
174
|
* @param aPIUpdateCustomerPayload
|
|
133
175
|
* @param id
|
|
@@ -263,6 +305,31 @@ class CustomersApiResponseProcessor {
|
|
|
263
305
|
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
264
306
|
});
|
|
265
307
|
}
|
|
308
|
+
/**
|
|
309
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
310
|
+
* to the expected objects
|
|
311
|
+
*
|
|
312
|
+
* @params response Response returned by the server for a request to updateACustomersProduct
|
|
313
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
314
|
+
*/
|
|
315
|
+
updateACustomersProductWithHttpInfo(response) {
|
|
316
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
317
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
318
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
319
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIEntitlement", "");
|
|
320
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
321
|
+
}
|
|
322
|
+
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
323
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
|
|
324
|
+
}
|
|
325
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
326
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
327
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIEntitlement", "");
|
|
328
|
+
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
329
|
+
}
|
|
330
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
331
|
+
});
|
|
332
|
+
}
|
|
266
333
|
/**
|
|
267
334
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
268
335
|
* to the expected objects
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { BaseAPIRequestFactory } from './baseapi';
|
|
2
|
+
import { Configuration } from '../configuration';
|
|
3
|
+
import { RequestContext, ResponseContext, HttpInfo } from '../http/http';
|
|
4
|
+
import { APIEntitlement } from '../models/APIEntitlement';
|
|
5
|
+
import { APIQueryPayloadAPIEntitlement } from '../models/APIQueryPayloadAPIEntitlement';
|
|
6
|
+
import { QueryResultAPIEntitlement } from '../models/QueryResultAPIEntitlement';
|
|
7
|
+
/**
|
|
8
|
+
* no description
|
|
9
|
+
*/
|
|
10
|
+
export declare class EntitlementsApiRequestFactory extends BaseAPIRequestFactory {
|
|
11
|
+
/**
|
|
12
|
+
* @param id
|
|
13
|
+
*/
|
|
14
|
+
deleteEntitlement(id: string, _options?: Configuration): Promise<RequestContext>;
|
|
15
|
+
/**
|
|
16
|
+
* @param id
|
|
17
|
+
*/
|
|
18
|
+
getEntitlement(id: string, _options?: Configuration): Promise<RequestContext>;
|
|
19
|
+
/**
|
|
20
|
+
* @param aPIQueryPayloadAPIEntitlement
|
|
21
|
+
*/
|
|
22
|
+
queryEntitlements(aPIQueryPayloadAPIEntitlement: APIQueryPayloadAPIEntitlement, _options?: Configuration): Promise<RequestContext>;
|
|
23
|
+
}
|
|
24
|
+
export declare class EntitlementsApiResponseProcessor {
|
|
25
|
+
/**
|
|
26
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
27
|
+
* to the expected objects
|
|
28
|
+
*
|
|
29
|
+
* @params response Response returned by the server for a request to deleteEntitlement
|
|
30
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
31
|
+
*/
|
|
32
|
+
deleteEntitlementWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void>>;
|
|
33
|
+
/**
|
|
34
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
35
|
+
* to the expected objects
|
|
36
|
+
*
|
|
37
|
+
* @params response Response returned by the server for a request to getEntitlement
|
|
38
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
39
|
+
*/
|
|
40
|
+
getEntitlementWithHttpInfo(response: ResponseContext): Promise<HttpInfo<APIEntitlement>>;
|
|
41
|
+
/**
|
|
42
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
43
|
+
* to the expected objects
|
|
44
|
+
*
|
|
45
|
+
* @params response Response returned by the server for a request to queryEntitlements
|
|
46
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
47
|
+
*/
|
|
48
|
+
queryEntitlementsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<QueryResultAPIEntitlement>>;
|
|
49
|
+
}
|
|
@@ -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;
|
|
@@ -6,7 +6,6 @@ import { APIProduct } from '../models/APIProduct';
|
|
|
6
6
|
import { APIQueryPayloadAPIProduct } from '../models/APIQueryPayloadAPIProduct';
|
|
7
7
|
import { APIUpdateProductPayload } from '../models/APIUpdateProductPayload';
|
|
8
8
|
import { QueryResultAPIProduct } from '../models/QueryResultAPIProduct';
|
|
9
|
-
import { ReviseProductPayload } from '../models/ReviseProductPayload';
|
|
10
9
|
/**
|
|
11
10
|
* no description
|
|
12
11
|
*/
|
|
@@ -27,11 +26,6 @@ export declare class ProductsApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
27
26
|
* @param aPIQueryPayloadAPIProduct
|
|
28
27
|
*/
|
|
29
28
|
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
29
|
/**
|
|
36
30
|
* @param aPIUpdateProductPayload
|
|
37
31
|
* @param id
|
|
@@ -71,14 +65,6 @@ export declare class ProductsApiResponseProcessor {
|
|
|
71
65
|
* @throws ApiException if the response code was not in [200, 299]
|
|
72
66
|
*/
|
|
73
67
|
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
68
|
/**
|
|
83
69
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
84
70
|
* to the expected objects
|
|
@@ -128,42 +128,6 @@ class ProductsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
128
128
|
return requestContext;
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
/**
|
|
132
|
-
* @param body
|
|
133
|
-
* @param id
|
|
134
|
-
*/
|
|
135
|
-
reviseAProduct(body, 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 'body' is not null or undefined
|
|
140
|
-
if (body === null || body === undefined) {
|
|
141
|
-
throw new baseapi_1.RequiredError("ProductsApi", "reviseAProduct", "body");
|
|
142
|
-
}
|
|
143
|
-
// verify required parameter 'id' is not null or undefined
|
|
144
|
-
if (id === null || id === undefined) {
|
|
145
|
-
throw new baseapi_1.RequiredError("ProductsApi", "reviseAProduct", "id");
|
|
146
|
-
}
|
|
147
|
-
// Path Params
|
|
148
|
-
const localVarPath = '/products/{id}/revise'
|
|
149
|
-
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
150
|
-
// Make Request Context
|
|
151
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
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(body, "ReviseProductPayload", ""), 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
131
|
/**
|
|
168
132
|
* @param aPIUpdateProductPayload
|
|
169
133
|
* @param id
|
|
@@ -299,34 +263,6 @@ class ProductsApiResponseProcessor {
|
|
|
299
263
|
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
300
264
|
});
|
|
301
265
|
}
|
|
302
|
-
/**
|
|
303
|
-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
304
|
-
* to the expected objects
|
|
305
|
-
*
|
|
306
|
-
* @params response Response returned by the server for a request to reviseAProduct
|
|
307
|
-
* @throws ApiException if the response code was not in [200, 299]
|
|
308
|
-
*/
|
|
309
|
-
reviseAProductWithHttpInfo(response) {
|
|
310
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
311
|
-
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
312
|
-
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
313
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIProduct", "");
|
|
314
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
315
|
-
}
|
|
316
|
-
if ((0, util_1.isCodeInRange)("400", response.httpStatusCode)) {
|
|
317
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Invalid payload", undefined, response.headers);
|
|
318
|
-
}
|
|
319
|
-
if ((0, util_1.isCodeInRange)("404", response.httpStatusCode)) {
|
|
320
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Product not found", undefined, response.headers);
|
|
321
|
-
}
|
|
322
|
-
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
323
|
-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
324
|
-
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "APIProduct", "");
|
|
325
|
-
return new http_1.HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
326
|
-
}
|
|
327
|
-
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers);
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
266
|
/**
|
|
331
267
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
332
268
|
* to the expected objects
|
|
@@ -7,4 +7,4 @@ export * from "./apis/exception";
|
|
|
7
7
|
export * from "./servers";
|
|
8
8
|
export { RequiredError } from "./apis/baseapi";
|
|
9
9
|
export { PromiseMiddleware as Middleware } from './middleware';
|
|
10
|
-
export { PromiseAuthenticationApi as AuthenticationApi, PromiseCustomersApi as CustomersApi, PromiseEventsApi as EventsApi, PromiseInvoicesApi as InvoicesApi, PromiseProductsApi as ProductsApi } from './types/PromiseAPI';
|
|
10
|
+
export { PromiseAuthenticationApi as AuthenticationApi, PromiseCustomersApi as CustomersApi, PromiseEntitlementsApi as EntitlementsApi, PromiseEventsApi as EventsApi, PromiseInvoicesApi as InvoicesApi, PromiseProductsApi as ProductsApi } from './types/PromiseAPI';
|
package/dist/openapi-v2/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ProductsApi = exports.InvoicesApi = exports.EventsApi = exports.CustomersApi = exports.AuthenticationApi = exports.RequiredError = exports.createConfiguration = void 0;
|
|
17
|
+
exports.ProductsApi = exports.InvoicesApi = exports.EventsApi = exports.EntitlementsApi = exports.CustomersApi = exports.AuthenticationApi = exports.RequiredError = exports.createConfiguration = void 0;
|
|
18
18
|
__exportStar(require("./http/http"), exports);
|
|
19
19
|
__exportStar(require("./auth/auth"), exports);
|
|
20
20
|
__exportStar(require("./models/all"), exports);
|
|
@@ -27,6 +27,7 @@ Object.defineProperty(exports, "RequiredError", { enumerable: true, get: functio
|
|
|
27
27
|
var PromiseAPI_1 = require("./types/PromiseAPI");
|
|
28
28
|
Object.defineProperty(exports, "AuthenticationApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseAuthenticationApi; } });
|
|
29
29
|
Object.defineProperty(exports, "CustomersApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseCustomersApi; } });
|
|
30
|
+
Object.defineProperty(exports, "EntitlementsApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseEntitlementsApi; } });
|
|
30
31
|
Object.defineProperty(exports, "EventsApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseEventsApi; } });
|
|
31
32
|
Object.defineProperty(exports, "InvoicesApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseInvoicesApi; } });
|
|
32
33
|
Object.defineProperty(exports, "ProductsApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseProductsApi; } });
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 24k
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { EntitlementRevision } from '../models/EntitlementRevision';
|
|
13
|
+
import { Pricing } from '../models/Pricing';
|
|
14
|
+
export declare class APIEntitlement {
|
|
15
|
+
/**
|
|
16
|
+
* The ID of the entitlement
|
|
17
|
+
*/
|
|
18
|
+
'id': string;
|
|
19
|
+
/**
|
|
20
|
+
* The ID of the account
|
|
21
|
+
*/
|
|
22
|
+
'accountId': string;
|
|
23
|
+
/**
|
|
24
|
+
* The ID of the customer
|
|
25
|
+
*/
|
|
26
|
+
'customerId': string;
|
|
27
|
+
/**
|
|
28
|
+
* The ID of the product
|
|
29
|
+
*/
|
|
30
|
+
'productId': string;
|
|
31
|
+
'pricing': Pricing;
|
|
32
|
+
/**
|
|
33
|
+
* Revisions
|
|
34
|
+
*/
|
|
35
|
+
'revisions'?: Array<EntitlementRevision>;
|
|
36
|
+
/**
|
|
37
|
+
* The date the entitlement was assigned
|
|
38
|
+
*/
|
|
39
|
+
'assignedAt': Date;
|
|
40
|
+
'createdAt': Date;
|
|
41
|
+
'updatedAt': Date;
|
|
42
|
+
static readonly discriminator: string | undefined;
|
|
43
|
+
static readonly attributeTypeMap: Array<{
|
|
44
|
+
name: string;
|
|
45
|
+
baseName: string;
|
|
46
|
+
type: string;
|
|
47
|
+
format: string;
|
|
48
|
+
}>;
|
|
49
|
+
static getAttributeTypeMap(): {
|
|
50
|
+
name: string;
|
|
51
|
+
baseName: string;
|
|
52
|
+
type: string;
|
|
53
|
+
format: string;
|
|
54
|
+
}[];
|
|
55
|
+
constructor();
|
|
56
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 24k
|
|
4
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
*
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.APIEntitlement = void 0;
|
|
15
|
+
class APIEntitlement {
|
|
16
|
+
static getAttributeTypeMap() {
|
|
17
|
+
return APIEntitlement.attributeTypeMap;
|
|
18
|
+
}
|
|
19
|
+
constructor() {
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.APIEntitlement = APIEntitlement;
|
|
23
|
+
APIEntitlement.discriminator = undefined;
|
|
24
|
+
APIEntitlement.attributeTypeMap = [
|
|
25
|
+
{
|
|
26
|
+
"name": "id",
|
|
27
|
+
"baseName": "id",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"format": ""
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "accountId",
|
|
33
|
+
"baseName": "accountId",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"format": ""
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "customerId",
|
|
39
|
+
"baseName": "customerId",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"format": ""
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "productId",
|
|
45
|
+
"baseName": "productId",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"format": ""
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "pricing",
|
|
51
|
+
"baseName": "pricing",
|
|
52
|
+
"type": "Pricing",
|
|
53
|
+
"format": ""
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "revisions",
|
|
57
|
+
"baseName": "revisions",
|
|
58
|
+
"type": "Array<EntitlementRevision>",
|
|
59
|
+
"format": ""
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "assignedAt",
|
|
63
|
+
"baseName": "assignedAt",
|
|
64
|
+
"type": "Date",
|
|
65
|
+
"format": "date-time"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "createdAt",
|
|
69
|
+
"baseName": "createdAt",
|
|
70
|
+
"type": "Date",
|
|
71
|
+
"format": "date-time"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "updatedAt",
|
|
75
|
+
"baseName": "updatedAt",
|
|
76
|
+
"type": "Date",
|
|
77
|
+
"format": "date-time"
|
|
78
|
+
}
|
|
79
|
+
];
|