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