@emilgroup/claim-sdk-node 1.3.1 → 1.5.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 (51) hide show
  1. package/.openapi-generator/FILES +8 -3
  2. package/README.md +2 -2
  3. package/api/claim-statuses-api.ts +547 -0
  4. package/api/claims-api.ts +189 -81
  5. package/api/settlements-api.ts +105 -198
  6. package/api.ts +2 -0
  7. package/base.ts +1 -1
  8. package/dist/api/claim-statuses-api.d.ts +309 -0
  9. package/dist/api/claim-statuses-api.js +535 -0
  10. package/dist/api/claims-api.d.ts +124 -59
  11. package/dist/api/claims-api.js +142 -52
  12. package/dist/api/settlements-api.d.ts +85 -140
  13. package/dist/api/settlements-api.js +70 -117
  14. package/dist/api.d.ts +1 -0
  15. package/dist/api.js +1 -0
  16. package/dist/base.js +1 -1
  17. package/dist/models/claim-class.d.ts +18 -0
  18. package/dist/models/claim-status-class.d.ts +36 -0
  19. package/dist/models/create-claim-request-dto.d.ts +13 -1
  20. package/dist/models/create-claim-status-request-dto.d.ts +30 -0
  21. package/dist/models/{delete-settlement-request-dto.d.ts → create-claim-status-response-class.d.ts} +7 -12
  22. package/dist/models/index.d.ts +7 -3
  23. package/dist/models/index.js +7 -3
  24. package/dist/models/list-claim-statuses-response-class.d.ts +31 -0
  25. package/{models/delete-response-class.ts → dist/models/list-claim-statuses-response-class.js} +2 -17
  26. package/dist/models/{list-claim-response-class.d.ts → list-claims-response-class.d.ts} +4 -4
  27. package/dist/models/list-claims-response-class.js +15 -0
  28. package/dist/models/patch-claim-request-dto.d.ts +126 -0
  29. package/dist/models/patch-claim-request-dto.js +15 -0
  30. package/dist/models/{delete-response-class.d.ts → patch-claim-response-class.d.ts} +7 -6
  31. package/dist/models/patch-claim-response-class.js +15 -0
  32. package/dist/models/settlement-class.d.ts +6 -0
  33. package/dist/models/update-claim-request-dto.d.ts +8 -2
  34. package/dist/models/update-settlement-request-dto.d.ts +6 -0
  35. package/models/claim-class.ts +18 -0
  36. package/models/claim-status-class.ts +42 -0
  37. package/models/create-claim-request-dto.ts +13 -1
  38. package/models/create-claim-status-request-dto.ts +36 -0
  39. package/models/create-claim-status-response-class.ts +31 -0
  40. package/models/index.ts +7 -3
  41. package/models/list-claim-statuses-response-class.ts +37 -0
  42. package/models/{list-claim-response-class.ts → list-claims-response-class.ts} +4 -4
  43. package/models/patch-claim-request-dto.ts +132 -0
  44. package/models/{delete-settlement-request-dto.ts → patch-claim-response-class.ts} +7 -12
  45. package/models/settlement-class.ts +6 -0
  46. package/models/update-claim-request-dto.ts +8 -2
  47. package/models/update-settlement-request-dto.ts +6 -0
  48. package/package.json +2 -2
  49. /package/dist/models/{delete-response-class.js → claim-status-class.js} +0 -0
  50. /package/dist/models/{delete-settlement-request-dto.js → create-claim-status-request-dto.js} +0 -0
  51. /package/dist/models/{list-claim-response-class.js → create-claim-status-response-class.js} +0 -0
@@ -99,27 +99,21 @@ var SettlementsApiAxiosParamCreator = function (configuration) {
99
99
  /**
100
100
  * This will create a settlement against a claim in the database
101
101
  * @summary Create the settlement
102
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
103
- * @param {string} claimCode
104
102
  * @param {CreateSettlementRequestDto} createSettlementRequestDto
103
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
105
104
  * @param {*} [options] Override http request option.
106
105
  * @throws {RequiredError}
107
106
  */
108
- createSettlement: function (authorization, claimCode, createSettlementRequestDto, options) {
107
+ createSettlement: function (createSettlementRequestDto, authorization, options) {
109
108
  if (options === void 0) { options = {}; }
110
109
  return __awaiter(_this, void 0, void 0, function () {
111
110
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
112
111
  return __generator(this, function (_a) {
113
112
  switch (_a.label) {
114
113
  case 0:
115
- // verify required parameter 'authorization' is not null or undefined
116
- (0, common_1.assertParamExists)('createSettlement', 'authorization', authorization);
117
- // verify required parameter 'claimCode' is not null or undefined
118
- (0, common_1.assertParamExists)('createSettlement', 'claimCode', claimCode);
119
114
  // verify required parameter 'createSettlementRequestDto' is not null or undefined
120
115
  (0, common_1.assertParamExists)('createSettlement', 'createSettlementRequestDto', createSettlementRequestDto);
121
- localVarPath = "/v1/claims/{claimCode}/settlements"
122
- .replace("{".concat("claimCode", "}"), encodeURIComponent(String(claimCode)));
116
+ localVarPath = "/v1/settlements";
123
117
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
124
118
  if (configuration) {
125
119
  baseOptions = configuration.baseOptions;
@@ -154,28 +148,22 @@ var SettlementsApiAxiosParamCreator = function (configuration) {
154
148
  /**
155
149
  * This will delete the requested settlement from the database.
156
150
  * @summary Delete the settlement
157
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
158
151
  * @param {string} code
159
- * @param {string} claimCode
152
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
160
153
  * @param {*} [options] Override http request option.
161
154
  * @throws {RequiredError}
162
155
  */
163
- deleteSettlement: function (authorization, code, claimCode, options) {
156
+ deleteSettlement: function (code, authorization, options) {
164
157
  if (options === void 0) { options = {}; }
165
158
  return __awaiter(_this, void 0, void 0, function () {
166
159
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
167
160
  return __generator(this, function (_a) {
168
161
  switch (_a.label) {
169
162
  case 0:
170
- // verify required parameter 'authorization' is not null or undefined
171
- (0, common_1.assertParamExists)('deleteSettlement', 'authorization', authorization);
172
163
  // verify required parameter 'code' is not null or undefined
173
164
  (0, common_1.assertParamExists)('deleteSettlement', 'code', code);
174
- // verify required parameter 'claimCode' is not null or undefined
175
- (0, common_1.assertParamExists)('deleteSettlement', 'claimCode', claimCode);
176
- localVarPath = "/v1/claims/{claimCode}/settlements/{code}"
177
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)))
178
- .replace("{".concat("claimCode", "}"), encodeURIComponent(String(claimCode)));
165
+ localVarPath = "/v1/settlements/{code}"
166
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
179
167
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
180
168
  if (configuration) {
181
169
  baseOptions = configuration.baseOptions;
@@ -208,27 +196,21 @@ var SettlementsApiAxiosParamCreator = function (configuration) {
208
196
  /**
209
197
  * 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.
210
198
  * @summary Retrieve the settlement
211
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
212
- * @param {string} claimCode
213
199
  * @param {string} code
200
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
214
201
  * @param {*} [options] Override http request option.
215
202
  * @throws {RequiredError}
216
203
  */
217
- getSettlement: function (authorization, claimCode, code, options) {
204
+ getSettlement: function (code, authorization, options) {
218
205
  if (options === void 0) { options = {}; }
219
206
  return __awaiter(_this, void 0, void 0, function () {
220
207
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
221
208
  return __generator(this, function (_a) {
222
209
  switch (_a.label) {
223
210
  case 0:
224
- // verify required parameter 'authorization' is not null or undefined
225
- (0, common_1.assertParamExists)('getSettlement', 'authorization', authorization);
226
- // verify required parameter 'claimCode' is not null or undefined
227
- (0, common_1.assertParamExists)('getSettlement', 'claimCode', claimCode);
228
211
  // verify required parameter 'code' is not null or undefined
229
212
  (0, common_1.assertParamExists)('getSettlement', 'code', code);
230
- localVarPath = "/v1/claims/{claimCode}/settlements/{code}"
231
- .replace("{".concat("claimCode", "}"), encodeURIComponent(String(claimCode)))
213
+ localVarPath = "/v1/settlements/{code}"
232
214
  .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
233
215
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
234
216
  if (configuration) {
@@ -262,33 +244,24 @@ var SettlementsApiAxiosParamCreator = function (configuration) {
262
244
  /**
263
245
  * 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.
264
246
  * @summary List settlements
265
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
266
- * @param {string} claimCode
267
- * @param {string} claimCode2 The identifier code of the claim.
268
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
269
- * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
270
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. Parameters: claimCode, accountNumber
271
- * @param {string} [search] Searching the response for a pattern to match for specific request results
272
- * @param {string} [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
273
- * @param {string} [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. Parameters: claim.
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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
250
+ * @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.
251
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=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.
274
254
  * @param {*} [options] Override http request option.
275
255
  * @throws {RequiredError}
276
256
  */
277
- listSettlements: function (authorization, claimCode, claimCode2, pageSize, pageToken, filter, search, order, expand, options) {
257
+ listSettlements: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
278
258
  if (options === void 0) { options = {}; }
279
259
  return __awaiter(_this, void 0, void 0, function () {
280
260
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
281
261
  return __generator(this, function (_a) {
282
262
  switch (_a.label) {
283
263
  case 0:
284
- // verify required parameter 'authorization' is not null or undefined
285
- (0, common_1.assertParamExists)('listSettlements', 'authorization', authorization);
286
- // verify required parameter 'claimCode' is not null or undefined
287
- (0, common_1.assertParamExists)('listSettlements', 'claimCode', claimCode);
288
- // verify required parameter 'claimCode2' is not null or undefined
289
- (0, common_1.assertParamExists)('listSettlements', 'claimCode2', claimCode2);
290
- localVarPath = "/v1/claims/{claimCode}/settlements"
291
- .replace("{".concat("claimCode", "}"), encodeURIComponent(String(claimCode)));
264
+ localVarPath = "/v1/settlements";
292
265
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
293
266
  if (configuration) {
294
267
  baseOptions = configuration.baseOptions;
@@ -304,9 +277,6 @@ var SettlementsApiAxiosParamCreator = function (configuration) {
304
277
  // authentication bearer required
305
278
  // http bearer authentication required
306
279
  _a.sent();
307
- if (claimCode2 !== undefined) {
308
- localVarQueryParameter['claimCode'] = claimCode2;
309
- }
310
280
  if (pageSize !== undefined) {
311
281
  localVarQueryParameter['pageSize'] = pageSize;
312
282
  }
@@ -342,30 +312,24 @@ var SettlementsApiAxiosParamCreator = function (configuration) {
342
312
  /**
343
313
  * Updates the specified settlement by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
344
314
  * @summary Update the settlement
345
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
346
- * @param {string} claimCode
347
315
  * @param {string} code
348
316
  * @param {UpdateSettlementRequestDto} updateSettlementRequestDto
317
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
349
318
  * @param {*} [options] Override http request option.
350
319
  * @throws {RequiredError}
351
320
  */
352
- updateSettlement: function (authorization, claimCode, code, updateSettlementRequestDto, options) {
321
+ updateSettlement: function (code, updateSettlementRequestDto, authorization, options) {
353
322
  if (options === void 0) { options = {}; }
354
323
  return __awaiter(_this, void 0, void 0, function () {
355
324
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
356
325
  return __generator(this, function (_a) {
357
326
  switch (_a.label) {
358
327
  case 0:
359
- // verify required parameter 'authorization' is not null or undefined
360
- (0, common_1.assertParamExists)('updateSettlement', 'authorization', authorization);
361
- // verify required parameter 'claimCode' is not null or undefined
362
- (0, common_1.assertParamExists)('updateSettlement', 'claimCode', claimCode);
363
328
  // verify required parameter 'code' is not null or undefined
364
329
  (0, common_1.assertParamExists)('updateSettlement', 'code', code);
365
330
  // verify required parameter 'updateSettlementRequestDto' is not null or undefined
366
331
  (0, common_1.assertParamExists)('updateSettlement', 'updateSettlementRequestDto', updateSettlementRequestDto);
367
- localVarPath = "/v1/claims/{claimCode}/settlements/{code}"
368
- .replace("{".concat("claimCode", "}"), encodeURIComponent(String(claimCode)))
332
+ localVarPath = "/v1/settlements/{code}"
369
333
  .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
370
334
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
371
335
  if (configuration) {
@@ -411,18 +375,17 @@ var SettlementsApiFp = function (configuration) {
411
375
  /**
412
376
  * This will create a settlement against a claim in the database
413
377
  * @summary Create the settlement
414
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
415
- * @param {string} claimCode
416
378
  * @param {CreateSettlementRequestDto} createSettlementRequestDto
379
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
417
380
  * @param {*} [options] Override http request option.
418
381
  * @throws {RequiredError}
419
382
  */
420
- createSettlement: function (authorization, claimCode, createSettlementRequestDto, options) {
383
+ createSettlement: function (createSettlementRequestDto, authorization, options) {
421
384
  return __awaiter(this, void 0, void 0, function () {
422
385
  var localVarAxiosArgs;
423
386
  return __generator(this, function (_a) {
424
387
  switch (_a.label) {
425
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.createSettlement(authorization, claimCode, createSettlementRequestDto, options)];
388
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createSettlement(createSettlementRequestDto, authorization, options)];
426
389
  case 1:
427
390
  localVarAxiosArgs = _a.sent();
428
391
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -433,18 +396,17 @@ var SettlementsApiFp = function (configuration) {
433
396
  /**
434
397
  * This will delete the requested settlement from the database.
435
398
  * @summary Delete the settlement
436
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
437
399
  * @param {string} code
438
- * @param {string} claimCode
400
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
439
401
  * @param {*} [options] Override http request option.
440
402
  * @throws {RequiredError}
441
403
  */
442
- deleteSettlement: function (authorization, code, claimCode, options) {
404
+ deleteSettlement: function (code, authorization, options) {
443
405
  return __awaiter(this, void 0, void 0, function () {
444
406
  var localVarAxiosArgs;
445
407
  return __generator(this, function (_a) {
446
408
  switch (_a.label) {
447
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteSettlement(authorization, code, claimCode, options)];
409
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteSettlement(code, authorization, options)];
448
410
  case 1:
449
411
  localVarAxiosArgs = _a.sent();
450
412
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -455,18 +417,17 @@ var SettlementsApiFp = function (configuration) {
455
417
  /**
456
418
  * 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.
457
419
  * @summary Retrieve the settlement
458
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
459
- * @param {string} claimCode
460
420
  * @param {string} code
421
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
461
422
  * @param {*} [options] Override http request option.
462
423
  * @throws {RequiredError}
463
424
  */
464
- getSettlement: function (authorization, claimCode, code, options) {
425
+ getSettlement: function (code, authorization, options) {
465
426
  return __awaiter(this, void 0, void 0, function () {
466
427
  var localVarAxiosArgs;
467
428
  return __generator(this, function (_a) {
468
429
  switch (_a.label) {
469
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSettlement(authorization, claimCode, code, options)];
430
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSettlement(code, authorization, options)];
470
431
  case 1:
471
432
  localVarAxiosArgs = _a.sent();
472
433
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -477,24 +438,22 @@ var SettlementsApiFp = function (configuration) {
477
438
  /**
478
439
  * 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.
479
440
  * @summary List settlements
480
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
481
- * @param {string} claimCode
482
- * @param {string} claimCode2 The identifier code of the claim.
483
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
484
- * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
485
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. Parameters: claimCode, accountNumber
486
- * @param {string} [search] Searching the response for a pattern to match for specific request results
487
- * @param {string} [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
488
- * @param {string} [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. Parameters: claim.
441
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
442
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
443
+ * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
444
+ * @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.
445
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
446
+ * @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.
447
+ * @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.
489
448
  * @param {*} [options] Override http request option.
490
449
  * @throws {RequiredError}
491
450
  */
492
- listSettlements: function (authorization, claimCode, claimCode2, pageSize, pageToken, filter, search, order, expand, options) {
451
+ listSettlements: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
493
452
  return __awaiter(this, void 0, void 0, function () {
494
453
  var localVarAxiosArgs;
495
454
  return __generator(this, function (_a) {
496
455
  switch (_a.label) {
497
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listSettlements(authorization, claimCode, claimCode2, pageSize, pageToken, filter, search, order, expand, options)];
456
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listSettlements(authorization, pageSize, pageToken, filter, search, order, expand, options)];
498
457
  case 1:
499
458
  localVarAxiosArgs = _a.sent();
500
459
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -505,19 +464,18 @@ var SettlementsApiFp = function (configuration) {
505
464
  /**
506
465
  * Updates the specified settlement by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
507
466
  * @summary Update the settlement
508
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
509
- * @param {string} claimCode
510
467
  * @param {string} code
511
468
  * @param {UpdateSettlementRequestDto} updateSettlementRequestDto
469
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
512
470
  * @param {*} [options] Override http request option.
513
471
  * @throws {RequiredError}
514
472
  */
515
- updateSettlement: function (authorization, claimCode, code, updateSettlementRequestDto, options) {
473
+ updateSettlement: function (code, updateSettlementRequestDto, authorization, options) {
516
474
  return __awaiter(this, void 0, void 0, function () {
517
475
  var localVarAxiosArgs;
518
476
  return __generator(this, function (_a) {
519
477
  switch (_a.label) {
520
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateSettlement(authorization, claimCode, code, updateSettlementRequestDto, options)];
478
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateSettlement(code, updateSettlementRequestDto, authorization, options)];
521
479
  case 1:
522
480
  localVarAxiosArgs = _a.sent();
523
481
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -538,69 +496,63 @@ var SettlementsApiFactory = function (configuration, basePath, axios) {
538
496
  /**
539
497
  * This will create a settlement against a claim in the database
540
498
  * @summary Create the settlement
541
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
542
- * @param {string} claimCode
543
499
  * @param {CreateSettlementRequestDto} createSettlementRequestDto
500
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
544
501
  * @param {*} [options] Override http request option.
545
502
  * @throws {RequiredError}
546
503
  */
547
- createSettlement: function (authorization, claimCode, createSettlementRequestDto, options) {
548
- return localVarFp.createSettlement(authorization, claimCode, createSettlementRequestDto, options).then(function (request) { return request(axios, basePath); });
504
+ createSettlement: function (createSettlementRequestDto, authorization, options) {
505
+ return localVarFp.createSettlement(createSettlementRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
549
506
  },
550
507
  /**
551
508
  * This will delete the requested settlement from the database.
552
509
  * @summary Delete the settlement
553
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
554
510
  * @param {string} code
555
- * @param {string} claimCode
511
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
556
512
  * @param {*} [options] Override http request option.
557
513
  * @throws {RequiredError}
558
514
  */
559
- deleteSettlement: function (authorization, code, claimCode, options) {
560
- return localVarFp.deleteSettlement(authorization, code, claimCode, options).then(function (request) { return request(axios, basePath); });
515
+ deleteSettlement: function (code, authorization, options) {
516
+ return localVarFp.deleteSettlement(code, authorization, options).then(function (request) { return request(axios, basePath); });
561
517
  },
562
518
  /**
563
519
  * 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.
564
520
  * @summary Retrieve the settlement
565
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
566
- * @param {string} claimCode
567
521
  * @param {string} code
522
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
568
523
  * @param {*} [options] Override http request option.
569
524
  * @throws {RequiredError}
570
525
  */
571
- getSettlement: function (authorization, claimCode, code, options) {
572
- return localVarFp.getSettlement(authorization, claimCode, code, options).then(function (request) { return request(axios, basePath); });
526
+ getSettlement: function (code, authorization, options) {
527
+ return localVarFp.getSettlement(code, authorization, options).then(function (request) { return request(axios, basePath); });
573
528
  },
574
529
  /**
575
530
  * 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.
576
531
  * @summary List settlements
577
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
578
- * @param {string} claimCode
579
- * @param {string} claimCode2 The identifier code of the claim.
580
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
581
- * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
582
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. Parameters: claimCode, accountNumber
583
- * @param {string} [search] Searching the response for a pattern to match for specific request results
584
- * @param {string} [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
585
- * @param {string} [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. Parameters: claim.
532
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
533
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
534
+ * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
535
+ * @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.
536
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
537
+ * @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.
538
+ * @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.
586
539
  * @param {*} [options] Override http request option.
587
540
  * @throws {RequiredError}
588
541
  */
589
- listSettlements: function (authorization, claimCode, claimCode2, pageSize, pageToken, filter, search, order, expand, options) {
590
- return localVarFp.listSettlements(authorization, claimCode, claimCode2, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
542
+ listSettlements: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
543
+ return localVarFp.listSettlements(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
591
544
  },
592
545
  /**
593
546
  * Updates the specified settlement by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
594
547
  * @summary Update the settlement
595
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
596
- * @param {string} claimCode
597
548
  * @param {string} code
598
549
  * @param {UpdateSettlementRequestDto} updateSettlementRequestDto
550
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
599
551
  * @param {*} [options] Override http request option.
600
552
  * @throws {RequiredError}
601
553
  */
602
- updateSettlement: function (authorization, claimCode, code, updateSettlementRequestDto, options) {
603
- return localVarFp.updateSettlement(authorization, claimCode, code, updateSettlementRequestDto, options).then(function (request) { return request(axios, basePath); });
554
+ updateSettlement: function (code, updateSettlementRequestDto, authorization, options) {
555
+ return localVarFp.updateSettlement(code, updateSettlementRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
604
556
  },
605
557
  };
606
558
  };
@@ -626,7 +578,7 @@ var SettlementsApi = /** @class */ (function (_super) {
626
578
  */
627
579
  SettlementsApi.prototype.createSettlement = function (requestParameters, options) {
628
580
  var _this = this;
629
- return (0, exports.SettlementsApiFp)(this.configuration).createSettlement(requestParameters.authorization, requestParameters.claimCode, requestParameters.createSettlementRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
581
+ return (0, exports.SettlementsApiFp)(this.configuration).createSettlement(requestParameters.createSettlementRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
630
582
  };
631
583
  /**
632
584
  * This will delete the requested settlement from the database.
@@ -638,7 +590,7 @@ var SettlementsApi = /** @class */ (function (_super) {
638
590
  */
639
591
  SettlementsApi.prototype.deleteSettlement = function (requestParameters, options) {
640
592
  var _this = this;
641
- return (0, exports.SettlementsApiFp)(this.configuration).deleteSettlement(requestParameters.authorization, requestParameters.code, requestParameters.claimCode, options).then(function (request) { return request(_this.axios, _this.basePath); });
593
+ return (0, exports.SettlementsApiFp)(this.configuration).deleteSettlement(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
642
594
  };
643
595
  /**
644
596
  * 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.
@@ -650,7 +602,7 @@ var SettlementsApi = /** @class */ (function (_super) {
650
602
  */
651
603
  SettlementsApi.prototype.getSettlement = function (requestParameters, options) {
652
604
  var _this = this;
653
- return (0, exports.SettlementsApiFp)(this.configuration).getSettlement(requestParameters.authorization, requestParameters.claimCode, requestParameters.code, options).then(function (request) { return request(_this.axios, _this.basePath); });
605
+ return (0, exports.SettlementsApiFp)(this.configuration).getSettlement(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
654
606
  };
655
607
  /**
656
608
  * 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.
@@ -662,7 +614,8 @@ var SettlementsApi = /** @class */ (function (_super) {
662
614
  */
663
615
  SettlementsApi.prototype.listSettlements = function (requestParameters, options) {
664
616
  var _this = this;
665
- return (0, exports.SettlementsApiFp)(this.configuration).listSettlements(requestParameters.authorization, requestParameters.claimCode, requestParameters.claimCode2, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
617
+ if (requestParameters === void 0) { requestParameters = {}; }
618
+ 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); });
666
619
  };
667
620
  /**
668
621
  * Updates the specified settlement by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
@@ -674,7 +627,7 @@ var SettlementsApi = /** @class */ (function (_super) {
674
627
  */
675
628
  SettlementsApi.prototype.updateSettlement = function (requestParameters, options) {
676
629
  var _this = this;
677
- return (0, exports.SettlementsApiFp)(this.configuration).updateSettlement(requestParameters.authorization, requestParameters.claimCode, requestParameters.code, requestParameters.updateSettlementRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
630
+ return (0, exports.SettlementsApiFp)(this.configuration).updateSettlement(requestParameters.code, requestParameters.updateSettlementRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
678
631
  };
679
632
  return SettlementsApi;
680
633
  }(base_1.BaseAPI));
package/dist/api.d.ts CHANGED
@@ -9,5 +9,6 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ export * from './api/claim-statuses-api';
12
13
  export * from './api/claims-api';
13
14
  export * from './api/settlements-api';
package/dist/api.js CHANGED
@@ -27,5 +27,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
27
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
+ __exportStar(require("./api/claim-statuses-api"), exports);
30
31
  __exportStar(require("./api/claims-api"), exports);
31
32
  __exportStar(require("./api/settlements-api"), exports);
package/dist/base.js CHANGED
@@ -109,7 +109,7 @@ var axios_1 = __importDefault(require("axios"));
109
109
  var fs = __importStar(require("fs"));
110
110
  var path = __importStar(require("path"));
111
111
  var os = __importStar(require("os"));
112
- exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
112
+ exports.BASE_PATH = "https://apiv2.emil.de".replace(/\/+$/, "");
113
113
  var CONFIG_DIRECTORY = '.emil';
114
114
  var CONFIG_FILENAME = 'credentials';
115
115
  var KEY_USERNAME = 'emil_username';
@@ -33,6 +33,18 @@ export interface ClaimClass {
33
33
  * @memberof ClaimClass
34
34
  */
35
35
  'title': string;
36
+ /**
37
+ * Unique number assigned to the claim.
38
+ * @type {string}
39
+ * @memberof ClaimClass
40
+ */
41
+ 'claimNumber': string;
42
+ /**
43
+ * The current status of the claim.
44
+ * @type {string}
45
+ * @memberof ClaimClass
46
+ */
47
+ 'status': string;
36
48
  /**
37
49
  * Unique identifier of the account that the claim belongs to.
38
50
  * @type {string}
@@ -135,4 +147,10 @@ export interface ClaimClass {
135
147
  * @memberof ClaimClass
136
148
  */
137
149
  'updatedAt': string;
150
+ /**
151
+ * Emil Resources Names (ERN) identifies the most specific owner of a resource.
152
+ * @type {string}
153
+ * @memberof ClaimClass
154
+ */
155
+ 'ern': string;
138
156
  }
@@ -0,0 +1,36 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface ClaimStatusClass
16
+ */
17
+ export interface ClaimStatusClass {
18
+ /**
19
+ * Internal unique identifier for the object. You should not have to use this, use code instead.
20
+ * @type {number}
21
+ * @memberof ClaimStatusClass
22
+ */
23
+ 'id': number;
24
+ /**
25
+ * Name of the claim status.
26
+ * @type {string}
27
+ * @memberof ClaimStatusClass
28
+ */
29
+ 'name': string;
30
+ /**
31
+ * A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
32
+ * @type {string}
33
+ * @memberof ClaimStatusClass
34
+ */
35
+ 'productSlug': string;
36
+ }
@@ -15,12 +15,24 @@
15
15
  * @interface CreateClaimRequestDto
16
16
  */
17
17
  export interface CreateClaimRequestDto {
18
+ /**
19
+ * Unique number assigned to the claim.
20
+ * @type {string}
21
+ * @memberof CreateClaimRequestDto
22
+ */
23
+ 'claimNumber'?: string;
18
24
  /**
19
25
  * Field to enter the claim title.
20
26
  * @type {string}
21
27
  * @memberof CreateClaimRequestDto
22
28
  */
23
29
  'title': string;
30
+ /**
31
+ * The current status of the claim.
32
+ * @type {string}
33
+ * @memberof CreateClaimRequestDto
34
+ */
35
+ 'status'?: string;
24
36
  /**
25
37
  * Unique identifier of the account that the claim belongs to.
26
38
  * @type {string}
@@ -98,7 +110,7 @@ export interface CreateClaimRequestDto {
98
110
  * @type {string}
99
111
  * @memberof CreateClaimRequestDto
100
112
  */
101
- 'damageDate': string;
113
+ 'damageDate'?: string;
102
114
  /**
103
115
  * The date on which the claim is reported.
104
116
  * @type {string}
@@ -0,0 +1,30 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface CreateClaimStatusRequestDto
16
+ */
17
+ export interface CreateClaimStatusRequestDto {
18
+ /**
19
+ * Name of the claim status. Tenants can add their own custom claim statuses, if default statuses are not suitable for their products.
20
+ * @type {string}
21
+ * @memberof CreateClaimStatusRequestDto
22
+ */
23
+ 'name': string;
24
+ /**
25
+ * A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
26
+ * @type {string}
27
+ * @memberof CreateClaimStatusRequestDto
28
+ */
29
+ 'productSlug': string;
30
+ }