@emilgroup/insurance-sdk 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 (37) hide show
  1. package/.openapi-generator/FILES +5 -0
  2. package/README.md +2 -2
  3. package/api/leads-api.ts +118 -0
  4. package/base.ts +5 -1
  5. package/dist/api/leads-api.d.ts +65 -0
  6. package/dist/api/leads-api.js +99 -0
  7. package/dist/base.d.ts +1 -0
  8. package/dist/base.js +4 -1
  9. package/dist/models/booking-funnel-class.d.ts +6 -0
  10. package/dist/models/clone-lead-request-dto.d.ts +31 -0
  11. package/dist/models/clone-lead-request-dto.js +15 -0
  12. package/dist/models/create-booking-funnel-request-dto.d.ts +6 -0
  13. package/dist/models/grpc-clone-lead-account-request-dto.d.ts +120 -0
  14. package/dist/models/grpc-clone-lead-account-request-dto.js +26 -0
  15. package/dist/models/grpc-clone-lead-request-dto.d.ts +37 -0
  16. package/dist/models/grpc-clone-lead-request-dto.js +15 -0
  17. package/dist/models/index.d.ts +5 -0
  18. package/dist/models/index.js +5 -0
  19. package/dist/models/partner-class.d.ts +7 -0
  20. package/dist/models/patch-booking-funnel-request-dto.d.ts +6 -0
  21. package/dist/models/rest-clone-lead-account-request-dto.d.ts +120 -0
  22. package/dist/models/rest-clone-lead-account-request-dto.js +26 -0
  23. package/dist/models/tag-class.d.ts +54 -0
  24. package/dist/models/tag-class.js +15 -0
  25. package/dist/models/update-booking-funnel-request-dto.d.ts +6 -0
  26. package/models/booking-funnel-class.ts +6 -0
  27. package/models/clone-lead-request-dto.ts +37 -0
  28. package/models/create-booking-funnel-request-dto.ts +6 -0
  29. package/models/grpc-clone-lead-account-request-dto.ts +130 -0
  30. package/models/grpc-clone-lead-request-dto.ts +43 -0
  31. package/models/index.ts +5 -0
  32. package/models/partner-class.ts +7 -0
  33. package/models/patch-booking-funnel-request-dto.ts +6 -0
  34. package/models/rest-clone-lead-account-request-dto.ts +130 -0
  35. package/models/tag-class.ts +60 -0
  36. package/models/update-booking-funnel-request-dto.ts +6 -0
  37. 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@1.50.0 --save
20
+ npm install @emilgroup/insurance-sdk@1.52.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/insurance-sdk@1.50.0
24
+ yarn add @emilgroup/insurance-sdk@1.52.0
25
25
  ```
26
26
 
27
27
  And then you can import `PoliciesApi`.
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';
@@ -46,6 +48,57 @@ import { UpdateLeadResponseClass } from '../models';
46
48
  */
47
49
  export const LeadsApiAxiosParamCreator = function (configuration?: Configuration) {
48
50
  return {
51
+ /**
52
+ * 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.
53
+ * @summary Clone the lead
54
+ * @param {string} code Unique identifier for the object.
55
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
56
+ * @param {string} [authorization] Bearer Token
57
+ * @param {*} [options] Override http request option.
58
+ * @throws {RequiredError}
59
+ */
60
+ cloneLead: async (code: string, cloneLeadRequestDto: CloneLeadRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
61
+ // verify required parameter 'code' is not null or undefined
62
+ assertParamExists('cloneLead', 'code', code)
63
+ // verify required parameter 'cloneLeadRequestDto' is not null or undefined
64
+ assertParamExists('cloneLead', 'cloneLeadRequestDto', cloneLeadRequestDto)
65
+ const localVarPath = `/insuranceservice/v1/leads/{code}/clone`
66
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
67
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
68
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
69
+ let baseOptions;
70
+ let baseAccessToken;
71
+ if (configuration) {
72
+ baseOptions = configuration.baseOptions;
73
+ baseAccessToken = configuration.accessToken;
74
+ }
75
+
76
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
77
+ const localVarHeaderParameter = {} as any;
78
+ const localVarQueryParameter = {} as any;
79
+
80
+ // authentication bearer required
81
+ // http bearer authentication required
82
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
83
+
84
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
85
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
86
+ }
87
+
88
+
89
+
90
+ localVarHeaderParameter['Content-Type'] = 'application/json';
91
+
92
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
93
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
94
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
95
+ localVarRequestOptions.data = serializeDataIfNeeded(cloneLeadRequestDto, localVarRequestOptions, configuration)
96
+
97
+ return {
98
+ url: toPathString(localVarUrlObj),
99
+ options: localVarRequestOptions,
100
+ };
101
+ },
49
102
  /**
50
103
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
51
104
  * @summary Create the lead
@@ -521,6 +574,19 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
521
574
  export const LeadsApiFp = function(configuration?: Configuration) {
522
575
  const localVarAxiosParamCreator = LeadsApiAxiosParamCreator(configuration)
523
576
  return {
577
+ /**
578
+ * 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.
579
+ * @summary Clone the lead
580
+ * @param {string} code Unique identifier for the object.
581
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
582
+ * @param {string} [authorization] Bearer Token
583
+ * @param {*} [options] Override http request option.
584
+ * @throws {RequiredError}
585
+ */
586
+ async cloneLead(code: string, cloneLeadRequestDto: CloneLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateLeadResponseClass>> {
587
+ const localVarAxiosArgs = await localVarAxiosParamCreator.cloneLead(code, cloneLeadRequestDto, authorization, options);
588
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
589
+ },
524
590
  /**
525
591
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
526
592
  * @summary Create the lead
@@ -649,6 +715,18 @@ export const LeadsApiFp = function(configuration?: Configuration) {
649
715
  export const LeadsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
650
716
  const localVarFp = LeadsApiFp(configuration)
651
717
  return {
718
+ /**
719
+ * 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.
720
+ * @summary Clone the lead
721
+ * @param {string} code Unique identifier for the object.
722
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
723
+ * @param {string} [authorization] Bearer Token
724
+ * @param {*} [options] Override http request option.
725
+ * @throws {RequiredError}
726
+ */
727
+ cloneLead(code: string, cloneLeadRequestDto: CloneLeadRequestDto, authorization?: string, options?: any): AxiosPromise<CreateLeadResponseClass> {
728
+ return localVarFp.cloneLead(code, cloneLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
729
+ },
652
730
  /**
653
731
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
654
732
  * @summary Create the lead
@@ -761,6 +839,34 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath
761
839
  };
762
840
  };
763
841
 
842
+ /**
843
+ * Request parameters for cloneLead operation in LeadsApi.
844
+ * @export
845
+ * @interface LeadsApiCloneLeadRequest
846
+ */
847
+ export interface LeadsApiCloneLeadRequest {
848
+ /**
849
+ * Unique identifier for the object.
850
+ * @type {string}
851
+ * @memberof LeadsApiCloneLead
852
+ */
853
+ readonly code: string
854
+
855
+ /**
856
+ *
857
+ * @type {CloneLeadRequestDto}
858
+ * @memberof LeadsApiCloneLead
859
+ */
860
+ readonly cloneLeadRequestDto: CloneLeadRequestDto
861
+
862
+ /**
863
+ * Bearer Token
864
+ * @type {string}
865
+ * @memberof LeadsApiCloneLead
866
+ */
867
+ readonly authorization?: string
868
+ }
869
+
764
870
  /**
765
871
  * Request parameters for createLead operation in LeadsApi.
766
872
  * @export
@@ -1027,6 +1133,18 @@ export interface LeadsApiUpdateLeadSyncRequest {
1027
1133
  * @extends {BaseAPI}
1028
1134
  */
1029
1135
  export class LeadsApi extends BaseAPI {
1136
+ /**
1137
+ * 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.
1138
+ * @summary Clone the lead
1139
+ * @param {LeadsApiCloneLeadRequest} requestParameters Request parameters.
1140
+ * @param {*} [options] Override http request option.
1141
+ * @throws {RequiredError}
1142
+ * @memberof LeadsApi
1143
+ */
1144
+ public cloneLead(requestParameters: LeadsApiCloneLeadRequest, options?: AxiosRequestConfig) {
1145
+ return LeadsApiFp(this.configuration).cloneLead(requestParameters.code, requestParameters.cloneLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1146
+ }
1147
+
1030
1148
  /**
1031
1149
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
1032
1150
  * @summary Create the lead
package/base.ts CHANGED
@@ -102,7 +102,11 @@ export class BaseAPI {
102
102
  }
103
103
 
104
104
  selectEnvironment(env: Environment) {
105
- this.configuration.basePath = env;
105
+ this.selectBasePath(env);
106
+ }
107
+
108
+ selectBasePath(path: string) {
109
+ this.configuration.basePath = path;
106
110
  }
107
111
 
108
112
  async authorize(username: string, password: string): Promise<void> {
@@ -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
@@ -92,6 +92,59 @@ var base_1 = require("../base");
92
92
  var LeadsApiAxiosParamCreator = function (configuration) {
93
93
  var _this = this;
94
94
  return {
95
+ /**
96
+ * 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.
97
+ * @summary Clone the lead
98
+ * @param {string} code Unique identifier for the object.
99
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
100
+ * @param {string} [authorization] Bearer Token
101
+ * @param {*} [options] Override http request option.
102
+ * @throws {RequiredError}
103
+ */
104
+ cloneLead: function (code, cloneLeadRequestDto, authorization, options) {
105
+ if (options === void 0) { options = {}; }
106
+ return __awaiter(_this, void 0, void 0, function () {
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
108
+ return __generator(this, function (_a) {
109
+ switch (_a.label) {
110
+ case 0:
111
+ // verify required parameter 'code' is not null or undefined
112
+ (0, common_1.assertParamExists)('cloneLead', 'code', code);
113
+ // verify required parameter 'cloneLeadRequestDto' is not null or undefined
114
+ (0, common_1.assertParamExists)('cloneLead', 'cloneLeadRequestDto', cloneLeadRequestDto);
115
+ localVarPath = "/insuranceservice/v1/leads/{code}/clone"
116
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
117
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ baseAccessToken = configuration.accessToken;
121
+ }
122
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
123
+ localVarHeaderParameter = {};
124
+ localVarQueryParameter = {};
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ case 1:
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ _a.sent();
132
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ }
135
+ localVarHeaderParameter['Content-Type'] = 'application/json';
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(cloneLeadRequestDto, localVarRequestOptions, configuration);
140
+ return [2 /*return*/, {
141
+ url: (0, common_1.toPathString)(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ }];
144
+ }
145
+ });
146
+ });
147
+ },
95
148
  /**
96
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.
97
150
  * @summary Create the lead
@@ -580,6 +633,28 @@ exports.LeadsApiAxiosParamCreator = LeadsApiAxiosParamCreator;
580
633
  var LeadsApiFp = function (configuration) {
581
634
  var localVarAxiosParamCreator = (0, exports.LeadsApiAxiosParamCreator)(configuration);
582
635
  return {
636
+ /**
637
+ * 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.
638
+ * @summary Clone the lead
639
+ * @param {string} code Unique identifier for the object.
640
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
641
+ * @param {string} [authorization] Bearer Token
642
+ * @param {*} [options] Override http request option.
643
+ * @throws {RequiredError}
644
+ */
645
+ cloneLead: function (code, cloneLeadRequestDto, authorization, options) {
646
+ return __awaiter(this, void 0, void 0, function () {
647
+ var localVarAxiosArgs;
648
+ return __generator(this, function (_a) {
649
+ switch (_a.label) {
650
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.cloneLead(code, cloneLeadRequestDto, authorization, options)];
651
+ case 1:
652
+ localVarAxiosArgs = _a.sent();
653
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
654
+ }
655
+ });
656
+ });
657
+ },
583
658
  /**
584
659
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
585
660
  * @summary Create the lead
@@ -789,6 +864,18 @@ exports.LeadsApiFp = LeadsApiFp;
789
864
  var LeadsApiFactory = function (configuration, basePath, axios) {
790
865
  var localVarFp = (0, exports.LeadsApiFp)(configuration);
791
866
  return {
867
+ /**
868
+ * 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.
869
+ * @summary Clone the lead
870
+ * @param {string} code Unique identifier for the object.
871
+ * @param {CloneLeadRequestDto} cloneLeadRequestDto
872
+ * @param {string} [authorization] Bearer Token
873
+ * @param {*} [options] Override http request option.
874
+ * @throws {RequiredError}
875
+ */
876
+ cloneLead: function (code, cloneLeadRequestDto, authorization, options) {
877
+ return localVarFp.cloneLead(code, cloneLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
878
+ },
792
879
  /**
793
880
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
794
881
  * @summary Create the lead
@@ -912,6 +999,18 @@ var LeadsApi = /** @class */ (function (_super) {
912
999
  function LeadsApi() {
913
1000
  return _super !== null && _super.apply(this, arguments) || this;
914
1001
  }
1002
+ /**
1003
+ * 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.
1004
+ * @summary Clone the lead
1005
+ * @param {LeadsApiCloneLeadRequest} requestParameters Request parameters.
1006
+ * @param {*} [options] Override http request option.
1007
+ * @throws {RequiredError}
1008
+ * @memberof LeadsApi
1009
+ */
1010
+ LeadsApi.prototype.cloneLead = function (requestParameters, options) {
1011
+ var _this = this;
1012
+ return (0, exports.LeadsApiFp)(this.configuration).cloneLead(requestParameters.code, requestParameters.cloneLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1013
+ };
915
1014
  /**
916
1015
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
917
1016
  * @summary Create the lead
package/dist/base.d.ts CHANGED
@@ -54,6 +54,7 @@ export declare class BaseAPI {
54
54
  private tokenData?;
55
55
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
56
56
  selectEnvironment(env: Environment): void;
57
+ selectBasePath(path: string): void;
57
58
  authorize(username: string, password: string): Promise<void>;
58
59
  refreshTokenInternal(): Promise<string>;
59
60
  private storeTokenData;
package/dist/base.js CHANGED
@@ -138,7 +138,10 @@ var BaseAPI = /** @class */ (function () {
138
138
  this.attachInterceptor(axios);
139
139
  }
140
140
  BaseAPI.prototype.selectEnvironment = function (env) {
141
- this.configuration.basePath = env;
141
+ this.selectBasePath(env);
142
+ };
143
+ BaseAPI.prototype.selectBasePath = function (path) {
144
+ this.configuration.basePath = path;
142
145
  };
143
146
  BaseAPI.prototype.authorize = function (username, password) {
144
147
  return __awaiter(this, void 0, void 0, function () {
@@ -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];