Refactored store

This commit is contained in:
cracklesparkle
2024-06-25 15:56:00 +09:00
parent 85f97e9e0e
commit 18fb120777
15 changed files with 205 additions and 113 deletions

View File

@ -0,0 +1,49 @@
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 | {};
}
export interface SignUpFormData {
email: string;
login: string;
phone: string;
name: string;
surname: string;
is_active: boolean;
password: string;
}
export interface SignInFormData {
username: string;
password: string;
grant_type: string;
scope?: string;
client_id?: string;
client_secret?: string;
}
export interface ApiResponse {
access_token: any;
data: any;
status: number;
statusText: string;
}