import type { CandidateCounts, CandidateWindow, CaseBatch, CaseDefinition, CaseStageRuns, CaseSummaryText, CoverageRow, DateCheck, FindingRow, } from "yt-dlp-transcript-common/lib/research/caseTypes"; import type { MergeView } from "yt-dlp-transcript-common/controller/casePipelineRun"; import type { GateResult } from "yt-dlp-transcript-common/lib/research/casePrivacy-server"; // What the case pipeline page reads (lib/research/pipeline.ts pipelineView). Types only: the page imports them. /** A channel's coverage summed over its years, with what its gap buttons would ask for. */ export type PipelineGap = { slug: string; listed: number; held: number; transcribed: number; untranscribedAudio: number; /** Listed and not held: what download-missing fetches. */ missing: number; /** Held in a key year: what "persist the key period" looks at. */ keyHeld: number; }; export type PipelineView = { case: { id: string; title: string }; stored: string; defined: boolean; /** The definition with its private-name hashes left out (never sent to a page). */ definition: CaseDefinition; /** How many private names the case holds (hashed). */ privateNames: number; channels: { slugs: string[]; problems: string[] }; keyYears: number[]; eraSpan: { from: string; to: string } | null; coverage: { rows: CoverageRow[]; gaps: PipelineGap[] }; candidates: { counts: CandidateCounts | null; total: number; sample: CandidateWindow[] }; batches: CaseBatch[]; findings: { rows: FindingRow[]; invalid: { line: number; errors: string[] }[] }; merge: MergeView | null; /** What the privacy gate says of the findings and the summary now: counts and row ids. */ gate: { findings: GateResult; summary: GateResult }; summary: CaseSummaryText | null; report: { exists: boolean }; dateChecks: DateCheck[]; stages: CaseStageRuns; /** Each reader group's prompt as a reader gets it (the naming rule always last). */ prompts: Record; /** umtool can ask the editor (a WORKER_TOKEN is set). */ editor: boolean; };