13 lines
1001 B
TypeScript
13 lines
1001 B
TypeScript
export interface Candidate { id: string; name: string; title?: string; description?: string; image_url?: string | null }
|
|
export interface TestSummary { slug: string; title: string; subtitle: string; description: string; candidate_count: number; run_count: number }
|
|
export interface TestDetail extends TestSummary { candidates: Candidate[] }
|
|
export interface Decision { round: number; left_id: string; right_id: string; winner_id: string }
|
|
export interface TestResult {
|
|
id: string; test_slug: string; test_title: string; champion_id: string; champion_name: string;
|
|
runner_up_name?: string | null; completed_at: string; ranking_names?: string[];
|
|
decisions: Decision[]; candidate_names: Record<string,string>;
|
|
}
|
|
export interface Match { left: Candidate; right: Candidate | null; winner: Candidate | null }
|
|
export interface BracketState { round: number; pool: Candidate[]; matches: Match[]; eliminated: Candidate[]; decisions: Decision[]; offset: number }
|
|
export type ChoiceSide = 'left' | 'right';
|