1 import type { ProductParam } from '@proton/shared/lib/apps/product';
2 import type { AuthResponse } from '@proton/shared/lib/authentication/interface';
3 import type { APP_NAMES } from '@proton/shared/lib/constants';
8 KeyTransparencyActivation,
10 } from '@proton/shared/lib/interfaces';
12 import type { AuthSession } from '../login/interface';
16 REQUEST_RECOVERY_METHODS = 1,
18 FORGOT_RECOVERY_METHOD,
26 // Login is valid for external accounts
27 export type RecoveryMethod = 'email' | 'sms' | 'login' | 'mnemonic';
28 export type AccountType = 'internal' | 'external';
30 export interface ValidateResetTokenResponse {
33 SupportPgpV6Keys: 0 | 1;
36 interface MnemonicData {
38 decryptedUserKeys: DecryptedKey[];
39 authResponse: AuthResponse;
42 export interface ResetCacheResult {
46 productParam: ProductParam;
47 Methods: RecoveryMethod[];
49 method?: RecoveryMethod;
52 resetResponse?: ValidateResetTokenResponse;
53 mnemonicData?: MnemonicData;
54 ktActivation: KeyTransparencyActivation;
56 resetSelfAudit: ResetSelfAudit;
59 export type ResetActionResponse =
65 to: STEPS.NO_RECOVERY_METHODS;
69 cache: ResetCacheResult;
70 to: Exclude<STEPS, STEPS.DONE | STEPS.NO_RECOVERY_METHODS>;