@emilgroup/claim-sdk 1.17.2-beta.1 → 1.17.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/.openapi-generator/FILES +12 -1
  2. package/README.md +2 -2
  3. package/api/claim-partner-roles-api.ts +9 -9
  4. package/api/claim-regulations-api.ts +657 -0
  5. package/api/claim-statuses-api.ts +9 -9
  6. package/api/{default-api.ts → health-check-api.ts} +21 -17
  7. package/api.ts +4 -2
  8. package/base.ts +5 -1
  9. package/dist/api/claim-partner-roles-api.d.ts +9 -9
  10. package/dist/api/claim-partner-roles-api.js +3 -3
  11. package/dist/api/claim-regulations-api.d.ts +372 -0
  12. package/dist/api/claim-regulations-api.js +630 -0
  13. package/dist/api/claim-statuses-api.d.ts +9 -9
  14. package/dist/api/claim-statuses-api.js +3 -3
  15. package/dist/api/health-check-api.d.ts +70 -0
  16. package/dist/api/{default-api.js → health-check-api.js} +30 -26
  17. package/dist/api.d.ts +2 -1
  18. package/dist/api.js +2 -1
  19. package/dist/base.d.ts +1 -0
  20. package/dist/base.js +4 -1
  21. package/dist/models/create-regulation-item-request-dto.d.ts +89 -0
  22. package/dist/models/create-regulation-item-request-dto.js +34 -0
  23. package/dist/models/index.d.ts +10 -0
  24. package/dist/models/index.js +10 -0
  25. package/dist/models/list-regulations-response-class.d.ts +31 -0
  26. package/dist/models/list-regulations-response-class.js +15 -0
  27. package/dist/models/payout-details-class.d.ts +90 -0
  28. package/dist/models/payout-details-class.js +26 -0
  29. package/dist/models/payout-details-dto.d.ts +60 -0
  30. package/dist/models/payout-details-dto.js +26 -0
  31. package/dist/models/regress-details-class.d.ts +81 -0
  32. package/dist/models/regress-details-class.js +29 -0
  33. package/dist/models/regress-details-dto.d.ts +51 -0
  34. package/dist/models/regress-details-dto.js +29 -0
  35. package/dist/models/regulation-item-class.d.ts +126 -0
  36. package/dist/models/regulation-item-class.js +34 -0
  37. package/dist/models/regulation-item-response-class.d.ts +25 -0
  38. package/dist/models/regulation-item-response-class.js +15 -0
  39. package/dist/models/reserve-details-class.d.ts +59 -0
  40. package/dist/models/reserve-details-class.js +20 -0
  41. package/dist/models/reserve-details-dto.d.ts +29 -0
  42. package/dist/models/reserve-details-dto.js +20 -0
  43. package/models/create-regulation-item-request-dto.ts +99 -0
  44. package/models/index.ts +10 -0
  45. package/models/list-regulations-response-class.ts +37 -0
  46. package/models/payout-details-class.ts +100 -0
  47. package/models/payout-details-dto.ts +70 -0
  48. package/models/regress-details-class.ts +91 -0
  49. package/models/regress-details-dto.ts +61 -0
  50. package/models/regulation-item-class.ts +136 -0
  51. package/models/regulation-item-response-class.ts +31 -0
  52. package/models/reserve-details-class.ts +68 -0
  53. package/models/reserve-details-dto.ts +38 -0
  54. package/package.json +1 -1
  55. package/dist/api/default-api.d.ts +0 -66
@@ -0,0 +1,630 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL ClaimService
6
+ * The EMIL ClaimService 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.ClaimRegulationsApi = exports.ClaimRegulationsApiFactory = exports.ClaimRegulationsApiFp = exports.ClaimRegulationsApiAxiosParamCreator = 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
+ /**
89
+ * ClaimRegulationsApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var ClaimRegulationsApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * This endpoint will create a new regulation item for a claim
97
+ * @summary Create the claim regulation item
98
+ * @param {CreateRegulationItemRequestDto} createRegulationItemRequestDto
99
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ createClaimRegulation: function (createRegulationItemRequestDto, authorization, options) {
104
+ if (options === void 0) { options = {}; }
105
+ return __awaiter(_this, void 0, void 0, function () {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
+ return __generator(this, function (_a) {
108
+ switch (_a.label) {
109
+ case 0:
110
+ // verify required parameter 'createRegulationItemRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createClaimRegulation', 'createRegulationItemRequestDto', createRegulationItemRequestDto);
112
+ localVarPath = "/v1/claims/regulations";
113
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
114
+ if (configuration) {
115
+ baseOptions = configuration.baseOptions;
116
+ baseAccessToken = configuration.accessToken;
117
+ }
118
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
119
+ localVarHeaderParameter = {};
120
+ localVarQueryParameter = {};
121
+ // authentication bearer required
122
+ // http bearer authentication required
123
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ case 1:
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ _a.sent();
128
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ }
131
+ localVarHeaderParameter['Content-Type'] = 'application/json';
132
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createRegulationItemRequestDto, localVarRequestOptions, configuration);
136
+ return [2 /*return*/, {
137
+ url: (0, common_1.toPathString)(localVarUrlObj),
138
+ options: localVarRequestOptions,
139
+ }];
140
+ }
141
+ });
142
+ });
143
+ },
144
+ /**
145
+ * This will delete the regulation item identified by the code.
146
+ * @summary Delete the claim regulation item
147
+ * @param {string} code Unique identifier for the object.
148
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
149
+ * @param {*} [options] Override http request option.
150
+ * @throws {RequiredError}
151
+ */
152
+ deleteClaimRegulations: function (code, authorization, options) {
153
+ if (options === void 0) { options = {}; }
154
+ return __awaiter(_this, void 0, void 0, function () {
155
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
156
+ return __generator(this, function (_a) {
157
+ switch (_a.label) {
158
+ case 0:
159
+ // verify required parameter 'code' is not null or undefined
160
+ (0, common_1.assertParamExists)('deleteClaimRegulations', 'code', code);
161
+ localVarPath = "/v1/claims/regulations/{code}"
162
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
163
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
164
+ if (configuration) {
165
+ baseOptions = configuration.baseOptions;
166
+ baseAccessToken = configuration.accessToken;
167
+ }
168
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
169
+ localVarHeaderParameter = {};
170
+ localVarQueryParameter = {};
171
+ // authentication bearer required
172
+ // http bearer authentication required
173
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
174
+ case 1:
175
+ // authentication bearer required
176
+ // http bearer authentication required
177
+ _a.sent();
178
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
180
+ }
181
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
182
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
183
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
184
+ return [2 /*return*/, {
185
+ url: (0, common_1.toPathString)(localVarUrlObj),
186
+ options: localVarRequestOptions,
187
+ }];
188
+ }
189
+ });
190
+ });
191
+ },
192
+ /**
193
+ * Retrieves the details of the claim regulation item that was previously created. Supply the unique claim regulation item code that was returned when you created it and Emil Api will return the corresponding claim regulation item information.
194
+ * @summary Retrieve the claim regulation item
195
+ * @param {string} code
196
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
197
+ * @param {'claim'} [expand]
198
+ * @param {*} [options] Override http request option.
199
+ * @throws {RequiredError}
200
+ */
201
+ getClaimRegulation: function (code, authorization, expand, options) {
202
+ if (options === void 0) { options = {}; }
203
+ return __awaiter(_this, void 0, void 0, function () {
204
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
205
+ return __generator(this, function (_a) {
206
+ switch (_a.label) {
207
+ case 0:
208
+ // verify required parameter 'code' is not null or undefined
209
+ (0, common_1.assertParamExists)('getClaimRegulation', 'code', code);
210
+ localVarPath = "/v1/claims/regulations/{code}"
211
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
212
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
213
+ if (configuration) {
214
+ baseOptions = configuration.baseOptions;
215
+ baseAccessToken = configuration.accessToken;
216
+ }
217
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
218
+ localVarHeaderParameter = {};
219
+ localVarQueryParameter = {};
220
+ // authentication bearer required
221
+ // http bearer authentication required
222
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
223
+ case 1:
224
+ // authentication bearer required
225
+ // http bearer authentication required
226
+ _a.sent();
227
+ if (expand !== undefined) {
228
+ localVarQueryParameter['expand'] = expand;
229
+ }
230
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
232
+ }
233
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
234
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
235
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
236
+ return [2 /*return*/, {
237
+ url: (0, common_1.toPathString)(localVarUrlObj),
238
+ options: localVarRequestOptions,
239
+ }];
240
+ }
241
+ });
242
+ });
243
+ },
244
+ /**
245
+ * Returns a list of claim regulation items you have previously created. The claim regulation items are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
246
+ * @summary List claim regulation items
247
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
248
+ * @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, claimCode, amount, bookingDate, currency, regulationItemType, payoutType, regressType, reserveType, payoutStatus, regressStatus&lt;/i&gt;
249
+ * @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, claimCode, amount, bookingDate, currency, regulationItemType, payoutType, regressType, reserveType, payoutStatus, regressStatus&lt;/i&gt;
250
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, claimCode, amount, bookingDate, currency&lt;/i&gt;
251
+ * @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: amount, bookingDate, createdAt, updatedAt&lt;/i&gt;
252
+ * @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; &lt;i&gt;Allowed values: claim.&lt;i&gt;
253
+ * @param {*} [options] Override http request option.
254
+ * @throws {RequiredError}
255
+ */
256
+ listClaimRegulations: function (authorization, filter, filters, search, order, expand, options) {
257
+ if (options === void 0) { options = {}; }
258
+ return __awaiter(_this, void 0, void 0, function () {
259
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
260
+ return __generator(this, function (_a) {
261
+ switch (_a.label) {
262
+ case 0:
263
+ localVarPath = "/v1/claims/regulations";
264
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
265
+ if (configuration) {
266
+ baseOptions = configuration.baseOptions;
267
+ baseAccessToken = configuration.accessToken;
268
+ }
269
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
270
+ localVarHeaderParameter = {};
271
+ localVarQueryParameter = {};
272
+ // authentication bearer required
273
+ // http bearer authentication required
274
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
275
+ case 1:
276
+ // authentication bearer required
277
+ // http bearer authentication required
278
+ _a.sent();
279
+ if (filter !== undefined) {
280
+ localVarQueryParameter['filter'] = filter;
281
+ }
282
+ if (filters !== undefined) {
283
+ localVarQueryParameter['filters'] = filters;
284
+ }
285
+ if (search !== undefined) {
286
+ localVarQueryParameter['search'] = search;
287
+ }
288
+ if (order !== undefined) {
289
+ localVarQueryParameter['order'] = order;
290
+ }
291
+ if (expand !== undefined) {
292
+ localVarQueryParameter['expand'] = expand;
293
+ }
294
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
295
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
296
+ }
297
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
298
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
299
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
300
+ return [2 /*return*/, {
301
+ url: (0, common_1.toPathString)(localVarUrlObj),
302
+ options: localVarRequestOptions,
303
+ }];
304
+ }
305
+ });
306
+ });
307
+ },
308
+ /**
309
+ * Update a regulation item status and some other fields identified by it\'s code. A Regulation item type cannot be changed once created e.g. to change a regulation from PAYOUT to RESERVE. In case of mistakes the current regulation item should be deleted and another item should be created.
310
+ * @summary Update the claim regulation item
311
+ * @param {string} code Unique identifier for the object.
312
+ * @param {object} body
313
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
314
+ * @param {*} [options] Override http request option.
315
+ * @throws {RequiredError}
316
+ */
317
+ updateClaimRegulation: function (code, body, authorization, options) {
318
+ if (options === void 0) { options = {}; }
319
+ return __awaiter(_this, void 0, void 0, function () {
320
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
321
+ return __generator(this, function (_a) {
322
+ switch (_a.label) {
323
+ case 0:
324
+ // verify required parameter 'code' is not null or undefined
325
+ (0, common_1.assertParamExists)('updateClaimRegulation', 'code', code);
326
+ // verify required parameter 'body' is not null or undefined
327
+ (0, common_1.assertParamExists)('updateClaimRegulation', 'body', body);
328
+ localVarPath = "/v1/claims/regulations/{code}"
329
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
330
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
331
+ if (configuration) {
332
+ baseOptions = configuration.baseOptions;
333
+ baseAccessToken = configuration.accessToken;
334
+ }
335
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
336
+ localVarHeaderParameter = {};
337
+ localVarQueryParameter = {};
338
+ // authentication bearer required
339
+ // http bearer authentication required
340
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
341
+ case 1:
342
+ // authentication bearer required
343
+ // http bearer authentication required
344
+ _a.sent();
345
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
346
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
347
+ }
348
+ localVarHeaderParameter['Content-Type'] = 'application/json';
349
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
350
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
351
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
352
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
353
+ return [2 /*return*/, {
354
+ url: (0, common_1.toPathString)(localVarUrlObj),
355
+ options: localVarRequestOptions,
356
+ }];
357
+ }
358
+ });
359
+ });
360
+ },
361
+ };
362
+ };
363
+ exports.ClaimRegulationsApiAxiosParamCreator = ClaimRegulationsApiAxiosParamCreator;
364
+ /**
365
+ * ClaimRegulationsApi - functional programming interface
366
+ * @export
367
+ */
368
+ var ClaimRegulationsApiFp = function (configuration) {
369
+ var localVarAxiosParamCreator = (0, exports.ClaimRegulationsApiAxiosParamCreator)(configuration);
370
+ return {
371
+ /**
372
+ * This endpoint will create a new regulation item for a claim
373
+ * @summary Create the claim regulation item
374
+ * @param {CreateRegulationItemRequestDto} createRegulationItemRequestDto
375
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
376
+ * @param {*} [options] Override http request option.
377
+ * @throws {RequiredError}
378
+ */
379
+ createClaimRegulation: function (createRegulationItemRequestDto, authorization, options) {
380
+ return __awaiter(this, void 0, void 0, function () {
381
+ var localVarAxiosArgs;
382
+ return __generator(this, function (_a) {
383
+ switch (_a.label) {
384
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createClaimRegulation(createRegulationItemRequestDto, authorization, options)];
385
+ case 1:
386
+ localVarAxiosArgs = _a.sent();
387
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
388
+ }
389
+ });
390
+ });
391
+ },
392
+ /**
393
+ * This will delete the regulation item identified by the code.
394
+ * @summary Delete the claim regulation item
395
+ * @param {string} code Unique identifier for the object.
396
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
397
+ * @param {*} [options] Override http request option.
398
+ * @throws {RequiredError}
399
+ */
400
+ deleteClaimRegulations: function (code, authorization, options) {
401
+ return __awaiter(this, void 0, void 0, function () {
402
+ var localVarAxiosArgs;
403
+ return __generator(this, function (_a) {
404
+ switch (_a.label) {
405
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteClaimRegulations(code, authorization, options)];
406
+ case 1:
407
+ localVarAxiosArgs = _a.sent();
408
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
409
+ }
410
+ });
411
+ });
412
+ },
413
+ /**
414
+ * Retrieves the details of the claim regulation item that was previously created. Supply the unique claim regulation item code that was returned when you created it and Emil Api will return the corresponding claim regulation item information.
415
+ * @summary Retrieve the claim regulation item
416
+ * @param {string} code
417
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
418
+ * @param {'claim'} [expand]
419
+ * @param {*} [options] Override http request option.
420
+ * @throws {RequiredError}
421
+ */
422
+ getClaimRegulation: function (code, authorization, expand, options) {
423
+ return __awaiter(this, void 0, void 0, function () {
424
+ var localVarAxiosArgs;
425
+ return __generator(this, function (_a) {
426
+ switch (_a.label) {
427
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getClaimRegulation(code, authorization, expand, options)];
428
+ case 1:
429
+ localVarAxiosArgs = _a.sent();
430
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
431
+ }
432
+ });
433
+ });
434
+ },
435
+ /**
436
+ * Returns a list of claim regulation items you have previously created. The claim regulation items are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
437
+ * @summary List claim regulation items
438
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
439
+ * @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, claimCode, amount, bookingDate, currency, regulationItemType, payoutType, regressType, reserveType, payoutStatus, regressStatus&lt;/i&gt;
440
+ * @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, claimCode, amount, bookingDate, currency, regulationItemType, payoutType, regressType, reserveType, payoutStatus, regressStatus&lt;/i&gt;
441
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, claimCode, amount, bookingDate, currency&lt;/i&gt;
442
+ * @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: amount, bookingDate, createdAt, updatedAt&lt;/i&gt;
443
+ * @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; &lt;i&gt;Allowed values: claim.&lt;i&gt;
444
+ * @param {*} [options] Override http request option.
445
+ * @throws {RequiredError}
446
+ */
447
+ listClaimRegulations: function (authorization, filter, filters, search, order, expand, options) {
448
+ return __awaiter(this, void 0, void 0, function () {
449
+ var localVarAxiosArgs;
450
+ return __generator(this, function (_a) {
451
+ switch (_a.label) {
452
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listClaimRegulations(authorization, filter, filters, search, order, expand, options)];
453
+ case 1:
454
+ localVarAxiosArgs = _a.sent();
455
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
456
+ }
457
+ });
458
+ });
459
+ },
460
+ /**
461
+ * Update a regulation item status and some other fields identified by it\'s code. A Regulation item type cannot be changed once created e.g. to change a regulation from PAYOUT to RESERVE. In case of mistakes the current regulation item should be deleted and another item should be created.
462
+ * @summary Update the claim regulation item
463
+ * @param {string} code Unique identifier for the object.
464
+ * @param {object} body
465
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
466
+ * @param {*} [options] Override http request option.
467
+ * @throws {RequiredError}
468
+ */
469
+ updateClaimRegulation: function (code, body, authorization, options) {
470
+ return __awaiter(this, void 0, void 0, function () {
471
+ var localVarAxiosArgs;
472
+ return __generator(this, function (_a) {
473
+ switch (_a.label) {
474
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateClaimRegulation(code, body, authorization, options)];
475
+ case 1:
476
+ localVarAxiosArgs = _a.sent();
477
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
478
+ }
479
+ });
480
+ });
481
+ },
482
+ };
483
+ };
484
+ exports.ClaimRegulationsApiFp = ClaimRegulationsApiFp;
485
+ /**
486
+ * ClaimRegulationsApi - factory interface
487
+ * @export
488
+ */
489
+ var ClaimRegulationsApiFactory = function (configuration, basePath, axios) {
490
+ var localVarFp = (0, exports.ClaimRegulationsApiFp)(configuration);
491
+ return {
492
+ /**
493
+ * This endpoint will create a new regulation item for a claim
494
+ * @summary Create the claim regulation item
495
+ * @param {CreateRegulationItemRequestDto} createRegulationItemRequestDto
496
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
497
+ * @param {*} [options] Override http request option.
498
+ * @throws {RequiredError}
499
+ */
500
+ createClaimRegulation: function (createRegulationItemRequestDto, authorization, options) {
501
+ return localVarFp.createClaimRegulation(createRegulationItemRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
502
+ },
503
+ /**
504
+ * This will delete the regulation item identified by the code.
505
+ * @summary Delete the claim regulation item
506
+ * @param {string} code Unique identifier for the object.
507
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
508
+ * @param {*} [options] Override http request option.
509
+ * @throws {RequiredError}
510
+ */
511
+ deleteClaimRegulations: function (code, authorization, options) {
512
+ return localVarFp.deleteClaimRegulations(code, authorization, options).then(function (request) { return request(axios, basePath); });
513
+ },
514
+ /**
515
+ * Retrieves the details of the claim regulation item that was previously created. Supply the unique claim regulation item code that was returned when you created it and Emil Api will return the corresponding claim regulation item information.
516
+ * @summary Retrieve the claim regulation item
517
+ * @param {string} code
518
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
519
+ * @param {'claim'} [expand]
520
+ * @param {*} [options] Override http request option.
521
+ * @throws {RequiredError}
522
+ */
523
+ getClaimRegulation: function (code, authorization, expand, options) {
524
+ return localVarFp.getClaimRegulation(code, authorization, expand, options).then(function (request) { return request(axios, basePath); });
525
+ },
526
+ /**
527
+ * Returns a list of claim regulation items you have previously created. The claim regulation items are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
528
+ * @summary List claim regulation items
529
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
530
+ * @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, claimCode, amount, bookingDate, currency, regulationItemType, payoutType, regressType, reserveType, payoutStatus, regressStatus&lt;/i&gt;
531
+ * @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, claimCode, amount, bookingDate, currency, regulationItemType, payoutType, regressType, reserveType, payoutStatus, regressStatus&lt;/i&gt;
532
+ * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, claimCode, amount, bookingDate, currency&lt;/i&gt;
533
+ * @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: amount, bookingDate, createdAt, updatedAt&lt;/i&gt;
534
+ * @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; &lt;i&gt;Allowed values: claim.&lt;i&gt;
535
+ * @param {*} [options] Override http request option.
536
+ * @throws {RequiredError}
537
+ */
538
+ listClaimRegulations: function (authorization, filter, filters, search, order, expand, options) {
539
+ return localVarFp.listClaimRegulations(authorization, filter, filters, search, order, expand, options).then(function (request) { return request(axios, basePath); });
540
+ },
541
+ /**
542
+ * Update a regulation item status and some other fields identified by it\'s code. A Regulation item type cannot be changed once created e.g. to change a regulation from PAYOUT to RESERVE. In case of mistakes the current regulation item should be deleted and another item should be created.
543
+ * @summary Update the claim regulation item
544
+ * @param {string} code Unique identifier for the object.
545
+ * @param {object} body
546
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
547
+ * @param {*} [options] Override http request option.
548
+ * @throws {RequiredError}
549
+ */
550
+ updateClaimRegulation: function (code, body, authorization, options) {
551
+ return localVarFp.updateClaimRegulation(code, body, authorization, options).then(function (request) { return request(axios, basePath); });
552
+ },
553
+ };
554
+ };
555
+ exports.ClaimRegulationsApiFactory = ClaimRegulationsApiFactory;
556
+ /**
557
+ * ClaimRegulationsApi - object-oriented interface
558
+ * @export
559
+ * @class ClaimRegulationsApi
560
+ * @extends {BaseAPI}
561
+ */
562
+ var ClaimRegulationsApi = /** @class */ (function (_super) {
563
+ __extends(ClaimRegulationsApi, _super);
564
+ function ClaimRegulationsApi() {
565
+ return _super !== null && _super.apply(this, arguments) || this;
566
+ }
567
+ /**
568
+ * This endpoint will create a new regulation item for a claim
569
+ * @summary Create the claim regulation item
570
+ * @param {ClaimRegulationsApiCreateClaimRegulationRequest} requestParameters Request parameters.
571
+ * @param {*} [options] Override http request option.
572
+ * @throws {RequiredError}
573
+ * @memberof ClaimRegulationsApi
574
+ */
575
+ ClaimRegulationsApi.prototype.createClaimRegulation = function (requestParameters, options) {
576
+ var _this = this;
577
+ return (0, exports.ClaimRegulationsApiFp)(this.configuration).createClaimRegulation(requestParameters.createRegulationItemRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
578
+ };
579
+ /**
580
+ * This will delete the regulation item identified by the code.
581
+ * @summary Delete the claim regulation item
582
+ * @param {ClaimRegulationsApiDeleteClaimRegulationsRequest} requestParameters Request parameters.
583
+ * @param {*} [options] Override http request option.
584
+ * @throws {RequiredError}
585
+ * @memberof ClaimRegulationsApi
586
+ */
587
+ ClaimRegulationsApi.prototype.deleteClaimRegulations = function (requestParameters, options) {
588
+ var _this = this;
589
+ return (0, exports.ClaimRegulationsApiFp)(this.configuration).deleteClaimRegulations(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
590
+ };
591
+ /**
592
+ * Retrieves the details of the claim regulation item that was previously created. Supply the unique claim regulation item code that was returned when you created it and Emil Api will return the corresponding claim regulation item information.
593
+ * @summary Retrieve the claim regulation item
594
+ * @param {ClaimRegulationsApiGetClaimRegulationRequest} requestParameters Request parameters.
595
+ * @param {*} [options] Override http request option.
596
+ * @throws {RequiredError}
597
+ * @memberof ClaimRegulationsApi
598
+ */
599
+ ClaimRegulationsApi.prototype.getClaimRegulation = function (requestParameters, options) {
600
+ var _this = this;
601
+ return (0, exports.ClaimRegulationsApiFp)(this.configuration).getClaimRegulation(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
602
+ };
603
+ /**
604
+ * Returns a list of claim regulation items you have previously created. The claim regulation items are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
605
+ * @summary List claim regulation items
606
+ * @param {ClaimRegulationsApiListClaimRegulationsRequest} requestParameters Request parameters.
607
+ * @param {*} [options] Override http request option.
608
+ * @throws {RequiredError}
609
+ * @memberof ClaimRegulationsApi
610
+ */
611
+ ClaimRegulationsApi.prototype.listClaimRegulations = function (requestParameters, options) {
612
+ var _this = this;
613
+ if (requestParameters === void 0) { requestParameters = {}; }
614
+ return (0, exports.ClaimRegulationsApiFp)(this.configuration).listClaimRegulations(requestParameters.authorization, requestParameters.filter, requestParameters.filters, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
615
+ };
616
+ /**
617
+ * Update a regulation item status and some other fields identified by it\'s code. A Regulation item type cannot be changed once created e.g. to change a regulation from PAYOUT to RESERVE. In case of mistakes the current regulation item should be deleted and another item should be created.
618
+ * @summary Update the claim regulation item
619
+ * @param {ClaimRegulationsApiUpdateClaimRegulationRequest} requestParameters Request parameters.
620
+ * @param {*} [options] Override http request option.
621
+ * @throws {RequiredError}
622
+ * @memberof ClaimRegulationsApi
623
+ */
624
+ ClaimRegulationsApi.prototype.updateClaimRegulation = function (requestParameters, options) {
625
+ var _this = this;
626
+ return (0, exports.ClaimRegulationsApiFp)(this.configuration).updateClaimRegulation(requestParameters.code, requestParameters.body, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
627
+ };
628
+ return ClaimRegulationsApi;
629
+ }(base_1.BaseAPI));
630
+ exports.ClaimRegulationsApi = ClaimRegulationsApi;