@emilgroup/customer-sdk-node 1.4.0 → 1.6.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.
Files changed (57) hide show
  1. package/.openapi-generator/FILES +9 -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 +132 -0
  10. package/dist/models/{create-account-request-dto.js → account-class.js} +0 -6
  11. package/dist/models/create-customer-request-dto.d.ts +0 -7
  12. package/dist/models/create-customer-response-class.d.ts +3 -2
  13. package/dist/models/customer-class.d.ts +67 -0
  14. package/dist/models/customer-class.js +15 -0
  15. package/dist/models/customer-document-class.d.ts +99 -0
  16. package/dist/models/customer-document-class.js +36 -0
  17. package/dist/models/get-customer-document-download-url-response-class.d.ts +24 -0
  18. package/dist/models/get-customer-document-download-url-response-class.js +15 -0
  19. package/dist/models/get-customer-response-class.d.ts +3 -2
  20. package/dist/models/index.d.ts +9 -1
  21. package/dist/models/index.js +9 -1
  22. package/dist/models/invoice-class.d.ts +135 -0
  23. package/dist/models/invoice-class.js +28 -0
  24. package/dist/models/list-documents-response-class.d.ts +3 -2
  25. package/dist/models/list-invoices-response-class.d.ts +3 -2
  26. package/dist/models/reset-password-by-customer-request-dto.d.ts +1 -1
  27. package/dist/models/shared-invoice-item-class.d.ts +102 -0
  28. package/dist/models/shared-invoice-item-class.js +15 -0
  29. package/dist/models/terminate-customer-policy-request-dto.d.ts +24 -0
  30. package/dist/models/terminate-customer-policy-request-dto.js +15 -0
  31. package/dist/models/terminate-customer-policy-response-class.d.ts +25 -0
  32. package/dist/models/terminate-customer-policy-response-class.js +15 -0
  33. package/dist/models/update-account-request-dto.d.ts +10 -10
  34. package/dist/models/update-customer-response-class.d.ts +3 -2
  35. package/dist/models/withdraw-customer-policy-response-class.d.ts +25 -0
  36. package/dist/models/withdraw-customer-policy-response-class.js +15 -0
  37. package/models/account-class.ts +138 -0
  38. package/models/create-customer-request-dto.ts +0 -7
  39. package/models/create-customer-response-class.ts +3 -2
  40. package/models/customer-class.ts +73 -0
  41. package/models/customer-document-class.ts +108 -0
  42. package/models/get-customer-document-download-url-response-class.ts +30 -0
  43. package/models/get-customer-response-class.ts +3 -2
  44. package/models/index.ts +9 -1
  45. package/models/invoice-class.ts +145 -0
  46. package/models/list-documents-response-class.ts +3 -2
  47. package/models/list-invoices-response-class.ts +3 -2
  48. package/models/reset-password-by-customer-request-dto.ts +1 -1
  49. package/models/shared-invoice-item-class.ts +108 -0
  50. package/models/terminate-customer-policy-request-dto.ts +30 -0
  51. package/models/terminate-customer-policy-response-class.ts +31 -0
  52. package/models/update-account-request-dto.ts +10 -10
  53. package/models/update-customer-response-class.ts +3 -2
  54. package/models/withdraw-customer-policy-response-class.ts +31 -0
  55. package/package.json +1 -1
  56. package/dist/models/create-account-request-dto.d.ts +0 -102
  57. package/models/create-account-request-dto.ts +0 -111
@@ -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
  }