@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.
- package/README.md +75 -0
- package/eslint.config.mjs +57 -0
- package/lib/base.d.ts +38 -15
- package/lib/base.js +3 -3
- package/lib/desktopify.d.ts +102 -25
- package/lib/desktopify.js +17 -12
- package/lib/desktopify2.d.ts +25 -14
- package/lib/hsm.d.ts +30 -0
- package/lib/hsm.js +42 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +7 -2
- package/lib/plans.d.ts +127 -220
- package/lib/plans.js +619 -78
- package/lib/plugin.d.ts +7 -7
- package/lib/toDesktop.d.ts +4 -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 +34 -10
- package/src/desktopify.ts +83 -5
- package/src/desktopify2.ts +13 -1
- package/src/hsm.ts +63 -0
- package/src/index.ts +1 -0
- package/src/plans.ts +698 -91
- package/src/toDesktop.ts +4 -0
- package/.eslintrc.js +0 -33
package/lib/desktopify2.d.ts
CHANGED
|
@@ -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
|
|
29
|
+
export type AssetDetails = AppIconAssetDetails | MenuIconAssetDetails | TrayMenubarIconAssetDetails | FileAssetDetails;
|
|
31
30
|
/**
|
|
32
31
|
* Custom ToDesktop Roles for Application & Tray Menus
|
|
33
32
|
*/
|
|
34
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
78
|
+
export type DesktopifyAppTrayNoAction = {
|
|
80
79
|
role: 'noAction';
|
|
81
80
|
};
|
|
82
|
-
export
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
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.
|
|
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" && !
|
|
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
|
-
|
|
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
|
-
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
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
export declare const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
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>>;
|