@emilgroup/insurance-sdk 1.54.1-beta.0 → 1.55.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.
@@ -238,6 +238,7 @@ models/update-emil-function-secret-request-dto.ts
238
238
  models/update-insured-object-request-dto.ts
239
239
  models/update-lead-request-dto.ts
240
240
  models/update-lead-response-class.ts
241
+ models/update-lead-status-response-class.ts
241
242
  models/update-named-range-request-dto.ts
242
243
  models/update-named-range-response-class.ts
243
244
  models/update-partner-link-request-dto.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.54.1-beta.0 --save
20
+ npm install @emilgroup/insurance-sdk@1.55.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/insurance-sdk@1.54.1-beta.0
24
+ yarn add @emilgroup/insurance-sdk@1.55.0
25
25
  ```
26
26
 
27
27
  And then you can import `PoliciesApi`.
@@ -30,6 +30,8 @@ import { DeleteResponseClass } from '../models';
30
30
  import { GetLeadStatusResponseClass } from '../models';
31
31
  // @ts-ignore
32
32
  import { ListLeadStatusesResponseClass } from '../models';
33
+ // @ts-ignore
34
+ import { UpdateLeadStatusResponseClass } from '../models';
33
35
  /**
34
36
  * LeadStatusesApi - axios parameter creator
35
37
  * @export
@@ -86,16 +88,16 @@ export const LeadStatusesApiAxiosParamCreator = function (configuration?: Config
86
88
  /**
87
89
  * Permanently deletes the lead status. Supply the unique id that was returned when you created the lead status and this will delete it. Deleting a lead status can have an impact on workflows, and it\'s crucial to ensure that no workflows are using the lead status that is being deleted.
88
90
  * @summary Delete the lead status
89
- * @param {number} id
91
+ * @param {string} code
90
92
  * @param {string} [authorization] Bearer Token
91
93
  * @param {*} [options] Override http request option.
92
94
  * @throws {RequiredError}
93
95
  */
94
- deleteLeadStatus: async (id: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
95
- // verify required parameter 'id' is not null or undefined
96
- assertParamExists('deleteLeadStatus', 'id', id)
97
- const localVarPath = `/insuranceservice/v1/lead-statuses/{id}`
98
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
96
+ deleteLeadStatus: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
97
+ // verify required parameter 'code' is not null or undefined
98
+ assertParamExists('deleteLeadStatus', 'code', code)
99
+ const localVarPath = `/insuranceservice/v1/lead-statuses/{code}`
100
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
99
101
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
100
102
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
101
103
  let baseOptions;
@@ -131,16 +133,16 @@ export const LeadStatusesApiAxiosParamCreator = function (configuration?: Config
131
133
  /**
132
134
  * Retrieves the details of the lead status that was previously created. Supply the unique lead status code that was returned when you created it and Emil Api will return the corresponding lead status information.
133
135
  * @summary Retrieve the lead status
134
- * @param {number} id
136
+ * @param {string} code
135
137
  * @param {string} [authorization] Bearer Token
136
138
  * @param {*} [options] Override http request option.
137
139
  * @throws {RequiredError}
138
140
  */
139
- getLeadStatus: async (id: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
140
- // verify required parameter 'id' is not null or undefined
141
- assertParamExists('getLeadStatus', 'id', id)
142
- const localVarPath = `/insuranceservice/v1/lead-statuses/{id}`
143
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
141
+ getLeadStatus: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
142
+ // verify required parameter 'code' is not null or undefined
143
+ assertParamExists('getLeadStatus', 'code', code)
144
+ const localVarPath = `/insuranceservice/v1/lead-statuses/{code}`
145
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
144
146
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
145
147
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
146
148
  let baseOptions;
@@ -240,6 +242,51 @@ export const LeadStatusesApiAxiosParamCreator = function (configuration?: Config
240
242
 
241
243
 
242
244
 
245
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
246
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
247
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
248
+
249
+ return {
250
+ url: toPathString(localVarUrlObj),
251
+ options: localVarRequestOptions,
252
+ };
253
+ },
254
+ /**
255
+ * Updates the specified lead status by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
256
+ * @summary Update the lead status
257
+ * @param {string} code
258
+ * @param {string} [authorization] Bearer Token
259
+ * @param {*} [options] Override http request option.
260
+ * @throws {RequiredError}
261
+ */
262
+ updateLeadStatus: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
263
+ // verify required parameter 'code' is not null or undefined
264
+ assertParamExists('updateLeadStatus', 'code', code)
265
+ const localVarPath = `/insuranceservice/v1/lead-statuses/{code}`
266
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
267
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
268
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
269
+ let baseOptions;
270
+ let baseAccessToken;
271
+ if (configuration) {
272
+ baseOptions = configuration.baseOptions;
273
+ baseAccessToken = configuration.accessToken;
274
+ }
275
+
276
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
277
+ const localVarHeaderParameter = {} as any;
278
+ const localVarQueryParameter = {} as any;
279
+
280
+ // authentication bearer required
281
+ // http bearer authentication required
282
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
283
+
284
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
285
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
286
+ }
287
+
288
+
289
+
243
290
  setSearchParams(localVarUrlObj, localVarQueryParameter);
244
291
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
245
292
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -274,25 +321,25 @@ export const LeadStatusesApiFp = function(configuration?: Configuration) {
274
321
  /**
275
322
  * Permanently deletes the lead status. Supply the unique id that was returned when you created the lead status and this will delete it. Deleting a lead status can have an impact on workflows, and it\'s crucial to ensure that no workflows are using the lead status that is being deleted.
276
323
  * @summary Delete the lead status
277
- * @param {number} id
324
+ * @param {string} code
278
325
  * @param {string} [authorization] Bearer Token
279
326
  * @param {*} [options] Override http request option.
280
327
  * @throws {RequiredError}
281
328
  */
282
- async deleteLeadStatus(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseClass>> {
283
- const localVarAxiosArgs = await localVarAxiosParamCreator.deleteLeadStatus(id, authorization, options);
329
+ async deleteLeadStatus(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseClass>> {
330
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteLeadStatus(code, authorization, options);
284
331
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
285
332
  },
286
333
  /**
287
334
  * Retrieves the details of the lead status that was previously created. Supply the unique lead status code that was returned when you created it and Emil Api will return the corresponding lead status information.
288
335
  * @summary Retrieve the lead status
289
- * @param {number} id
336
+ * @param {string} code
290
337
  * @param {string} [authorization] Bearer Token
291
338
  * @param {*} [options] Override http request option.
292
339
  * @throws {RequiredError}
293
340
  */
294
- async getLeadStatus(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLeadStatusResponseClass>> {
295
- const localVarAxiosArgs = await localVarAxiosParamCreator.getLeadStatus(id, authorization, options);
341
+ async getLeadStatus(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLeadStatusResponseClass>> {
342
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getLeadStatus(code, authorization, options);
296
343
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
297
344
  },
298
345
  /**
@@ -313,6 +360,18 @@ export const LeadStatusesApiFp = function(configuration?: Configuration) {
313
360
  const localVarAxiosArgs = await localVarAxiosParamCreator.listLeadStatuses(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
314
361
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
315
362
  },
363
+ /**
364
+ * Updates the specified lead status by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
365
+ * @summary Update the lead status
366
+ * @param {string} code
367
+ * @param {string} [authorization] Bearer Token
368
+ * @param {*} [options] Override http request option.
369
+ * @throws {RequiredError}
370
+ */
371
+ async updateLeadStatus(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateLeadStatusResponseClass>> {
372
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateLeadStatus(code, authorization, options);
373
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
374
+ },
316
375
  }
317
376
  };
318
377
 
@@ -337,24 +396,24 @@ export const LeadStatusesApiFactory = function (configuration?: Configuration, b
337
396
  /**
338
397
  * Permanently deletes the lead status. Supply the unique id that was returned when you created the lead status and this will delete it. Deleting a lead status can have an impact on workflows, and it\'s crucial to ensure that no workflows are using the lead status that is being deleted.
339
398
  * @summary Delete the lead status
340
- * @param {number} id
399
+ * @param {string} code
341
400
  * @param {string} [authorization] Bearer Token
342
401
  * @param {*} [options] Override http request option.
343
402
  * @throws {RequiredError}
344
403
  */
345
- deleteLeadStatus(id: number, authorization?: string, options?: any): AxiosPromise<DeleteResponseClass> {
346
- return localVarFp.deleteLeadStatus(id, authorization, options).then((request) => request(axios, basePath));
404
+ deleteLeadStatus(code: string, authorization?: string, options?: any): AxiosPromise<DeleteResponseClass> {
405
+ return localVarFp.deleteLeadStatus(code, authorization, options).then((request) => request(axios, basePath));
347
406
  },
348
407
  /**
349
408
  * Retrieves the details of the lead status that was previously created. Supply the unique lead status code that was returned when you created it and Emil Api will return the corresponding lead status information.
350
409
  * @summary Retrieve the lead status
351
- * @param {number} id
410
+ * @param {string} code
352
411
  * @param {string} [authorization] Bearer Token
353
412
  * @param {*} [options] Override http request option.
354
413
  * @throws {RequiredError}
355
414
  */
356
- getLeadStatus(id: number, authorization?: string, options?: any): AxiosPromise<GetLeadStatusResponseClass> {
357
- return localVarFp.getLeadStatus(id, authorization, options).then((request) => request(axios, basePath));
415
+ getLeadStatus(code: string, authorization?: string, options?: any): AxiosPromise<GetLeadStatusResponseClass> {
416
+ return localVarFp.getLeadStatus(code, authorization, options).then((request) => request(axios, basePath));
358
417
  },
359
418
  /**
360
419
  * Returns a list of lead statuses you have previously created. The lead statuses are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -373,6 +432,17 @@ export const LeadStatusesApiFactory = function (configuration?: Configuration, b
373
432
  listLeadStatuses(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<ListLeadStatusesResponseClass> {
374
433
  return localVarFp.listLeadStatuses(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
375
434
  },
435
+ /**
436
+ * Updates the specified lead status by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
437
+ * @summary Update the lead status
438
+ * @param {string} code
439
+ * @param {string} [authorization] Bearer Token
440
+ * @param {*} [options] Override http request option.
441
+ * @throws {RequiredError}
442
+ */
443
+ updateLeadStatus(code: string, authorization?: string, options?: any): AxiosPromise<UpdateLeadStatusResponseClass> {
444
+ return localVarFp.updateLeadStatus(code, authorization, options).then((request) => request(axios, basePath));
445
+ },
376
446
  };
377
447
  };
378
448
 
@@ -405,10 +475,10 @@ export interface LeadStatusesApiCreateLeadStatusRequest {
405
475
  export interface LeadStatusesApiDeleteLeadStatusRequest {
406
476
  /**
407
477
  *
408
- * @type {number}
478
+ * @type {string}
409
479
  * @memberof LeadStatusesApiDeleteLeadStatus
410
480
  */
411
- readonly id: number
481
+ readonly code: string
412
482
 
413
483
  /**
414
484
  * Bearer Token
@@ -426,10 +496,10 @@ export interface LeadStatusesApiDeleteLeadStatusRequest {
426
496
  export interface LeadStatusesApiGetLeadStatusRequest {
427
497
  /**
428
498
  *
429
- * @type {number}
499
+ * @type {string}
430
500
  * @memberof LeadStatusesApiGetLeadStatus
431
501
  */
432
- readonly id: number
502
+ readonly code: string
433
503
 
434
504
  /**
435
505
  * Bearer Token
@@ -502,6 +572,27 @@ export interface LeadStatusesApiListLeadStatusesRequest {
502
572
  readonly filters?: any
503
573
  }
504
574
 
575
+ /**
576
+ * Request parameters for updateLeadStatus operation in LeadStatusesApi.
577
+ * @export
578
+ * @interface LeadStatusesApiUpdateLeadStatusRequest
579
+ */
580
+ export interface LeadStatusesApiUpdateLeadStatusRequest {
581
+ /**
582
+ *
583
+ * @type {string}
584
+ * @memberof LeadStatusesApiUpdateLeadStatus
585
+ */
586
+ readonly code: string
587
+
588
+ /**
589
+ * Bearer Token
590
+ * @type {string}
591
+ * @memberof LeadStatusesApiUpdateLeadStatus
592
+ */
593
+ readonly authorization?: string
594
+ }
595
+
505
596
  /**
506
597
  * LeadStatusesApi - object-oriented interface
507
598
  * @export
@@ -530,7 +621,7 @@ export class LeadStatusesApi extends BaseAPI {
530
621
  * @memberof LeadStatusesApi
531
622
  */
532
623
  public deleteLeadStatus(requestParameters: LeadStatusesApiDeleteLeadStatusRequest, options?: AxiosRequestConfig) {
533
- return LeadStatusesApiFp(this.configuration).deleteLeadStatus(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
624
+ return LeadStatusesApiFp(this.configuration).deleteLeadStatus(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
534
625
  }
535
626
 
536
627
  /**
@@ -542,7 +633,7 @@ export class LeadStatusesApi extends BaseAPI {
542
633
  * @memberof LeadStatusesApi
543
634
  */
544
635
  public getLeadStatus(requestParameters: LeadStatusesApiGetLeadStatusRequest, options?: AxiosRequestConfig) {
545
- return LeadStatusesApiFp(this.configuration).getLeadStatus(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
636
+ return LeadStatusesApiFp(this.configuration).getLeadStatus(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
546
637
  }
547
638
 
548
639
  /**
@@ -556,4 +647,16 @@ export class LeadStatusesApi extends BaseAPI {
556
647
  public listLeadStatuses(requestParameters: LeadStatusesApiListLeadStatusesRequest = {}, options?: AxiosRequestConfig) {
557
648
  return LeadStatusesApiFp(this.configuration).listLeadStatuses(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
558
649
  }
650
+
651
+ /**
652
+ * Updates the specified lead status by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
653
+ * @summary Update the lead status
654
+ * @param {LeadStatusesApiUpdateLeadStatusRequest} requestParameters Request parameters.
655
+ * @param {*} [options] Override http request option.
656
+ * @throws {RequiredError}
657
+ * @memberof LeadStatusesApi
658
+ */
659
+ public updateLeadStatus(requestParameters: LeadStatusesApiUpdateLeadStatusRequest, options?: AxiosRequestConfig) {
660
+ return LeadStatusesApiFp(this.configuration).updateLeadStatus(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
661
+ }
559
662
  }
package/base.ts CHANGED
@@ -34,7 +34,7 @@ export const COLLECTION_FORMATS = {
34
34
 
35
35
  export interface LoginClass {
36
36
  accessToken: string;
37
- permissions: Array<string>;
37
+ permissions: string;
38
38
  }
39
39
 
40
40
  export enum Environment {
@@ -77,7 +77,7 @@ const TOKEN_DATA = 'APP_TOKEN';
77
77
  export class BaseAPI {
78
78
  protected configuration: Configuration | undefined;
79
79
  private tokenData?: TokenData;
80
- private permissions: Array<string> = [];
80
+ private permissions?: string;
81
81
 
82
82
  constructor(configuration?: Configuration,
83
83
  protected basePath: string = BASE_PATH,
@@ -111,7 +111,7 @@ export class BaseAPI {
111
111
  }
112
112
 
113
113
  getPermissions(): Array<string> {
114
- return this.permissions;
114
+ return this.permissions.split(',');
115
115
  }
116
116
 
117
117
  async authorize(username: string, password: string): Promise<void> {
@@ -17,6 +17,7 @@ import { CreateLeadStatusResponseClass } from '../models';
17
17
  import { DeleteResponseClass } from '../models';
18
18
  import { GetLeadStatusResponseClass } from '../models';
19
19
  import { ListLeadStatusesResponseClass } from '../models';
20
+ import { UpdateLeadStatusResponseClass } from '../models';
20
21
  /**
21
22
  * LeadStatusesApi - axios parameter creator
22
23
  * @export
@@ -34,21 +35,21 @@ export declare const LeadStatusesApiAxiosParamCreator: (configuration?: Configur
34
35
  /**
35
36
  * Permanently deletes the lead status. Supply the unique id that was returned when you created the lead status and this will delete it. Deleting a lead status can have an impact on workflows, and it\'s crucial to ensure that no workflows are using the lead status that is being deleted.
36
37
  * @summary Delete the lead status
37
- * @param {number} id
38
+ * @param {string} code
38
39
  * @param {string} [authorization] Bearer Token
39
40
  * @param {*} [options] Override http request option.
40
41
  * @throws {RequiredError}
41
42
  */
42
- deleteLeadStatus: (id: number, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
43
+ deleteLeadStatus: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
43
44
  /**
44
45
  * Retrieves the details of the lead status that was previously created. Supply the unique lead status code that was returned when you created it and Emil Api will return the corresponding lead status information.
45
46
  * @summary Retrieve the lead status
46
- * @param {number} id
47
+ * @param {string} code
47
48
  * @param {string} [authorization] Bearer Token
48
49
  * @param {*} [options] Override http request option.
49
50
  * @throws {RequiredError}
50
51
  */
51
- getLeadStatus: (id: number, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
52
+ getLeadStatus: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
52
53
  /**
53
54
  * Returns a list of lead statuses you have previously created. The lead statuses are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
54
55
  * @summary List lead statuses
@@ -64,6 +65,15 @@ export declare const LeadStatusesApiAxiosParamCreator: (configuration?: Configur
64
65
  * @throws {RequiredError}
65
66
  */
66
67
  listLeadStatuses: (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
68
+ /**
69
+ * Updates the specified lead status by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
70
+ * @summary Update the lead status
71
+ * @param {string} code
72
+ * @param {string} [authorization] Bearer Token
73
+ * @param {*} [options] Override http request option.
74
+ * @throws {RequiredError}
75
+ */
76
+ updateLeadStatus: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
67
77
  };
68
78
  /**
69
79
  * LeadStatusesApi - functional programming interface
@@ -82,21 +92,21 @@ export declare const LeadStatusesApiFp: (configuration?: Configuration) => {
82
92
  /**
83
93
  * Permanently deletes the lead status. Supply the unique id that was returned when you created the lead status and this will delete it. Deleting a lead status can have an impact on workflows, and it\'s crucial to ensure that no workflows are using the lead status that is being deleted.
84
94
  * @summary Delete the lead status
85
- * @param {number} id
95
+ * @param {string} code
86
96
  * @param {string} [authorization] Bearer Token
87
97
  * @param {*} [options] Override http request option.
88
98
  * @throws {RequiredError}
89
99
  */
90
- deleteLeadStatus(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseClass>>;
100
+ deleteLeadStatus(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseClass>>;
91
101
  /**
92
102
  * Retrieves the details of the lead status that was previously created. Supply the unique lead status code that was returned when you created it and Emil Api will return the corresponding lead status information.
93
103
  * @summary Retrieve the lead status
94
- * @param {number} id
104
+ * @param {string} code
95
105
  * @param {string} [authorization] Bearer Token
96
106
  * @param {*} [options] Override http request option.
97
107
  * @throws {RequiredError}
98
108
  */
99
- getLeadStatus(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLeadStatusResponseClass>>;
109
+ getLeadStatus(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLeadStatusResponseClass>>;
100
110
  /**
101
111
  * Returns a list of lead statuses you have previously created. The lead statuses are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
102
112
  * @summary List lead statuses
@@ -112,6 +122,15 @@ export declare const LeadStatusesApiFp: (configuration?: Configuration) => {
112
122
  * @throws {RequiredError}
113
123
  */
114
124
  listLeadStatuses(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListLeadStatusesResponseClass>>;
125
+ /**
126
+ * Updates the specified lead status by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
127
+ * @summary Update the lead status
128
+ * @param {string} code
129
+ * @param {string} [authorization] Bearer Token
130
+ * @param {*} [options] Override http request option.
131
+ * @throws {RequiredError}
132
+ */
133
+ updateLeadStatus(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateLeadStatusResponseClass>>;
115
134
  };
116
135
  /**
117
136
  * LeadStatusesApi - factory interface
@@ -130,21 +149,21 @@ export declare const LeadStatusesApiFactory: (configuration?: Configuration, bas
130
149
  /**
131
150
  * Permanently deletes the lead status. Supply the unique id that was returned when you created the lead status and this will delete it. Deleting a lead status can have an impact on workflows, and it\'s crucial to ensure that no workflows are using the lead status that is being deleted.
132
151
  * @summary Delete the lead status
133
- * @param {number} id
152
+ * @param {string} code
134
153
  * @param {string} [authorization] Bearer Token
135
154
  * @param {*} [options] Override http request option.
136
155
  * @throws {RequiredError}
137
156
  */
138
- deleteLeadStatus(id: number, authorization?: string, options?: any): AxiosPromise<DeleteResponseClass>;
157
+ deleteLeadStatus(code: string, authorization?: string, options?: any): AxiosPromise<DeleteResponseClass>;
139
158
  /**
140
159
  * Retrieves the details of the lead status that was previously created. Supply the unique lead status code that was returned when you created it and Emil Api will return the corresponding lead status information.
141
160
  * @summary Retrieve the lead status
142
- * @param {number} id
161
+ * @param {string} code
143
162
  * @param {string} [authorization] Bearer Token
144
163
  * @param {*} [options] Override http request option.
145
164
  * @throws {RequiredError}
146
165
  */
147
- getLeadStatus(id: number, authorization?: string, options?: any): AxiosPromise<GetLeadStatusResponseClass>;
166
+ getLeadStatus(code: string, authorization?: string, options?: any): AxiosPromise<GetLeadStatusResponseClass>;
148
167
  /**
149
168
  * Returns a list of lead statuses you have previously created. The lead statuses are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
150
169
  * @summary List lead statuses
@@ -160,6 +179,15 @@ export declare const LeadStatusesApiFactory: (configuration?: Configuration, bas
160
179
  * @throws {RequiredError}
161
180
  */
162
181
  listLeadStatuses(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<ListLeadStatusesResponseClass>;
182
+ /**
183
+ * Updates the specified lead status by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
184
+ * @summary Update the lead status
185
+ * @param {string} code
186
+ * @param {string} [authorization] Bearer Token
187
+ * @param {*} [options] Override http request option.
188
+ * @throws {RequiredError}
189
+ */
190
+ updateLeadStatus(code: string, authorization?: string, options?: any): AxiosPromise<UpdateLeadStatusResponseClass>;
163
191
  };
164
192
  /**
165
193
  * Request parameters for createLeadStatus operation in LeadStatusesApi.
@@ -188,10 +216,10 @@ export interface LeadStatusesApiCreateLeadStatusRequest {
188
216
  export interface LeadStatusesApiDeleteLeadStatusRequest {
189
217
  /**
190
218
  *
191
- * @type {number}
219
+ * @type {string}
192
220
  * @memberof LeadStatusesApiDeleteLeadStatus
193
221
  */
194
- readonly id: number;
222
+ readonly code: string;
195
223
  /**
196
224
  * Bearer Token
197
225
  * @type {string}
@@ -207,10 +235,10 @@ export interface LeadStatusesApiDeleteLeadStatusRequest {
207
235
  export interface LeadStatusesApiGetLeadStatusRequest {
208
236
  /**
209
237
  *
210
- * @type {number}
238
+ * @type {string}
211
239
  * @memberof LeadStatusesApiGetLeadStatus
212
240
  */
213
- readonly id: number;
241
+ readonly code: string;
214
242
  /**
215
243
  * Bearer Token
216
244
  * @type {string}
@@ -273,6 +301,25 @@ export interface LeadStatusesApiListLeadStatusesRequest {
273
301
  */
274
302
  readonly filters?: any;
275
303
  }
304
+ /**
305
+ * Request parameters for updateLeadStatus operation in LeadStatusesApi.
306
+ * @export
307
+ * @interface LeadStatusesApiUpdateLeadStatusRequest
308
+ */
309
+ export interface LeadStatusesApiUpdateLeadStatusRequest {
310
+ /**
311
+ *
312
+ * @type {string}
313
+ * @memberof LeadStatusesApiUpdateLeadStatus
314
+ */
315
+ readonly code: string;
316
+ /**
317
+ * Bearer Token
318
+ * @type {string}
319
+ * @memberof LeadStatusesApiUpdateLeadStatus
320
+ */
321
+ readonly authorization?: string;
322
+ }
276
323
  /**
277
324
  * LeadStatusesApi - object-oriented interface
278
325
  * @export
@@ -316,4 +363,13 @@ export declare class LeadStatusesApi extends BaseAPI {
316
363
  * @memberof LeadStatusesApi
317
364
  */
318
365
  listLeadStatuses(requestParameters?: LeadStatusesApiListLeadStatusesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListLeadStatusesResponseClass, any>>;
366
+ /**
367
+ * Updates the specified lead status by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
368
+ * @summary Update the lead status
369
+ * @param {LeadStatusesApiUpdateLeadStatusRequest} requestParameters Request parameters.
370
+ * @param {*} [options] Override http request option.
371
+ * @throws {RequiredError}
372
+ * @memberof LeadStatusesApi
373
+ */
374
+ updateLeadStatus(requestParameters: LeadStatusesApiUpdateLeadStatusRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateLeadStatusResponseClass, any>>;
319
375
  }
@@ -144,22 +144,22 @@ var LeadStatusesApiAxiosParamCreator = function (configuration) {
144
144
  /**
145
145
  * Permanently deletes the lead status. Supply the unique id that was returned when you created the lead status and this will delete it. Deleting a lead status can have an impact on workflows, and it\'s crucial to ensure that no workflows are using the lead status that is being deleted.
146
146
  * @summary Delete the lead status
147
- * @param {number} id
147
+ * @param {string} code
148
148
  * @param {string} [authorization] Bearer Token
149
149
  * @param {*} [options] Override http request option.
150
150
  * @throws {RequiredError}
151
151
  */
152
- deleteLeadStatus: function (id, authorization, options) {
152
+ deleteLeadStatus: function (code, authorization, options) {
153
153
  if (options === void 0) { options = {}; }
154
154
  return __awaiter(_this, void 0, void 0, function () {
155
155
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
156
156
  return __generator(this, function (_a) {
157
157
  switch (_a.label) {
158
158
  case 0:
159
- // verify required parameter 'id' is not null or undefined
160
- (0, common_1.assertParamExists)('deleteLeadStatus', 'id', id);
161
- localVarPath = "/insuranceservice/v1/lead-statuses/{id}"
162
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
159
+ // verify required parameter 'code' is not null or undefined
160
+ (0, common_1.assertParamExists)('deleteLeadStatus', 'code', code);
161
+ localVarPath = "/insuranceservice/v1/lead-statuses/{code}"
162
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
163
163
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
164
164
  if (configuration) {
165
165
  baseOptions = configuration.baseOptions;
@@ -192,22 +192,22 @@ var LeadStatusesApiAxiosParamCreator = function (configuration) {
192
192
  /**
193
193
  * Retrieves the details of the lead status that was previously created. Supply the unique lead status code that was returned when you created it and Emil Api will return the corresponding lead status information.
194
194
  * @summary Retrieve the lead status
195
- * @param {number} id
195
+ * @param {string} code
196
196
  * @param {string} [authorization] Bearer Token
197
197
  * @param {*} [options] Override http request option.
198
198
  * @throws {RequiredError}
199
199
  */
200
- getLeadStatus: function (id, authorization, options) {
200
+ getLeadStatus: function (code, authorization, options) {
201
201
  if (options === void 0) { options = {}; }
202
202
  return __awaiter(_this, void 0, void 0, function () {
203
203
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
204
204
  return __generator(this, function (_a) {
205
205
  switch (_a.label) {
206
206
  case 0:
207
- // verify required parameter 'id' is not null or undefined
208
- (0, common_1.assertParamExists)('getLeadStatus', 'id', id);
209
- localVarPath = "/insuranceservice/v1/lead-statuses/{id}"
210
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
207
+ // verify required parameter 'code' is not null or undefined
208
+ (0, common_1.assertParamExists)('getLeadStatus', 'code', code);
209
+ localVarPath = "/insuranceservice/v1/lead-statuses/{code}"
210
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
211
211
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
212
212
  if (configuration) {
213
213
  baseOptions = configuration.baseOptions;
@@ -309,6 +309,54 @@ var LeadStatusesApiAxiosParamCreator = function (configuration) {
309
309
  });
310
310
  });
311
311
  },
312
+ /**
313
+ * Updates the specified lead status by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
314
+ * @summary Update the lead status
315
+ * @param {string} code
316
+ * @param {string} [authorization] Bearer Token
317
+ * @param {*} [options] Override http request option.
318
+ * @throws {RequiredError}
319
+ */
320
+ updateLeadStatus: function (code, authorization, options) {
321
+ if (options === void 0) { options = {}; }
322
+ return __awaiter(_this, void 0, void 0, function () {
323
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
324
+ return __generator(this, function (_a) {
325
+ switch (_a.label) {
326
+ case 0:
327
+ // verify required parameter 'code' is not null or undefined
328
+ (0, common_1.assertParamExists)('updateLeadStatus', 'code', code);
329
+ localVarPath = "/insuranceservice/v1/lead-statuses/{code}"
330
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
331
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
332
+ if (configuration) {
333
+ baseOptions = configuration.baseOptions;
334
+ baseAccessToken = configuration.accessToken;
335
+ }
336
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
337
+ localVarHeaderParameter = {};
338
+ localVarQueryParameter = {};
339
+ // authentication bearer required
340
+ // http bearer authentication required
341
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
342
+ case 1:
343
+ // authentication bearer required
344
+ // http bearer authentication required
345
+ _a.sent();
346
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
347
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
348
+ }
349
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
350
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
351
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
352
+ return [2 /*return*/, {
353
+ url: (0, common_1.toPathString)(localVarUrlObj),
354
+ options: localVarRequestOptions,
355
+ }];
356
+ }
357
+ });
358
+ });
359
+ },
312
360
  };
313
361
  };
314
362
  exports.LeadStatusesApiAxiosParamCreator = LeadStatusesApiAxiosParamCreator;
@@ -343,17 +391,17 @@ var LeadStatusesApiFp = function (configuration) {
343
391
  /**
344
392
  * Permanently deletes the lead status. Supply the unique id that was returned when you created the lead status and this will delete it. Deleting a lead status can have an impact on workflows, and it\'s crucial to ensure that no workflows are using the lead status that is being deleted.
345
393
  * @summary Delete the lead status
346
- * @param {number} id
394
+ * @param {string} code
347
395
  * @param {string} [authorization] Bearer Token
348
396
  * @param {*} [options] Override http request option.
349
397
  * @throws {RequiredError}
350
398
  */
351
- deleteLeadStatus: function (id, authorization, options) {
399
+ deleteLeadStatus: function (code, authorization, options) {
352
400
  return __awaiter(this, void 0, void 0, function () {
353
401
  var localVarAxiosArgs;
354
402
  return __generator(this, function (_a) {
355
403
  switch (_a.label) {
356
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteLeadStatus(id, authorization, options)];
404
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteLeadStatus(code, authorization, options)];
357
405
  case 1:
358
406
  localVarAxiosArgs = _a.sent();
359
407
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -364,17 +412,17 @@ var LeadStatusesApiFp = function (configuration) {
364
412
  /**
365
413
  * Retrieves the details of the lead status that was previously created. Supply the unique lead status code that was returned when you created it and Emil Api will return the corresponding lead status information.
366
414
  * @summary Retrieve the lead status
367
- * @param {number} id
415
+ * @param {string} code
368
416
  * @param {string} [authorization] Bearer Token
369
417
  * @param {*} [options] Override http request option.
370
418
  * @throws {RequiredError}
371
419
  */
372
- getLeadStatus: function (id, authorization, options) {
420
+ getLeadStatus: function (code, authorization, options) {
373
421
  return __awaiter(this, void 0, void 0, function () {
374
422
  var localVarAxiosArgs;
375
423
  return __generator(this, function (_a) {
376
424
  switch (_a.label) {
377
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getLeadStatus(id, authorization, options)];
425
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getLeadStatus(code, authorization, options)];
378
426
  case 1:
379
427
  localVarAxiosArgs = _a.sent();
380
428
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -409,6 +457,27 @@ var LeadStatusesApiFp = function (configuration) {
409
457
  });
410
458
  });
411
459
  },
460
+ /**
461
+ * Updates the specified lead status by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
462
+ * @summary Update the lead status
463
+ * @param {string} code
464
+ * @param {string} [authorization] Bearer Token
465
+ * @param {*} [options] Override http request option.
466
+ * @throws {RequiredError}
467
+ */
468
+ updateLeadStatus: function (code, authorization, options) {
469
+ return __awaiter(this, void 0, void 0, function () {
470
+ var localVarAxiosArgs;
471
+ return __generator(this, function (_a) {
472
+ switch (_a.label) {
473
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateLeadStatus(code, authorization, options)];
474
+ case 1:
475
+ localVarAxiosArgs = _a.sent();
476
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
477
+ }
478
+ });
479
+ });
480
+ },
412
481
  };
413
482
  };
414
483
  exports.LeadStatusesApiFp = LeadStatusesApiFp;
@@ -433,24 +502,24 @@ var LeadStatusesApiFactory = function (configuration, basePath, axios) {
433
502
  /**
434
503
  * Permanently deletes the lead status. Supply the unique id that was returned when you created the lead status and this will delete it. Deleting a lead status can have an impact on workflows, and it\'s crucial to ensure that no workflows are using the lead status that is being deleted.
435
504
  * @summary Delete the lead status
436
- * @param {number} id
505
+ * @param {string} code
437
506
  * @param {string} [authorization] Bearer Token
438
507
  * @param {*} [options] Override http request option.
439
508
  * @throws {RequiredError}
440
509
  */
441
- deleteLeadStatus: function (id, authorization, options) {
442
- return localVarFp.deleteLeadStatus(id, authorization, options).then(function (request) { return request(axios, basePath); });
510
+ deleteLeadStatus: function (code, authorization, options) {
511
+ return localVarFp.deleteLeadStatus(code, authorization, options).then(function (request) { return request(axios, basePath); });
443
512
  },
444
513
  /**
445
514
  * Retrieves the details of the lead status that was previously created. Supply the unique lead status code that was returned when you created it and Emil Api will return the corresponding lead status information.
446
515
  * @summary Retrieve the lead status
447
- * @param {number} id
516
+ * @param {string} code
448
517
  * @param {string} [authorization] Bearer Token
449
518
  * @param {*} [options] Override http request option.
450
519
  * @throws {RequiredError}
451
520
  */
452
- getLeadStatus: function (id, authorization, options) {
453
- return localVarFp.getLeadStatus(id, authorization, options).then(function (request) { return request(axios, basePath); });
521
+ getLeadStatus: function (code, authorization, options) {
522
+ return localVarFp.getLeadStatus(code, authorization, options).then(function (request) { return request(axios, basePath); });
454
523
  },
455
524
  /**
456
525
  * Returns a list of lead statuses you have previously created. The lead statuses are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -469,6 +538,17 @@ var LeadStatusesApiFactory = function (configuration, basePath, axios) {
469
538
  listLeadStatuses: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
470
539
  return localVarFp.listLeadStatuses(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
471
540
  },
541
+ /**
542
+ * Updates the specified lead status by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
543
+ * @summary Update the lead status
544
+ * @param {string} code
545
+ * @param {string} [authorization] Bearer Token
546
+ * @param {*} [options] Override http request option.
547
+ * @throws {RequiredError}
548
+ */
549
+ updateLeadStatus: function (code, authorization, options) {
550
+ return localVarFp.updateLeadStatus(code, authorization, options).then(function (request) { return request(axios, basePath); });
551
+ },
472
552
  };
473
553
  };
474
554
  exports.LeadStatusesApiFactory = LeadStatusesApiFactory;
@@ -505,7 +585,7 @@ var LeadStatusesApi = /** @class */ (function (_super) {
505
585
  */
506
586
  LeadStatusesApi.prototype.deleteLeadStatus = function (requestParameters, options) {
507
587
  var _this = this;
508
- return (0, exports.LeadStatusesApiFp)(this.configuration).deleteLeadStatus(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
588
+ return (0, exports.LeadStatusesApiFp)(this.configuration).deleteLeadStatus(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
509
589
  };
510
590
  /**
511
591
  * Retrieves the details of the lead status that was previously created. Supply the unique lead status code that was returned when you created it and Emil Api will return the corresponding lead status information.
@@ -517,7 +597,7 @@ var LeadStatusesApi = /** @class */ (function (_super) {
517
597
  */
518
598
  LeadStatusesApi.prototype.getLeadStatus = function (requestParameters, options) {
519
599
  var _this = this;
520
- return (0, exports.LeadStatusesApiFp)(this.configuration).getLeadStatus(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
600
+ return (0, exports.LeadStatusesApiFp)(this.configuration).getLeadStatus(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
521
601
  };
522
602
  /**
523
603
  * Returns a list of lead statuses you have previously created. The lead statuses are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -532,6 +612,18 @@ var LeadStatusesApi = /** @class */ (function (_super) {
532
612
  if (requestParameters === void 0) { requestParameters = {}; }
533
613
  return (0, exports.LeadStatusesApiFp)(this.configuration).listLeadStatuses(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
534
614
  };
615
+ /**
616
+ * Updates the specified lead status by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
617
+ * @summary Update the lead status
618
+ * @param {LeadStatusesApiUpdateLeadStatusRequest} requestParameters Request parameters.
619
+ * @param {*} [options] Override http request option.
620
+ * @throws {RequiredError}
621
+ * @memberof LeadStatusesApi
622
+ */
623
+ LeadStatusesApi.prototype.updateLeadStatus = function (requestParameters, options) {
624
+ var _this = this;
625
+ return (0, exports.LeadStatusesApiFp)(this.configuration).updateLeadStatus(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
626
+ };
535
627
  return LeadStatusesApi;
536
628
  }(base_1.BaseAPI));
537
629
  exports.LeadStatusesApi = LeadStatusesApi;
package/dist/base.d.ts CHANGED
@@ -24,7 +24,7 @@ export declare const COLLECTION_FORMATS: {
24
24
  };
25
25
  export interface LoginClass {
26
26
  accessToken: string;
27
- permissions: Array<string>;
27
+ permissions: string;
28
28
  }
29
29
  export declare enum Environment {
30
30
  Production = "https://apiv2.emil.de",
@@ -52,7 +52,7 @@ export declare class BaseAPI {
52
52
  protected axios: AxiosInstance;
53
53
  protected configuration: Configuration | undefined;
54
54
  private tokenData?;
55
- private permissions;
55
+ private permissions?;
56
56
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
57
57
  selectEnvironment(env: Environment): void;
58
58
  selectBasePath(path: string): void;
package/dist/base.js CHANGED
@@ -121,7 +121,6 @@ var BaseAPI = /** @class */ (function () {
121
121
  if (axios === void 0) { axios = axios_1.default; }
122
122
  this.basePath = basePath;
123
123
  this.axios = axios;
124
- this.permissions = [];
125
124
  this.loadTokenData();
126
125
  if (configuration) {
127
126
  this.configuration = configuration;
@@ -145,7 +144,7 @@ var BaseAPI = /** @class */ (function () {
145
144
  this.configuration.basePath = path;
146
145
  };
147
146
  BaseAPI.prototype.getPermissions = function () {
148
- return this.permissions;
147
+ return this.permissions.split(',');
149
148
  };
150
149
  BaseAPI.prototype.authorize = function (username, password) {
151
150
  return __awaiter(this, void 0, void 0, function () {
@@ -16,15 +16,21 @@
16
16
  */
17
17
  export interface CreateLeadStatusRequestDto {
18
18
  /**
19
- *
19
+ * Status name. There are 3 default status value named: Created, Approved and Declined. Tenants can add their own custom lead statuses, if default statuses are not suitable for their products.
20
20
  * @type {string}
21
21
  * @memberof CreateLeadStatusRequestDto
22
22
  */
23
23
  'name': string;
24
24
  /**
25
- *
25
+ * A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
26
26
  * @type {string}
27
27
  * @memberof CreateLeadStatusRequestDto
28
28
  */
29
29
  'productSlug': string;
30
+ /**
31
+ * Specifies whether this lead status should be automatically assigned to new leads when no specific status is provided in the create lead request. Only one status — whether predefined or custom — can have isDefault set to true at any time, with all others set to false. If a new status is marked with isDefault: true, it will automatically update isDefault to false for all other statuses.
32
+ * @type {boolean}
33
+ * @memberof CreateLeadStatusRequestDto
34
+ */
35
+ 'isDefault'?: boolean;
30
36
  }
@@ -135,12 +135,6 @@ export interface CreateProductFieldRequestDto {
135
135
  * @memberof CreateProductFieldRequestDto
136
136
  */
137
137
  'legacyBfOrder'?: number;
138
- /**
139
- * Product field metadata object. The field may contain special data specific to the product.
140
- * @type {object}
141
- * @memberof CreateProductFieldRequestDto
142
- */
143
- 'metadata'?: object;
144
138
  }
145
139
  export declare const CreateProductFieldRequestDtoTypeEntityEnum: {
146
140
  readonly SystemProductFieldType: "system_product_field_type";
@@ -204,6 +204,7 @@ export * from './update-emil-function-secret-request-dto';
204
204
  export * from './update-insured-object-request-dto';
205
205
  export * from './update-lead-request-dto';
206
206
  export * from './update-lead-response-class';
207
+ export * from './update-lead-status-response-class';
207
208
  export * from './update-named-range-request-dto';
208
209
  export * from './update-named-range-response-class';
209
210
  export * from './update-partner-link-request-dto';
@@ -220,6 +220,7 @@ __exportStar(require("./update-emil-function-secret-request-dto"), exports);
220
220
  __exportStar(require("./update-insured-object-request-dto"), exports);
221
221
  __exportStar(require("./update-lead-request-dto"), exports);
222
222
  __exportStar(require("./update-lead-response-class"), exports);
223
+ __exportStar(require("./update-lead-status-response-class"), exports);
223
224
  __exportStar(require("./update-named-range-request-dto"), exports);
224
225
  __exportStar(require("./update-named-range-response-class"), exports);
225
226
  __exportStar(require("./update-partner-link-request-dto"), exports);
@@ -21,6 +21,12 @@ export interface LeadStatusClass {
21
21
  * @memberof LeadStatusClass
22
22
  */
23
23
  'id': number;
24
+ /**
25
+ * Unique identifier for the object.
26
+ * @type {string}
27
+ * @memberof LeadStatusClass
28
+ */
29
+ 'code': string;
24
30
  /**
25
31
  * Status name
26
32
  * @type {string}
@@ -33,6 +39,12 @@ export interface LeadStatusClass {
33
39
  * @memberof LeadStatusClass
34
40
  */
35
41
  'productSlug': string;
42
+ /**
43
+ * Indicates if this status is the default for the lead. Defaults to false. When set to true, this status will automatically become the default for new leads, and any other status currently marked as default will be updated to false.
44
+ * @type {boolean}
45
+ * @memberof LeadStatusClass
46
+ */
47
+ 'isDefault': boolean;
36
48
  /**
37
49
  * Identifier of the user who created the record.
38
50
  * @type {string}
@@ -123,12 +123,6 @@ export interface ProductFieldClass {
123
123
  * @memberof ProductFieldClass
124
124
  */
125
125
  'order': number;
126
- /**
127
- * Product field metadata object. The field may contain special data specific to the product.
128
- * @type {object}
129
- * @memberof ProductFieldClass
130
- */
131
- 'metadata'?: object;
132
126
  /**
133
127
  * Time at which the object was created.
134
128
  * @type {string}
@@ -123,12 +123,6 @@ export interface SharedProductFieldClass {
123
123
  * @memberof SharedProductFieldClass
124
124
  */
125
125
  'order': number;
126
- /**
127
- * Product field metadata object. The field may contain special data specific to the product.
128
- * @type {object}
129
- * @memberof SharedProductFieldClass
130
- */
131
- 'metadata'?: object;
132
126
  /**
133
127
  * Time at which the object was created.
134
128
  * @type {string}
@@ -0,0 +1,25 @@
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 { LeadStatusClass } from './lead-status-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UpdateLeadStatusResponseClass
17
+ */
18
+ export interface UpdateLeadStatusResponseClass {
19
+ /**
20
+ * Lead status
21
+ * @type {LeadStatusClass}
22
+ * @memberof UpdateLeadStatusResponseClass
23
+ */
24
+ 'leadStatus': LeadStatusClass;
25
+ }
@@ -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 });
@@ -141,12 +141,6 @@ export interface UpdateProductFieldRequestDto {
141
141
  * @memberof UpdateProductFieldRequestDto
142
142
  */
143
143
  'legacyBfOrder'?: number;
144
- /**
145
- * Product field metadata object. The field may contain special data specific to the product.
146
- * @type {object}
147
- * @memberof UpdateProductFieldRequestDto
148
- */
149
- 'metadata'?: object;
150
144
  }
151
145
  export declare const UpdateProductFieldRequestDtoTypeEntityEnum: {
152
146
  readonly SystemProductFieldType: "system_product_field_type";
@@ -21,16 +21,22 @@
21
21
  */
22
22
  export interface CreateLeadStatusRequestDto {
23
23
  /**
24
- *
24
+ * Status name. There are 3 default status value named: Created, Approved and Declined. Tenants can add their own custom lead statuses, if default statuses are not suitable for their products.
25
25
  * @type {string}
26
26
  * @memberof CreateLeadStatusRequestDto
27
27
  */
28
28
  'name': string;
29
29
  /**
30
- *
30
+ * A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
31
31
  * @type {string}
32
32
  * @memberof CreateLeadStatusRequestDto
33
33
  */
34
34
  'productSlug': string;
35
+ /**
36
+ * Specifies whether this lead status should be automatically assigned to new leads when no specific status is provided in the create lead request. Only one status — whether predefined or custom — can have isDefault set to true at any time, with all others set to false. If a new status is marked with isDefault: true, it will automatically update isDefault to false for all other statuses.
37
+ * @type {boolean}
38
+ * @memberof CreateLeadStatusRequestDto
39
+ */
40
+ 'isDefault'?: boolean;
35
41
  }
36
42
 
@@ -140,12 +140,6 @@ export interface CreateProductFieldRequestDto {
140
140
  * @memberof CreateProductFieldRequestDto
141
141
  */
142
142
  'legacyBfOrder'?: number;
143
- /**
144
- * Product field metadata object. The field may contain special data specific to the product.
145
- * @type {object}
146
- * @memberof CreateProductFieldRequestDto
147
- */
148
- 'metadata'?: object;
149
143
  }
150
144
 
151
145
  export const CreateProductFieldRequestDtoTypeEntityEnum = {
package/models/index.ts CHANGED
@@ -204,6 +204,7 @@ export * from './update-emil-function-secret-request-dto';
204
204
  export * from './update-insured-object-request-dto';
205
205
  export * from './update-lead-request-dto';
206
206
  export * from './update-lead-response-class';
207
+ export * from './update-lead-status-response-class';
207
208
  export * from './update-named-range-request-dto';
208
209
  export * from './update-named-range-response-class';
209
210
  export * from './update-partner-link-request-dto';
@@ -26,6 +26,12 @@ export interface LeadStatusClass {
26
26
  * @memberof LeadStatusClass
27
27
  */
28
28
  'id': number;
29
+ /**
30
+ * Unique identifier for the object.
31
+ * @type {string}
32
+ * @memberof LeadStatusClass
33
+ */
34
+ 'code': string;
29
35
  /**
30
36
  * Status name
31
37
  * @type {string}
@@ -38,6 +44,12 @@ export interface LeadStatusClass {
38
44
  * @memberof LeadStatusClass
39
45
  */
40
46
  'productSlug': string;
47
+ /**
48
+ * Indicates if this status is the default for the lead. Defaults to false. When set to true, this status will automatically become the default for new leads, and any other status currently marked as default will be updated to false.
49
+ * @type {boolean}
50
+ * @memberof LeadStatusClass
51
+ */
52
+ 'isDefault': boolean;
41
53
  /**
42
54
  * Identifier of the user who created the record.
43
55
  * @type {string}
@@ -128,12 +128,6 @@ export interface ProductFieldClass {
128
128
  * @memberof ProductFieldClass
129
129
  */
130
130
  'order': number;
131
- /**
132
- * Product field metadata object. The field may contain special data specific to the product.
133
- * @type {object}
134
- * @memberof ProductFieldClass
135
- */
136
- 'metadata'?: object;
137
131
  /**
138
132
  * Time at which the object was created.
139
133
  * @type {string}
@@ -128,12 +128,6 @@ export interface SharedProductFieldClass {
128
128
  * @memberof SharedProductFieldClass
129
129
  */
130
130
  'order': number;
131
- /**
132
- * Product field metadata object. The field may contain special data specific to the product.
133
- * @type {object}
134
- * @memberof SharedProductFieldClass
135
- */
136
- 'metadata'?: object;
137
131
  /**
138
132
  * Time at which the object was created.
139
133
  * @type {string}
@@ -0,0 +1,31 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL InsuranceService
5
+ * The EMIL InsuranceService 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 { LeadStatusClass } from './lead-status-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface UpdateLeadStatusResponseClass
22
+ */
23
+ export interface UpdateLeadStatusResponseClass {
24
+ /**
25
+ * Lead status
26
+ * @type {LeadStatusClass}
27
+ * @memberof UpdateLeadStatusResponseClass
28
+ */
29
+ 'leadStatus': LeadStatusClass;
30
+ }
31
+
@@ -146,12 +146,6 @@ export interface UpdateProductFieldRequestDto {
146
146
  * @memberof UpdateProductFieldRequestDto
147
147
  */
148
148
  'legacyBfOrder'?: number;
149
- /**
150
- * Product field metadata object. The field may contain special data specific to the product.
151
- * @type {object}
152
- * @memberof UpdateProductFieldRequestDto
153
- */
154
- 'metadata'?: object;
155
149
  }
156
150
 
157
151
  export const UpdateProductFieldRequestDtoTypeEntityEnum = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/insurance-sdk",
3
- "version": "1.54.1-beta.0",
3
+ "version": "1.55.0",
4
4
  "description": "OpenAPI client for @emilgroup/insurance-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [