34 lines
516 B
TypeScript
34 lines
516 B
TypeScript
export interface User {
|
|
id: string
|
|
email: string
|
|
name?: string
|
|
avatar?: string
|
|
role?: string
|
|
}
|
|
|
|
export interface AuthState {
|
|
user: User | null
|
|
token: string | null
|
|
isAuthenticated: boolean
|
|
isLoading: boolean
|
|
}
|
|
|
|
export interface LoginCredentials {
|
|
username: string
|
|
password: string
|
|
}
|
|
|
|
export interface RegisterData {
|
|
username: string
|
|
password: string
|
|
name?: string
|
|
}
|
|
|
|
export interface JWTPayload {
|
|
sub: string
|
|
email: string
|
|
name?: string
|
|
role?: string
|
|
exp: number
|
|
iat: number
|
|
} |