/**
 * Shared TypeScript types for Vue and React components
 */

export interface Environment {
  name: string;
  role: 'admin' | 'workload';
  provider: 'azure' | 'aws' | 'gcp' | 'ibm' | 'oci' | 'onprem';
  type: 'cloud' | 'hci';
  region: string;
  location: string;
  enabled: boolean;
  components: string[];
  [key: string]: any;
}

export interface DeploymentStatus {
  status: string;
  last_deployed: string;
  cluster_health: 'healthy' | 'degraded' | 'unhealthy' | 'unknown';
  node_count: number;
  pods_running: number;
  pods_total: number;
  cpu_usage_percent: number;
  memory_usage_percent: number;
  network_in_mbps: number;
  network_out_mbps: number;
  uptime_days: number;
  last_health_check: string;
  total_deployments?: number;
  last_deployment?: string;
}

export interface Alert {
  id: number;
  environment: string;
  severity: 'error' | 'warning' | 'info';
  message: string;
  timestamp: string;
  acknowledged?: boolean;
}

export interface Cost {
  environment: string;
  provider: string;
  cost: number;
  currency: string;
  period_start: string;
  period_end: string;
  resource_type?: string;
}

export interface Deployment {
  id: string;
  environment: string;
  status: string;
  started_at: string;
  completed_at?: string | null;
  triggered_by?: string;
  strategy?: string;
  version?: string;
  logs_path?: string;
}

