@rkosafo/cai.components
Version:
This package is under development and not ready for public use.
51 lines (50 loc) • 1.1 kB
TypeScript
export interface AuthUserInfo {
firstName: string;
lastName: string;
name: string;
initials: string;
profileImage: string;
role: string;
roleId: number;
permissions: string[];
otherNames?: string;
status?: string;
username?: string;
id?: string | number;
email?: string;
department?: string;
departmentId?: number;
tags?: string[];
type?: string;
activeDashboardId?: number;
district?: string;
phoneNumber?: string;
}
export interface AuthStore {
isLoading: boolean;
isAuthenticated: boolean;
accessToken: string;
idToken: string;
userInfo: AuthUserInfo | null;
authError: string;
userIsFound: boolean;
}
export interface KeycloakConfig {
url: string;
realm: string;
clientId: string;
}
export interface FetchAuthUserInfoFn {
(token?: string): Promise<{
success: boolean;
data?: any;
message?: string;
code?: number;
}>;
}
export interface FetchAuthDashboardsFn {
(): Promise<{
success: boolean;
data?: any;
}>;
}