@todesktop/shared 7.188.18 → 7.188.19-beta.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.
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { ISwitchableValue } from './toDesktop';
3
2
  import { MenuItemConstructorOptions, BrowserWindowConstructorOptions, WebPreferences, NotificationConstructorOptions, MessageBoxOptions } from '@todesktop/client-electron-types';
4
3
  import { BaseApp } from './base';
@@ -27,11 +26,11 @@ export interface FileAssetDetails extends BaseAssetDetails {
27
26
  md5Hash: string;
28
27
  type: 'file';
29
28
  }
30
- export declare type AssetDetails = AppIconAssetDetails | MenuIconAssetDetails | TrayMenubarIconAssetDetails | FileAssetDetails;
29
+ export type AssetDetails = AppIconAssetDetails | MenuIconAssetDetails | TrayMenubarIconAssetDetails | FileAssetDetails;
31
30
  /**
32
31
  * Custom ToDesktop Roles for Application & Tray Menus
33
32
  */
34
- declare type todesktopRoles = 'todesktop:launch-at-startup' | 'todesktop:check-for-updates' | 'todesktop:quit' | 'todesktop:quit-completely' | 'todesktop:new-window' | 'todesktop:new-tab' | 'todesktop:check-for-updates' | 'todesktop:history-home' | 'todesktop:history-back' | 'todesktop:history-forward' | 'todesktop:show-window' | 'todesktop:hide-window' | 'todesktop:toggle-window' | 'todesktop:toggle-window0' | 'todesktop:toggle-window1' | 'todesktop:toggle-window2' | 'todesktop:toggle-window3' | 'todesktop:toggle-window4';
33
+ type todesktopRoles = 'todesktop:launch-at-startup' | 'todesktop:check-for-updates' | 'todesktop:quit' | 'todesktop:quit-completely' | 'todesktop:new-window' | 'todesktop:new-tab' | 'todesktop:check-for-updates' | 'todesktop:history-home' | 'todesktop:history-back' | 'todesktop:history-forward' | 'todesktop:show-window' | 'todesktop:hide-window' | 'todesktop:toggle-window' | 'todesktop:toggle-window0' | 'todesktop:toggle-window1' | 'todesktop:toggle-window2' | 'todesktop:toggle-window3' | 'todesktop:toggle-window4';
35
34
  export interface DesktopifyMenuItemConstructorOptions extends Omit<MenuItemConstructorOptions, 'role' | 'submenu'> {
36
35
  platforms?: NodeJS.Platform[];
37
36
  submenu?: DesktopifyMenuItemConstructorOptions[];
@@ -51,7 +50,7 @@ export interface DesktopifyMenuItemConstructorOptions extends Omit<MenuItemConst
51
50
  *
52
51
  * @param windowId - The id of the window to toggle
53
52
  */
54
- export declare type DesktopifyAppTrayToggleWindowAction = {
53
+ export type DesktopifyAppTrayToggleWindowAction = {
55
54
  role: 'toggleWindow';
56
55
  windowId: string;
57
56
  };
@@ -60,7 +59,7 @@ export declare type DesktopifyAppTrayToggleWindowAction = {
60
59
  *
61
60
  * @param menu - The menu to show when action triggered
62
61
  */
63
- export declare type DesktopifyAppTrayToggleMenuAction = {
62
+ export type DesktopifyAppTrayToggleMenuAction = {
64
63
  role: 'toggleMenu';
65
64
  menu: DesktopifyMenuItemConstructorOptions[];
66
65
  };
@@ -69,17 +68,17 @@ export declare type DesktopifyAppTrayToggleMenuAction = {
69
68
  *
70
69
  * @param event - The name of the event
71
70
  */
72
- export declare type DesktopifyAppTrayJSEventAction = {
71
+ export type DesktopifyAppTrayJSEventAction = {
73
72
  role: 'jsEvent';
74
73
  event: string;
75
74
  };
76
75
  /**
77
76
  * No Action Tray Action
78
77
  */
79
- export declare type DesktopifyAppTrayNoAction = {
78
+ export type DesktopifyAppTrayNoAction = {
80
79
  role: 'noAction';
81
80
  };
82
- export declare type DesktopifyAppTrayAction = DesktopifyAppTrayToggleMenuAction | DesktopifyAppTrayToggleWindowAction | DesktopifyAppTrayJSEventAction | DesktopifyAppTrayNoAction;
81
+ export type DesktopifyAppTrayAction = DesktopifyAppTrayToggleMenuAction | DesktopifyAppTrayToggleWindowAction | DesktopifyAppTrayJSEventAction | DesktopifyAppTrayNoAction;
83
82
  export interface DesktopifyAppTray {
84
83
  id: string;
85
84
  objectId?: string;
@@ -98,21 +97,21 @@ export interface DesktopifyAppTray {
98
97
  rightClick: DesktopifyAppTrayAction;
99
98
  leftClick: DesktopifyAppTrayAction;
100
99
  }
101
- export declare type DesktopifyAppMenu = DesktopifyMenuItemConstructorOptions;
100
+ export type DesktopifyAppMenu = DesktopifyMenuItemConstructorOptions;
102
101
  /**
103
102
  * Whitelist of allowed DesktopifyWindow Options.
104
103
  * These attrs (if set) are passed to the `BrowserWindow` constructor
105
104
  * when the window is created
106
105
  */
107
106
  export declare const allowedBrowserWindowConstructorOptions: Readonly<(keyof BrowserWindowConstructorOptions)[]>;
108
- export declare type whitelistedBrowserWindowConstructorOptions = (typeof allowedBrowserWindowConstructorOptions)[number];
107
+ export type whitelistedBrowserWindowConstructorOptions = (typeof allowedBrowserWindowConstructorOptions)[number];
109
108
  /**
110
109
  * Whitelist of allowed DesktopifyWindow Web Preferences Options.
111
110
  * These attrs (if set) are passed to the webPreferences object in the `BrowserWindow` constructor
112
111
  * when the window is created
113
112
  */
114
113
  export declare const allowedWebPreferencesOptions: Readonly<(keyof WebPreferences)[]>;
115
- export declare type whitelistedWebPreferencesOptions = (typeof allowedWebPreferencesOptions)[number];
114
+ export type whitelistedWebPreferencesOptions = (typeof allowedWebPreferencesOptions)[number];
116
115
  /**
117
116
  * Interface for ToDesktop App Windows
118
117
  */
@@ -162,6 +161,10 @@ export interface DesktopifyAppWindow {
162
161
  * Disables default rightClick menu
163
162
  */
164
163
  disableContextMenu: boolean;
164
+ /**
165
+ * Disables the menu item for opening a link in a new app window
166
+ */
167
+ disableContextMenuOpenInWindow: boolean;
165
168
  /**
166
169
  * Allows user to `Cmd+F` or `Edit>Find` to search for text on page
167
170
  */
@@ -230,7 +233,7 @@ export interface DesktopifyAppWindow {
230
233
  */
231
234
  file?: string;
232
235
  }
233
- export declare type AutoUpdateConfiguration = {
236
+ export type AutoUpdateConfiguration = {
234
237
  autoUpdater: boolean;
235
238
  shouldAutoCheckOnLaunch: boolean;
236
239
  shouldAutoCheckInterval: boolean;
@@ -386,9 +389,17 @@ export interface DesktopifyApp2<Plugin = DesktopAppPlugin> {
386
389
  */
387
390
  shouldMakeSameDomainAnExternalLink?: boolean;
388
391
  /**
389
- * Enables push notifications
392
+ * Enables push notifications — uses `electron-push-receiver`
390
393
  */
391
394
  enablePushNotifications?: boolean;
395
+ /**
396
+ * Enables NEW push notifications — uses `@cuj1559/electron-push-receiver`
397
+ */
398
+ enableNewPushNotifications?: boolean;
399
+ /**
400
+ * Disable error reporting (Sentry)
401
+ */
402
+ disableErrorTracking?: boolean;
392
403
  /**
393
404
  * Sets theme for Electron UI elements and css.
394
405
  *
@@ -473,7 +484,7 @@ export interface DesktopifyApp2<Plugin = DesktopAppPlugin> {
473
484
  */
474
485
  shouldProtectContent?: boolean;
475
486
  }
476
- export declare type FindInPagePlacement = {
487
+ export type FindInPagePlacement = {
477
488
  offset: number;
478
489
  };
479
490
  export interface IApp2<Plugin = DesktopAppPlugin> extends BaseApp {
package/lib/hsm.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ /**
2
+ * - mac = Developer ID Application
3
+ * - mac-installer = Developer ID Installer
4
+ * - mas = Apple Distribution or Mac App Distribution (for Mac App Store)
5
+ * - mas-installer = Mac Installer Distribution (for Mac App Store)
6
+ * - mas-dev = Apple Development
7
+ */
8
+ export type MacTarget = 'mac' | 'mac-installer' | 'mas' | 'mas-installer' | 'mas-dev';
9
+ export type WindowsTarget = 'windows';
10
+ export declare function isMacTarget(type: string): type is MacTarget;
11
+ export declare function isWindowsTarget(type: string): type is MacTarget;
12
+ /**
13
+ * Files that are uploaded to HSM have a unique secretName that depends on the appId and target.
14
+ * This function returns the key name that is used for certificate files that have a `.p12` postfix.
15
+ *
16
+ * @param appId the application id
17
+ * @param target the target type
18
+ * @returns the name of the secret that is required for downloading the cert from HSM.
19
+ */
20
+ export declare const getCertificateNameFromHSM: (appId: string, target: MacTarget | WindowsTarget) => string;
21
+ /**
22
+ * Files that are uploaded to HSM have a unique secretName that depends on the appId and target.
23
+ * This function returns the key name that is used for key files that have a `.p8` postfix.
24
+ * Currently only used for mac notarization.
25
+ *
26
+ * @param appId the application id
27
+ * @param target the target type
28
+ * @returns the name of the secret that is required for downloading the cert from HSM.
29
+ */
30
+ export declare const getAPIKeyNameFromHSM: (appId: string, target: MacTarget) => string;
package/lib/hsm.js ADDED
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAPIKeyNameFromHSM = exports.getCertificateNameFromHSM = void 0;
4
+ exports.isMacTarget = isMacTarget;
5
+ exports.isWindowsTarget = isWindowsTarget;
6
+ function isMacTarget(type) {
7
+ return ['mac', 'mac-installer', 'mas', 'mas-installer', 'mas-dev'].includes(type);
8
+ }
9
+ function isWindowsTarget(type) {
10
+ return ['windows'].includes(type);
11
+ }
12
+ /**
13
+ * Files that are uploaded to HSM have a unique secretName that depends on the appId and target.
14
+ * This function returns the key name that is used for certificate files that have a `.p12` postfix.
15
+ *
16
+ * @param appId the application id
17
+ * @param target the target type
18
+ * @returns the name of the secret that is required for downloading the cert from HSM.
19
+ */
20
+ const getCertificateNameFromHSM = (appId, target) => {
21
+ if (!isMacTarget(target) && !isWindowsTarget(target)) {
22
+ throw new Error(`Invalid target '${target}'. Only windows or mac certs are supported`);
23
+ }
24
+ return `todesktop-${appId}-${target}-cert`;
25
+ };
26
+ exports.getCertificateNameFromHSM = getCertificateNameFromHSM;
27
+ /**
28
+ * Files that are uploaded to HSM have a unique secretName that depends on the appId and target.
29
+ * This function returns the key name that is used for key files that have a `.p8` postfix.
30
+ * Currently only used for mac notarization.
31
+ *
32
+ * @param appId the application id
33
+ * @param target the target type
34
+ * @returns the name of the secret that is required for downloading the cert from HSM.
35
+ */
36
+ const getAPIKeyNameFromHSM = (appId, target) => {
37
+ if (!isMacTarget(target)) {
38
+ throw new Error(`Invalid target '${target}'. Only mac certs are supported`);
39
+ }
40
+ return `todesktop-${appId}-${target}-api-key`;
41
+ };
42
+ exports.getAPIKeyNameFromHSM = getAPIKeyNameFromHSM;
package/lib/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from './getSiteInfo';
5
5
  export * from './plans';
6
6
  export * from './base';
7
7
  export * from './plugin';
8
+ export * from './hsm';
8
9
  export * from './desktopify2';
9
10
  declare const schemaVersion: string;
10
11
  export { schemaVersion };
package/lib/index.js CHANGED
@@ -1,13 +1,17 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
8
12
  }));
9
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
17
  exports.schemaVersion = void 0;
@@ -19,6 +23,7 @@ __exportStar(require("./getSiteInfo"), exports);
19
23
  __exportStar(require("./plans"), exports);
20
24
  __exportStar(require("./base"), exports);
21
25
  __exportStar(require("./plugin"), exports);
26
+ __exportStar(require("./hsm"), exports);
22
27
  __exportStar(require("./desktopify2"), exports);
23
28
  const schemaVersion = package_json_1.version;
24
29
  exports.schemaVersion = schemaVersion;
package/lib/plans.d.ts CHANGED
@@ -1,223 +1,130 @@
1
- export declare const devPlanIds: {
2
- startup: string;
3
- business: string;
4
- essential: string;
5
- growth: string;
6
- essential_new: string;
7
- professional: string;
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 declare const prodPlanIds: {
19
- startup: string;
20
- business: string;
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 declare type PlanIds = typeof prodPlanIds;
37
- export declare const getPlanEnvironment: (stage: 'dev' | 'prod') => {
38
- startup: string;
39
- business: string;
40
- essential: string;
41
- growth: string;
42
- essential_new: string;
43
- professional: string;
44
- professional_annual: string;
45
- cli_founder: string;
46
- cli_founder_30: string;
47
- cli_founder_50: string;
48
- cli_performance: string;
49
- cli_scale: string;
50
- builder_essential: string;
51
- builder_professional: string;
52
- enterprise: string;
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[]>;
53
19
  };
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">;
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
+ };
43
+ };
44
+ export declare enum PortalConfigKey {
45
+ CLIUpdateDev = "cli_update_dev",
46
+ CLIUpdateProd = "cli_update_prod",
47
+ CLIUpgradeDev = "cli_upgrade_dev",
48
+ CLIUpgradeProd = "cli_upgrade_prod",
49
+ BuilderUpdateDev = "builder_update_dev",
50
+ BuilderUpdateProd = "builder_update_prod",
51
+ BuilderUpgradeDev = "builder_upgrade_dev",
52
+ BuilderUpgradeProd = "builder_upgrade_prod"
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>>;