export interface AuthzConnectionInfo {
  enabled?: boolean;
  base_url?: string | null;
}

export interface BackendConnectionInfo {
  backend_id?: string | null;
  client_id?: string | null;
  name?: string | null;
  public_base_url?: string | null;
  api_base_url?: string | null;
  ws_base_url?: string | null;
  frontend_base_url?: string | null;
  registered?: boolean;
}

export interface AuthzLocalBackendStatus {
  backend_id?: string | null;
  client_id?: string | null;
  name?: string | null;
  public_base_url?: string | null;
  authz?: AuthzConnectionInfo | null;
}

export interface RegisterAuthzStatus {
  enabled: boolean;
  base_url?: string | null;
  user_registered: boolean;
  backend_registered: boolean;
}

export interface TokenResponse {
  access_token: string;
  refresh_token: string;
  token_type: string;
  user_id: string;
  username: string;
  email?: string;
  role: string;
  handoff_code?: string;
  handoff_expires_at?: number;
  existing_user?: boolean;
  authz?: RegisterAuthzStatus | null;
  backend_connection?: BackendConnectionInfo | null;
  local_backend?: AuthzLocalBackendStatus | null;
}
