@todesktop/shared 7.188.65 → 7.188.67
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/README.md +75 -0
- package/eslint.config.mjs +57 -0
- package/lib/base.d.ts +15 -12
- package/lib/base.js +3 -3
- package/lib/desktopify.d.ts +23 -23
- package/lib/desktopify.js +17 -12
- package/lib/desktopify2.d.ts +12 -13
- package/lib/hsm.d.ts +2 -2
- package/lib/hsm.js +7 -5
- package/lib/index.js +6 -2
- package/lib/plans.d.ts +117 -220
- package/lib/plans.js +618 -88
- package/lib/plugin.d.ts +7 -7
- package/lib/toDesktop.d.ts +2 -2
- package/lib/translation.d.ts +2 -2
- package/lib/validations.d.ts +3 -3
- package/lib/validations.js +2 -1
- package/package.json +8 -5
- package/src/base.ts +12 -6
- package/src/plans.ts +698 -102
- package/.eslintrc.js +0 -33
package/lib/plans.d.ts
CHANGED
|
@@ -1,226 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
professional_annual: string;
|
|
9
|
-
cli_founder: string;
|
|
10
|
-
cli_founder_30: string;
|
|
11
|
-
cli_founder_50: string;
|
|
12
|
-
cli_performance: string;
|
|
13
|
-
cli_scale: string;
|
|
14
|
-
builder_essential: string;
|
|
15
|
-
builder_professional: string;
|
|
16
|
-
enterprise: string;
|
|
1
|
+
import { Subscription } from './base';
|
|
2
|
+
export type PriceKey = `${'monthly' | 'yearly'}_${string}`;
|
|
3
|
+
export type Price = {
|
|
4
|
+
id: string;
|
|
5
|
+
status: 'active' | 'inactive';
|
|
6
|
+
period: 'monthly' | 'yearly';
|
|
7
|
+
amount: number;
|
|
17
8
|
};
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
essential: string;
|
|
22
|
-
growth: string;
|
|
23
|
-
essential_new: string;
|
|
24
|
-
professional: string;
|
|
25
|
-
professional_annual: string;
|
|
26
|
-
professional_annual_full_price: string;
|
|
27
|
-
cli_founder: string;
|
|
28
|
-
cli_founder_30: string;
|
|
29
|
-
cli_founder_50: string;
|
|
30
|
-
cli_performance: string;
|
|
31
|
-
cli_scale: string;
|
|
32
|
-
builder_essential: string;
|
|
33
|
-
builder_professional: string;
|
|
34
|
-
enterprise: string;
|
|
9
|
+
export type Product<T extends PriceKey = any> = {
|
|
10
|
+
id: string;
|
|
11
|
+
prices: Record<T, Price>;
|
|
35
12
|
};
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
13
|
+
export type PlanTier = 'basic' | 'legacy_pro' | 'pro' | 'scale';
|
|
14
|
+
export type Plan = {
|
|
15
|
+
tier: PlanTier;
|
|
16
|
+
label: string;
|
|
17
|
+
eligiblePlanTiers: PlanTier[];
|
|
18
|
+
products: Record<'dev' | 'prod', Product[]>;
|
|
19
|
+
};
|
|
20
|
+
export type Configuration = {
|
|
21
|
+
default_return_url: string;
|
|
22
|
+
business_profile: {
|
|
23
|
+
headline: string;
|
|
24
|
+
privacy_policy_url: string;
|
|
25
|
+
terms_of_service_url: string;
|
|
26
|
+
};
|
|
27
|
+
metadata: {
|
|
28
|
+
[name: string]: string | number | null;
|
|
29
|
+
};
|
|
30
|
+
features: {
|
|
31
|
+
payment_method_update: {
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
};
|
|
34
|
+
subscription_update: {
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
default_allowed_updates: ('price' | 'promotion_code' | 'quantity')[];
|
|
37
|
+
products: {
|
|
38
|
+
product: string;
|
|
39
|
+
prices: string[];
|
|
40
|
+
}[];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
53
43
|
};
|
|
54
|
-
export declare const getCLIPlanIds: (stage: 'dev' | 'prod') => Pick<{
|
|
55
|
-
startup: string;
|
|
56
|
-
business: string;
|
|
57
|
-
essential: string;
|
|
58
|
-
growth: string;
|
|
59
|
-
essential_new: string;
|
|
60
|
-
professional: string;
|
|
61
|
-
professional_annual: string;
|
|
62
|
-
cli_founder: string;
|
|
63
|
-
cli_founder_30: string;
|
|
64
|
-
cli_founder_50: string;
|
|
65
|
-
cli_performance: string;
|
|
66
|
-
cli_scale: string;
|
|
67
|
-
builder_essential: string;
|
|
68
|
-
builder_professional: string;
|
|
69
|
-
enterprise: string;
|
|
70
|
-
}, "cli_founder" | "cli_founder_30" | "cli_founder_50" | "cli_performance" | "cli_scale">;
|
|
71
|
-
export declare const getCLIFounderPlanIds: (stage: 'dev' | 'prod') => Pick<{
|
|
72
|
-
startup: string;
|
|
73
|
-
business: string;
|
|
74
|
-
essential: string;
|
|
75
|
-
growth: string;
|
|
76
|
-
essential_new: string;
|
|
77
|
-
professional: string;
|
|
78
|
-
professional_annual: string;
|
|
79
|
-
cli_founder: string;
|
|
80
|
-
cli_founder_30: string;
|
|
81
|
-
cli_founder_50: string;
|
|
82
|
-
cli_performance: string;
|
|
83
|
-
cli_scale: string;
|
|
84
|
-
builder_essential: string;
|
|
85
|
-
builder_professional: string;
|
|
86
|
-
enterprise: string;
|
|
87
|
-
}, "cli_founder" | "cli_founder_30" | "cli_founder_50">;
|
|
88
|
-
export declare const getCLIPerformancePlanIds: (stage: 'dev' | 'prod') => Pick<{
|
|
89
|
-
startup: string;
|
|
90
|
-
business: string;
|
|
91
|
-
essential: string;
|
|
92
|
-
growth: string;
|
|
93
|
-
essential_new: string;
|
|
94
|
-
professional: string;
|
|
95
|
-
professional_annual: string;
|
|
96
|
-
cli_founder: string;
|
|
97
|
-
cli_founder_30: string;
|
|
98
|
-
cli_founder_50: string;
|
|
99
|
-
cli_performance: string;
|
|
100
|
-
cli_scale: string;
|
|
101
|
-
builder_essential: string;
|
|
102
|
-
builder_professional: string;
|
|
103
|
-
enterprise: string;
|
|
104
|
-
}, "cli_performance">;
|
|
105
|
-
export declare const getCLIScalePlanIds: (stage: 'dev' | 'prod') => Pick<{
|
|
106
|
-
startup: string;
|
|
107
|
-
business: string;
|
|
108
|
-
essential: string;
|
|
109
|
-
growth: string;
|
|
110
|
-
essential_new: string;
|
|
111
|
-
professional: string;
|
|
112
|
-
professional_annual: string;
|
|
113
|
-
cli_founder: string;
|
|
114
|
-
cli_founder_30: string;
|
|
115
|
-
cli_founder_50: string;
|
|
116
|
-
cli_performance: string;
|
|
117
|
-
cli_scale: string;
|
|
118
|
-
builder_essential: string;
|
|
119
|
-
builder_professional: string;
|
|
120
|
-
enterprise: string;
|
|
121
|
-
}, "cli_scale">;
|
|
122
|
-
export declare const getBuilderPlanIds: (stage: 'dev' | 'prod') => Pick<{
|
|
123
|
-
startup: string;
|
|
124
|
-
business: string;
|
|
125
|
-
essential: string;
|
|
126
|
-
growth: string;
|
|
127
|
-
essential_new: string;
|
|
128
|
-
professional: string;
|
|
129
|
-
professional_annual: string;
|
|
130
|
-
cli_founder: string;
|
|
131
|
-
cli_founder_30: string;
|
|
132
|
-
cli_founder_50: string;
|
|
133
|
-
cli_performance: string;
|
|
134
|
-
cli_scale: string;
|
|
135
|
-
builder_essential: string;
|
|
136
|
-
builder_professional: string;
|
|
137
|
-
enterprise: string;
|
|
138
|
-
}, "builder_essential" | "builder_professional">;
|
|
139
|
-
export declare const getBuilderEssentialPlanIds: (stage: 'dev' | 'prod') => Pick<{
|
|
140
|
-
startup: string;
|
|
141
|
-
business: string;
|
|
142
|
-
essential: string;
|
|
143
|
-
growth: string;
|
|
144
|
-
essential_new: string;
|
|
145
|
-
professional: string;
|
|
146
|
-
professional_annual: string;
|
|
147
|
-
cli_founder: string;
|
|
148
|
-
cli_founder_30: string;
|
|
149
|
-
cli_founder_50: string;
|
|
150
|
-
cli_performance: string;
|
|
151
|
-
cli_scale: string;
|
|
152
|
-
builder_essential: string;
|
|
153
|
-
builder_professional: string;
|
|
154
|
-
enterprise: string;
|
|
155
|
-
}, "builder_essential">;
|
|
156
|
-
export declare const getBuilderProfessionalPlanIds: (stage: 'dev' | 'prod') => Pick<{
|
|
157
|
-
startup: string;
|
|
158
|
-
business: string;
|
|
159
|
-
essential: string;
|
|
160
|
-
growth: string;
|
|
161
|
-
essential_new: string;
|
|
162
|
-
professional: string;
|
|
163
|
-
professional_annual: string;
|
|
164
|
-
cli_founder: string;
|
|
165
|
-
cli_founder_30: string;
|
|
166
|
-
cli_founder_50: string;
|
|
167
|
-
cli_performance: string;
|
|
168
|
-
cli_scale: string;
|
|
169
|
-
builder_essential: string;
|
|
170
|
-
builder_professional: string;
|
|
171
|
-
enterprise: string;
|
|
172
|
-
}, "builder_professional">;
|
|
173
|
-
export declare const getEssentialPlanIds: (stage: 'dev' | 'prod') => Pick<{
|
|
174
|
-
startup: string;
|
|
175
|
-
business: string;
|
|
176
|
-
essential: string;
|
|
177
|
-
growth: string;
|
|
178
|
-
essential_new: string;
|
|
179
|
-
professional: string;
|
|
180
|
-
professional_annual: string;
|
|
181
|
-
cli_founder: string;
|
|
182
|
-
cli_founder_30: string;
|
|
183
|
-
cli_founder_50: string;
|
|
184
|
-
cli_performance: string;
|
|
185
|
-
cli_scale: string;
|
|
186
|
-
builder_essential: string;
|
|
187
|
-
builder_professional: string;
|
|
188
|
-
enterprise: string;
|
|
189
|
-
}, "startup" | "essential" | "essential_new">;
|
|
190
|
-
export declare const getProfessionalPlanIds: (stage: 'dev' | 'prod') => Pick<{
|
|
191
|
-
startup: string;
|
|
192
|
-
business: string;
|
|
193
|
-
essential: string;
|
|
194
|
-
growth: string;
|
|
195
|
-
essential_new: string;
|
|
196
|
-
professional: string;
|
|
197
|
-
professional_annual: string;
|
|
198
|
-
cli_founder: string;
|
|
199
|
-
cli_founder_30: string;
|
|
200
|
-
cli_founder_50: string;
|
|
201
|
-
cli_performance: string;
|
|
202
|
-
cli_scale: string;
|
|
203
|
-
builder_essential: string;
|
|
204
|
-
builder_professional: string;
|
|
205
|
-
enterprise: string;
|
|
206
|
-
}, "business" | "growth" | "professional" | "professional_annual">;
|
|
207
|
-
export declare const getEnterprisePlanIds: (stage: 'dev' | 'prod') => Pick<{
|
|
208
|
-
startup: string;
|
|
209
|
-
business: string;
|
|
210
|
-
essential: string;
|
|
211
|
-
growth: string;
|
|
212
|
-
essential_new: string;
|
|
213
|
-
professional: string;
|
|
214
|
-
professional_annual: string;
|
|
215
|
-
cli_founder: string;
|
|
216
|
-
cli_founder_30: string;
|
|
217
|
-
cli_founder_50: string;
|
|
218
|
-
cli_performance: string;
|
|
219
|
-
cli_scale: string;
|
|
220
|
-
builder_essential: string;
|
|
221
|
-
builder_professional: string;
|
|
222
|
-
enterprise: string;
|
|
223
|
-
}, "enterprise">;
|
|
224
44
|
export declare enum PortalConfigKey {
|
|
225
45
|
CLIUpdateDev = "cli_update_dev",
|
|
226
46
|
CLIUpdateProd = "cli_update_prod",
|
|
@@ -231,3 +51,80 @@ export declare enum PortalConfigKey {
|
|
|
231
51
|
BuilderUpgradeDev = "builder_upgrade_dev",
|
|
232
52
|
BuilderUpgradeProd = "builder_upgrade_prod"
|
|
233
53
|
}
|
|
54
|
+
export declare const products: {
|
|
55
|
+
readonly dev: {
|
|
56
|
+
readonly builder: {
|
|
57
|
+
readonly essential: Product<"monthly_99" | "monthly_125" | "yearly_1200">;
|
|
58
|
+
readonly professional: Product<"monthly_199" | "monthly_240" | "monthly_300" | "yearly_2880">;
|
|
59
|
+
};
|
|
60
|
+
readonly cli: {
|
|
61
|
+
readonly founder30: Product<"monthly_30">;
|
|
62
|
+
readonly founder50: Product<"monthly_50" | "monthly_90">;
|
|
63
|
+
readonly founder: Product<"monthly_125" | "yearly_1200" | "monthly_100">;
|
|
64
|
+
readonly performance: Product<"monthly_300" | "monthly_375" | "yearly_3600">;
|
|
65
|
+
readonly scale: Product<"monthly_1200" | "monthly_1500" | "yearly_14400">;
|
|
66
|
+
};
|
|
67
|
+
readonly legacy: {
|
|
68
|
+
readonly essential: Product<"monthly_58">;
|
|
69
|
+
readonly essentialNew: Product<"monthly_58" | "yearly_580">;
|
|
70
|
+
readonly professional: Product<"monthly_199" | "yearly_1990" | "yearly_2388">;
|
|
71
|
+
readonly startup: Product<"monthly_49" | "yearly_200">;
|
|
72
|
+
readonly growth: Product<"monthly_199">;
|
|
73
|
+
readonly business: Product<"monthly_199">;
|
|
74
|
+
readonly enterprise: Product<"monthly_700">;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
readonly prod: {
|
|
78
|
+
readonly builder: {
|
|
79
|
+
readonly essential: Product<"monthly_99" | "monthly_125" | "yearly_1200">;
|
|
80
|
+
readonly professional: Product<"monthly_199" | "monthly_240" | "monthly_300" | "yearly_2880">;
|
|
81
|
+
};
|
|
82
|
+
readonly cli: {
|
|
83
|
+
readonly founder30: Product<"monthly_30">;
|
|
84
|
+
readonly founder50: Product<"monthly_50" | "monthly_90">;
|
|
85
|
+
readonly founder: Product<"monthly_125" | "yearly_1200" | "monthly_100">;
|
|
86
|
+
readonly performance: Product<"monthly_300" | "monthly_375" | "yearly_3600">;
|
|
87
|
+
readonly scale: Product<"monthly_1200" | "monthly_1500" | "yearly_14400">;
|
|
88
|
+
};
|
|
89
|
+
readonly legacy: {
|
|
90
|
+
readonly essential: Product<"monthly_58">;
|
|
91
|
+
readonly essentialNew: Product<"monthly_58" | "yearly_580">;
|
|
92
|
+
readonly professional: Product<"monthly_199" | "yearly_1990" | "yearly_2388">;
|
|
93
|
+
readonly startup: Product<"monthly_49" | "yearly_200">;
|
|
94
|
+
readonly growth: Product<"monthly_199">;
|
|
95
|
+
readonly business: Product<"monthly_199">;
|
|
96
|
+
readonly enterprise: Product<"monthly_700">;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
export declare const basicPlan: Plan;
|
|
101
|
+
export declare const legacyProPlan: Plan;
|
|
102
|
+
export declare const proPlan: Plan;
|
|
103
|
+
export declare const scalePlan: Plan;
|
|
104
|
+
export declare const configurations: {
|
|
105
|
+
dev: {
|
|
106
|
+
builder: {
|
|
107
|
+
update: Configuration;
|
|
108
|
+
upgrade: Configuration;
|
|
109
|
+
};
|
|
110
|
+
cli: {
|
|
111
|
+
update: Configuration;
|
|
112
|
+
upgrade: Configuration;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
prod: {
|
|
116
|
+
builder: {
|
|
117
|
+
update: Configuration;
|
|
118
|
+
upgrade: Configuration;
|
|
119
|
+
};
|
|
120
|
+
cli: {
|
|
121
|
+
update: Configuration;
|
|
122
|
+
upgrade: Configuration;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
export declare const hasActiveSub: (sub?: Subscription) => boolean;
|
|
127
|
+
export declare const hasPlan: (plan: Plan, sub?: Subscription) => boolean;
|
|
128
|
+
export declare const getPlan: (sub?: Pick<Subscription, "productId" | "planId">) => Plan | null;
|
|
129
|
+
export type LegacyProductKey = 'startup' | 'business' | 'essential' | 'growth' | 'essential_new' | 'professional' | 'professional_annual' | 'professional_annual_full_price' | 'cli_founder' | 'cli_founder_30' | 'cli_founder_50' | 'cli_performance' | 'cli_scale' | 'builder_essential' | 'builder_professional' | 'enterprise';
|
|
130
|
+
export declare const LegacyProductRecord: Record<LegacyProductKey, Record<'dev' | 'prod', Product>>;
|