@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
@@ -9,11 +9,15 @@ common.ts
9
9
  configuration.ts
10
10
  git_push.sh
11
11
  index.ts
12
+ models/account-class.ts
13
+ models/account-policy-class.ts
12
14
  models/authentication-result-class.ts
13
- models/create-account-request-dto.ts
14
15
  models/create-customer-request-dto.ts
15
16
  models/create-customer-response-class.ts
17
+ models/customer-class.ts
18
+ models/customer-document-class.ts
16
19
  models/forgot-password-request-dto.ts
20
+ models/get-customer-document-download-url-response-class.ts
17
21
  models/get-customer-response-class.ts
18
22
  models/get-policy-response-class.ts
19
23
  models/index.ts
@@ -23,6 +27,7 @@ models/invite-by-customer-request-dto.ts
23
27
  models/invite-by-customer-response-class.ts
24
28
  models/invite-by-tenant-response-class.ts
25
29
  models/invite-class.ts
30
+ models/invoice-class.ts
26
31
  models/list-documents-response-class.ts
27
32
  models/list-invoices-response-class.ts
28
33
  models/list-policies-response-class.ts
@@ -37,10 +42,15 @@ models/request-policy-update-response-class.ts
37
42
  models/reset-password-by-customer-request-dto.ts
38
43
  models/respond-to-auth-challenge-class.ts
39
44
  models/respond-to-auth-challenge-request-dto.ts
45
+ models/shared-customer-policy-object-request-dto.ts
46
+ models/shared-invoice-item-class.ts
47
+ models/terminate-customer-policy-request-dto.ts
48
+ models/terminate-customer-policy-response-class.ts
40
49
  models/timeslice-class.ts
41
50
  models/update-account-request-dto.ts
42
51
  models/update-customer-request-dto.ts
43
52
  models/update-customer-response-class.ts
44
53
  models/verify-customer-invite-response-class.ts
54
+ models/withdraw-customer-policy-response-class.ts
45
55
  package.json
46
56
  tsconfig.json
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/customer-sdk-node@1.4.0 --save
20
+ npm install @emilgroup/customer-sdk-node@1.6.1 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/customer-sdk-node@1.4.0
24
+ yarn add @emilgroup/customer-sdk-node@1.6.1
25
25
  ```
26
26
 
27
27
  And then you can import `CustomersApi`.
@@ -27,6 +27,8 @@ import { CreateCustomerResponseClass } from '../models';
27
27
  // @ts-ignore
28
28
  import { ForgotPasswordRequestDto } from '../models';
29
29
  // @ts-ignore
30
+ import { GetCustomerDocumentDownloadUrlResponseClass } from '../models';
31
+ // @ts-ignore
30
32
  import { GetCustomerResponseClass } from '../models';
31
33
  // @ts-ignore
32
34
  import { GetPolicyResponseClass } from '../models';
@@ -59,11 +61,17 @@ import { RespondToAuthChallengeClass } from '../models';
59
61
  // @ts-ignore
60
62
  import { RespondToAuthChallengeRequestDto } from '../models';
61
63
  // @ts-ignore
64
+ import { TerminateCustomerPolicyRequestDto } from '../models';
65
+ // @ts-ignore
66
+ import { TerminateCustomerPolicyResponseClass } from '../models';
67
+ // @ts-ignore
62
68
  import { UpdateCustomerRequestDto } from '../models';
63
69
  // @ts-ignore
64
70
  import { UpdateCustomerResponseClass } from '../models';
65
71
  // @ts-ignore
66
72
  import { VerifyCustomerInviteResponseClass } from '../models';
73
+ // @ts-ignore
74
+ import { WithdrawCustomerPolicyResponseClass } from '../models';
67
75
  // URLSearchParams not necessarily used
68
76
  // @ts-ignore
69
77
  import { URL, URLSearchParams } from 'url';
@@ -187,6 +195,51 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
187
195
 
188
196
 
189
197
 
198
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
199
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
200
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
201
+
202
+ return {
203
+ url: toPathString(localVarUrlObj),
204
+ options: localVarRequestOptions,
205
+ };
206
+ },
207
+ /**
208
+ * Get a presigned download url for document
209
+ * @summary Get a presigned download url for document
210
+ * @param {string} documentCode The document code
211
+ * @param {string} customerCode The customer code or \"me\" for the currently logged in customer
212
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
213
+ * @param {*} [options] Override http request option.
214
+ * @throws {RequiredError}
215
+ */
216
+ getCustomerDocumentDownloadUrl: async (documentCode: string, customerCode: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
217
+ // verify required parameter 'documentCode' is not null or undefined
218
+ assertParamExists('getCustomerDocumentDownloadUrl', 'documentCode', documentCode)
219
+ // verify required parameter 'customerCode' is not null or undefined
220
+ assertParamExists('getCustomerDocumentDownloadUrl', 'customerCode', customerCode)
221
+ const localVarPath = `/v1/customers/{customerCode}/documents/{documentCode}/download-url`
222
+ .replace(`{${"documentCode"}}`, encodeURIComponent(String(documentCode)))
223
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
224
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
225
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
226
+ let baseOptions;
227
+ let baseAccessToken;
228
+ if (configuration) {
229
+ baseOptions = configuration.baseOptions;
230
+ baseAccessToken = configuration.accessToken;
231
+ }
232
+
233
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
234
+ const localVarHeaderParameter = {} as any;
235
+ const localVarQueryParameter = {} as any;
236
+
237
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
238
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
239
+ }
240
+
241
+
242
+
190
243
  setSearchParams(localVarUrlObj, localVarQueryParameter);
191
244
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
192
245
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -753,6 +806,57 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
753
806
  options: localVarRequestOptions,
754
807
  };
755
808
  },
809
+ /**
810
+ * Request to terminate an existing policy by customer
811
+ * @summary Terminate a policy by customer
812
+ * @param {string} policyCode The policy code
813
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
814
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
815
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
816
+ * @param {*} [options] Override http request option.
817
+ * @throws {RequiredError}
818
+ */
819
+ terminateCustomerPolicy: async (policyCode: string, customerCode: string, terminateCustomerPolicyRequestDto: TerminateCustomerPolicyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
820
+ // verify required parameter 'policyCode' is not null or undefined
821
+ assertParamExists('terminateCustomerPolicy', 'policyCode', policyCode)
822
+ // verify required parameter 'customerCode' is not null or undefined
823
+ assertParamExists('terminateCustomerPolicy', 'customerCode', customerCode)
824
+ // verify required parameter 'terminateCustomerPolicyRequestDto' is not null or undefined
825
+ assertParamExists('terminateCustomerPolicy', 'terminateCustomerPolicyRequestDto', terminateCustomerPolicyRequestDto)
826
+ const localVarPath = `/v1/customers/{customerCode}/policies/{policyCode}/terminate`
827
+ .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)))
828
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
829
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
830
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
831
+ let baseOptions;
832
+ let baseAccessToken;
833
+ if (configuration) {
834
+ baseOptions = configuration.baseOptions;
835
+ baseAccessToken = configuration.accessToken;
836
+ }
837
+
838
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
839
+ const localVarHeaderParameter = {} as any;
840
+ const localVarQueryParameter = {} as any;
841
+
842
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
843
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
844
+ }
845
+
846
+
847
+
848
+ localVarHeaderParameter['Content-Type'] = 'application/json';
849
+
850
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
851
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
852
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
853
+ localVarRequestOptions.data = serializeDataIfNeeded(terminateCustomerPolicyRequestDto, localVarRequestOptions, configuration)
854
+
855
+ return {
856
+ url: toPathString(localVarUrlObj),
857
+ options: localVarRequestOptions,
858
+ };
859
+ },
756
860
  /**
757
861
  * Update customer details like phone, email, names, addresses etc
758
862
  * @summary Update customer details
@@ -869,6 +973,51 @@ export const CustomersApiAxiosParamCreator = function (configuration?: Configura
869
973
 
870
974
 
871
975
 
976
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
977
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
978
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
979
+
980
+ return {
981
+ url: toPathString(localVarUrlObj),
982
+ options: localVarRequestOptions,
983
+ };
984
+ },
985
+ /**
986
+ * Withdraw policy by customer
987
+ * @summary Withdraw policy by customer
988
+ * @param {string} policyCode The policy code
989
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
990
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
991
+ * @param {*} [options] Override http request option.
992
+ * @throws {RequiredError}
993
+ */
994
+ withdrawCustomerPolicy: async (policyCode: string, customerCode: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
995
+ // verify required parameter 'policyCode' is not null or undefined
996
+ assertParamExists('withdrawCustomerPolicy', 'policyCode', policyCode)
997
+ // verify required parameter 'customerCode' is not null or undefined
998
+ assertParamExists('withdrawCustomerPolicy', 'customerCode', customerCode)
999
+ const localVarPath = `/v1/customers/{customerCode}/policies/{policyCode}/withdraw`
1000
+ .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)))
1001
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
1002
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1003
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1004
+ let baseOptions;
1005
+ let baseAccessToken;
1006
+ if (configuration) {
1007
+ baseOptions = configuration.baseOptions;
1008
+ baseAccessToken = configuration.accessToken;
1009
+ }
1010
+
1011
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1012
+ const localVarHeaderParameter = {} as any;
1013
+ const localVarQueryParameter = {} as any;
1014
+
1015
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
1016
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
1017
+ }
1018
+
1019
+
1020
+
872
1021
  setSearchParams(localVarUrlObj, localVarQueryParameter);
873
1022
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
874
1023
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -923,6 +1072,19 @@ export const CustomersApiFp = function(configuration?: Configuration) {
923
1072
  const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomer(customerCode, expand, authorization, options);
924
1073
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
925
1074
  },
1075
+ /**
1076
+ * Get a presigned download url for document
1077
+ * @summary Get a presigned download url for document
1078
+ * @param {string} documentCode The document code
1079
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
1080
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1081
+ * @param {*} [options] Override http request option.
1082
+ * @throws {RequiredError}
1083
+ */
1084
+ async getCustomerDocumentDownloadUrl(documentCode: string, customerCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetCustomerDocumentDownloadUrlResponseClass>> {
1085
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomerDocumentDownloadUrl(documentCode, customerCode, authorization, options);
1086
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1087
+ },
926
1088
  /**
927
1089
  * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
928
1090
  * @summary Get policy details
@@ -1074,6 +1236,20 @@ export const CustomersApiFp = function(configuration?: Configuration) {
1074
1236
  const localVarAxiosArgs = await localVarAxiosParamCreator.respondToAuthChallenge(respondToAuthChallengeRequestDto, options);
1075
1237
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1076
1238
  },
1239
+ /**
1240
+ * Request to terminate an existing policy by customer
1241
+ * @summary Terminate a policy by customer
1242
+ * @param {string} policyCode The policy code
1243
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
1244
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
1245
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1246
+ * @param {*} [options] Override http request option.
1247
+ * @throws {RequiredError}
1248
+ */
1249
+ async terminateCustomerPolicy(policyCode: string, customerCode: string, terminateCustomerPolicyRequestDto: TerminateCustomerPolicyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TerminateCustomerPolicyResponseClass>> {
1250
+ const localVarAxiosArgs = await localVarAxiosParamCreator.terminateCustomerPolicy(policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options);
1251
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1252
+ },
1077
1253
  /**
1078
1254
  * Update customer details like phone, email, names, addresses etc
1079
1255
  * @summary Update customer details
@@ -1109,6 +1285,19 @@ export const CustomersApiFp = function(configuration?: Configuration) {
1109
1285
  const localVarAxiosArgs = await localVarAxiosParamCreator.verifyResetPasswordToken(resetToken, options);
1110
1286
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1111
1287
  },
1288
+ /**
1289
+ * Withdraw policy by customer
1290
+ * @summary Withdraw policy by customer
1291
+ * @param {string} policyCode The policy code
1292
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
1293
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1294
+ * @param {*} [options] Override http request option.
1295
+ * @throws {RequiredError}
1296
+ */
1297
+ async withdrawCustomerPolicy(policyCode: string, customerCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WithdrawCustomerPolicyResponseClass>> {
1298
+ const localVarAxiosArgs = await localVarAxiosParamCreator.withdrawCustomerPolicy(policyCode, customerCode, authorization, options);
1299
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1300
+ },
1112
1301
  }
1113
1302
  };
1114
1303
 
@@ -1151,6 +1340,18 @@ export const CustomersApiFactory = function (configuration?: Configuration, base
1151
1340
  getCustomer(customerCode: string, expand?: string, authorization?: string, options?: any): AxiosPromise<GetCustomerResponseClass> {
1152
1341
  return localVarFp.getCustomer(customerCode, expand, authorization, options).then((request) => request(axios, basePath));
1153
1342
  },
1343
+ /**
1344
+ * Get a presigned download url for document
1345
+ * @summary Get a presigned download url for document
1346
+ * @param {string} documentCode The document code
1347
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
1348
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1349
+ * @param {*} [options] Override http request option.
1350
+ * @throws {RequiredError}
1351
+ */
1352
+ getCustomerDocumentDownloadUrl(documentCode: string, customerCode: string, authorization?: string, options?: any): AxiosPromise<GetCustomerDocumentDownloadUrlResponseClass> {
1353
+ return localVarFp.getCustomerDocumentDownloadUrl(documentCode, customerCode, authorization, options).then((request) => request(axios, basePath));
1354
+ },
1154
1355
  /**
1155
1356
  * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
1156
1357
  * @summary Get policy details
@@ -1291,6 +1492,19 @@ export const CustomersApiFactory = function (configuration?: Configuration, base
1291
1492
  respondToAuthChallenge(respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto, options?: any): AxiosPromise<RespondToAuthChallengeClass> {
1292
1493
  return localVarFp.respondToAuthChallenge(respondToAuthChallengeRequestDto, options).then((request) => request(axios, basePath));
1293
1494
  },
1495
+ /**
1496
+ * Request to terminate an existing policy by customer
1497
+ * @summary Terminate a policy by customer
1498
+ * @param {string} policyCode The policy code
1499
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
1500
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
1501
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1502
+ * @param {*} [options] Override http request option.
1503
+ * @throws {RequiredError}
1504
+ */
1505
+ terminateCustomerPolicy(policyCode: string, customerCode: string, terminateCustomerPolicyRequestDto: TerminateCustomerPolicyRequestDto, authorization?: string, options?: any): AxiosPromise<TerminateCustomerPolicyResponseClass> {
1506
+ return localVarFp.terminateCustomerPolicy(policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
1507
+ },
1294
1508
  /**
1295
1509
  * Update customer details like phone, email, names, addresses etc
1296
1510
  * @summary Update customer details
@@ -1323,6 +1537,18 @@ export const CustomersApiFactory = function (configuration?: Configuration, base
1323
1537
  verifyResetPasswordToken(resetToken: string, options?: any): AxiosPromise<void> {
1324
1538
  return localVarFp.verifyResetPasswordToken(resetToken, options).then((request) => request(axios, basePath));
1325
1539
  },
1540
+ /**
1541
+ * Withdraw policy by customer
1542
+ * @summary Withdraw policy by customer
1543
+ * @param {string} policyCode The policy code
1544
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer
1545
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1546
+ * @param {*} [options] Override http request option.
1547
+ * @throws {RequiredError}
1548
+ */
1549
+ withdrawCustomerPolicy(policyCode: string, customerCode: string, authorization?: string, options?: any): AxiosPromise<WithdrawCustomerPolicyResponseClass> {
1550
+ return localVarFp.withdrawCustomerPolicy(policyCode, customerCode, authorization, options).then((request) => request(axios, basePath));
1551
+ },
1326
1552
  };
1327
1553
  };
1328
1554
 
@@ -1382,6 +1608,34 @@ export interface CustomersApiGetCustomerRequest {
1382
1608
  readonly authorization?: string
1383
1609
  }
1384
1610
 
1611
+ /**
1612
+ * Request parameters for getCustomerDocumentDownloadUrl operation in CustomersApi.
1613
+ * @export
1614
+ * @interface CustomersApiGetCustomerDocumentDownloadUrlRequest
1615
+ */
1616
+ export interface CustomersApiGetCustomerDocumentDownloadUrlRequest {
1617
+ /**
1618
+ * The document code
1619
+ * @type {string}
1620
+ * @memberof CustomersApiGetCustomerDocumentDownloadUrl
1621
+ */
1622
+ readonly documentCode: string
1623
+
1624
+ /**
1625
+ * The customer code or \&quot;me\&quot; for the currently logged in customer
1626
+ * @type {string}
1627
+ * @memberof CustomersApiGetCustomerDocumentDownloadUrl
1628
+ */
1629
+ readonly customerCode: string
1630
+
1631
+ /**
1632
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1633
+ * @type {string}
1634
+ * @memberof CustomersApiGetCustomerDocumentDownloadUrl
1635
+ */
1636
+ readonly authorization?: string
1637
+ }
1638
+
1385
1639
  /**
1386
1640
  * Request parameters for getPolicy operation in CustomersApi.
1387
1641
  * @export
@@ -1746,6 +2000,41 @@ export interface CustomersApiRespondToAuthChallengeRequest {
1746
2000
  readonly respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto
1747
2001
  }
1748
2002
 
2003
+ /**
2004
+ * Request parameters for terminateCustomerPolicy operation in CustomersApi.
2005
+ * @export
2006
+ * @interface CustomersApiTerminateCustomerPolicyRequest
2007
+ */
2008
+ export interface CustomersApiTerminateCustomerPolicyRequest {
2009
+ /**
2010
+ * The policy code
2011
+ * @type {string}
2012
+ * @memberof CustomersApiTerminateCustomerPolicy
2013
+ */
2014
+ readonly policyCode: string
2015
+
2016
+ /**
2017
+ * The customer code or \&quot;me\&quot; for the currently logged in customer
2018
+ * @type {string}
2019
+ * @memberof CustomersApiTerminateCustomerPolicy
2020
+ */
2021
+ readonly customerCode: string
2022
+
2023
+ /**
2024
+ *
2025
+ * @type {TerminateCustomerPolicyRequestDto}
2026
+ * @memberof CustomersApiTerminateCustomerPolicy
2027
+ */
2028
+ readonly terminateCustomerPolicyRequestDto: TerminateCustomerPolicyRequestDto
2029
+
2030
+ /**
2031
+ * Bearer Token: provided by the login endpoint under the name accessToken.
2032
+ * @type {string}
2033
+ * @memberof CustomersApiTerminateCustomerPolicy
2034
+ */
2035
+ readonly authorization?: string
2036
+ }
2037
+
1749
2038
  /**
1750
2039
  * Request parameters for updateCustomer operation in CustomersApi.
1751
2040
  * @export
@@ -1802,6 +2091,34 @@ export interface CustomersApiVerifyResetPasswordTokenRequest {
1802
2091
  readonly resetToken: string
1803
2092
  }
1804
2093
 
2094
+ /**
2095
+ * Request parameters for withdrawCustomerPolicy operation in CustomersApi.
2096
+ * @export
2097
+ * @interface CustomersApiWithdrawCustomerPolicyRequest
2098
+ */
2099
+ export interface CustomersApiWithdrawCustomerPolicyRequest {
2100
+ /**
2101
+ * The policy code
2102
+ * @type {string}
2103
+ * @memberof CustomersApiWithdrawCustomerPolicy
2104
+ */
2105
+ readonly policyCode: string
2106
+
2107
+ /**
2108
+ * The customer code or \&quot;me\&quot; for the currently logged in customer
2109
+ * @type {string}
2110
+ * @memberof CustomersApiWithdrawCustomerPolicy
2111
+ */
2112
+ readonly customerCode: string
2113
+
2114
+ /**
2115
+ * Bearer Token: provided by the login endpoint under the name accessToken.
2116
+ * @type {string}
2117
+ * @memberof CustomersApiWithdrawCustomerPolicy
2118
+ */
2119
+ readonly authorization?: string
2120
+ }
2121
+
1805
2122
  /**
1806
2123
  * CustomersApi - object-oriented interface
1807
2124
  * @export
@@ -1845,6 +2162,18 @@ export class CustomersApi extends BaseAPI {
1845
2162
  return CustomersApiFp(this.configuration).getCustomer(requestParameters.customerCode, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1846
2163
  }
1847
2164
 
2165
+ /**
2166
+ * Get a presigned download url for document
2167
+ * @summary Get a presigned download url for document
2168
+ * @param {CustomersApiGetCustomerDocumentDownloadUrlRequest} requestParameters Request parameters.
2169
+ * @param {*} [options] Override http request option.
2170
+ * @throws {RequiredError}
2171
+ * @memberof CustomersApi
2172
+ */
2173
+ public getCustomerDocumentDownloadUrl(requestParameters: CustomersApiGetCustomerDocumentDownloadUrlRequest, options?: AxiosRequestConfig) {
2174
+ return CustomersApiFp(this.configuration).getCustomerDocumentDownloadUrl(requestParameters.documentCode, requestParameters.customerCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2175
+ }
2176
+
1848
2177
  /**
1849
2178
  * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
1850
2179
  * @summary Get policy details
@@ -1977,6 +2306,18 @@ export class CustomersApi extends BaseAPI {
1977
2306
  return CustomersApiFp(this.configuration).respondToAuthChallenge(requestParameters.respondToAuthChallengeRequestDto, options).then((request) => request(this.axios, this.basePath));
1978
2307
  }
1979
2308
 
2309
+ /**
2310
+ * Request to terminate an existing policy by customer
2311
+ * @summary Terminate a policy by customer
2312
+ * @param {CustomersApiTerminateCustomerPolicyRequest} requestParameters Request parameters.
2313
+ * @param {*} [options] Override http request option.
2314
+ * @throws {RequiredError}
2315
+ * @memberof CustomersApi
2316
+ */
2317
+ public terminateCustomerPolicy(requestParameters: CustomersApiTerminateCustomerPolicyRequest, options?: AxiosRequestConfig) {
2318
+ return CustomersApiFp(this.configuration).terminateCustomerPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.terminateCustomerPolicyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2319
+ }
2320
+
1980
2321
  /**
1981
2322
  * Update customer details like phone, email, names, addresses etc
1982
2323
  * @summary Update customer details
@@ -2012,4 +2353,16 @@ export class CustomersApi extends BaseAPI {
2012
2353
  public verifyResetPasswordToken(requestParameters: CustomersApiVerifyResetPasswordTokenRequest, options?: AxiosRequestConfig) {
2013
2354
  return CustomersApiFp(this.configuration).verifyResetPasswordToken(requestParameters.resetToken, options).then((request) => request(this.axios, this.basePath));
2014
2355
  }
2356
+
2357
+ /**
2358
+ * Withdraw policy by customer
2359
+ * @summary Withdraw policy by customer
2360
+ * @param {CustomersApiWithdrawCustomerPolicyRequest} requestParameters Request parameters.
2361
+ * @param {*} [options] Override http request option.
2362
+ * @throws {RequiredError}
2363
+ * @memberof CustomersApi
2364
+ */
2365
+ public withdrawCustomerPolicy(requestParameters: CustomersApiWithdrawCustomerPolicyRequest, options?: AxiosRequestConfig) {
2366
+ return CustomersApiFp(this.configuration).withdrawCustomerPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2367
+ }
2015
2368
  }