@emilgroup/insurance-sdk-node 1.50.0 → 1.52.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 (34) hide show
  1. package/.openapi-generator/FILES +5 -0
  2. package/README.md +18 -2
  3. package/api/leads-api.ts +118 -0
  4. package/dist/api/leads-api.d.ts +65 -0
  5. package/dist/api/leads-api.js +99 -0
  6. package/dist/models/booking-funnel-class.d.ts +6 -0
  7. package/dist/models/clone-lead-request-dto.d.ts +31 -0
  8. package/dist/models/clone-lead-request-dto.js +15 -0
  9. package/dist/models/create-booking-funnel-request-dto.d.ts +6 -0
  10. package/dist/models/grpc-clone-lead-account-request-dto.d.ts +120 -0
  11. package/dist/models/grpc-clone-lead-account-request-dto.js +26 -0
  12. package/dist/models/grpc-clone-lead-request-dto.d.ts +37 -0
  13. package/dist/models/grpc-clone-lead-request-dto.js +15 -0
  14. package/dist/models/index.d.ts +5 -0
  15. package/dist/models/index.js +5 -0
  16. package/dist/models/partner-class.d.ts +7 -0
  17. package/dist/models/patch-booking-funnel-request-dto.d.ts +6 -0
  18. package/dist/models/rest-clone-lead-account-request-dto.d.ts +120 -0
  19. package/dist/models/rest-clone-lead-account-request-dto.js +26 -0
  20. package/dist/models/tag-class.d.ts +54 -0
  21. package/dist/models/tag-class.js +15 -0
  22. package/dist/models/update-booking-funnel-request-dto.d.ts +6 -0
  23. package/models/booking-funnel-class.ts +6 -0
  24. package/models/clone-lead-request-dto.ts +37 -0
  25. package/models/create-booking-funnel-request-dto.ts +6 -0
  26. package/models/grpc-clone-lead-account-request-dto.ts +130 -0
  27. package/models/grpc-clone-lead-request-dto.ts +43 -0
  28. package/models/index.ts +5 -0
  29. package/models/partner-class.ts +7 -0
  30. package/models/patch-booking-funnel-request-dto.ts +6 -0
  31. package/models/rest-clone-lead-account-request-dto.ts +130 -0
  32. package/models/tag-class.ts +60 -0
  33. package/models/update-booking-funnel-request-dto.ts +6 -0
  34. package/package.json +1 -1
@@ -33,6 +33,7 @@ models/booking-funnel-class.ts
33
33
  models/calculate-custom-premium-request-dto.ts
34
34
  models/calculate-premium-request-dto.ts
35
35
  models/calculate-product-fields-request-dto.ts
36
+ models/clone-lead-request-dto.ts
36
37
  models/clone-product-version-request-dto.ts
37
38
  models/create-account-request-dto.ts
38
39
  models/create-bank-account-request-dto.ts
@@ -106,6 +107,8 @@ models/get-status-transition-rule-response-class.ts
106
107
  models/grouped-product-factor-class.ts
107
108
  models/grouped-product-factor-value-class.ts
108
109
  models/grouped-product-factors-response-class.ts
110
+ models/grpc-clone-lead-account-request-dto.ts
111
+ models/grpc-clone-lead-request-dto.ts
109
112
  models/grpc-patch-lead-request-dto.ts
110
113
  models/grpc-update-lead-request-dto.ts
111
114
  models/index.ts
@@ -172,6 +175,7 @@ models/product-factor-value-for-version-class.ts
172
175
  models/product-field-class.ts
173
176
  models/product-field-type-class.ts
174
177
  models/product-version-class.ts
178
+ models/rest-clone-lead-account-request-dto.ts
175
179
  models/sepa-dto.ts
176
180
  models/shared-create-lead-policy-request-dto.ts
177
181
  models/shared-invoice-class.ts
@@ -186,6 +190,7 @@ models/suspend-policy-request-dto.ts
186
190
  models/suspend-policy-response-class.ts
187
191
  models/swap-premium-formulas-order-request-dto.ts
188
192
  models/swap-product-fields-order-request-dto.ts
193
+ models/tag-class.ts
189
194
  models/terminate-policy-request-dto.ts
190
195
  models/terminate-policy-response-class.ts
191
196
  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.50.0 --save
20
+ npm install @emilgroup/insurance-sdk-node@1.52.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/insurance-sdk-node@1.50.0
24
+ yarn add @emilgroup/insurance-sdk-node@1.52.0
25
25
  ```
26
26
 
27
27
  And then you can import `PoliciesApi`.
@@ -47,6 +47,22 @@ export EMIL_USERNAME=XXXXX@XXXX.XXX
47
47
  export EMIL_PASSWORD=XXXXXXXXXXXXXX
48
48
  ```
49
49
 
50
+ ## Base path
51
+
52
+ To select the basic path for using the API, we can use two approaches. The first is to use one of the predefined environments, and the second is to specify the domain as a string.
53
+
54
+ ```ts
55
+ import { PoliciesApi, Environment } from '@emilgroup/insurance-sdk-node'
56
+
57
+ const policiesApi = new PoliciesApi();
58
+
59
+ // Allows you to simply choose environment. It will usually be Environment.Production.
60
+ policiesApi.selectEnvironment(Environment.Production);
61
+
62
+ // For advanced users, use the custom baseUrl of the website you need to connect to.
63
+ policiesApi.selectBasePath('https://my-custom-domain.com');
64
+ ```
65
+
50
66
  ## Example
51
67
 
52
68
  Here is a basic functionning example:
package/api/leads-api.ts CHANGED
@@ -21,6 +21,8 @@ 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 { CloneLeadRequestDto } from '../models';
25
+ // @ts-ignore
24
26
  import { CreateLeadAsyncResponseClass } from '../models';
25
27
  // @ts-ignore
26
28
  import { CreateLeadRequestDto } from '../models';
@@ -50,6 +52,57 @@ const FormData = require('form-data');
50
52
  */
51
53
  export const LeadsApiAxiosParamCreator = function (configuration?: Configuration) {
52
54
  return {
55
+ /**
56
+ * This endpoint clones the lead and updates account and status data. It effectively initiates a new lead creation workflow, including the creation of an account, policy, and banking information.
57
+ * @summary Clone the lead
58
+ * @param {string} code Unique identifier for the object.
59
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
60
+ * @param {string} [authorization] Bearer Token
61
+ * @param {*} [options] Override http request option.
62
+ * @throws {RequiredError}
63
+ */
64
+ cloneLead: async (code: string, cloneLeadRequestDto: CloneLeadRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
65
+ // verify required parameter 'code' is not null or undefined
66
+ assertParamExists('cloneLead', 'code', code)
67
+ // verify required parameter 'cloneLeadRequestDto' is not null or undefined
68
+ assertParamExists('cloneLead', 'cloneLeadRequestDto', cloneLeadRequestDto)
69
+ const localVarPath = `/insuranceservice/v1/leads/{code}/clone`
70
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
71
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
72
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
73
+ let baseOptions;
74
+ let baseAccessToken;
75
+ if (configuration) {
76
+ baseOptions = configuration.baseOptions;
77
+ baseAccessToken = configuration.accessToken;
78
+ }
79
+
80
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
81
+ const localVarHeaderParameter = {} as any;
82
+ const localVarQueryParameter = {} as any;
83
+
84
+ // authentication bearer required
85
+ // http bearer authentication required
86
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
87
+
88
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
89
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
90
+ }
91
+
92
+
93
+
94
+ localVarHeaderParameter['Content-Type'] = 'application/json';
95
+
96
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
97
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
98
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
99
+ localVarRequestOptions.data = serializeDataIfNeeded(cloneLeadRequestDto, localVarRequestOptions, configuration)
100
+
101
+ return {
102
+ url: toPathString(localVarUrlObj),
103
+ options: localVarRequestOptions,
104
+ };
105
+ },
53
106
  /**
54
107
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
55
108
  * @summary Create the lead
@@ -525,6 +578,19 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
525
578
  export const LeadsApiFp = function(configuration?: Configuration) {
526
579
  const localVarAxiosParamCreator = LeadsApiAxiosParamCreator(configuration)
527
580
  return {
581
+ /**
582
+ * This endpoint clones the lead and updates account and status data. It effectively initiates a new lead creation workflow, including the creation of an account, policy, and banking information.
583
+ * @summary Clone the lead
584
+ * @param {string} code Unique identifier for the object.
585
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
586
+ * @param {string} [authorization] Bearer Token
587
+ * @param {*} [options] Override http request option.
588
+ * @throws {RequiredError}
589
+ */
590
+ async cloneLead(code: string, cloneLeadRequestDto: CloneLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateLeadResponseClass>> {
591
+ const localVarAxiosArgs = await localVarAxiosParamCreator.cloneLead(code, cloneLeadRequestDto, authorization, options);
592
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
593
+ },
528
594
  /**
529
595
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
530
596
  * @summary Create the lead
@@ -653,6 +719,18 @@ export const LeadsApiFp = function(configuration?: Configuration) {
653
719
  export const LeadsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
654
720
  const localVarFp = LeadsApiFp(configuration)
655
721
  return {
722
+ /**
723
+ * This endpoint clones the lead and updates account and status data. It effectively initiates a new lead creation workflow, including the creation of an account, policy, and banking information.
724
+ * @summary Clone the lead
725
+ * @param {string} code Unique identifier for the object.
726
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
727
+ * @param {string} [authorization] Bearer Token
728
+ * @param {*} [options] Override http request option.
729
+ * @throws {RequiredError}
730
+ */
731
+ cloneLead(code: string, cloneLeadRequestDto: CloneLeadRequestDto, authorization?: string, options?: any): AxiosPromise<CreateLeadResponseClass> {
732
+ return localVarFp.cloneLead(code, cloneLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
733
+ },
656
734
  /**
657
735
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
658
736
  * @summary Create the lead
@@ -765,6 +843,34 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath
765
843
  };
766
844
  };
767
845
 
846
+ /**
847
+ * Request parameters for cloneLead operation in LeadsApi.
848
+ * @export
849
+ * @interface LeadsApiCloneLeadRequest
850
+ */
851
+ export interface LeadsApiCloneLeadRequest {
852
+ /**
853
+ * Unique identifier for the object.
854
+ * @type {string}
855
+ * @memberof LeadsApiCloneLead
856
+ */
857
+ readonly code: string
858
+
859
+ /**
860
+ *
861
+ * @type {CloneLeadRequestDto}
862
+ * @memberof LeadsApiCloneLead
863
+ */
864
+ readonly cloneLeadRequestDto: CloneLeadRequestDto
865
+
866
+ /**
867
+ * Bearer Token
868
+ * @type {string}
869
+ * @memberof LeadsApiCloneLead
870
+ */
871
+ readonly authorization?: string
872
+ }
873
+
768
874
  /**
769
875
  * Request parameters for createLead operation in LeadsApi.
770
876
  * @export
@@ -1031,6 +1137,18 @@ export interface LeadsApiUpdateLeadSyncRequest {
1031
1137
  * @extends {BaseAPI}
1032
1138
  */
1033
1139
  export class LeadsApi extends BaseAPI {
1140
+ /**
1141
+ * This endpoint clones the lead and updates account and status data. It effectively initiates a new lead creation workflow, including the creation of an account, policy, and banking information.
1142
+ * @summary Clone the lead
1143
+ * @param {LeadsApiCloneLeadRequest} requestParameters Request parameters.
1144
+ * @param {*} [options] Override http request option.
1145
+ * @throws {RequiredError}
1146
+ * @memberof LeadsApi
1147
+ */
1148
+ public cloneLead(requestParameters: LeadsApiCloneLeadRequest, options?: AxiosRequestConfig) {
1149
+ return LeadsApiFp(this.configuration).cloneLead(requestParameters.code, requestParameters.cloneLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1150
+ }
1151
+
1034
1152
  /**
1035
1153
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
1036
1154
  * @summary Create the lead
@@ -12,6 +12,7 @@
12
12
  import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
+ import { CloneLeadRequestDto } from '../models';
15
16
  import { CreateLeadAsyncResponseClass } from '../models';
16
17
  import { CreateLeadRequestDto } from '../models';
17
18
  import { CreateLeadResponseClass } from '../models';
@@ -27,6 +28,16 @@ import { UpdateLeadResponseClass } from '../models';
27
28
  * @export
28
29
  */
29
30
  export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration) => {
31
+ /**
32
+ * This endpoint clones the lead and updates account and status data. It effectively initiates a new lead creation workflow, including the creation of an account, policy, and banking information.
33
+ * @summary Clone the lead
34
+ * @param {string} code Unique identifier for the object.
35
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
36
+ * @param {string} [authorization] Bearer Token
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ */
40
+ cloneLead: (code: string, cloneLeadRequestDto: CloneLeadRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
30
41
  /**
31
42
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
32
43
  * @summary Create the lead
@@ -124,6 +135,16 @@ export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration)
124
135
  * @export
125
136
  */
126
137
  export declare const LeadsApiFp: (configuration?: Configuration) => {
138
+ /**
139
+ * This endpoint clones the lead and updates account and status data. It effectively initiates a new lead creation workflow, including the creation of an account, policy, and banking information.
140
+ * @summary Clone the lead
141
+ * @param {string} code Unique identifier for the object.
142
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
143
+ * @param {string} [authorization] Bearer Token
144
+ * @param {*} [options] Override http request option.
145
+ * @throws {RequiredError}
146
+ */
147
+ cloneLead(code: string, cloneLeadRequestDto: CloneLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateLeadResponseClass>>;
127
148
  /**
128
149
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
129
150
  * @summary Create the lead
@@ -221,6 +242,16 @@ export declare const LeadsApiFp: (configuration?: Configuration) => {
221
242
  * @export
222
243
  */
223
244
  export declare const LeadsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
245
+ /**
246
+ * This endpoint clones the lead and updates account and status data. It effectively initiates a new lead creation workflow, including the creation of an account, policy, and banking information.
247
+ * @summary Clone the lead
248
+ * @param {string} code Unique identifier for the object.
249
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
250
+ * @param {string} [authorization] Bearer Token
251
+ * @param {*} [options] Override http request option.
252
+ * @throws {RequiredError}
253
+ */
254
+ cloneLead(code: string, cloneLeadRequestDto: CloneLeadRequestDto, authorization?: string, options?: any): AxiosPromise<CreateLeadResponseClass>;
224
255
  /**
225
256
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
226
257
  * @summary Create the lead
@@ -313,6 +344,31 @@ export declare const LeadsApiFactory: (configuration?: Configuration, basePath?:
313
344
  */
314
345
  updateLeadSync(code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateLeadResponseClass>;
315
346
  };
347
+ /**
348
+ * Request parameters for cloneLead operation in LeadsApi.
349
+ * @export
350
+ * @interface LeadsApiCloneLeadRequest
351
+ */
352
+ export interface LeadsApiCloneLeadRequest {
353
+ /**
354
+ * Unique identifier for the object.
355
+ * @type {string}
356
+ * @memberof LeadsApiCloneLead
357
+ */
358
+ readonly code: string;
359
+ /**
360
+ *
361
+ * @type {CloneLeadRequestDto}
362
+ * @memberof LeadsApiCloneLead
363
+ */
364
+ readonly cloneLeadRequestDto: CloneLeadRequestDto;
365
+ /**
366
+ * Bearer Token
367
+ * @type {string}
368
+ * @memberof LeadsApiCloneLead
369
+ */
370
+ readonly authorization?: string;
371
+ }
316
372
  /**
317
373
  * Request parameters for createLead operation in LeadsApi.
318
374
  * @export
@@ -551,6 +607,15 @@ export interface LeadsApiUpdateLeadSyncRequest {
551
607
  * @extends {BaseAPI}
552
608
  */
553
609
  export declare class LeadsApi extends BaseAPI {
610
+ /**
611
+ * This endpoint clones the lead and updates account and status data. It effectively initiates a new lead creation workflow, including the creation of an account, policy, and banking information.
612
+ * @summary Clone the lead
613
+ * @param {LeadsApiCloneLeadRequest} requestParameters Request parameters.
614
+ * @param {*} [options] Override http request option.
615
+ * @throws {RequiredError}
616
+ * @memberof LeadsApi
617
+ */
618
+ cloneLead(requestParameters: LeadsApiCloneLeadRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateLeadResponseClass, any>>;
554
619
  /**
555
620
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
556
621
  * @summary Create the lead
@@ -96,6 +96,59 @@ var FormData = require('form-data');
96
96
  var LeadsApiAxiosParamCreator = function (configuration) {
97
97
  var _this = this;
98
98
  return {
99
+ /**
100
+ * This endpoint clones the lead and updates account and status data. It effectively initiates a new lead creation workflow, including the creation of an account, policy, and banking information.
101
+ * @summary Clone the lead
102
+ * @param {string} code Unique identifier for the object.
103
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
104
+ * @param {string} [authorization] Bearer Token
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ */
108
+ cloneLead: function (code, cloneLeadRequestDto, authorization, options) {
109
+ if (options === void 0) { options = {}; }
110
+ return __awaiter(_this, void 0, void 0, function () {
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
112
+ return __generator(this, function (_a) {
113
+ switch (_a.label) {
114
+ case 0:
115
+ // verify required parameter 'code' is not null or undefined
116
+ (0, common_1.assertParamExists)('cloneLead', 'code', code);
117
+ // verify required parameter 'cloneLeadRequestDto' is not null or undefined
118
+ (0, common_1.assertParamExists)('cloneLead', 'cloneLeadRequestDto', cloneLeadRequestDto);
119
+ localVarPath = "/insuranceservice/v1/leads/{code}/clone"
120
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
121
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
122
+ if (configuration) {
123
+ baseOptions = configuration.baseOptions;
124
+ baseAccessToken = configuration.accessToken;
125
+ }
126
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
127
+ localVarHeaderParameter = {};
128
+ localVarQueryParameter = {};
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
132
+ case 1:
133
+ // authentication bearer required
134
+ // http bearer authentication required
135
+ _a.sent();
136
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
138
+ }
139
+ localVarHeaderParameter['Content-Type'] = 'application/json';
140
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
141
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
142
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
143
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(cloneLeadRequestDto, localVarRequestOptions, configuration);
144
+ return [2 /*return*/, {
145
+ url: (0, common_1.toPathString)(localVarUrlObj),
146
+ options: localVarRequestOptions,
147
+ }];
148
+ }
149
+ });
150
+ });
151
+ },
99
152
  /**
100
153
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
101
154
  * @summary Create the lead
@@ -584,6 +637,28 @@ exports.LeadsApiAxiosParamCreator = LeadsApiAxiosParamCreator;
584
637
  var LeadsApiFp = function (configuration) {
585
638
  var localVarAxiosParamCreator = (0, exports.LeadsApiAxiosParamCreator)(configuration);
586
639
  return {
640
+ /**
641
+ * This endpoint clones the lead and updates account and status data. It effectively initiates a new lead creation workflow, including the creation of an account, policy, and banking information.
642
+ * @summary Clone the lead
643
+ * @param {string} code Unique identifier for the object.
644
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
645
+ * @param {string} [authorization] Bearer Token
646
+ * @param {*} [options] Override http request option.
647
+ * @throws {RequiredError}
648
+ */
649
+ cloneLead: function (code, cloneLeadRequestDto, authorization, options) {
650
+ return __awaiter(this, void 0, void 0, function () {
651
+ var localVarAxiosArgs;
652
+ return __generator(this, function (_a) {
653
+ switch (_a.label) {
654
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.cloneLead(code, cloneLeadRequestDto, authorization, options)];
655
+ case 1:
656
+ localVarAxiosArgs = _a.sent();
657
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
658
+ }
659
+ });
660
+ });
661
+ },
587
662
  /**
588
663
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
589
664
  * @summary Create the lead
@@ -793,6 +868,18 @@ exports.LeadsApiFp = LeadsApiFp;
793
868
  var LeadsApiFactory = function (configuration, basePath, axios) {
794
869
  var localVarFp = (0, exports.LeadsApiFp)(configuration);
795
870
  return {
871
+ /**
872
+ * This endpoint clones the lead and updates account and status data. It effectively initiates a new lead creation workflow, including the creation of an account, policy, and banking information.
873
+ * @summary Clone the lead
874
+ * @param {string} code Unique identifier for the object.
875
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
876
+ * @param {string} [authorization] Bearer Token
877
+ * @param {*} [options] Override http request option.
878
+ * @throws {RequiredError}
879
+ */
880
+ cloneLead: function (code, cloneLeadRequestDto, authorization, options) {
881
+ return localVarFp.cloneLead(code, cloneLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
882
+ },
796
883
  /**
797
884
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
798
885
  * @summary Create the lead
@@ -916,6 +1003,18 @@ var LeadsApi = /** @class */ (function (_super) {
916
1003
  function LeadsApi() {
917
1004
  return _super !== null && _super.apply(this, arguments) || this;
918
1005
  }
1006
+ /**
1007
+ * This endpoint clones the lead and updates account and status data. It effectively initiates a new lead creation workflow, including the creation of an account, policy, and banking information.
1008
+ * @summary Clone the lead
1009
+ * @param {LeadsApiCloneLeadRequest} requestParameters Request parameters.
1010
+ * @param {*} [options] Override http request option.
1011
+ * @throws {RequiredError}
1012
+ * @memberof LeadsApi
1013
+ */
1014
+ LeadsApi.prototype.cloneLead = function (requestParameters, options) {
1015
+ var _this = this;
1016
+ return (0, exports.LeadsApiFp)(this.configuration).cloneLead(requestParameters.code, requestParameters.cloneLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1017
+ };
919
1018
  /**
920
1019
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
921
1020
  * @summary Create the lead
@@ -87,4 +87,10 @@ export interface BookingFunnelClass {
87
87
  * @memberof BookingFunnelClass
88
88
  */
89
89
  'version': number;
90
+ /**
91
+ * Show booking funnel on applications page.
92
+ * @type {boolean}
93
+ * @memberof BookingFunnelClass
94
+ */
95
+ 'shouldShowOnApplicationsPage'?: boolean;
90
96
  }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * EMIL InsuranceService
3
+ * The EMIL InsuranceService 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
+ import { RestCloneLeadAccountRequestDto } from './rest-clone-lead-account-request-dto';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface CloneLeadRequestDto
17
+ */
18
+ export interface CloneLeadRequestDto {
19
+ /**
20
+ * Account object. The create lead request should either contain accountCode or account. The account content will be validated if the \'validate\' flag is set to true. an empty object is required if \'validate flag is set to false.
21
+ * @type {RestCloneLeadAccountRequestDto}
22
+ * @memberof CloneLeadRequestDto
23
+ */
24
+ 'account'?: RestCloneLeadAccountRequestDto;
25
+ /**
26
+ * Lead status. Default values are \"created\", \"approved\" and \"declined\". However, those can be extended using /lead-statuses endpoint from insuranceservice.
27
+ * @type {string}
28
+ * @memberof CloneLeadRequestDto
29
+ */
30
+ 'status'?: string;
31
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL InsuranceService
6
+ * The EMIL InsuranceService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -63,4 +63,10 @@ export interface CreateBookingFunnelRequestDto {
63
63
  * @memberof CreateBookingFunnelRequestDto
64
64
  */
65
65
  'productSlug': string;
66
+ /**
67
+ *
68
+ * @type {boolean}
69
+ * @memberof CreateBookingFunnelRequestDto
70
+ */
71
+ 'shouldShowOnApplicationsPage'?: boolean;
66
72
  }
@@ -0,0 +1,120 @@
1
+ /**
2
+ * EMIL InsuranceService
3
+ * The EMIL InsuranceService 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 GrpcCloneLeadAccountRequestDto
16
+ */
17
+ export interface GrpcCloneLeadAccountRequestDto {
18
+ /**
19
+ * Optional field to enter the honorific title you want to be called.
20
+ * @type {string}
21
+ * @memberof GrpcCloneLeadAccountRequestDto
22
+ */
23
+ 'title'?: GrpcCloneLeadAccountRequestDtoTitleEnum;
24
+ /**
25
+ * The account\'s holder first name. The account\'s first name will be validated if the \'validate\' flag is set to true.
26
+ * @type {string}
27
+ * @memberof GrpcCloneLeadAccountRequestDto
28
+ */
29
+ 'firstName'?: string;
30
+ /**
31
+ * The account\'s holder first name. The account\'s first name will be validated if the \'validate\' flag is set to true.
32
+ * @type {string}
33
+ * @memberof GrpcCloneLeadAccountRequestDto
34
+ */
35
+ 'lastName'?: string;
36
+ /**
37
+ * The account\'s holder email address. It is displayed alongside the account in your dashboard and can be useful for searching and tracking. The account\'s email address will be validated if the \'validate\' flag is set to true.
38
+ * @type {string}
39
+ * @memberof GrpcCloneLeadAccountRequestDto
40
+ */
41
+ 'email'?: string;
42
+ /**
43
+ * The account\'s holder gender. The account\'s gender will be validated if the \'validate\' flag is set to true.
44
+ * @type {string}
45
+ * @memberof GrpcCloneLeadAccountRequestDto
46
+ */
47
+ 'gender'?: string;
48
+ /**
49
+ * The account\'s holder street name. The account\'s street name will be validated if the \'validate\' flag is set to true.
50
+ * @type {string}
51
+ * @memberof GrpcCloneLeadAccountRequestDto
52
+ */
53
+ 'street'?: string;
54
+ /**
55
+ * The account\'s holder ZIP or postal code. The account\'s ZIP or postal code will be validated if the \'validate\' flag is set to true.
56
+ * @type {string}
57
+ * @memberof GrpcCloneLeadAccountRequestDto
58
+ */
59
+ 'zipCode'?: string;
60
+ /**
61
+ * The account\'s holder city, district, suburb, town, or village. The account\'s city will be validated if the \'validate\' flag is set to true.
62
+ * @type {string}
63
+ * @memberof GrpcCloneLeadAccountRequestDto
64
+ */
65
+ 'city'?: string;
66
+ /**
67
+ * The account\'s holder house number. The account\'s house number will be validated if the \'validate\' flag is set to true.
68
+ * @type {string}
69
+ * @memberof GrpcCloneLeadAccountRequestDto
70
+ */
71
+ 'houseNumber'?: string;
72
+ /**
73
+ * The account\'s holder date of birth (Required for account of type person). The account\'s date of birth will be validated if the \'validate\' flag is set to true.
74
+ * @type {string}
75
+ * @memberof GrpcCloneLeadAccountRequestDto
76
+ */
77
+ 'birthDate'?: string;
78
+ /**
79
+ * The account\'s holder phone number. The account\'s phone number will be validated if the \'validate\' flag is set to true.
80
+ * @type {string}
81
+ * @memberof GrpcCloneLeadAccountRequestDto
82
+ */
83
+ 'phone'?: string;
84
+ /**
85
+ * The account\'s type. Default value is person
86
+ * @type {string}
87
+ * @memberof GrpcCloneLeadAccountRequestDto
88
+ */
89
+ 'type'?: GrpcCloneLeadAccountRequestDtoTypeEnum;
90
+ /**
91
+ * The account\'s company name (Required for account of type org). The account\'s company name will be validated if the \'validate\' flag is set to true.
92
+ * @type {string}
93
+ * @memberof GrpcCloneLeadAccountRequestDto
94
+ */
95
+ 'companyName'?: string;
96
+ /**
97
+ * Account number.
98
+ * @type {string}
99
+ * @memberof GrpcCloneLeadAccountRequestDto
100
+ */
101
+ 'accountNumber'?: string;
102
+ /**
103
+ * Optional custom fields for account. It could be included additional required/optional fields that the account would need for specific cases.
104
+ * @type {object}
105
+ * @memberof GrpcCloneLeadAccountRequestDto
106
+ */
107
+ 'customFields'?: object;
108
+ }
109
+ export declare const GrpcCloneLeadAccountRequestDtoTitleEnum: {
110
+ readonly Empty: "";
111
+ readonly Dr: "Dr.";
112
+ readonly DrMed: "Dr. med.";
113
+ readonly Prof: "Prof.";
114
+ };
115
+ export type GrpcCloneLeadAccountRequestDtoTitleEnum = typeof GrpcCloneLeadAccountRequestDtoTitleEnum[keyof typeof GrpcCloneLeadAccountRequestDtoTitleEnum];
116
+ export declare const GrpcCloneLeadAccountRequestDtoTypeEnum: {
117
+ readonly Person: "person";
118
+ readonly Org: "org";
119
+ };
120
+ export type GrpcCloneLeadAccountRequestDtoTypeEnum = typeof GrpcCloneLeadAccountRequestDtoTypeEnum[keyof typeof GrpcCloneLeadAccountRequestDtoTypeEnum];