export type UserStatus = 'active' | 'inactive' | 'suspended' | 'pending';
export type UserRole = 'admin' | 'user' | 'moderator' | 'viewer';

export interface User {
  id: string;
  email: string;
  first_name: string;
  last_name: string;
  display_name?: string;
  avatar?: string;
  role: UserRole;
  status: UserStatus;
  last_login_at?: string;
  created_at: string;
  updated_at: string;
  created_by: string;
  updated_by: string;
}

export interface UserProfile {
  user_id: string;
  bio?: string;
  location?: string;
  website?: string;
  timezone?: string;
  language?: string;
  preferences?: Record<string, any>;
  created_at: string;
  updated_at: string;
}

export interface CreateUserRequest {
  email: string;
  first_name: string;
  last_name: string;
  display_name?: string;
  avatar?: string;
  role: UserRole;
  status?: UserStatus;
}

export interface UpdateUserRequest {
  email?: string;
  first_name?: string;
  last_name?: string;
  display_name?: string;
  avatar?: string;
  role?: UserRole;
  status?: UserStatus;
}

export interface UpdateUserProfileRequest {
  bio?: string;
  location?: string;
  website?: string;
  timezone?: string;
  language?: string;
  preferences?: Record<string, any>;
}

export interface ListUsersRequest {
  status?: UserStatus;
  role?: UserRole;
  search?: string;
  limit?: number;
  offset?: number;
  order_by?: string;
  order_dir?: string;
}

export interface ListUsersResponse {
  users: User[];
  total: number;
  limit: number;
  offset: number;
  has_more: boolean;
}

export interface ExistsByEmailResponse {
  exists: boolean;
  email: string;
}