-
Notifications
You must be signed in to change notification settings - Fork 3k
/
Copy pathSession.ts
43 lines (30 loc) · 1.25 KB
/
Session.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import type {ValueOf} from 'type-fest';
import type CONST from '@src/CONST';
import type * as OnyxCommon from './OnyxCommon';
/** Possible states of the automatic authentication after user clicks on a magic link */
type AutoAuthState = ValueOf<typeof CONST.AUTO_AUTH_STATE>;
/** Model of user session data */
type Session = {
/** The user's email for the current session */
email?: string;
/** Currently logged in user authToken */
authToken?: string;
/** Currently logged in user authToken type */
authTokenType?: ValueOf<typeof CONST.AUTH_TOKEN_TYPES>;
/** Currently logged in user support authToken */
supportAuthToken?: string;
/** Currently logged in user encrypted authToken */
encryptedAuthToken?: string;
/** Boolean that indicates whether it is loading or not */
loading?: boolean;
/** Currently logged in user accountID */
accountID?: number;
/** Current state of the automatic authentication after user clicks on a magic link */
autoAuthState?: AutoAuthState;
/** Server side errors keyed by microtime */
errors?: OnyxCommon.Errors;
/** User signed in with short lived token */
signedInWithShortLivedAuthToken?: boolean;
};
export default Session;
export type {AutoAuthState};