@emilgroup/public-api-sdk 1.14.1 → 1.14.3

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 +2 -2
  3. package/api/default-api.ts +120 -0
  4. package/api/leads-api.ts +326 -0
  5. package/api.ts +2 -0
  6. package/dist/api/default-api.d.ts +66 -0
  7. package/dist/api/default-api.js +196 -0
  8. package/dist/api/leads-api.d.ts +176 -0
  9. package/dist/api/leads-api.js +285 -0
  10. package/dist/api.d.ts +1 -0
  11. package/dist/api.js +1 -0
  12. package/dist/models/create-document-request-dto.d.ts +17 -0
  13. package/dist/models/create-document-request-dto.js +5 -1
  14. package/dist/models/create-lead-async-response-class.d.ts +24 -0
  15. package/dist/models/create-lead-async-response-class.js +15 -0
  16. package/dist/models/create-lead-request-dto.d.ts +7 -1
  17. package/dist/models/index.d.ts +4 -0
  18. package/dist/models/index.js +4 -0
  19. package/dist/models/inline-response200.d.ts +54 -0
  20. package/dist/models/inline-response200.js +15 -0
  21. package/dist/models/inline-response503.d.ts +54 -0
  22. package/dist/models/inline-response503.js +15 -0
  23. package/dist/models/lead-sync-response-class.d.ts +24 -0
  24. package/dist/models/lead-sync-response-class.js +15 -0
  25. package/dist/models/update-lead-request-dto.d.ts +9 -3
  26. package/models/create-document-request-dto.ts +18 -0
  27. package/models/create-lead-async-response-class.ts +30 -0
  28. package/models/create-lead-request-dto.ts +7 -1
  29. package/models/index.ts +4 -0
  30. package/models/inline-response200.ts +48 -0
  31. package/models/inline-response503.ts +48 -0
  32. package/models/lead-sync-response-class.ts +30 -0
  33. package/models/update-lead-request-dto.ts +9 -3
  34. package/package.json +1 -1
@@ -4,6 +4,7 @@
4
4
  README.md
5
5
  api.ts
6
6
  api/address-completions-validations-api.ts
7
+ api/default-api.ts
7
8
  api/documents-api.ts
8
9
  api/leads-api.ts
9
10
  api/notifications-api.ts
@@ -30,6 +31,7 @@ models/create-custom-application-response-class.ts
30
31
  models/create-document-request-dto.ts
31
32
  models/create-estimated-invoice-request-dto.ts
32
33
  models/create-estimated-invoice-response-class.ts
34
+ models/create-lead-async-response-class.ts
33
35
  models/create-lead-request-dto.ts
34
36
  models/create-lead-response-class.ts
35
37
  models/create-payment-method-request-dto.ts
@@ -50,6 +52,8 @@ models/initiate-payment-setup-request-dto.ts
50
52
  models/initiate-payment-setup-response-class.ts
51
53
  models/initiate-stripe-payment-setup-request-dto.ts
52
54
  models/initiate-stripe-payment-setup-response-class.ts
55
+ models/inline-response200.ts
56
+ models/inline-response503.ts
53
57
  models/insured-object-class.ts
54
58
  models/insured-object-type-class.ts
55
59
  models/invoice-class.ts
@@ -60,6 +64,7 @@ models/lead-bank-account-class.ts
60
64
  models/lead-class.ts
61
65
  models/lead-policy-class.ts
62
66
  models/lead-policy-object-class.ts
67
+ models/lead-sync-response-class.ts
63
68
  models/list-documents-response-class.ts
64
69
  models/list-product-documents-response-class.ts
65
70
  models/list-products-response-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/public-api-sdk@1.14.1 --save
20
+ npm install @emilgroup/public-api-sdk@1.14.3 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/public-api-sdk@1.14.1
24
+ yarn add @emilgroup/public-api-sdk@1.14.3
25
25
  ```
26
26
 
27
27
  And then you can import `PublicApi`.
@@ -0,0 +1,120 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Emil PublicAPI
5
+ * The Emil Public API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { InlineResponse200 } from '../models';
25
+ // @ts-ignore
26
+ import { InlineResponse503 } from '../models';
27
+ /**
28
+ * DefaultApi - axios parameter creator
29
+ * @export
30
+ */
31
+ export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
32
+ return {
33
+ /**
34
+ *
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ */
38
+ check: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
39
+ const localVarPath = `/publicapi/health`;
40
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
41
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
42
+ let baseOptions;
43
+ let baseAccessToken;
44
+ if (configuration) {
45
+ baseOptions = configuration.baseOptions;
46
+ baseAccessToken = configuration.accessToken;
47
+ }
48
+
49
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
50
+ const localVarHeaderParameter = {} as any;
51
+ const localVarQueryParameter = {} as any;
52
+
53
+
54
+
55
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
56
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
57
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
58
+
59
+ return {
60
+ url: toPathString(localVarUrlObj),
61
+ options: localVarRequestOptions,
62
+ };
63
+ },
64
+ }
65
+ };
66
+
67
+ /**
68
+ * DefaultApi - functional programming interface
69
+ * @export
70
+ */
71
+ export const DefaultApiFp = function(configuration?: Configuration) {
72
+ const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
73
+ return {
74
+ /**
75
+ *
76
+ * @param {*} [options] Override http request option.
77
+ * @throws {RequiredError}
78
+ */
79
+ async check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>> {
80
+ const localVarAxiosArgs = await localVarAxiosParamCreator.check(options);
81
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
82
+ },
83
+ }
84
+ };
85
+
86
+ /**
87
+ * DefaultApi - factory interface
88
+ * @export
89
+ */
90
+ export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
91
+ const localVarFp = DefaultApiFp(configuration)
92
+ return {
93
+ /**
94
+ *
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ check(options?: any): AxiosPromise<InlineResponse200> {
99
+ return localVarFp.check(options).then((request) => request(axios, basePath));
100
+ },
101
+ };
102
+ };
103
+
104
+ /**
105
+ * DefaultApi - object-oriented interface
106
+ * @export
107
+ * @class DefaultApi
108
+ * @extends {BaseAPI}
109
+ */
110
+ export class DefaultApi extends BaseAPI {
111
+ /**
112
+ *
113
+ * @param {*} [options] Override http request option.
114
+ * @throws {RequiredError}
115
+ * @memberof DefaultApi
116
+ */
117
+ public check(options?: AxiosRequestConfig) {
118
+ return DefaultApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
119
+ }
120
+ }
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 { CreateLeadAsyncResponseClass } from '../models';
25
+ // @ts-ignore
24
26
  import { CreateLeadRequestDto } from '../models';
25
27
  // @ts-ignore
26
28
  import { CreateLeadResponseClass } from '../models';
@@ -29,6 +31,8 @@ import { GetLeadResponseClass } from '../models';
29
31
  // @ts-ignore
30
32
  import { InitiateLeadResponseClass } from '../models';
31
33
  // @ts-ignore
34
+ import { LeadSyncResponseClass } from '../models';
35
+ // @ts-ignore
32
36
  import { UpdateLeadRequestDto } from '../models';
33
37
  // @ts-ignore
34
38
  import { UpdateLeadResponseClass } from '../models';
@@ -73,6 +77,100 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
73
77
 
74
78
 
75
79
 
80
+ localVarHeaderParameter['Content-Type'] = 'application/json';
81
+
82
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
83
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
84
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
85
+ localVarRequestOptions.data = serializeDataIfNeeded(createLeadRequestDto, localVarRequestOptions, configuration)
86
+
87
+ return {
88
+ url: toPathString(localVarUrlObj),
89
+ options: localVarRequestOptions,
90
+ };
91
+ },
92
+ /**
93
+ * This will send the lead to the queue for creation. Should be used when creating multiple leads at the same time - also called \'batch processing\'.
94
+ * @summary Create the lead asynchronously
95
+ * @param {CreateLeadRequestDto} createLeadRequestDto
96
+ * @param {string} [authorization] Bearer Token
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ createLeadAsync: async (createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
101
+ // verify required parameter 'createLeadRequestDto' is not null or undefined
102
+ assertParamExists('createLeadAsync', 'createLeadRequestDto', createLeadRequestDto)
103
+ const localVarPath = `/publicapi/v1/leads-async`;
104
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
105
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
106
+ let baseOptions;
107
+ let baseAccessToken;
108
+ if (configuration) {
109
+ baseOptions = configuration.baseOptions;
110
+ baseAccessToken = configuration.accessToken;
111
+ }
112
+
113
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
114
+ const localVarHeaderParameter = {} as any;
115
+ const localVarQueryParameter = {} as any;
116
+
117
+ // authentication bearer required
118
+ // http bearer authentication required
119
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
120
+
121
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
122
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
123
+ }
124
+
125
+
126
+
127
+ localVarHeaderParameter['Content-Type'] = 'application/json';
128
+
129
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
130
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
131
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
132
+ localVarRequestOptions.data = serializeDataIfNeeded(createLeadRequestDto, localVarRequestOptions, configuration)
133
+
134
+ return {
135
+ url: toPathString(localVarUrlObj),
136
+ options: localVarRequestOptions,
137
+ };
138
+ },
139
+ /**
140
+ * This endpoint initiates the creation of a lead, which is the initial step in a comprehensive workflow responsible for the creation of an account, policy, and banking information. Unlike the standard lead creation endpoint, this variant ensures that the process waits until the entire workflow is successfully completed before providing a response.
141
+ * @summary Create the lead
142
+ * @param {CreateLeadRequestDto} createLeadRequestDto
143
+ * @param {string} [authorization] Bearer Token
144
+ * @param {*} [options] Override http request option.
145
+ * @throws {RequiredError}
146
+ */
147
+ createLeadSync: async (createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
148
+ // verify required parameter 'createLeadRequestDto' is not null or undefined
149
+ assertParamExists('createLeadSync', 'createLeadRequestDto', createLeadRequestDto)
150
+ const localVarPath = `/publicapi/v1/leads-sync`;
151
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
152
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
153
+ let baseOptions;
154
+ let baseAccessToken;
155
+ if (configuration) {
156
+ baseOptions = configuration.baseOptions;
157
+ baseAccessToken = configuration.accessToken;
158
+ }
159
+
160
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
161
+ const localVarHeaderParameter = {} as any;
162
+ const localVarQueryParameter = {} as any;
163
+
164
+ // authentication bearer required
165
+ // http bearer authentication required
166
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
167
+
168
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
169
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
170
+ }
171
+
172
+
173
+
76
174
  localVarHeaderParameter['Content-Type'] = 'application/json';
77
175
 
78
176
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -210,6 +308,57 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
210
308
 
211
309
 
212
310
 
311
+ localVarHeaderParameter['Content-Type'] = 'application/json';
312
+
313
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
314
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
315
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
316
+ localVarRequestOptions.data = serializeDataIfNeeded(updateLeadRequestDto, localVarRequestOptions, configuration)
317
+
318
+ return {
319
+ url: toPathString(localVarUrlObj),
320
+ options: localVarRequestOptions,
321
+ };
322
+ },
323
+ /**
324
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
325
+ * @summary Update the lead
326
+ * @param {string} code Unique identifier for the object.
327
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
328
+ * @param {string} [authorization] Bearer Token
329
+ * @param {*} [options] Override http request option.
330
+ * @throws {RequiredError}
331
+ */
332
+ updateLeadSync: async (code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
333
+ // verify required parameter 'code' is not null or undefined
334
+ assertParamExists('updateLeadSync', 'code', code)
335
+ // verify required parameter 'updateLeadRequestDto' is not null or undefined
336
+ assertParamExists('updateLeadSync', 'updateLeadRequestDto', updateLeadRequestDto)
337
+ const localVarPath = `/publicapi/v1/leads-sync/{code}`
338
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
339
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
340
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
341
+ let baseOptions;
342
+ let baseAccessToken;
343
+ if (configuration) {
344
+ baseOptions = configuration.baseOptions;
345
+ baseAccessToken = configuration.accessToken;
346
+ }
347
+
348
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
349
+ const localVarHeaderParameter = {} as any;
350
+ const localVarQueryParameter = {} as any;
351
+
352
+ // authentication bearer required
353
+ // http bearer authentication required
354
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
355
+
356
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
357
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
358
+ }
359
+
360
+
361
+
213
362
  localVarHeaderParameter['Content-Type'] = 'application/json';
214
363
 
215
364
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -244,6 +393,30 @@ export const LeadsApiFp = function(configuration?: Configuration) {
244
393
  const localVarAxiosArgs = await localVarAxiosParamCreator.createLead(createLeadRequestDto, authorization, options);
245
394
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
246
395
  },
396
+ /**
397
+ * This will send the lead to the queue for creation. Should be used when creating multiple leads at the same time - also called \'batch processing\'.
398
+ * @summary Create the lead asynchronously
399
+ * @param {CreateLeadRequestDto} createLeadRequestDto
400
+ * @param {string} [authorization] Bearer Token
401
+ * @param {*} [options] Override http request option.
402
+ * @throws {RequiredError}
403
+ */
404
+ async createLeadAsync(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateLeadAsyncResponseClass>> {
405
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createLeadAsync(createLeadRequestDto, authorization, options);
406
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
407
+ },
408
+ /**
409
+ * This endpoint initiates the creation of a lead, which is the initial step in a comprehensive workflow responsible for the creation of an account, policy, and banking information. Unlike the standard lead creation endpoint, this variant ensures that the process waits until the entire workflow is successfully completed before providing a response.
410
+ * @summary Create the lead
411
+ * @param {CreateLeadRequestDto} createLeadRequestDto
412
+ * @param {string} [authorization] Bearer Token
413
+ * @param {*} [options] Override http request option.
414
+ * @throws {RequiredError}
415
+ */
416
+ async createLeadSync(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LeadSyncResponseClass>> {
417
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createLeadSync(createLeadRequestDto, authorization, options);
418
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
419
+ },
247
420
  /**
248
421
  * 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.
249
422
  * @summary Retrieve the lead
@@ -280,6 +453,19 @@ export const LeadsApiFp = function(configuration?: Configuration) {
280
453
  const localVarAxiosArgs = await localVarAxiosParamCreator.updateLead(code, updateLeadRequestDto, authorization, options);
281
454
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
282
455
  },
456
+ /**
457
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
458
+ * @summary Update the lead
459
+ * @param {string} code Unique identifier for the object.
460
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
461
+ * @param {string} [authorization] Bearer Token
462
+ * @param {*} [options] Override http request option.
463
+ * @throws {RequiredError}
464
+ */
465
+ async updateLeadSync(code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LeadSyncResponseClass>> {
466
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateLeadSync(code, updateLeadRequestDto, authorization, options);
467
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
468
+ },
283
469
  }
284
470
  };
285
471
 
@@ -301,6 +487,28 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath
301
487
  createLead(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<CreateLeadResponseClass> {
302
488
  return localVarFp.createLead(createLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
303
489
  },
490
+ /**
491
+ * This will send the lead to the queue for creation. Should be used when creating multiple leads at the same time - also called \'batch processing\'.
492
+ * @summary Create the lead asynchronously
493
+ * @param {CreateLeadRequestDto} createLeadRequestDto
494
+ * @param {string} [authorization] Bearer Token
495
+ * @param {*} [options] Override http request option.
496
+ * @throws {RequiredError}
497
+ */
498
+ createLeadAsync(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<CreateLeadAsyncResponseClass> {
499
+ return localVarFp.createLeadAsync(createLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
500
+ },
501
+ /**
502
+ * This endpoint initiates the creation of a lead, which is the initial step in a comprehensive workflow responsible for the creation of an account, policy, and banking information. Unlike the standard lead creation endpoint, this variant ensures that the process waits until the entire workflow is successfully completed before providing a response.
503
+ * @summary Create the lead
504
+ * @param {CreateLeadRequestDto} createLeadRequestDto
505
+ * @param {string} [authorization] Bearer Token
506
+ * @param {*} [options] Override http request option.
507
+ * @throws {RequiredError}
508
+ */
509
+ createLeadSync(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<LeadSyncResponseClass> {
510
+ return localVarFp.createLeadSync(createLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
511
+ },
304
512
  /**
305
513
  * 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.
306
514
  * @summary Retrieve the lead
@@ -334,6 +542,18 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath
334
542
  updateLead(code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateLeadResponseClass> {
335
543
  return localVarFp.updateLead(code, updateLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
336
544
  },
545
+ /**
546
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
547
+ * @summary Update the lead
548
+ * @param {string} code Unique identifier for the object.
549
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
550
+ * @param {string} [authorization] Bearer Token
551
+ * @param {*} [options] Override http request option.
552
+ * @throws {RequiredError}
553
+ */
554
+ updateLeadSync(code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<LeadSyncResponseClass> {
555
+ return localVarFp.updateLeadSync(code, updateLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
556
+ },
337
557
  };
338
558
  };
339
559
 
@@ -358,6 +578,48 @@ export interface LeadsApiCreateLeadRequest {
358
578
  readonly authorization?: string
359
579
  }
360
580
 
581
+ /**
582
+ * Request parameters for createLeadAsync operation in LeadsApi.
583
+ * @export
584
+ * @interface LeadsApiCreateLeadAsyncRequest
585
+ */
586
+ export interface LeadsApiCreateLeadAsyncRequest {
587
+ /**
588
+ *
589
+ * @type {CreateLeadRequestDto}
590
+ * @memberof LeadsApiCreateLeadAsync
591
+ */
592
+ readonly createLeadRequestDto: CreateLeadRequestDto
593
+
594
+ /**
595
+ * Bearer Token
596
+ * @type {string}
597
+ * @memberof LeadsApiCreateLeadAsync
598
+ */
599
+ readonly authorization?: string
600
+ }
601
+
602
+ /**
603
+ * Request parameters for createLeadSync operation in LeadsApi.
604
+ * @export
605
+ * @interface LeadsApiCreateLeadSyncRequest
606
+ */
607
+ export interface LeadsApiCreateLeadSyncRequest {
608
+ /**
609
+ *
610
+ * @type {CreateLeadRequestDto}
611
+ * @memberof LeadsApiCreateLeadSync
612
+ */
613
+ readonly createLeadRequestDto: CreateLeadRequestDto
614
+
615
+ /**
616
+ * Bearer Token
617
+ * @type {string}
618
+ * @memberof LeadsApiCreateLeadSync
619
+ */
620
+ readonly authorization?: string
621
+ }
622
+
361
623
  /**
362
624
  * Request parameters for getLead operation in LeadsApi.
363
625
  * @export
@@ -421,6 +683,34 @@ export interface LeadsApiUpdateLeadRequest {
421
683
  readonly authorization?: string
422
684
  }
423
685
 
686
+ /**
687
+ * Request parameters for updateLeadSync operation in LeadsApi.
688
+ * @export
689
+ * @interface LeadsApiUpdateLeadSyncRequest
690
+ */
691
+ export interface LeadsApiUpdateLeadSyncRequest {
692
+ /**
693
+ * Unique identifier for the object.
694
+ * @type {string}
695
+ * @memberof LeadsApiUpdateLeadSync
696
+ */
697
+ readonly code: string
698
+
699
+ /**
700
+ *
701
+ * @type {UpdateLeadRequestDto}
702
+ * @memberof LeadsApiUpdateLeadSync
703
+ */
704
+ readonly updateLeadRequestDto: UpdateLeadRequestDto
705
+
706
+ /**
707
+ * Bearer Token
708
+ * @type {string}
709
+ * @memberof LeadsApiUpdateLeadSync
710
+ */
711
+ readonly authorization?: string
712
+ }
713
+
424
714
  /**
425
715
  * LeadsApi - object-oriented interface
426
716
  * @export
@@ -440,6 +730,30 @@ export class LeadsApi extends BaseAPI {
440
730
  return LeadsApiFp(this.configuration).createLead(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
441
731
  }
442
732
 
733
+ /**
734
+ * This will send the lead to the queue for creation. Should be used when creating multiple leads at the same time - also called \'batch processing\'.
735
+ * @summary Create the lead asynchronously
736
+ * @param {LeadsApiCreateLeadAsyncRequest} requestParameters Request parameters.
737
+ * @param {*} [options] Override http request option.
738
+ * @throws {RequiredError}
739
+ * @memberof LeadsApi
740
+ */
741
+ public createLeadAsync(requestParameters: LeadsApiCreateLeadAsyncRequest, options?: AxiosRequestConfig) {
742
+ return LeadsApiFp(this.configuration).createLeadAsync(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
743
+ }
744
+
745
+ /**
746
+ * This endpoint initiates the creation of a lead, which is the initial step in a comprehensive workflow responsible for the creation of an account, policy, and banking information. Unlike the standard lead creation endpoint, this variant ensures that the process waits until the entire workflow is successfully completed before providing a response.
747
+ * @summary Create the lead
748
+ * @param {LeadsApiCreateLeadSyncRequest} requestParameters Request parameters.
749
+ * @param {*} [options] Override http request option.
750
+ * @throws {RequiredError}
751
+ * @memberof LeadsApi
752
+ */
753
+ public createLeadSync(requestParameters: LeadsApiCreateLeadSyncRequest, options?: AxiosRequestConfig) {
754
+ return LeadsApiFp(this.configuration).createLeadSync(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
755
+ }
756
+
443
757
  /**
444
758
  * 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.
445
759
  * @summary Retrieve the lead
@@ -475,4 +789,16 @@ export class LeadsApi extends BaseAPI {
475
789
  public updateLead(requestParameters: LeadsApiUpdateLeadRequest, options?: AxiosRequestConfig) {
476
790
  return LeadsApiFp(this.configuration).updateLead(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
477
791
  }
792
+
793
+ /**
794
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
795
+ * @summary Update the lead
796
+ * @param {LeadsApiUpdateLeadSyncRequest} requestParameters Request parameters.
797
+ * @param {*} [options] Override http request option.
798
+ * @throws {RequiredError}
799
+ * @memberof LeadsApi
800
+ */
801
+ public updateLeadSync(requestParameters: LeadsApiUpdateLeadSyncRequest, options?: AxiosRequestConfig) {
802
+ return LeadsApiFp(this.configuration).updateLeadSync(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
803
+ }
478
804
  }
package/api.ts CHANGED
@@ -21,6 +21,7 @@ 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
  import { AddressCompletionsValidationsApi } from './api';
24
+ import { DefaultApi } from './api';
24
25
  import { DocumentsApi } from './api';
25
26
  import { LeadsApi } from './api';
26
27
  import { NotificationsApi } from './api';
@@ -29,6 +30,7 @@ import { ProductsApi } from './api';
29
30
 
30
31
 
31
32
  export * from './api/address-completions-validations-api';
33
+ export * from './api/default-api';
32
34
  export * from './api/documents-api';
33
35
  export * from './api/leads-api';
34
36
  export * from './api/notifications-api';
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Emil PublicAPI
3
+ * The Emil Public 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 { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
+ import { Configuration } from '../configuration';
14
+ import { RequestArgs, BaseAPI } from '../base';
15
+ import { InlineResponse200 } from '../models';
16
+ /**
17
+ * DefaultApi - axios parameter creator
18
+ * @export
19
+ */
20
+ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => {
21
+ /**
22
+ *
23
+ * @param {*} [options] Override http request option.
24
+ * @throws {RequiredError}
25
+ */
26
+ check: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
27
+ };
28
+ /**
29
+ * DefaultApi - functional programming interface
30
+ * @export
31
+ */
32
+ export declare const DefaultApiFp: (configuration?: Configuration) => {
33
+ /**
34
+ *
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ */
38
+ check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>>;
39
+ };
40
+ /**
41
+ * DefaultApi - factory interface
42
+ * @export
43
+ */
44
+ export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
45
+ /**
46
+ *
47
+ * @param {*} [options] Override http request option.
48
+ * @throws {RequiredError}
49
+ */
50
+ check(options?: any): AxiosPromise<InlineResponse200>;
51
+ };
52
+ /**
53
+ * DefaultApi - object-oriented interface
54
+ * @export
55
+ * @class DefaultApi
56
+ * @extends {BaseAPI}
57
+ */
58
+ export declare class DefaultApi extends BaseAPI {
59
+ /**
60
+ *
61
+ * @param {*} [options] Override http request option.
62
+ * @throws {RequiredError}
63
+ * @memberof DefaultApi
64
+ */
65
+ check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any>>;
66
+ }