Files
tests/client/src/interfaces/auth.ts
2024-08-20 17:34:21 +09:00

39 lines
708 B
TypeScript

export interface User {
id: number;
}
export interface UserData extends User {
email: string;
login: string;
phone: string;
name: string;
surname: string;
is_active: boolean;
role_id: number;
}
export interface UserCreds extends User {
password: string;
}
export interface AuthState {
isAuthenticated: boolean;
token: string | null;
userData: UserData | null;
}
export interface LoginFormData {
username: string;
password: string;
grant_type: string;
scope?: string;
client_id?: string;
client_secret?: string;
}
export interface ApiResponse {
access_token: string;
data: JSON;
status: number;
statusText: string;
}