export interface User {
  id: string;
  email: string;
  phoneNumber?: string;
  firstName: string;
  lastName: string;
  isEmailVerified: boolean;
  isPhoneVerified: boolean;
  createdAt: string;
  lastLoginAt?: string;
  profilePictureUrl?: string;
  organizations: UserOrganization[];
  preferences: UserPreferences;
}

export interface UserOrganization {
  orgId: string;
  orgName: string;
  role: string;
  permissions: string[];
  joinedAt: string;
  status: 'active' | 'suspended' | 'pending';
}

export interface UserPreferences {
  language: string;
  timezone: string;
  theme: 'light' | 'dark' | 'system';
  notifications: NotificationPreferences;
}

export interface NotificationPreferences {
  email: boolean;
  push: boolean;
  sms: boolean;
  marketing: boolean;
}

export interface AuthResult {
  success: boolean;
  session?: any;
  requiresVerification?: boolean;
  verificationMethod?: VerificationMethod;
  errorCode?: string;
  errorMessage?: string;
  nextSteps?: string[];
}

export type VerificationMethod = 
  | { type: 'otp'; target: string }
  | { type: 'email'; target: string }
  | { type: 'biometric' }
  | { type: 'magic_link'; target: string };