export interface User { uid: string; email: string | null; displayName: string | null; photoURL: string | null; phoneNumber: string | null; emailVerified: boolean; createdAt: Date; lastLoginAt: Date; role?: string; roles?: string[]; // Support multiple roles department?: string; departments?: string[]; // Support multiple departments isAdmin?: boolean; isSuperAdmin?: boolean; permissions?: string[]; metadata?: UserMetadata; } export interface UserMetadata { inviteId?: string; invitedBy?: string; invitedAt?: Date; source?: string; [key: string]: any; } export interface UpdateUserData { displayName?: string; photoURL?: string; role?: string; department?: string; permissions?: string[]; metadata?: Partial; } export interface UserProfile extends User { organizations?: Organization[]; preferences?: UserPreferences; stats?: UserStats; } export interface Organization { id: string; name: string; role: string; joinedAt: Date; } export interface UserPreferences { theme?: 'light' | 'dark' | 'system'; language?: string; timezone?: string; notifications?: NotificationPreferences; } export interface NotificationPreferences { email?: boolean; push?: boolean; sms?: boolean; inApp?: boolean; } export interface UserStats { lastActive: Date; loginCount: number; actionsPerformed: number; }