export type EvidenceType = 'folder' | 'evidence' | 'note' | 'event' export type SourceFileType = 'image' | 'pdf' | 'web_capture' | 'email' | 'article' | 'filing' | 'price_list' | 'text' | 'file' export interface DocumentRegion { id: string label: string excerpt: string date?: string } export interface CaseDocument { id: string title: string kind: string date: string publishedAt?: string body: string[] regions: DocumentRegion[] assetId?: string fileName?: string mimeType?: string fileSize?: number fileType: SourceFileType metadata: Record } export interface Evidence { id: string type: EvidenceType title: string content: string sourceDocumentId?: string sourceRegionId?: string eventDate?: string x: number y: number width: number config?: Record /** Compatibility projection for clients predating the generic relation graph. */ containedDocumentIds?: string[] } export interface WidgetRelation { id: string fromWidgetId: string toWidgetId: string type: string sortOrder?: number config?: Record } export interface Connection { id: string fromEvidenceId: string toEvidenceId: string } export interface Viewport { x: number; y: number; zoom: number } export interface CaseState { id: string title: string subtitle: string documents: CaseDocument[] evidence: Evidence[] relations: WidgetRelation[] connections: Connection[] viewport: Viewport updatedAt?: string levelStatus?: string sourceTemplateVersionId?: string editingAllowed?: boolean }