export interface Scenario {
  id: string;
  name: string;
  description?: string;
  tags: string[];
  status: 'draft' | 'running' | 'completed' | 'archived';
  region: string;
  created_at: string;
  updated_at: string;
  completed_at?: string;
  started_at?: string;
  total_requests: number;
  total_cost_estimate: number;
}

export interface ScenarioCreate {
  name: string;
  description?: string;
  tags?: string[];
  region: string;
}

export interface ScenarioUpdate {
  name?: string;
  description?: string;
  tags?: string[];
}

export interface ScenarioList {
  items: Scenario[];
  total: number;
  page: number;
  page_size: number;
}

export interface MetricSummary {
  total_requests: number;
  total_cost_usd: number;
  sqs_blocks: number;
  lambda_invocations: number;
  llm_tokens: number;
  pii_violations: number;
}

export interface CostBreakdown {
  service: string;
  cost_usd: number;
  percentage: number;
}

export interface MetricsResponse {
  scenario_id: string;
  summary: MetricSummary;
  cost_breakdown: CostBreakdown[];
  timeseries: {
    timestamp: string;
    metric_type: string;
    value: number;
  }[];
}

// Auth Types
export interface User {
  id: string;
  email: string;
  full_name: string;
  is_active: boolean;
  created_at: string;
}

export interface AuthTokens {
  access_token: string;
  refresh_token: string;
  token_type: string;
}

export interface LoginRequest {
  email: string;
  password: string;
}

export interface LoginResponse {
  access_token: string;
  refresh_token: string;
  token_type: string;
}

export interface RegisterRequest {
  email: string;
  password: string;
  full_name: string;
}

export interface RegisterResponse {
  user: User;
  access_token: string;
  refresh_token: string;
  token_type: string;
}

// API Key Types
export interface ApiKey {
  id: string;
  user_id: string;
  key_prefix: string;
  name: string;
  scopes: string[];
  last_used_at: string | null;
  expires_at: string | null;
  is_active: boolean;
  created_at: string;
}

export interface CreateApiKeyRequest {
  name: string;
  scopes: string[];
  expires_days: number | null;
}

export interface CreateApiKeyResponse {
  id: string;
  name: string;
  key: string;
  prefix: string;
  scopes: string[];
  created_at: string;
}

export interface ApiKeyListResponse {
  items: ApiKey[];
  total: number;
}