@emilgroup/insurance-sdk-node 1.95.0 → 1.95.1-beta.0
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/.openapi-generator/FILES +42 -0
- package/README.md +2 -2
- package/api/product-configs-api.ts +857 -0
- package/api.ts +2 -0
- package/dist/api/product-configs-api.d.ts +476 -0
- package/dist/api/product-configs-api.js +769 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/models/amount-with-limit-class.d.ts +30 -0
- package/dist/models/amount-with-limit-class.js +15 -0
- package/dist/models/calculated-policy-object-class.d.ts +36 -0
- package/dist/models/calculated-policy-object-class.js +15 -0
- package/dist/models/calculation-errors-class.d.ts +25 -0
- package/dist/models/calculation-errors-class.js +15 -0
- package/dist/models/calculation-item-errors-class.d.ts +43 -0
- package/dist/models/calculation-item-errors-class.js +15 -0
- package/dist/models/calculation-message-class.d.ts +30 -0
- package/dist/models/calculation-message-class.js +15 -0
- package/dist/models/category-calculation-order-class.d.ts +25 -0
- package/dist/models/category-calculation-order-class.js +15 -0
- package/dist/models/category-calculation-step-class.d.ts +58 -0
- package/dist/models/category-calculation-step-class.js +24 -0
- package/dist/models/category-class.d.ts +52 -0
- package/dist/models/category-class.js +15 -0
- package/dist/models/category-coverage-summary-class.d.ts +43 -0
- package/dist/models/category-coverage-summary-class.js +15 -0
- package/dist/models/category-definition-class.d.ts +43 -0
- package/dist/models/category-definition-class.js +15 -0
- package/dist/models/claim-config-class.d.ts +39 -0
- package/dist/models/claim-config-class.js +15 -0
- package/dist/models/claim-position-fields-class.d.ts +31 -0
- package/dist/models/claim-position-fields-class.js +15 -0
- package/dist/models/coverage-class.d.ts +31 -0
- package/dist/models/coverage-class.js +15 -0
- package/dist/models/coverage-definition-class.d.ts +36 -0
- package/dist/models/coverage-definition-class.js +15 -0
- package/dist/models/coverage-term-class.d.ts +66 -0
- package/dist/models/coverage-term-class.js +30 -0
- package/dist/models/create-product-field-request-dto.d.ts +6 -0
- package/dist/models/custom-field-class.d.ts +52 -0
- package/dist/models/custom-field-class.js +25 -0
- package/dist/models/deductible-class.d.ts +60 -0
- package/dist/models/deductible-class.js +25 -0
- package/dist/models/general-setting-class.d.ts +49 -0
- package/dist/models/general-setting-class.js +33 -0
- package/dist/models/get-product-config-tariffs-response-class.d.ts +31 -0
- package/dist/models/get-product-config-tariffs-response-class.js +15 -0
- package/dist/models/index.d.ts +41 -0
- package/dist/models/index.js +41 -0
- package/dist/models/lead-policy-object-class.d.ts +42 -0
- package/dist/models/lead-policy-object-class.js +15 -0
- package/dist/models/product-config-summary-class.d.ts +72 -0
- package/dist/models/product-config-summary-class.js +15 -0
- package/dist/models/product-field-class.d.ts +6 -0
- package/dist/models/product-version-class.d.ts +6 -0
- package/dist/models/rest-calculate-product-tariff-quote-request-dto.d.ts +38 -0
- package/dist/models/rest-calculate-product-tariff-quote-request-dto.js +15 -0
- package/dist/models/rest-calculate-product-tariff-quote-response-class.d.ts +25 -0
- package/dist/models/rest-calculate-product-tariff-quote-response-class.js +15 -0
- package/dist/models/rest-create-product-config-response-class.d.ts +25 -0
- package/dist/models/rest-create-product-config-response-class.js +15 -0
- package/dist/models/rest-get-product-config-response-class.d.ts +25 -0
- package/dist/models/rest-get-product-config-response-class.js +15 -0
- package/dist/models/rest-list-product-configs-response-class.d.ts +43 -0
- package/dist/models/rest-list-product-configs-response-class.js +15 -0
- package/dist/models/rest-update-product-config-response-class.d.ts +25 -0
- package/dist/models/rest-update-product-config-response-class.js +15 -0
- package/dist/models/shared-create-estimated-invoice-response-class.d.ts +25 -0
- package/dist/models/shared-create-estimated-invoice-response-class.js +15 -0
- package/dist/models/shared-create-payment-method-request-dto.d.ts +2 -0
- package/dist/models/shared-create-payment-method-request-dto.js +3 -1
- package/dist/models/shared-payment-method-response-class.d.ts +2 -0
- package/dist/models/shared-payment-method-response-class.js +3 -1
- package/dist/models/shared-product-config-class.d.ts +79 -0
- package/dist/models/shared-product-config-class.js +15 -0
- package/dist/models/shared-product-config-data-class.d.ts +39 -0
- package/dist/models/shared-product-config-data-class.js +15 -0
- package/dist/models/shared-product-field-class.d.ts +6 -0
- package/dist/models/shared-product-field-override-class.d.ts +48 -0
- package/dist/models/shared-product-field-override-class.js +15 -0
- package/dist/models/shared-product-tariff-quote-class.d.ts +52 -0
- package/dist/models/shared-product-tariff-quote-class.js +15 -0
- package/dist/models/shared-tariff-variation-class.d.ts +73 -0
- package/dist/models/shared-tariff-variation-class.js +15 -0
- package/dist/models/tariff-calculation-order-class.d.ts +36 -0
- package/dist/models/tariff-calculation-order-class.js +20 -0
- package/dist/models/tariff-calculation-step-class.d.ts +58 -0
- package/dist/models/tariff-calculation-step-class.js +24 -0
- package/dist/models/tariff-category-summary-class.d.ts +57 -0
- package/dist/models/tariff-category-summary-class.js +15 -0
- package/dist/models/tariff-coverage-term-class.d.ts +60 -0
- package/dist/models/tariff-coverage-term-class.js +30 -0
- package/dist/models/tariff-info-class.d.ts +47 -0
- package/dist/models/tariff-info-class.js +20 -0
- package/dist/models/tariff-summary-class.d.ts +52 -0
- package/dist/models/tariff-summary-class.js +15 -0
- package/dist/models/update-product-field-request-dto.d.ts +6 -0
- package/dist/models/waiting-period-class.d.ts +40 -0
- package/dist/models/waiting-period-class.js +19 -0
- package/dist/models/warning-class.d.ts +41 -0
- package/dist/models/warning-class.js +20 -0
- package/models/amount-with-limit-class.ts +36 -0
- package/models/calculated-policy-object-class.ts +42 -0
- package/models/calculation-errors-class.ts +31 -0
- package/models/calculation-item-errors-class.ts +49 -0
- package/models/calculation-message-class.ts +36 -0
- package/models/category-calculation-order-class.ts +31 -0
- package/models/category-calculation-step-class.ts +68 -0
- package/models/category-class.ts +58 -0
- package/models/category-coverage-summary-class.ts +49 -0
- package/models/category-definition-class.ts +49 -0
- package/models/claim-config-class.ts +45 -0
- package/models/claim-position-fields-class.ts +37 -0
- package/models/coverage-class.ts +37 -0
- package/models/coverage-definition-class.ts +42 -0
- package/models/coverage-term-class.ts +77 -0
- package/models/create-product-field-request-dto.ts +6 -0
- package/models/custom-field-class.ts +61 -0
- package/models/deductible-class.ts +70 -0
- package/models/general-setting-class.ts +59 -0
- package/models/get-product-config-tariffs-response-class.ts +37 -0
- package/models/index.ts +41 -0
- package/models/lead-policy-object-class.ts +48 -0
- package/models/product-config-summary-class.ts +78 -0
- package/models/product-field-class.ts +6 -0
- package/models/product-version-class.ts +6 -0
- package/models/rest-calculate-product-tariff-quote-request-dto.ts +44 -0
- package/models/rest-calculate-product-tariff-quote-response-class.ts +31 -0
- package/models/rest-create-product-config-response-class.ts +31 -0
- package/models/rest-get-product-config-response-class.ts +31 -0
- package/models/rest-list-product-configs-response-class.ts +49 -0
- package/models/rest-update-product-config-response-class.ts +31 -0
- package/models/shared-create-estimated-invoice-response-class.ts +31 -0
- package/models/shared-create-payment-method-request-dto.ts +3 -1
- package/models/shared-payment-method-response-class.ts +3 -1
- package/models/shared-product-config-class.ts +85 -0
- package/models/shared-product-config-data-class.ts +45 -0
- package/models/shared-product-field-class.ts +6 -0
- package/models/shared-product-field-override-class.ts +54 -0
- package/models/shared-product-tariff-quote-class.ts +58 -0
- package/models/shared-tariff-variation-class.ts +79 -0
- package/models/tariff-calculation-order-class.ts +45 -0
- package/models/tariff-calculation-step-class.ts +68 -0
- package/models/tariff-category-summary-class.ts +63 -0
- package/models/tariff-coverage-term-class.ts +71 -0
- package/models/tariff-info-class.ts +56 -0
- package/models/tariff-summary-class.ts +58 -0
- package/models/update-product-field-request-dto.ts +6 -0
- package/models/waiting-period-class.ts +49 -0
- package/models/warning-class.ts +50 -0
- package/package.json +1 -1
|
@@ -0,0 +1,857 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* EMIL InsuranceService
|
|
5
|
+
* The EMIL InsuranceService API description
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
* Contact: kontakt@emil.de
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
17
|
+
import { Configuration } from '../configuration';
|
|
18
|
+
// Some imports not used depending on template conditions
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { GetProductConfigTariffsResponseClass } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { RestCalculateProductTariffQuoteRequestDto } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { RestCalculateProductTariffQuoteResponseClass } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import { RestCreateProductConfigResponseClass } from '../models';
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
import { RestGetProductConfigResponseClass } from '../models';
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
import { RestListProductConfigsResponseClass } from '../models';
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
import { RestUpdateProductConfigResponseClass } from '../models';
|
|
37
|
+
// URLSearchParams not necessarily used
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
import { URL, URLSearchParams } from 'url';
|
|
40
|
+
const FormData = require('form-data');
|
|
41
|
+
/**
|
|
42
|
+
* ProductConfigsApi - axios parameter creator
|
|
43
|
+
* @export
|
|
44
|
+
*/
|
|
45
|
+
export const ProductConfigsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
46
|
+
return {
|
|
47
|
+
/**
|
|
48
|
+
* Calculates and returns a tariff quote with estimated invoice data. **Required Permissions** \"policy-management.products.view\"
|
|
49
|
+
* @summary Calculates a quote for a selected tariff
|
|
50
|
+
* @param {number} productVersionId Product version id
|
|
51
|
+
* @param {RestCalculateProductTariffQuoteRequestDto} restCalculateProductTariffQuoteRequestDto
|
|
52
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
53
|
+
* @param {*} [options] Override http request option.
|
|
54
|
+
* @throws {RequiredError}
|
|
55
|
+
*/
|
|
56
|
+
calculateProductTariffQuote: async (productVersionId: number, restCalculateProductTariffQuoteRequestDto: RestCalculateProductTariffQuoteRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
57
|
+
// verify required parameter 'productVersionId' is not null or undefined
|
|
58
|
+
assertParamExists('calculateProductTariffQuote', 'productVersionId', productVersionId)
|
|
59
|
+
// verify required parameter 'restCalculateProductTariffQuoteRequestDto' is not null or undefined
|
|
60
|
+
assertParamExists('calculateProductTariffQuote', 'restCalculateProductTariffQuoteRequestDto', restCalculateProductTariffQuoteRequestDto)
|
|
61
|
+
const localVarPath = `/insuranceservice/v1/product-configs/{productVersionId}/tariff-quote`
|
|
62
|
+
.replace(`{${"productVersionId"}}`, encodeURIComponent(String(productVersionId)));
|
|
63
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
64
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
65
|
+
let baseOptions;
|
|
66
|
+
let baseAccessToken;
|
|
67
|
+
if (configuration) {
|
|
68
|
+
baseOptions = configuration.baseOptions;
|
|
69
|
+
baseAccessToken = configuration.accessToken;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
73
|
+
const localVarHeaderParameter = {} as any;
|
|
74
|
+
const localVarQueryParameter = {} as any;
|
|
75
|
+
|
|
76
|
+
// authentication bearer required
|
|
77
|
+
// http bearer authentication required
|
|
78
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
79
|
+
|
|
80
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
81
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
87
|
+
|
|
88
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
89
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
90
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
91
|
+
localVarRequestOptions.data = serializeDataIfNeeded(restCalculateProductTariffQuoteRequestDto, localVarRequestOptions, configuration)
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
url: toPathString(localVarUrlObj),
|
|
95
|
+
options: localVarRequestOptions,
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* Creates a product config. Accepts a JSON or YAML file containing the config. **Required Permissions** \"policy-management.products.create\"
|
|
100
|
+
* @summary Creates a new product config
|
|
101
|
+
* @param {string} slug Unique identifier for the product config
|
|
102
|
+
* @param {number} productVersionId Product version id
|
|
103
|
+
* @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
|
|
104
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
105
|
+
* @param {*} [options] Override http request option.
|
|
106
|
+
* @throws {RequiredError}
|
|
107
|
+
*/
|
|
108
|
+
createProductConfig: async (slug: string, productVersionId: number, file: any, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
109
|
+
// verify required parameter 'slug' is not null or undefined
|
|
110
|
+
assertParamExists('createProductConfig', 'slug', slug)
|
|
111
|
+
// verify required parameter 'productVersionId' is not null or undefined
|
|
112
|
+
assertParamExists('createProductConfig', 'productVersionId', productVersionId)
|
|
113
|
+
// verify required parameter 'file' is not null or undefined
|
|
114
|
+
assertParamExists('createProductConfig', 'file', file)
|
|
115
|
+
const localVarPath = `/insuranceservice/v1/product-configs`;
|
|
116
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
117
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
118
|
+
let baseOptions;
|
|
119
|
+
let baseAccessToken;
|
|
120
|
+
if (configuration) {
|
|
121
|
+
baseOptions = configuration.baseOptions;
|
|
122
|
+
baseAccessToken = configuration.accessToken;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
126
|
+
const localVarHeaderParameter = {} as any;
|
|
127
|
+
const localVarQueryParameter = {} as any;
|
|
128
|
+
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
129
|
+
|
|
130
|
+
// authentication bearer required
|
|
131
|
+
// http bearer authentication required
|
|
132
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
133
|
+
|
|
134
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
135
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
if (slug !== undefined) {
|
|
140
|
+
localVarFormParams.append('slug', slug as any);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (productVersionId !== undefined) {
|
|
144
|
+
localVarFormParams.append('productVersionId', productVersionId as any);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (file !== undefined) {
|
|
148
|
+
localVarFormParams.append('file', file as any);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data; boundary=' + localVarFormParams.getBoundary();
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
156
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
157
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
158
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
159
|
+
|
|
160
|
+
return {
|
|
161
|
+
url: toPathString(localVarUrlObj),
|
|
162
|
+
options: localVarRequestOptions,
|
|
163
|
+
};
|
|
164
|
+
},
|
|
165
|
+
/**
|
|
166
|
+
* Retrieves a product config by code **Required Permissions** \"policy-management.products.view\"
|
|
167
|
+
* @summary Retrieve the Product Config
|
|
168
|
+
* @param {string} code Unique identifier for the object.
|
|
169
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
170
|
+
* @param {*} [options] Override http request option.
|
|
171
|
+
* @throws {RequiredError}
|
|
172
|
+
*/
|
|
173
|
+
getProductConfig: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
174
|
+
// verify required parameter 'code' is not null or undefined
|
|
175
|
+
assertParamExists('getProductConfig', 'code', code)
|
|
176
|
+
const localVarPath = `/insuranceservice/v1/product-configs/{code}`
|
|
177
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
178
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
179
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
180
|
+
let baseOptions;
|
|
181
|
+
let baseAccessToken;
|
|
182
|
+
if (configuration) {
|
|
183
|
+
baseOptions = configuration.baseOptions;
|
|
184
|
+
baseAccessToken = configuration.accessToken;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
188
|
+
const localVarHeaderParameter = {} as any;
|
|
189
|
+
const localVarQueryParameter = {} as any;
|
|
190
|
+
|
|
191
|
+
// authentication bearer required
|
|
192
|
+
// http bearer authentication required
|
|
193
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
194
|
+
|
|
195
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
196
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
202
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
203
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
204
|
+
|
|
205
|
+
return {
|
|
206
|
+
url: toPathString(localVarUrlObj),
|
|
207
|
+
options: localVarRequestOptions,
|
|
208
|
+
};
|
|
209
|
+
},
|
|
210
|
+
/**
|
|
211
|
+
* Retrieves list of available tariffs for the product config **Required Permissions** \"policy-management.products.view\"
|
|
212
|
+
* @summary Retrieve the Product Config Tariffs
|
|
213
|
+
* @param {number} productVersionId Product version id
|
|
214
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
215
|
+
* @param {*} [options] Override http request option.
|
|
216
|
+
* @throws {RequiredError}
|
|
217
|
+
*/
|
|
218
|
+
getProductConfigTariffs: async (productVersionId: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
219
|
+
// verify required parameter 'productVersionId' is not null or undefined
|
|
220
|
+
assertParamExists('getProductConfigTariffs', 'productVersionId', productVersionId)
|
|
221
|
+
const localVarPath = `/insuranceservice/v1/product-configs/{productVersionId}/tariffs`
|
|
222
|
+
.replace(`{${"productVersionId"}}`, encodeURIComponent(String(productVersionId)));
|
|
223
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
224
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
225
|
+
let baseOptions;
|
|
226
|
+
let baseAccessToken;
|
|
227
|
+
if (configuration) {
|
|
228
|
+
baseOptions = configuration.baseOptions;
|
|
229
|
+
baseAccessToken = configuration.accessToken;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
233
|
+
const localVarHeaderParameter = {} as any;
|
|
234
|
+
const localVarQueryParameter = {} as any;
|
|
235
|
+
|
|
236
|
+
// authentication bearer required
|
|
237
|
+
// http bearer authentication required
|
|
238
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
239
|
+
|
|
240
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
241
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
247
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
248
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
249
|
+
|
|
250
|
+
return {
|
|
251
|
+
url: toPathString(localVarUrlObj),
|
|
252
|
+
options: localVarRequestOptions,
|
|
253
|
+
};
|
|
254
|
+
},
|
|
255
|
+
/**
|
|
256
|
+
* Lists product configs **Required Permissions** \"policy-management.products.view\"
|
|
257
|
+
* @summary List Product Configs
|
|
258
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
259
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
260
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
261
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, slug, productSlug, productVersionId, createdAt</i>
|
|
262
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
263
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, updatedAt</i>
|
|
264
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
265
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, slug, productSlug, productVersionId, createdAt</i>
|
|
266
|
+
* @param {*} [options] Override http request option.
|
|
267
|
+
* @throws {RequiredError}
|
|
268
|
+
*/
|
|
269
|
+
listProductConfigs: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
270
|
+
const localVarPath = `/insuranceservice/v1/product-configs`;
|
|
271
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
272
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
273
|
+
let baseOptions;
|
|
274
|
+
let baseAccessToken;
|
|
275
|
+
if (configuration) {
|
|
276
|
+
baseOptions = configuration.baseOptions;
|
|
277
|
+
baseAccessToken = configuration.accessToken;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
281
|
+
const localVarHeaderParameter = {} as any;
|
|
282
|
+
const localVarQueryParameter = {} as any;
|
|
283
|
+
|
|
284
|
+
// authentication bearer required
|
|
285
|
+
// http bearer authentication required
|
|
286
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
287
|
+
|
|
288
|
+
if (pageSize !== undefined) {
|
|
289
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
if (pageToken !== undefined) {
|
|
293
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if (filter !== undefined) {
|
|
297
|
+
localVarQueryParameter['filter'] = filter;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
if (search !== undefined) {
|
|
301
|
+
localVarQueryParameter['search'] = search;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if (order !== undefined) {
|
|
305
|
+
localVarQueryParameter['order'] = order;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
if (expand !== undefined) {
|
|
309
|
+
localVarQueryParameter['expand'] = expand;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
if (filters !== undefined) {
|
|
313
|
+
localVarQueryParameter['filters'] = filters;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
317
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
323
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
324
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
325
|
+
|
|
326
|
+
return {
|
|
327
|
+
url: toPathString(localVarUrlObj),
|
|
328
|
+
options: localVarRequestOptions,
|
|
329
|
+
};
|
|
330
|
+
},
|
|
331
|
+
/**
|
|
332
|
+
* Updates a product config. Accepts a JSON or YAML file containing the config. **Required Permissions** \"policy-management.products.update\"
|
|
333
|
+
* @summary Updates a product config
|
|
334
|
+
* @param {string} code Unique identifier for the object.
|
|
335
|
+
* @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
|
|
336
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
337
|
+
* @param {string} [slug] Unique identifier for the product config
|
|
338
|
+
* @param {*} [options] Override http request option.
|
|
339
|
+
* @throws {RequiredError}
|
|
340
|
+
*/
|
|
341
|
+
updateProductConfig: async (code: string, file: any, authorization?: string, slug?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
342
|
+
// verify required parameter 'code' is not null or undefined
|
|
343
|
+
assertParamExists('updateProductConfig', 'code', code)
|
|
344
|
+
// verify required parameter 'file' is not null or undefined
|
|
345
|
+
assertParamExists('updateProductConfig', 'file', file)
|
|
346
|
+
const localVarPath = `/insuranceservice/v1/product-configs/{code}`
|
|
347
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
348
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
349
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
350
|
+
let baseOptions;
|
|
351
|
+
let baseAccessToken;
|
|
352
|
+
if (configuration) {
|
|
353
|
+
baseOptions = configuration.baseOptions;
|
|
354
|
+
baseAccessToken = configuration.accessToken;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
358
|
+
const localVarHeaderParameter = {} as any;
|
|
359
|
+
const localVarQueryParameter = {} as any;
|
|
360
|
+
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
361
|
+
|
|
362
|
+
// authentication bearer required
|
|
363
|
+
// http bearer authentication required
|
|
364
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
365
|
+
|
|
366
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
367
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
if (file !== undefined) {
|
|
372
|
+
localVarFormParams.append('file', file as any);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
if (slug !== undefined) {
|
|
376
|
+
localVarFormParams.append('slug', slug as any);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data; boundary=' + localVarFormParams.getBoundary();
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
384
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
385
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
386
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
387
|
+
|
|
388
|
+
return {
|
|
389
|
+
url: toPathString(localVarUrlObj),
|
|
390
|
+
options: localVarRequestOptions,
|
|
391
|
+
};
|
|
392
|
+
},
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* ProductConfigsApi - functional programming interface
|
|
398
|
+
* @export
|
|
399
|
+
*/
|
|
400
|
+
export const ProductConfigsApiFp = function(configuration?: Configuration) {
|
|
401
|
+
const localVarAxiosParamCreator = ProductConfigsApiAxiosParamCreator(configuration)
|
|
402
|
+
return {
|
|
403
|
+
/**
|
|
404
|
+
* Calculates and returns a tariff quote with estimated invoice data. **Required Permissions** \"policy-management.products.view\"
|
|
405
|
+
* @summary Calculates a quote for a selected tariff
|
|
406
|
+
* @param {number} productVersionId Product version id
|
|
407
|
+
* @param {RestCalculateProductTariffQuoteRequestDto} restCalculateProductTariffQuoteRequestDto
|
|
408
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
409
|
+
* @param {*} [options] Override http request option.
|
|
410
|
+
* @throws {RequiredError}
|
|
411
|
+
*/
|
|
412
|
+
async calculateProductTariffQuote(productVersionId: number, restCalculateProductTariffQuoteRequestDto: RestCalculateProductTariffQuoteRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RestCalculateProductTariffQuoteResponseClass>> {
|
|
413
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.calculateProductTariffQuote(productVersionId, restCalculateProductTariffQuoteRequestDto, authorization, options);
|
|
414
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
415
|
+
},
|
|
416
|
+
/**
|
|
417
|
+
* Creates a product config. Accepts a JSON or YAML file containing the config. **Required Permissions** \"policy-management.products.create\"
|
|
418
|
+
* @summary Creates a new product config
|
|
419
|
+
* @param {string} slug Unique identifier for the product config
|
|
420
|
+
* @param {number} productVersionId Product version id
|
|
421
|
+
* @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
|
|
422
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
423
|
+
* @param {*} [options] Override http request option.
|
|
424
|
+
* @throws {RequiredError}
|
|
425
|
+
*/
|
|
426
|
+
async createProductConfig(slug: string, productVersionId: number, file: any, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RestCreateProductConfigResponseClass>> {
|
|
427
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createProductConfig(slug, productVersionId, file, authorization, options);
|
|
428
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
429
|
+
},
|
|
430
|
+
/**
|
|
431
|
+
* Retrieves a product config by code **Required Permissions** \"policy-management.products.view\"
|
|
432
|
+
* @summary Retrieve the Product Config
|
|
433
|
+
* @param {string} code Unique identifier for the object.
|
|
434
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
435
|
+
* @param {*} [options] Override http request option.
|
|
436
|
+
* @throws {RequiredError}
|
|
437
|
+
*/
|
|
438
|
+
async getProductConfig(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RestGetProductConfigResponseClass>> {
|
|
439
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductConfig(code, authorization, options);
|
|
440
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
441
|
+
},
|
|
442
|
+
/**
|
|
443
|
+
* Retrieves list of available tariffs for the product config **Required Permissions** \"policy-management.products.view\"
|
|
444
|
+
* @summary Retrieve the Product Config Tariffs
|
|
445
|
+
* @param {number} productVersionId Product version id
|
|
446
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
447
|
+
* @param {*} [options] Override http request option.
|
|
448
|
+
* @throws {RequiredError}
|
|
449
|
+
*/
|
|
450
|
+
async getProductConfigTariffs(productVersionId: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductConfigTariffsResponseClass>> {
|
|
451
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductConfigTariffs(productVersionId, authorization, options);
|
|
452
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
453
|
+
},
|
|
454
|
+
/**
|
|
455
|
+
* Lists product configs **Required Permissions** \"policy-management.products.view\"
|
|
456
|
+
* @summary List Product Configs
|
|
457
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
458
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
459
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
460
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, slug, productSlug, productVersionId, createdAt</i>
|
|
461
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
462
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, updatedAt</i>
|
|
463
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
464
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, slug, productSlug, productVersionId, createdAt</i>
|
|
465
|
+
* @param {*} [options] Override http request option.
|
|
466
|
+
* @throws {RequiredError}
|
|
467
|
+
*/
|
|
468
|
+
async listProductConfigs(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RestListProductConfigsResponseClass>> {
|
|
469
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listProductConfigs(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
470
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
471
|
+
},
|
|
472
|
+
/**
|
|
473
|
+
* Updates a product config. Accepts a JSON or YAML file containing the config. **Required Permissions** \"policy-management.products.update\"
|
|
474
|
+
* @summary Updates a product config
|
|
475
|
+
* @param {string} code Unique identifier for the object.
|
|
476
|
+
* @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
|
|
477
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
478
|
+
* @param {string} [slug] Unique identifier for the product config
|
|
479
|
+
* @param {*} [options] Override http request option.
|
|
480
|
+
* @throws {RequiredError}
|
|
481
|
+
*/
|
|
482
|
+
async updateProductConfig(code: string, file: any, authorization?: string, slug?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RestUpdateProductConfigResponseClass>> {
|
|
483
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateProductConfig(code, file, authorization, slug, options);
|
|
484
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
485
|
+
},
|
|
486
|
+
}
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* ProductConfigsApi - factory interface
|
|
491
|
+
* @export
|
|
492
|
+
*/
|
|
493
|
+
export const ProductConfigsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
494
|
+
const localVarFp = ProductConfigsApiFp(configuration)
|
|
495
|
+
return {
|
|
496
|
+
/**
|
|
497
|
+
* Calculates and returns a tariff quote with estimated invoice data. **Required Permissions** \"policy-management.products.view\"
|
|
498
|
+
* @summary Calculates a quote for a selected tariff
|
|
499
|
+
* @param {number} productVersionId Product version id
|
|
500
|
+
* @param {RestCalculateProductTariffQuoteRequestDto} restCalculateProductTariffQuoteRequestDto
|
|
501
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
502
|
+
* @param {*} [options] Override http request option.
|
|
503
|
+
* @throws {RequiredError}
|
|
504
|
+
*/
|
|
505
|
+
calculateProductTariffQuote(productVersionId: number, restCalculateProductTariffQuoteRequestDto: RestCalculateProductTariffQuoteRequestDto, authorization?: string, options?: any): AxiosPromise<RestCalculateProductTariffQuoteResponseClass> {
|
|
506
|
+
return localVarFp.calculateProductTariffQuote(productVersionId, restCalculateProductTariffQuoteRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
507
|
+
},
|
|
508
|
+
/**
|
|
509
|
+
* Creates a product config. Accepts a JSON or YAML file containing the config. **Required Permissions** \"policy-management.products.create\"
|
|
510
|
+
* @summary Creates a new product config
|
|
511
|
+
* @param {string} slug Unique identifier for the product config
|
|
512
|
+
* @param {number} productVersionId Product version id
|
|
513
|
+
* @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
|
|
514
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
515
|
+
* @param {*} [options] Override http request option.
|
|
516
|
+
* @throws {RequiredError}
|
|
517
|
+
*/
|
|
518
|
+
createProductConfig(slug: string, productVersionId: number, file: any, authorization?: string, options?: any): AxiosPromise<RestCreateProductConfigResponseClass> {
|
|
519
|
+
return localVarFp.createProductConfig(slug, productVersionId, file, authorization, options).then((request) => request(axios, basePath));
|
|
520
|
+
},
|
|
521
|
+
/**
|
|
522
|
+
* Retrieves a product config by code **Required Permissions** \"policy-management.products.view\"
|
|
523
|
+
* @summary Retrieve the Product Config
|
|
524
|
+
* @param {string} code Unique identifier for the object.
|
|
525
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
526
|
+
* @param {*} [options] Override http request option.
|
|
527
|
+
* @throws {RequiredError}
|
|
528
|
+
*/
|
|
529
|
+
getProductConfig(code: string, authorization?: string, options?: any): AxiosPromise<RestGetProductConfigResponseClass> {
|
|
530
|
+
return localVarFp.getProductConfig(code, authorization, options).then((request) => request(axios, basePath));
|
|
531
|
+
},
|
|
532
|
+
/**
|
|
533
|
+
* Retrieves list of available tariffs for the product config **Required Permissions** \"policy-management.products.view\"
|
|
534
|
+
* @summary Retrieve the Product Config Tariffs
|
|
535
|
+
* @param {number} productVersionId Product version id
|
|
536
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
537
|
+
* @param {*} [options] Override http request option.
|
|
538
|
+
* @throws {RequiredError}
|
|
539
|
+
*/
|
|
540
|
+
getProductConfigTariffs(productVersionId: number, authorization?: string, options?: any): AxiosPromise<GetProductConfigTariffsResponseClass> {
|
|
541
|
+
return localVarFp.getProductConfigTariffs(productVersionId, authorization, options).then((request) => request(axios, basePath));
|
|
542
|
+
},
|
|
543
|
+
/**
|
|
544
|
+
* Lists product configs **Required Permissions** \"policy-management.products.view\"
|
|
545
|
+
* @summary List Product Configs
|
|
546
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
547
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
548
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
549
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, slug, productSlug, productVersionId, createdAt</i>
|
|
550
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
551
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, updatedAt</i>
|
|
552
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
553
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, slug, productSlug, productVersionId, createdAt</i>
|
|
554
|
+
* @param {*} [options] Override http request option.
|
|
555
|
+
* @throws {RequiredError}
|
|
556
|
+
*/
|
|
557
|
+
listProductConfigs(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<RestListProductConfigsResponseClass> {
|
|
558
|
+
return localVarFp.listProductConfigs(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
559
|
+
},
|
|
560
|
+
/**
|
|
561
|
+
* Updates a product config. Accepts a JSON or YAML file containing the config. **Required Permissions** \"policy-management.products.update\"
|
|
562
|
+
* @summary Updates a product config
|
|
563
|
+
* @param {string} code Unique identifier for the object.
|
|
564
|
+
* @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
|
|
565
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
566
|
+
* @param {string} [slug] Unique identifier for the product config
|
|
567
|
+
* @param {*} [options] Override http request option.
|
|
568
|
+
* @throws {RequiredError}
|
|
569
|
+
*/
|
|
570
|
+
updateProductConfig(code: string, file: any, authorization?: string, slug?: string, options?: any): AxiosPromise<RestUpdateProductConfigResponseClass> {
|
|
571
|
+
return localVarFp.updateProductConfig(code, file, authorization, slug, options).then((request) => request(axios, basePath));
|
|
572
|
+
},
|
|
573
|
+
};
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Request parameters for calculateProductTariffQuote operation in ProductConfigsApi.
|
|
578
|
+
* @export
|
|
579
|
+
* @interface ProductConfigsApiCalculateProductTariffQuoteRequest
|
|
580
|
+
*/
|
|
581
|
+
export interface ProductConfigsApiCalculateProductTariffQuoteRequest {
|
|
582
|
+
/**
|
|
583
|
+
* Product version id
|
|
584
|
+
* @type {number}
|
|
585
|
+
* @memberof ProductConfigsApiCalculateProductTariffQuote
|
|
586
|
+
*/
|
|
587
|
+
readonly productVersionId: number
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
*
|
|
591
|
+
* @type {RestCalculateProductTariffQuoteRequestDto}
|
|
592
|
+
* @memberof ProductConfigsApiCalculateProductTariffQuote
|
|
593
|
+
*/
|
|
594
|
+
readonly restCalculateProductTariffQuoteRequestDto: RestCalculateProductTariffQuoteRequestDto
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
598
|
+
* @type {string}
|
|
599
|
+
* @memberof ProductConfigsApiCalculateProductTariffQuote
|
|
600
|
+
*/
|
|
601
|
+
readonly authorization?: string
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Request parameters for createProductConfig operation in ProductConfigsApi.
|
|
606
|
+
* @export
|
|
607
|
+
* @interface ProductConfigsApiCreateProductConfigRequest
|
|
608
|
+
*/
|
|
609
|
+
export interface ProductConfigsApiCreateProductConfigRequest {
|
|
610
|
+
/**
|
|
611
|
+
* Unique identifier for the product config
|
|
612
|
+
* @type {string}
|
|
613
|
+
* @memberof ProductConfigsApiCreateProductConfig
|
|
614
|
+
*/
|
|
615
|
+
readonly slug: string
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* Product version id
|
|
619
|
+
* @type {number}
|
|
620
|
+
* @memberof ProductConfigsApiCreateProductConfig
|
|
621
|
+
*/
|
|
622
|
+
readonly productVersionId: number
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
|
|
626
|
+
* @type {any}
|
|
627
|
+
* @memberof ProductConfigsApiCreateProductConfig
|
|
628
|
+
*/
|
|
629
|
+
readonly file: any
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
633
|
+
* @type {string}
|
|
634
|
+
* @memberof ProductConfigsApiCreateProductConfig
|
|
635
|
+
*/
|
|
636
|
+
readonly authorization?: string
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Request parameters for getProductConfig operation in ProductConfigsApi.
|
|
641
|
+
* @export
|
|
642
|
+
* @interface ProductConfigsApiGetProductConfigRequest
|
|
643
|
+
*/
|
|
644
|
+
export interface ProductConfigsApiGetProductConfigRequest {
|
|
645
|
+
/**
|
|
646
|
+
* Unique identifier for the object.
|
|
647
|
+
* @type {string}
|
|
648
|
+
* @memberof ProductConfigsApiGetProductConfig
|
|
649
|
+
*/
|
|
650
|
+
readonly code: string
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
654
|
+
* @type {string}
|
|
655
|
+
* @memberof ProductConfigsApiGetProductConfig
|
|
656
|
+
*/
|
|
657
|
+
readonly authorization?: string
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Request parameters for getProductConfigTariffs operation in ProductConfigsApi.
|
|
662
|
+
* @export
|
|
663
|
+
* @interface ProductConfigsApiGetProductConfigTariffsRequest
|
|
664
|
+
*/
|
|
665
|
+
export interface ProductConfigsApiGetProductConfigTariffsRequest {
|
|
666
|
+
/**
|
|
667
|
+
* Product version id
|
|
668
|
+
* @type {number}
|
|
669
|
+
* @memberof ProductConfigsApiGetProductConfigTariffs
|
|
670
|
+
*/
|
|
671
|
+
readonly productVersionId: number
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
675
|
+
* @type {string}
|
|
676
|
+
* @memberof ProductConfigsApiGetProductConfigTariffs
|
|
677
|
+
*/
|
|
678
|
+
readonly authorization?: string
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Request parameters for listProductConfigs operation in ProductConfigsApi.
|
|
683
|
+
* @export
|
|
684
|
+
* @interface ProductConfigsApiListProductConfigsRequest
|
|
685
|
+
*/
|
|
686
|
+
export interface ProductConfigsApiListProductConfigsRequest {
|
|
687
|
+
/**
|
|
688
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
689
|
+
* @type {string}
|
|
690
|
+
* @memberof ProductConfigsApiListProductConfigs
|
|
691
|
+
*/
|
|
692
|
+
readonly authorization?: string
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
696
|
+
* @type {number}
|
|
697
|
+
* @memberof ProductConfigsApiListProductConfigs
|
|
698
|
+
*/
|
|
699
|
+
readonly pageSize?: number
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
703
|
+
* @type {string}
|
|
704
|
+
* @memberof ProductConfigsApiListProductConfigs
|
|
705
|
+
*/
|
|
706
|
+
readonly pageToken?: string
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, slug, productSlug, productVersionId, createdAt</i>
|
|
710
|
+
* @type {string}
|
|
711
|
+
* @memberof ProductConfigsApiListProductConfigs
|
|
712
|
+
*/
|
|
713
|
+
readonly filter?: string
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* To search the list by any field, pass search=xxx to fetch the result.
|
|
717
|
+
* @type {string}
|
|
718
|
+
* @memberof ProductConfigsApiListProductConfigs
|
|
719
|
+
*/
|
|
720
|
+
readonly search?: string
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, updatedAt</i>
|
|
724
|
+
* @type {string}
|
|
725
|
+
* @memberof ProductConfigsApiListProductConfigs
|
|
726
|
+
*/
|
|
727
|
+
readonly order?: string
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
731
|
+
* @type {string}
|
|
732
|
+
* @memberof ProductConfigsApiListProductConfigs
|
|
733
|
+
*/
|
|
734
|
+
readonly expand?: string
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, slug, productSlug, productVersionId, createdAt</i>
|
|
738
|
+
* @type {string}
|
|
739
|
+
* @memberof ProductConfigsApiListProductConfigs
|
|
740
|
+
*/
|
|
741
|
+
readonly filters?: string
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Request parameters for updateProductConfig operation in ProductConfigsApi.
|
|
746
|
+
* @export
|
|
747
|
+
* @interface ProductConfigsApiUpdateProductConfigRequest
|
|
748
|
+
*/
|
|
749
|
+
export interface ProductConfigsApiUpdateProductConfigRequest {
|
|
750
|
+
/**
|
|
751
|
+
* Unique identifier for the object.
|
|
752
|
+
* @type {string}
|
|
753
|
+
* @memberof ProductConfigsApiUpdateProductConfig
|
|
754
|
+
*/
|
|
755
|
+
readonly code: string
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
|
|
759
|
+
* @type {any}
|
|
760
|
+
* @memberof ProductConfigsApiUpdateProductConfig
|
|
761
|
+
*/
|
|
762
|
+
readonly file: any
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
766
|
+
* @type {string}
|
|
767
|
+
* @memberof ProductConfigsApiUpdateProductConfig
|
|
768
|
+
*/
|
|
769
|
+
readonly authorization?: string
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* Unique identifier for the product config
|
|
773
|
+
* @type {string}
|
|
774
|
+
* @memberof ProductConfigsApiUpdateProductConfig
|
|
775
|
+
*/
|
|
776
|
+
readonly slug?: string
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* ProductConfigsApi - object-oriented interface
|
|
781
|
+
* @export
|
|
782
|
+
* @class ProductConfigsApi
|
|
783
|
+
* @extends {BaseAPI}
|
|
784
|
+
*/
|
|
785
|
+
export class ProductConfigsApi extends BaseAPI {
|
|
786
|
+
/**
|
|
787
|
+
* Calculates and returns a tariff quote with estimated invoice data. **Required Permissions** \"policy-management.products.view\"
|
|
788
|
+
* @summary Calculates a quote for a selected tariff
|
|
789
|
+
* @param {ProductConfigsApiCalculateProductTariffQuoteRequest} requestParameters Request parameters.
|
|
790
|
+
* @param {*} [options] Override http request option.
|
|
791
|
+
* @throws {RequiredError}
|
|
792
|
+
* @memberof ProductConfigsApi
|
|
793
|
+
*/
|
|
794
|
+
public calculateProductTariffQuote(requestParameters: ProductConfigsApiCalculateProductTariffQuoteRequest, options?: AxiosRequestConfig) {
|
|
795
|
+
return ProductConfigsApiFp(this.configuration).calculateProductTariffQuote(requestParameters.productVersionId, requestParameters.restCalculateProductTariffQuoteRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Creates a product config. Accepts a JSON or YAML file containing the config. **Required Permissions** \"policy-management.products.create\"
|
|
800
|
+
* @summary Creates a new product config
|
|
801
|
+
* @param {ProductConfigsApiCreateProductConfigRequest} requestParameters Request parameters.
|
|
802
|
+
* @param {*} [options] Override http request option.
|
|
803
|
+
* @throws {RequiredError}
|
|
804
|
+
* @memberof ProductConfigsApi
|
|
805
|
+
*/
|
|
806
|
+
public createProductConfig(requestParameters: ProductConfigsApiCreateProductConfigRequest, options?: AxiosRequestConfig) {
|
|
807
|
+
return ProductConfigsApiFp(this.configuration).createProductConfig(requestParameters.slug, requestParameters.productVersionId, requestParameters.file, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* Retrieves a product config by code **Required Permissions** \"policy-management.products.view\"
|
|
812
|
+
* @summary Retrieve the Product Config
|
|
813
|
+
* @param {ProductConfigsApiGetProductConfigRequest} requestParameters Request parameters.
|
|
814
|
+
* @param {*} [options] Override http request option.
|
|
815
|
+
* @throws {RequiredError}
|
|
816
|
+
* @memberof ProductConfigsApi
|
|
817
|
+
*/
|
|
818
|
+
public getProductConfig(requestParameters: ProductConfigsApiGetProductConfigRequest, options?: AxiosRequestConfig) {
|
|
819
|
+
return ProductConfigsApiFp(this.configuration).getProductConfig(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* Retrieves list of available tariffs for the product config **Required Permissions** \"policy-management.products.view\"
|
|
824
|
+
* @summary Retrieve the Product Config Tariffs
|
|
825
|
+
* @param {ProductConfigsApiGetProductConfigTariffsRequest} requestParameters Request parameters.
|
|
826
|
+
* @param {*} [options] Override http request option.
|
|
827
|
+
* @throws {RequiredError}
|
|
828
|
+
* @memberof ProductConfigsApi
|
|
829
|
+
*/
|
|
830
|
+
public getProductConfigTariffs(requestParameters: ProductConfigsApiGetProductConfigTariffsRequest, options?: AxiosRequestConfig) {
|
|
831
|
+
return ProductConfigsApiFp(this.configuration).getProductConfigTariffs(requestParameters.productVersionId, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Lists product configs **Required Permissions** \"policy-management.products.view\"
|
|
836
|
+
* @summary List Product Configs
|
|
837
|
+
* @param {ProductConfigsApiListProductConfigsRequest} requestParameters Request parameters.
|
|
838
|
+
* @param {*} [options] Override http request option.
|
|
839
|
+
* @throws {RequiredError}
|
|
840
|
+
* @memberof ProductConfigsApi
|
|
841
|
+
*/
|
|
842
|
+
public listProductConfigs(requestParameters: ProductConfigsApiListProductConfigsRequest = {}, options?: AxiosRequestConfig) {
|
|
843
|
+
return ProductConfigsApiFp(this.configuration).listProductConfigs(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* Updates a product config. Accepts a JSON or YAML file containing the config. **Required Permissions** \"policy-management.products.update\"
|
|
848
|
+
* @summary Updates a product config
|
|
849
|
+
* @param {ProductConfigsApiUpdateProductConfigRequest} requestParameters Request parameters.
|
|
850
|
+
* @param {*} [options] Override http request option.
|
|
851
|
+
* @throws {RequiredError}
|
|
852
|
+
* @memberof ProductConfigsApi
|
|
853
|
+
*/
|
|
854
|
+
public updateProductConfig(requestParameters: ProductConfigsApiUpdateProductConfigRequest, options?: AxiosRequestConfig) {
|
|
855
|
+
return ProductConfigsApiFp(this.configuration).updateProductConfig(requestParameters.code, requestParameters.file, requestParameters.authorization, requestParameters.slug, options).then((request) => request(this.axios, this.basePath));
|
|
856
|
+
}
|
|
857
|
+
}
|