@emilgroup/insurance-sdk-node 1.7.4 → 1.9.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.
@@ -20,7 +20,6 @@ index.ts
20
20
  models/calculate-custom-premium-request-dto.ts
21
21
  models/calculate-premium-request-dto.ts
22
22
  models/clone-product-version-request-dto.ts
23
- models/clone-product-version-response-class.ts
24
23
  models/create-account-request-dto.ts
25
24
  models/create-bank-account-request-dto.ts
26
25
  models/create-custom-application-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-node@1.7.4 --save
20
+ npm install @emilgroup/insurance-sdk-node@1.9.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/insurance-sdk-node@1.7.4
24
+ yarn add @emilgroup/insurance-sdk-node@1.9.0
25
25
  ```
26
26
 
27
27
  And then you can import `PoliciesApi`.
@@ -85,6 +85,51 @@ export const InsuredObjectsApiAxiosParamCreator = function (configuration?: Conf
85
85
  options: localVarRequestOptions,
86
86
  };
87
87
  },
88
+ /**
89
+ * Permanently deletes the insured object. Supply the unique id that was returned when you created the insured object and this will delete it.
90
+ * @summary Delete the insured object
91
+ * @param {string} id
92
+ * @param {string} [authorization] Bearer Token
93
+ * @param {*} [options] Override http request option.
94
+ * @throws {RequiredError}
95
+ */
96
+ deleteInsuredObject: async (id: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
97
+ // verify required parameter 'id' is not null or undefined
98
+ assertParamExists('deleteInsuredObject', 'id', id)
99
+ const localVarPath = `/insuranceservice/v1/insured-objects/{id}`
100
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
101
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
102
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
103
+ let baseOptions;
104
+ let baseAccessToken;
105
+ if (configuration) {
106
+ baseOptions = configuration.baseOptions;
107
+ baseAccessToken = configuration.accessToken;
108
+ }
109
+
110
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
111
+ const localVarHeaderParameter = {} as any;
112
+ const localVarQueryParameter = {} as any;
113
+
114
+ // authentication bearer required
115
+ // http bearer authentication required
116
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
117
+
118
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
119
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
120
+ }
121
+
122
+
123
+
124
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
125
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
126
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
127
+
128
+ return {
129
+ url: toPathString(localVarUrlObj),
130
+ options: localVarRequestOptions,
131
+ };
132
+ },
88
133
  /**
89
134
  * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
90
135
  * @summary Retrieve the insured object
@@ -225,6 +270,18 @@ export const InsuredObjectsApiFp = function(configuration?: Configuration) {
225
270
  const localVarAxiosArgs = await localVarAxiosParamCreator.createInsuredObject(createInsuredObjectRequestDto, authorization, options);
226
271
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
227
272
  },
273
+ /**
274
+ * Permanently deletes the insured object. Supply the unique id that was returned when you created the insured object and this will delete it.
275
+ * @summary Delete the insured object
276
+ * @param {string} id
277
+ * @param {string} [authorization] Bearer Token
278
+ * @param {*} [options] Override http request option.
279
+ * @throws {RequiredError}
280
+ */
281
+ async deleteInsuredObject(id: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
282
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteInsuredObject(id, authorization, options);
283
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
284
+ },
228
285
  /**
229
286
  * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
230
287
  * @summary Retrieve the insured object
@@ -276,6 +333,17 @@ export const InsuredObjectsApiFactory = function (configuration?: Configuration,
276
333
  createInsuredObject(createInsuredObjectRequestDto: CreateInsuredObjectRequestDto, authorization?: string, options?: any): AxiosPromise<CreateInsuredObjectResponseClass> {
277
334
  return localVarFp.createInsuredObject(createInsuredObjectRequestDto, authorization, options).then((request) => request(axios, basePath));
278
335
  },
336
+ /**
337
+ * Permanently deletes the insured object. Supply the unique id that was returned when you created the insured object and this will delete it.
338
+ * @summary Delete the insured object
339
+ * @param {string} id
340
+ * @param {string} [authorization] Bearer Token
341
+ * @param {*} [options] Override http request option.
342
+ * @throws {RequiredError}
343
+ */
344
+ deleteInsuredObject(id: string, authorization?: string, options?: any): AxiosPromise<void> {
345
+ return localVarFp.deleteInsuredObject(id, authorization, options).then((request) => request(axios, basePath));
346
+ },
279
347
  /**
280
348
  * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
281
349
  * @summary Retrieve the insured object
@@ -328,6 +396,27 @@ export interface InsuredObjectsApiCreateInsuredObjectRequest {
328
396
  readonly authorization?: string
329
397
  }
330
398
 
399
+ /**
400
+ * Request parameters for deleteInsuredObject operation in InsuredObjectsApi.
401
+ * @export
402
+ * @interface InsuredObjectsApiDeleteInsuredObjectRequest
403
+ */
404
+ export interface InsuredObjectsApiDeleteInsuredObjectRequest {
405
+ /**
406
+ *
407
+ * @type {string}
408
+ * @memberof InsuredObjectsApiDeleteInsuredObject
409
+ */
410
+ readonly id: string
411
+
412
+ /**
413
+ * Bearer Token
414
+ * @type {string}
415
+ * @memberof InsuredObjectsApiDeleteInsuredObject
416
+ */
417
+ readonly authorization?: string
418
+ }
419
+
331
420
  /**
332
421
  * Request parameters for getInsuredObject operation in InsuredObjectsApi.
333
422
  * @export
@@ -431,6 +520,18 @@ export class InsuredObjectsApi extends BaseAPI {
431
520
  return InsuredObjectsApiFp(this.configuration).createInsuredObject(requestParameters.createInsuredObjectRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
432
521
  }
433
522
 
523
+ /**
524
+ * Permanently deletes the insured object. Supply the unique id that was returned when you created the insured object and this will delete it.
525
+ * @summary Delete the insured object
526
+ * @param {InsuredObjectsApiDeleteInsuredObjectRequest} requestParameters Request parameters.
527
+ * @param {*} [options] Override http request option.
528
+ * @throws {RequiredError}
529
+ * @memberof InsuredObjectsApi
530
+ */
531
+ public deleteInsuredObject(requestParameters: InsuredObjectsApiDeleteInsuredObjectRequest, options?: AxiosRequestConfig) {
532
+ return InsuredObjectsApiFp(this.configuration).deleteInsuredObject(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
533
+ }
534
+
434
535
  /**
435
536
  * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
436
537
  * @summary Retrieve the insured object
package/api/leads-api.ts CHANGED
@@ -142,8 +142,8 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
142
142
  };
143
143
  },
144
144
  /**
145
- * Returns a list of lead you have previously created. The lead are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
146
- * @summary List lead
145
+ * Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
146
+ * @summary List leads
147
147
  * @param {string} [authorization] Bearer Token
148
148
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
149
149
  * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
@@ -299,8 +299,8 @@ export const LeadsApiFp = function(configuration?: Configuration) {
299
299
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
300
300
  },
301
301
  /**
302
- * Returns a list of lead you have previously created. The lead are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
303
- * @summary List lead
302
+ * Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
303
+ * @summary List leads
304
304
  * @param {string} [authorization] Bearer Token
305
305
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
306
306
  * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
@@ -362,8 +362,8 @@ export const LeadsApiFactory = function (configuration?: Configuration, basePath
362
362
  return localVarFp.getLead(code, expand, authorization, options).then((request) => request(axios, basePath));
363
363
  },
364
364
  /**
365
- * Returns a list of lead you have previously created. The lead are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
366
- * @summary List lead
365
+ * Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
366
+ * @summary List leads
367
367
  * @param {string} [authorization] Bearer Token
368
368
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
369
369
  * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
@@ -557,8 +557,8 @@ export class LeadsApi extends BaseAPI {
557
557
  }
558
558
 
559
559
  /**
560
- * Returns a list of lead you have previously created. The lead are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
561
- * @summary List lead
560
+ * Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
561
+ * @summary List leads
562
562
  * @param {LeadsApiListLeadsRequest} requestParameters Request parameters.
563
563
  * @param {*} [options] Override http request option.
564
564
  * @throws {RequiredError}
@@ -170,7 +170,7 @@ export const ProductFactorsApiAxiosParamCreator = function (configuration?: Conf
170
170
  },
171
171
  /**
172
172
  * Returns product factors without values (values=none), or with values if their number less or equal to 200 (values=short), or with all values (values=all - this may take several seconds).
173
- * @summary Returns all product factors for the product version.
173
+ * @summary List product factors for version
174
174
  * @param {number} productVersionId Unique identifier referencing the product Version.
175
175
  * @param {string} values Which values to return for every factor (None or Short for short value lists only or All).
176
176
  * @param {string} [authorization] Bearer Token
@@ -445,7 +445,7 @@ export const ProductFactorsApiFp = function(configuration?: Configuration) {
445
445
  },
446
446
  /**
447
447
  * Returns product factors without values (values=none), or with values if their number less or equal to 200 (values=short), or with all values (values=all - this may take several seconds).
448
- * @summary Returns all product factors for the product version.
448
+ * @summary List product factors for version
449
449
  * @param {number} productVersionId Unique identifier referencing the product Version.
450
450
  * @param {string} values Which values to return for every factor (None or Short for short value lists only or All).
451
451
  * @param {string} [authorization] Bearer Token
@@ -538,7 +538,7 @@ export const ProductFactorsApiFactory = function (configuration?: Configuration,
538
538
  },
539
539
  /**
540
540
  * Returns product factors without values (values=none), or with values if their number less or equal to 200 (values=short), or with all values (values=all - this may take several seconds).
541
- * @summary Returns all product factors for the product version.
541
+ * @summary List product factors for version
542
542
  * @param {number} productVersionId Unique identifier referencing the product Version.
543
543
  * @param {string} values Which values to return for every factor (None or Short for short value lists only or All).
544
544
  * @param {string} [authorization] Bearer Token
@@ -841,7 +841,7 @@ export class ProductFactorsApi extends BaseAPI {
841
841
 
842
842
  /**
843
843
  * Returns product factors without values (values=none), or with values if their number less or equal to 200 (values=short), or with all values (values=all - this may take several seconds).
844
- * @summary Returns all product factors for the product version.
844
+ * @summary List product factors for version
845
845
  * @param {ProductFactorsApiGetProductFactorsForVersionRequest} requestParameters Request parameters.
846
846
  * @param {*} [options] Override http request option.
847
847
  * @throws {RequiredError}
@@ -21,10 +21,6 @@ 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 { CloneProductVersionRequestDto } from '../models';
25
- // @ts-ignore
26
- import { CloneProductVersionResponseClass } from '../models';
27
- // @ts-ignore
28
24
  import { GetProductVersionResponseClass } from '../models';
29
25
  // @ts-ignore
30
26
  import { UpdateProductVersionRequestDto } from '../models';
@@ -40,52 +36,6 @@ const FormData = require('form-data');
40
36
  */
41
37
  export const ProductVersionsApiAxiosParamCreator = function (configuration?: Configuration) {
42
38
  return {
43
- /**
44
- *
45
- * @param {CloneProductVersionRequestDto} cloneProductVersionRequestDto
46
- * @param {string} [authorization] Bearer Token
47
- * @param {*} [options] Override http request option.
48
- * @throws {RequiredError}
49
- */
50
- cloneProductVersion: async (cloneProductVersionRequestDto: CloneProductVersionRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
51
- // verify required parameter 'cloneProductVersionRequestDto' is not null or undefined
52
- assertParamExists('cloneProductVersion', 'cloneProductVersionRequestDto', cloneProductVersionRequestDto)
53
- const localVarPath = `/insuranceservice/v1/product-versions/clone`;
54
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
55
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
56
- let baseOptions;
57
- let baseAccessToken;
58
- if (configuration) {
59
- baseOptions = configuration.baseOptions;
60
- baseAccessToken = configuration.accessToken;
61
- }
62
-
63
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
64
- const localVarHeaderParameter = {} as any;
65
- const localVarQueryParameter = {} as any;
66
-
67
- // authentication bearer required
68
- // http bearer authentication required
69
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
70
-
71
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
72
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
73
- }
74
-
75
-
76
-
77
- localVarHeaderParameter['Content-Type'] = 'application/json';
78
-
79
- setSearchParams(localVarUrlObj, localVarQueryParameter);
80
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
81
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
82
- localVarRequestOptions.data = serializeDataIfNeeded(cloneProductVersionRequestDto, localVarRequestOptions, configuration)
83
-
84
- return {
85
- url: toPathString(localVarUrlObj),
86
- options: localVarRequestOptions,
87
- };
88
- },
89
39
  /**
90
40
  * Retrieves the details of the product version that was previously created. Supply the unique product version id that was returned when you created it and Emil Api will return the corresponding product version information.
91
41
  * @summary Retrieve the product version
@@ -199,17 +149,6 @@ export const ProductVersionsApiAxiosParamCreator = function (configuration?: Con
199
149
  export const ProductVersionsApiFp = function(configuration?: Configuration) {
200
150
  const localVarAxiosParamCreator = ProductVersionsApiAxiosParamCreator(configuration)
201
151
  return {
202
- /**
203
- *
204
- * @param {CloneProductVersionRequestDto} cloneProductVersionRequestDto
205
- * @param {string} [authorization] Bearer Token
206
- * @param {*} [options] Override http request option.
207
- * @throws {RequiredError}
208
- */
209
- async cloneProductVersion(cloneProductVersionRequestDto: CloneProductVersionRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CloneProductVersionResponseClass>> {
210
- const localVarAxiosArgs = await localVarAxiosParamCreator.cloneProductVersion(cloneProductVersionRequestDto, authorization, options);
211
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
212
- },
213
152
  /**
214
153
  * Retrieves the details of the product version that was previously created. Supply the unique product version id that was returned when you created it and Emil Api will return the corresponding product version information.
215
154
  * @summary Retrieve the product version
@@ -246,16 +185,6 @@ export const ProductVersionsApiFp = function(configuration?: Configuration) {
246
185
  export const ProductVersionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
247
186
  const localVarFp = ProductVersionsApiFp(configuration)
248
187
  return {
249
- /**
250
- *
251
- * @param {CloneProductVersionRequestDto} cloneProductVersionRequestDto
252
- * @param {string} [authorization] Bearer Token
253
- * @param {*} [options] Override http request option.
254
- * @throws {RequiredError}
255
- */
256
- cloneProductVersion(cloneProductVersionRequestDto: CloneProductVersionRequestDto, authorization?: string, options?: any): AxiosPromise<CloneProductVersionResponseClass> {
257
- return localVarFp.cloneProductVersion(cloneProductVersionRequestDto, authorization, options).then((request) => request(axios, basePath));
258
- },
259
188
  /**
260
189
  * Retrieves the details of the product version that was previously created. Supply the unique product version id that was returned when you created it and Emil Api will return the corresponding product version information.
261
190
  * @summary Retrieve the product version
@@ -283,27 +212,6 @@ export const ProductVersionsApiFactory = function (configuration?: Configuration
283
212
  };
284
213
  };
285
214
 
286
- /**
287
- * Request parameters for cloneProductVersion operation in ProductVersionsApi.
288
- * @export
289
- * @interface ProductVersionsApiCloneProductVersionRequest
290
- */
291
- export interface ProductVersionsApiCloneProductVersionRequest {
292
- /**
293
- *
294
- * @type {CloneProductVersionRequestDto}
295
- * @memberof ProductVersionsApiCloneProductVersion
296
- */
297
- readonly cloneProductVersionRequestDto: CloneProductVersionRequestDto
298
-
299
- /**
300
- * Bearer Token
301
- * @type {string}
302
- * @memberof ProductVersionsApiCloneProductVersion
303
- */
304
- readonly authorization?: string
305
- }
306
-
307
215
  /**
308
216
  * Request parameters for getProductVersion operation in ProductVersionsApi.
309
217
  * @export
@@ -367,17 +275,6 @@ export interface ProductVersionsApiUpdateProductVersionRequest {
367
275
  * @extends {BaseAPI}
368
276
  */
369
277
  export class ProductVersionsApi extends BaseAPI {
370
- /**
371
- *
372
- * @param {ProductVersionsApiCloneProductVersionRequest} requestParameters Request parameters.
373
- * @param {*} [options] Override http request option.
374
- * @throws {RequiredError}
375
- * @memberof ProductVersionsApi
376
- */
377
- public cloneProductVersion(requestParameters: ProductVersionsApiCloneProductVersionRequest, options?: AxiosRequestConfig) {
378
- return ProductVersionsApiFp(this.configuration).cloneProductVersion(requestParameters.cloneProductVersionRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
379
- }
380
-
381
278
  /**
382
279
  * Retrieves the details of the product version that was previously created. Supply the unique product version id that was returned when you created it and Emil Api will return the corresponding product version information.
383
280
  * @summary Retrieve the product version
package/base.ts CHANGED
@@ -170,7 +170,7 @@ export class BaseAPI {
170
170
  this.configuration.refreshToken = refreshToken;
171
171
  }
172
172
 
173
- async refreshToken(): Promise<string> {
173
+ async refreshTokenIntenal(): Promise<string> {
174
174
  const { username, refreshToken } = this.configuration;
175
175
 
176
176
 
@@ -220,7 +220,7 @@ export class BaseAPI {
220
220
  if (err.response.status === 401 && !originalConfig._retry) {
221
221
  originalConfig._retry = true;
222
222
  try {
223
- const tokenString = await this.refreshToken();
223
+ const tokenString = await this.refreshTokenIntenal();
224
224
  const accessToken = `Bearer ${tokenString}`;
225
225
 
226
226
  originalConfig.headers['Authorization'] = `Bearer ${accessToken}`
@@ -245,7 +245,7 @@ export class BaseAPI {
245
245
  ){
246
246
  _retry_count++;
247
247
  try {
248
- const tokenString = await this.refreshToken();
248
+ const tokenString = await this.refreshTokenIntenal();
249
249
  const accessToken = `Bearer ${tokenString}`;
250
250
 
251
251
  _retry = true;
@@ -30,6 +30,15 @@ export declare const InsuredObjectsApiAxiosParamCreator: (configuration?: Config
30
30
  * @throws {RequiredError}
31
31
  */
32
32
  createInsuredObject: (createInsuredObjectRequestDto: CreateInsuredObjectRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
33
+ /**
34
+ * Permanently deletes the insured object. Supply the unique id that was returned when you created the insured object and this will delete it.
35
+ * @summary Delete the insured object
36
+ * @param {string} id
37
+ * @param {string} [authorization] Bearer Token
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ */
41
+ deleteInsuredObject: (id: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
33
42
  /**
34
43
  * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
35
44
  * @summary Retrieve the insured object
@@ -69,6 +78,15 @@ export declare const InsuredObjectsApiFp: (configuration?: Configuration) => {
69
78
  * @throws {RequiredError}
70
79
  */
71
80
  createInsuredObject(createInsuredObjectRequestDto: CreateInsuredObjectRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInsuredObjectResponseClass>>;
81
+ /**
82
+ * Permanently deletes the insured object. Supply the unique id that was returned when you created the insured object and this will delete it.
83
+ * @summary Delete the insured object
84
+ * @param {string} id
85
+ * @param {string} [authorization] Bearer Token
86
+ * @param {*} [options] Override http request option.
87
+ * @throws {RequiredError}
88
+ */
89
+ deleteInsuredObject(id: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
72
90
  /**
73
91
  * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
74
92
  * @summary Retrieve the insured object
@@ -108,6 +126,15 @@ export declare const InsuredObjectsApiFactory: (configuration?: Configuration, b
108
126
  * @throws {RequiredError}
109
127
  */
110
128
  createInsuredObject(createInsuredObjectRequestDto: CreateInsuredObjectRequestDto, authorization?: string, options?: any): AxiosPromise<CreateInsuredObjectResponseClass>;
129
+ /**
130
+ * Permanently deletes the insured object. Supply the unique id that was returned when you created the insured object and this will delete it.
131
+ * @summary Delete the insured object
132
+ * @param {string} id
133
+ * @param {string} [authorization] Bearer Token
134
+ * @param {*} [options] Override http request option.
135
+ * @throws {RequiredError}
136
+ */
137
+ deleteInsuredObject(id: string, authorization?: string, options?: any): AxiosPromise<void>;
111
138
  /**
112
139
  * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
113
140
  * @summary Retrieve the insured object
@@ -152,6 +179,25 @@ export interface InsuredObjectsApiCreateInsuredObjectRequest {
152
179
  */
153
180
  readonly authorization?: string;
154
181
  }
182
+ /**
183
+ * Request parameters for deleteInsuredObject operation in InsuredObjectsApi.
184
+ * @export
185
+ * @interface InsuredObjectsApiDeleteInsuredObjectRequest
186
+ */
187
+ export interface InsuredObjectsApiDeleteInsuredObjectRequest {
188
+ /**
189
+ *
190
+ * @type {string}
191
+ * @memberof InsuredObjectsApiDeleteInsuredObject
192
+ */
193
+ readonly id: string;
194
+ /**
195
+ * Bearer Token
196
+ * @type {string}
197
+ * @memberof InsuredObjectsApiDeleteInsuredObject
198
+ */
199
+ readonly authorization?: string;
200
+ }
155
201
  /**
156
202
  * Request parameters for getInsuredObject operation in InsuredObjectsApi.
157
203
  * @export
@@ -242,6 +288,15 @@ export declare class InsuredObjectsApi extends BaseAPI {
242
288
  * @memberof InsuredObjectsApi
243
289
  */
244
290
  createInsuredObject(requestParameters: InsuredObjectsApiCreateInsuredObjectRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInsuredObjectResponseClass, any>>;
291
+ /**
292
+ * Permanently deletes the insured object. Supply the unique id that was returned when you created the insured object and this will delete it.
293
+ * @summary Delete the insured object
294
+ * @param {InsuredObjectsApiDeleteInsuredObjectRequest} requestParameters Request parameters.
295
+ * @param {*} [options] Override http request option.
296
+ * @throws {RequiredError}
297
+ * @memberof InsuredObjectsApi
298
+ */
299
+ deleteInsuredObject(requestParameters: InsuredObjectsApiDeleteInsuredObjectRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
245
300
  /**
246
301
  * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
247
302
  * @summary Retrieve the insured object
@@ -145,6 +145,54 @@ var InsuredObjectsApiAxiosParamCreator = function (configuration) {
145
145
  });
146
146
  });
147
147
  },
148
+ /**
149
+ * Permanently deletes the insured object. Supply the unique id that was returned when you created the insured object and this will delete it.
150
+ * @summary Delete the insured object
151
+ * @param {string} id
152
+ * @param {string} [authorization] Bearer Token
153
+ * @param {*} [options] Override http request option.
154
+ * @throws {RequiredError}
155
+ */
156
+ deleteInsuredObject: function (id, authorization, options) {
157
+ if (options === void 0) { options = {}; }
158
+ return __awaiter(_this, void 0, void 0, function () {
159
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
+ return __generator(this, function (_a) {
161
+ switch (_a.label) {
162
+ case 0:
163
+ // verify required parameter 'id' is not null or undefined
164
+ (0, common_1.assertParamExists)('deleteInsuredObject', 'id', id);
165
+ localVarPath = "/insuranceservice/v1/insured-objects/{id}"
166
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
167
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
168
+ if (configuration) {
169
+ baseOptions = configuration.baseOptions;
170
+ baseAccessToken = configuration.accessToken;
171
+ }
172
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
173
+ localVarHeaderParameter = {};
174
+ localVarQueryParameter = {};
175
+ // authentication bearer required
176
+ // http bearer authentication required
177
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
178
+ case 1:
179
+ // authentication bearer required
180
+ // http bearer authentication required
181
+ _a.sent();
182
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
184
+ }
185
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
+ return [2 /*return*/, {
189
+ url: (0, common_1.toPathString)(localVarUrlObj),
190
+ options: localVarRequestOptions,
191
+ }];
192
+ }
193
+ });
194
+ });
195
+ },
148
196
  /**
149
197
  * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
150
198
  * @summary Retrieve the insured object
@@ -294,6 +342,27 @@ var InsuredObjectsApiFp = function (configuration) {
294
342
  });
295
343
  });
296
344
  },
345
+ /**
346
+ * Permanently deletes the insured object. Supply the unique id that was returned when you created the insured object and this will delete it.
347
+ * @summary Delete the insured object
348
+ * @param {string} id
349
+ * @param {string} [authorization] Bearer Token
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ */
353
+ deleteInsuredObject: function (id, authorization, options) {
354
+ return __awaiter(this, void 0, void 0, function () {
355
+ var localVarAxiosArgs;
356
+ return __generator(this, function (_a) {
357
+ switch (_a.label) {
358
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteInsuredObject(id, authorization, options)];
359
+ case 1:
360
+ localVarAxiosArgs = _a.sent();
361
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
362
+ }
363
+ });
364
+ });
365
+ },
297
366
  /**
298
367
  * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
299
368
  * @summary Retrieve the insured object
@@ -363,6 +432,17 @@ var InsuredObjectsApiFactory = function (configuration, basePath, axios) {
363
432
  createInsuredObject: function (createInsuredObjectRequestDto, authorization, options) {
364
433
  return localVarFp.createInsuredObject(createInsuredObjectRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
365
434
  },
435
+ /**
436
+ * Permanently deletes the insured object. Supply the unique id that was returned when you created the insured object and this will delete it.
437
+ * @summary Delete the insured object
438
+ * @param {string} id
439
+ * @param {string} [authorization] Bearer Token
440
+ * @param {*} [options] Override http request option.
441
+ * @throws {RequiredError}
442
+ */
443
+ deleteInsuredObject: function (id, authorization, options) {
444
+ return localVarFp.deleteInsuredObject(id, authorization, options).then(function (request) { return request(axios, basePath); });
445
+ },
366
446
  /**
367
447
  * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
368
448
  * @summary Retrieve the insured object
@@ -417,6 +497,18 @@ var InsuredObjectsApi = /** @class */ (function (_super) {
417
497
  var _this = this;
418
498
  return (0, exports.InsuredObjectsApiFp)(this.configuration).createInsuredObject(requestParameters.createInsuredObjectRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
419
499
  };
500
+ /**
501
+ * Permanently deletes the insured object. Supply the unique id that was returned when you created the insured object and this will delete it.
502
+ * @summary Delete the insured object
503
+ * @param {InsuredObjectsApiDeleteInsuredObjectRequest} requestParameters Request parameters.
504
+ * @param {*} [options] Override http request option.
505
+ * @throws {RequiredError}
506
+ * @memberof InsuredObjectsApi
507
+ */
508
+ InsuredObjectsApi.prototype.deleteInsuredObject = function (requestParameters, options) {
509
+ var _this = this;
510
+ return (0, exports.InsuredObjectsApiFp)(this.configuration).deleteInsuredObject(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
511
+ };
420
512
  /**
421
513
  * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
422
514
  * @summary Retrieve the insured object