@emilgroup/claim-sdk-node 1.4.0 → 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 (49) 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/dist/api/claim-statuses-api.d.ts +309 -0
  8. package/dist/api/claim-statuses-api.js +535 -0
  9. package/dist/api/claims-api.d.ts +124 -59
  10. package/dist/api/claims-api.js +142 -52
  11. package/dist/api/settlements-api.d.ts +85 -140
  12. package/dist/api/settlements-api.js +70 -117
  13. package/dist/api.d.ts +1 -0
  14. package/dist/api.js +1 -0
  15. package/dist/models/claim-class.d.ts +13 -1
  16. package/dist/models/claim-status-class.d.ts +36 -0
  17. package/dist/models/create-claim-request-dto.d.ts +13 -1
  18. package/dist/models/create-claim-status-request-dto.d.ts +30 -0
  19. package/dist/models/{delete-settlement-request-dto.d.ts → create-claim-status-response-class.d.ts} +7 -12
  20. package/dist/models/index.d.ts +7 -3
  21. package/dist/models/index.js +7 -3
  22. package/dist/models/list-claim-statuses-response-class.d.ts +31 -0
  23. package/{models/delete-response-class.ts → dist/models/list-claim-statuses-response-class.js} +2 -17
  24. package/dist/models/{list-claim-response-class.d.ts → list-claims-response-class.d.ts} +4 -4
  25. package/dist/models/list-claims-response-class.js +15 -0
  26. package/dist/models/patch-claim-request-dto.d.ts +126 -0
  27. package/dist/models/patch-claim-request-dto.js +15 -0
  28. package/dist/models/{delete-response-class.d.ts → patch-claim-response-class.d.ts} +7 -6
  29. package/dist/models/patch-claim-response-class.js +15 -0
  30. package/dist/models/settlement-class.d.ts +6 -0
  31. package/dist/models/update-claim-request-dto.d.ts +8 -2
  32. package/dist/models/update-settlement-request-dto.d.ts +6 -0
  33. package/models/claim-class.ts +13 -1
  34. package/models/claim-status-class.ts +42 -0
  35. package/models/create-claim-request-dto.ts +13 -1
  36. package/models/create-claim-status-request-dto.ts +36 -0
  37. package/models/create-claim-status-response-class.ts +31 -0
  38. package/models/index.ts +7 -3
  39. package/models/list-claim-statuses-response-class.ts +37 -0
  40. package/models/{list-claim-response-class.ts → list-claims-response-class.ts} +4 -4
  41. package/models/patch-claim-request-dto.ts +132 -0
  42. package/models/{delete-settlement-request-dto.ts → patch-claim-response-class.ts} +7 -12
  43. package/models/settlement-class.ts +6 -0
  44. package/models/update-claim-request-dto.ts +8 -2
  45. package/models/update-settlement-request-dto.ts +6 -0
  46. package/package.json +2 -2
  47. /package/dist/models/{delete-response-class.js → claim-status-class.js} +0 -0
  48. /package/dist/models/{delete-settlement-request-dto.js → create-claim-status-request-dto.js} +0 -0
  49. /package/dist/models/{list-claim-response-class.js → create-claim-status-response-class.js} +0 -0
package/api/claims-api.ts CHANGED
@@ -25,11 +25,13 @@ import { CreateClaimRequestDto } from '../models';
25
25
  // @ts-ignore
26
26
  import { CreateClaimResponseClass } from '../models';
27
27
  // @ts-ignore
28
- import { DeleteResponseClass } from '../models';
29
- // @ts-ignore
30
28
  import { GetClaimResponseClass } from '../models';
31
29
  // @ts-ignore
32
- import { ListClaimResponseClass } from '../models';
30
+ import { ListClaimsResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { PatchClaimRequestDto } from '../models';
33
+ // @ts-ignore
34
+ import { PatchClaimResponseClass } from '../models';
33
35
  // @ts-ignore
34
36
  import { UpdateClaimRequestDto } from '../models';
35
37
  // @ts-ignore
@@ -47,14 +49,12 @@ export const ClaimsApiAxiosParamCreator = function (configuration?: Configuratio
47
49
  /**
48
50
  * This will create a claim in the database
49
51
  * @summary Create the claim
50
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
51
52
  * @param {CreateClaimRequestDto} createClaimRequestDto
53
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
52
54
  * @param {*} [options] Override http request option.
53
55
  * @throws {RequiredError}
54
56
  */
55
- createClaim: async (authorization: string, createClaimRequestDto: CreateClaimRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
56
- // verify required parameter 'authorization' is not null or undefined
57
- assertParamExists('createClaim', 'authorization', authorization)
57
+ createClaim: async (createClaimRequestDto: CreateClaimRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
58
58
  // verify required parameter 'createClaimRequestDto' is not null or undefined
59
59
  assertParamExists('createClaim', 'createClaimRequestDto', createClaimRequestDto)
60
60
  const localVarPath = `/v1/claims`;
@@ -96,14 +96,12 @@ export const ClaimsApiAxiosParamCreator = function (configuration?: Configuratio
96
96
  /**
97
97
  * This will delete the requested claim from the database.
98
98
  * @summary Delete the claim
99
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
100
99
  * @param {string} code
100
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
101
101
  * @param {*} [options] Override http request option.
102
102
  * @throws {RequiredError}
103
103
  */
104
- deleteClaim: async (authorization: string, code: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
105
- // verify required parameter 'authorization' is not null or undefined
106
- assertParamExists('deleteClaim', 'authorization', authorization)
104
+ deleteClaim: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
107
105
  // verify required parameter 'code' is not null or undefined
108
106
  assertParamExists('deleteClaim', 'code', code)
109
107
  const localVarPath = `/v1/claims/{code}`
@@ -143,14 +141,12 @@ export const ClaimsApiAxiosParamCreator = function (configuration?: Configuratio
143
141
  /**
144
142
  * This will fetch the identified claim from the database by code
145
143
  * @summary Retrieve the claim
146
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
147
144
  * @param {string} code
145
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
148
146
  * @param {*} [options] Override http request option.
149
147
  * @throws {RequiredError}
150
148
  */
151
- getClaim: async (authorization: string, code: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
152
- // verify required parameter 'authorization' is not null or undefined
153
- assertParamExists('getClaim', 'authorization', authorization)
149
+ getClaim: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
154
150
  // verify required parameter 'code' is not null or undefined
155
151
  assertParamExists('getClaim', 'code', code)
156
152
  const localVarPath = `/v1/claims/{code}`
@@ -190,19 +186,17 @@ export const ClaimsApiAxiosParamCreator = function (configuration?: Configuratio
190
186
  /**
191
187
  * 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.
192
188
  * @summary List claims
193
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
189
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
194
190
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
195
191
  * @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.
196
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
192
+ * @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.
197
193
  * @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.
198
194
  * @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.
199
195
  * @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.
200
196
  * @param {*} [options] Override http request option.
201
197
  * @throws {RequiredError}
202
198
  */
203
- listClaims: async (authorization: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
204
- // verify required parameter 'authorization' is not null or undefined
205
- assertParamExists('listClaims', 'authorization', authorization)
199
+ listClaims: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: 'policyNumber' | 'productId' | 'accountCode' | 'insuredObjectId' | 'policyCode', search?: any, order?: any, expand?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
206
200
  const localVarPath = `/v1/claims`;
207
201
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
208
202
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -260,18 +254,67 @@ export const ClaimsApiAxiosParamCreator = function (configuration?: Configuratio
260
254
  options: localVarRequestOptions,
261
255
  };
262
256
  },
257
+ /**
258
+ * Updates the identified claim by setting the values of the provided parameters. Any parameters not provided will be left unchanged.
259
+ * @summary Patch the claim
260
+ * @param {string} code
261
+ * @param {PatchClaimRequestDto} patchClaimRequestDto
262
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
263
+ * @param {*} [options] Override http request option.
264
+ * @throws {RequiredError}
265
+ */
266
+ patchClaim: async (code: string, patchClaimRequestDto: PatchClaimRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
267
+ // verify required parameter 'code' is not null or undefined
268
+ assertParamExists('patchClaim', 'code', code)
269
+ // verify required parameter 'patchClaimRequestDto' is not null or undefined
270
+ assertParamExists('patchClaim', 'patchClaimRequestDto', patchClaimRequestDto)
271
+ const localVarPath = `/v1/claims/{code}`
272
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
273
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
274
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
275
+ let baseOptions;
276
+ let baseAccessToken;
277
+ if (configuration) {
278
+ baseOptions = configuration.baseOptions;
279
+ baseAccessToken = configuration.accessToken;
280
+ }
281
+
282
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
283
+ const localVarHeaderParameter = {} as any;
284
+ const localVarQueryParameter = {} as any;
285
+
286
+ // authentication bearer required
287
+ // http bearer authentication required
288
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
289
+
290
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
291
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
292
+ }
293
+
294
+
295
+
296
+ localVarHeaderParameter['Content-Type'] = 'application/json';
297
+
298
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
299
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
300
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
301
+ localVarRequestOptions.data = serializeDataIfNeeded(patchClaimRequestDto, localVarRequestOptions, configuration)
302
+
303
+ return {
304
+ url: toPathString(localVarUrlObj),
305
+ options: localVarRequestOptions,
306
+ };
307
+ },
263
308
  /**
264
309
  * This will update the identified claim in the database
265
310
  * @summary Update the claim
266
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
267
311
  * @param {string} code
268
312
  * @param {UpdateClaimRequestDto} updateClaimRequestDto
313
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
269
314
  * @param {*} [options] Override http request option.
270
315
  * @throws {RequiredError}
271
316
  */
272
- updateClaim: async (authorization: string, code: string, updateClaimRequestDto: UpdateClaimRequestDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
273
- // verify required parameter 'authorization' is not null or undefined
274
- assertParamExists('updateClaim', 'authorization', authorization)
317
+ updateClaim: async (code: string, updateClaimRequestDto: UpdateClaimRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
275
318
  // verify required parameter 'code' is not null or undefined
276
319
  assertParamExists('updateClaim', 'code', code)
277
320
  // verify required parameter 'updateClaimRequestDto' is not null or undefined
@@ -326,67 +369,80 @@ export const ClaimsApiFp = function(configuration?: Configuration) {
326
369
  /**
327
370
  * This will create a claim in the database
328
371
  * @summary Create the claim
329
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
330
372
  * @param {CreateClaimRequestDto} createClaimRequestDto
373
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
331
374
  * @param {*} [options] Override http request option.
332
375
  * @throws {RequiredError}
333
376
  */
334
- async createClaim(authorization: string, createClaimRequestDto: CreateClaimRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateClaimResponseClass>> {
335
- const localVarAxiosArgs = await localVarAxiosParamCreator.createClaim(authorization, createClaimRequestDto, options);
377
+ async createClaim(createClaimRequestDto: CreateClaimRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateClaimResponseClass>> {
378
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createClaim(createClaimRequestDto, authorization, options);
336
379
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
337
380
  },
338
381
  /**
339
382
  * This will delete the requested claim from the database.
340
383
  * @summary Delete the claim
341
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
342
384
  * @param {string} code
385
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
343
386
  * @param {*} [options] Override http request option.
344
387
  * @throws {RequiredError}
345
388
  */
346
- async deleteClaim(authorization: string, code: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseClass>> {
347
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteClaim(authorization, code, options);
389
+ async deleteClaim(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
390
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteClaim(code, authorization, options);
348
391
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
349
392
  },
350
393
  /**
351
394
  * This will fetch the identified claim from the database by code
352
395
  * @summary Retrieve the claim
353
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
354
396
  * @param {string} code
397
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
355
398
  * @param {*} [options] Override http request option.
356
399
  * @throws {RequiredError}
357
400
  */
358
- async getClaim(authorization: string, code: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetClaimResponseClass>> {
359
- const localVarAxiosArgs = await localVarAxiosParamCreator.getClaim(authorization, code, options);
401
+ async getClaim(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetClaimResponseClass>> {
402
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getClaim(code, authorization, options);
360
403
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
361
404
  },
362
405
  /**
363
406
  * 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.
364
407
  * @summary List claims
365
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
408
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
366
409
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
367
410
  * @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.
368
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
411
+ * @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.
369
412
  * @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.
370
413
  * @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.
371
414
  * @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.
372
415
  * @param {*} [options] Override http request option.
373
416
  * @throws {RequiredError}
374
417
  */
375
- async listClaims(authorization: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListClaimResponseClass>> {
418
+ async listClaims(authorization?: string, pageSize?: any, pageToken?: any, filter?: 'policyNumber' | 'productId' | 'accountCode' | 'insuredObjectId' | 'policyCode', search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListClaimsResponseClass>> {
376
419
  const localVarAxiosArgs = await localVarAxiosParamCreator.listClaims(authorization, pageSize, pageToken, filter, search, order, expand, options);
377
420
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
378
421
  },
422
+ /**
423
+ * Updates the identified claim by setting the values of the provided parameters. Any parameters not provided will be left unchanged.
424
+ * @summary Patch the claim
425
+ * @param {string} code
426
+ * @param {PatchClaimRequestDto} patchClaimRequestDto
427
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
428
+ * @param {*} [options] Override http request option.
429
+ * @throws {RequiredError}
430
+ */
431
+ async patchClaim(code: string, patchClaimRequestDto: PatchClaimRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PatchClaimResponseClass>> {
432
+ const localVarAxiosArgs = await localVarAxiosParamCreator.patchClaim(code, patchClaimRequestDto, authorization, options);
433
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
434
+ },
379
435
  /**
380
436
  * This will update the identified claim in the database
381
437
  * @summary Update the claim
382
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
383
438
  * @param {string} code
384
439
  * @param {UpdateClaimRequestDto} updateClaimRequestDto
440
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
385
441
  * @param {*} [options] Override http request option.
386
442
  * @throws {RequiredError}
387
443
  */
388
- async updateClaim(authorization: string, code: string, updateClaimRequestDto: UpdateClaimRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateClaimResponseClass>> {
389
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateClaim(authorization, code, updateClaimRequestDto, options);
444
+ async updateClaim(code: string, updateClaimRequestDto: UpdateClaimRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateClaimResponseClass>> {
445
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateClaim(code, updateClaimRequestDto, authorization, options);
390
446
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
391
447
  },
392
448
  }
@@ -402,63 +458,75 @@ export const ClaimsApiFactory = function (configuration?: Configuration, basePat
402
458
  /**
403
459
  * This will create a claim in the database
404
460
  * @summary Create the claim
405
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
406
461
  * @param {CreateClaimRequestDto} createClaimRequestDto
462
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
407
463
  * @param {*} [options] Override http request option.
408
464
  * @throws {RequiredError}
409
465
  */
410
- createClaim(authorization: string, createClaimRequestDto: CreateClaimRequestDto, options?: any): AxiosPromise<CreateClaimResponseClass> {
411
- return localVarFp.createClaim(authorization, createClaimRequestDto, options).then((request) => request(axios, basePath));
466
+ createClaim(createClaimRequestDto: CreateClaimRequestDto, authorization?: string, options?: any): AxiosPromise<CreateClaimResponseClass> {
467
+ return localVarFp.createClaim(createClaimRequestDto, authorization, options).then((request) => request(axios, basePath));
412
468
  },
413
469
  /**
414
470
  * This will delete the requested claim from the database.
415
471
  * @summary Delete the claim
416
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
417
472
  * @param {string} code
473
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
418
474
  * @param {*} [options] Override http request option.
419
475
  * @throws {RequiredError}
420
476
  */
421
- deleteClaim(authorization: string, code: string, options?: any): AxiosPromise<DeleteResponseClass> {
422
- return localVarFp.deleteClaim(authorization, code, options).then((request) => request(axios, basePath));
477
+ deleteClaim(code: string, authorization?: string, options?: any): AxiosPromise<void> {
478
+ return localVarFp.deleteClaim(code, authorization, options).then((request) => request(axios, basePath));
423
479
  },
424
480
  /**
425
481
  * This will fetch the identified claim from the database by code
426
482
  * @summary Retrieve the claim
427
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
428
483
  * @param {string} code
484
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
429
485
  * @param {*} [options] Override http request option.
430
486
  * @throws {RequiredError}
431
487
  */
432
- getClaim(authorization: string, code: string, options?: any): AxiosPromise<GetClaimResponseClass> {
433
- return localVarFp.getClaim(authorization, code, options).then((request) => request(axios, basePath));
488
+ getClaim(code: string, authorization?: string, options?: any): AxiosPromise<GetClaimResponseClass> {
489
+ return localVarFp.getClaim(code, authorization, options).then((request) => request(axios, basePath));
434
490
  },
435
491
  /**
436
492
  * Returns a list of claims you have previously created. The claims are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
437
493
  * @summary List claims
438
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
494
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
439
495
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
440
496
  * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
441
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
497
+ * @param {'policyNumber' | 'productId' | 'accountCode' | 'insuredObjectId' | 'policyCode'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
442
498
  * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
443
499
  * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
444
500
  * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
445
501
  * @param {*} [options] Override http request option.
446
502
  * @throws {RequiredError}
447
503
  */
448
- listClaims(authorization: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListClaimResponseClass> {
504
+ listClaims(authorization?: string, pageSize?: any, pageToken?: any, filter?: 'policyNumber' | 'productId' | 'accountCode' | 'insuredObjectId' | 'policyCode', search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListClaimsResponseClass> {
449
505
  return localVarFp.listClaims(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
450
506
  },
507
+ /**
508
+ * Updates the identified claim by setting the values of the provided parameters. Any parameters not provided will be left unchanged.
509
+ * @summary Patch the claim
510
+ * @param {string} code
511
+ * @param {PatchClaimRequestDto} patchClaimRequestDto
512
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
513
+ * @param {*} [options] Override http request option.
514
+ * @throws {RequiredError}
515
+ */
516
+ patchClaim(code: string, patchClaimRequestDto: PatchClaimRequestDto, authorization?: string, options?: any): AxiosPromise<PatchClaimResponseClass> {
517
+ return localVarFp.patchClaim(code, patchClaimRequestDto, authorization, options).then((request) => request(axios, basePath));
518
+ },
451
519
  /**
452
520
  * This will update the identified claim in the database
453
521
  * @summary Update the claim
454
- * @param {string} authorization Bearer Token: provided by the login endpoint under the name accessToken.
455
522
  * @param {string} code
456
523
  * @param {UpdateClaimRequestDto} updateClaimRequestDto
524
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
457
525
  * @param {*} [options] Override http request option.
458
526
  * @throws {RequiredError}
459
527
  */
460
- updateClaim(authorization: string, code: string, updateClaimRequestDto: UpdateClaimRequestDto, options?: any): AxiosPromise<UpdateClaimResponseClass> {
461
- return localVarFp.updateClaim(authorization, code, updateClaimRequestDto, options).then((request) => request(axios, basePath));
528
+ updateClaim(code: string, updateClaimRequestDto: UpdateClaimRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateClaimResponseClass> {
529
+ return localVarFp.updateClaim(code, updateClaimRequestDto, authorization, options).then((request) => request(axios, basePath));
462
530
  },
463
531
  };
464
532
  };
@@ -470,18 +538,18 @@ export const ClaimsApiFactory = function (configuration?: Configuration, basePat
470
538
  */
471
539
  export interface ClaimsApiCreateClaimRequest {
472
540
  /**
473
- * Bearer Token: provided by the login endpoint under the name accessToken.
474
- * @type {string}
541
+ *
542
+ * @type {CreateClaimRequestDto}
475
543
  * @memberof ClaimsApiCreateClaim
476
544
  */
477
- readonly authorization: string
545
+ readonly createClaimRequestDto: CreateClaimRequestDto
478
546
 
479
547
  /**
480
- *
481
- * @type {CreateClaimRequestDto}
548
+ * Bearer Token: provided by the login endpoint under the name accessToken.
549
+ * @type {string}
482
550
  * @memberof ClaimsApiCreateClaim
483
551
  */
484
- readonly createClaimRequestDto: CreateClaimRequestDto
552
+ readonly authorization?: string
485
553
  }
486
554
 
487
555
  /**
@@ -491,18 +559,18 @@ export interface ClaimsApiCreateClaimRequest {
491
559
  */
492
560
  export interface ClaimsApiDeleteClaimRequest {
493
561
  /**
494
- * Bearer Token: provided by the login endpoint under the name accessToken.
562
+ *
495
563
  * @type {string}
496
564
  * @memberof ClaimsApiDeleteClaim
497
565
  */
498
- readonly authorization: string
566
+ readonly code: string
499
567
 
500
568
  /**
501
- *
569
+ * Bearer Token: provided by the login endpoint under the name accessToken.
502
570
  * @type {string}
503
571
  * @memberof ClaimsApiDeleteClaim
504
572
  */
505
- readonly code: string
573
+ readonly authorization?: string
506
574
  }
507
575
 
508
576
  /**
@@ -512,18 +580,18 @@ export interface ClaimsApiDeleteClaimRequest {
512
580
  */
513
581
  export interface ClaimsApiGetClaimRequest {
514
582
  /**
515
- * Bearer Token: provided by the login endpoint under the name accessToken.
583
+ *
516
584
  * @type {string}
517
585
  * @memberof ClaimsApiGetClaim
518
586
  */
519
- readonly authorization: string
587
+ readonly code: string
520
588
 
521
589
  /**
522
- *
590
+ * Bearer Token: provided by the login endpoint under the name accessToken.
523
591
  * @type {string}
524
592
  * @memberof ClaimsApiGetClaim
525
593
  */
526
- readonly code: string
594
+ readonly authorization?: string
527
595
  }
528
596
 
529
597
  /**
@@ -537,7 +605,7 @@ export interface ClaimsApiListClaimsRequest {
537
605
  * @type {string}
538
606
  * @memberof ClaimsApiListClaims
539
607
  */
540
- readonly authorization: string
608
+ readonly authorization?: string
541
609
 
542
610
  /**
543
611
  * A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
@@ -555,10 +623,10 @@ export interface ClaimsApiListClaimsRequest {
555
623
 
556
624
  /**
557
625
  * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
558
- * @type {any}
626
+ * @type {'policyNumber' | 'productId' | 'accountCode' | 'insuredObjectId' | 'policyCode'}
559
627
  * @memberof ClaimsApiListClaims
560
628
  */
561
- readonly filter?: any
629
+ readonly filter?: 'policyNumber' | 'productId' | 'accountCode' | 'insuredObjectId' | 'policyCode'
562
630
 
563
631
  /**
564
632
  * 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.
@@ -583,18 +651,39 @@ export interface ClaimsApiListClaimsRequest {
583
651
  }
584
652
 
585
653
  /**
586
- * Request parameters for updateClaim operation in ClaimsApi.
654
+ * Request parameters for patchClaim operation in ClaimsApi.
587
655
  * @export
588
- * @interface ClaimsApiUpdateClaimRequest
656
+ * @interface ClaimsApiPatchClaimRequest
589
657
  */
590
- export interface ClaimsApiUpdateClaimRequest {
658
+ export interface ClaimsApiPatchClaimRequest {
659
+ /**
660
+ *
661
+ * @type {string}
662
+ * @memberof ClaimsApiPatchClaim
663
+ */
664
+ readonly code: string
665
+
666
+ /**
667
+ *
668
+ * @type {PatchClaimRequestDto}
669
+ * @memberof ClaimsApiPatchClaim
670
+ */
671
+ readonly patchClaimRequestDto: PatchClaimRequestDto
672
+
591
673
  /**
592
674
  * Bearer Token: provided by the login endpoint under the name accessToken.
593
675
  * @type {string}
594
- * @memberof ClaimsApiUpdateClaim
676
+ * @memberof ClaimsApiPatchClaim
595
677
  */
596
- readonly authorization: string
678
+ readonly authorization?: string
679
+ }
597
680
 
681
+ /**
682
+ * Request parameters for updateClaim operation in ClaimsApi.
683
+ * @export
684
+ * @interface ClaimsApiUpdateClaimRequest
685
+ */
686
+ export interface ClaimsApiUpdateClaimRequest {
598
687
  /**
599
688
  *
600
689
  * @type {string}
@@ -608,6 +697,13 @@ export interface ClaimsApiUpdateClaimRequest {
608
697
  * @memberof ClaimsApiUpdateClaim
609
698
  */
610
699
  readonly updateClaimRequestDto: UpdateClaimRequestDto
700
+
701
+ /**
702
+ * Bearer Token: provided by the login endpoint under the name accessToken.
703
+ * @type {string}
704
+ * @memberof ClaimsApiUpdateClaim
705
+ */
706
+ readonly authorization?: string
611
707
  }
612
708
 
613
709
  /**
@@ -626,7 +722,7 @@ export class ClaimsApi extends BaseAPI {
626
722
  * @memberof ClaimsApi
627
723
  */
628
724
  public createClaim(requestParameters: ClaimsApiCreateClaimRequest, options?: AxiosRequestConfig) {
629
- return ClaimsApiFp(this.configuration).createClaim(requestParameters.authorization, requestParameters.createClaimRequestDto, options).then((request) => request(this.axios, this.basePath));
725
+ return ClaimsApiFp(this.configuration).createClaim(requestParameters.createClaimRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
630
726
  }
631
727
 
632
728
  /**
@@ -638,7 +734,7 @@ export class ClaimsApi extends BaseAPI {
638
734
  * @memberof ClaimsApi
639
735
  */
640
736
  public deleteClaim(requestParameters: ClaimsApiDeleteClaimRequest, options?: AxiosRequestConfig) {
641
- return ClaimsApiFp(this.configuration).deleteClaim(requestParameters.authorization, requestParameters.code, options).then((request) => request(this.axios, this.basePath));
737
+ return ClaimsApiFp(this.configuration).deleteClaim(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
642
738
  }
643
739
 
644
740
  /**
@@ -650,7 +746,7 @@ export class ClaimsApi extends BaseAPI {
650
746
  * @memberof ClaimsApi
651
747
  */
652
748
  public getClaim(requestParameters: ClaimsApiGetClaimRequest, options?: AxiosRequestConfig) {
653
- return ClaimsApiFp(this.configuration).getClaim(requestParameters.authorization, requestParameters.code, options).then((request) => request(this.axios, this.basePath));
749
+ return ClaimsApiFp(this.configuration).getClaim(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
654
750
  }
655
751
 
656
752
  /**
@@ -661,10 +757,22 @@ export class ClaimsApi extends BaseAPI {
661
757
  * @throws {RequiredError}
662
758
  * @memberof ClaimsApi
663
759
  */
664
- public listClaims(requestParameters: ClaimsApiListClaimsRequest, options?: AxiosRequestConfig) {
760
+ public listClaims(requestParameters: ClaimsApiListClaimsRequest = {}, options?: AxiosRequestConfig) {
665
761
  return ClaimsApiFp(this.configuration).listClaims(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
666
762
  }
667
763
 
764
+ /**
765
+ * Updates the identified claim by setting the values of the provided parameters. Any parameters not provided will be left unchanged.
766
+ * @summary Patch the claim
767
+ * @param {ClaimsApiPatchClaimRequest} requestParameters Request parameters.
768
+ * @param {*} [options] Override http request option.
769
+ * @throws {RequiredError}
770
+ * @memberof ClaimsApi
771
+ */
772
+ public patchClaim(requestParameters: ClaimsApiPatchClaimRequest, options?: AxiosRequestConfig) {
773
+ return ClaimsApiFp(this.configuration).patchClaim(requestParameters.code, requestParameters.patchClaimRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
774
+ }
775
+
668
776
  /**
669
777
  * This will update the identified claim in the database
670
778
  * @summary Update the claim
@@ -674,6 +782,6 @@ export class ClaimsApi extends BaseAPI {
674
782
  * @memberof ClaimsApi
675
783
  */
676
784
  public updateClaim(requestParameters: ClaimsApiUpdateClaimRequest, options?: AxiosRequestConfig) {
677
- return ClaimsApiFp(this.configuration).updateClaim(requestParameters.authorization, requestParameters.code, requestParameters.updateClaimRequestDto, options).then((request) => request(this.axios, this.basePath));
785
+ return ClaimsApiFp(this.configuration).updateClaim(requestParameters.code, requestParameters.updateClaimRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
678
786
  }
679
787
  }