@emilgroup/insurance-sdk-node 1.24.1 → 1.25.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 (61) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +2 -2
  3. package/api/leads-api.ts +326 -0
  4. package/api/premium-formulas-api.ts +107 -0
  5. package/api/products-api.ts +122 -4
  6. package/dist/api/leads-api.d.ts +176 -0
  7. package/dist/api/leads-api.js +285 -0
  8. package/dist/api/premium-formulas-api.d.ts +57 -0
  9. package/dist/api/premium-formulas-api.js +93 -0
  10. package/dist/api/products-api.d.ts +68 -4
  11. package/dist/api/products-api.js +103 -3
  12. package/dist/models/create-lead-async-response-class.d.ts +24 -0
  13. package/dist/models/create-lead-async-response-class.js +15 -0
  14. package/dist/models/create-lead-policy-request-dto.d.ts +1 -1
  15. package/dist/models/create-lead-request-dto.d.ts +7 -7
  16. package/dist/models/create-lead-sync-response-class.d.ts +24 -0
  17. package/dist/models/create-lead-sync-response-class.js +15 -0
  18. package/dist/models/create-premium-formula-request-dto.d.ts +12 -0
  19. package/dist/models/empty-response-class.d.ts +24 -0
  20. package/dist/models/empty-response-class.js +15 -0
  21. package/dist/models/get-product-request-dto.d.ts +10 -4
  22. package/dist/models/grpc-patch-lead-request-dto.d.ts +1 -1
  23. package/dist/models/grpc-update-lead-request-dto.d.ts +7 -7
  24. package/dist/models/index.d.ts +4 -0
  25. package/dist/models/index.js +4 -0
  26. package/dist/models/lead-class.d.ts +6 -0
  27. package/dist/models/list-leads-response-class.d.ts +12 -0
  28. package/dist/models/list-policies-response-class.d.ts +12 -0
  29. package/dist/models/patch-lead-request-dto.d.ts +1 -1
  30. package/dist/models/policy-object-dto.d.ts +1 -1
  31. package/dist/models/premium-formula-class.d.ts +12 -0
  32. package/dist/models/shared-create-lead-policy-request-dto.d.ts +1 -1
  33. package/dist/models/shared-lead-policy-object-dto.d.ts +1 -1
  34. package/dist/models/shared-update-premium-formula-request-dto.d.ts +12 -0
  35. package/dist/models/swap-premium-formulas-order-request-dto.d.ts +30 -0
  36. package/dist/models/swap-premium-formulas-order-request-dto.js +15 -0
  37. package/dist/models/update-lead-request-dto.d.ts +7 -7
  38. package/dist/models/update-premium-formula-request-dto.d.ts +12 -0
  39. package/models/create-lead-async-response-class.ts +30 -0
  40. package/models/create-lead-policy-request-dto.ts +1 -1
  41. package/models/create-lead-request-dto.ts +7 -7
  42. package/models/create-lead-sync-response-class.ts +30 -0
  43. package/models/create-premium-formula-request-dto.ts +12 -0
  44. package/models/empty-response-class.ts +30 -0
  45. package/models/get-product-request-dto.ts +10 -4
  46. package/models/grpc-patch-lead-request-dto.ts +1 -1
  47. package/models/grpc-update-lead-request-dto.ts +7 -7
  48. package/models/index.ts +4 -0
  49. package/models/lead-class.ts +6 -0
  50. package/models/list-leads-response-class.ts +12 -0
  51. package/models/list-policies-response-class.ts +12 -0
  52. package/models/patch-lead-request-dto.ts +1 -1
  53. package/models/policy-object-dto.ts +1 -1
  54. package/models/premium-formula-class.ts +12 -0
  55. package/models/shared-create-lead-policy-request-dto.ts +1 -1
  56. package/models/shared-lead-policy-object-dto.ts +1 -1
  57. package/models/shared-update-premium-formula-request-dto.ts +12 -0
  58. package/models/swap-premium-formulas-order-request-dto.ts +36 -0
  59. package/models/update-lead-request-dto.ts +7 -7
  60. package/models/update-premium-formula-request-dto.ts +12 -0
  61. package/package.json +1 -1
@@ -29,11 +29,13 @@ models/create-custom-application-request-dto.ts
29
29
  models/create-dummy-policy-request-dto.ts
30
30
  models/create-insured-object-request-dto.ts
31
31
  models/create-insured-object-response-class.ts
32
+ models/create-lead-async-response-class.ts
32
33
  models/create-lead-policy-request-dto.ts
33
34
  models/create-lead-request-dto.ts
34
35
  models/create-lead-response-class.ts
35
36
  models/create-lead-status-request-dto.ts
36
37
  models/create-lead-status-response-class.ts
38
+ models/create-lead-sync-response-class.ts
37
39
  models/create-named-range-request-dto.ts
38
40
  models/create-named-range-response-class.ts
39
41
  models/create-named-request-s3-data-class.ts
@@ -49,6 +51,7 @@ models/create-product-response-class.ts
49
51
  models/csv-product-factor-dto.ts
50
52
  models/delete-request-dto.ts
51
53
  models/delete-response-class.ts
54
+ models/empty-response-class.ts
52
55
  models/get-insured-object-response-class.ts
53
56
  models/get-lead-response-class.ts
54
57
  models/get-lead-status-response-class.ts
@@ -126,6 +129,7 @@ models/store-product-factors-request-dto.ts
126
129
  models/store-product-factors-response-class.ts
127
130
  models/suspend-policy-request-dto.ts
128
131
  models/suspend-policy-response-class.ts
132
+ models/swap-premium-formulas-order-request-dto.ts
129
133
  models/terminate-policy-request-dto.ts
130
134
  models/terminate-policy-response-class.ts
131
135
  models/timeslice-class.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/insurance-sdk-node@1.24.1 --save
20
+ npm install @emilgroup/insurance-sdk-node@1.25.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/insurance-sdk-node@1.24.1
24
+ yarn add @emilgroup/insurance-sdk-node@1.25.0
25
25
  ```
26
26
 
27
27
  And then you can import `PoliciesApi`.
package/api/leads-api.ts CHANGED
@@ -21,10 +21,14 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
23
  // @ts-ignore
24
+ import { CreateLeadAsyncResponseClass } from '../models';
25
+ // @ts-ignore
24
26
  import { CreateLeadRequestDto } from '../models';
25
27
  // @ts-ignore
26
28
  import { CreateLeadResponseClass } from '../models';
27
29
  // @ts-ignore
30
+ import { CreateLeadSyncResponseClass } from '../models';
31
+ // @ts-ignore
28
32
  import { GetLeadResponseClass } from '../models';
29
33
  // @ts-ignore
30
34
  import { ListLeadsResponseClass } from '../models';
@@ -81,6 +85,100 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
81
85
 
82
86
 
83
87
 
88
+ localVarHeaderParameter['Content-Type'] = 'application/json';
89
+
90
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
91
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
92
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
93
+ localVarRequestOptions.data = serializeDataIfNeeded(createLeadRequestDto, localVarRequestOptions, configuration)
94
+
95
+ return {
96
+ url: toPathString(localVarUrlObj),
97
+ options: localVarRequestOptions,
98
+ };
99
+ },
100
+ /**
101
+ * This will send the lead to the queue for creation. Should be used when creating multiple leads at the same time - also called \'batch processing\'.
102
+ * @summary Create the lead asynchronously
103
+ * @param {CreateLeadRequestDto} createLeadRequestDto
104
+ * @param {string} [authorization] Bearer Token
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ */
108
+ createLeadAsync: async (createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
109
+ // verify required parameter 'createLeadRequestDto' is not null or undefined
110
+ assertParamExists('createLeadAsync', 'createLeadRequestDto', createLeadRequestDto)
111
+ const localVarPath = `/insuranceservice/v1/leads-async`;
112
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
113
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
114
+ let baseOptions;
115
+ let baseAccessToken;
116
+ if (configuration) {
117
+ baseOptions = configuration.baseOptions;
118
+ baseAccessToken = configuration.accessToken;
119
+ }
120
+
121
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
122
+ const localVarHeaderParameter = {} as any;
123
+ const localVarQueryParameter = {} as any;
124
+
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
128
+
129
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ }
132
+
133
+
134
+
135
+ localVarHeaderParameter['Content-Type'] = 'application/json';
136
+
137
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
138
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
139
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
140
+ localVarRequestOptions.data = serializeDataIfNeeded(createLeadRequestDto, localVarRequestOptions, configuration)
141
+
142
+ return {
143
+ url: toPathString(localVarUrlObj),
144
+ options: localVarRequestOptions,
145
+ };
146
+ },
147
+ /**
148
+ * This endpoint initiates the creation of a lead, which is the initial step in a comprehensive workflow responsible for the creation of an account, policy, and banking information. Unlike the standard lead creation endpoint, this variant ensures that the process waits until the entire workflow is successfully completed before providing a response.
149
+ * @summary Create the lead
150
+ * @param {CreateLeadRequestDto} createLeadRequestDto
151
+ * @param {string} [authorization] Bearer Token
152
+ * @param {*} [options] Override http request option.
153
+ * @throws {RequiredError}
154
+ */
155
+ createLeadSync: async (createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
156
+ // verify required parameter 'createLeadRequestDto' is not null or undefined
157
+ assertParamExists('createLeadSync', 'createLeadRequestDto', createLeadRequestDto)
158
+ const localVarPath = `/insuranceservice/v1/leads-sync`;
159
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
160
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
161
+ let baseOptions;
162
+ let baseAccessToken;
163
+ if (configuration) {
164
+ baseOptions = configuration.baseOptions;
165
+ baseAccessToken = configuration.accessToken;
166
+ }
167
+
168
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
169
+ const localVarHeaderParameter = {} as any;
170
+ const localVarQueryParameter = {} as any;
171
+
172
+ // authentication bearer required
173
+ // http bearer authentication required
174
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
175
+
176
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
177
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
178
+ }
179
+
180
+
181
+
84
182
  localVarHeaderParameter['Content-Type'] = 'application/json';
85
183
 
86
184
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -304,6 +402,57 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
304
402
 
305
403
 
306
404
 
405
+ localVarHeaderParameter['Content-Type'] = 'application/json';
406
+
407
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
408
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
409
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
410
+ localVarRequestOptions.data = serializeDataIfNeeded(updateLeadRequestDto, localVarRequestOptions, configuration)
411
+
412
+ return {
413
+ url: toPathString(localVarUrlObj),
414
+ options: localVarRequestOptions,
415
+ };
416
+ },
417
+ /**
418
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
419
+ * @summary Update the lead
420
+ * @param {string} code Unique identifier for the object.
421
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
422
+ * @param {string} [authorization] Bearer Token
423
+ * @param {*} [options] Override http request option.
424
+ * @throws {RequiredError}
425
+ */
426
+ updateLeadSync: async (code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
427
+ // verify required parameter 'code' is not null or undefined
428
+ assertParamExists('updateLeadSync', 'code', code)
429
+ // verify required parameter 'updateLeadRequestDto' is not null or undefined
430
+ assertParamExists('updateLeadSync', 'updateLeadRequestDto', updateLeadRequestDto)
431
+ const localVarPath = `/insuranceservice/v1/leads-sync/{code}`
432
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
433
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
434
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
435
+ let baseOptions;
436
+ let baseAccessToken;
437
+ if (configuration) {
438
+ baseOptions = configuration.baseOptions;
439
+ baseAccessToken = configuration.accessToken;
440
+ }
441
+
442
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
443
+ const localVarHeaderParameter = {} as any;
444
+ const localVarQueryParameter = {} as any;
445
+
446
+ // authentication bearer required
447
+ // http bearer authentication required
448
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
449
+
450
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
451
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
452
+ }
453
+
454
+
455
+
307
456
  localVarHeaderParameter['Content-Type'] = 'application/json';
308
457
 
309
458
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -338,6 +487,30 @@ export const LeadsApiFp = function(configuration?: Configuration) {
338
487
  const localVarAxiosArgs = await localVarAxiosParamCreator.createLead(createLeadRequestDto, authorization, options);
339
488
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
340
489
  },
490
+ /**
491
+ * This will send the lead to the queue for creation. Should be used when creating multiple leads at the same time - also called \'batch processing\'.
492
+ * @summary Create the lead asynchronously
493
+ * @param {CreateLeadRequestDto} createLeadRequestDto
494
+ * @param {string} [authorization] Bearer Token
495
+ * @param {*} [options] Override http request option.
496
+ * @throws {RequiredError}
497
+ */
498
+ async createLeadAsync(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateLeadAsyncResponseClass>> {
499
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createLeadAsync(createLeadRequestDto, authorization, options);
500
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
501
+ },
502
+ /**
503
+ * This endpoint initiates the creation of a lead, which is the initial step in a comprehensive workflow responsible for the creation of an account, policy, and banking information. Unlike the standard lead creation endpoint, this variant ensures that the process waits until the entire workflow is successfully completed before providing a response.
504
+ * @summary Create the lead
505
+ * @param {CreateLeadRequestDto} createLeadRequestDto
506
+ * @param {string} [authorization] Bearer Token
507
+ * @param {*} [options] Override http request option.
508
+ * @throws {RequiredError}
509
+ */
510
+ async createLeadSync(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateLeadSyncResponseClass>> {
511
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createLeadSync(createLeadRequestDto, authorization, options);
512
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
513
+ },
341
514
  /**
342
515
  * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
343
516
  * @summary Retrieve the lead
@@ -394,6 +567,19 @@ export const LeadsApiFp = function(configuration?: Configuration) {
394
567
  const localVarAxiosArgs = await localVarAxiosParamCreator.updateLead(code, updateLeadRequestDto, authorization, options);
395
568
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
396
569
  },
570
+ /**
571
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
572
+ * @summary Update the lead
573
+ * @param {string} code Unique identifier for the object.
574
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
575
+ * @param {string} [authorization] Bearer Token
576
+ * @param {*} [options] Override http request option.
577
+ * @throws {RequiredError}
578
+ */
579
+ async updateLeadSync(code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateLeadResponseClass>> {
580
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateLeadSync(code, updateLeadRequestDto, authorization, options);
581
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
582
+ },
397
583
  }
398
584
  };
399
585
 
@@ -415,6 +601,28 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath
415
601
  createLead(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<CreateLeadResponseClass> {
416
602
  return localVarFp.createLead(createLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
417
603
  },
604
+ /**
605
+ * This will send the lead to the queue for creation. Should be used when creating multiple leads at the same time - also called \'batch processing\'.
606
+ * @summary Create the lead asynchronously
607
+ * @param {CreateLeadRequestDto} createLeadRequestDto
608
+ * @param {string} [authorization] Bearer Token
609
+ * @param {*} [options] Override http request option.
610
+ * @throws {RequiredError}
611
+ */
612
+ createLeadAsync(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<CreateLeadAsyncResponseClass> {
613
+ return localVarFp.createLeadAsync(createLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
614
+ },
615
+ /**
616
+ * This endpoint initiates the creation of a lead, which is the initial step in a comprehensive workflow responsible for the creation of an account, policy, and banking information. Unlike the standard lead creation endpoint, this variant ensures that the process waits until the entire workflow is successfully completed before providing a response.
617
+ * @summary Create the lead
618
+ * @param {CreateLeadRequestDto} createLeadRequestDto
619
+ * @param {string} [authorization] Bearer Token
620
+ * @param {*} [options] Override http request option.
621
+ * @throws {RequiredError}
622
+ */
623
+ createLeadSync(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<CreateLeadSyncResponseClass> {
624
+ return localVarFp.createLeadSync(createLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
625
+ },
418
626
  /**
419
627
  * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
420
628
  * @summary Retrieve the lead
@@ -467,6 +675,18 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath
467
675
  updateLead(code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateLeadResponseClass> {
468
676
  return localVarFp.updateLead(code, updateLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
469
677
  },
678
+ /**
679
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
680
+ * @summary Update the lead
681
+ * @param {string} code Unique identifier for the object.
682
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
683
+ * @param {string} [authorization] Bearer Token
684
+ * @param {*} [options] Override http request option.
685
+ * @throws {RequiredError}
686
+ */
687
+ updateLeadSync(code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateLeadResponseClass> {
688
+ return localVarFp.updateLeadSync(code, updateLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
689
+ },
470
690
  };
471
691
  };
472
692
 
@@ -491,6 +711,48 @@ export interface LeadsApiCreateLeadRequest {
491
711
  readonly authorization?: string
492
712
  }
493
713
 
714
+ /**
715
+ * Request parameters for createLeadAsync operation in LeadsApi.
716
+ * @export
717
+ * @interface LeadsApiCreateLeadAsyncRequest
718
+ */
719
+ export interface LeadsApiCreateLeadAsyncRequest {
720
+ /**
721
+ *
722
+ * @type {CreateLeadRequestDto}
723
+ * @memberof LeadsApiCreateLeadAsync
724
+ */
725
+ readonly createLeadRequestDto: CreateLeadRequestDto
726
+
727
+ /**
728
+ * Bearer Token
729
+ * @type {string}
730
+ * @memberof LeadsApiCreateLeadAsync
731
+ */
732
+ readonly authorization?: string
733
+ }
734
+
735
+ /**
736
+ * Request parameters for createLeadSync operation in LeadsApi.
737
+ * @export
738
+ * @interface LeadsApiCreateLeadSyncRequest
739
+ */
740
+ export interface LeadsApiCreateLeadSyncRequest {
741
+ /**
742
+ *
743
+ * @type {CreateLeadRequestDto}
744
+ * @memberof LeadsApiCreateLeadSync
745
+ */
746
+ readonly createLeadRequestDto: CreateLeadRequestDto
747
+
748
+ /**
749
+ * Bearer Token
750
+ * @type {string}
751
+ * @memberof LeadsApiCreateLeadSync
752
+ */
753
+ readonly authorization?: string
754
+ }
755
+
494
756
  /**
495
757
  * Request parameters for getLead operation in LeadsApi.
496
758
  * @export
@@ -631,6 +893,34 @@ export interface LeadsApiUpdateLeadRequest {
631
893
  readonly authorization?: string
632
894
  }
633
895
 
896
+ /**
897
+ * Request parameters for updateLeadSync operation in LeadsApi.
898
+ * @export
899
+ * @interface LeadsApiUpdateLeadSyncRequest
900
+ */
901
+ export interface LeadsApiUpdateLeadSyncRequest {
902
+ /**
903
+ * Unique identifier for the object.
904
+ * @type {string}
905
+ * @memberof LeadsApiUpdateLeadSync
906
+ */
907
+ readonly code: string
908
+
909
+ /**
910
+ *
911
+ * @type {UpdateLeadRequestDto}
912
+ * @memberof LeadsApiUpdateLeadSync
913
+ */
914
+ readonly updateLeadRequestDto: UpdateLeadRequestDto
915
+
916
+ /**
917
+ * Bearer Token
918
+ * @type {string}
919
+ * @memberof LeadsApiUpdateLeadSync
920
+ */
921
+ readonly authorization?: string
922
+ }
923
+
634
924
  /**
635
925
  * LeadsApi - object-oriented interface
636
926
  * @export
@@ -650,6 +940,30 @@ export class LeadsApi extends BaseAPI {
650
940
  return LeadsApiFp(this.configuration).createLead(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
651
941
  }
652
942
 
943
+ /**
944
+ * This will send the lead to the queue for creation. Should be used when creating multiple leads at the same time - also called \'batch processing\'.
945
+ * @summary Create the lead asynchronously
946
+ * @param {LeadsApiCreateLeadAsyncRequest} requestParameters Request parameters.
947
+ * @param {*} [options] Override http request option.
948
+ * @throws {RequiredError}
949
+ * @memberof LeadsApi
950
+ */
951
+ public createLeadAsync(requestParameters: LeadsApiCreateLeadAsyncRequest, options?: AxiosRequestConfig) {
952
+ return LeadsApiFp(this.configuration).createLeadAsync(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
953
+ }
954
+
955
+ /**
956
+ * This endpoint initiates the creation of a lead, which is the initial step in a comprehensive workflow responsible for the creation of an account, policy, and banking information. Unlike the standard lead creation endpoint, this variant ensures that the process waits until the entire workflow is successfully completed before providing a response.
957
+ * @summary Create the lead
958
+ * @param {LeadsApiCreateLeadSyncRequest} requestParameters Request parameters.
959
+ * @param {*} [options] Override http request option.
960
+ * @throws {RequiredError}
961
+ * @memberof LeadsApi
962
+ */
963
+ public createLeadSync(requestParameters: LeadsApiCreateLeadSyncRequest, options?: AxiosRequestConfig) {
964
+ return LeadsApiFp(this.configuration).createLeadSync(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
965
+ }
966
+
653
967
  /**
654
968
  * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
655
969
  * @summary Retrieve the lead
@@ -697,4 +1011,16 @@ export class LeadsApi extends BaseAPI {
697
1011
  public updateLead(requestParameters: LeadsApiUpdateLeadRequest, options?: AxiosRequestConfig) {
698
1012
  return LeadsApiFp(this.configuration).updateLead(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
699
1013
  }
1014
+
1015
+ /**
1016
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1017
+ * @summary Update the lead
1018
+ * @param {LeadsApiUpdateLeadSyncRequest} requestParameters Request parameters.
1019
+ * @param {*} [options] Override http request option.
1020
+ * @throws {RequiredError}
1021
+ * @memberof LeadsApi
1022
+ */
1023
+ public updateLeadSync(requestParameters: LeadsApiUpdateLeadSyncRequest, options?: AxiosRequestConfig) {
1024
+ return LeadsApiFp(this.configuration).updateLeadSync(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1025
+ }
700
1026
  }
@@ -27,10 +27,14 @@ import { CreatePremiumFormulaResponseClass } from '../models';
27
27
  // @ts-ignore
28
28
  import { DeleteResponseClass } from '../models';
29
29
  // @ts-ignore
30
+ import { EmptyResponseClass } from '../models';
31
+ // @ts-ignore
30
32
  import { GetPremiumFormulaResponseClass } from '../models';
31
33
  // @ts-ignore
32
34
  import { ListPremiumFormulasResponseClass } from '../models';
33
35
  // @ts-ignore
36
+ import { SwapPremiumFormulasOrderRequestDto } from '../models';
37
+ // @ts-ignore
34
38
  import { UpdatePremiumFormulaRequestDto } from '../models';
35
39
  // @ts-ignore
36
40
  import { UpdatePremiumFormulaResponseClass } from '../models';
@@ -252,6 +256,53 @@ export const PremiumFormulasApiAxiosParamCreator = function (configuration?: Con
252
256
  options: localVarRequestOptions,
253
257
  };
254
258
  },
259
+ /**
260
+ * Swaps premium formulas order.
261
+ * @summary Swaps premium formulas order
262
+ * @param {SwapPremiumFormulasOrderRequestDto} swapPremiumFormulasOrderRequestDto
263
+ * @param {string} [authorization] Bearer Token
264
+ * @param {*} [options] Override http request option.
265
+ * @throws {RequiredError}
266
+ */
267
+ swapPremiumFormulasOrder: async (swapPremiumFormulasOrderRequestDto: SwapPremiumFormulasOrderRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
268
+ // verify required parameter 'swapPremiumFormulasOrderRequestDto' is not null or undefined
269
+ assertParamExists('swapPremiumFormulasOrder', 'swapPremiumFormulasOrderRequestDto', swapPremiumFormulasOrderRequestDto)
270
+ const localVarPath = `/insuranceservice/v1/premium-formulas/reorder`;
271
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
272
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
273
+ let baseOptions;
274
+ let baseAccessToken;
275
+ if (configuration) {
276
+ baseOptions = configuration.baseOptions;
277
+ baseAccessToken = configuration.accessToken;
278
+ }
279
+
280
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
281
+ const localVarHeaderParameter = {} as any;
282
+ const localVarQueryParameter = {} as any;
283
+
284
+ // authentication bearer required
285
+ // http bearer authentication required
286
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
287
+
288
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
289
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
290
+ }
291
+
292
+
293
+
294
+ localVarHeaderParameter['Content-Type'] = 'application/json';
295
+
296
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
297
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
298
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
299
+ localVarRequestOptions.data = serializeDataIfNeeded(swapPremiumFormulasOrderRequestDto, localVarRequestOptions, configuration)
300
+
301
+ return {
302
+ url: toPathString(localVarUrlObj),
303
+ options: localVarRequestOptions,
304
+ };
305
+ },
255
306
  /**
256
307
  * Updates the specified premium formula by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
257
308
  * @summary Update the premium formula
@@ -366,6 +417,18 @@ export const PremiumFormulasApiFp = function(configuration?: Configuration) {
366
417
  const localVarAxiosArgs = await localVarAxiosParamCreator.listPremiumFormulas(authorization, pageSize, pageToken, filter, search, order, expand, options);
367
418
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
368
419
  },
420
+ /**
421
+ * Swaps premium formulas order.
422
+ * @summary Swaps premium formulas order
423
+ * @param {SwapPremiumFormulasOrderRequestDto} swapPremiumFormulasOrderRequestDto
424
+ * @param {string} [authorization] Bearer Token
425
+ * @param {*} [options] Override http request option.
426
+ * @throws {RequiredError}
427
+ */
428
+ async swapPremiumFormulasOrder(swapPremiumFormulasOrderRequestDto: SwapPremiumFormulasOrderRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EmptyResponseClass>> {
429
+ const localVarAxiosArgs = await localVarAxiosParamCreator.swapPremiumFormulasOrder(swapPremiumFormulasOrderRequestDto, authorization, options);
430
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
431
+ },
369
432
  /**
370
433
  * Updates the specified premium formula by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
371
434
  * @summary Update the premium formula
@@ -438,6 +501,17 @@ export const PremiumFormulasApiFactory = function (configuration?: Configuration
438
501
  listPremiumFormulas(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListPremiumFormulasResponseClass> {
439
502
  return localVarFp.listPremiumFormulas(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
440
503
  },
504
+ /**
505
+ * Swaps premium formulas order.
506
+ * @summary Swaps premium formulas order
507
+ * @param {SwapPremiumFormulasOrderRequestDto} swapPremiumFormulasOrderRequestDto
508
+ * @param {string} [authorization] Bearer Token
509
+ * @param {*} [options] Override http request option.
510
+ * @throws {RequiredError}
511
+ */
512
+ swapPremiumFormulasOrder(swapPremiumFormulasOrderRequestDto: SwapPremiumFormulasOrderRequestDto, authorization?: string, options?: any): AxiosPromise<EmptyResponseClass> {
513
+ return localVarFp.swapPremiumFormulasOrder(swapPremiumFormulasOrderRequestDto, authorization, options).then((request) => request(axios, basePath));
514
+ },
441
515
  /**
442
516
  * Updates the specified premium formula by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
443
517
  * @summary Update the premium formula
@@ -572,6 +646,27 @@ export interface PremiumFormulasApiListPremiumFormulasRequest {
572
646
  readonly expand?: string
573
647
  }
574
648
 
649
+ /**
650
+ * Request parameters for swapPremiumFormulasOrder operation in PremiumFormulasApi.
651
+ * @export
652
+ * @interface PremiumFormulasApiSwapPremiumFormulasOrderRequest
653
+ */
654
+ export interface PremiumFormulasApiSwapPremiumFormulasOrderRequest {
655
+ /**
656
+ *
657
+ * @type {SwapPremiumFormulasOrderRequestDto}
658
+ * @memberof PremiumFormulasApiSwapPremiumFormulasOrder
659
+ */
660
+ readonly swapPremiumFormulasOrderRequestDto: SwapPremiumFormulasOrderRequestDto
661
+
662
+ /**
663
+ * Bearer Token
664
+ * @type {string}
665
+ * @memberof PremiumFormulasApiSwapPremiumFormulasOrder
666
+ */
667
+ readonly authorization?: string
668
+ }
669
+
575
670
  /**
576
671
  * Request parameters for updatePremiumFormula operation in PremiumFormulasApi.
577
672
  * @export
@@ -655,6 +750,18 @@ export class PremiumFormulasApi extends BaseAPI {
655
750
  return PremiumFormulasApiFp(this.configuration).listPremiumFormulas(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
656
751
  }
657
752
 
753
+ /**
754
+ * Swaps premium formulas order.
755
+ * @summary Swaps premium formulas order
756
+ * @param {PremiumFormulasApiSwapPremiumFormulasOrderRequest} requestParameters Request parameters.
757
+ * @param {*} [options] Override http request option.
758
+ * @throws {RequiredError}
759
+ * @memberof PremiumFormulasApi
760
+ */
761
+ public swapPremiumFormulasOrder(requestParameters: PremiumFormulasApiSwapPremiumFormulasOrderRequest, options?: AxiosRequestConfig) {
762
+ return PremiumFormulasApiFp(this.configuration).swapPremiumFormulasOrder(requestParameters.swapPremiumFormulasOrderRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
763
+ }
764
+
658
765
  /**
659
766
  * Updates the specified premium formula by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
660
767
  * @summary Update the premium formula