@emilgroup/customer-sdk-node 1.3.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 (65) hide show
  1. package/.openapi-generator/FILES +15 -1
  2. package/README.md +2 -2
  3. package/api/customers-api.ts +798 -82
  4. package/base.ts +56 -13
  5. package/dist/api/customers-api.d.ts +456 -36
  6. package/dist/api/customers-api.js +579 -40
  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/account-class.js +15 -0
  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 +25 -0
  20. package/dist/models/get-customer-response-class.js +15 -0
  21. package/dist/models/index.d.ts +15 -1
  22. package/dist/models/index.js +15 -1
  23. package/dist/models/invoice-class.d.ts +135 -0
  24. package/dist/models/invoice-class.js +28 -0
  25. package/dist/models/list-documents-response-class.d.ts +31 -0
  26. package/dist/models/list-documents-response-class.js +15 -0
  27. package/dist/models/list-invoices-response-class.d.ts +3 -2
  28. package/dist/models/request-policy-update-request-dto.d.ts +42 -0
  29. package/dist/models/request-policy-update-request-dto.js +15 -0
  30. package/dist/models/reset-password-by-customer-request-dto.d.ts +1 -1
  31. package/dist/models/shared-invoice-item-class.d.ts +102 -0
  32. package/dist/models/shared-invoice-item-class.js +15 -0
  33. package/dist/models/terminate-customer-policy-request-dto.d.ts +24 -0
  34. package/dist/models/terminate-customer-policy-request-dto.js +15 -0
  35. package/dist/models/terminate-customer-policy-response-class.d.ts +25 -0
  36. package/dist/models/terminate-customer-policy-response-class.js +15 -0
  37. package/dist/models/{create-account-request-dto.d.ts → update-account-request-dto.d.ts} +26 -32
  38. package/dist/models/{create-account-request-dto.js → update-account-request-dto.js} +2 -2
  39. package/dist/models/update-customer-request-dto.d.ts +31 -0
  40. package/dist/models/update-customer-request-dto.js +15 -0
  41. package/dist/models/update-customer-response-class.d.ts +25 -0
  42. package/dist/models/update-customer-response-class.js +15 -0
  43. package/dist/models/withdraw-customer-policy-response-class.d.ts +25 -0
  44. package/dist/models/withdraw-customer-policy-response-class.js +15 -0
  45. package/models/account-class.ts +138 -0
  46. package/models/create-customer-request-dto.ts +0 -7
  47. package/models/create-customer-response-class.ts +3 -2
  48. package/models/customer-class.ts +73 -0
  49. package/models/customer-document-class.ts +108 -0
  50. package/models/get-customer-document-download-url-response-class.ts +30 -0
  51. package/models/get-customer-response-class.ts +31 -0
  52. package/models/index.ts +15 -1
  53. package/models/invoice-class.ts +145 -0
  54. package/models/list-documents-response-class.ts +37 -0
  55. package/models/list-invoices-response-class.ts +3 -2
  56. package/models/request-policy-update-request-dto.ts +48 -0
  57. package/models/reset-password-by-customer-request-dto.ts +1 -1
  58. package/models/shared-invoice-item-class.ts +108 -0
  59. package/models/terminate-customer-policy-request-dto.ts +30 -0
  60. package/models/terminate-customer-policy-response-class.ts +31 -0
  61. package/models/{create-account-request-dto.ts → update-account-request-dto.ts} +26 -32
  62. package/models/update-customer-request-dto.ts +37 -0
  63. package/models/update-customer-response-class.ts +31 -0
  64. package/models/withdraw-customer-policy-response-class.ts +31 -0
  65. package/package.json +1 -1
@@ -0,0 +1,31 @@
1
+ /**
2
+ * EMIL CustomerService
3
+ * The EMIL CustomerService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { UpdateAccountRequestDto } from './update-account-request-dto';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UpdateCustomerRequestDto
17
+ */
18
+ export interface UpdateCustomerRequestDto {
19
+ /**
20
+ * Optional account data
21
+ * @type {UpdateAccountRequestDto}
22
+ * @memberof UpdateCustomerRequestDto
23
+ */
24
+ 'account'?: UpdateAccountRequestDto;
25
+ /**
26
+ * Customer code
27
+ * @type {string}
28
+ * @memberof UpdateCustomerRequestDto
29
+ */
30
+ 'customerCode': string;
31
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL CustomerService
6
+ * The EMIL CustomerService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ /**
2
+ * EMIL CustomerService
3
+ * The EMIL CustomerService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { CustomerClass } from './customer-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UpdateCustomerResponseClass
17
+ */
18
+ export interface UpdateCustomerResponseClass {
19
+ /**
20
+ * Customer object
21
+ * @type {CustomerClass}
22
+ * @memberof UpdateCustomerResponseClass
23
+ */
24
+ 'customer': CustomerClass;
25
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL CustomerService
6
+ * The EMIL CustomerService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ /**
2
+ * EMIL CustomerService
3
+ * The EMIL CustomerService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { PolicyClass } from './policy-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface WithdrawCustomerPolicyResponseClass
17
+ */
18
+ export interface WithdrawCustomerPolicyResponseClass {
19
+ /**
20
+ * Policy
21
+ * @type {PolicyClass}
22
+ * @memberof WithdrawCustomerPolicyResponseClass
23
+ */
24
+ 'policy': PolicyClass;
25
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL CustomerService
6
+ * The EMIL CustomerService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,138 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL CustomerService
5
+ * The EMIL CustomerService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface AccountClass
21
+ */
22
+ export interface AccountClass {
23
+ /**
24
+ * Internal unique identifier for the object. You should not have to use this, use code instead.
25
+ * @type {number}
26
+ * @memberof AccountClass
27
+ */
28
+ 'id': number;
29
+ /**
30
+ * Unique identifier for the object.
31
+ * @type {string}
32
+ * @memberof AccountClass
33
+ */
34
+ 'code': string;
35
+ /**
36
+ * Optional field in order to use a specific account number.
37
+ * @type {string}
38
+ * @memberof AccountClass
39
+ */
40
+ 'accountNumber': string;
41
+ /**
42
+ * The account\'s first name.
43
+ * @type {string}
44
+ * @memberof AccountClass
45
+ */
46
+ 'firstName': string;
47
+ /**
48
+ * The account\'s last name.
49
+ * @type {string}
50
+ * @memberof AccountClass
51
+ */
52
+ 'lastName': string;
53
+ /**
54
+ * The account\'s email address, It is displayed alongside the account in your dashboard and can be useful for searching and tracking.
55
+ * @type {string}
56
+ * @memberof AccountClass
57
+ */
58
+ 'email': string;
59
+ /**
60
+ * The account\'s gender.
61
+ * @type {string}
62
+ * @memberof AccountClass
63
+ */
64
+ 'gender': string;
65
+ /**
66
+ * The account\'s street name.
67
+ * @type {string}
68
+ * @memberof AccountClass
69
+ */
70
+ 'street': string;
71
+ /**
72
+ * The account\'s house number.
73
+ * @type {string}
74
+ * @memberof AccountClass
75
+ */
76
+ 'houseNumber': string;
77
+ /**
78
+ * The account\'s ZIP or postal code
79
+ * @type {string}
80
+ * @memberof AccountClass
81
+ */
82
+ 'zipCode': string;
83
+ /**
84
+ * The account\'s city, district, suburb, town, or village.
85
+ * @type {string}
86
+ * @memberof AccountClass
87
+ */
88
+ 'city': string;
89
+ /**
90
+ * The account\'s date of birth
91
+ * @type {string}
92
+ * @memberof AccountClass
93
+ */
94
+ 'birthDate': string;
95
+ /**
96
+ * The account\'s phone number.
97
+ * @type {string}
98
+ * @memberof AccountClass
99
+ */
100
+ 'phone': string;
101
+ /**
102
+ * The account\'s version.
103
+ * @type {number}
104
+ * @memberof AccountClass
105
+ */
106
+ 'version': number;
107
+ /**
108
+ * Time at which the object was created.
109
+ * @type {string}
110
+ * @memberof AccountClass
111
+ */
112
+ 'createdAt': string;
113
+ /**
114
+ * Time at which the object was updated.
115
+ * @type {string}
116
+ * @memberof AccountClass
117
+ */
118
+ 'updatedAt': string;
119
+ /**
120
+ * Policies linked to the account.
121
+ * @type {Array<string>}
122
+ * @memberof AccountClass
123
+ */
124
+ 'policies': Array<string>;
125
+ /**
126
+ * Optional field contain extra information
127
+ * @type {object}
128
+ * @memberof AccountClass
129
+ */
130
+ 'metadata': object;
131
+ /**
132
+ * Optional field contain custom fields
133
+ * @type {object}
134
+ * @memberof AccountClass
135
+ */
136
+ 'customFields': object;
137
+ }
138
+
@@ -13,7 +13,6 @@
13
13
  */
14
14
 
15
15
 
16
- import { CreateAccountRequestDto } from './create-account-request-dto';
17
16
 
18
17
  /**
19
18
  *
@@ -39,11 +38,5 @@ export interface CreateCustomerRequestDto {
39
38
  * @memberof CreateCustomerRequestDto
40
39
  */
41
40
  'isEulaAccepted': boolean;
42
- /**
43
- * Optional account data
44
- * @type {CreateAccountRequestDto}
45
- * @memberof CreateCustomerRequestDto
46
- */
47
- 'account'?: CreateAccountRequestDto;
48
41
  }
49
42
 
@@ -13,6 +13,7 @@
13
13
  */
14
14
 
15
15
 
16
+ import { CustomerClass } from './customer-class';
16
17
 
17
18
  /**
18
19
  *
@@ -22,9 +23,9 @@
22
23
  export interface CreateCustomerResponseClass {
23
24
  /**
24
25
  * Customer object
25
- * @type {object}
26
+ * @type {CustomerClass}
26
27
  * @memberof CreateCustomerResponseClass
27
28
  */
28
- 'customer': object;
29
+ 'customer': CustomerClass;
29
30
  }
30
31
 
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL CustomerService
5
+ * The EMIL CustomerService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import { AccountClass } from './account-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface CustomerClass
22
+ */
23
+ export interface CustomerClass {
24
+ /**
25
+ * Customer account information
26
+ * @type {AccountClass}
27
+ * @memberof CustomerClass
28
+ */
29
+ 'account': AccountClass;
30
+ /**
31
+ * Unique identifier for the object.
32
+ * @type {string}
33
+ * @memberof CustomerClass
34
+ */
35
+ 'code': string;
36
+ /**
37
+ * Internal unique identifier for the object. Use code instead.
38
+ * @type {number}
39
+ * @memberof CustomerClass
40
+ */
41
+ 'id': number;
42
+ /**
43
+ * Customer status
44
+ * @type {string}
45
+ * @memberof CustomerClass
46
+ */
47
+ 'status': string;
48
+ /**
49
+ * Customer unique identifier
50
+ * @type {string}
51
+ * @memberof CustomerClass
52
+ */
53
+ 'sub': string;
54
+ /**
55
+ * Tenants short name in EIS
56
+ * @type {string}
57
+ * @memberof CustomerClass
58
+ */
59
+ 'tenantSlug': string;
60
+ /**
61
+ * Time at which the object was created.
62
+ * @type {string}
63
+ * @memberof CustomerClass
64
+ */
65
+ 'createdAt': string;
66
+ /**
67
+ * Time at which the object was updated.
68
+ * @type {string}
69
+ * @memberof CustomerClass
70
+ */
71
+ 'updatedAt': string;
72
+ }
73
+
@@ -0,0 +1,108 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL CustomerService
5
+ * The EMIL CustomerService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface CustomerDocumentClass
21
+ */
22
+ export interface CustomerDocumentClass {
23
+ /**
24
+ * Document code
25
+ * @type {string}
26
+ * @memberof CustomerDocumentClass
27
+ */
28
+ 'code': string;
29
+ /**
30
+ * Template slug
31
+ * @type {string}
32
+ * @memberof CustomerDocumentClass
33
+ */
34
+ 'templateSlug': string;
35
+ /**
36
+ * Document entity type
37
+ * @type {string}
38
+ * @memberof CustomerDocumentClass
39
+ */
40
+ 'entityType': string;
41
+ /**
42
+ * Policy code
43
+ * @type {string}
44
+ * @memberof CustomerDocumentClass
45
+ */
46
+ 'policyCode': string;
47
+ /**
48
+ * Account code
49
+ * @type {string}
50
+ * @memberof CustomerDocumentClass
51
+ */
52
+ 'accountCode': string;
53
+ /**
54
+ * Document content type
55
+ * @type {string}
56
+ * @memberof CustomerDocumentClass
57
+ */
58
+ 'contentType': CustomerDocumentClassContentTypeEnum;
59
+ /**
60
+ * Entity id
61
+ * @type {number}
62
+ * @memberof CustomerDocumentClass
63
+ */
64
+ 'entityId': number;
65
+ /**
66
+ * Optional file name
67
+ * @type {string}
68
+ * @memberof CustomerDocumentClass
69
+ */
70
+ 'filename': string;
71
+ /**
72
+ * Document description
73
+ * @type {string}
74
+ * @memberof CustomerDocumentClass
75
+ */
76
+ 'description': string;
77
+ /**
78
+ * Document created at
79
+ * @type {string}
80
+ * @memberof CustomerDocumentClass
81
+ */
82
+ 'createdAt': string;
83
+ }
84
+
85
+ export const CustomerDocumentClassContentTypeEnum = {
86
+ Pdf: 'pdf',
87
+ Jpg: 'jpg',
88
+ Png: 'png',
89
+ Gz: 'gz',
90
+ Csv: 'csv',
91
+ Doc: 'doc',
92
+ Docx: 'docx',
93
+ Html: 'html',
94
+ Json: 'json',
95
+ Xml: 'xml',
96
+ Txt: 'txt',
97
+ Zip: 'zip',
98
+ Tar: 'tar',
99
+ Rar: 'rar',
100
+ Mp4: 'MP4',
101
+ Mov: 'MOV',
102
+ Wmv: 'WMV',
103
+ Avi: 'AVI'
104
+ } as const;
105
+
106
+ export type CustomerDocumentClassContentTypeEnum = typeof CustomerDocumentClassContentTypeEnum[keyof typeof CustomerDocumentClassContentTypeEnum];
107
+
108
+
@@ -0,0 +1,30 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL CustomerService
5
+ * The EMIL CustomerService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface GetCustomerDocumentDownloadUrlResponseClass
21
+ */
22
+ export interface GetCustomerDocumentDownloadUrlResponseClass {
23
+ /**
24
+ * Pre-signed Url
25
+ * @type {string}
26
+ * @memberof GetCustomerDocumentDownloadUrlResponseClass
27
+ */
28
+ 'url': string;
29
+ }
30
+
@@ -0,0 +1,31 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL CustomerService
5
+ * The EMIL CustomerService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import { CustomerClass } from './customer-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface GetCustomerResponseClass
22
+ */
23
+ export interface GetCustomerResponseClass {
24
+ /**
25
+ * Customer object
26
+ * @type {CustomerClass}
27
+ * @memberof GetCustomerResponseClass
28
+ */
29
+ 'customer': CustomerClass;
30
+ }
31
+
package/models/index.ts CHANGED
@@ -1,8 +1,12 @@
1
+ export * from './account-class';
1
2
  export * from './authentication-result-class';
2
- export * from './create-account-request-dto';
3
3
  export * from './create-customer-request-dto';
4
4
  export * from './create-customer-response-class';
5
+ export * from './customer-class';
6
+ export * from './customer-document-class';
5
7
  export * from './forgot-password-request-dto';
8
+ export * from './get-customer-document-download-url-response-class';
9
+ export * from './get-customer-response-class';
6
10
  export * from './get-policy-response-class';
7
11
  export * from './initiate-auth-request-dto';
8
12
  export * from './initiate-auth-response-class';
@@ -10,6 +14,8 @@ export * from './invite-by-customer-request-dto';
10
14
  export * from './invite-by-customer-response-class';
11
15
  export * from './invite-by-tenant-response-class';
12
16
  export * from './invite-class';
17
+ export * from './invoice-class';
18
+ export * from './list-documents-response-class';
13
19
  export * from './list-invoices-response-class';
14
20
  export * from './list-policies-response-class';
15
21
  export * from './policy-class';
@@ -18,9 +24,17 @@ export * from './policy-premium-class';
18
24
  export * from './policy-premium-item-class';
19
25
  export * from './policy-version-class';
20
26
  export * from './refresh-token-dto';
27
+ export * from './request-policy-update-request-dto';
21
28
  export * from './request-policy-update-response-class';
22
29
  export * from './reset-password-by-customer-request-dto';
23
30
  export * from './respond-to-auth-challenge-class';
24
31
  export * from './respond-to-auth-challenge-request-dto';
32
+ export * from './shared-invoice-item-class';
33
+ export * from './terminate-customer-policy-request-dto';
34
+ export * from './terminate-customer-policy-response-class';
25
35
  export * from './timeslice-class';
36
+ export * from './update-account-request-dto';
37
+ export * from './update-customer-request-dto';
38
+ export * from './update-customer-response-class';
26
39
  export * from './verify-customer-invite-response-class';
40
+ export * from './withdraw-customer-policy-response-class';