@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
@@ -0,0 +1,102 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface SharedInvoiceItemClass
16
+ */
17
+ export interface SharedInvoiceItemClass {
18
+ /**
19
+ * product name
20
+ * @type {string}
21
+ * @memberof SharedInvoiceItemClass
22
+ */
23
+ 'name': string;
24
+ /**
25
+ * tax code
26
+ * @type {string}
27
+ * @memberof SharedInvoiceItemClass
28
+ */
29
+ 'taxCode': string;
30
+ /**
31
+ * Invoice type
32
+ * @type {string}
33
+ * @memberof SharedInvoiceItemClass
34
+ */
35
+ 'unit': string;
36
+ /**
37
+ * group
38
+ * @type {string}
39
+ * @memberof SharedInvoiceItemClass
40
+ */
41
+ 'group': string;
42
+ /**
43
+ * Item quantity
44
+ * @type {number}
45
+ * @memberof SharedInvoiceItemClass
46
+ */
47
+ 'quantity': number;
48
+ /**
49
+ * Item price per unit
50
+ * @type {number}
51
+ * @memberof SharedInvoiceItemClass
52
+ */
53
+ 'pricePerUnit': number;
54
+ /**
55
+ * Item tax rate
56
+ * @type {number}
57
+ * @memberof SharedInvoiceItemClass
58
+ */
59
+ 'taxRate': number;
60
+ /**
61
+ * Net amount
62
+ * @type {number}
63
+ * @memberof SharedInvoiceItemClass
64
+ */
65
+ 'netAmount': number;
66
+ /**
67
+ * Net tax amount
68
+ * @type {number}
69
+ * @memberof SharedInvoiceItemClass
70
+ */
71
+ 'taxAmount': number;
72
+ /**
73
+ * Gross amount
74
+ * @type {number}
75
+ * @memberof SharedInvoiceItemClass
76
+ */
77
+ 'grossAmount': number;
78
+ /**
79
+ * Credit amount
80
+ * @type {number}
81
+ * @memberof SharedInvoiceItemClass
82
+ */
83
+ 'creditAmount': number;
84
+ /**
85
+ * Surcharge amount
86
+ * @type {number}
87
+ * @memberof SharedInvoiceItemClass
88
+ */
89
+ 'surcharge': number;
90
+ /**
91
+ * Invoice item interval from
92
+ * @type {string}
93
+ * @memberof SharedInvoiceItemClass
94
+ */
95
+ 'billingIntervalFrom': string;
96
+ /**
97
+ * Invoice item interval to
98
+ * @type {string}
99
+ * @memberof SharedInvoiceItemClass
100
+ */
101
+ 'billingIntervalTo': string;
102
+ }
@@ -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,24 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface TerminateCustomerPolicyRequestDto
16
+ */
17
+ export interface TerminateCustomerPolicyRequestDto {
18
+ /**
19
+ * Terminate from
20
+ * @type {string}
21
+ * @memberof TerminateCustomerPolicyRequestDto
22
+ */
23
+ 'from': string;
24
+ }
@@ -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 TerminateCustomerPolicyResponseClass
17
+ */
18
+ export interface TerminateCustomerPolicyResponseClass {
19
+ /**
20
+ * Policy
21
+ * @type {PolicyClass}
22
+ * @memberof TerminateCustomerPolicyResponseClass
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 });
@@ -20,61 +20,61 @@ export interface UpdateAccountRequestDto {
20
20
  * @type {string}
21
21
  * @memberof UpdateAccountRequestDto
22
22
  */
23
- 'firstName': string;
23
+ 'firstName'?: string;
24
24
  /**
25
25
  * The account\'s last name.
26
26
  * @type {string}
27
27
  * @memberof UpdateAccountRequestDto
28
28
  */
29
- 'lastName': string;
29
+ 'lastName'?: string;
30
30
  /**
31
31
  * The account\'s email address. It is displayed alongside the account in the admin dashboard and can be useful for searching and tracking.
32
32
  * @type {string}
33
33
  * @memberof UpdateAccountRequestDto
34
34
  */
35
- 'email': string;
35
+ 'email'?: string;
36
36
  /**
37
37
  * The account\'s gender.
38
38
  * @type {string}
39
39
  * @memberof UpdateAccountRequestDto
40
40
  */
41
- 'gender': UpdateAccountRequestDtoGenderEnum;
41
+ 'gender'?: UpdateAccountRequestDtoGenderEnum;
42
42
  /**
43
43
  * The account\'s street name.
44
44
  * @type {string}
45
45
  * @memberof UpdateAccountRequestDto
46
46
  */
47
- 'street': string;
47
+ 'street'?: string;
48
48
  /**
49
49
  * The account\'s ZIP or postal code.
50
50
  * @type {string}
51
51
  * @memberof UpdateAccountRequestDto
52
52
  */
53
- 'zipCode': string;
53
+ 'zipCode'?: string;
54
54
  /**
55
55
  * The account\'s city, district, suburb, town, or village.
56
56
  * @type {string}
57
57
  * @memberof UpdateAccountRequestDto
58
58
  */
59
- 'city': string;
59
+ 'city'?: string;
60
60
  /**
61
61
  * The account\'s house number.
62
62
  * @type {string}
63
63
  * @memberof UpdateAccountRequestDto
64
64
  */
65
- 'houseNumber': string;
65
+ 'houseNumber'?: string;
66
66
  /**
67
67
  * Account\'s birth date.
68
68
  * @type {string}
69
69
  * @memberof UpdateAccountRequestDto
70
70
  */
71
- 'birthDate': string;
71
+ 'birthDate'?: string;
72
72
  /**
73
73
  * The account\'s phone number.
74
74
  * @type {string}
75
75
  * @memberof UpdateAccountRequestDto
76
76
  */
77
- 'phone': string;
77
+ 'phone'?: string;
78
78
  /**
79
79
  * Optional field to enter extra information.
80
80
  * @type {object}
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { CustomerClass } from './customer-class';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -17,8 +18,8 @@
17
18
  export interface UpdateCustomerResponseClass {
18
19
  /**
19
20
  * Customer object
20
- * @type {object}
21
+ * @type {CustomerClass}
21
22
  * @memberof UpdateCustomerResponseClass
22
23
  */
23
- 'customer': object;
24
+ 'customer': CustomerClass;
24
25
  }
@@ -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,139 @@
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 { AccountPolicyClass } from './account-policy-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface AccountClass
22
+ */
23
+ export interface AccountClass {
24
+ /**
25
+ * Internal unique identifier for the object. You should not have to use this, use code instead.
26
+ * @type {number}
27
+ * @memberof AccountClass
28
+ */
29
+ 'id': number;
30
+ /**
31
+ * Unique identifier for the object.
32
+ * @type {string}
33
+ * @memberof AccountClass
34
+ */
35
+ 'code': string;
36
+ /**
37
+ * Optional field in order to use a specific account number.
38
+ * @type {string}
39
+ * @memberof AccountClass
40
+ */
41
+ 'accountNumber': string;
42
+ /**
43
+ * The account\'s first name.
44
+ * @type {string}
45
+ * @memberof AccountClass
46
+ */
47
+ 'firstName': string;
48
+ /**
49
+ * The account\'s last name.
50
+ * @type {string}
51
+ * @memberof AccountClass
52
+ */
53
+ 'lastName': string;
54
+ /**
55
+ * The account\'s email address, It is displayed alongside the account in your dashboard and can be useful for searching and tracking.
56
+ * @type {string}
57
+ * @memberof AccountClass
58
+ */
59
+ 'email': string;
60
+ /**
61
+ * The account\'s gender.
62
+ * @type {string}
63
+ * @memberof AccountClass
64
+ */
65
+ 'gender': string;
66
+ /**
67
+ * The account\'s street name.
68
+ * @type {string}
69
+ * @memberof AccountClass
70
+ */
71
+ 'street': string;
72
+ /**
73
+ * The account\'s house number.
74
+ * @type {string}
75
+ * @memberof AccountClass
76
+ */
77
+ 'houseNumber': string;
78
+ /**
79
+ * The account\'s ZIP or postal code
80
+ * @type {string}
81
+ * @memberof AccountClass
82
+ */
83
+ 'zipCode': string;
84
+ /**
85
+ * The account\'s city, district, suburb, town, or village.
86
+ * @type {string}
87
+ * @memberof AccountClass
88
+ */
89
+ 'city': string;
90
+ /**
91
+ * The account\'s date of birth
92
+ * @type {string}
93
+ * @memberof AccountClass
94
+ */
95
+ 'birthDate': string;
96
+ /**
97
+ * The account\'s phone number.
98
+ * @type {string}
99
+ * @memberof AccountClass
100
+ */
101
+ 'phone': string;
102
+ /**
103
+ * The account\'s version.
104
+ * @type {number}
105
+ * @memberof AccountClass
106
+ */
107
+ 'version': number;
108
+ /**
109
+ * Time at which the object was created.
110
+ * @type {string}
111
+ * @memberof AccountClass
112
+ */
113
+ 'createdAt': string;
114
+ /**
115
+ * Time at which the object was updated.
116
+ * @type {string}
117
+ * @memberof AccountClass
118
+ */
119
+ 'updatedAt': string;
120
+ /**
121
+ * Policies linked to the account.
122
+ * @type {Array<AccountPolicyClass>}
123
+ * @memberof AccountClass
124
+ */
125
+ 'policies': Array<AccountPolicyClass>;
126
+ /**
127
+ * Optional field contain extra information
128
+ * @type {object}
129
+ * @memberof AccountClass
130
+ */
131
+ 'metadata': object;
132
+ /**
133
+ * Optional field contain custom fields
134
+ * @type {object}
135
+ * @memberof AccountClass
136
+ */
137
+ 'customFields': object;
138
+ }
139
+
@@ -0,0 +1,36 @@
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 AccountPolicyClass
21
+ */
22
+ export interface AccountPolicyClass {
23
+ /**
24
+ * Unique identifier for a policy.
25
+ * @type {string}
26
+ * @memberof AccountPolicyClass
27
+ */
28
+ 'policyCode': string;
29
+ /**
30
+ * Number used on official documents.
31
+ * @type {string}
32
+ * @memberof AccountPolicyClass
33
+ */
34
+ 'policyNumber': string;
35
+ }
36
+
@@ -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
+