export interface TokenResponse {
  access_token: string;
  token_type: string;
  expires_in: number;
  refresh_token?: string;
  id_token?: string;
}

export interface UserInfo {
  sub: string;
  email: string;
  email_verified?: boolean;
  name?: string;
  preferred_username?: string;
  given_name?: string;
  family_name?: string;
  picture?: string;
  groups?: string[];
}

export interface AuthRequest {
  code: string;
  state?: string;
}

export interface JwtPayload {
  userId: string; // UUID
  email: string;
  authentikSub: string;
  groups?: string[];
  role?: string;
  iat?: number;
  exp?: number;
}

export interface RefreshTokenPayload {
  userId: string; // UUID
  email: string;
  iat?: number;
  exp?: number;
}

export interface AuthenticatedUser {
  id: string; // UUID
  email: string;
  authentikSub: string;
  name?: string;
  username?: string;
  firstName?: string;
  lastName?: string;
  isActive: boolean;
}
