// types/auth.ts
export interface ExtendedUser {
  id: string;
  name: string;
  email: string;
  preferred_username: string;
  email_verified: boolean;
  roles: string[];
  client_roles: string[];
  permissions?: string[];
  given_name?: string;
  family_name?: string;
  username?: string;
}

export interface ExtendedSession {
  user: ExtendedUser;
  accessToken: string;
  refreshToken: string;
  expiresAt: number;
}

export interface AuthInfoData {
  auth_provider: string;
  email: string;
  name: string;
  role: any;
  user_id: string;
  username: string;
}

export interface AuthInfoResponse {
  data: AuthInfoData;
  message: string;
}



export interface LogoutResponse {
  success: boolean;
  logoutUrl?: string;
}

export interface SessionData {
    user: AuthInfoData;
    accessToken: string;
    idToken?: string;
    refreshToken: string;
    expiresAt: number;
}

export interface LoginResponse {
  data : {
    provider: string;
    access_token: string;
    refresh_token: string;
    expires_in: number;
    token_type: string;
  }
}