@emilgroup/claim-sdk-node 1.9.0 → 1.10.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 (68) hide show
  1. package/README.md +2 -2
  2. package/package.json +2 -2
  3. package/dist/api/claim-statuses-api.d.ts +0 -309
  4. package/dist/api/claim-statuses-api.js +0 -535
  5. package/dist/api/claims-api.d.ts +0 -441
  6. package/dist/api/claims-api.js +0 -733
  7. package/dist/api/default-api.d.ts +0 -66
  8. package/dist/api/default-api.js +0 -200
  9. package/dist/api/settlements-api.d.ts +0 -375
  10. package/dist/api/settlements-api.js +0 -634
  11. package/dist/api.d.ts +0 -15
  12. package/dist/api.js +0 -33
  13. package/dist/base.d.ts +0 -78
  14. package/dist/base.js +0 -394
  15. package/dist/common.d.ts +0 -92
  16. package/dist/common.js +0 -277
  17. package/dist/configuration.d.ts +0 -90
  18. package/dist/configuration.js +0 -44
  19. package/dist/index.d.ts +0 -15
  20. package/dist/index.js +0 -36
  21. package/dist/models/claim-class.d.ts +0 -156
  22. package/dist/models/claim-class.js +0 -15
  23. package/dist/models/claim-status-class.d.ts +0 -36
  24. package/dist/models/claim-status-class.js +0 -15
  25. package/dist/models/create-claim-request-dto.d.ts +0 -126
  26. package/dist/models/create-claim-request-dto.js +0 -15
  27. package/dist/models/create-claim-response-class.d.ts +0 -25
  28. package/dist/models/create-claim-response-class.js +0 -15
  29. package/dist/models/create-claim-status-request-dto.d.ts +0 -30
  30. package/dist/models/create-claim-status-request-dto.js +0 -15
  31. package/dist/models/create-claim-status-response-class.d.ts +0 -25
  32. package/dist/models/create-claim-status-response-class.js +0 -15
  33. package/dist/models/create-settlement-request-dto.d.ts +0 -48
  34. package/dist/models/create-settlement-request-dto.js +0 -15
  35. package/dist/models/create-settlement-response-class.d.ts +0 -25
  36. package/dist/models/create-settlement-response-class.js +0 -15
  37. package/dist/models/get-claim-response-class.d.ts +0 -25
  38. package/dist/models/get-claim-response-class.js +0 -15
  39. package/dist/models/get-claim-status-response-class.d.ts +0 -25
  40. package/dist/models/get-claim-status-response-class.js +0 -15
  41. package/dist/models/get-settlement-response-class.d.ts +0 -25
  42. package/dist/models/get-settlement-response-class.js +0 -15
  43. package/dist/models/index.d.ts +0 -23
  44. package/dist/models/index.js +0 -39
  45. package/dist/models/inline-response200.d.ts +0 -54
  46. package/dist/models/inline-response200.js +0 -15
  47. package/dist/models/inline-response503.d.ts +0 -54
  48. package/dist/models/inline-response503.js +0 -15
  49. package/dist/models/list-claim-statuses-response-class.d.ts +0 -31
  50. package/dist/models/list-claim-statuses-response-class.js +0 -15
  51. package/dist/models/list-claims-response-class.d.ts +0 -31
  52. package/dist/models/list-claims-response-class.js +0 -15
  53. package/dist/models/list-settlements-response-class.d.ts +0 -31
  54. package/dist/models/list-settlements-response-class.js +0 -15
  55. package/dist/models/patch-claim-request-dto.d.ts +0 -126
  56. package/dist/models/patch-claim-request-dto.js +0 -15
  57. package/dist/models/patch-claim-response-class.d.ts +0 -25
  58. package/dist/models/patch-claim-response-class.js +0 -15
  59. package/dist/models/settlement-class.d.ts +0 -78
  60. package/dist/models/settlement-class.js +0 -15
  61. package/dist/models/update-claim-request-dto.d.ts +0 -126
  62. package/dist/models/update-claim-request-dto.js +0 -15
  63. package/dist/models/update-claim-response-class.d.ts +0 -25
  64. package/dist/models/update-claim-response-class.js +0 -15
  65. package/dist/models/update-settlement-request-dto.d.ts +0 -54
  66. package/dist/models/update-settlement-request-dto.js +0 -15
  67. package/dist/models/update-settlement-response-class.d.ts +0 -25
  68. package/dist/models/update-settlement-response-class.js +0 -15
@@ -1,733 +0,0 @@
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.ClaimsApi = exports.ClaimsApiFactory = exports.ClaimsApiFp = exports.ClaimsApiAxiosParamCreator = 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
- * ClaimsApi - axios parameter creator
94
- * @export
95
- */
96
- var ClaimsApiAxiosParamCreator = function (configuration) {
97
- var _this = this;
98
- return {
99
- /**
100
- * This will create a claim in the database
101
- * @summary Create the claim
102
- * @param {CreateClaimRequestDto} createClaimRequestDto
103
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
104
- * @param {*} [options] Override http request option.
105
- * @throws {RequiredError}
106
- */
107
- createClaim: function (createClaimRequestDto, authorization, options) {
108
- if (options === void 0) { options = {}; }
109
- return __awaiter(_this, void 0, void 0, function () {
110
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
- return __generator(this, function (_a) {
112
- switch (_a.label) {
113
- case 0:
114
- // verify required parameter 'createClaimRequestDto' is not null or undefined
115
- (0, common_1.assertParamExists)('createClaim', 'createClaimRequestDto', createClaimRequestDto);
116
- localVarPath = "/v1/claims";
117
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
118
- if (configuration) {
119
- baseOptions = configuration.baseOptions;
120
- baseAccessToken = configuration.accessToken;
121
- }
122
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
123
- localVarHeaderParameter = {};
124
- localVarQueryParameter = {};
125
- // authentication bearer required
126
- // http bearer authentication required
127
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
- case 1:
129
- // authentication bearer required
130
- // http bearer authentication required
131
- _a.sent();
132
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
- }
135
- localVarHeaderParameter['Content-Type'] = 'application/json';
136
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createClaimRequestDto, localVarRequestOptions, configuration);
140
- return [2 /*return*/, {
141
- url: (0, common_1.toPathString)(localVarUrlObj),
142
- options: localVarRequestOptions,
143
- }];
144
- }
145
- });
146
- });
147
- },
148
- /**
149
- * This will delete the requested claim from the database.
150
- * @summary Delete the claim
151
- * @param {string} code
152
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
153
- * @param {*} [options] Override http request option.
154
- * @throws {RequiredError}
155
- */
156
- deleteClaim: function (code, authorization, options) {
157
- if (options === void 0) { options = {}; }
158
- return __awaiter(_this, void 0, void 0, function () {
159
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
- return __generator(this, function (_a) {
161
- switch (_a.label) {
162
- case 0:
163
- // verify required parameter 'code' is not null or undefined
164
- (0, common_1.assertParamExists)('deleteClaim', 'code', code);
165
- localVarPath = "/v1/claims/{code}"
166
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
167
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
168
- if (configuration) {
169
- baseOptions = configuration.baseOptions;
170
- baseAccessToken = configuration.accessToken;
171
- }
172
- localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
173
- localVarHeaderParameter = {};
174
- localVarQueryParameter = {};
175
- // authentication bearer required
176
- // http bearer authentication required
177
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
178
- case 1:
179
- // authentication bearer required
180
- // http bearer authentication required
181
- _a.sent();
182
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
184
- }
185
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
- return [2 /*return*/, {
189
- url: (0, common_1.toPathString)(localVarUrlObj),
190
- options: localVarRequestOptions,
191
- }];
192
- }
193
- });
194
- });
195
- },
196
- /**
197
- * This will fetch the identified claim from the database by code
198
- * @summary Retrieve the claim
199
- * @param {string} code
200
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
201
- * @param {*} [options] Override http request option.
202
- * @throws {RequiredError}
203
- */
204
- getClaim: function (code, authorization, options) {
205
- if (options === void 0) { options = {}; }
206
- return __awaiter(_this, void 0, void 0, function () {
207
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
208
- return __generator(this, function (_a) {
209
- switch (_a.label) {
210
- case 0:
211
- // verify required parameter 'code' is not null or undefined
212
- (0, common_1.assertParamExists)('getClaim', 'code', code);
213
- localVarPath = "/v1/claims/{code}"
214
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
215
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
216
- if (configuration) {
217
- baseOptions = configuration.baseOptions;
218
- baseAccessToken = configuration.accessToken;
219
- }
220
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
221
- localVarHeaderParameter = {};
222
- localVarQueryParameter = {};
223
- // authentication bearer required
224
- // http bearer authentication required
225
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
226
- case 1:
227
- // authentication bearer required
228
- // http bearer authentication required
229
- _a.sent();
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 claims you have previously created. The claims are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
246
- * @summary List claims
247
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
248
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
249
- * @param {any} [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.
250
- * @param {'policyNumber' | 'productId' | 'accountCode' | 'insuredObjectId' | 'policyCode'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
251
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
252
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
253
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
254
- * @param {*} [options] Override http request option.
255
- * @throws {RequiredError}
256
- */
257
- listClaims: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
258
- if (options === void 0) { options = {}; }
259
- return __awaiter(_this, void 0, void 0, function () {
260
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
261
- return __generator(this, function (_a) {
262
- switch (_a.label) {
263
- case 0:
264
- localVarPath = "/v1/claims";
265
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
266
- if (configuration) {
267
- baseOptions = configuration.baseOptions;
268
- baseAccessToken = configuration.accessToken;
269
- }
270
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
271
- localVarHeaderParameter = {};
272
- localVarQueryParameter = {};
273
- // authentication bearer required
274
- // http bearer authentication required
275
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
276
- case 1:
277
- // authentication bearer required
278
- // http bearer authentication required
279
- _a.sent();
280
- if (pageSize !== undefined) {
281
- localVarQueryParameter['pageSize'] = pageSize;
282
- }
283
- if (pageToken !== undefined) {
284
- localVarQueryParameter['pageToken'] = pageToken;
285
- }
286
- if (filter !== undefined) {
287
- localVarQueryParameter['filter'] = filter;
288
- }
289
- if (search !== undefined) {
290
- localVarQueryParameter['search'] = search;
291
- }
292
- if (order !== undefined) {
293
- localVarQueryParameter['order'] = order;
294
- }
295
- if (expand !== undefined) {
296
- localVarQueryParameter['expand'] = expand;
297
- }
298
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
299
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
300
- }
301
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
302
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
303
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
304
- return [2 /*return*/, {
305
- url: (0, common_1.toPathString)(localVarUrlObj),
306
- options: localVarRequestOptions,
307
- }];
308
- }
309
- });
310
- });
311
- },
312
- /**
313
- * Updates the identified claim by setting the values of the provided parameters. Any parameters not provided will be left unchanged.
314
- * @summary Patch the claim
315
- * @param {string} code
316
- * @param {PatchClaimRequestDto} patchClaimRequestDto
317
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
318
- * @param {*} [options] Override http request option.
319
- * @throws {RequiredError}
320
- */
321
- patchClaim: function (code, patchClaimRequestDto, authorization, options) {
322
- if (options === void 0) { options = {}; }
323
- return __awaiter(_this, void 0, void 0, function () {
324
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
325
- return __generator(this, function (_a) {
326
- switch (_a.label) {
327
- case 0:
328
- // verify required parameter 'code' is not null or undefined
329
- (0, common_1.assertParamExists)('patchClaim', 'code', code);
330
- // verify required parameter 'patchClaimRequestDto' is not null or undefined
331
- (0, common_1.assertParamExists)('patchClaim', 'patchClaimRequestDto', patchClaimRequestDto);
332
- localVarPath = "/v1/claims/{code}"
333
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
334
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
335
- if (configuration) {
336
- baseOptions = configuration.baseOptions;
337
- baseAccessToken = configuration.accessToken;
338
- }
339
- localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
340
- localVarHeaderParameter = {};
341
- localVarQueryParameter = {};
342
- // authentication bearer required
343
- // http bearer authentication required
344
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
345
- case 1:
346
- // authentication bearer required
347
- // http bearer authentication required
348
- _a.sent();
349
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
350
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
351
- }
352
- localVarHeaderParameter['Content-Type'] = 'application/json';
353
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
354
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
355
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
356
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(patchClaimRequestDto, localVarRequestOptions, configuration);
357
- return [2 /*return*/, {
358
- url: (0, common_1.toPathString)(localVarUrlObj),
359
- options: localVarRequestOptions,
360
- }];
361
- }
362
- });
363
- });
364
- },
365
- /**
366
- * This will update the identified claim in the database
367
- * @summary Update the claim
368
- * @param {string} code
369
- * @param {UpdateClaimRequestDto} updateClaimRequestDto
370
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
371
- * @param {*} [options] Override http request option.
372
- * @throws {RequiredError}
373
- */
374
- updateClaim: function (code, updateClaimRequestDto, authorization, options) {
375
- if (options === void 0) { options = {}; }
376
- return __awaiter(_this, void 0, void 0, function () {
377
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
378
- return __generator(this, function (_a) {
379
- switch (_a.label) {
380
- case 0:
381
- // verify required parameter 'code' is not null or undefined
382
- (0, common_1.assertParamExists)('updateClaim', 'code', code);
383
- // verify required parameter 'updateClaimRequestDto' is not null or undefined
384
- (0, common_1.assertParamExists)('updateClaim', 'updateClaimRequestDto', updateClaimRequestDto);
385
- localVarPath = "/v1/claims/{code}"
386
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
387
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
388
- if (configuration) {
389
- baseOptions = configuration.baseOptions;
390
- baseAccessToken = configuration.accessToken;
391
- }
392
- localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
393
- localVarHeaderParameter = {};
394
- localVarQueryParameter = {};
395
- // authentication bearer required
396
- // http bearer authentication required
397
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
398
- case 1:
399
- // authentication bearer required
400
- // http bearer authentication required
401
- _a.sent();
402
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
403
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
404
- }
405
- localVarHeaderParameter['Content-Type'] = 'application/json';
406
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
407
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
408
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
409
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateClaimRequestDto, localVarRequestOptions, configuration);
410
- return [2 /*return*/, {
411
- url: (0, common_1.toPathString)(localVarUrlObj),
412
- options: localVarRequestOptions,
413
- }];
414
- }
415
- });
416
- });
417
- },
418
- };
419
- };
420
- exports.ClaimsApiAxiosParamCreator = ClaimsApiAxiosParamCreator;
421
- /**
422
- * ClaimsApi - functional programming interface
423
- * @export
424
- */
425
- var ClaimsApiFp = function (configuration) {
426
- var localVarAxiosParamCreator = (0, exports.ClaimsApiAxiosParamCreator)(configuration);
427
- return {
428
- /**
429
- * This will create a claim in the database
430
- * @summary Create the claim
431
- * @param {CreateClaimRequestDto} createClaimRequestDto
432
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
433
- * @param {*} [options] Override http request option.
434
- * @throws {RequiredError}
435
- */
436
- createClaim: function (createClaimRequestDto, authorization, options) {
437
- return __awaiter(this, void 0, void 0, function () {
438
- var localVarAxiosArgs;
439
- return __generator(this, function (_a) {
440
- switch (_a.label) {
441
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.createClaim(createClaimRequestDto, authorization, options)];
442
- case 1:
443
- localVarAxiosArgs = _a.sent();
444
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
445
- }
446
- });
447
- });
448
- },
449
- /**
450
- * This will delete the requested claim from the database.
451
- * @summary Delete the claim
452
- * @param {string} code
453
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
454
- * @param {*} [options] Override http request option.
455
- * @throws {RequiredError}
456
- */
457
- deleteClaim: function (code, authorization, options) {
458
- return __awaiter(this, void 0, void 0, function () {
459
- var localVarAxiosArgs;
460
- return __generator(this, function (_a) {
461
- switch (_a.label) {
462
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteClaim(code, authorization, options)];
463
- case 1:
464
- localVarAxiosArgs = _a.sent();
465
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
466
- }
467
- });
468
- });
469
- },
470
- /**
471
- * This will fetch the identified claim from the database by code
472
- * @summary Retrieve the claim
473
- * @param {string} code
474
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
475
- * @param {*} [options] Override http request option.
476
- * @throws {RequiredError}
477
- */
478
- getClaim: function (code, authorization, options) {
479
- return __awaiter(this, void 0, void 0, function () {
480
- var localVarAxiosArgs;
481
- return __generator(this, function (_a) {
482
- switch (_a.label) {
483
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getClaim(code, authorization, options)];
484
- case 1:
485
- localVarAxiosArgs = _a.sent();
486
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
487
- }
488
- });
489
- });
490
- },
491
- /**
492
- * Returns a list of claims you have previously created. The claims are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
493
- * @summary List claims
494
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
495
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
496
- * @param {any} [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.
497
- * @param {'policyNumber' | 'productId' | 'accountCode' | 'insuredObjectId' | 'policyCode'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
498
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
499
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
500
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
501
- * @param {*} [options] Override http request option.
502
- * @throws {RequiredError}
503
- */
504
- listClaims: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
505
- return __awaiter(this, void 0, void 0, function () {
506
- var localVarAxiosArgs;
507
- return __generator(this, function (_a) {
508
- switch (_a.label) {
509
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listClaims(authorization, pageSize, pageToken, filter, search, order, expand, options)];
510
- case 1:
511
- localVarAxiosArgs = _a.sent();
512
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
513
- }
514
- });
515
- });
516
- },
517
- /**
518
- * Updates the identified claim by setting the values of the provided parameters. Any parameters not provided will be left unchanged.
519
- * @summary Patch the claim
520
- * @param {string} code
521
- * @param {PatchClaimRequestDto} patchClaimRequestDto
522
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
523
- * @param {*} [options] Override http request option.
524
- * @throws {RequiredError}
525
- */
526
- patchClaim: function (code, patchClaimRequestDto, authorization, options) {
527
- return __awaiter(this, void 0, void 0, function () {
528
- var localVarAxiosArgs;
529
- return __generator(this, function (_a) {
530
- switch (_a.label) {
531
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.patchClaim(code, patchClaimRequestDto, authorization, options)];
532
- case 1:
533
- localVarAxiosArgs = _a.sent();
534
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
535
- }
536
- });
537
- });
538
- },
539
- /**
540
- * This will update the identified claim in the database
541
- * @summary Update the claim
542
- * @param {string} code
543
- * @param {UpdateClaimRequestDto} updateClaimRequestDto
544
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
545
- * @param {*} [options] Override http request option.
546
- * @throws {RequiredError}
547
- */
548
- updateClaim: function (code, updateClaimRequestDto, authorization, options) {
549
- return __awaiter(this, void 0, void 0, function () {
550
- var localVarAxiosArgs;
551
- return __generator(this, function (_a) {
552
- switch (_a.label) {
553
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateClaim(code, updateClaimRequestDto, authorization, options)];
554
- case 1:
555
- localVarAxiosArgs = _a.sent();
556
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
557
- }
558
- });
559
- });
560
- },
561
- };
562
- };
563
- exports.ClaimsApiFp = ClaimsApiFp;
564
- /**
565
- * ClaimsApi - factory interface
566
- * @export
567
- */
568
- var ClaimsApiFactory = function (configuration, basePath, axios) {
569
- var localVarFp = (0, exports.ClaimsApiFp)(configuration);
570
- return {
571
- /**
572
- * This will create a claim in the database
573
- * @summary Create the claim
574
- * @param {CreateClaimRequestDto} createClaimRequestDto
575
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
576
- * @param {*} [options] Override http request option.
577
- * @throws {RequiredError}
578
- */
579
- createClaim: function (createClaimRequestDto, authorization, options) {
580
- return localVarFp.createClaim(createClaimRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
581
- },
582
- /**
583
- * This will delete the requested claim from the database.
584
- * @summary Delete the claim
585
- * @param {string} code
586
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
587
- * @param {*} [options] Override http request option.
588
- * @throws {RequiredError}
589
- */
590
- deleteClaim: function (code, authorization, options) {
591
- return localVarFp.deleteClaim(code, authorization, options).then(function (request) { return request(axios, basePath); });
592
- },
593
- /**
594
- * This will fetch the identified claim from the database by code
595
- * @summary Retrieve the claim
596
- * @param {string} code
597
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
598
- * @param {*} [options] Override http request option.
599
- * @throws {RequiredError}
600
- */
601
- getClaim: function (code, authorization, options) {
602
- return localVarFp.getClaim(code, authorization, options).then(function (request) { return request(axios, basePath); });
603
- },
604
- /**
605
- * Returns a list of claims you have previously created. The claims are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
606
- * @summary List claims
607
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
608
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
609
- * @param {any} [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.
610
- * @param {'policyNumber' | 'productId' | 'accountCode' | 'insuredObjectId' | 'policyCode'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
611
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
612
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
613
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
614
- * @param {*} [options] Override http request option.
615
- * @throws {RequiredError}
616
- */
617
- listClaims: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
618
- return localVarFp.listClaims(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
619
- },
620
- /**
621
- * Updates the identified claim by setting the values of the provided parameters. Any parameters not provided will be left unchanged.
622
- * @summary Patch the claim
623
- * @param {string} code
624
- * @param {PatchClaimRequestDto} patchClaimRequestDto
625
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
626
- * @param {*} [options] Override http request option.
627
- * @throws {RequiredError}
628
- */
629
- patchClaim: function (code, patchClaimRequestDto, authorization, options) {
630
- return localVarFp.patchClaim(code, patchClaimRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
631
- },
632
- /**
633
- * This will update the identified claim in the database
634
- * @summary Update the claim
635
- * @param {string} code
636
- * @param {UpdateClaimRequestDto} updateClaimRequestDto
637
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
638
- * @param {*} [options] Override http request option.
639
- * @throws {RequiredError}
640
- */
641
- updateClaim: function (code, updateClaimRequestDto, authorization, options) {
642
- return localVarFp.updateClaim(code, updateClaimRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
643
- },
644
- };
645
- };
646
- exports.ClaimsApiFactory = ClaimsApiFactory;
647
- /**
648
- * ClaimsApi - object-oriented interface
649
- * @export
650
- * @class ClaimsApi
651
- * @extends {BaseAPI}
652
- */
653
- var ClaimsApi = /** @class */ (function (_super) {
654
- __extends(ClaimsApi, _super);
655
- function ClaimsApi() {
656
- return _super !== null && _super.apply(this, arguments) || this;
657
- }
658
- /**
659
- * This will create a claim in the database
660
- * @summary Create the claim
661
- * @param {ClaimsApiCreateClaimRequest} requestParameters Request parameters.
662
- * @param {*} [options] Override http request option.
663
- * @throws {RequiredError}
664
- * @memberof ClaimsApi
665
- */
666
- ClaimsApi.prototype.createClaim = function (requestParameters, options) {
667
- var _this = this;
668
- return (0, exports.ClaimsApiFp)(this.configuration).createClaim(requestParameters.createClaimRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
669
- };
670
- /**
671
- * This will delete the requested claim from the database.
672
- * @summary Delete the claim
673
- * @param {ClaimsApiDeleteClaimRequest} requestParameters Request parameters.
674
- * @param {*} [options] Override http request option.
675
- * @throws {RequiredError}
676
- * @memberof ClaimsApi
677
- */
678
- ClaimsApi.prototype.deleteClaim = function (requestParameters, options) {
679
- var _this = this;
680
- return (0, exports.ClaimsApiFp)(this.configuration).deleteClaim(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
681
- };
682
- /**
683
- * This will fetch the identified claim from the database by code
684
- * @summary Retrieve the claim
685
- * @param {ClaimsApiGetClaimRequest} requestParameters Request parameters.
686
- * @param {*} [options] Override http request option.
687
- * @throws {RequiredError}
688
- * @memberof ClaimsApi
689
- */
690
- ClaimsApi.prototype.getClaim = function (requestParameters, options) {
691
- var _this = this;
692
- return (0, exports.ClaimsApiFp)(this.configuration).getClaim(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
693
- };
694
- /**
695
- * Returns a list of claims you have previously created. The claims are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
696
- * @summary List claims
697
- * @param {ClaimsApiListClaimsRequest} requestParameters Request parameters.
698
- * @param {*} [options] Override http request option.
699
- * @throws {RequiredError}
700
- * @memberof ClaimsApi
701
- */
702
- ClaimsApi.prototype.listClaims = function (requestParameters, options) {
703
- var _this = this;
704
- if (requestParameters === void 0) { requestParameters = {}; }
705
- return (0, exports.ClaimsApiFp)(this.configuration).listClaims(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
706
- };
707
- /**
708
- * Updates the identified claim by setting the values of the provided parameters. Any parameters not provided will be left unchanged.
709
- * @summary Patch the claim
710
- * @param {ClaimsApiPatchClaimRequest} requestParameters Request parameters.
711
- * @param {*} [options] Override http request option.
712
- * @throws {RequiredError}
713
- * @memberof ClaimsApi
714
- */
715
- ClaimsApi.prototype.patchClaim = function (requestParameters, options) {
716
- var _this = this;
717
- return (0, exports.ClaimsApiFp)(this.configuration).patchClaim(requestParameters.code, requestParameters.patchClaimRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
718
- };
719
- /**
720
- * This will update the identified claim in the database
721
- * @summary Update the claim
722
- * @param {ClaimsApiUpdateClaimRequest} requestParameters Request parameters.
723
- * @param {*} [options] Override http request option.
724
- * @throws {RequiredError}
725
- * @memberof ClaimsApi
726
- */
727
- ClaimsApi.prototype.updateClaim = function (requestParameters, options) {
728
- var _this = this;
729
- return (0, exports.ClaimsApiFp)(this.configuration).updateClaim(requestParameters.code, requestParameters.updateClaimRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
730
- };
731
- return ClaimsApi;
732
- }(base_1.BaseAPI));
733
- exports.ClaimsApi = ClaimsApi;