-
Notifications
You must be signed in to change notification settings - Fork 2
/
auth.d.ts
32 lines (27 loc) · 806 Bytes
/
auth.d.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
import type { UserAccount } from '~/types/user/account'
import type { Authenticated, AuthenticationMeta } from '~/types/all-auth'
declare module '#auth-utils' {
interface User extends UserAccount {
_dummy?: string
}
interface UserSession {
data?: Authenticated | null
meta?: AuthenticationMeta | null
user?: User | null
sessionToken?: string | null
accessToken?: string | null
}
export interface UserSessionRequired extends UserSession {
user: User
}
export interface UserSessionComposable {
loggedIn: ComputedRef<boolean>
user: ComputedRef<User | null>
sessionToken: ComputedRef<string | null>
accessToken: ComputedRef<string | null>
session: Ref<UserSession>
fetch: () => Promise<void>
clear: () => Promise<void>
}
}
export {}