declare type UserRole = 'root' | 'ro' | 'fo' | 'staff' declare type UserPermission = { id: number; username: string; role: string; manual_payment: boolean; bill_page: boolean; apply_page: boolean; complete_button: boolean; confirm_button: boolean; apply_button: boolean; permission_edit: boolean; } declare type UserProfile = { id: string | number; token: string; email: string; username: string; department: string; exp: number; expiration_time: string; iat: number; iss: string; nbf: number; type: string; roles: UserRole[]; role: UserRole; permissions:UserPermission | null; origin_role?: UserRole; } declare interface AuthProps { isLoggedIn: boolean; isInitialized?: boolean; user?: UserProfile | null; token?: string | null; } declare type AuthContextType = { isLoggedIn: boolean; isInitialized?: boolean; user?: UserProfile | null | undefined; logout: () => Promise; mockLogin: () => Promise; login: (code: string, state: string) => Promise; updateUser: (user: Partial) => Promise; }; declare type PermissionUserList = { role_name: string; username_list: string[]; }