1 import { PassThemeOption } from '@proton/pass/components/Layout/Theme/types';
3 import type { FeatureFlagState } from './store/reducers';
4 import { PassFeature } from './types/api/features';
6 /** Invalidate local cache for users whose state version is older
7 * than the minimum state version specified by these constants */
8 export const MIN_CACHE_VERSION = '1.10.0';
10 export const MAX_BATCH_PER_REQUEST = 100;
11 export const MAX_BATCH_ADDRESS_REQUEST = 10;
13 export const DEFAULT_LOCK_TTL = 600; /* 10 minutes */
15 export const MAX_ITEM_NAME_LENGTH = 200;
16 export const MAX_ITEM_NOTE_LENGTH = 25_000;
17 export const MAX_PASSWORD_HISTORY_RETENTION_WEEKS = 2;
19 export const SESSION_RESUME_RETRY_TIMEOUT = 15; /* seconds */
20 export const SESSION_RESUME_MAX_RETRIES = 7;
22 export const MAX_VAULT_MEMBERS = 10;
23 export const MAX_CUSTOM_ADDRESSES = 10;
25 /** Matches 80% of the `SETTINGS_MAX_CONCURRENT_STREAMS=25`
26 * production API configuration */
27 export const API_CONCURRENCY_TRESHOLD = 20;
29 export const PASS_WEB_APP_URL = 'https://pass.proton.me';
30 export const PASS_LEARN_MORE_URL = 'https://proton.me/pass';
31 export const PASS_VIDEO_URL = 'https://www.youtube.com/embed/Nm4DCAjePOM?cc_load_policy=1';
32 export const PASS_ANDROID_URL = 'https://play.google.com/store/apps/details?id=proton.android.pass';
33 export const PASS_IOS_URL = 'https://apps.apple.com/us/app/proton-pass-password-manager/id6443490629';
34 export const PASS_X_URL = 'https://x.com/Proton_Pass';
35 export const PASS_REDDIT_URL = 'https://www.reddit.com/r/ProtonPass/';
36 export const PASS_REQUEST_URL = 'https://protonmail.uservoice.com/forums/953584-proton-pass';
37 export const PASS_BLOG_TRIAL_URL = 'https://proton.me/support/pass-trial';
38 export const PASS_BLOG_MONITORING_URL = 'https://proton.me/support/dark-web-monitoring';
39 export const PASS_CHROME_URL = 'https://chrome.google.com/webstore/detail/proton-pass/ghmbeldphafepmbegfdlkpapadhbakde';
40 export const PASS_FIREFOX_URL = 'https://addons.mozilla.org/en-US/firefox/addon/proton-pass/';
41 export const PASS_SENTINEL_LINK = 'https://proton.me/blog/sentinel-included-pass-plus';
42 export const PASS_LINUX_VERSION_URL = 'https://proton.me/download/PassDesktop/linux/x64/version.json';
43 export const PASS_LINUX_DOWNLOAD_URL = 'https://proton.me/support/set-up-proton-pass-linux';
44 export const PASS_DESKTOP_CHANGELOG_URL =
45 'https://github.com/ProtonMail/WebClients/blob/main/applications/pass-desktop/CHANGELOG.md';
46 export const SIMPLELOGIN_DOMAIN_SETTINGS_URL = 'https://app.simplelogin.io/dashboard/custom_domain';
47 export const WEBSITE_RULES_URL = 'https://proton.me/download/pass/auto-detection/rules.json';
48 export const PASS_DOWNLOAD_URL = 'https://proton.me/pass/download';
49 export const PASS_TROUBLESHOOT_URL = 'https://proton.me/support/pass-troubleshooting';
51 export const WEBSITE_RULES_SUPPORTED_VERSION = '1';
53 export const ITEM_COUNT_RATING_PROMPT = 10;
55 export enum AccountPath {
56 ACCOUNT_PASSWORD = 'pass/account-password',
57 ACCOUNT_PASSWORD_2FA = 'pass/account-password#two-fa',
58 USERS = 'pass/users-addresses',
59 POLICIES = 'pass/policies',
62 export enum UpsellRefPrefix {
63 Extension = 'pass_extension',
65 Desktop = 'pass_desktop',
68 export enum UpsellRef {
70 FREE_TRIAL = 'free_trial_banner',
71 IDENTITY_CUSTOM_FIELDS = 'identity_custom_fields',
72 LIMIT_2FA = '2fa_limit',
73 LIMIT_ALIAS = 'alias_limit',
74 LIMIT_AUTOFILL = 'autofill_limit',
75 LIMIT_CC = 'credit_card_limit',
76 LIMIT_EXTRA_FIELD = 'extra_field_limit',
77 LIMIT_IMPORT = 'import_limit',
78 LIMIT_SHARING = 'limit_share',
79 LIMIT_VAULT = 'vault_limit',
81 SECURE_LINKS = 'secure_links',
83 PASS_MONITOR = 'pass_monitor',
84 PASS_BIOMETRICS = 'pass_biometrics',
85 PASS_FAMILY_FREE_399 = 'pass_family_free_399',
86 PASS_FAMILY_PLUS_399 = 'pass_family_plus_399',
87 PASS_FAMILY_1LT_299 = 'pass_family_1lt_299',
90 export const MAX_LOCAL_STORAGE_SIZE = 5 * 1024 * 1024; /* 5MB */
91 export const MAX_LOG_STORAGE_RATIO = 0.2; /* 20% of available storage space */
92 export const MAX_LOG_STORAGE_LINES = 2_000;
93 export const AVERAGE_BYTES_PER_LOG_LINE = 100;
94 export const SAFARI_MESSAGE_KEY = 'application.id';
95 export const SAFARI_URL_SCHEME = 'proton-pass:';
96 export const BIOMETRICS_KEY = 'offlineKey_biometrics';
98 /** Default feature flag states : These values are used as a
99 * fallback if the feature flag endpoint is unavailable.
100 * FIXME: Remove feature flags that are permanently enabled */
101 export const DEFAULT_PASS_FEATURES: FeatureFlagState = {
102 [PassFeature.PassAccountSwitchV1]: false,
103 [PassFeature.PassEnableDesktopAutoUpdate]: false,
104 [PassFeature.PassFamilyPlanPromo2024]: false,
105 [PassFeature.PassKillSSO]: false,
106 [PassFeature.PassSimpleLoginAliasesSync]: false,
107 [PassFeature.PassWebInternalAlpha]: false,
108 [PassFeature.PassWebOfflineMode]: false,
111 /** NOTE: Timeout mostly used to avoid Safari extension
112 * limbo state when the service-worker is corrupted */
113 export const RUNTIME_RELOAD_TIMEOUT = 2_000; /* ms */
114 export const RUNTIME_RELOAD_THROTTLE = 10; /* seconds */
116 export const PASS_DEFAULT_THEME = PassThemeOption.PassDark;