forked from VinokurovVE/tests
Refactored store
This commit is contained in:
49
frontend_reactjs/src/interfaces/auth.ts
Normal file
49
frontend_reactjs/src/interfaces/auth.ts
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user