Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / shared / lib / authlog / AuthLog.ts
blobfbd950e3c3b52fcd28a4a3416fc1c3a5b3b14c9d
1 export enum AUTH_LOG_EVENTS {
2     LOGIN_FAILURE_PASSWORD = 0,
3     LOGIN_SUCCESS,
4     LOGOUT,
5     LOGIN_FAILURE_2FA,
6     LOGIN_SUCCESS_AWAIT_2FA,
7     LOGIN_SUCCESS_FORBIDDEN,
8     LOGIN_SUCCESS_MNEMONIC,
9     LOGIN_FAILURE_MNEMONIC,
10     LOGIN_SUCCESS_ADMIN,
11     LOGIN_BLOCKED,
12     LOGIN_SUCCESS_AWAIT_VERIFY = 80,
13     LOGIN_ATTEMPT,
15     REAUTH_FAILURE_PASSWORD = 10,
16     REAUTH_FAILURE_2FA,
17     REAUTH_SUCCESS,
19     CHANGE_ACCOUNT_PASSWORD = 20,
20     CHANGE_MAILBOX_PASSWORD,
21     RESET_ACCOUNT,
22     CHANGE_MNEMONIC,
23     RESET_ACCOUNT_MNEMONIC,
24     CHANGE_EMAIL,
25     CHANGE_PHONE,
26     ENABLE_HIGH_SECURITY,
27     DISABLE_HIGH_SECURITY,
29     ENABLE_MAILBOX_PASSWORD = 30,
30     DISABLE_MAILBOX_PASSWORD,
31     ENABLE_TOTP,
32     DISABLE_TOTP,
33     ADD_U2F,
34     REMOVE_U2F,
35     DISABLE_MNEMONIC,
36     RESET_BACKUP_SECRET,
38     USER_KEY_CREATION = 40,
39     USER_KEY_DELETION,
40     USER_KEY_REACTIVATION,
42     ADDRESS_KEY_CREATION = 50,
43     ADDRESS_KEY_DELETION,
44     ADDRESS_KEY_REACTIVATION,
46     ENABLE_EMAIL_RECOVERY = 60,
47     ENABLE_PHONE_RECOVERY,
48     DISABLE_EMAIL_RECOVERY,
49     DISABLE_PHONE_RECOVERY,
51     REVOKE_ALL_SESSIONS = 70,
52     REVOKE_SINGLE_SESSION,
55 export enum AuthLogStatus {
56     Success = 'success',
57     Attempt = 'attempt',
58     Failure = 'failure',
61 export enum ProtectionType {
62     BLOCKED = 1,
63     CAPTCHA = 2,
64     OWNERSHIP_VERIFICATION = 3,
65     DEVICE_VERIFICATION = 4,
66     /**
67      * AuthLog action was protected by anti-abuse systems
68      * and was evaluated as safe.
69      */
70     OK = 5,
73 export interface AuthLog {
74     AppVersion: string | null;
75     Description: string;
76     Device: string;
77     Event: AUTH_LOG_EVENTS;
78     IP: string;
79     InternetProvider: string | null;
80     Location: string | null;
81     ProtectionDesc: string | null;
82     Protection: ProtectionType | null;
83     Status: AuthLogStatus;
84     Time: number;
87 export interface B2BAuthLog extends AuthLog {
88     User: {
89         Email: string;
90         Name?: string;
91     };