@emilgroup/insurance-sdk 1.0.3 → 1.2.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 (40) hide show
  1. package/.openapi-generator/FILES +3 -1
  2. package/README.md +2 -2
  3. package/api/insured-object-types-api.ts +0 -4
  4. package/api/insured-objects-api.ts +0 -4
  5. package/api/leads-api.ts +249 -18
  6. package/api/policies-api.ts +0 -4
  7. package/api/products-api.ts +2 -6
  8. package/api.ts +0 -4
  9. package/base.ts +12 -5
  10. package/common.ts +0 -2
  11. package/dist/api/insured-object-types-api.js +1 -5
  12. package/dist/api/insured-objects-api.js +3 -7
  13. package/dist/api/leads-api.d.ts +138 -9
  14. package/dist/api/leads-api.js +212 -17
  15. package/dist/api/policies-api.js +4 -8
  16. package/dist/api/products-api.js +25 -29
  17. package/dist/base.d.ts +2 -1
  18. package/dist/base.js +10 -4
  19. package/dist/common.d.ts +0 -1
  20. package/dist/common.js +1 -2
  21. package/dist/models/create-account-request-dto.d.ts +1 -1
  22. package/dist/models/create-bank-account-request-dto.d.ts +1 -1
  23. package/dist/models/create-dummy-policy-request-dto.d.ts +31 -0
  24. package/dist/models/{shared-create-lead-request-dto.js → create-dummy-policy-request-dto.js} +0 -0
  25. package/dist/models/create-lead-request-dto.d.ts +23 -10
  26. package/dist/models/create-lead-request-dto.js +7 -0
  27. package/dist/models/grpc-create-policy-request-dto.d.ts +37 -0
  28. package/dist/models/grpc-create-policy-request-dto.js +15 -0
  29. package/dist/models/index.d.ts +3 -1
  30. package/dist/models/index.js +3 -1
  31. package/dist/models/{shared-create-lead-request-dto.d.ts → update-lead-request-dto.d.ts} +26 -13
  32. package/dist/models/update-lead-request-dto.js +22 -0
  33. package/models/create-account-request-dto.ts +1 -1
  34. package/models/create-bank-account-request-dto.ts +1 -1
  35. package/models/create-dummy-policy-request-dto.ts +37 -0
  36. package/models/create-lead-request-dto.ts +26 -10
  37. package/models/grpc-create-policy-request-dto.ts +43 -0
  38. package/models/index.ts +3 -1
  39. package/models/{shared-create-lead-request-dto.ts → update-lead-request-dto.ts} +29 -13
  40. package/package.json +2 -4
@@ -12,7 +12,8 @@
12
12
  import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
- import { SharedCreateLeadRequestDto } from '../models';
15
+ import { CreateLeadRequestDto } from '../models';
16
+ import { UpdateLeadRequestDto } from '../models';
16
17
  /**
17
18
  * LeadsApi - axios parameter creator
18
19
  * @export
@@ -21,12 +22,32 @@ export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration)
21
22
  /**
22
23
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
23
24
  * @summary Create the lead
24
- * @param {SharedCreateLeadRequestDto} sharedCreateLeadRequestDto
25
+ * @param {CreateLeadRequestDto} createLeadRequestDto
25
26
  * @param {string} [authorization] Bearer Token
26
27
  * @param {*} [options] Override http request option.
27
28
  * @throws {RequiredError}
28
29
  */
29
- createLead: (sharedCreateLeadRequestDto: SharedCreateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
30
+ createLead: (createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
31
+ /**
32
+ * 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.
33
+ * @summary Retrieve the lead
34
+ * @param {string} code Unique identifier for the object.
35
+ * @param {string} expand
36
+ * @param {string} [authorization] Bearer Token
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ */
40
+ getLead: (code: string, expand: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
41
+ /**
42
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
43
+ * @summary Update the lead
44
+ * @param {string} code Unique identifier for the object.
45
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
46
+ * @param {string} [authorization] Bearer Token
47
+ * @param {*} [options] Override http request option.
48
+ * @throws {RequiredError}
49
+ */
50
+ updateLead: (code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
30
51
  };
31
52
  /**
32
53
  * LeadsApi - functional programming interface
@@ -36,12 +57,32 @@ export declare const LeadsApiFp: (configuration?: Configuration) => {
36
57
  /**
37
58
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
38
59
  * @summary Create the lead
39
- * @param {SharedCreateLeadRequestDto} sharedCreateLeadRequestDto
60
+ * @param {CreateLeadRequestDto} createLeadRequestDto
61
+ * @param {string} [authorization] Bearer Token
62
+ * @param {*} [options] Override http request option.
63
+ * @throws {RequiredError}
64
+ */
65
+ createLead(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
66
+ /**
67
+ * 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.
68
+ * @summary Retrieve the lead
69
+ * @param {string} code Unique identifier for the object.
70
+ * @param {string} expand
71
+ * @param {string} [authorization] Bearer Token
72
+ * @param {*} [options] Override http request option.
73
+ * @throws {RequiredError}
74
+ */
75
+ getLead(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
76
+ /**
77
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
78
+ * @summary Update the lead
79
+ * @param {string} code Unique identifier for the object.
80
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
40
81
  * @param {string} [authorization] Bearer Token
41
82
  * @param {*} [options] Override http request option.
42
83
  * @throws {RequiredError}
43
84
  */
44
- createLead(sharedCreateLeadRequestDto: SharedCreateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
85
+ updateLead(code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
45
86
  };
46
87
  /**
47
88
  * LeadsApi - factory interface
@@ -51,12 +92,32 @@ export declare const LeadsApiFactory: (configuration?: Configuration, basePath?:
51
92
  /**
52
93
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
53
94
  * @summary Create the lead
54
- * @param {SharedCreateLeadRequestDto} sharedCreateLeadRequestDto
95
+ * @param {CreateLeadRequestDto} createLeadRequestDto
96
+ * @param {string} [authorization] Bearer Token
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ createLead(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<object>;
101
+ /**
102
+ * 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.
103
+ * @summary Retrieve the lead
104
+ * @param {string} code Unique identifier for the object.
105
+ * @param {string} expand
106
+ * @param {string} [authorization] Bearer Token
107
+ * @param {*} [options] Override http request option.
108
+ * @throws {RequiredError}
109
+ */
110
+ getLead(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<object>;
111
+ /**
112
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
113
+ * @summary Update the lead
114
+ * @param {string} code Unique identifier for the object.
115
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
55
116
  * @param {string} [authorization] Bearer Token
56
117
  * @param {*} [options] Override http request option.
57
118
  * @throws {RequiredError}
58
119
  */
59
- createLead(sharedCreateLeadRequestDto: SharedCreateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<object>;
120
+ updateLead(code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<object>;
60
121
  };
61
122
  /**
62
123
  * Request parameters for createLead operation in LeadsApi.
@@ -66,10 +127,10 @@ export declare const LeadsApiFactory: (configuration?: Configuration, basePath?:
66
127
  export interface LeadsApiCreateLeadRequest {
67
128
  /**
68
129
  *
69
- * @type {SharedCreateLeadRequestDto}
130
+ * @type {CreateLeadRequestDto}
70
131
  * @memberof LeadsApiCreateLead
71
132
  */
72
- readonly sharedCreateLeadRequestDto: SharedCreateLeadRequestDto;
133
+ readonly createLeadRequestDto: CreateLeadRequestDto;
73
134
  /**
74
135
  * Bearer Token
75
136
  * @type {string}
@@ -77,6 +138,56 @@ export interface LeadsApiCreateLeadRequest {
77
138
  */
78
139
  readonly authorization?: string;
79
140
  }
141
+ /**
142
+ * Request parameters for getLead operation in LeadsApi.
143
+ * @export
144
+ * @interface LeadsApiGetLeadRequest
145
+ */
146
+ export interface LeadsApiGetLeadRequest {
147
+ /**
148
+ * Unique identifier for the object.
149
+ * @type {string}
150
+ * @memberof LeadsApiGetLead
151
+ */
152
+ readonly code: string;
153
+ /**
154
+ *
155
+ * @type {string}
156
+ * @memberof LeadsApiGetLead
157
+ */
158
+ readonly expand: string;
159
+ /**
160
+ * Bearer Token
161
+ * @type {string}
162
+ * @memberof LeadsApiGetLead
163
+ */
164
+ readonly authorization?: string;
165
+ }
166
+ /**
167
+ * Request parameters for updateLead operation in LeadsApi.
168
+ * @export
169
+ * @interface LeadsApiUpdateLeadRequest
170
+ */
171
+ export interface LeadsApiUpdateLeadRequest {
172
+ /**
173
+ * Unique identifier for the object.
174
+ * @type {string}
175
+ * @memberof LeadsApiUpdateLead
176
+ */
177
+ readonly code: string;
178
+ /**
179
+ *
180
+ * @type {UpdateLeadRequestDto}
181
+ * @memberof LeadsApiUpdateLead
182
+ */
183
+ readonly updateLeadRequestDto: UpdateLeadRequestDto;
184
+ /**
185
+ * Bearer Token
186
+ * @type {string}
187
+ * @memberof LeadsApiUpdateLead
188
+ */
189
+ readonly authorization?: string;
190
+ }
80
191
  /**
81
192
  * LeadsApi - object-oriented interface
82
193
  * @export
@@ -93,4 +204,22 @@ export declare class LeadsApi extends BaseAPI {
93
204
  * @memberof LeadsApi
94
205
  */
95
206
  createLead(requestParameters: LeadsApiCreateLeadRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
207
+ /**
208
+ * 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.
209
+ * @summary Retrieve the lead
210
+ * @param {LeadsApiGetLeadRequest} requestParameters Request parameters.
211
+ * @param {*} [options] Override http request option.
212
+ * @throws {RequiredError}
213
+ * @memberof LeadsApi
214
+ */
215
+ getLead(requestParameters: LeadsApiGetLeadRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
216
+ /**
217
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
218
+ * @summary Update the lead
219
+ * @param {LeadsApiUpdateLeadRequest} requestParameters Request parameters.
220
+ * @param {*} [options] Override http request option.
221
+ * @throws {RequiredError}
222
+ * @memberof LeadsApi
223
+ */
224
+ updateLead(requestParameters: LeadsApiUpdateLeadRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
96
225
  }
@@ -85,10 +85,6 @@ var axios_1 = __importDefault(require("axios"));
85
85
  var common_1 = require("../common");
86
86
  // @ts-ignore
87
87
  var base_1 = require("../base");
88
- // URLSearchParams not necessarily used
89
- // @ts-ignore
90
- var url_1 = require("url");
91
- var FormData = require('form-data');
92
88
  /**
93
89
  * LeadsApi - axios parameter creator
94
90
  * @export
@@ -99,22 +95,22 @@ var LeadsApiAxiosParamCreator = function (configuration) {
99
95
  /**
100
96
  * 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
97
  * @summary Create the lead
102
- * @param {SharedCreateLeadRequestDto} sharedCreateLeadRequestDto
98
+ * @param {CreateLeadRequestDto} createLeadRequestDto
103
99
  * @param {string} [authorization] Bearer Token
104
100
  * @param {*} [options] Override http request option.
105
101
  * @throws {RequiredError}
106
102
  */
107
- createLead: function (sharedCreateLeadRequestDto, authorization, options) {
103
+ createLead: function (createLeadRequestDto, authorization, options) {
108
104
  if (options === void 0) { options = {}; }
109
105
  return __awaiter(_this, void 0, void 0, function () {
110
106
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
107
  return __generator(this, function (_a) {
112
108
  switch (_a.label) {
113
109
  case 0:
114
- // verify required parameter 'sharedCreateLeadRequestDto' is not null or undefined
115
- (0, common_1.assertParamExists)('createLead', 'sharedCreateLeadRequestDto', sharedCreateLeadRequestDto);
110
+ // verify required parameter 'createLeadRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createLead', 'createLeadRequestDto', createLeadRequestDto);
116
112
  localVarPath = "/insuranceservice/v1/leads";
117
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
113
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
118
114
  if (configuration) {
119
115
  baseOptions = configuration.baseOptions;
120
116
  baseAccessToken = configuration.accessToken;
@@ -136,7 +132,114 @@ var LeadsApiAxiosParamCreator = function (configuration) {
136
132
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
133
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
134
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(sharedCreateLeadRequestDto, localVarRequestOptions, configuration);
135
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createLeadRequestDto, localVarRequestOptions, configuration);
136
+ return [2 /*return*/, {
137
+ url: (0, common_1.toPathString)(localVarUrlObj),
138
+ options: localVarRequestOptions,
139
+ }];
140
+ }
141
+ });
142
+ });
143
+ },
144
+ /**
145
+ * 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.
146
+ * @summary Retrieve the lead
147
+ * @param {string} code Unique identifier for the object.
148
+ * @param {string} expand
149
+ * @param {string} [authorization] Bearer Token
150
+ * @param {*} [options] Override http request option.
151
+ * @throws {RequiredError}
152
+ */
153
+ getLead: function (code, expand, authorization, options) {
154
+ if (options === void 0) { options = {}; }
155
+ return __awaiter(_this, void 0, void 0, function () {
156
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
157
+ return __generator(this, function (_a) {
158
+ switch (_a.label) {
159
+ case 0:
160
+ // verify required parameter 'code' is not null or undefined
161
+ (0, common_1.assertParamExists)('getLead', 'code', code);
162
+ // verify required parameter 'expand' is not null or undefined
163
+ (0, common_1.assertParamExists)('getLead', 'expand', expand);
164
+ localVarPath = "/insuranceservice/v1/leads/{code}"
165
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
166
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
167
+ if (configuration) {
168
+ baseOptions = configuration.baseOptions;
169
+ baseAccessToken = configuration.accessToken;
170
+ }
171
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
172
+ localVarHeaderParameter = {};
173
+ localVarQueryParameter = {};
174
+ // authentication bearer required
175
+ // http bearer authentication required
176
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
177
+ case 1:
178
+ // authentication bearer required
179
+ // http bearer authentication required
180
+ _a.sent();
181
+ if (expand !== undefined) {
182
+ localVarQueryParameter['expand'] = expand;
183
+ }
184
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
185
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
186
+ }
187
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
188
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
189
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
190
+ return [2 /*return*/, {
191
+ url: (0, common_1.toPathString)(localVarUrlObj),
192
+ options: localVarRequestOptions,
193
+ }];
194
+ }
195
+ });
196
+ });
197
+ },
198
+ /**
199
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
200
+ * @summary Update the lead
201
+ * @param {string} code Unique identifier for the object.
202
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
203
+ * @param {string} [authorization] Bearer Token
204
+ * @param {*} [options] Override http request option.
205
+ * @throws {RequiredError}
206
+ */
207
+ updateLead: function (code, updateLeadRequestDto, authorization, options) {
208
+ if (options === void 0) { options = {}; }
209
+ return __awaiter(_this, void 0, void 0, function () {
210
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
211
+ return __generator(this, function (_a) {
212
+ switch (_a.label) {
213
+ case 0:
214
+ // verify required parameter 'code' is not null or undefined
215
+ (0, common_1.assertParamExists)('updateLead', 'code', code);
216
+ // verify required parameter 'updateLeadRequestDto' is not null or undefined
217
+ (0, common_1.assertParamExists)('updateLead', 'updateLeadRequestDto', updateLeadRequestDto);
218
+ localVarPath = "/insuranceservice/v1/leads/{code}"
219
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
220
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
221
+ if (configuration) {
222
+ baseOptions = configuration.baseOptions;
223
+ baseAccessToken = configuration.accessToken;
224
+ }
225
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
226
+ localVarHeaderParameter = {};
227
+ localVarQueryParameter = {};
228
+ // authentication bearer required
229
+ // http bearer authentication required
230
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
231
+ case 1:
232
+ // authentication bearer required
233
+ // http bearer authentication required
234
+ _a.sent();
235
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
236
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
237
+ }
238
+ localVarHeaderParameter['Content-Type'] = 'application/json';
239
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
240
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
241
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
242
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateLeadRequestDto, localVarRequestOptions, configuration);
140
243
  return [2 /*return*/, {
141
244
  url: (0, common_1.toPathString)(localVarUrlObj),
142
245
  options: localVarRequestOptions,
@@ -158,17 +261,61 @@ var LeadsApiFp = function (configuration) {
158
261
  /**
159
262
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
160
263
  * @summary Create the lead
161
- * @param {SharedCreateLeadRequestDto} sharedCreateLeadRequestDto
264
+ * @param {CreateLeadRequestDto} createLeadRequestDto
265
+ * @param {string} [authorization] Bearer Token
266
+ * @param {*} [options] Override http request option.
267
+ * @throws {RequiredError}
268
+ */
269
+ createLead: function (createLeadRequestDto, authorization, options) {
270
+ return __awaiter(this, void 0, void 0, function () {
271
+ var localVarAxiosArgs;
272
+ return __generator(this, function (_a) {
273
+ switch (_a.label) {
274
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createLead(createLeadRequestDto, authorization, options)];
275
+ case 1:
276
+ localVarAxiosArgs = _a.sent();
277
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
278
+ }
279
+ });
280
+ });
281
+ },
282
+ /**
283
+ * 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.
284
+ * @summary Retrieve the lead
285
+ * @param {string} code Unique identifier for the object.
286
+ * @param {string} expand
287
+ * @param {string} [authorization] Bearer Token
288
+ * @param {*} [options] Override http request option.
289
+ * @throws {RequiredError}
290
+ */
291
+ getLead: function (code, expand, authorization, options) {
292
+ return __awaiter(this, void 0, void 0, function () {
293
+ var localVarAxiosArgs;
294
+ return __generator(this, function (_a) {
295
+ switch (_a.label) {
296
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getLead(code, expand, authorization, options)];
297
+ case 1:
298
+ localVarAxiosArgs = _a.sent();
299
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
300
+ }
301
+ });
302
+ });
303
+ },
304
+ /**
305
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
306
+ * @summary Update the lead
307
+ * @param {string} code Unique identifier for the object.
308
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
162
309
  * @param {string} [authorization] Bearer Token
163
310
  * @param {*} [options] Override http request option.
164
311
  * @throws {RequiredError}
165
312
  */
166
- createLead: function (sharedCreateLeadRequestDto, authorization, options) {
313
+ updateLead: function (code, updateLeadRequestDto, authorization, options) {
167
314
  return __awaiter(this, void 0, void 0, function () {
168
315
  var localVarAxiosArgs;
169
316
  return __generator(this, function (_a) {
170
317
  switch (_a.label) {
171
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.createLead(sharedCreateLeadRequestDto, authorization, options)];
318
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateLead(code, updateLeadRequestDto, authorization, options)];
172
319
  case 1:
173
320
  localVarAxiosArgs = _a.sent();
174
321
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -189,13 +336,37 @@ var LeadsApiFactory = function (configuration, basePath, axios) {
189
336
  /**
190
337
  * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
191
338
  * @summary Create the lead
192
- * @param {SharedCreateLeadRequestDto} sharedCreateLeadRequestDto
339
+ * @param {CreateLeadRequestDto} createLeadRequestDto
340
+ * @param {string} [authorization] Bearer Token
341
+ * @param {*} [options] Override http request option.
342
+ * @throws {RequiredError}
343
+ */
344
+ createLead: function (createLeadRequestDto, authorization, options) {
345
+ return localVarFp.createLead(createLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
346
+ },
347
+ /**
348
+ * 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.
349
+ * @summary Retrieve the lead
350
+ * @param {string} code Unique identifier for the object.
351
+ * @param {string} expand
352
+ * @param {string} [authorization] Bearer Token
353
+ * @param {*} [options] Override http request option.
354
+ * @throws {RequiredError}
355
+ */
356
+ getLead: function (code, expand, authorization, options) {
357
+ return localVarFp.getLead(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
358
+ },
359
+ /**
360
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
361
+ * @summary Update the lead
362
+ * @param {string} code Unique identifier for the object.
363
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
193
364
  * @param {string} [authorization] Bearer Token
194
365
  * @param {*} [options] Override http request option.
195
366
  * @throws {RequiredError}
196
367
  */
197
- createLead: function (sharedCreateLeadRequestDto, authorization, options) {
198
- return localVarFp.createLead(sharedCreateLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
368
+ updateLead: function (code, updateLeadRequestDto, authorization, options) {
369
+ return localVarFp.updateLead(code, updateLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
199
370
  },
200
371
  };
201
372
  };
@@ -221,7 +392,31 @@ var LeadsApi = /** @class */ (function (_super) {
221
392
  */
222
393
  LeadsApi.prototype.createLead = function (requestParameters, options) {
223
394
  var _this = this;
224
- return (0, exports.LeadsApiFp)(this.configuration).createLead(requestParameters.sharedCreateLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
395
+ return (0, exports.LeadsApiFp)(this.configuration).createLead(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
396
+ };
397
+ /**
398
+ * 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.
399
+ * @summary Retrieve the lead
400
+ * @param {LeadsApiGetLeadRequest} requestParameters Request parameters.
401
+ * @param {*} [options] Override http request option.
402
+ * @throws {RequiredError}
403
+ * @memberof LeadsApi
404
+ */
405
+ LeadsApi.prototype.getLead = function (requestParameters, options) {
406
+ var _this = this;
407
+ return (0, exports.LeadsApiFp)(this.configuration).getLead(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
408
+ };
409
+ /**
410
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
411
+ * @summary Update the lead
412
+ * @param {LeadsApiUpdateLeadRequest} requestParameters Request parameters.
413
+ * @param {*} [options] Override http request option.
414
+ * @throws {RequiredError}
415
+ * @memberof LeadsApi
416
+ */
417
+ LeadsApi.prototype.updateLead = function (requestParameters, options) {
418
+ var _this = this;
419
+ return (0, exports.LeadsApiFp)(this.configuration).updateLead(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
225
420
  };
226
421
  return LeadsApi;
227
422
  }(base_1.BaseAPI));
@@ -85,10 +85,6 @@ var axios_1 = __importDefault(require("axios"));
85
85
  var common_1 = require("../common");
86
86
  // @ts-ignore
87
87
  var base_1 = require("../base");
88
- // URLSearchParams not necessarily used
89
- // @ts-ignore
90
- var url_1 = require("url");
91
- var FormData = require('form-data');
92
88
  /**
93
89
  * PoliciesApi - axios parameter creator
94
90
  * @export
@@ -114,7 +110,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
114
110
  // verify required parameter 'createPolicyRequestDto' is not null or undefined
115
111
  (0, common_1.assertParamExists)('createPolicy', 'createPolicyRequestDto', createPolicyRequestDto);
116
112
  localVarPath = "/insuranceservice/v1/policies";
117
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
113
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
118
114
  if (configuration) {
119
115
  baseOptions = configuration.baseOptions;
120
116
  baseAccessToken = configuration.accessToken;
@@ -165,7 +161,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
165
161
  (0, common_1.assertParamExists)('getPolicy', 'code', code);
166
162
  localVarPath = "/insuranceservice/v1/policies/{code}"
167
163
  .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
168
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
164
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
169
165
  if (configuration) {
170
166
  baseOptions = configuration.baseOptions;
171
167
  baseAccessToken = configuration.accessToken;
@@ -218,7 +214,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
218
214
  switch (_a.label) {
219
215
  case 0:
220
216
  localVarPath = "/insuranceservice/v1/policies";
221
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
217
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
222
218
  if (configuration) {
223
219
  baseOptions = configuration.baseOptions;
224
220
  baseAccessToken = configuration.accessToken;
@@ -287,7 +283,7 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
287
283
  (0, common_1.assertParamExists)('updatePolicy', 'updatePolicyRequestDto', updatePolicyRequestDto);
288
284
  localVarPath = "/insuranceservice/v1/policies/{code}"
289
285
  .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
290
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
286
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
291
287
  if (configuration) {
292
288
  baseOptions = configuration.baseOptions;
293
289
  baseAccessToken = configuration.accessToken;