@placeshakr/config 10.19.0 → 10.19.6-alpha.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.
- package/dist/config.cjs.development.js +525 -54
- package/dist/config.cjs.development.js.map +1 -1
- package/dist/config.cjs.production.min.js +1 -1
- package/dist/config.cjs.production.min.js.map +1 -1
- package/dist/config.esm.js +525 -54
- package/dist/config.esm.js.map +1 -1
- package/dist/environment/base.d.ts.map +1 -1
- package/dist/environment/decorators.d.ts.map +1 -1
- package/dist/environment/types.d.ts +5 -0
- package/dist/environment/types.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +2 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/plans/base.d.ts.map +1 -1
- package/dist/plans/index.d.ts.map +1 -1
- package/dist/plans/types.d.ts +43 -121
- package/dist/plans/types.d.ts.map +1 -1
- package/dist/types.d.ts +101 -39
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/environment/base.ts +21 -9
- package/src/environment/decorators.ts +2 -0
- package/src/environment/types.ts +6 -1
- package/src/helpers/index.ts +5 -1
- package/src/plans/base.ts +151 -6
- package/src/plans/index.ts +148 -28
- package/src/plans/types.ts +31 -51
- package/src/types.ts +139 -57
package/src/plans/index.ts
CHANGED
|
@@ -18,11 +18,11 @@ const testing: ProductCreationParams = {
|
|
|
18
18
|
tariffs: {
|
|
19
19
|
base: { id: 'price_1KJmg4LFzcsAA7x6SMfj1iDu', price: 69, usageType: 'licensed', type: 'base' },
|
|
20
20
|
},
|
|
21
|
-
prices: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
additionalUserPrice: 10,
|
|
21
|
+
// prices: {
|
|
22
|
+
// monthly: 'price_1KJmg4LFzcsAA7x6SMfj1iDu',
|
|
23
|
+
// additionalUser: 'price_1KJmg4LFzcsAA7x6yzvGdoxe',
|
|
24
|
+
// },
|
|
25
|
+
// additionalUserPrice: 10,
|
|
26
26
|
},
|
|
27
27
|
plus: {
|
|
28
28
|
id: 'prod_KzmyY1ysEOeK93',
|
|
@@ -30,11 +30,11 @@ const testing: ProductCreationParams = {
|
|
|
30
30
|
tariffs: {
|
|
31
31
|
base: { id: 'price_1KJnP0LFzcsAA7x6oDVeaPAv', price: 159, usageType: 'licensed', type: 'base' },
|
|
32
32
|
},
|
|
33
|
-
prices: {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
additionalUserPrice: 5,
|
|
33
|
+
// prices: {
|
|
34
|
+
// monthly: 'price_1KJnP0LFzcsAA7x6oDVeaPAv',
|
|
35
|
+
// additionalUser: 'price_1KJnP0LFzcsAA7x6s3rO71QX',
|
|
36
|
+
// },
|
|
37
|
+
// additionalUserPrice: 5,
|
|
38
38
|
},
|
|
39
39
|
classic: {
|
|
40
40
|
id: 'prod_KzmO4rORyWl8cA',
|
|
@@ -46,11 +46,71 @@ const testing: ProductCreationParams = {
|
|
|
46
46
|
additionalPro: { id: 'price_1KJmpiLFzcsAA7x6JxTnlLC8', price: 10, usageType: 'metered', type: 'extra_user' },
|
|
47
47
|
additionalSeller: { id: 'price_1KJmpiLFzcsAA7x6XS9PBgQo', price: 2, usageType: 'metered', type: 'extra_user' },
|
|
48
48
|
},
|
|
49
|
-
prices: {
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
// prices: {
|
|
50
|
+
// monthly: 'price_1KJmpiLFzcsAA7x6rLA0GNZX',
|
|
51
|
+
// additionalUser: 'price_1KJmpiLFzcsAA7x6VtCIuhqw',
|
|
52
|
+
// },
|
|
53
|
+
// additionalUserPrice: 30,
|
|
54
|
+
},
|
|
55
|
+
test_1: {
|
|
56
|
+
id: 'prod_L2ZqDUzF0HFuFN',
|
|
57
|
+
tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
|
|
58
|
+
tariffs: {
|
|
59
|
+
base: { id: 'price_1KMUgwLFzcsAA7x6c3wk0Buy', price: 50, usageType: 'licensed', type: 'base' },
|
|
60
|
+
additionalAdmin: { id: 'price_1KMUgwLFzcsAA7x6X8qYBxls', price: 10, usageType: 'metered', type: 'extra_user' },
|
|
61
|
+
additionalAgent: { id: 'price_1KMUgwLFzcsAA7x6fyOLh2gM', price: 8, usageType: 'metered', type: 'extra_user' },
|
|
62
|
+
additionalPro: { id: 'price_1KMUgwLFzcsAA7x6eB6Oevw2', price: 6, usageType: 'metered', type: 'extra_user' },
|
|
63
|
+
additionalSeller: { id: 'price_1KMUgwLFzcsAA7x6s9WBpxTS', price: 4, usageType: 'metered', type: 'extra_user' },
|
|
64
|
+
},
|
|
65
|
+
// prices: {
|
|
66
|
+
// monthly: 'price_1KMUgwLFzcsAA7x6c3wk0Buy',
|
|
67
|
+
// additionalUser: 'price_1KMUgwLFzcsAA7x6X8qYBxls',
|
|
68
|
+
// },
|
|
69
|
+
// additionalUserPrice: 10,
|
|
70
|
+
},
|
|
71
|
+
test_2: {
|
|
72
|
+
id: 'prod_L2xmEk7gqqRJtS',
|
|
73
|
+
tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
|
|
74
|
+
tariffs: {
|
|
75
|
+
base: { id: 'price_1KMrqrLFzcsAA7x62Ag7xwjU', price: 100, usageType: 'licensed', type: 'base' },
|
|
76
|
+
additionalAdmin: { id: 'price_1KMrqrLFzcsAA7x6cu3it43A', price: 20, usageType: 'metered', type: 'extra_user' },
|
|
77
|
+
additionalAgent: { id: 'price_1KMrqrLFzcsAA7x6eNCDb3D6', price: 16, usageType: 'metered', type: 'extra_user' },
|
|
78
|
+
additionalPro: { id: 'price_1KMrqrLFzcsAA7x6wRuDxyyN', price: 12, usageType: 'metered', type: 'extra_user' },
|
|
79
|
+
additionalSeller: { id: 'price_1KMrqsLFzcsAA7x61NRR9gne', price: 8, usageType: 'metered', type: 'extra_user' },
|
|
80
|
+
},
|
|
81
|
+
// prices: {
|
|
82
|
+
// monthly: 'price_1KMrqrLFzcsAA7x62Ag7xwjU',
|
|
83
|
+
// additionalUser: 'price_1KMrqrLFzcsAA7x6cu3it43A',
|
|
84
|
+
// },
|
|
85
|
+
// additionalUserPrice: 20,
|
|
86
|
+
},
|
|
87
|
+
test_3: {
|
|
88
|
+
id: 'prod_L2xnCHGi6QNgX8',
|
|
89
|
+
tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
|
|
90
|
+
tariffs: {
|
|
91
|
+
base: { id: 'price_1KMrs0LFzcsAA7x6p2tkW6lu', price: 80, usageType: 'licensed', type: 'base' },
|
|
92
|
+
},
|
|
93
|
+
// prices: {
|
|
94
|
+
// monthly: 'price_1KMrs0LFzcsAA7x6p2tkW6lu',
|
|
95
|
+
// additionalUser: 'price_1KMUgwLFzcsAA7x6X8qYBxls',
|
|
96
|
+
// },
|
|
97
|
+
// additionalUserPrice: 10,
|
|
98
|
+
},
|
|
99
|
+
test_4: {
|
|
100
|
+
id: 'prod_L2yWF4ssugw8Ln',
|
|
101
|
+
tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
|
|
102
|
+
tariffs: {
|
|
103
|
+
base: { id: 'price_1KMsZFLFzcsAA7x6qVbCQpuN', price: 65, usageType: 'licensed', type: 'base' },
|
|
104
|
+
additionalAdmin: { id: 'price_1KMsZFLFzcsAA7x6EjaDfica', price: 15, usageType: 'metered', type: 'extra_user' },
|
|
105
|
+
additionalAgent: { id: 'price_1KMsZFLFzcsAA7x6T1FI1WF4', price: 12, usageType: 'metered', type: 'extra_user' },
|
|
106
|
+
additionalPro: { id: 'price_1KMsZFLFzcsAA7x6L6I0M1ND', price: 9, usageType: 'metered', type: 'extra_user' },
|
|
107
|
+
additionalSeller: { id: 'price_1KMsZFLFzcsAA7x6G5GXzPeW', price: 6, usageType: 'metered', type: 'extra_user' },
|
|
52
108
|
},
|
|
53
|
-
|
|
109
|
+
// prices: {
|
|
110
|
+
// monthly: 'price_1KMsZFLFzcsAA7x6qVbCQpuN',
|
|
111
|
+
// additionalUser: 'price_1KMsZFLFzcsAA7x6EjaDfica',
|
|
112
|
+
// },
|
|
113
|
+
// additionalUserPrice: 15,
|
|
54
114
|
},
|
|
55
115
|
};
|
|
56
116
|
|
|
@@ -61,11 +121,11 @@ const production: ProductCreationParams = {
|
|
|
61
121
|
tariffs: {
|
|
62
122
|
base: { id: 'price_1HIQaILFzcsAA7x6NVk3cJu1', price: 69, usageType: 'licensed', type: 'base' },
|
|
63
123
|
},
|
|
64
|
-
prices: {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
additionalUserPrice: 10,
|
|
124
|
+
// prices: {
|
|
125
|
+
// monthly: 'price_1HIQaILFzcsAA7x6NVk3cJu1',
|
|
126
|
+
// additionalUser: 'price_1HRQFTLFzcsAA7x6X9wS7JUr',
|
|
127
|
+
// },
|
|
128
|
+
// additionalUserPrice: 10,
|
|
69
129
|
},
|
|
70
130
|
plus: {
|
|
71
131
|
id: 'prod_HsB2YJPEZ9H98c',
|
|
@@ -73,11 +133,11 @@ const production: ProductCreationParams = {
|
|
|
73
133
|
tariffs: {
|
|
74
134
|
base: { id: 'price_1HIQg0LFzcsAA7x6X6lfFUdv', price: 159, usageType: 'licensed', type: 'base' },
|
|
75
135
|
},
|
|
76
|
-
prices: {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
additionalUserPrice: 5,
|
|
136
|
+
// prices: {
|
|
137
|
+
// monthly: 'price_1HIQg0LFzcsAA7x6X6lfFUdv',
|
|
138
|
+
// additionalUser: 'price_1HRg1fLFzcsAA7x6QYbtnty6',
|
|
139
|
+
// },
|
|
140
|
+
// additionalUserPrice: 5,
|
|
81
141
|
},
|
|
82
142
|
classic: {
|
|
83
143
|
id: 'prod_KzmYFhrWXrzWdR',
|
|
@@ -89,11 +149,71 @@ const production: ProductCreationParams = {
|
|
|
89
149
|
additionalPro: { id: 'price_1KJmzNLFzcsAA7x695wsj6rA', price: 10, usageType: 'metered', type: 'extra_user' },
|
|
90
150
|
additionalSeller: { id: 'price_1KJmzNLFzcsAA7x6gF62MX41', price: 2, usageType: 'metered', type: 'extra_user' },
|
|
91
151
|
},
|
|
92
|
-
prices: {
|
|
93
|
-
|
|
94
|
-
|
|
152
|
+
// prices: {
|
|
153
|
+
// monthly: 'price_1KJmzNLFzcsAA7x6I6gNlCpY',
|
|
154
|
+
// additionalUser: 'price_1KJmzNLFzcsAA7x6Tl6D8Wus',
|
|
155
|
+
// },
|
|
156
|
+
// additionalUserPrice: 30,
|
|
157
|
+
},
|
|
158
|
+
test_1: {
|
|
159
|
+
id: 'prod_L2ZqDUzF0HFuFN',
|
|
160
|
+
tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
|
|
161
|
+
tariffs: {
|
|
162
|
+
base: { id: 'price_1KMUgwLFzcsAA7x6c3wk0Buy', price: 50, usageType: 'licensed', type: 'base' },
|
|
163
|
+
additionalAdmin: { id: 'price_1KMUgwLFzcsAA7x6X8qYBxls', price: 10, usageType: 'metered', type: 'extra_user' },
|
|
164
|
+
additionalAgent: { id: 'price_1KMUgwLFzcsAA7x6fyOLh2gM', price: 8, usageType: 'metered', type: 'extra_user' },
|
|
165
|
+
additionalPro: { id: 'price_1KMUgwLFzcsAA7x6eB6Oevw2', price: 6, usageType: 'metered', type: 'extra_user' },
|
|
166
|
+
additionalSeller: { id: 'price_1KMUgwLFzcsAA7x6s9WBpxTS', price: 4, usageType: 'metered', type: 'extra_user' },
|
|
167
|
+
},
|
|
168
|
+
// prices: {
|
|
169
|
+
// monthly: 'price_1KMUgwLFzcsAA7x6c3wk0Buy',
|
|
170
|
+
// additionalUser: 'price_1KMUgwLFzcsAA7x6X8qYBxls',
|
|
171
|
+
// },
|
|
172
|
+
// additionalUserPrice: 10,
|
|
173
|
+
},
|
|
174
|
+
test_2: {
|
|
175
|
+
id: 'prod_L2xmEk7gqqRJtS',
|
|
176
|
+
tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
|
|
177
|
+
tariffs: {
|
|
178
|
+
base: { id: 'price_1KMrqrLFzcsAA7x62Ag7xwjU', price: 100, usageType: 'licensed', type: 'base' },
|
|
179
|
+
additionalAdmin: { id: 'price_1KMrqrLFzcsAA7x6cu3it43A', price: 20, usageType: 'metered', type: 'extra_user' },
|
|
180
|
+
additionalAgent: { id: 'price_1KMrqrLFzcsAA7x6eNCDb3D6', price: 16, usageType: 'metered', type: 'extra_user' },
|
|
181
|
+
additionalPro: { id: 'price_1KMrqrLFzcsAA7x6wRuDxyyN', price: 12, usageType: 'metered', type: 'extra_user' },
|
|
182
|
+
additionalSeller: { id: 'price_1KMrqsLFzcsAA7x61NRR9gne', price: 8, usageType: 'metered', type: 'extra_user' },
|
|
183
|
+
},
|
|
184
|
+
// prices: {
|
|
185
|
+
// monthly: 'price_1KMrqrLFzcsAA7x62Ag7xwjU',
|
|
186
|
+
// additionalUser: 'price_1KMrqrLFzcsAA7x6cu3it43A',
|
|
187
|
+
// },
|
|
188
|
+
// additionalUserPrice: 20,
|
|
189
|
+
},
|
|
190
|
+
test_3: {
|
|
191
|
+
id: 'prod_L2xnCHGi6QNgX8',
|
|
192
|
+
tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
|
|
193
|
+
tariffs: {
|
|
194
|
+
base: { id: 'price_1KMrs0LFzcsAA7x6p2tkW6lu', price: 80, usageType: 'licensed', type: 'base' },
|
|
195
|
+
},
|
|
196
|
+
// prices: {
|
|
197
|
+
// monthly: 'price_1KMrs0LFzcsAA7x6p2tkW6lu',
|
|
198
|
+
// additionalUser: 'price_1KMUgwLFzcsAA7x6X8qYBxls',
|
|
199
|
+
// },
|
|
200
|
+
// additionalUserPrice: 10,
|
|
201
|
+
},
|
|
202
|
+
test_4: {
|
|
203
|
+
id: 'prod_L2yWF4ssugw8Ln',
|
|
204
|
+
tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
|
|
205
|
+
tariffs: {
|
|
206
|
+
base: { id: 'price_1KMsZFLFzcsAA7x6qVbCQpuN', price: 65, usageType: 'licensed', type: 'base' },
|
|
207
|
+
additionalAdmin: { id: 'price_1KMsZFLFzcsAA7x6EjaDfica', price: 15, usageType: 'metered', type: 'extra_user' },
|
|
208
|
+
additionalAgent: { id: 'price_1KMsZFLFzcsAA7x6T1FI1WF4', price: 12, usageType: 'metered', type: 'extra_user' },
|
|
209
|
+
additionalPro: { id: 'price_1KMsZFLFzcsAA7x6L6I0M1ND', price: 9, usageType: 'metered', type: 'extra_user' },
|
|
210
|
+
additionalSeller: { id: 'price_1KMsZFLFzcsAA7x6G5GXzPeW', price: 6, usageType: 'metered', type: 'extra_user' },
|
|
95
211
|
},
|
|
96
|
-
|
|
212
|
+
// prices: {
|
|
213
|
+
// monthly: 'price_1KMsZFLFzcsAA7x6qVbCQpuN',
|
|
214
|
+
// additionalUser: 'price_1KMsZFLFzcsAA7x6EjaDfica',
|
|
215
|
+
// },
|
|
216
|
+
// additionalUserPrice: 15,
|
|
97
217
|
},
|
|
98
218
|
};
|
|
99
219
|
|
package/src/plans/types.ts
CHANGED
|
@@ -134,7 +134,7 @@ export interface Product {
|
|
|
134
134
|
/**
|
|
135
135
|
* Indicate rating among products
|
|
136
136
|
*/
|
|
137
|
-
rating:
|
|
137
|
+
rating: 1 | 2 | 3;
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
140
|
* Marked as private
|
|
@@ -168,63 +168,43 @@ export type ProductEntry = {
|
|
|
168
168
|
additionalPro?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
169
169
|
additionalSeller?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
170
170
|
};
|
|
171
|
-
additionalUser: string;
|
|
172
|
-
additionalUserPrice: number;
|
|
171
|
+
// additionalUser: string;
|
|
172
|
+
// additionalUserPrice: number;
|
|
173
173
|
};
|
|
174
174
|
|
|
175
175
|
export type ProductReference = {
|
|
176
176
|
classic: ProductEntry;
|
|
177
177
|
plus: ProductEntry;
|
|
178
178
|
standard: ProductEntry;
|
|
179
|
+
test_1: ProductEntry;
|
|
180
|
+
test_2: ProductEntry;
|
|
181
|
+
test_3: ProductEntry;
|
|
182
|
+
test_4: ProductEntry;
|
|
179
183
|
};
|
|
180
184
|
|
|
181
|
-
export type
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
additionalSeller?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
191
|
-
};
|
|
192
|
-
prices: {
|
|
193
|
-
monthly: string;
|
|
194
|
-
additionalUser: string;
|
|
195
|
-
};
|
|
196
|
-
additionalUserPrice: number;
|
|
197
|
-
};
|
|
198
|
-
plus: {
|
|
199
|
-
id: string;
|
|
200
|
-
tax_rates: string[];
|
|
201
|
-
tariffs: {
|
|
202
|
-
base: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
203
|
-
additionalAdmin?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
204
|
-
additionalAgent?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
205
|
-
additionalPro?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
206
|
-
additionalSeller?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
207
|
-
};
|
|
208
|
-
prices: {
|
|
209
|
-
monthly: string;
|
|
210
|
-
additionalUser: string;
|
|
211
|
-
};
|
|
212
|
-
additionalUserPrice: number;
|
|
213
|
-
};
|
|
214
|
-
classic: {
|
|
215
|
-
id: string;
|
|
216
|
-
tax_rates: string[];
|
|
217
|
-
tariffs: {
|
|
218
|
-
base: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
219
|
-
additionalAdmin?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
220
|
-
additionalAgent?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
221
|
-
additionalPro?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
222
|
-
additionalSeller?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
223
|
-
};
|
|
224
|
-
prices: {
|
|
225
|
-
monthly: string;
|
|
226
|
-
additionalUser: string;
|
|
227
|
-
};
|
|
228
|
-
additionalUserPrice: number;
|
|
185
|
+
export type ProductCreationEntry = {
|
|
186
|
+
id: string;
|
|
187
|
+
tax_rates: string[];
|
|
188
|
+
tariffs: {
|
|
189
|
+
base: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
190
|
+
additionalAdmin?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
191
|
+
additionalAgent?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
192
|
+
additionalPro?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
193
|
+
additionalSeller?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
229
194
|
};
|
|
195
|
+
// prices: {
|
|
196
|
+
// monthly: string;
|
|
197
|
+
// additionalUser: string;
|
|
198
|
+
// };
|
|
199
|
+
// additionalUserPrice: number;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export type ProductCreationParams = {
|
|
203
|
+
standard: ProductCreationEntry;
|
|
204
|
+
plus: ProductCreationEntry;
|
|
205
|
+
classic: ProductCreationEntry;
|
|
206
|
+
test_1: ProductCreationEntry;
|
|
207
|
+
test_2: ProductCreationEntry;
|
|
208
|
+
test_3: ProductCreationEntry;
|
|
209
|
+
test_4: ProductCreationEntry;
|
|
230
210
|
};
|
package/src/types.ts
CHANGED
|
@@ -46,7 +46,8 @@ export type ResourceType =
|
|
|
46
46
|
| OperationCatalog
|
|
47
47
|
| Nomenclature
|
|
48
48
|
| Operation
|
|
49
|
-
| OperationV2
|
|
49
|
+
| OperationV2
|
|
50
|
+
| OperationsGroup;
|
|
50
51
|
|
|
51
52
|
/**
|
|
52
53
|
* Add timestampable behavior to any resource
|
|
@@ -176,13 +177,13 @@ export interface Enterprise extends Resource {
|
|
|
176
177
|
* Current subscription status
|
|
177
178
|
*/
|
|
178
179
|
status:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
180
|
+
| 'incomplete'
|
|
181
|
+
| 'incomplete_expired'
|
|
182
|
+
| 'trialing'
|
|
183
|
+
| 'active'
|
|
184
|
+
| 'past_due'
|
|
185
|
+
| 'canceled'
|
|
186
|
+
| 'unpaid';
|
|
186
187
|
|
|
187
188
|
/**
|
|
188
189
|
* Kind of forfait
|
|
@@ -229,12 +230,6 @@ export interface Enterprise extends Resource {
|
|
|
229
230
|
*/
|
|
230
231
|
default_payment_method?: string;
|
|
231
232
|
|
|
232
|
-
/**
|
|
233
|
-
* Number of users contained within the subscription. This number will be used to calculate
|
|
234
|
-
* the amount to pay for additional user
|
|
235
|
-
*/
|
|
236
|
-
totalUsers: number;
|
|
237
|
-
|
|
238
233
|
/**
|
|
239
234
|
* Number of admin users contained within the subscription. This number will be used to calculate
|
|
240
235
|
* the amount to pay for additional admin user
|
|
@@ -312,13 +307,13 @@ export interface Enterprise extends Resource {
|
|
|
312
307
|
* state of subscription
|
|
313
308
|
*/
|
|
314
309
|
status:
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
310
|
+
| 'incomplete'
|
|
311
|
+
| 'incomplete_expired'
|
|
312
|
+
| 'trialing'
|
|
313
|
+
| 'active'
|
|
314
|
+
| 'past_due'
|
|
315
|
+
| 'canceled'
|
|
316
|
+
| 'unpaid';
|
|
322
317
|
};
|
|
323
318
|
|
|
324
319
|
insurance?: string;
|
|
@@ -331,22 +326,7 @@ export interface Enterprise extends Resource {
|
|
|
331
326
|
/**
|
|
332
327
|
*
|
|
333
328
|
*/
|
|
334
|
-
bankInfo?:
|
|
335
|
-
/**
|
|
336
|
-
* IBAN identifier
|
|
337
|
-
*/
|
|
338
|
-
iban: string;
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* BIC identifier
|
|
342
|
-
*/
|
|
343
|
-
bic: string;
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Account owner name
|
|
347
|
-
*/
|
|
348
|
-
holder: string;
|
|
349
|
-
};
|
|
329
|
+
bankInfo?: BankDetails[];
|
|
350
330
|
|
|
351
331
|
notificationEstimation?: string[];
|
|
352
332
|
|
|
@@ -364,6 +344,43 @@ export interface Enterprise extends Resource {
|
|
|
364
344
|
* Geographical area covered, used in bills PDF data
|
|
365
345
|
*/
|
|
366
346
|
areaCovered?: string;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Enterprise currency
|
|
350
|
+
*/
|
|
351
|
+
currency?: string;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Enterprise strategy on materials margins
|
|
355
|
+
*/
|
|
356
|
+
strategy?: string;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export interface BankDetails {
|
|
360
|
+
/**
|
|
361
|
+
* bank details selected by default
|
|
362
|
+
*/
|
|
363
|
+
default: boolean;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Title identifier
|
|
367
|
+
*/
|
|
368
|
+
title: string;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* IBAN identifier
|
|
372
|
+
*/
|
|
373
|
+
iban: string;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* BIC identifier
|
|
377
|
+
*/
|
|
378
|
+
bic: string;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Account owner name
|
|
382
|
+
*/
|
|
383
|
+
holder: string;
|
|
367
384
|
}
|
|
368
385
|
|
|
369
386
|
/**
|
|
@@ -751,6 +768,11 @@ export interface Provider extends Resource {
|
|
|
751
768
|
* Quantity of projects with this provider
|
|
752
769
|
*/
|
|
753
770
|
projects?: number;
|
|
771
|
+
|
|
772
|
+
/**
|
|
773
|
+
* The distribution of materials margins
|
|
774
|
+
*/
|
|
775
|
+
materialsMargins: Commissions;
|
|
754
776
|
}
|
|
755
777
|
|
|
756
778
|
/**
|
|
@@ -871,7 +893,6 @@ export interface Operation extends Resource {
|
|
|
871
893
|
export interface Project extends Resource {
|
|
872
894
|
name: string;
|
|
873
895
|
image?: File;
|
|
874
|
-
type: ProjectTypeEnum;
|
|
875
896
|
category: ProjectCategoriesEnum;
|
|
876
897
|
surface: number;
|
|
877
898
|
address: string;
|
|
@@ -893,16 +914,6 @@ export interface Project extends Resource {
|
|
|
893
914
|
*/
|
|
894
915
|
progress?: number;
|
|
895
916
|
|
|
896
|
-
/**
|
|
897
|
-
* Project parent (only for child projects)
|
|
898
|
-
*/
|
|
899
|
-
parent?: string | Project;
|
|
900
|
-
|
|
901
|
-
/**
|
|
902
|
-
* Children projects (only for compound projects)
|
|
903
|
-
*/
|
|
904
|
-
children?: (string | Project)[];
|
|
905
|
-
|
|
906
917
|
/**
|
|
907
918
|
* For whom this project is?
|
|
908
919
|
*/
|
|
@@ -1193,7 +1204,12 @@ export interface Material extends Resource {
|
|
|
1193
1204
|
name: string;
|
|
1194
1205
|
|
|
1195
1206
|
/**
|
|
1196
|
-
*
|
|
1207
|
+
* Price without discount
|
|
1208
|
+
*/
|
|
1209
|
+
basePrice: number
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* The material unit price with discount
|
|
1197
1213
|
*/
|
|
1198
1214
|
unitPrice: number;
|
|
1199
1215
|
|
|
@@ -1247,6 +1263,14 @@ export interface Material extends Resource {
|
|
|
1247
1263
|
* Custom reference defined by user
|
|
1248
1264
|
*/
|
|
1249
1265
|
reference?: string;
|
|
1266
|
+
|
|
1267
|
+
discount?: {
|
|
1268
|
+
id: string,
|
|
1269
|
+
value: number,
|
|
1270
|
+
label: string
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
supplier?: string
|
|
1250
1274
|
}
|
|
1251
1275
|
|
|
1252
1276
|
export interface DevisMaterial extends Material {
|
|
@@ -1361,14 +1385,22 @@ export interface DevisOperation extends Resource {
|
|
|
1361
1385
|
price: number;
|
|
1362
1386
|
|
|
1363
1387
|
/**
|
|
1364
|
-
*
|
|
1388
|
+
* Piece, example: bathroom, kitchen
|
|
1365
1389
|
*/
|
|
1366
|
-
|
|
1390
|
+
piece: string;
|
|
1367
1391
|
|
|
1368
1392
|
/**
|
|
1369
|
-
*
|
|
1393
|
+
* Lot from nomenclature
|
|
1370
1394
|
*/
|
|
1371
|
-
|
|
1395
|
+
lot?: {
|
|
1396
|
+
label: string,
|
|
1397
|
+
color: string
|
|
1398
|
+
};
|
|
1399
|
+
|
|
1400
|
+
/**
|
|
1401
|
+
* Surface old devis and operations
|
|
1402
|
+
*/
|
|
1403
|
+
surface?: string
|
|
1372
1404
|
|
|
1373
1405
|
/**
|
|
1374
1406
|
* Unit, example: m2, cm3
|
|
@@ -1527,6 +1559,31 @@ export interface Devis extends Resource {
|
|
|
1527
1559
|
provider: { percent: number; value: number };
|
|
1528
1560
|
enterprise: { percent: number; value: number };
|
|
1529
1561
|
};
|
|
1562
|
+
|
|
1563
|
+
/************************************ V2 ************************************/
|
|
1564
|
+
materialsCatalogs?: Array<string>;
|
|
1565
|
+
|
|
1566
|
+
operationsCatalog?: string;
|
|
1567
|
+
|
|
1568
|
+
history?: DevisHistoryItem[]
|
|
1569
|
+
|
|
1570
|
+
archived?: boolean
|
|
1571
|
+
|
|
1572
|
+
systemVersion?: number
|
|
1573
|
+
|
|
1574
|
+
format?: DevisFormatEnum
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
export enum DevisHistoryType {
|
|
1578
|
+
CHANGE_STATUS = 'CHANGE_STATUS',
|
|
1579
|
+
SENT_TO_CLIENT = 'SENT_TO_CLIENT'
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
export interface DevisHistoryItem {
|
|
1583
|
+
date: Date
|
|
1584
|
+
user: string
|
|
1585
|
+
type: DevisHistoryType
|
|
1586
|
+
data: any
|
|
1530
1587
|
}
|
|
1531
1588
|
|
|
1532
1589
|
/**
|
|
@@ -1570,9 +1627,13 @@ export interface DevisTemplate extends Resource {
|
|
|
1570
1627
|
materialsProvider?: Array<string>;
|
|
1571
1628
|
|
|
1572
1629
|
/**
|
|
1573
|
-
*
|
|
1630
|
+
* Operations catalog assigned to devis
|
|
1574
1631
|
*/
|
|
1575
|
-
|
|
1632
|
+
operationsCatalog: string
|
|
1633
|
+
|
|
1634
|
+
systemVersion?: number
|
|
1635
|
+
|
|
1636
|
+
format?: DevisFormatEnum
|
|
1576
1637
|
}
|
|
1577
1638
|
|
|
1578
1639
|
/**
|
|
@@ -2516,7 +2577,6 @@ export interface OperationCatalog extends Resource {
|
|
|
2516
2577
|
value: number;
|
|
2517
2578
|
}>;
|
|
2518
2579
|
description?: string;
|
|
2519
|
-
materialsProvider?: Array<string>;
|
|
2520
2580
|
image?: File | null;
|
|
2521
2581
|
}
|
|
2522
2582
|
|
|
@@ -2529,6 +2589,9 @@ export interface Nomenclature extends Resource {
|
|
|
2529
2589
|
order?: number;
|
|
2530
2590
|
activeForPro?: boolean;
|
|
2531
2591
|
setProjectDate?: boolean;
|
|
2592
|
+
label?: string;
|
|
2593
|
+
text?: string;
|
|
2594
|
+
visibleBy?: ROLE[];
|
|
2532
2595
|
}
|
|
2533
2596
|
|
|
2534
2597
|
export enum NomenclaturesIdentifier {
|
|
@@ -2539,6 +2602,12 @@ export enum NomenclaturesIdentifier {
|
|
|
2539
2602
|
PROJECTS_CATEGORY = 'PROJECTS_CATEGORY',
|
|
2540
2603
|
TVA = 'TVA',
|
|
2541
2604
|
SUPPLIERS = 'SUPPLIERS',
|
|
2605
|
+
DISCOUNTS = 'DISCOUNTS',
|
|
2606
|
+
TERMS_OF_SALE = 'TERMS_OF_SALE',
|
|
2607
|
+
NOTES_MODELS = 'NOTES_MODELS',
|
|
2608
|
+
DEVIS_TYPES = 'DEVIS_TYPES',
|
|
2609
|
+
COMMENTS_MODELS = 'COMMENTS_MODELS',
|
|
2610
|
+
EMAILS_COMMENTS_MODELS = 'EMAILS_COMMENTS_MODELS',
|
|
2542
2611
|
}
|
|
2543
2612
|
|
|
2544
2613
|
/**
|
|
@@ -2563,7 +2632,7 @@ export interface OperationV2 extends Resource {
|
|
|
2563
2632
|
/**
|
|
2564
2633
|
* The operation unit price
|
|
2565
2634
|
*/
|
|
2566
|
-
|
|
2635
|
+
unitPrice: number;
|
|
2567
2636
|
|
|
2568
2637
|
/**
|
|
2569
2638
|
* The operation unit
|
|
@@ -2659,6 +2728,7 @@ export interface OperationV2Material extends Material {
|
|
|
2659
2728
|
responsible: string;
|
|
2660
2729
|
fixed: boolean;
|
|
2661
2730
|
optId: string;
|
|
2731
|
+
complement?: string
|
|
2662
2732
|
}
|
|
2663
2733
|
|
|
2664
2734
|
export enum MaterialResponsible {
|
|
@@ -2674,3 +2744,15 @@ export enum ProjectPriceTypeEnum {
|
|
|
2674
2744
|
prospected = 'prospected',
|
|
2675
2745
|
rejected = 'rejected',
|
|
2676
2746
|
}
|
|
2747
|
+
|
|
2748
|
+
export enum DevisFormatEnum {
|
|
2749
|
+
PIECE = 'PIECE',
|
|
2750
|
+
LOT = 'LOT'
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
export interface OperationsGroup extends Resource {
|
|
2754
|
+
name: string;
|
|
2755
|
+
status: boolean;
|
|
2756
|
+
operationsCatalog: string;
|
|
2757
|
+
operations: string[];
|
|
2758
|
+
}
|