1 import type { enums } from '@proton/crypto';
3 import type { KeyGenConfig, MaxKeys } from './interfaces';
5 export const DEFAULT_TIMEOUT = 30000; // default fetch timeout
6 export const RETRY_DELAY_MAX = 10; // seconds
7 export const RETRY_ATTEMPTS_MAX = 5; // how many times to try the same request
8 export const OFFLINE_RETRY_DELAY = 2000; // how much time in ms to wait before retrying an offline request
9 export const OFFLINE_RETRY_ATTEMPTS_MAX = 0; // how many times to try the same request when offline
10 export const SECOND = 1000;
11 export const MINUTE = 60 * SECOND;
12 export const HOUR = 60 * MINUTE;
13 export const DAY = 24 * HOUR;
14 export const WEEK = 7 * DAY;
15 export const MONTH = 4 * WEEK;
16 export const YEAR = 12 * MONTH;
17 export const MINUTE_IN_SECONDS = 60;
18 export const HOUR_IN_SECONDS = 60 * MINUTE_IN_SECONDS;
19 export const DAY_IN_SECONDS = 24 * HOUR_IN_SECONDS;
21 // Max quantity for all addons
22 export const MAX_VPN_ADDON = 2000;
23 export const MAX_MEMBER_ADDON = 5000;
24 export const MAX_MEMBER_SCRIBE_ADDON = 5000;
25 export const MAX_DOMAIN_PRO_ADDON = 99;
26 export const MAX_DOMAIN_PLUS_ADDON = 10;
27 export const MAX_ADDRESS_ADDON = 10;
29 export const MAX_MEMBER_VPN_B2B_ADDON = 5000;
30 export const MAX_IPS_ADDON = 100;
32 export const DOMAIN_PLACEHOLDER = 'example.com';
33 export const EMAIL_PLACEHOLDER = 'john.doe@example.com';
34 export const USERNAME_PLACEHOLDER = 'john.doe';
35 export const NAME_PLACEHOLDER = 'Thomas A. Anderson';
37 export const BRAND_NAME = 'Proton';
38 export const MAIL_SHORT_APP_NAME = 'Mail';
39 export const MAIL_APP_NAME = `${BRAND_NAME} ${MAIL_SHORT_APP_NAME}`;
40 export const CONTACTS_SHORT_APP_NAME = 'Contacts';
41 export const CONTACTS_APP_NAME = `${BRAND_NAME} ${CONTACTS_SHORT_APP_NAME}`;
42 export const CALENDAR_SHORT_APP_NAME = 'Calendar';
43 export const CALENDAR_APP_NAME = `${BRAND_NAME} ${CALENDAR_SHORT_APP_NAME}`;
44 export const DRIVE_SHORT_APP_NAME = 'Drive';
45 export const DRIVE_APP_NAME = `${BRAND_NAME} ${DRIVE_SHORT_APP_NAME}`;
46 export const PASS_SHORT_APP_NAME = 'Pass';
47 export const PASS_APP_NAME = `${BRAND_NAME} ${PASS_SHORT_APP_NAME}`;
48 export const VPN_SHORT_APP_NAME = 'VPN';
49 export const VPN_APP_NAME = `${BRAND_NAME} ${VPN_SHORT_APP_NAME}`;
50 export const DOCS_SHORT_APP_NAME = 'Docs';
51 export const DOCS_APP_NAME = `${BRAND_NAME} ${DOCS_SHORT_APP_NAME}`;
52 export const DOCS_EDITOR_SHORT_APP_NAME = 'Docs Editor';
53 export const DOCS_EDITOR_APP_NAME = `${BRAND_NAME} ${DOCS_EDITOR_SHORT_APP_NAME}`;
54 export const VERIFY_APP_NAME = 'Proton Verify';
55 export const WALLET_SHORT_APP_NAME = 'Wallet';
56 export const WALLET_APP_NAME = `${BRAND_NAME} ${WALLET_SHORT_APP_NAME}`;
57 export const REFERRER_CODE_MAIL_TRIAL = 'MAILPLUSTRIAL';
58 export const PROTON_SENTINEL_NAME = 'Proton Sentinel';
59 export const DARK_WEB_MONITORING_NAME = 'Dark Web Monitoring';
62 PROTONACCOUNT: 'proton-account',
63 PROTONACCOUNTLITE: 'proton-account-lite',
64 PROTONVPNBROWSEREXTENSION: 'proton-vpn-browser-extension',
65 PROTONMAIL: 'proton-mail',
66 PROTONCONTACTS: 'proton-contacts',
67 PROTONDRIVE: 'proton-drive',
68 PROTONCALENDAR: 'proton-calendar',
69 PROTONPASS: 'proton-pass',
70 PROTONVPN_SETTINGS: 'proton-vpn-settings',
71 PROTONADMIN: 'proton-admin',
72 PROTONVERIFICATION: 'proton-verify',
73 PROTONEXTENSION: 'proton-extension',
74 PROTONWALLET: 'proton-wallet',
75 PROTONPASSBROWSEREXTENSION: 'proton-pass-extension',
76 PROTONDOCS: 'proton-docs',
77 PROTONDOCSEDITOR: 'proton-docs-editor',
80 interface AppConfiguration {
86 windowsClientID?: string;
87 macosClientID?: string;
88 linuxClientID?: string;
93 export const APPS_CONFIGURATION: { [key in APP_NAMES]: AppConfiguration } = {
94 [APPS.PROTONACCOUNT]: {
97 name: 'Proton Account',
99 clientID: 'web-account',
100 icon: 'brand-proton',
101 settingsSlug: 'account',
103 [APPS.PROTONACCOUNTLITE]: {
105 subdomain: 'account',
106 name: 'Proton Account',
108 clientID: 'web-account-lite',
109 windowsClientID: 'windows-mail',
110 macosClientID: 'macos-mail',
111 linuxClientID: 'linux-mail',
112 icon: 'brand-proton',
113 settingsSlug: 'account',
115 [APPS.PROTONVPNBROWSEREXTENSION]: {
118 name: 'Proton VPN Browser Extension',
119 bareName: 'Browser VPN Extension',
120 clientID: 'browser-vpn',
121 icon: 'brand-proton-vpn',
128 bareName: MAIL_SHORT_APP_NAME,
129 clientID: 'web-mail',
130 windowsClientID: 'windows-mail',
131 macosClientID: 'macos-mail',
132 linuxClientID: 'linux-mail',
133 icon: 'brand-proton-mail',
134 settingsSlug: 'mail',
136 [APPS.PROTONCONTACTS]: {
137 publicPath: '/contacts',
138 subdomain: 'contacts',
139 name: 'ProtonContacts',
140 bareName: 'Contacts',
141 clientID: 'web-contacts',
142 icon: 'brand-proton',
143 settingsSlug: 'contacts',
145 [APPS.PROTONDRIVE]: {
146 publicPath: '/drive',
148 name: DRIVE_APP_NAME,
149 bareName: DRIVE_SHORT_APP_NAME,
150 clientID: 'web-drive',
151 icon: 'brand-proton-drive',
152 settingsSlug: 'drive',
154 [APPS.PROTONCALENDAR]: {
155 publicPath: '/calendar',
156 subdomain: 'calendar',
157 name: CALENDAR_APP_NAME,
158 bareName: CALENDAR_SHORT_APP_NAME,
159 clientID: 'web-calendar',
160 windowsClientID: 'windows-mail',
161 macosClientID: 'macos-mail',
162 linuxClientID: 'linux-mail',
163 icon: 'brand-proton-calendar',
164 settingsSlug: 'calendar',
170 bareName: PASS_SHORT_APP_NAME,
171 clientID: 'web-pass',
172 windowsClientID: 'windows-pass',
173 macosClientID: 'macos-pass',
174 linuxClientID: 'linux-pass',
175 icon: 'brand-proton-pass',
176 settingsSlug: 'pass',
178 [APPS.PROTONEXTENSION]: {
182 bareName: PASS_SHORT_APP_NAME,
183 clientID: 'browser-pass',
187 [APPS.PROTONPASSBROWSEREXTENSION]: {
191 bareName: PASS_SHORT_APP_NAME,
192 clientID: 'browser-pass',
196 [APPS.PROTONVPN_SETTINGS]: {
200 bareName: VPN_SHORT_APP_NAME,
201 clientID: 'web-vpn-settings',
202 icon: 'brand-proton-vpn',
205 [APPS.PROTONADMIN]: {
210 clientID: 'web-admin',
211 icon: 'brand-proton',
214 [APPS.PROTONVERIFICATION]: {
217 name: VERIFY_APP_NAME,
219 clientID: 'web-verify',
220 icon: 'brand-proton',
223 [APPS.PROTONWALLET]: {
226 name: WALLET_APP_NAME,
228 clientID: 'web-wallet',
229 icon: 'brand-proton',
230 settingsSlug: 'wallet',
236 bareName: DOCS_SHORT_APP_NAME,
237 clientID: 'web-docs',
238 icon: 'brand-proton', // TODO: brand icon for Docs
239 settingsSlug: 'docs',
241 [APPS.PROTONDOCSEDITOR]: {
243 subdomain: 'docs-editor',
244 name: DOCS_EDITOR_APP_NAME,
245 bareName: DOCS_EDITOR_SHORT_APP_NAME,
246 clientID: 'web-docs-editor',
247 icon: 'brand-proton', // TODO: brand icon for Docs
248 settingsSlug: 'docs-editor',
252 export enum PRODUCT {
261 export enum PRODUCT_BIT {
270 export type APP_KEYS = keyof typeof APPS;
271 export type APP_NAMES = (typeof APPS)[APP_KEYS];
272 export type APP_CLIENT_IDS =
273 | (typeof APPS_CONFIGURATION)[keyof typeof APPS_CONFIGURATION]['clientID']
276 export const VPN_TV_CLIENT_IDS = {
277 APPLE: 'apple_tv-vpn',
278 ANDROID: 'android_tv-vpn',
281 export const VPN_TV_PATHS_MAP = {
285 export const VPN_TV_PATHS = Object.values(VPN_TV_PATHS_MAP);
287 export const SSO_PATHS = {
288 EXTERNAL_SSO_LOGIN: '/sso/login',
289 OAUTH_AUTHORIZE: '/oauth/authorize',
290 OAUTH_CONFIRM_FORK: '/oauth/confirm',
291 AUTHORIZE: '/authorize',
296 APP_SWITCHER: '/apps',
297 RESET_PASSWORD: '/reset-password',
298 FORGOT_USERNAME: '/forgot-username',
299 MAIL_SIGNUP: '/mail/signup',
300 MAIL_SIGNUP_B2B: '/mail/signup/business',
301 MAIL_SIGN_IN: '/mail',
302 CALENDAR_SIGNUP: '/calendar/signup',
303 CALENDAR_SIGNUP_B2B: '/calendar/signup/business',
304 CALENDAR_SIGN_IN: '/calendar',
305 DRIVE_SIGNUP: '/drive/signup',
306 DRIVE_SIGN_IN: '/drive',
307 BUSINESS_SIGNUP: '/business/signup',
308 VPN_SIGNUP: '/vpn/signup',
309 VPN_PRICING: '/vpn/pricing',
311 PASS_SIGNUP: '/pass/signup',
312 PASS_SIGNUP_B2B: '/pass/signup/business',
313 PASS_SIGN_IN: '/pass',
314 DOCS_SIGNUP: '/docs/signup',
315 DOCS_SIGN_IN: '/docs',
316 WALLET_SIGNUP: '/wallet/signup',
317 WALLET_SIGN_IN: '/wallet',
319 INVITE: '/pre-invite',
320 REFER: '/refer-a-friend',
322 JOIN_MAGIC_LINK: '/join',
324 export const SETUP_ADDRESS_PATH = '/setup-address';
326 export const SECURITY_CHECKUP_PATHS = {
327 ROOT: '/security-checkup',
328 SET_PHRASE: '/security-checkup/phrase',
329 SET_EMAIL: '/security-checkup/email',
330 VERIFY_EMAIL: '/security-checkup/email/verify',
331 ENABLE_EMAIL: '/security-checkup/email/enable',
332 SET_PHONE: '/security-checkup/phone',
333 VERIFY_PHONE: '/security-checkup/phone/verify',
334 ENABLE_PHONE: '/security-checkup/phone/enable',
335 ENABLE_DEVICE_RECOVERY: '/security-checkup/device',
338 export const VPN_HOSTNAME = 'account.protonvpn.com';
340 export enum HTTP_STATUS_CODE {
347 UNPROCESSABLE_ENTITY = 422,
348 TOO_MANY_REQUESTS = 429,
349 INTERNAL_SERVER_ERROR = 500,
352 export enum API_CODES {
353 GLOBAL_SUCCESS = 1001,
354 SINGLE_SUCCESS = 1000,
355 NOT_ALLOWED_ERROR = 2011,
356 INVALID_REQUIREMENT_ERROR = 2000,
357 INVALID_LINK_TYPE_ERROR = 2001,
358 ALREADY_EXISTS_ERROR = 2500,
359 NOT_FOUND_ERROR = 2501,
360 INVALID_ID_ERROR = 2061,
363 export const GET_VTIMEZONES_API_LIMIT = 10;
364 export const GET_CANONICAL_EMAILS_API_LIMIT = 100;
366 export enum ACCOUNT_DELETION_REASONS {
367 DIFFERENT_ACCOUNT = 'DIFFERENT_ACCOUNT',
368 TOO_EXPENSIVE = 'TOO_EXPENSIVE',
369 MISSING_FEATURE = 'MISSING_FEATURE',
370 USE_OTHER_SERVICE = 'USE_OTHER_SERVICE',
374 export const FORBIDDEN_LABEL_NAMES = ['inbox', 'drafts', 'sent', 'starred', 'archive', 'spam', 'trash', 'outbox'];
376 export enum SUBSCRIPTION_CANCELLATION_REASONS {
377 DIFFERENT_ACCOUNT = 'DIFFERENT_ACCOUNT',
378 TOO_EXPENSIVE = 'TOO_EXPENSIVE',
379 MISSING_FEATURE = 'MISSING_FEATURE',
380 QUALITY_ISSUE = 'QUALITY_ISSUE',
381 STREAMING_SERVICE_UNSUPPORTED = 'STREAMING_SERVICE_UNSUPPORTED',
382 SWITCHING_TO_DIFFERENT_SERVICE = 'SWITCHING_TO_DIFFERENT_SERVICE',
383 VPN_CONNECTION_ISSUE = 'VPN_CONNECTION_ISSUE',
384 NOT_WILLING_TO_SHARE = 'NOT_WILLING_TO_SHARE',
385 TEMPORARY = 'TEMPORARY',
389 export const INTERVAL_EVENT_TIMER = 30 * 1000;
390 export const MAX_SIZE_SCREENSHOT = 500 * 1000;
392 export enum EVENT_ACTIONS {
400 export enum USER_ROLES {
406 export enum INVOICE_OWNER {
411 export const DEFAULT_CURRENCY = 'EUR';
412 export const CURRENCIES = ['EUR', 'USD', 'CHF'] as const;
413 export const MIN_CREDIT_AMOUNT = 500;
414 export const MAX_CREDIT_AMOUNT = 4000000;
415 export const MIN_BITCOIN_AMOUNT = 499;
416 export const MAX_BITCOIN_AMOUNT = MAX_CREDIT_AMOUNT;
417 export const DEFAULT_CREDITS_AMOUNT = 5000;
419 export enum INVOICE_TYPE {
430 CURRENCY_CONVERSION = 10,
433 export enum INVOICE_STATE {
441 export enum UNPAID_STATE {
449 export const BASE_SIZE = 1024;
450 export const GIGA = BASE_SIZE ** 3;
452 export enum MEMBER_TYPE {
457 export enum ADDRESS_STATUS {
463 export enum ADDRESS_TYPE {
466 TYPE_CUSTOM_DOMAIN = 3,
472 export enum ADDRESS_RECEIVE {
477 export enum ADDRESS_SEND {
482 export enum ADDRESS_PERMISSIONS {
484 PERMISSIONS_RECEIVE_ALL = 1,
485 PERMISSIONS_SEND_ALL = 2,
486 PERMISSIONS_AUTORESPONDER = 4,
487 PERMISSIONS_RECEIVE_ORG = 8,
488 PERMISSIONS_SEND_ORG = 16,
491 export enum ADDRESS_PERMISSION_TYPE {
496 export enum ADDRESS_FLAGS {
497 FLAG_DISABLE_E2EE = 16,
498 FLAG_DISABLE_EXPECTED_SIGNED = 32,
501 export enum MEMBER_PERMISSIONS {
502 MANAGE_FORWARDING = 1,
505 export enum MEMBER_PRIVATE {
510 export enum MEMBER_ROLE {
511 ORGANIZATION_NONE = 0,
512 ORGANIZATION_MEMBER = 1,
513 ORGANIZATION_ADMIN = 2,
516 export enum MEMBER_SUBSCRIBER {
521 export enum PACKAGE_SIGNATURES_MODE {
523 SIGNATURES_ATTACHMENTS = 1,
527 export enum PGP_SCHEMES {
528 PGP_INLINE = 'pgp-inline',
529 PGP_MIME = 'pgp-mime',
532 export enum PGP_SCHEMES_MORE {
536 export type CONTACT_PGP_SCHEMES = PGP_SCHEMES | PGP_SCHEMES_MORE;
538 export enum MIME_TYPES {
539 MIME = 'multipart/mixed',
540 PLAINTEXT = 'text/plain',
541 DEFAULT = 'text/html',
542 ICS = 'text/calendar',
543 APPLICATION_ICS = 'application/ics', // Google's special one that doesn't have standard newlines
544 PGP_KEYS = 'application/pgp-keys',
547 export enum MIME_TYPES_MORE {
551 export type CONTACT_MIME_TYPES = MIME_TYPES.PLAINTEXT | MIME_TYPES.DEFAULT | MIME_TYPES_MORE.AUTOMATIC;
553 export enum RECIPIENT_TYPES {
559 * Returned by legacy GET /keys endpoint
561 export enum IGNORE_KT {
563 EXTERNAL_ADDRESS = 1,
567 export enum API_KEY_SOURCE {
573 export enum DRAFT_TYPE {
574 NORMAL = 'text/html',
575 PLAIN_TEXT = 'text/plain',
578 export enum ORGANIZATION_FLAGS {
582 NO_CYCLE_SCHEDULED = 8,
586 TO_MIGRATE_ORG_KEY = 1 << 9,
589 export enum ORGANIZATION_TWOFA_SETTING {
591 REQUIRED_ADMIN_ONLY = 1,
595 export enum ORGANIZATION_STATE {
600 export enum APP_UPSELL_REF_PATH {
601 MAIL_UPSELL_REF_PATH = 'upsell_mail-',
602 CALENDAR_UPSELL_REF_PATH = 'upsell_calendar-',
603 DRIVE_UPSELL_REF_PATH = 'upsell_drive-',
604 PASS_UPSELL_REF_PATH = 'upsell_pass-',
605 VPN_UPSELL_REF_PATH = 'upsell_vpn-',
606 INBOX_DESKTOP_REF_PATH = 'upsell_inbox_desktop-',
607 DOCS_UPSELL_REF_PATH = 'upsell_docs-',
608 ACCOUNT_UPSELL_REF_PATH = 'upsell_account-',
609 WALLET_UPSELL_REF_PATH = 'upsell_wallet-',
612 export enum UPSELL_COMPONENT {
619 export enum MAIL_UPSELL_PATHS {
620 AUTO_REPLY = 'auto-reply',
621 DOMAIN_NAMES = 'domain-names',
622 CATCH_ALL = 'catch-all',
625 SHORT_ADDRESS = 'short-address',
626 AUTO_DELETE = 'auto-delete',
627 SCHEDULE_SEND = 'schedule-send',
628 STORAGE_FULL = 'storage-full',
629 GET_STARTED_CHECKLIST = 'get-started-checklist',
630 MAIL_FOOTER = 'mail-footer',
631 UNLIMITED_FOLDERS = 'unlimited-folders',
632 UNLIMITED_LABELS = 'unlimited-labels',
633 UNLIMITED_FILTERS = 'unlimited-filters',
634 UNLIMITED_ADDRESSES = 'unlimited-addresses',
635 FORWARD_EMAILS = 'forward-emails',
636 SMTP_SUBMISSION = 'smtp-submission',
637 SNOOZE_MESSAGE = 'snooze-message',
638 PROTON_SENTINEL = 'proton-sentinel',
639 PASS_ALIASES = 'pass-aliases',
640 TRIAL_WELCOME = 'trial-welcome',
641 TRIAL_BANNER = 'trial-banner',
642 TRIAL_END = 'trial-end',
643 BREACH_ALERTS = 'breach-alerts',
644 SUBSCRIPTION_REMINDER_PRIVACY = 'subscription-reminder-privacy',
645 SUBSCRIPTION_REMINDER_PRODUCTIVITY = 'subscription-reminder-productivity',
646 ASSISTANT_TOGGLE = 'assistant-toggle',
647 ASSISTANT_TOGGLE_DOWNGRADE = 'assistant-toggle-downgrade',
648 ASSISTANT_COMPOSER = 'assistant-composer',
651 export enum CALENDAR_UPSELL_PATHS {
652 MULTI_CAL = 'multi-cal',
653 SHARE_CAL = 'share-cal',
655 COLOR_PER_EVENT = 'color-per-event',
658 export enum DRIVE_UPSELL_PATHS {
662 export enum SHARED_UPSELL_PATHS {
663 MULTI_USER = 'multi-user',
664 CONTACT_GROUP = 'contact-groups',
666 USER_DROPDOWN = 'user-dropdown',
667 STORAGE_PERCENTAGE = 'storage-percentage',
668 ORGANIZATION_CAPACITY = 'organization-capacity',
669 SENTINEL = 'sentinel',
670 TRIAL_WILL_END = 'trial-will-end',
671 TOP_NAVIGATION_BAR = 'top-navigation-bar',
674 export enum DASHBOARD_UPSELL_PATHS {
675 MAILPLUS = 'mailplus-dashboard',
676 MAILEPRO = 'mailpro-dashboard',
677 UNLIMITED = 'unlimited-dashboard',
678 DRIVE = 'drive-dashboard',
679 PASS = 'pass-dashboard',
680 VPN = 'vpn-dashboard',
681 DOCS = 'docs-dashboard',
682 WALLET = 'wallet-dashboard',
683 FAMILY = 'family-dashboard',
684 DUO = 'duo-dashboard',
685 BUSINESS = 'business-dashboard',
688 export const UPSELL_ONE_DOLLAR_PROMO_PATHS = [
689 MAIL_UPSELL_PATHS.UNLIMITED_LABELS,
690 MAIL_UPSELL_PATHS.UNLIMITED_FOLDERS,
691 MAIL_UPSELL_PATHS.UNLIMITED_FILTERS,
692 MAIL_UPSELL_PATHS.AUTO_DELETE,
693 MAIL_UPSELL_PATHS.SCHEDULE_SEND,
694 MAIL_UPSELL_PATHS.SNOOZE_MESSAGE,
695 SHARED_UPSELL_PATHS.CONTACT_GROUP,
698 export const LOYAL_BONUS_STORAGE = 5 * GIGA;
699 export const LOYAL_BONUS_CONNECTION = 2;
701 export const COVID_PLUS_BONUS_STORAGE = 5 * GIGA;
702 export const COVID_PROFESSIONAL_BONUS_STORAGE = 5 * GIGA;
703 export const COVID_VISIONARY_BONUS_STORAGE = 10 * GIGA;
705 export const FREE_VPN_CONNECTIONS = 1;
706 export const VPN_CONNECTIONS = 10;
718 export const DEFAULT_CYCLE = CYCLE.YEARLY;
720 export const BLACK_FRIDAY = {
721 COUPON_CODE: 'BF2022',
722 START: new Date(Date.UTC(2021, 10, 1, 5)), // 6 AM CET
723 END: new Date(Date.UTC(2022, 0, 1, 17)), // 6 PM CET
724 CYBER_START: new Date(Date.UTC(2020, 10, 30, 6)),
725 CYBER_END: new Date(Date.UTC(2020, 11, 1, 6)),
728 export const PRODUCT_PAYER = {
729 START: new Date(Date.UTC(2020, 9, 28, 6)),
730 END: new Date(Date.UTC(2020, 11, 15, 6)),
733 export const MIN_PAYPAL_AMOUNT_INHOUSE = 499;
734 export const MIN_PAYPAL_AMOUNT_CHARGEBEE = 100;
735 export const MAX_PAYPAL_AMOUNT = 99999900;
737 export enum NEWSLETTER_SUBSCRIPTIONS {
738 ANNOUNCEMENTS = 'Announcements',
739 /** not displayed anymore, turning on one product news should turn it on as well */
740 FEATURES = 'Features',
741 NEWSLETTER = 'Newsletter',
743 BUSINESS = 'Business',
745 /** used in `Messages & Composing` */
746 NEW_EMAIL_NOTIF = 'NewEmailNotif',
747 ONBOARDING = 'Onboarding',
748 USER_SURVEY = 'UserSurveys',
749 INBOX_NEWS = 'InboxNews',
750 VPN_NEWS = 'VpnNews',
751 DRIVE_NEWS = 'DriveNews',
752 PASS_NEWS = 'PassNews',
753 WALLET_NEWS = 'WalletNews',
756 export enum NEWSLETTER_SUBSCRIPTIONS_BITS {
757 ANNOUNCEMENTS = 1 << 0,
763 /** used in `Messages & Composing` */
764 NEW_EMAIL_NOTIF = 1 << 6,
766 USER_SURVEY = 1 << 8,
769 DRIVE_NEWS = 1 << 11,
771 WALLET_NEWS = 1 << 13,
774 export const NEWSLETTER_SUBSCRIPTIONS_BY_BITS: Record<NEWSLETTER_SUBSCRIPTIONS_BITS, NEWSLETTER_SUBSCRIPTIONS> = {
775 [NEWSLETTER_SUBSCRIPTIONS_BITS.ANNOUNCEMENTS]: NEWSLETTER_SUBSCRIPTIONS.ANNOUNCEMENTS,
776 [NEWSLETTER_SUBSCRIPTIONS_BITS.FEATURES]: NEWSLETTER_SUBSCRIPTIONS.FEATURES,
777 [NEWSLETTER_SUBSCRIPTIONS_BITS.NEWSLETTER]: NEWSLETTER_SUBSCRIPTIONS.NEWSLETTER,
778 [NEWSLETTER_SUBSCRIPTIONS_BITS.BETA]: NEWSLETTER_SUBSCRIPTIONS.BETA,
779 [NEWSLETTER_SUBSCRIPTIONS_BITS.BUSINESS]: NEWSLETTER_SUBSCRIPTIONS.BUSINESS,
780 [NEWSLETTER_SUBSCRIPTIONS_BITS.OFFERS]: NEWSLETTER_SUBSCRIPTIONS.OFFERS,
781 [NEWSLETTER_SUBSCRIPTIONS_BITS.NEW_EMAIL_NOTIF]: NEWSLETTER_SUBSCRIPTIONS.NEW_EMAIL_NOTIF,
782 [NEWSLETTER_SUBSCRIPTIONS_BITS.ONBOARDING]: NEWSLETTER_SUBSCRIPTIONS.ONBOARDING,
783 [NEWSLETTER_SUBSCRIPTIONS_BITS.USER_SURVEY]: NEWSLETTER_SUBSCRIPTIONS.USER_SURVEY,
784 [NEWSLETTER_SUBSCRIPTIONS_BITS.INBOX_NEWS]: NEWSLETTER_SUBSCRIPTIONS.INBOX_NEWS,
785 [NEWSLETTER_SUBSCRIPTIONS_BITS.VPN_NEWS]: NEWSLETTER_SUBSCRIPTIONS.VPN_NEWS,
786 [NEWSLETTER_SUBSCRIPTIONS_BITS.DRIVE_NEWS]: NEWSLETTER_SUBSCRIPTIONS.DRIVE_NEWS,
787 [NEWSLETTER_SUBSCRIPTIONS_BITS.PASS_NEWS]: NEWSLETTER_SUBSCRIPTIONS.PASS_NEWS,
788 [NEWSLETTER_SUBSCRIPTIONS_BITS.WALLET_NEWS]: NEWSLETTER_SUBSCRIPTIONS.WALLET_NEWS,
791 export const CONTACT_EMAILS_LIMIT = 1000;
792 export const CONTACTS_LIMIT = 1000;
793 export const EXPORT_CONTACTS_LIMIT = 50; // Maximum page size for export is 50 from API
794 export const CONTACTS_REQUESTS_PER_SECOND = 10;
795 export const ALL_MEMBERS_ID = -100;
797 export enum LABEL_EXCLUSIVE {
802 export const REGEX_IMAGE_EXTENSION = /\.(gif|jpe?g|tiff|png)$/i;
804 export const DARK_MODE_CLASS = 'isDarkMode';
806 export const MEMBER_ADDON_PREFIX = '1member';
807 export const DOMAIN_ADDON_PREFIX = '1domain';
808 export const IP_ADDON_PREFIX = '1ip';
809 export const SCRIBE_ADDON_PREFIX = '1scribe';
811 export enum ADDON_NAMES {
812 MEMBER_DRIVE_PRO = `${MEMBER_ADDON_PREFIX}-drivepro2022`,
813 MEMBER_MAIL_PRO = `${MEMBER_ADDON_PREFIX}-mailpro2022`,
814 MEMBER_MAIL_BUSINESS = `${MEMBER_ADDON_PREFIX}-mailbiz2024`,
815 MEMBER_BUNDLE_PRO = `${MEMBER_ADDON_PREFIX}-bundlepro2022`,
816 MEMBER_BUNDLE_PRO_2024 = `${MEMBER_ADDON_PREFIX}-bundlepro2024`,
817 DOMAIN_BUNDLE_PRO = `${DOMAIN_ADDON_PREFIX}-bundlepro2022`,
818 DOMAIN_BUNDLE_PRO_2024 = `${DOMAIN_ADDON_PREFIX}-bundlepro2024`,
819 MEMBER_ENTERPRISE = `${MEMBER_ADDON_PREFIX}-enterprise2022`,
820 DOMAIN_ENTERPRISE = `${DOMAIN_ADDON_PREFIX}-enterprise2022`,
821 MEMBER_VPN_PRO = `${MEMBER_ADDON_PREFIX}-vpnpro2023`,
822 MEMBER_VPN_BUSINESS = `${MEMBER_ADDON_PREFIX}-vpnbiz2023`,
823 IP_VPN_BUSINESS = `${IP_ADDON_PREFIX}-vpnbiz2023`,
824 MEMBER_PASS_PRO = `${MEMBER_ADDON_PREFIX}-passpro2024`,
825 MEMBER_PASS_BUSINESS = `${MEMBER_ADDON_PREFIX}-passbiz2024`,
826 MEMBER_SCRIBE_MAILPLUS = `${SCRIBE_ADDON_PREFIX}-mail2022`,
827 MEMBER_SCRIBE_MAIL_BUSINESS = `${SCRIBE_ADDON_PREFIX}-mailbiz2024`,
828 MEMBER_SCRIBE_DRIVEPLUS = `${SCRIBE_ADDON_PREFIX}-drive2022`,
829 MEMBER_SCRIBE_BUNDLE = `${SCRIBE_ADDON_PREFIX}-bundle2022`,
830 MEMBER_SCRIBE_PASS = `${SCRIBE_ADDON_PREFIX}-pass2023`,
831 MEMBER_SCRIBE_VPN = `${SCRIBE_ADDON_PREFIX}-vpn2022`,
832 MEMBER_SCRIBE_VPN2024 = `${SCRIBE_ADDON_PREFIX}-vpn2024`,
833 MEMBER_SCRIBE_VPN_PASS_BUNDLE = `${SCRIBE_ADDON_PREFIX}-vpnpass2023`,
834 MEMBER_SCRIBE_MAIL_PRO = `${SCRIBE_ADDON_PREFIX}-mailpro2022`,
835 MEMBER_SCRIBE_BUNDLE_PRO = `${SCRIBE_ADDON_PREFIX}-bundlepro2022`,
836 MEMBER_SCRIBE_BUNDLE_PRO_2024 = `${SCRIBE_ADDON_PREFIX}-bundlepro2024`,
837 MEMBER_SCRIBE_PASS_PRO = `${SCRIBE_ADDON_PREFIX}-passpro2024`,
838 MEMBER_SCRIBE_VPN_BIZ = `${SCRIBE_ADDON_PREFIX}-vpnbiz2023`,
839 MEMBER_SCRIBE_PASS_BIZ = `${SCRIBE_ADDON_PREFIX}-passbiz2024`,
840 MEMBER_SCRIBE_VPN_PRO = `${SCRIBE_ADDON_PREFIX}-vpnpro2023`,
841 MEMBER_SCRIBE_FAMILY = `${SCRIBE_ADDON_PREFIX}-family2022`,
842 MEMBER_SCRIBE_DUO = `${SCRIBE_ADDON_PREFIX}-duo2024`,
845 export const AddonKey: Readonly<{
846 [K in ADDON_NAMES]: MaxKeys;
848 [ADDON_NAMES.DOMAIN_BUNDLE_PRO]: 'MaxDomains',
849 [ADDON_NAMES.DOMAIN_BUNDLE_PRO_2024]: 'MaxDomains',
850 [ADDON_NAMES.DOMAIN_ENTERPRISE]: 'MaxDomains',
851 [ADDON_NAMES.MEMBER_MAIL_PRO]: 'MaxMembers',
852 [ADDON_NAMES.MEMBER_DRIVE_PRO]: 'MaxMembers',
853 [ADDON_NAMES.MEMBER_BUNDLE_PRO]: 'MaxMembers',
854 [ADDON_NAMES.MEMBER_BUNDLE_PRO_2024]: 'MaxMembers',
855 [ADDON_NAMES.MEMBER_ENTERPRISE]: 'MaxMembers',
856 [ADDON_NAMES.MEMBER_VPN_PRO]: 'MaxMembers',
857 [ADDON_NAMES.MEMBER_VPN_BUSINESS]: 'MaxMembers',
858 [ADDON_NAMES.IP_VPN_BUSINESS]: 'MaxIPs',
859 [ADDON_NAMES.MEMBER_PASS_PRO]: 'MaxMembers',
860 [ADDON_NAMES.MEMBER_PASS_BUSINESS]: 'MaxMembers',
861 [ADDON_NAMES.MEMBER_MAIL_BUSINESS]: 'MaxMembers',
862 [ADDON_NAMES.MEMBER_SCRIBE_MAILPLUS]: 'MaxAI',
863 [ADDON_NAMES.MEMBER_SCRIBE_DRIVEPLUS]: 'MaxAI',
864 [ADDON_NAMES.MEMBER_SCRIBE_BUNDLE]: 'MaxAI',
865 [ADDON_NAMES.MEMBER_SCRIBE_PASS]: 'MaxAI',
866 [ADDON_NAMES.MEMBER_SCRIBE_VPN]: 'MaxAI',
867 [ADDON_NAMES.MEMBER_SCRIBE_VPN2024]: 'MaxAI',
868 [ADDON_NAMES.MEMBER_SCRIBE_VPN_PASS_BUNDLE]: 'MaxAI',
869 [ADDON_NAMES.MEMBER_SCRIBE_MAIL_PRO]: 'MaxAI',
870 [ADDON_NAMES.MEMBER_SCRIBE_BUNDLE_PRO]: 'MaxAI',
871 [ADDON_NAMES.MEMBER_SCRIBE_BUNDLE_PRO_2024]: 'MaxAI',
872 [ADDON_NAMES.MEMBER_SCRIBE_PASS_PRO]: 'MaxAI',
873 [ADDON_NAMES.MEMBER_SCRIBE_VPN_BIZ]: 'MaxAI',
874 [ADDON_NAMES.MEMBER_SCRIBE_PASS_BIZ]: 'MaxAI',
875 [ADDON_NAMES.MEMBER_SCRIBE_VPN_PRO]: 'MaxAI',
876 [ADDON_NAMES.MEMBER_SCRIBE_FAMILY]: 'MaxAI',
877 [ADDON_NAMES.MEMBER_SCRIBE_DUO]: 'MaxAI',
878 [ADDON_NAMES.MEMBER_SCRIBE_MAIL_BUSINESS]: 'MaxAI',
881 export const AddonLimit = {
882 [ADDON_NAMES.DOMAIN_BUNDLE_PRO]: MAX_DOMAIN_PRO_ADDON,
883 [ADDON_NAMES.DOMAIN_BUNDLE_PRO_2024]: MAX_DOMAIN_PRO_ADDON,
884 [ADDON_NAMES.DOMAIN_ENTERPRISE]: MAX_DOMAIN_PRO_ADDON,
885 [ADDON_NAMES.MEMBER_MAIL_PRO]: MAX_MEMBER_ADDON,
886 [ADDON_NAMES.MEMBER_DRIVE_PRO]: MAX_MEMBER_ADDON,
887 [ADDON_NAMES.MEMBER_BUNDLE_PRO]: MAX_MEMBER_ADDON,
888 [ADDON_NAMES.MEMBER_BUNDLE_PRO_2024]: MAX_MEMBER_ADDON,
889 [ADDON_NAMES.MEMBER_ENTERPRISE]: MAX_MEMBER_ADDON,
890 [ADDON_NAMES.MEMBER_VPN_PRO]: MAX_MEMBER_VPN_B2B_ADDON,
891 [ADDON_NAMES.MEMBER_VPN_BUSINESS]: MAX_MEMBER_VPN_B2B_ADDON,
892 [ADDON_NAMES.IP_VPN_BUSINESS]: MAX_IPS_ADDON,
893 [ADDON_NAMES.MEMBER_PASS_PRO]: MAX_MEMBER_ADDON,
894 [ADDON_NAMES.MEMBER_PASS_BUSINESS]: MAX_MEMBER_ADDON,
895 [ADDON_NAMES.MEMBER_MAIL_BUSINESS]: MAX_MEMBER_ADDON,
896 [ADDON_NAMES.MEMBER_SCRIBE_MAILPLUS]: MAX_IPS_ADDON,
897 [ADDON_NAMES.MEMBER_SCRIBE_BUNDLE_PRO]: MAX_IPS_ADDON,
898 [ADDON_NAMES.MEMBER_SCRIBE_BUNDLE_PRO_2024]: MAX_IPS_ADDON,
899 [ADDON_NAMES.MEMBER_SCRIBE_DRIVEPLUS]: MAX_IPS_ADDON,
900 [ADDON_NAMES.MEMBER_SCRIBE_BUNDLE]: MAX_IPS_ADDON,
901 [ADDON_NAMES.MEMBER_SCRIBE_PASS]: MAX_IPS_ADDON,
902 [ADDON_NAMES.MEMBER_SCRIBE_VPN]: MAX_IPS_ADDON,
903 [ADDON_NAMES.MEMBER_SCRIBE_VPN2024]: MAX_IPS_ADDON,
904 [ADDON_NAMES.MEMBER_SCRIBE_VPN_PASS_BUNDLE]: MAX_IPS_ADDON,
905 [ADDON_NAMES.MEMBER_SCRIBE_MAIL_PRO]: MAX_IPS_ADDON,
906 [ADDON_NAMES.MEMBER_SCRIBE_PASS_PRO]: MAX_IPS_ADDON,
907 [ADDON_NAMES.MEMBER_SCRIBE_VPN_BIZ]: MAX_IPS_ADDON,
908 [ADDON_NAMES.MEMBER_SCRIBE_PASS_BIZ]: MAX_IPS_ADDON,
909 [ADDON_NAMES.MEMBER_SCRIBE_VPN_PRO]: MAX_IPS_ADDON,
910 [ADDON_NAMES.MEMBER_SCRIBE_FAMILY]: MAX_IPS_ADDON,
911 [ADDON_NAMES.MEMBER_SCRIBE_DUO]: MAX_IPS_ADDON,
912 [ADDON_NAMES.MEMBER_SCRIBE_MAIL_BUSINESS]: MAX_IPS_ADDON,
915 export enum PLAN_TYPES {
920 export enum PLAN_SERVICES {
927 export const FREE_SUBSCRIPTION = {
928 isFreeSubscription: true,
931 CouponCode: undefined,
933 UpcomingSubscription: undefined,
936 export type FreeSubscription = typeof FREE_SUBSCRIPTION;
938 export function isFreeSubscription(obj: any): obj is FreeSubscription {
939 return !!obj && obj.isFreeSubscription && Object.keys(obj).filter((key) => obj[key] !== undefined).length === 1;
945 DRIVE_PRO = 'drivepro2022',
948 MAIL_PRO = 'mailpro2022',
949 MAIL_BUSINESS = 'mailbiz2024',
952 WALLET = 'wallet2024',
953 BUNDLE = 'bundle2022',
954 BUNDLE_PRO = 'bundlepro2022',
955 BUNDLE_PRO_2024 = 'bundlepro2024',
956 ENTERPRISE = 'enterprise2022',
957 FAMILY = 'family2022',
959 VISIONARY = 'visionary2022',
960 VPN_PRO = 'vpnpro2023',
961 VPN_BUSINESS = 'vpnbiz2023',
962 VPN_PASS_BUNDLE = 'vpnpass2023',
963 PASS_PRO = 'passpro2024',
964 PASS_BUSINESS = 'passbiz2024',
967 export const isStringPLAN = (value: string): value is PLANS => Object.values(PLANS).includes(value as PLANS);
969 export const PLAN_NAMES = {
970 [PLANS.FREE]: 'Free',
971 [PLANS.VPN2024]: 'Plus',
972 [PLANS.DRIVE]: 'Drive Plus',
973 [PLANS.DRIVE_PRO]: 'Drive Essentials',
974 [PLANS.PASS]: 'Pass Plus',
975 [PLANS.MAIL]: 'Mail Plus',
976 [PLANS.MAIL_PRO]: 'Mail Essentials',
977 [PLANS.MAIL_BUSINESS]: 'Mail Professional',
978 [PLANS.VPN]: 'VPN Plus',
979 [PLANS.WALLET]: 'Wallet Plus',
980 [PLANS.BUNDLE]: 'Proton Unlimited',
981 [PLANS.BUNDLE_PRO]: 'Proton Business Suite',
982 [PLANS.BUNDLE_PRO_2024]: 'Proton Business Suite',
983 [PLANS.ENTERPRISE]: 'Enterprise',
984 [PLANS.FAMILY]: 'Proton Family',
985 [PLANS.DUO]: 'Proton Duo',
986 [PLANS.VISIONARY]: 'Proton Visionary',
987 [PLANS.VPN_PRO]: 'VPN Essentials',
988 [PLANS.VPN_BUSINESS]: 'VPN Professional',
989 [PLANS.VPN_PASS_BUNDLE]: 'VPN and Pass bundle',
990 [PLANS.PASS_PRO]: 'Pass Essentials',
991 [PLANS.PASS_BUSINESS]: 'Pass Professional',
994 export enum COUPON_CODES {
995 BLACK_FRIDAY_2022 = 'BF2022',
996 BLACK_FRIDAY_2023 = 'BF2023',
997 MAIL_BLACK_FRIDAY_2022 = 'MAILBF2022',
998 VPN_BLACK_FRIDAY_2022 = 'VPNBF2022',
999 LIFETIME = 'LIFETIME',
1000 REFERRAL = 'REFERRAL',
1001 END_OF_YEAR_2023 = 'EOY2023',
1002 EOY_2023_1M_INTRO = 'EOY1MINTRO',
1003 PASS_B2B_INTRO = 'PASS2024B2BINTRO',
1004 VPN_INTRO_2024 = 'VPNINTROPRICE2024',
1005 MEMBER_DOWNGRADE_TRIAL = 'MEMBER_DOWNGRADE_TRIAL',
1006 MARCHSAVINGS24 = 'MARCHSAVINGS24',
1007 HONEYPROTONSAVINGS = 'HONEYPROTONSAVINGS',
1008 TRYMAILPLUS2024 = 'TRYMAILPLUS2024',
1009 MAILPLUSINTRO = 'MAILPLUSINTRO',
1010 TRYVPNPLUS2024 = 'TRYVPNPLUS2024',
1011 PREMIUM_DEAL = 'PREMIUM_DEAL',
1012 TRYDRIVEPLUS2024 = 'DRIVEPLUSINTRO2024',
1014 TECHRADARVPNPASS = 'TECHRADARVPNPASS',
1015 CNETVPNPASS = 'CNETVPNPASS',
1016 ZDNETVPNPASS = 'ZDNETVPNPASS',
1017 RESTOREPRIVACYVPNPASS = 'RESTOREPRIVACYVPNPASS',
1018 ENGADGETVPNPASS = 'ENGADGETVPNPASS',
1019 COMPARITECHVPNPASS = 'COMPARITECHVPNPASS',
1020 PROPRIVACYVPNPASS = 'PROPRIVACYVPNPASS',
1021 BLEEPINGCOMPUTERVPNPASS = 'BLEEPINGCOMPUTERVPNPASS',
1022 PCMAGVPNPASS = 'PCMAGVPNPASS',
1024 TRYMAILPLUS0724 = 'TRYMAILPLUS0724',
1027 export const VPN_PASS_PROMOTION_COUPONS = [
1028 COUPON_CODES.TECHRADARVPNPASS,
1029 COUPON_CODES.CNETVPNPASS,
1030 COUPON_CODES.ZDNETVPNPASS,
1031 COUPON_CODES.RESTOREPRIVACYVPNPASS,
1032 COUPON_CODES.ENGADGETVPNPASS,
1033 COUPON_CODES.COMPARITECHVPNPASS,
1034 COUPON_CODES.PROPRIVACYVPNPASS,
1035 COUPON_CODES.BLEEPINGCOMPUTERVPNPASS,
1036 COUPON_CODES.PCMAGVPNPASS,
1039 export const FAMILY_MAX_USERS = 6;
1040 export const DUO_MAX_USERS = 2;
1042 export const KEY_EXTENSION = 'asc';
1043 export const KEY_FILE_EXTENSION = `.${KEY_EXTENSION}`;
1045 export enum KEYGEN_TYPES {
1046 CURVE25519 = 'CURVE25519',
1049 export const DEFAULT_KEYGEN_TYPE = KEYGEN_TYPES.CURVE25519;
1051 export const KEYGEN_CONFIGS: { [key: string]: KeyGenConfig } = {
1052 [KEYGEN_TYPES.CURVE25519]: {
1054 curve: 'ed25519Legacy' as enums.curve,
1058 export enum KEY_FLAG {
1059 FLAG_EMAIL_NO_SIGN = 8,
1061 * Key can't be used to encrypt email. There are multiple scenarios where this can happen
1062 * - the key is associated to a product without Mail, like Drive or VPN
1063 * - the key is associated to an external address
1064 * - the key is associated to an internal address e2e encryption disabled (e.g. because of forwarding)
1066 FLAG_EMAIL_NO_ENCRYPT = 4,
1067 // Key can be used to encrypt
1068 FLAG_NOT_OBSOLETE = 2,
1069 // Key can be used to verify signatures
1070 FLAG_NOT_COMPROMISED = 1,
1073 export enum USER_STATUS {
1082 export enum MAILBOX_IDENTIFIERS {
1098 export enum INCOMING_DEFAULTS_LOCATION {
1099 INBOX = Number(MAILBOX_IDENTIFIERS.inbox),
1100 SPAM = Number(MAILBOX_IDENTIFIERS.spam),
1104 /* eslint no-useless-escape: "off" */
1105 export const REGEX_EMAIL =
1106 /(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/i;
1108 export enum FILTER_STATUS {
1113 export const FREE_USER_ACTIVE_FILTERS_LIMIT = 1;
1114 export const FREE_USER_FOLDERS_LIMIT = 3;
1115 export const FREE_USER_LABELS_LIMIT = 3;
1117 export const VCARD_VERSION = '4.0';
1119 export enum CONTACT_CARD_TYPE {
1120 ENCRYPTED_AND_SIGNED = 3,
1126 export enum LABEL_TYPE {
1133 export const DEFAULT_LOCALE = 'en_US';
1135 export enum PASSWORD_MODE {
1140 export enum SORT_DIRECTION {
1145 export enum SERVER_FEATURES {
1153 DOUBLE_RESTRICTION = 128,
1156 export enum CLIENT_TYPES {
1163 export enum TOKEN_TYPES {
1168 CAPTCHA = 'captcha',
1171 export enum MAILBOX_LABEL_IDS {
1184 ALMOST_ALL_MAIL = '15',
1188 export const LINKED_LABEL_IDS: {
1189 [key in MAILBOX_LABEL_IDS]?: MAILBOX_LABEL_IDS;
1191 [MAILBOX_LABEL_IDS.ALL_DRAFTS]: MAILBOX_LABEL_IDS.DRAFTS,
1192 [MAILBOX_LABEL_IDS.ALL_SENT]: MAILBOX_LABEL_IDS.SENT,
1193 [MAILBOX_LABEL_IDS.ALL_MAIL]: MAILBOX_LABEL_IDS.ALMOST_ALL_MAIL,
1194 [MAILBOX_LABEL_IDS.DRAFTS]: MAILBOX_LABEL_IDS.ALL_DRAFTS,
1195 [MAILBOX_LABEL_IDS.SENT]: MAILBOX_LABEL_IDS.ALL_SENT,
1196 [MAILBOX_LABEL_IDS.ALMOST_ALL_MAIL]: MAILBOX_LABEL_IDS.ALL_MAIL,
1199 export enum AutoReplyDuration {
1207 export const DKIM_RSA_1024 = 0;
1208 export const DKIM_RSA_2048 = 1;
1210 export enum DKIM_KEY_STATUS {
1217 export enum DKIM_KEY_DNS_STATUS {
1223 export enum DENSITY {
1228 export enum SPAM_SCORE {
1234 export const COLLAPSE_MENU_KEY = 'collapse-menu';
1235 export const ROOT_FOLDER = 0;
1237 export const USER_SCOPES = {
1241 export const DOH_DOMAINS = ['.compute.amazonaws.com'];
1243 export const PROTON_DOMAINS = [
1251 'protonmailrmez3lotccipshtkleegetolb73fuirgj7r4o4vfu7ozyd.onion',
1255 export enum LINK_TYPES {
1261 interface OpenPGPFile {
1266 const DUMMY_FILE = {
1270 declare const WEBPACK_OPENPGP: {
1272 compat: OpenPGPFile;
1273 elliptic: OpenPGPFile;
1274 worker: OpenPGPFile;
1276 export const OPENPGP =
1277 typeof WEBPACK_OPENPGP === 'undefined'
1281 elliptic: DUMMY_FILE,
1286 const PROTONPASS_EXTENSION_IDS = [
1287 'ghmbeldphafepmbegfdlkpapadhbakde' /* chromium production */,
1288 'hlaiofkbmjenhgeinjlmkafaipackfjh' /* chromium beta channel */,
1289 'gcllgfdnfnllodcaambdaknbipemelie' /* edge production */,
1290 'me.proton.pass.catalyst.safari-extension (2SB5Z68H26)' /* safari extension */,
1293 export const EXTENSIONS = {
1294 [APPS.PROTONEXTENSION]: { IDs: PROTONPASS_EXTENSION_IDS },
1295 [APPS.PROTONPASSBROWSEREXTENSION]: { IDs: PROTONPASS_EXTENSION_IDS },
1296 [APPS.PROTONVPNBROWSEREXTENSION]: { IDs: ['jplgfhpmjnbigmhklmmbgecoobifkmpa'] },
1299 export const AES256 = 'aes256';
1301 export const REFERRAL_PROGRAM_MAX_AMOUNT = 9000;
1303 export const FIBONACCI_LIST = [1, 1, 2, 3, 5, 8, 13];
1305 /* Here is a list of product not to be translated */
1306 //TODO should this be moved in the easy-switch package
1307 export const PRODUCT_NAMES = {
1308 EASY_SWITCH: 'Easy Switch',
1311 // Allowed Log parameters of the /metrics route
1312 export enum METRICS_LOG {
1314 ENCRYPTED_SEARCH = 'encrypted_search',
1315 DARK_STYLES = 'dark_styles',
1318 /** SimpleLogin constants **/
1319 // SimpleLogin tags used to communicate with the web extension
1320 export enum SIMPLE_LOGIN_TAGS {
1321 EXTENSION_INSTALLED_QUERY = 'EXTENSION_INSTALLED_QUERY',
1322 EXTENSION_INSTALLED_RESPONSE = 'EXTENSION_INSTALLED_RESPONSE',
1325 export enum SIMPLE_LOGIN_EXTENSION_LINKS {
1326 MAIN_PAGE = 'https://simplelogin.io',
1327 DASHBOARD = 'https://app.simplelogin.io/dashboard/',
1330 export const OPEN_OFFER_MODAL_EVENT = 'openoffermodal';
1332 export enum DESKTOP_APP_NAMES {
1336 export enum DESKTOP_PLATFORMS {
1339 WINDOWS = 'windows',
1342 export enum RELEASE_CATEGORIES {
1345 EARLY_ACCESS = 'EarlyAccess',
1348 export enum PROTON_WEBSITES {
1349 PROTON_STATUS_PAGE = 'https://status.proton.me',
1352 export const IPS_INCLUDED_IN_PLAN: Partial<Record<PLANS, number>> = {
1353 [PLANS.VPN_BUSINESS]: 1,
1357 * Mail Composer toolbar
1359 export const COMPOSER_TOOLBAR_ICON_SIZE = 3.5;
1362 * Messages list pagination
1364 export const DEFAULT_MAIL_PAGE_SIZE = 50;
1365 export const MAX_MESSAGES_FETCH_CHUNK_SIZE = 50;
1367 export const MIN_PASSWORD_LENGTH = 8;
1369 export enum REASON_TYPES {
1371 TICKET_ID = 'ticket_id',
1375 export const RECOVERY_KIT_FILE_NAME = 'proton-recovery-kit.pdf';
1376 export const RECOVERY_FILE_FILE_NAME = `proton_recovery${KEY_FILE_EXTENSION}`;