export interface Gateways {
  id: string;
  user_id: string;

  name: string;
  description: string | null;

  gateway_url: string;
  token_preview: string;

  sage_database: string | null;
  sage_company: string | null;

  is_active: boolean;
  is_default: boolean;
  priority: number;

  health_status: 'unknown' | 'healthy' | 'unhealthy';
  last_health_check: string | null;
  last_error: string | null;

  total_requests: number;
  successful_requests: number;
  failed_requests: number;
  success_rate: number;

  last_used_at: string | null;

  extra_config: Record<string, unknown> | null;
  allowed_ips: string[] | null;

  created_at: string;
  updated_at: string;
}

export interface GatewaysRequest {
  name: string;
  description: string | null;
  gateway_url: string;
  gateway_token: string;
  is_active: boolean;
  is_default: boolean;
}

export interface GatewaysResponse {
  items: Gateways[];
  total: number;
  active_gateway: string;
  using_fallback: boolean;
}