@emilgroup/customer-sdk-node 1.4.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/.openapi-generator/FILES +11 -1
  2. package/README.md +2 -2
  3. package/api/customers-api.ts +353 -0
  4. package/base.ts +56 -13
  5. package/dist/api/customers-api.d.ts +205 -0
  6. package/dist/api/customers-api.js +271 -0
  7. package/dist/base.d.ts +1 -0
  8. package/dist/base.js +46 -8
  9. package/dist/models/account-class.d.ts +133 -0
  10. package/dist/models/{create-account-request-dto.js → account-class.js} +0 -6
  11. package/dist/models/account-policy-class.d.ts +30 -0
  12. package/dist/models/account-policy-class.js +15 -0
  13. package/dist/models/create-customer-request-dto.d.ts +0 -7
  14. package/dist/models/create-customer-response-class.d.ts +3 -2
  15. package/dist/models/customer-class.d.ts +67 -0
  16. package/dist/models/customer-class.js +15 -0
  17. package/dist/models/customer-document-class.d.ts +99 -0
  18. package/dist/models/customer-document-class.js +36 -0
  19. package/dist/models/get-customer-document-download-url-response-class.d.ts +24 -0
  20. package/dist/models/get-customer-document-download-url-response-class.js +15 -0
  21. package/dist/models/get-customer-response-class.d.ts +3 -2
  22. package/dist/models/index.d.ts +11 -1
  23. package/dist/models/index.js +11 -1
  24. package/dist/models/invoice-class.d.ts +135 -0
  25. package/dist/models/invoice-class.js +28 -0
  26. package/dist/models/list-documents-response-class.d.ts +3 -2
  27. package/dist/models/list-invoices-response-class.d.ts +3 -2
  28. package/dist/models/request-policy-update-request-dto.d.ts +3 -2
  29. package/dist/models/reset-password-by-customer-request-dto.d.ts +1 -1
  30. package/dist/models/shared-customer-policy-object-request-dto.d.ts +30 -0
  31. package/dist/models/shared-customer-policy-object-request-dto.js +15 -0
  32. package/dist/models/shared-invoice-item-class.d.ts +102 -0
  33. package/dist/models/shared-invoice-item-class.js +15 -0
  34. package/dist/models/terminate-customer-policy-request-dto.d.ts +24 -0
  35. package/dist/models/terminate-customer-policy-request-dto.js +15 -0
  36. package/dist/models/terminate-customer-policy-response-class.d.ts +25 -0
  37. package/dist/models/terminate-customer-policy-response-class.js +15 -0
  38. package/dist/models/update-account-request-dto.d.ts +10 -10
  39. package/dist/models/update-customer-response-class.d.ts +3 -2
  40. package/dist/models/withdraw-customer-policy-response-class.d.ts +25 -0
  41. package/dist/models/withdraw-customer-policy-response-class.js +15 -0
  42. package/models/account-class.ts +139 -0
  43. package/models/account-policy-class.ts +36 -0
  44. package/models/create-customer-request-dto.ts +0 -7
  45. package/models/create-customer-response-class.ts +3 -2
  46. package/models/customer-class.ts +73 -0
  47. package/models/customer-document-class.ts +108 -0
  48. package/models/get-customer-document-download-url-response-class.ts +30 -0
  49. package/models/get-customer-response-class.ts +3 -2
  50. package/models/index.ts +11 -1
  51. package/models/invoice-class.ts +145 -0
  52. package/models/list-documents-response-class.ts +3 -2
  53. package/models/list-invoices-response-class.ts +3 -2
  54. package/models/request-policy-update-request-dto.ts +3 -2
  55. package/models/reset-password-by-customer-request-dto.ts +1 -1
  56. package/models/shared-customer-policy-object-request-dto.ts +36 -0
  57. package/models/shared-invoice-item-class.ts +108 -0
  58. package/models/terminate-customer-policy-request-dto.ts +30 -0
  59. package/models/terminate-customer-policy-response-class.ts +31 -0
  60. package/models/update-account-request-dto.ts +10 -10
  61. package/models/update-customer-response-class.ts +3 -2
  62. package/models/withdraw-customer-policy-response-class.ts +31 -0
  63. package/package.json +1 -1
  64. package/dist/models/create-account-request-dto.d.ts +0 -102
  65. package/models/create-account-request-dto.ts +0 -111
package/base.ts CHANGED
@@ -61,6 +61,8 @@ export interface RequestArgs {
61
61
  options: AxiosRequestConfig;
62
62
  }
63
63
 
64
+ const NETWORK_ERROR_MESSAGE = "Network Error";
65
+
64
66
  /**
65
67
  *
66
68
  * @export
@@ -68,6 +70,7 @@ export interface RequestArgs {
68
70
  */
69
71
  export class BaseAPI {
70
72
  protected configuration: Configuration | undefined;
73
+ private lastRequestConfig?: AxiosRequestConfig;
71
74
  private username?: string;
72
75
  private password?: string;
73
76
  private isCustomerToken = false;
@@ -156,10 +159,10 @@ export class BaseAPI {
156
159
  const response = await globalAxios.request<LoginClass>(options);
157
160
 
158
161
  const { data: { accessToken } } = response;
159
- const refreshToken = this.extractRefreshToken(response)
160
-
161
162
  this.configuration.username = username;
162
163
  this.configuration.accessToken = `Bearer ${accessToken}`;
164
+
165
+ const refreshToken = this.extractRefreshToken(response);
163
166
  this.configuration.refreshToken = refreshToken;
164
167
  }
165
168
 
@@ -184,14 +187,14 @@ export class BaseAPI {
184
187
 
185
188
  if (response.data.authenticationResult) {
186
189
  const { accessToken } = response.data.authenticationResult;
187
- const refreshToken = this.extractRefreshToken(response)
188
190
 
189
191
  this.configuration.username = username;
190
192
  this.configuration.tenantSlug = tenantSlug;
191
193
  this.configuration.accessToken = `Bearer ${accessToken}`;
192
- this.configuration.refreshToken = refreshToken;
193
-
194
194
  this.isCustomerToken = true;
195
+
196
+ const refreshToken = this.extractRefreshToken(response);
197
+ this.configuration.refreshToken = refreshToken;
195
198
  }
196
199
 
197
200
  return response;
@@ -213,12 +216,12 @@ export class BaseAPI {
213
216
 
214
217
  if (response.data.authenticationResult) {
215
218
  const { accessToken } = response.data.authenticationResult;
216
- const refreshToken = this.extractRefreshToken(response)
217
219
 
218
220
  this.configuration.accessToken = `Bearer ${accessToken}`;
219
- this.configuration.refreshToken = refreshToken;
220
-
221
221
  this.isCustomerToken = true;
222
+
223
+ const refreshToken = this.extractRefreshToken(response);
224
+ this.configuration.refreshToken = refreshToken;
222
225
  }
223
226
 
224
227
  return response;
@@ -226,6 +229,7 @@ export class BaseAPI {
226
229
 
227
230
  async refreshTokenTenant(): Promise<string> {
228
231
  const { username, refreshToken } = this.configuration;
232
+
229
233
 
230
234
  if (!username || !refreshToken) {
231
235
  return '';
@@ -241,7 +245,6 @@ export class BaseAPI {
241
245
  data: { username: username },
242
246
  withCredentials: true,
243
247
  };
244
-
245
248
  const { data: { accessToken } } = await globalAxios.request<LoginClass>(options);
246
249
 
247
250
  return accessToken;
@@ -265,14 +268,14 @@ export class BaseAPI {
265
268
  withCredentials: true,
266
269
  };
267
270
 
268
- const { data: { accessToken } } = await globalAxios.request<LoginClass>(options);
271
+ const { data: { accessToken } } = await globalAxios.request<LoginClass>(options);
269
272
 
270
273
  return accessToken;
271
274
  }
272
275
 
273
276
  private extractRefreshToken(response: AxiosResponse): string {
274
- if (response.headers && response.headers['set-cookie']
275
- && response.headers['set-cookie'].length > 0) {
277
+ if (response.headers && response.headers['set-cookie']
278
+ && response.headers['set-cookie'].length > 0) {
276
279
 
277
280
  return `${response.headers['set-cookie'][0].split(';')[0]};`;
278
281
  }
@@ -281,12 +284,19 @@ export class BaseAPI {
281
284
  }
282
285
 
283
286
  private attachInterceptor(axios: AxiosInstance) {
287
+ axios.interceptors.request.use((config) => {
288
+ if (config.url?.indexOf('refresh-token') === -1) {
289
+ this.lastRequestConfig = config;
290
+ }
291
+
292
+ return config;
293
+ });
284
294
  axios.interceptors.response.use(
285
295
  (res) => {
286
296
  return res;
287
297
  },
288
298
  async (err) => {
289
- const originalConfig = err.config;
299
+ let originalConfig = err.config;
290
300
  if (err.response) {
291
301
  // Access Token was expired
292
302
  if (err.response.status === 401 && !originalConfig._retry) {
@@ -321,6 +331,39 @@ export class BaseAPI {
321
331
  if (err.response.status === 403 && err.response.data) {
322
332
  return Promise.reject(err.response.data);
323
333
  }
334
+ } else if (err.message === NETWORK_ERROR_MESSAGE && !originalConfig._retry) {
335
+ try {
336
+ let tokenString: string;
337
+ if (this.isCustomerToken) {
338
+ tokenString = await this.refreshTokenCustomer();
339
+ } else {
340
+ tokenString = await this.refreshTokenTenant();
341
+ }
342
+ const accessToken = `Bearer ${tokenString}`;
343
+
344
+ const localVarHeaderParameter = {} as any;
345
+ localVarHeaderParameter['Authorization'] = accessToken;
346
+
347
+ this.lastRequestConfig.headers = {
348
+ ...originalConfig.headers,
349
+ ...localVarHeaderParameter,
350
+ };
351
+
352
+ originalConfig = {
353
+ ...this.lastRequestConfig,
354
+ }
355
+
356
+ originalConfig._retry = true;
357
+
358
+ this.configuration.accessToken = accessToken;
359
+
360
+ return axios(originalConfig);
361
+ } catch (_error) {
362
+ if (_error.response && _error.response.data) {
363
+ return Promise.reject(_error.response.data);
364
+ }
365
+ return Promise.reject(_error);
366
+ }
324
367
  }
325
368
  return Promise.reject(err);
326
369
  }
@@ -15,6 +15,7 @@ import { RequestArgs, BaseAPI } from '../base';
15
15
  import { CreateCustomerRequestDto } from '../models';
16
16
  import { CreateCustomerResponseClass } from '../models';
17
17
  import { ForgotPasswordRequestDto } from '../models';
18
+ import { GetCustomerDocumentDownloadUrlResponseClass } from '../models';
18
19
  import { GetCustomerResponseClass } from '../models';
19
20
  import { GetPolicyResponseClass } from '../models';
20
21
  import { InitiateAuthRequestDto } from '../models';
@@ -31,9 +32,12 @@ import { RequestPolicyUpdateResponseClass } from '../models';
31
32
  import { ResetPasswordByCustomerRequestDto } from '../models';
32
33
  import { RespondToAuthChallengeClass } from '../models';
33
34
  import { RespondToAuthChallengeRequestDto } from '../models';
35
+ import { TerminateCustomerPolicyRequestDto } from '../models';
36
+ import { TerminateCustomerPolicyResponseClass } from '../models';
34
37
  import { UpdateCustomerRequestDto } from '../models';
35
38
  import { UpdateCustomerResponseClass } from '../models';
36
39
  import { VerifyCustomerInviteResponseClass } from '../models';
40
+ import { WithdrawCustomerPolicyResponseClass } from '../models';
37
41
  /**
38
42
  * CustomersApi - axios parameter creator
39
43
  * @export
@@ -65,6 +69,16 @@ export declare const CustomersApiAxiosParamCreator: (configuration?: Configurati
65
69
  * @throws {RequiredError}
66
70
  */
67
71
  getCustomer: (customerCode: string, expand?: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
72
+ /**
73
+ * Get a presigned download url for document
74
+ * @summary Get a presigned download url for document
75
+ * @param {string} documentCode The document code
76
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
77
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
78
+ * @param {*} [options] Override http request option.
79
+ * @throws {RequiredError}
80
+ */
81
+ getCustomerDocumentDownloadUrl: (documentCode: string, customerCode: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
68
82
  /**
69
83
  * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
70
84
  * @summary Get policy details
@@ -183,6 +197,17 @@ export declare const CustomersApiAxiosParamCreator: (configuration?: Configurati
183
197
  * @throws {RequiredError}
184
198
  */
185
199
  respondToAuthChallenge: (respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto, options?: AxiosRequestConfig) => Promise<RequestArgs>;
200
+ /**
201
+ * Request to terminate an existing policy by customer
202
+ * @summary Terminate a policy by customer
203
+ * @param {string} policyCode The policy code
204
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
205
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
206
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
207
+ * @param {*} [options] Override http request option.
208
+ * @throws {RequiredError}
209
+ */
210
+ terminateCustomerPolicy: (policyCode: string, customerCode: string, terminateCustomerPolicyRequestDto: TerminateCustomerPolicyRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
186
211
  /**
187
212
  * Update customer details like phone, email, names, addresses etc
188
213
  * @summary Update customer details
@@ -209,6 +234,16 @@ export declare const CustomersApiAxiosParamCreator: (configuration?: Configurati
209
234
  * @throws {RequiredError}
210
235
  */
211
236
  verifyResetPasswordToken: (resetToken: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
237
+ /**
238
+ * Withdraw policy by customer
239
+ * @summary Withdraw policy by customer
240
+ * @param {string} policyCode The policy code
241
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
242
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
243
+ * @param {*} [options] Override http request option.
244
+ * @throws {RequiredError}
245
+ */
246
+ withdrawCustomerPolicy: (policyCode: string, customerCode: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
212
247
  };
213
248
  /**
214
249
  * CustomersApi - functional programming interface
@@ -241,6 +276,16 @@ export declare const CustomersApiFp: (configuration?: Configuration) => {
241
276
  * @throws {RequiredError}
242
277
  */
243
278
  getCustomer(customerCode: string, expand?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetCustomerResponseClass>>;
279
+ /**
280
+ * Get a presigned download url for document
281
+ * @summary Get a presigned download url for document
282
+ * @param {string} documentCode The document code
283
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
284
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
285
+ * @param {*} [options] Override http request option.
286
+ * @throws {RequiredError}
287
+ */
288
+ getCustomerDocumentDownloadUrl(documentCode: string, customerCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetCustomerDocumentDownloadUrlResponseClass>>;
244
289
  /**
245
290
  * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
246
291
  * @summary Get policy details
@@ -359,6 +404,17 @@ export declare const CustomersApiFp: (configuration?: Configuration) => {
359
404
  * @throws {RequiredError}
360
405
  */
361
406
  respondToAuthChallenge(respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RespondToAuthChallengeClass>>;
407
+ /**
408
+ * Request to terminate an existing policy by customer
409
+ * @summary Terminate a policy by customer
410
+ * @param {string} policyCode The policy code
411
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
412
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
413
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
414
+ * @param {*} [options] Override http request option.
415
+ * @throws {RequiredError}
416
+ */
417
+ terminateCustomerPolicy(policyCode: string, customerCode: string, terminateCustomerPolicyRequestDto: TerminateCustomerPolicyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TerminateCustomerPolicyResponseClass>>;
362
418
  /**
363
419
  * Update customer details like phone, email, names, addresses etc
364
420
  * @summary Update customer details
@@ -385,6 +441,16 @@ export declare const CustomersApiFp: (configuration?: Configuration) => {
385
441
  * @throws {RequiredError}
386
442
  */
387
443
  verifyResetPasswordToken(resetToken: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
444
+ /**
445
+ * Withdraw policy by customer
446
+ * @summary Withdraw policy by customer
447
+ * @param {string} policyCode The policy code
448
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
449
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
450
+ * @param {*} [options] Override http request option.
451
+ * @throws {RequiredError}
452
+ */
453
+ withdrawCustomerPolicy(policyCode: string, customerCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WithdrawCustomerPolicyResponseClass>>;
388
454
  };
389
455
  /**
390
456
  * CustomersApi - factory interface
@@ -417,6 +483,16 @@ export declare const CustomersApiFactory: (configuration?: Configuration, basePa
417
483
  * @throws {RequiredError}
418
484
  */
419
485
  getCustomer(customerCode: string, expand?: string, authorization?: string, options?: any): AxiosPromise<GetCustomerResponseClass>;
486
+ /**
487
+ * Get a presigned download url for document
488
+ * @summary Get a presigned download url for document
489
+ * @param {string} documentCode The document code
490
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
491
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
492
+ * @param {*} [options] Override http request option.
493
+ * @throws {RequiredError}
494
+ */
495
+ getCustomerDocumentDownloadUrl(documentCode: string, customerCode: string, authorization?: string, options?: any): AxiosPromise<GetCustomerDocumentDownloadUrlResponseClass>;
420
496
  /**
421
497
  * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
422
498
  * @summary Get policy details
@@ -535,6 +611,17 @@ export declare const CustomersApiFactory: (configuration?: Configuration, basePa
535
611
  * @throws {RequiredError}
536
612
  */
537
613
  respondToAuthChallenge(respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto, options?: any): AxiosPromise<RespondToAuthChallengeClass>;
614
+ /**
615
+ * Request to terminate an existing policy by customer
616
+ * @summary Terminate a policy by customer
617
+ * @param {string} policyCode The policy code
618
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
619
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
620
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
621
+ * @param {*} [options] Override http request option.
622
+ * @throws {RequiredError}
623
+ */
624
+ terminateCustomerPolicy(policyCode: string, customerCode: string, terminateCustomerPolicyRequestDto: TerminateCustomerPolicyRequestDto, authorization?: string, options?: any): AxiosPromise<TerminateCustomerPolicyResponseClass>;
538
625
  /**
539
626
  * Update customer details like phone, email, names, addresses etc
540
627
  * @summary Update customer details
@@ -561,6 +648,16 @@ export declare const CustomersApiFactory: (configuration?: Configuration, basePa
561
648
  * @throws {RequiredError}
562
649
  */
563
650
  verifyResetPasswordToken(resetToken: string, options?: any): AxiosPromise<void>;
651
+ /**
652
+ * Withdraw policy by customer
653
+ * @summary Withdraw policy by customer
654
+ * @param {string} policyCode The policy code
655
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
656
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
657
+ * @param {*} [options] Override http request option.
658
+ * @throws {RequiredError}
659
+ */
660
+ withdrawCustomerPolicy(policyCode: string, customerCode: string, authorization?: string, options?: any): AxiosPromise<WithdrawCustomerPolicyResponseClass>;
564
661
  };
565
662
  /**
566
663
  * Request parameters for createCustomer operation in CustomersApi.
@@ -613,6 +710,31 @@ export interface CustomersApiGetCustomerRequest {
613
710
  */
614
711
  readonly authorization?: string;
615
712
  }
713
+ /**
714
+ * Request parameters for getCustomerDocumentDownloadUrl operation in CustomersApi.
715
+ * @export
716
+ * @interface CustomersApiGetCustomerDocumentDownloadUrlRequest
717
+ */
718
+ export interface CustomersApiGetCustomerDocumentDownloadUrlRequest {
719
+ /**
720
+ * The document code
721
+ * @type {string}
722
+ * @memberof CustomersApiGetCustomerDocumentDownloadUrl
723
+ */
724
+ readonly documentCode: string;
725
+ /**
726
+ * The customer code or \&quot;me\&quot; for the currently logged in customer
727
+ * @type {string}
728
+ * @memberof CustomersApiGetCustomerDocumentDownloadUrl
729
+ */
730
+ readonly customerCode: string;
731
+ /**
732
+ * Bearer Token: provided by the login endpoint under the name accessToken.
733
+ * @type {string}
734
+ * @memberof CustomersApiGetCustomerDocumentDownloadUrl
735
+ */
736
+ readonly authorization?: string;
737
+ }
616
738
  /**
617
739
  * Request parameters for getPolicy operation in CustomersApi.
618
740
  * @export
@@ -936,6 +1058,37 @@ export interface CustomersApiRespondToAuthChallengeRequest {
936
1058
  */
937
1059
  readonly respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto;
938
1060
  }
1061
+ /**
1062
+ * Request parameters for terminateCustomerPolicy operation in CustomersApi.
1063
+ * @export
1064
+ * @interface CustomersApiTerminateCustomerPolicyRequest
1065
+ */
1066
+ export interface CustomersApiTerminateCustomerPolicyRequest {
1067
+ /**
1068
+ * The policy code
1069
+ * @type {string}
1070
+ * @memberof CustomersApiTerminateCustomerPolicy
1071
+ */
1072
+ readonly policyCode: string;
1073
+ /**
1074
+ * The customer code or \&quot;me\&quot; for the currently logged in customer
1075
+ * @type {string}
1076
+ * @memberof CustomersApiTerminateCustomerPolicy
1077
+ */
1078
+ readonly customerCode: string;
1079
+ /**
1080
+ *
1081
+ * @type {TerminateCustomerPolicyRequestDto}
1082
+ * @memberof CustomersApiTerminateCustomerPolicy
1083
+ */
1084
+ readonly terminateCustomerPolicyRequestDto: TerminateCustomerPolicyRequestDto;
1085
+ /**
1086
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1087
+ * @type {string}
1088
+ * @memberof CustomersApiTerminateCustomerPolicy
1089
+ */
1090
+ readonly authorization?: string;
1091
+ }
939
1092
  /**
940
1093
  * Request parameters for updateCustomer operation in CustomersApi.
941
1094
  * @export
@@ -987,6 +1140,31 @@ export interface CustomersApiVerifyResetPasswordTokenRequest {
987
1140
  */
988
1141
  readonly resetToken: string;
989
1142
  }
1143
+ /**
1144
+ * Request parameters for withdrawCustomerPolicy operation in CustomersApi.
1145
+ * @export
1146
+ * @interface CustomersApiWithdrawCustomerPolicyRequest
1147
+ */
1148
+ export interface CustomersApiWithdrawCustomerPolicyRequest {
1149
+ /**
1150
+ * The policy code
1151
+ * @type {string}
1152
+ * @memberof CustomersApiWithdrawCustomerPolicy
1153
+ */
1154
+ readonly policyCode: string;
1155
+ /**
1156
+ * The customer code or \&quot;me\&quot; for the currently logged in customer
1157
+ * @type {string}
1158
+ * @memberof CustomersApiWithdrawCustomerPolicy
1159
+ */
1160
+ readonly customerCode: string;
1161
+ /**
1162
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1163
+ * @type {string}
1164
+ * @memberof CustomersApiWithdrawCustomerPolicy
1165
+ */
1166
+ readonly authorization?: string;
1167
+ }
990
1168
  /**
991
1169
  * CustomersApi - object-oriented interface
992
1170
  * @export
@@ -1021,6 +1199,15 @@ export declare class CustomersApi extends BaseAPI {
1021
1199
  * @memberof CustomersApi
1022
1200
  */
1023
1201
  getCustomer(requestParameters: CustomersApiGetCustomerRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetCustomerResponseClass, any>>;
1202
+ /**
1203
+ * Get a presigned download url for document
1204
+ * @summary Get a presigned download url for document
1205
+ * @param {CustomersApiGetCustomerDocumentDownloadUrlRequest} requestParameters Request parameters.
1206
+ * @param {*} [options] Override http request option.
1207
+ * @throws {RequiredError}
1208
+ * @memberof CustomersApi
1209
+ */
1210
+ getCustomerDocumentDownloadUrl(requestParameters: CustomersApiGetCustomerDocumentDownloadUrlRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetCustomerDocumentDownloadUrlResponseClass, any>>;
1024
1211
  /**
1025
1212
  * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
1026
1213
  * @summary Get policy details
@@ -1120,6 +1307,15 @@ export declare class CustomersApi extends BaseAPI {
1120
1307
  * @memberof CustomersApi
1121
1308
  */
1122
1309
  respondToAuthChallenge(requestParameters: CustomersApiRespondToAuthChallengeRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RespondToAuthChallengeClass, any>>;
1310
+ /**
1311
+ * Request to terminate an existing policy by customer
1312
+ * @summary Terminate a policy by customer
1313
+ * @param {CustomersApiTerminateCustomerPolicyRequest} requestParameters Request parameters.
1314
+ * @param {*} [options] Override http request option.
1315
+ * @throws {RequiredError}
1316
+ * @memberof CustomersApi
1317
+ */
1318
+ terminateCustomerPolicy(requestParameters: CustomersApiTerminateCustomerPolicyRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<TerminateCustomerPolicyResponseClass, any>>;
1123
1319
  /**
1124
1320
  * Update customer details like phone, email, names, addresses etc
1125
1321
  * @summary Update customer details
@@ -1147,4 +1343,13 @@ export declare class CustomersApi extends BaseAPI {
1147
1343
  * @memberof CustomersApi
1148
1344
  */
1149
1345
  verifyResetPasswordToken(requestParameters: CustomersApiVerifyResetPasswordTokenRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
1346
+ /**
1347
+ * Withdraw policy by customer
1348
+ * @summary Withdraw policy by customer
1349
+ * @param {CustomersApiWithdrawCustomerPolicyRequest} requestParameters Request parameters.
1350
+ * @param {*} [options] Override http request option.
1351
+ * @throws {RequiredError}
1352
+ * @memberof CustomersApi
1353
+ */
1354
+ withdrawCustomerPolicy(requestParameters: CustomersApiWithdrawCustomerPolicyRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<WithdrawCustomerPolicyResponseClass, any>>;
1150
1355
  }