/**
 * Run types and interfaces
 */

export type RunStatus = 
  | 'created'
  | 'queued'
  | 'running'
  | 'completed'
  | 'failed'
  | 'killed';

export interface Run {
  id: string;
  name: string;
  status: RunStatus;
  input?: any;
  output?: any;
  logs: Array<{
    timestamp: string;
    level: string;
    message: string;
  }>;
  clientToken?: string | null;
  tags?: string[];
  startedAt?: string | null;
  completedAt?: string | null;
  createdAt: string;
  updatedAt: string;
}

export interface CreateRunData {
  id?: string;
  name: string;
  input?: any;
  clientToken?: string | null;
  tags?: string[];
}

export interface UpdateRunData {
  status?: RunStatus;
  input?: any;
  output?: any;
  logs?: Array<{
    timestamp: string;
    level: string;
    message: string;
  }>;
  startedAt?: string | null;
  completedAt?: string | null;
}

export interface ListRunsFilter {
  tag?: string;
  status?: RunStatus;
  limit?: number;
}

