@emilgroup/claim-sdk 1.0.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 (106) hide show
  1. package/.openapi-generator/FILES +40 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +51 -0
  5. package/api/claim-statuses-api.ts +543 -0
  6. package/api/claims-api.ts +783 -0
  7. package/api/default-api.ts +120 -0
  8. package/api/settlements-api.ts +663 -0
  9. package/api.ts +33 -0
  10. package/base.ts +250 -0
  11. package/common.ts +198 -0
  12. package/configuration.ts +101 -0
  13. package/dist/api/claim-statuses-api.d.ts +309 -0
  14. package/dist/api/claim-statuses-api.js +531 -0
  15. package/dist/api/claims-api.d.ts +441 -0
  16. package/dist/api/claims-api.js +729 -0
  17. package/dist/api/default-api.d.ts +66 -0
  18. package/dist/api/default-api.js +196 -0
  19. package/dist/api/settlements-api.d.ts +375 -0
  20. package/dist/api/settlements-api.js +630 -0
  21. package/dist/api.d.ts +15 -0
  22. package/dist/api.js +33 -0
  23. package/dist/base.d.ts +73 -0
  24. package/dist/base.js +297 -0
  25. package/dist/common.d.ts +91 -0
  26. package/dist/common.js +276 -0
  27. package/dist/configuration.d.ts +83 -0
  28. package/dist/configuration.js +44 -0
  29. package/dist/index.d.ts +15 -0
  30. package/dist/index.js +36 -0
  31. package/dist/models/claim-class.d.ts +156 -0
  32. package/dist/models/claim-class.js +15 -0
  33. package/dist/models/claim-status-class.d.ts +36 -0
  34. package/dist/models/claim-status-class.js +15 -0
  35. package/dist/models/create-claim-request-dto.d.ts +126 -0
  36. package/dist/models/create-claim-request-dto.js +15 -0
  37. package/dist/models/create-claim-response-class.d.ts +25 -0
  38. package/dist/models/create-claim-response-class.js +15 -0
  39. package/dist/models/create-claim-status-request-dto.d.ts +30 -0
  40. package/dist/models/create-claim-status-request-dto.js +15 -0
  41. package/dist/models/create-claim-status-response-class.d.ts +25 -0
  42. package/dist/models/create-claim-status-response-class.js +15 -0
  43. package/dist/models/create-settlement-request-dto.d.ts +48 -0
  44. package/dist/models/create-settlement-request-dto.js +15 -0
  45. package/dist/models/create-settlement-response-class.d.ts +25 -0
  46. package/dist/models/create-settlement-response-class.js +15 -0
  47. package/dist/models/get-claim-response-class.d.ts +25 -0
  48. package/dist/models/get-claim-response-class.js +15 -0
  49. package/dist/models/get-claim-status-response-class.d.ts +25 -0
  50. package/dist/models/get-claim-status-response-class.js +15 -0
  51. package/dist/models/get-settlement-response-class.d.ts +25 -0
  52. package/dist/models/get-settlement-response-class.js +15 -0
  53. package/dist/models/index.d.ts +23 -0
  54. package/dist/models/index.js +39 -0
  55. package/dist/models/inline-response200.d.ts +54 -0
  56. package/dist/models/inline-response200.js +15 -0
  57. package/dist/models/inline-response503.d.ts +54 -0
  58. package/dist/models/inline-response503.js +15 -0
  59. package/dist/models/list-claim-statuses-response-class.d.ts +31 -0
  60. package/dist/models/list-claim-statuses-response-class.js +15 -0
  61. package/dist/models/list-claims-response-class.d.ts +31 -0
  62. package/dist/models/list-claims-response-class.js +15 -0
  63. package/dist/models/list-settlements-response-class.d.ts +31 -0
  64. package/dist/models/list-settlements-response-class.js +15 -0
  65. package/dist/models/patch-claim-request-dto.d.ts +126 -0
  66. package/dist/models/patch-claim-request-dto.js +15 -0
  67. package/dist/models/patch-claim-response-class.d.ts +25 -0
  68. package/dist/models/patch-claim-response-class.js +15 -0
  69. package/dist/models/settlement-class.d.ts +78 -0
  70. package/dist/models/settlement-class.js +15 -0
  71. package/dist/models/update-claim-request-dto.d.ts +126 -0
  72. package/dist/models/update-claim-request-dto.js +15 -0
  73. package/dist/models/update-claim-response-class.d.ts +25 -0
  74. package/dist/models/update-claim-response-class.js +15 -0
  75. package/dist/models/update-settlement-request-dto.d.ts +54 -0
  76. package/dist/models/update-settlement-request-dto.js +15 -0
  77. package/dist/models/update-settlement-response-class.d.ts +25 -0
  78. package/dist/models/update-settlement-response-class.js +15 -0
  79. package/git_push.sh +57 -0
  80. package/index.ts +19 -0
  81. package/models/claim-class.ts +162 -0
  82. package/models/claim-status-class.ts +42 -0
  83. package/models/create-claim-request-dto.ts +132 -0
  84. package/models/create-claim-response-class.ts +31 -0
  85. package/models/create-claim-status-request-dto.ts +36 -0
  86. package/models/create-claim-status-response-class.ts +31 -0
  87. package/models/create-settlement-request-dto.ts +54 -0
  88. package/models/create-settlement-response-class.ts +31 -0
  89. package/models/get-claim-response-class.ts +31 -0
  90. package/models/get-claim-status-response-class.ts +31 -0
  91. package/models/get-settlement-response-class.ts +31 -0
  92. package/models/index.ts +23 -0
  93. package/models/inline-response200.ts +48 -0
  94. package/models/inline-response503.ts +48 -0
  95. package/models/list-claim-statuses-response-class.ts +37 -0
  96. package/models/list-claims-response-class.ts +37 -0
  97. package/models/list-settlements-response-class.ts +37 -0
  98. package/models/patch-claim-request-dto.ts +132 -0
  99. package/models/patch-claim-response-class.ts +31 -0
  100. package/models/settlement-class.ts +84 -0
  101. package/models/update-claim-request-dto.ts +132 -0
  102. package/models/update-claim-response-class.ts +31 -0
  103. package/models/update-settlement-request-dto.ts +60 -0
  104. package/models/update-settlement-response-class.ts +31 -0
  105. package/package.json +27 -0
  106. package/tsconfig.json +22 -0
@@ -0,0 +1,729 @@
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
+ /**
89
+ * ClaimsApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var ClaimsApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * This will create a claim in the database
97
+ * @summary Create the claim
98
+ * @param {CreateClaimRequestDto} createClaimRequestDto
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
+ createClaim: function (createClaimRequestDto, 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 'createClaimRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createClaim', 'createClaimRequestDto', createClaimRequestDto);
112
+ localVarPath = "/v1/claims";
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)(createClaimRequestDto, 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 requested claim from the database.
146
+ * @summary Delete the claim
147
+ * @param {string} code
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
+ deleteClaim: 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)('deleteClaim', 'code', code);
161
+ localVarPath = "/v1/claims/{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
+ * This will fetch the identified claim from the database by code
194
+ * @summary Retrieve the claim
195
+ * @param {string} code
196
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
197
+ * @param {*} [options] Override http request option.
198
+ * @throws {RequiredError}
199
+ */
200
+ getClaim: function (code, authorization, options) {
201
+ if (options === void 0) { options = {}; }
202
+ return __awaiter(_this, void 0, void 0, function () {
203
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
204
+ return __generator(this, function (_a) {
205
+ switch (_a.label) {
206
+ case 0:
207
+ // verify required parameter 'code' is not null or undefined
208
+ (0, common_1.assertParamExists)('getClaim', 'code', code);
209
+ localVarPath = "/v1/claims/{code}"
210
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
211
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
212
+ if (configuration) {
213
+ baseOptions = configuration.baseOptions;
214
+ baseAccessToken = configuration.accessToken;
215
+ }
216
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
217
+ localVarHeaderParameter = {};
218
+ localVarQueryParameter = {};
219
+ // authentication bearer required
220
+ // http bearer authentication required
221
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
222
+ case 1:
223
+ // authentication bearer required
224
+ // http bearer authentication required
225
+ _a.sent();
226
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
227
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
228
+ }
229
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
230
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
231
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
232
+ return [2 /*return*/, {
233
+ url: (0, common_1.toPathString)(localVarUrlObj),
234
+ options: localVarRequestOptions,
235
+ }];
236
+ }
237
+ });
238
+ });
239
+ },
240
+ /**
241
+ * 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.
242
+ * @summary List claims
243
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
244
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
245
+ * @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.
246
+ * @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.
247
+ * @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.
248
+ * @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.
249
+ * @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.
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ */
253
+ listClaims: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
254
+ if (options === void 0) { options = {}; }
255
+ return __awaiter(_this, void 0, void 0, function () {
256
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
257
+ return __generator(this, function (_a) {
258
+ switch (_a.label) {
259
+ case 0:
260
+ localVarPath = "/v1/claims";
261
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
262
+ if (configuration) {
263
+ baseOptions = configuration.baseOptions;
264
+ baseAccessToken = configuration.accessToken;
265
+ }
266
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
267
+ localVarHeaderParameter = {};
268
+ localVarQueryParameter = {};
269
+ // authentication bearer required
270
+ // http bearer authentication required
271
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
272
+ case 1:
273
+ // authentication bearer required
274
+ // http bearer authentication required
275
+ _a.sent();
276
+ if (pageSize !== undefined) {
277
+ localVarQueryParameter['pageSize'] = pageSize;
278
+ }
279
+ if (pageToken !== undefined) {
280
+ localVarQueryParameter['pageToken'] = pageToken;
281
+ }
282
+ if (filter !== undefined) {
283
+ localVarQueryParameter['filter'] = filter;
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
+ * Updates the identified claim by setting the values of the provided parameters. Any parameters not provided will be left unchanged.
310
+ * @summary Patch the claim
311
+ * @param {string} code
312
+ * @param {PatchClaimRequestDto} patchClaimRequestDto
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
+ patchClaim: function (code, patchClaimRequestDto, 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)('patchClaim', 'code', code);
326
+ // verify required parameter 'patchClaimRequestDto' is not null or undefined
327
+ (0, common_1.assertParamExists)('patchClaim', 'patchClaimRequestDto', patchClaimRequestDto);
328
+ localVarPath = "/v1/claims/{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: 'PATCH' }, 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)(patchClaimRequestDto, localVarRequestOptions, configuration);
353
+ return [2 /*return*/, {
354
+ url: (0, common_1.toPathString)(localVarUrlObj),
355
+ options: localVarRequestOptions,
356
+ }];
357
+ }
358
+ });
359
+ });
360
+ },
361
+ /**
362
+ * This will update the identified claim in the database
363
+ * @summary Update the claim
364
+ * @param {string} code
365
+ * @param {UpdateClaimRequestDto} updateClaimRequestDto
366
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
367
+ * @param {*} [options] Override http request option.
368
+ * @throws {RequiredError}
369
+ */
370
+ updateClaim: function (code, updateClaimRequestDto, authorization, options) {
371
+ if (options === void 0) { options = {}; }
372
+ return __awaiter(_this, void 0, void 0, function () {
373
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
374
+ return __generator(this, function (_a) {
375
+ switch (_a.label) {
376
+ case 0:
377
+ // verify required parameter 'code' is not null or undefined
378
+ (0, common_1.assertParamExists)('updateClaim', 'code', code);
379
+ // verify required parameter 'updateClaimRequestDto' is not null or undefined
380
+ (0, common_1.assertParamExists)('updateClaim', 'updateClaimRequestDto', updateClaimRequestDto);
381
+ localVarPath = "/v1/claims/{code}"
382
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
383
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
384
+ if (configuration) {
385
+ baseOptions = configuration.baseOptions;
386
+ baseAccessToken = configuration.accessToken;
387
+ }
388
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
389
+ localVarHeaderParameter = {};
390
+ localVarQueryParameter = {};
391
+ // authentication bearer required
392
+ // http bearer authentication required
393
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
394
+ case 1:
395
+ // authentication bearer required
396
+ // http bearer authentication required
397
+ _a.sent();
398
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
399
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
400
+ }
401
+ localVarHeaderParameter['Content-Type'] = 'application/json';
402
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
403
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
404
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
405
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateClaimRequestDto, localVarRequestOptions, configuration);
406
+ return [2 /*return*/, {
407
+ url: (0, common_1.toPathString)(localVarUrlObj),
408
+ options: localVarRequestOptions,
409
+ }];
410
+ }
411
+ });
412
+ });
413
+ },
414
+ };
415
+ };
416
+ exports.ClaimsApiAxiosParamCreator = ClaimsApiAxiosParamCreator;
417
+ /**
418
+ * ClaimsApi - functional programming interface
419
+ * @export
420
+ */
421
+ var ClaimsApiFp = function (configuration) {
422
+ var localVarAxiosParamCreator = (0, exports.ClaimsApiAxiosParamCreator)(configuration);
423
+ return {
424
+ /**
425
+ * This will create a claim in the database
426
+ * @summary Create the claim
427
+ * @param {CreateClaimRequestDto} createClaimRequestDto
428
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
429
+ * @param {*} [options] Override http request option.
430
+ * @throws {RequiredError}
431
+ */
432
+ createClaim: function (createClaimRequestDto, authorization, options) {
433
+ return __awaiter(this, void 0, void 0, function () {
434
+ var localVarAxiosArgs;
435
+ return __generator(this, function (_a) {
436
+ switch (_a.label) {
437
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createClaim(createClaimRequestDto, authorization, options)];
438
+ case 1:
439
+ localVarAxiosArgs = _a.sent();
440
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
441
+ }
442
+ });
443
+ });
444
+ },
445
+ /**
446
+ * This will delete the requested claim from the database.
447
+ * @summary Delete the claim
448
+ * @param {string} code
449
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
450
+ * @param {*} [options] Override http request option.
451
+ * @throws {RequiredError}
452
+ */
453
+ deleteClaim: function (code, authorization, options) {
454
+ return __awaiter(this, void 0, void 0, function () {
455
+ var localVarAxiosArgs;
456
+ return __generator(this, function (_a) {
457
+ switch (_a.label) {
458
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteClaim(code, authorization, options)];
459
+ case 1:
460
+ localVarAxiosArgs = _a.sent();
461
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
462
+ }
463
+ });
464
+ });
465
+ },
466
+ /**
467
+ * This will fetch the identified claim from the database by code
468
+ * @summary Retrieve the claim
469
+ * @param {string} code
470
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
471
+ * @param {*} [options] Override http request option.
472
+ * @throws {RequiredError}
473
+ */
474
+ getClaim: function (code, authorization, options) {
475
+ return __awaiter(this, void 0, void 0, function () {
476
+ var localVarAxiosArgs;
477
+ return __generator(this, function (_a) {
478
+ switch (_a.label) {
479
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getClaim(code, authorization, options)];
480
+ case 1:
481
+ localVarAxiosArgs = _a.sent();
482
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
483
+ }
484
+ });
485
+ });
486
+ },
487
+ /**
488
+ * 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.
489
+ * @summary List claims
490
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
491
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
492
+ * @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.
493
+ * @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.
494
+ * @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.
495
+ * @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.
496
+ * @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.
497
+ * @param {*} [options] Override http request option.
498
+ * @throws {RequiredError}
499
+ */
500
+ listClaims: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
501
+ return __awaiter(this, void 0, void 0, function () {
502
+ var localVarAxiosArgs;
503
+ return __generator(this, function (_a) {
504
+ switch (_a.label) {
505
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listClaims(authorization, pageSize, pageToken, filter, search, order, expand, options)];
506
+ case 1:
507
+ localVarAxiosArgs = _a.sent();
508
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
509
+ }
510
+ });
511
+ });
512
+ },
513
+ /**
514
+ * Updates the identified claim by setting the values of the provided parameters. Any parameters not provided will be left unchanged.
515
+ * @summary Patch the claim
516
+ * @param {string} code
517
+ * @param {PatchClaimRequestDto} patchClaimRequestDto
518
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
519
+ * @param {*} [options] Override http request option.
520
+ * @throws {RequiredError}
521
+ */
522
+ patchClaim: function (code, patchClaimRequestDto, authorization, options) {
523
+ return __awaiter(this, void 0, void 0, function () {
524
+ var localVarAxiosArgs;
525
+ return __generator(this, function (_a) {
526
+ switch (_a.label) {
527
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.patchClaim(code, patchClaimRequestDto, authorization, options)];
528
+ case 1:
529
+ localVarAxiosArgs = _a.sent();
530
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
531
+ }
532
+ });
533
+ });
534
+ },
535
+ /**
536
+ * This will update the identified claim in the database
537
+ * @summary Update the claim
538
+ * @param {string} code
539
+ * @param {UpdateClaimRequestDto} updateClaimRequestDto
540
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
541
+ * @param {*} [options] Override http request option.
542
+ * @throws {RequiredError}
543
+ */
544
+ updateClaim: function (code, updateClaimRequestDto, authorization, options) {
545
+ return __awaiter(this, void 0, void 0, function () {
546
+ var localVarAxiosArgs;
547
+ return __generator(this, function (_a) {
548
+ switch (_a.label) {
549
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateClaim(code, updateClaimRequestDto, authorization, options)];
550
+ case 1:
551
+ localVarAxiosArgs = _a.sent();
552
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
553
+ }
554
+ });
555
+ });
556
+ },
557
+ };
558
+ };
559
+ exports.ClaimsApiFp = ClaimsApiFp;
560
+ /**
561
+ * ClaimsApi - factory interface
562
+ * @export
563
+ */
564
+ var ClaimsApiFactory = function (configuration, basePath, axios) {
565
+ var localVarFp = (0, exports.ClaimsApiFp)(configuration);
566
+ return {
567
+ /**
568
+ * This will create a claim in the database
569
+ * @summary Create the claim
570
+ * @param {CreateClaimRequestDto} createClaimRequestDto
571
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
572
+ * @param {*} [options] Override http request option.
573
+ * @throws {RequiredError}
574
+ */
575
+ createClaim: function (createClaimRequestDto, authorization, options) {
576
+ return localVarFp.createClaim(createClaimRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
577
+ },
578
+ /**
579
+ * This will delete the requested claim from the database.
580
+ * @summary Delete the claim
581
+ * @param {string} code
582
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
583
+ * @param {*} [options] Override http request option.
584
+ * @throws {RequiredError}
585
+ */
586
+ deleteClaim: function (code, authorization, options) {
587
+ return localVarFp.deleteClaim(code, authorization, options).then(function (request) { return request(axios, basePath); });
588
+ },
589
+ /**
590
+ * This will fetch the identified claim from the database by code
591
+ * @summary Retrieve the claim
592
+ * @param {string} code
593
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
594
+ * @param {*} [options] Override http request option.
595
+ * @throws {RequiredError}
596
+ */
597
+ getClaim: function (code, authorization, options) {
598
+ return localVarFp.getClaim(code, authorization, options).then(function (request) { return request(axios, basePath); });
599
+ },
600
+ /**
601
+ * 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.
602
+ * @summary List claims
603
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
604
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
605
+ * @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.
606
+ * @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.
607
+ * @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.
608
+ * @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.
609
+ * @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.
610
+ * @param {*} [options] Override http request option.
611
+ * @throws {RequiredError}
612
+ */
613
+ listClaims: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
614
+ return localVarFp.listClaims(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
615
+ },
616
+ /**
617
+ * Updates the identified claim by setting the values of the provided parameters. Any parameters not provided will be left unchanged.
618
+ * @summary Patch the claim
619
+ * @param {string} code
620
+ * @param {PatchClaimRequestDto} patchClaimRequestDto
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
+ patchClaim: function (code, patchClaimRequestDto, authorization, options) {
626
+ return localVarFp.patchClaim(code, patchClaimRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
627
+ },
628
+ /**
629
+ * This will update the identified claim in the database
630
+ * @summary Update the claim
631
+ * @param {string} code
632
+ * @param {UpdateClaimRequestDto} updateClaimRequestDto
633
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
634
+ * @param {*} [options] Override http request option.
635
+ * @throws {RequiredError}
636
+ */
637
+ updateClaim: function (code, updateClaimRequestDto, authorization, options) {
638
+ return localVarFp.updateClaim(code, updateClaimRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
639
+ },
640
+ };
641
+ };
642
+ exports.ClaimsApiFactory = ClaimsApiFactory;
643
+ /**
644
+ * ClaimsApi - object-oriented interface
645
+ * @export
646
+ * @class ClaimsApi
647
+ * @extends {BaseAPI}
648
+ */
649
+ var ClaimsApi = /** @class */ (function (_super) {
650
+ __extends(ClaimsApi, _super);
651
+ function ClaimsApi() {
652
+ return _super !== null && _super.apply(this, arguments) || this;
653
+ }
654
+ /**
655
+ * This will create a claim in the database
656
+ * @summary Create the claim
657
+ * @param {ClaimsApiCreateClaimRequest} requestParameters Request parameters.
658
+ * @param {*} [options] Override http request option.
659
+ * @throws {RequiredError}
660
+ * @memberof ClaimsApi
661
+ */
662
+ ClaimsApi.prototype.createClaim = function (requestParameters, options) {
663
+ var _this = this;
664
+ return (0, exports.ClaimsApiFp)(this.configuration).createClaim(requestParameters.createClaimRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
665
+ };
666
+ /**
667
+ * This will delete the requested claim from the database.
668
+ * @summary Delete the claim
669
+ * @param {ClaimsApiDeleteClaimRequest} requestParameters Request parameters.
670
+ * @param {*} [options] Override http request option.
671
+ * @throws {RequiredError}
672
+ * @memberof ClaimsApi
673
+ */
674
+ ClaimsApi.prototype.deleteClaim = function (requestParameters, options) {
675
+ var _this = this;
676
+ return (0, exports.ClaimsApiFp)(this.configuration).deleteClaim(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
677
+ };
678
+ /**
679
+ * This will fetch the identified claim from the database by code
680
+ * @summary Retrieve the claim
681
+ * @param {ClaimsApiGetClaimRequest} requestParameters Request parameters.
682
+ * @param {*} [options] Override http request option.
683
+ * @throws {RequiredError}
684
+ * @memberof ClaimsApi
685
+ */
686
+ ClaimsApi.prototype.getClaim = function (requestParameters, options) {
687
+ var _this = this;
688
+ return (0, exports.ClaimsApiFp)(this.configuration).getClaim(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
689
+ };
690
+ /**
691
+ * 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.
692
+ * @summary List claims
693
+ * @param {ClaimsApiListClaimsRequest} requestParameters Request parameters.
694
+ * @param {*} [options] Override http request option.
695
+ * @throws {RequiredError}
696
+ * @memberof ClaimsApi
697
+ */
698
+ ClaimsApi.prototype.listClaims = function (requestParameters, options) {
699
+ var _this = this;
700
+ if (requestParameters === void 0) { requestParameters = {}; }
701
+ 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); });
702
+ };
703
+ /**
704
+ * Updates the identified claim by setting the values of the provided parameters. Any parameters not provided will be left unchanged.
705
+ * @summary Patch the claim
706
+ * @param {ClaimsApiPatchClaimRequest} requestParameters Request parameters.
707
+ * @param {*} [options] Override http request option.
708
+ * @throws {RequiredError}
709
+ * @memberof ClaimsApi
710
+ */
711
+ ClaimsApi.prototype.patchClaim = function (requestParameters, options) {
712
+ var _this = this;
713
+ return (0, exports.ClaimsApiFp)(this.configuration).patchClaim(requestParameters.code, requestParameters.patchClaimRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
714
+ };
715
+ /**
716
+ * This will update the identified claim in the database
717
+ * @summary Update the claim
718
+ * @param {ClaimsApiUpdateClaimRequest} requestParameters Request parameters.
719
+ * @param {*} [options] Override http request option.
720
+ * @throws {RequiredError}
721
+ * @memberof ClaimsApi
722
+ */
723
+ ClaimsApi.prototype.updateClaim = function (requestParameters, options) {
724
+ var _this = this;
725
+ return (0, exports.ClaimsApiFp)(this.configuration).updateClaim(requestParameters.code, requestParameters.updateClaimRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
726
+ };
727
+ return ClaimsApi;
728
+ }(base_1.BaseAPI));
729
+ exports.ClaimsApi = ClaimsApi;