@placeshakr/config 10.19.0 → 10.19.6-alpha.2

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.
@@ -12,30 +12,6 @@ import createProducts from 'plans/base';
12
12
  export { Product, ProductEntry, SubscriptionSettings };
13
13
 
14
14
  const testing: ProductCreationParams = {
15
- standard: {
16
- id: 'prod_KzmEyS3UQ5lbnz',
17
- tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
18
- tariffs: {
19
- base: { id: 'price_1KJmg4LFzcsAA7x6SMfj1iDu', price: 69, usageType: 'licensed', type: 'base' },
20
- },
21
- prices: {
22
- monthly: 'price_1KJmg4LFzcsAA7x6SMfj1iDu',
23
- additionalUser: 'price_1KJmg4LFzcsAA7x6yzvGdoxe',
24
- },
25
- additionalUserPrice: 10,
26
- },
27
- plus: {
28
- id: 'prod_KzmyY1ysEOeK93',
29
- tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
30
- tariffs: {
31
- base: { id: 'price_1KJnP0LFzcsAA7x6oDVeaPAv', price: 159, usageType: 'licensed', type: 'base' },
32
- },
33
- prices: {
34
- monthly: 'price_1KJnP0LFzcsAA7x6oDVeaPAv',
35
- additionalUser: 'price_1KJnP0LFzcsAA7x6s3rO71QX',
36
- },
37
- additionalUserPrice: 5,
38
- },
39
15
  classic: {
40
16
  id: 'prod_KzmO4rORyWl8cA',
41
17
  tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
@@ -46,39 +22,69 @@ const testing: ProductCreationParams = {
46
22
  additionalPro: { id: 'price_1KJmpiLFzcsAA7x6JxTnlLC8', price: 10, usageType: 'metered', type: 'extra_user' },
47
23
  additionalSeller: { id: 'price_1KJmpiLFzcsAA7x6XS9PBgQo', price: 2, usageType: 'metered', type: 'extra_user' },
48
24
  },
49
- prices: {
50
- monthly: 'price_1KJmpiLFzcsAA7x6rLA0GNZX',
51
- additionalUser: 'price_1KJmpiLFzcsAA7x6VtCIuhqw',
52
- },
53
- additionalUserPrice: 30,
54
25
  },
26
+ // standard: {
27
+ // id: 'prod_KzmEyS3UQ5lbnz',
28
+ // tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
29
+ // tariffs: {
30
+ // base: { id: 'price_1KJmg4LFzcsAA7x6SMfj1iDu', price: 69, usageType: 'licensed', type: 'base' },
31
+ // },
32
+ // // prices: {
33
+ // // monthly: 'price_1KJmg4LFzcsAA7x6SMfj1iDu',
34
+ // // additionalUser: 'price_1KJmg4LFzcsAA7x6yzvGdoxe',
35
+ // // },
36
+ // // additionalUserPrice: 10,
37
+ // },
38
+ // plus: {
39
+ // id: 'prod_KzmyY1ysEOeK93',
40
+ // tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
41
+ // tariffs: {
42
+ // base: { id: 'price_1KJnP0LFzcsAA7x6oDVeaPAv', price: 159, usageType: 'licensed', type: 'base' },
43
+ // },
44
+ // },
45
+ // test_1: {
46
+ // id: 'prod_L2ZqDUzF0HFuFN',
47
+ // tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
48
+ // tariffs: {
49
+ // base: { id: 'price_1KMUgwLFzcsAA7x6c3wk0Buy', price: 50, usageType: 'licensed', type: 'base' },
50
+ // additionalAdmin: { id: 'price_1KMUgwLFzcsAA7x6X8qYBxls', price: 10, usageType: 'metered', type: 'extra_user' },
51
+ // additionalAgent: { id: 'price_1KMUgwLFzcsAA7x6fyOLh2gM', price: 8, usageType: 'metered', type: 'extra_user' },
52
+ // additionalPro: { id: 'price_1KMUgwLFzcsAA7x6eB6Oevw2', price: 6, usageType: 'metered', type: 'extra_user' },
53
+ // additionalSeller: { id: 'price_1KMUgwLFzcsAA7x6s9WBpxTS', price: 4, usageType: 'metered', type: 'extra_user' },
54
+ // },
55
+ // },
56
+ // test_2: {
57
+ // id: 'prod_L2xmEk7gqqRJtS',
58
+ // tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
59
+ // tariffs: {
60
+ // base: { id: 'price_1KMrqrLFzcsAA7x62Ag7xwjU', price: 100, usageType: 'licensed', type: 'base' },
61
+ // additionalAdmin: { id: 'price_1KMrqrLFzcsAA7x6cu3it43A', price: 20, usageType: 'metered', type: 'extra_user' },
62
+ // additionalAgent: { id: 'price_1KMrqrLFzcsAA7x6eNCDb3D6', price: 16, usageType: 'metered', type: 'extra_user' },
63
+ // additionalPro: { id: 'price_1KMrqrLFzcsAA7x6wRuDxyyN', price: 12, usageType: 'metered', type: 'extra_user' },
64
+ // additionalSeller: { id: 'price_1KMrqsLFzcsAA7x61NRR9gne', price: 8, usageType: 'metered', type: 'extra_user' },
65
+ // },
66
+ // },
67
+ // test_3: {
68
+ // id: 'prod_L2xnCHGi6QNgX8',
69
+ // tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
70
+ // tariffs: {
71
+ // base: { id: 'price_1KMrs0LFzcsAA7x6p2tkW6lu', price: 80, usageType: 'licensed', type: 'base' },
72
+ // },
73
+ // },
74
+ // test_4: {
75
+ // id: 'prod_L2yWF4ssugw8Ln',
76
+ // tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
77
+ // tariffs: {
78
+ // base: { id: 'price_1KMsZFLFzcsAA7x6qVbCQpuN', price: 65, usageType: 'licensed', type: 'base' },
79
+ // additionalAdmin: { id: 'price_1KMsZFLFzcsAA7x6EjaDfica', price: 15, usageType: 'metered', type: 'extra_user' },
80
+ // additionalAgent: { id: 'price_1KMsZFLFzcsAA7x6T1FI1WF4', price: 12, usageType: 'metered', type: 'extra_user' },
81
+ // additionalPro: { id: 'price_1KMsZFLFzcsAA7x6L6I0M1ND', price: 9, usageType: 'metered', type: 'extra_user' },
82
+ // additionalSeller: { id: 'price_1KMsZFLFzcsAA7x6G5GXzPeW', price: 6, usageType: 'metered', type: 'extra_user' },
83
+ // },
84
+ // },
55
85
  };
56
86
 
57
87
  const production: ProductCreationParams = {
58
- standard: {
59
- id: 'prod_HsAwETfIUblsAT',
60
- tax_rates: ['txr_1HIMA8LFzcsAA7x61nsqfrYU'],
61
- tariffs: {
62
- base: { id: 'price_1HIQaILFzcsAA7x6NVk3cJu1', price: 69, usageType: 'licensed', type: 'base' },
63
- },
64
- prices: {
65
- monthly: 'price_1HIQaILFzcsAA7x6NVk3cJu1',
66
- additionalUser: 'price_1HRQFTLFzcsAA7x6X9wS7JUr',
67
- },
68
- additionalUserPrice: 10,
69
- },
70
- plus: {
71
- id: 'prod_HsB2YJPEZ9H98c',
72
- tax_rates: ['txr_1HIMA8LFzcsAA7x61nsqfrYU'],
73
- tariffs: {
74
- base: { id: 'price_1HIQg0LFzcsAA7x6X6lfFUdv', price: 159, usageType: 'licensed', type: 'base' },
75
- },
76
- prices: {
77
- monthly: 'price_1HIQg0LFzcsAA7x6X6lfFUdv',
78
- additionalUser: 'price_1HRg1fLFzcsAA7x6QYbtnty6',
79
- },
80
- additionalUserPrice: 5,
81
- },
82
88
  classic: {
83
89
  id: 'prod_KzmYFhrWXrzWdR',
84
90
  tax_rates: ['txr_1HIMA8LFzcsAA7x61nsqfrYU'],
@@ -89,12 +95,61 @@ const production: ProductCreationParams = {
89
95
  additionalPro: { id: 'price_1KJmzNLFzcsAA7x695wsj6rA', price: 10, usageType: 'metered', type: 'extra_user' },
90
96
  additionalSeller: { id: 'price_1KJmzNLFzcsAA7x6gF62MX41', price: 2, usageType: 'metered', type: 'extra_user' },
91
97
  },
92
- prices: {
93
- monthly: 'price_1KJmzNLFzcsAA7x6I6gNlCpY',
94
- additionalUser: 'price_1KJmzNLFzcsAA7x6Tl6D8Wus',
95
- },
96
- additionalUserPrice: 30,
97
98
  },
99
+ // standard: {
100
+ // id: 'prod_HsAwETfIUblsAT',
101
+ // tax_rates: ['txr_1HIMA8LFzcsAA7x61nsqfrYU'],
102
+ // tariffs: {
103
+ // base: { id: 'price_1HIQaILFzcsAA7x6NVk3cJu1', price: 69, usageType: 'licensed', type: 'base' },
104
+ // },
105
+ // },
106
+ // plus: {
107
+ // id: 'prod_HsB2YJPEZ9H98c',
108
+ // tax_rates: ['txr_1HIMA8LFzcsAA7x61nsqfrYU'],
109
+ // tariffs: {
110
+ // base: { id: 'price_1HIQg0LFzcsAA7x6X6lfFUdv', price: 159, usageType: 'licensed', type: 'base' },
111
+ // },
112
+ // },
113
+ // test_1: {
114
+ // id: 'prod_L2ZqDUzF0HFuFN',
115
+ // tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
116
+ // tariffs: {
117
+ // base: { id: 'price_1KMUgwLFzcsAA7x6c3wk0Buy', price: 50, usageType: 'licensed', type: 'base' },
118
+ // additionalAdmin: { id: 'price_1KMUgwLFzcsAA7x6X8qYBxls', price: 10, usageType: 'metered', type: 'extra_user' },
119
+ // additionalAgent: { id: 'price_1KMUgwLFzcsAA7x6fyOLh2gM', price: 8, usageType: 'metered', type: 'extra_user' },
120
+ // additionalPro: { id: 'price_1KMUgwLFzcsAA7x6eB6Oevw2', price: 6, usageType: 'metered', type: 'extra_user' },
121
+ // additionalSeller: { id: 'price_1KMUgwLFzcsAA7x6s9WBpxTS', price: 4, usageType: 'metered', type: 'extra_user' },
122
+ // },
123
+ // },
124
+ // test_2: {
125
+ // id: 'prod_L2xmEk7gqqRJtS',
126
+ // tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
127
+ // tariffs: {
128
+ // base: { id: 'price_1KMrqrLFzcsAA7x62Ag7xwjU', price: 100, usageType: 'licensed', type: 'base' },
129
+ // additionalAdmin: { id: 'price_1KMrqrLFzcsAA7x6cu3it43A', price: 20, usageType: 'metered', type: 'extra_user' },
130
+ // additionalAgent: { id: 'price_1KMrqrLFzcsAA7x6eNCDb3D6', price: 16, usageType: 'metered', type: 'extra_user' },
131
+ // additionalPro: { id: 'price_1KMrqrLFzcsAA7x6wRuDxyyN', price: 12, usageType: 'metered', type: 'extra_user' },
132
+ // additionalSeller: { id: 'price_1KMrqsLFzcsAA7x61NRR9gne', price: 8, usageType: 'metered', type: 'extra_user' },
133
+ // },
134
+ // },
135
+ // test_3: {
136
+ // id: 'prod_L2xnCHGi6QNgX8',
137
+ // tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
138
+ // tariffs: {
139
+ // base: { id: 'price_1KMrs0LFzcsAA7x6p2tkW6lu', price: 80, usageType: 'licensed', type: 'base' },
140
+ // },
141
+ // },
142
+ // test_4: {
143
+ // id: 'prod_L2yWF4ssugw8Ln',
144
+ // tax_rates: ['txr_1HPXZVLFzcsAA7x6w0zpHu01'],
145
+ // tariffs: {
146
+ // base: { id: 'price_1KMsZFLFzcsAA7x6qVbCQpuN', price: 65, usageType: 'licensed', type: 'base' },
147
+ // additionalAdmin: { id: 'price_1KMsZFLFzcsAA7x6EjaDfica', price: 15, usageType: 'metered', type: 'extra_user' },
148
+ // additionalAgent: { id: 'price_1KMsZFLFzcsAA7x6T1FI1WF4', price: 12, usageType: 'metered', type: 'extra_user' },
149
+ // additionalPro: { id: 'price_1KMsZFLFzcsAA7x6L6I0M1ND', price: 9, usageType: 'metered', type: 'extra_user' },
150
+ // additionalSeller: { id: 'price_1KMsZFLFzcsAA7x6G5GXzPeW', price: 6, usageType: 'metered', type: 'extra_user' },
151
+ // },
152
+ // },
98
153
  };
99
154
 
100
155
  /**
@@ -1,5 +1,46 @@
1
1
  export type DeploymentEnvironment = 'development' | 'staging' | 'production';
2
2
 
3
+ export interface CouponSettings {
4
+ /**
5
+ * How many admins extra can have a team
6
+ */
7
+ adminUsersFree?: number | 'all';
8
+
9
+ /**
10
+ * How many agents extra can have a team
11
+ */
12
+ agentUsersFree?: number | 'all';
13
+
14
+ /**
15
+ * How many pros extra can have a team
16
+ */
17
+ proUsersFree?: number | 'all';
18
+
19
+ /**
20
+ * How many sellers extra can have a team
21
+ */
22
+ sellerUsersFree?: number | 'all';
23
+ }
24
+
25
+ export interface Coupon {
26
+ id: string;
27
+ name: string;
28
+ object: string;
29
+ amount_off?: number;
30
+ percent_off?: number;
31
+ created: number;
32
+ currency?: string;
33
+ duration: string;
34
+ duration_in_months?: any;
35
+ livemode: boolean;
36
+ max_redemptions?: any;
37
+ redeem_by?: any;
38
+ times_redeemed?: number;
39
+ valid: boolean;
40
+ metadata?: CouponSettings;
41
+ }
42
+
43
+
3
44
  export interface SubscriptionSettings {
4
45
  /**
5
46
  * This plan allow to create additional user?
@@ -26,11 +67,6 @@ export interface SubscriptionSettings {
26
67
  */
27
68
  importExport?: boolean;
28
69
 
29
- /**
30
- * How many members can have a team
31
- */
32
- maxTeamMembers?: number;
33
-
34
70
  /**
35
71
  *
36
72
  */
@@ -134,7 +170,7 @@ export interface Product {
134
170
  /**
135
171
  * Indicate rating among products
136
172
  */
137
- rating: number;
173
+ rating: 1 | 2 | 3;
138
174
 
139
175
  /**
140
176
  * Marked as private
@@ -168,63 +204,36 @@ export type ProductEntry = {
168
204
  additionalPro?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
169
205
  additionalSeller?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
170
206
  };
171
- additionalUser: string;
172
- additionalUserPrice: number;
173
207
  };
174
208
 
175
209
  export type ProductReference = {
176
210
  classic: ProductEntry;
177
- plus: ProductEntry;
178
- standard: ProductEntry;
211
+ // plus: ProductEntry;
212
+ // standard: ProductEntry;
213
+ // test_1: ProductEntry;
214
+ // test_2: ProductEntry;
215
+ // test_3: ProductEntry;
216
+ // test_4: ProductEntry;
179
217
  };
180
218
 
181
- export type ProductCreationParams = {
182
- standard: {
183
- id: string;
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
- };
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;
219
+ export type ProductCreationEntry = {
220
+ id: string;
221
+ tax_rates: string[];
222
+ tariffs: {
223
+ base: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
224
+ additionalAdmin?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
225
+ additionalAgent?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
226
+ additionalPro?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
227
+ additionalSeller?: { id: string; price: number; usageType: 'licensed' | 'metered'; type: 'base' | 'extra_user' };
229
228
  };
230
229
  };
230
+
231
+ export type ProductCreationParams = {
232
+ classic: ProductCreationEntry;
233
+ // standard: ProductCreationEntry;
234
+ // plus: ProductCreationEntry;
235
+ // test_1: ProductCreationEntry;
236
+ // test_2: ProductCreationEntry;
237
+ // test_3: ProductCreationEntry;
238
+ // test_4: ProductCreationEntry;
239
+ };