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 {
35 interface MnemonicData {
37 decryptedUserKeys: DecryptedKey[];
38 authResponse: AuthResponse;
41 export interface ResetCacheResult {
45 productParam: ProductParam;
46 Methods: RecoveryMethod[];
48 method?: RecoveryMethod;
51 resetResponse?: ValidateResetTokenResponse;
52 mnemonicData?: MnemonicData;
53 ktActivation: KeyTransparencyActivation;
55 resetSelfAudit: ResetSelfAudit;
58 export type ResetActionResponse =
64 to: STEPS.NO_RECOVERY_METHODS;
68 cache: ResetCacheResult;
69 to: Exclude<STEPS, STEPS.DONE | STEPS.NO_RECOVERY_METHODS>;