export type MediaType = 'tv_show' | 'movie';

export interface InterpreterOutput {
  liked: string[];
  disliked: string[];
  themes: string[];
  character_preferences: string[];
  tone: string[];
  avoid: string[];
  requirements: string[];
}

export interface RetrievalCandidate {
  title: string;
  reason: string;
}

export interface RetrievalOutput {
  candidates: RetrievalCandidate[];
}

export interface ValidatorCandidate {
  title: string;
  reason: string;
  isTrash: boolean;
}

export interface ValidatorOutput {
  candidates: ValidatorCandidate[];
}

export interface RankingOutput {
  full_match: string[];
  definitely_like: string[];
  might_like: string[];
  questionable: string[];
  will_not_like: string[];
}

export type CuratorCategory = 'Full Match' | 'Definitely Like' | 'Might Like' | 'Questionable' | 'Will Not Like';

export interface CuratorOutput {
  title: string;
  explanation: string;
  category: CuratorCategory;
  genre: string;
  pros: string[];
  cons: string[];
}

export type PipelineStage =
  | 'interpreter'
  | 'retrieval'
  | 'validator'
  | 'ranking'
  | 'curator'
  | 'complete'
  | `pass${number}:retrieval`
  | `pass${number}:validator`
  | `pass${number}:ranking`
  | `pass${number}:curator`;

export type SSEStatus = 'start' | 'done' | 'error';

export interface SSEEvent {
  stage: PipelineStage;
  status: SSEStatus;
  data?: unknown;
}
