@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,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.SettlementsApi = exports.SettlementsApiFactory = exports.SettlementsApiFp = exports.SettlementsApiAxiosParamCreator = 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
+ * SettlementsApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var SettlementsApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * This will create a settlement against a claim in the database
97
+ * @summary Create the settlement
98
+ * @param {CreateSettlementRequestDto} createSettlementRequestDto
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
+ createSettlement: function (createSettlementRequestDto, 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 'createSettlementRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createSettlement', 'createSettlementRequestDto', createSettlementRequestDto);
112
+ localVarPath = "/v1/settlements";
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)(createSettlementRequestDto, 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 settlement from the database.
146
+ * @summary Delete the settlement
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
+ deleteSettlement: 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)('deleteSettlement', 'code', code);
161
+ localVarPath = "/v1/settlements/{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 settlement that was previously created. Supply the unique settlement code that was returned when you created it and Emil Api will return the corresponding settlement information.
194
+ * @summary Retrieve the settlement
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
+ getSettlement: 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)('getSettlement', 'code', code);
209
+ localVarPath = "/v1/settlements/{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 settlements you have previously created. The settlements are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
242
+ * @summary List settlements
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' | 'claimCode' | 'InsuredObjectId'} [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
+ listSettlements: 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/settlements";
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 specified settlement by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
310
+ * @summary Update the settlement
311
+ * @param {string} code
312
+ * @param {UpdateSettlementRequestDto} updateSettlementRequestDto
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
+ updateSettlement: function (code, updateSettlementRequestDto, 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)('updateSettlement', 'code', code);
326
+ // verify required parameter 'updateSettlementRequestDto' is not null or undefined
327
+ (0, common_1.assertParamExists)('updateSettlement', 'updateSettlementRequestDto', updateSettlementRequestDto);
328
+ localVarPath = "/v1/settlements/{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)(updateSettlementRequestDto, 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.SettlementsApiAxiosParamCreator = SettlementsApiAxiosParamCreator;
364
+ /**
365
+ * SettlementsApi - functional programming interface
366
+ * @export
367
+ */
368
+ var SettlementsApiFp = function (configuration) {
369
+ var localVarAxiosParamCreator = (0, exports.SettlementsApiAxiosParamCreator)(configuration);
370
+ return {
371
+ /**
372
+ * This will create a settlement against a claim in the database
373
+ * @summary Create the settlement
374
+ * @param {CreateSettlementRequestDto} createSettlementRequestDto
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
+ createSettlement: function (createSettlementRequestDto, 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.createSettlement(createSettlementRequestDto, 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 requested settlement from the database.
394
+ * @summary Delete the settlement
395
+ * @param {string} code
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
+ deleteSettlement: 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.deleteSettlement(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 settlement that was previously created. Supply the unique settlement code that was returned when you created it and Emil Api will return the corresponding settlement information.
415
+ * @summary Retrieve the settlement
416
+ * @param {string} code
417
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
418
+ * @param {*} [options] Override http request option.
419
+ * @throws {RequiredError}
420
+ */
421
+ getSettlement: function (code, authorization, options) {
422
+ return __awaiter(this, void 0, void 0, function () {
423
+ var localVarAxiosArgs;
424
+ return __generator(this, function (_a) {
425
+ switch (_a.label) {
426
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSettlement(code, authorization, options)];
427
+ case 1:
428
+ localVarAxiosArgs = _a.sent();
429
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
430
+ }
431
+ });
432
+ });
433
+ },
434
+ /**
435
+ * Returns a list of settlements you have previously created. The settlements are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
436
+ * @summary List settlements
437
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
438
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
439
+ * @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.
440
+ * @param {'policyNumber' | 'productId' | 'accountCode' | 'claimCode' | 'InsuredObjectId'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
441
+ * @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.
442
+ * @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.
443
+ * @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.
444
+ * @param {*} [options] Override http request option.
445
+ * @throws {RequiredError}
446
+ */
447
+ listSettlements: function (authorization, pageSize, pageToken, filter, 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.listSettlements(authorization, pageSize, pageToken, filter, 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
+ * Updates the specified settlement by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
462
+ * @summary Update the settlement
463
+ * @param {string} code
464
+ * @param {UpdateSettlementRequestDto} updateSettlementRequestDto
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
+ updateSettlement: function (code, updateSettlementRequestDto, 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.updateSettlement(code, updateSettlementRequestDto, 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.SettlementsApiFp = SettlementsApiFp;
485
+ /**
486
+ * SettlementsApi - factory interface
487
+ * @export
488
+ */
489
+ var SettlementsApiFactory = function (configuration, basePath, axios) {
490
+ var localVarFp = (0, exports.SettlementsApiFp)(configuration);
491
+ return {
492
+ /**
493
+ * This will create a settlement against a claim in the database
494
+ * @summary Create the settlement
495
+ * @param {CreateSettlementRequestDto} createSettlementRequestDto
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
+ createSettlement: function (createSettlementRequestDto, authorization, options) {
501
+ return localVarFp.createSettlement(createSettlementRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
502
+ },
503
+ /**
504
+ * This will delete the requested settlement from the database.
505
+ * @summary Delete the settlement
506
+ * @param {string} code
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
+ deleteSettlement: function (code, authorization, options) {
512
+ return localVarFp.deleteSettlement(code, authorization, options).then(function (request) { return request(axios, basePath); });
513
+ },
514
+ /**
515
+ * Retrieves the details of the settlement that was previously created. Supply the unique settlement code that was returned when you created it and Emil Api will return the corresponding settlement information.
516
+ * @summary Retrieve the settlement
517
+ * @param {string} code
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
+ getSettlement: function (code, authorization, options) {
523
+ return localVarFp.getSettlement(code, authorization, options).then(function (request) { return request(axios, basePath); });
524
+ },
525
+ /**
526
+ * Returns a list of settlements you have previously created. The settlements are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
527
+ * @summary List settlements
528
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
529
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
530
+ * @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.
531
+ * @param {'policyNumber' | 'productId' | 'accountCode' | 'claimCode' | 'InsuredObjectId'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
532
+ * @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.
533
+ * @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.
534
+ * @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.
535
+ * @param {*} [options] Override http request option.
536
+ * @throws {RequiredError}
537
+ */
538
+ listSettlements: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
539
+ return localVarFp.listSettlements(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
540
+ },
541
+ /**
542
+ * Updates the specified settlement by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
543
+ * @summary Update the settlement
544
+ * @param {string} code
545
+ * @param {UpdateSettlementRequestDto} updateSettlementRequestDto
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
+ updateSettlement: function (code, updateSettlementRequestDto, authorization, options) {
551
+ return localVarFp.updateSettlement(code, updateSettlementRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
552
+ },
553
+ };
554
+ };
555
+ exports.SettlementsApiFactory = SettlementsApiFactory;
556
+ /**
557
+ * SettlementsApi - object-oriented interface
558
+ * @export
559
+ * @class SettlementsApi
560
+ * @extends {BaseAPI}
561
+ */
562
+ var SettlementsApi = /** @class */ (function (_super) {
563
+ __extends(SettlementsApi, _super);
564
+ function SettlementsApi() {
565
+ return _super !== null && _super.apply(this, arguments) || this;
566
+ }
567
+ /**
568
+ * This will create a settlement against a claim in the database
569
+ * @summary Create the settlement
570
+ * @param {SettlementsApiCreateSettlementRequest} requestParameters Request parameters.
571
+ * @param {*} [options] Override http request option.
572
+ * @throws {RequiredError}
573
+ * @memberof SettlementsApi
574
+ */
575
+ SettlementsApi.prototype.createSettlement = function (requestParameters, options) {
576
+ var _this = this;
577
+ return (0, exports.SettlementsApiFp)(this.configuration).createSettlement(requestParameters.createSettlementRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
578
+ };
579
+ /**
580
+ * This will delete the requested settlement from the database.
581
+ * @summary Delete the settlement
582
+ * @param {SettlementsApiDeleteSettlementRequest} requestParameters Request parameters.
583
+ * @param {*} [options] Override http request option.
584
+ * @throws {RequiredError}
585
+ * @memberof SettlementsApi
586
+ */
587
+ SettlementsApi.prototype.deleteSettlement = function (requestParameters, options) {
588
+ var _this = this;
589
+ return (0, exports.SettlementsApiFp)(this.configuration).deleteSettlement(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
590
+ };
591
+ /**
592
+ * Retrieves the details of the settlement that was previously created. Supply the unique settlement code that was returned when you created it and Emil Api will return the corresponding settlement information.
593
+ * @summary Retrieve the settlement
594
+ * @param {SettlementsApiGetSettlementRequest} requestParameters Request parameters.
595
+ * @param {*} [options] Override http request option.
596
+ * @throws {RequiredError}
597
+ * @memberof SettlementsApi
598
+ */
599
+ SettlementsApi.prototype.getSettlement = function (requestParameters, options) {
600
+ var _this = this;
601
+ return (0, exports.SettlementsApiFp)(this.configuration).getSettlement(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
602
+ };
603
+ /**
604
+ * Returns a list of settlements you have previously created. The settlements are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
605
+ * @summary List settlements
606
+ * @param {SettlementsApiListSettlementsRequest} requestParameters Request parameters.
607
+ * @param {*} [options] Override http request option.
608
+ * @throws {RequiredError}
609
+ * @memberof SettlementsApi
610
+ */
611
+ SettlementsApi.prototype.listSettlements = function (requestParameters, options) {
612
+ var _this = this;
613
+ if (requestParameters === void 0) { requestParameters = {}; }
614
+ return (0, exports.SettlementsApiFp)(this.configuration).listSettlements(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
615
+ };
616
+ /**
617
+ * Updates the specified settlement by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
618
+ * @summary Update the settlement
619
+ * @param {SettlementsApiUpdateSettlementRequest} requestParameters Request parameters.
620
+ * @param {*} [options] Override http request option.
621
+ * @throws {RequiredError}
622
+ * @memberof SettlementsApi
623
+ */
624
+ SettlementsApi.prototype.updateSettlement = function (requestParameters, options) {
625
+ var _this = this;
626
+ return (0, exports.SettlementsApiFp)(this.configuration).updateSettlement(requestParameters.code, requestParameters.updateSettlementRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
627
+ };
628
+ return SettlementsApi;
629
+ }(base_1.BaseAPI));
630
+ exports.SettlementsApi = SettlementsApi;
package/dist/api.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * EMIL ClaimService
3
+ * The EMIL ClaimService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export * from './api/claim-statuses-api';
13
+ export * from './api/claims-api';
14
+ export * from './api/default-api';
15
+ export * from './api/settlements-api';