@placeshakr/config 10.19.0-alpha.5 → 10.19.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 +232 -73
- 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 +232 -73
- 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 +3 -0
- package/dist/environment/types.d.ts.map +1 -1
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +3 -2
- 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 +179 -3
- package/dist/plans/types.d.ts.map +1 -1
- package/dist/types.d.ts +57 -6
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -12
- package/src/environment/base.ts +19 -6
- package/src/environment/decorators.ts +3 -1
- package/src/environment/types.ts +4 -1
- package/src/helpers/index.ts +2 -0
- package/src/helpers/uid.ts +1 -1
- package/src/plans/base.ts +65 -38
- package/src/plans/index.ts +46 -20
- package/src/plans/types.ts +91 -3
- package/src/types.ts +127 -67
- package/CHANGELOG.md +0 -1949
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@placeshakr/config",
|
|
3
|
-
"version": "10.19.0
|
|
3
|
+
"version": "10.19.0",
|
|
4
4
|
"description": "Articho configuration module",
|
|
5
5
|
"author": "Ibrael Espinosa <ibrael@placeshaker.fr>",
|
|
6
6
|
"homepage": "https://github.com/placeshaker/articho#readme",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"src"
|
|
23
23
|
],
|
|
24
24
|
"engines": {
|
|
25
|
-
"node": ">=
|
|
25
|
+
"node": ">=14"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"start": "tsdx watch",
|
|
@@ -32,17 +32,14 @@
|
|
|
32
32
|
"lint": "tsdx lint --fix",
|
|
33
33
|
"prepare": "tsdx build"
|
|
34
34
|
},
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"pre-commit": "tsdx lint"
|
|
38
|
-
}
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"react-i18next": "^11.15.3"
|
|
39
37
|
},
|
|
40
38
|
"devDependencies": {
|
|
41
|
-
"
|
|
42
|
-
"rollup
|
|
39
|
+
"husky": "^7.0.4",
|
|
40
|
+
"rollup": "^2.62.0",
|
|
41
|
+
"rollup-plugin-typescript2": "^0.31.1",
|
|
42
|
+
"ts-type": "^2.1.2"
|
|
43
43
|
},
|
|
44
|
-
"
|
|
45
|
-
"husky": "^4.3.8"
|
|
46
|
-
},
|
|
47
|
-
"gitHead": "745caa80a5e95c6d5186c7095373c7a4ca0eaf99"
|
|
44
|
+
"gitHead": "120420a5e68ed21bdf8d5b659dcfe9eb095d2a29"
|
|
48
45
|
}
|
package/src/environment/base.ts
CHANGED
|
@@ -66,7 +66,8 @@ const productionEnvironment: Environment = {
|
|
|
66
66
|
histories: 'enterprises/{enterpriseId}/histories',
|
|
67
67
|
receptionVouchers: 'enterprises/{enterpriseId}/projects/{projectId}/receptionVouchers',
|
|
68
68
|
indexes: 'enterprises/{enterpriseId}/indexes',
|
|
69
|
-
notifications: 'enterprises/{enterpriseId}/notifications'
|
|
69
|
+
notifications: 'enterprises/{enterpriseId}/notifications',
|
|
70
|
+
nomenclatures: 'enterprises/{enterpriseId}/nomenclatures'
|
|
70
71
|
},
|
|
71
72
|
docs: {
|
|
72
73
|
user: 'users/{userId}',
|
|
@@ -118,7 +119,8 @@ const productionEnvironment: Environment = {
|
|
|
118
119
|
userNotification: 'users/{userId}/profiles/{enterpriseId}/notifications/{notificationId}',
|
|
119
120
|
history: 'enterprises/{enterpriseId}/histories/{historyId}',
|
|
120
121
|
receptionVouchers: 'enterprises/{enterpriseId}/projects/{projectId}/receptionVouchers/{receptionVoucherId}',
|
|
121
|
-
notification: 'enterprises/{enterpriseId}/notifications/{notificationId}'
|
|
122
|
+
notification: 'enterprises/{enterpriseId}/notifications/{notificationId}',
|
|
123
|
+
nomenclatures: 'enterprises/{enterpriseId}/nomenclatures/{nomenclatureId}',
|
|
122
124
|
},
|
|
123
125
|
indexes: {
|
|
124
126
|
users: 'users',
|
|
@@ -163,6 +165,7 @@ const productionEnvironment: Environment = {
|
|
|
163
165
|
systemOperationsMaterials: 'system-operations-materials',
|
|
164
166
|
systemMaterialsProvider: 'system-materials-provider',
|
|
165
167
|
systemStatus: 'system-status',
|
|
168
|
+
systemNomenclatures: 'system-nomenclatures',
|
|
166
169
|
systemCategories: 'system-categories'
|
|
167
170
|
},
|
|
168
171
|
},
|
|
@@ -576,6 +579,16 @@ const productionEnvironment: Environment = {
|
|
|
576
579
|
maxValuesPerFacet: 1000,
|
|
577
580
|
maxFacetHits: 100
|
|
578
581
|
},
|
|
582
|
+
systemNomenclatures: {
|
|
583
|
+
searchableAttributes: ['identifier', 'value'],
|
|
584
|
+
attributesForFaceting: [
|
|
585
|
+
'searchable(identifier)',
|
|
586
|
+
'searchable(status)'
|
|
587
|
+
],
|
|
588
|
+
ranking: ['desc(updatedAt)'],
|
|
589
|
+
maxValuesPerFacet: 1000,
|
|
590
|
+
maxFacetHits: 100
|
|
591
|
+
},
|
|
579
592
|
billing: {
|
|
580
593
|
attributesForFaceting: [
|
|
581
594
|
'searchable(scope)',
|
|
@@ -666,17 +679,17 @@ const productionEnvironment: Environment = {
|
|
|
666
679
|
maxFacetHits: 100
|
|
667
680
|
},
|
|
668
681
|
nomenclatures: {
|
|
669
|
-
searchableAttributes: ['
|
|
682
|
+
searchableAttributes: ['value'],
|
|
670
683
|
attributesForFaceting: [
|
|
671
684
|
'searchable(scope)',
|
|
672
685
|
'searchable(identifier)',
|
|
673
686
|
'searchable(status)',
|
|
674
687
|
],
|
|
675
|
-
ranking: ['asc(
|
|
688
|
+
ranking: ['asc(value)'],
|
|
676
689
|
maxValuesPerFacet: 1000,
|
|
677
690
|
maxFacetHits: 100
|
|
678
|
-
}
|
|
691
|
+
}
|
|
679
692
|
},
|
|
680
693
|
};
|
|
681
694
|
|
|
682
|
-
export default productionEnvironment;
|
|
695
|
+
export default productionEnvironment;
|
|
@@ -59,6 +59,7 @@ const test: EnvironmentDecorator = (base: Environment) => ({
|
|
|
59
59
|
systemOperationsMaterials: 'system-operations-materials',
|
|
60
60
|
systemMaterialsProvider: 'system-materials-provider',
|
|
61
61
|
systemStatus: 'test-system-status',
|
|
62
|
+
systemNomenclatures: 'test-system-nomenclatures',
|
|
62
63
|
systemCategories: 'system-categories'
|
|
63
64
|
},
|
|
64
65
|
},
|
|
@@ -113,6 +114,7 @@ const emulator: EnvironmentDecorator = (base: Environment) => ({
|
|
|
113
114
|
systemOperationsMaterials: 'system-operations-materials',
|
|
114
115
|
systemMaterialsProvider: 'system-materials-provider',
|
|
115
116
|
systemStatus: 'emulator-system-status',
|
|
117
|
+
systemNomenclatures: 'emulator-system-nomenclatures',
|
|
116
118
|
systemCategories: 'system-categories'
|
|
117
119
|
},
|
|
118
120
|
},
|
|
@@ -120,4 +122,4 @@ const emulator: EnvironmentDecorator = (base: Environment) => ({
|
|
|
120
122
|
name: 'emulator',
|
|
121
123
|
});
|
|
122
124
|
|
|
123
|
-
export { dev, staging, test, emulator };
|
|
125
|
+
export { dev, staging, test, emulator };
|
package/src/environment/types.ts
CHANGED
|
@@ -73,6 +73,7 @@ export interface Environment {
|
|
|
73
73
|
systemOperationsMaterials: string;
|
|
74
74
|
systemMaterialsProvider: string;
|
|
75
75
|
systemStatus: string;
|
|
76
|
+
systemNomenclatures: string;
|
|
76
77
|
systemCategories: string;
|
|
77
78
|
};
|
|
78
79
|
collections: {
|
|
@@ -111,6 +112,7 @@ export interface Environment {
|
|
|
111
112
|
receptionVouchers: string;
|
|
112
113
|
indexes: string;
|
|
113
114
|
notifications: string;
|
|
115
|
+
nomenclatures: string;
|
|
114
116
|
};
|
|
115
117
|
docs: {
|
|
116
118
|
user: string;
|
|
@@ -151,6 +153,7 @@ export interface Environment {
|
|
|
151
153
|
history: string;
|
|
152
154
|
receptionVouchers: string;
|
|
153
155
|
notification: string;
|
|
156
|
+
nomenclatures: string;
|
|
154
157
|
};
|
|
155
158
|
};
|
|
156
159
|
|
|
@@ -159,4 +162,4 @@ export interface Environment {
|
|
|
159
162
|
};
|
|
160
163
|
}
|
|
161
164
|
|
|
162
|
-
export type EnvironmentDecorator = (base: Environment) => Environment;
|
|
165
|
+
export type EnvironmentDecorator = (base: Environment) => Environment;
|
package/src/helpers/index.ts
CHANGED
|
@@ -34,6 +34,7 @@ export interface Helpers {
|
|
|
34
34
|
downPayment: FactoryCreate<articho.DownPayment>;
|
|
35
35
|
histories: FactoryCreate<articho.History>;
|
|
36
36
|
receptionVoucher: FactoryCreate<articho.ReceptionVoucher>;
|
|
37
|
+
nomenclatures: FactoryCreate<articho.Nomenclature>;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
/**
|
|
@@ -81,6 +82,7 @@ const helpers: Helpers = {
|
|
|
81
82
|
downPayment: FactoryCreateFunction(),
|
|
82
83
|
histories: FactoryCreateFunction(),
|
|
83
84
|
receptionVoucher: FactoryCreateFunction(),
|
|
85
|
+
nomenclatures: FactoryCreateFunction()
|
|
84
86
|
};
|
|
85
87
|
|
|
86
88
|
export default helpers;
|
package/src/helpers/uid.ts
CHANGED
|
@@ -94,7 +94,7 @@ export const uid: IUID = {
|
|
|
94
94
|
timestamp: (function () {
|
|
95
95
|
return function (id: string, asDate?: boolean): number | Date {
|
|
96
96
|
let time = 0;
|
|
97
|
-
const data = id.
|
|
97
|
+
const data = id.substring(0, 8);
|
|
98
98
|
|
|
99
99
|
for (let i = 0; i < 8; i++) {
|
|
100
100
|
time = time * 62 + ASCII_CHARS.indexOf(data[i]);
|
package/src/plans/base.ts
CHANGED
|
@@ -11,24 +11,35 @@ const createProducts = (params: ProductCreationParams): ProductReference => {
|
|
|
11
11
|
id: params.standard.id,
|
|
12
12
|
internal: 'standard',
|
|
13
13
|
product: {
|
|
14
|
-
|
|
15
|
-
active: true,
|
|
16
|
-
description: 'Pour les entreprises unipersonnelles',
|
|
17
|
-
id: params.plus.id,
|
|
14
|
+
id: params.standard.id,
|
|
18
15
|
name: 'Standard',
|
|
16
|
+
description: 'Pour les entreprises unipersonnelles',
|
|
19
17
|
type: 'service',
|
|
18
|
+
price: 69,
|
|
20
19
|
main: true,
|
|
20
|
+
active: true,
|
|
21
|
+
isPrivate: true,
|
|
21
22
|
rating: 1,
|
|
22
23
|
order: 1,
|
|
23
24
|
includes: {
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
maxAdminUsers: null,
|
|
26
|
+
maxAgentUsers: null,
|
|
27
|
+
maxProUsers: null,
|
|
28
|
+
maxSellerUsers: null,
|
|
29
|
+
authorizationManagement: true,
|
|
30
|
+
dashboard: true,
|
|
26
31
|
accounting: true,
|
|
32
|
+
projectStorage: true,
|
|
33
|
+
customCatalog: true,
|
|
34
|
+
customConfig: true,
|
|
35
|
+
exportReports: true,
|
|
36
|
+
externalApiIntegration: true,
|
|
37
|
+
support: true,
|
|
27
38
|
},
|
|
28
|
-
plans:
|
|
29
|
-
|
|
39
|
+
plans: Object.values(params.standard.tariffs).map(t => t.id),
|
|
30
40
|
tax_rates: params.standard.tax_rates,
|
|
31
41
|
},
|
|
42
|
+
tariffs: params.standard.tariffs,
|
|
32
43
|
additionalUser: params.standard.prices.additionalUser,
|
|
33
44
|
additionalUserPrice: params.standard.additionalUserPrice,
|
|
34
45
|
},
|
|
@@ -36,56 +47,72 @@ const createProducts = (params: ProductCreationParams): ProductReference => {
|
|
|
36
47
|
id: params.plus.id,
|
|
37
48
|
internal: 'plus',
|
|
38
49
|
product: {
|
|
39
|
-
active: true,
|
|
40
|
-
description:
|
|
41
|
-
'Idéal pour les agences et les entreprises de plus grande taille',
|
|
42
50
|
id: params.plus.id,
|
|
43
51
|
name: 'Plus',
|
|
52
|
+
description: 'Idéal pour les agences et les entreprises de plus grande taille',
|
|
44
53
|
type: 'service',
|
|
45
|
-
|
|
54
|
+
price: 159,
|
|
46
55
|
main: true,
|
|
47
|
-
|
|
48
|
-
|
|
56
|
+
active: true,
|
|
57
|
+
isPrivate: true,
|
|
58
|
+
rating: 2,
|
|
59
|
+
order: 2,
|
|
49
60
|
includes: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
maxAdminUsers: null,
|
|
62
|
+
maxAgentUsers: null,
|
|
63
|
+
maxProUsers: null,
|
|
64
|
+
maxSellerUsers: null,
|
|
65
|
+
authorizationManagement: true,
|
|
66
|
+
dashboard: true,
|
|
53
67
|
accounting: true,
|
|
68
|
+
projectStorage: true,
|
|
69
|
+
customCatalog: true,
|
|
70
|
+
customConfig: true,
|
|
71
|
+
exportReports: true,
|
|
72
|
+
externalApiIntegration: true,
|
|
73
|
+
support: true,
|
|
54
74
|
},
|
|
75
|
+
plans: Object.values(params.plus.tariffs).map(t => t.id),
|
|
55
76
|
tax_rates: params.plus.tax_rates,
|
|
56
|
-
plans: [params.plus.prices.monthly],
|
|
57
77
|
},
|
|
78
|
+
tariffs: params.plus.tariffs,
|
|
58
79
|
additionalUser: params.plus.prices.additionalUser,
|
|
59
80
|
additionalUserPrice: params.plus.additionalUserPrice,
|
|
60
81
|
},
|
|
61
|
-
|
|
62
|
-
id: params.
|
|
63
|
-
internal: '
|
|
82
|
+
classic: {
|
|
83
|
+
id: params.classic.id,
|
|
84
|
+
internal: 'classic',
|
|
64
85
|
product: {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
id: params.premium.id,
|
|
69
|
-
name: 'Premium',
|
|
86
|
+
id: params.classic.id,
|
|
87
|
+
name: 'Abonnement Articho',
|
|
88
|
+
description: '',
|
|
70
89
|
type: 'service',
|
|
71
|
-
|
|
90
|
+
price: 159,
|
|
72
91
|
main: true,
|
|
92
|
+
active: true,
|
|
73
93
|
rating: 3,
|
|
74
|
-
|
|
75
|
-
price: 29900,
|
|
76
|
-
order: 2,
|
|
94
|
+
order: 3,
|
|
77
95
|
includes: {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
96
|
+
maxAdminUsers: 1,
|
|
97
|
+
maxAgentUsers: 0,
|
|
98
|
+
maxProUsers: 0,
|
|
99
|
+
maxSellerUsers: 0,
|
|
100
|
+
authorizationManagement: true,
|
|
101
|
+
dashboard: true,
|
|
82
102
|
accounting: true,
|
|
83
|
-
|
|
103
|
+
projectStorage: true,
|
|
104
|
+
customCatalog: true,
|
|
105
|
+
customConfig: true,
|
|
106
|
+
exportReports: true,
|
|
107
|
+
externalApiIntegration: true,
|
|
108
|
+
support: true,
|
|
84
109
|
},
|
|
85
|
-
plans:
|
|
110
|
+
plans: Object.values(params.classic.tariffs).map(t => t.id),
|
|
111
|
+
tax_rates: params.classic.tax_rates,
|
|
86
112
|
},
|
|
87
|
-
|
|
88
|
-
|
|
113
|
+
tariffs: params.classic.tariffs,
|
|
114
|
+
additionalUser: params.classic.prices.additionalUser,
|
|
115
|
+
additionalUserPrice: params.classic.additionalUserPrice,
|
|
89
116
|
},
|
|
90
117
|
};
|
|
91
118
|
|
package/src/plans/index.ts
CHANGED
|
@@ -13,31 +13,44 @@ export { Product, ProductEntry, SubscriptionSettings };
|
|
|
13
13
|
|
|
14
14
|
const testing: ProductCreationParams = {
|
|
15
15
|
standard: {
|
|
16
|
-
id: '
|
|
16
|
+
id: 'prod_KzmEyS3UQ5lbnz',
|
|
17
17
|
tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
|
|
18
|
+
tariffs: {
|
|
19
|
+
base: { id: 'price_1KJmg4LFzcsAA7x6SMfj1iDu', price: 69, usageType: 'licensed', type: 'base' },
|
|
20
|
+
},
|
|
18
21
|
prices: {
|
|
19
|
-
monthly: '
|
|
20
|
-
additionalUser: '
|
|
22
|
+
monthly: 'price_1KJmg4LFzcsAA7x6SMfj1iDu',
|
|
23
|
+
additionalUser: 'price_1KJmg4LFzcsAA7x6yzvGdoxe',
|
|
21
24
|
},
|
|
22
|
-
additionalUserPrice:
|
|
25
|
+
additionalUserPrice: 10,
|
|
23
26
|
},
|
|
24
27
|
plus: {
|
|
25
|
-
id: '
|
|
28
|
+
id: 'prod_KzmyY1ysEOeK93',
|
|
26
29
|
tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
|
|
30
|
+
tariffs: {
|
|
31
|
+
base: { id: 'price_1KJnP0LFzcsAA7x6oDVeaPAv', price: 159, usageType: 'licensed', type: 'base' },
|
|
32
|
+
},
|
|
27
33
|
prices: {
|
|
28
|
-
monthly: '
|
|
29
|
-
additionalUser: '
|
|
34
|
+
monthly: 'price_1KJnP0LFzcsAA7x6oDVeaPAv',
|
|
35
|
+
additionalUser: 'price_1KJnP0LFzcsAA7x6s3rO71QX',
|
|
30
36
|
},
|
|
31
|
-
additionalUserPrice:
|
|
37
|
+
additionalUserPrice: 5,
|
|
32
38
|
},
|
|
33
|
-
|
|
34
|
-
id: '
|
|
39
|
+
classic: {
|
|
40
|
+
id: 'prod_KzmO4rORyWl8cA',
|
|
35
41
|
tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
|
|
42
|
+
tariffs: {
|
|
43
|
+
base: { id: 'price_1KJmpiLFzcsAA7x6rLA0GNZX', price: 159, usageType: 'licensed', type: 'base' },
|
|
44
|
+
additionalAdmin: { id: 'price_1KJmpiLFzcsAA7x6VtCIuhqw', price: 30, usageType: 'metered', type: 'extra_user' },
|
|
45
|
+
additionalAgent: { id: 'price_1KJmpiLFzcsAA7x6gFBgAXkr', price: 20, usageType: 'metered', type: 'extra_user' },
|
|
46
|
+
additionalPro: { id: 'price_1KJmpiLFzcsAA7x6JxTnlLC8', price: 10, usageType: 'metered', type: 'extra_user' },
|
|
47
|
+
additionalSeller: { id: 'price_1KJmpiLFzcsAA7x6XS9PBgQo', price: 2, usageType: 'metered', type: 'extra_user' },
|
|
48
|
+
},
|
|
36
49
|
prices: {
|
|
37
|
-
monthly: '
|
|
38
|
-
additionalUser: '
|
|
50
|
+
monthly: 'price_1KJmpiLFzcsAA7x6rLA0GNZX',
|
|
51
|
+
additionalUser: 'price_1KJmpiLFzcsAA7x6VtCIuhqw',
|
|
39
52
|
},
|
|
40
|
-
additionalUserPrice:
|
|
53
|
+
additionalUserPrice: 30,
|
|
41
54
|
},
|
|
42
55
|
};
|
|
43
56
|
|
|
@@ -45,29 +58,42 @@ const production: ProductCreationParams = {
|
|
|
45
58
|
standard: {
|
|
46
59
|
id: 'prod_HsAwETfIUblsAT',
|
|
47
60
|
tax_rates: ['txr_1HIMA8LFzcsAA7x61nsqfrYU'],
|
|
61
|
+
tariffs: {
|
|
62
|
+
base: { id: 'price_1HIQaILFzcsAA7x6NVk3cJu1', price: 69, usageType: 'licensed', type: 'base' },
|
|
63
|
+
},
|
|
48
64
|
prices: {
|
|
49
65
|
monthly: 'price_1HIQaILFzcsAA7x6NVk3cJu1',
|
|
50
66
|
additionalUser: 'price_1HRQFTLFzcsAA7x6X9wS7JUr',
|
|
51
67
|
},
|
|
52
|
-
additionalUserPrice:
|
|
68
|
+
additionalUserPrice: 10,
|
|
53
69
|
},
|
|
54
70
|
plus: {
|
|
55
71
|
id: 'prod_HsB2YJPEZ9H98c',
|
|
56
72
|
tax_rates: ['txr_1HIMA8LFzcsAA7x61nsqfrYU'],
|
|
73
|
+
tariffs: {
|
|
74
|
+
base: { id: 'price_1HIQg0LFzcsAA7x6X6lfFUdv', price: 159, usageType: 'licensed', type: 'base' },
|
|
75
|
+
},
|
|
57
76
|
prices: {
|
|
58
77
|
monthly: 'price_1HIQg0LFzcsAA7x6X6lfFUdv',
|
|
59
78
|
additionalUser: 'price_1HRg1fLFzcsAA7x6QYbtnty6',
|
|
60
79
|
},
|
|
61
|
-
additionalUserPrice:
|
|
80
|
+
additionalUserPrice: 5,
|
|
62
81
|
},
|
|
63
|
-
|
|
64
|
-
id: '
|
|
82
|
+
classic: {
|
|
83
|
+
id: 'prod_KzmYFhrWXrzWdR',
|
|
65
84
|
tax_rates: ['txr_1HIMA8LFzcsAA7x61nsqfrYU'],
|
|
85
|
+
tariffs: {
|
|
86
|
+
base: { id: 'price_1KJmzNLFzcsAA7x6I6gNlCpY', price: 159, usageType: 'licensed', type: 'base' },
|
|
87
|
+
additionalAdmin: { id: 'price_1KJmzNLFzcsAA7x6Tl6D8Wus', price: 30, usageType: 'metered', type: 'extra_user' },
|
|
88
|
+
additionalAgent: { id: 'price_1KJmzNLFzcsAA7x6DeUQScKY', price: 20, usageType: 'metered', type: 'extra_user' },
|
|
89
|
+
additionalPro: { id: 'price_1KJmzNLFzcsAA7x695wsj6rA', price: 10, usageType: 'metered', type: 'extra_user' },
|
|
90
|
+
additionalSeller: { id: 'price_1KJmzNLFzcsAA7x6gF62MX41', price: 2, usageType: 'metered', type: 'extra_user' },
|
|
91
|
+
},
|
|
66
92
|
prices: {
|
|
67
|
-
monthly: '
|
|
68
|
-
additionalUser: '
|
|
93
|
+
monthly: 'price_1KJmzNLFzcsAA7x6I6gNlCpY',
|
|
94
|
+
additionalUser: 'price_1KJmzNLFzcsAA7x6Tl6D8Wus',
|
|
69
95
|
},
|
|
70
|
-
additionalUserPrice:
|
|
96
|
+
additionalUserPrice: 30,
|
|
71
97
|
},
|
|
72
98
|
};
|
|
73
99
|
|
package/src/plans/types.ts
CHANGED
|
@@ -30,6 +30,61 @@ export interface SubscriptionSettings {
|
|
|
30
30
|
* How many members can have a team
|
|
31
31
|
*/
|
|
32
32
|
maxTeamMembers?: number;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
authorizationManagement?: boolean;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Acces to dashboard
|
|
41
|
+
*/
|
|
42
|
+
dashboard?: boolean;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Acces to projects
|
|
46
|
+
*/
|
|
47
|
+
projectStorage?: boolean;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* This plan allows you to export PDF and Excel reports
|
|
51
|
+
*/
|
|
52
|
+
exportReports?: boolean;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* This plan allows you to customize the settings
|
|
56
|
+
*/
|
|
57
|
+
customConfig?: boolean;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
externalApiIntegration?: boolean;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
support?: boolean
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* How many admins can have a team
|
|
71
|
+
*/
|
|
72
|
+
maxAdminUsers?: number | null;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* How many agents can have a team
|
|
76
|
+
*/
|
|
77
|
+
maxAgentUsers?: number | null;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* How many pros can have a team
|
|
81
|
+
*/
|
|
82
|
+
maxProUsers?: number | null;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* How many sellers can have a team
|
|
86
|
+
*/
|
|
87
|
+
maxSellerUsers?: number | null;
|
|
33
88
|
}
|
|
34
89
|
|
|
35
90
|
export interface Product {
|
|
@@ -81,6 +136,11 @@ export interface Product {
|
|
|
81
136
|
*/
|
|
82
137
|
rating: number;
|
|
83
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Marked as private
|
|
141
|
+
*/
|
|
142
|
+
isPrivate?: boolean;
|
|
143
|
+
|
|
84
144
|
/**
|
|
85
145
|
* Stripe plans associated with this product to be charged automatically
|
|
86
146
|
*/
|
|
@@ -101,20 +161,34 @@ export type ProductEntry = {
|
|
|
101
161
|
id: string;
|
|
102
162
|
internal: string;
|
|
103
163
|
product: Product;
|
|
164
|
+
tariffs: {
|
|
165
|
+
base: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
166
|
+
additionalAdmin?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
167
|
+
additionalAgent?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
168
|
+
additionalPro?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
169
|
+
additionalSeller?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
170
|
+
};
|
|
104
171
|
additionalUser: string;
|
|
105
172
|
additionalUserPrice: number;
|
|
106
173
|
};
|
|
107
174
|
|
|
108
175
|
export type ProductReference = {
|
|
109
|
-
|
|
176
|
+
classic: ProductEntry;
|
|
110
177
|
plus: ProductEntry;
|
|
111
|
-
|
|
178
|
+
standard: ProductEntry;
|
|
112
179
|
};
|
|
113
180
|
|
|
114
181
|
export type ProductCreationParams = {
|
|
115
182
|
standard: {
|
|
116
183
|
id: string;
|
|
117
184
|
tax_rates: string[];
|
|
185
|
+
tariffs: {
|
|
186
|
+
base: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
187
|
+
additionalAdmin?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
188
|
+
additionalAgent?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
189
|
+
additionalPro?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
190
|
+
additionalSeller?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
|
|
191
|
+
};
|
|
118
192
|
prices: {
|
|
119
193
|
monthly: string;
|
|
120
194
|
additionalUser: string;
|
|
@@ -124,15 +198,29 @@ export type ProductCreationParams = {
|
|
|
124
198
|
plus: {
|
|
125
199
|
id: string;
|
|
126
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
|
+
};
|
|
127
208
|
prices: {
|
|
128
209
|
monthly: string;
|
|
129
210
|
additionalUser: string;
|
|
130
211
|
};
|
|
131
212
|
additionalUserPrice: number;
|
|
132
213
|
};
|
|
133
|
-
|
|
214
|
+
classic: {
|
|
134
215
|
id: string;
|
|
135
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
|
+
};
|
|
136
224
|
prices: {
|
|
137
225
|
monthly: string;
|
|
138
226
|
additionalUser: string;
|