export interface User {
  id: string;
  email: string;
  fullName: string;
  username: string;
  timezone: string;
  avatarUrl: string | null;
  bannerUrl?: string | null;
  logoUrl?: string | null;
  tagline?: string | null;
  headline?: string | null;
  displayHeadline?: string | null;
  bio?: string | null;
  jobTitle?: string | null;
  company?: string | null;
  location?: string | null;
  linkedinUrl?: string | null;
  emailVerified?: boolean;
  createdAt?: string;
  publicBookingBaseUrl?: string;
  publicProfileUrl?: string;
  authProvider?: 'email' | 'google' | 'linkedin';
  hasPassword?: boolean;
  mustChangePassword?: boolean;
  passwordExpired?: boolean;
  passwordAgeDays?: number | null;
  passwordMaxAgeDays?: number;
}

export interface AuthUser {
  id: string;
  email: string;
  username: string;
  timezone: string;
  authProvider?: 'email' | 'google' | 'linkedin';
  hasPassword?: boolean;
  mustChangePassword?: boolean;
  passwordExpired?: boolean;
  passwordAgeDays?: number | null;
  passwordMaxAgeDays?: number;
}

export interface LoginRequest {
  email: string;
  password: string;
}

export interface RegisterRequest {
  email: string;
  password?: string;
  fullName: string;
  username: string;
  timezone: string;
}

export interface RegisterResponse {
  id: string;
  email: string;
  fullName: string;
  username: string;
  timezone: string;
  emailVerified: boolean;
  passwordEmailed: boolean;
  message: string;
}

export interface ForgotPasswordRequest {
  email: string;
}

export interface ResetPasswordRequest {
  token: string;
  password: string;
}

export interface ChangePasswordRequest {
  currentPassword?: string;
  newPassword: string;
}

export interface MessageResponse {
  message: string;
}

export interface LoginResponse {
  accessToken: string;
  expiresIn: number;
  tokenType: string;
  user: AuthUser;
}

export interface UpdateProfileRequest {
  fullName?: string;
  timezone?: string;
  avatarUrl?: string | null;
  bannerUrl?: string | null;
  logoUrl?: string | null;
  tagline?: string | null;
  headline?: string | null;
  bio?: string | null;
  jobTitle?: string | null;
  company?: string | null;
  location?: string | null;
  linkedinUrl?: string | null;
}

export interface ImportLinkedInProfileRequest {
  linkedinUrl: string;
  /** Optional About override when LinkedIn blocks automated About extraction */
  bio?: string;
}

export interface LinkedInExperience {
  company: string;
  jobTitle?: string;
}

export interface FetchLinkedInProfileResponse {
  linkedinUrl: string;
  fetched: {
    fullName?: string;
    headline?: string;
    bio?: string;
    jobTitle?: string;
    company?: string;
    location?: string;
    education?: string;
    experiences?: LinkedInExperience[];
    avatarUrl?: string;
  };
  enhanced: {
    fullName?: string;
    headline?: string;
    bio?: string;
    jobTitle?: string;
    company?: string;
    location?: string;
    education?: string | null;
    experiences?: LinkedInExperience[];
    avatarUrl?: string | null;
  };
  warnings?: string[];
}

export interface EnhanceProfileRequest {
  fullName?: string;
  headline?: string;
  bio?: string;
  jobTitle?: string;
  company?: string;
  location?: string;
}

export interface EnhanceProfileResponse {
  enhanced: EnhanceProfileRequest;
}
