forked from VinokurovVE/tests
51 lines
881 B
TypeScript
51 lines
881 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 Role {
|
|
name: string;
|
|
description?: string | null;
|
|
id: number;
|
|
}
|
|
|
|
export interface RoleCreate {
|
|
name: string;
|
|
description?: string | null;
|
|
}
|
|
|
|
export interface AuthState {
|
|
isAuthenticated: boolean;
|
|
token: string | null;
|
|
userData: UserData | {};
|
|
}
|
|
|
|
export interface LoginFormData {
|
|
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;
|
|
} |