export type EventItem = { id: string; timestamp: string | null; timestamp_source?: "event" | "record" | "missing" | "invalid"; timestamp_valid?: boolean; provider: string; event_id: number | null; level: string; channel?: string; computer?: string; category: string; summary: string; outcome?: "success" | "failure" | null; fields?: Record; }; export type Incident = { id: string; rule_id: string; start: string | null; end: string | null; title: string; category: string; severity: string; reasons: string[]; evidence_event_ids: string[]; original_count: number; compressed_count: number; campaign_id?: string | null; }; export type Campaign = { id: string; rule_id: string; title: string; category: string; severity: string; start: string; end: string; incident_ids: string[]; event_count: number; reasons: string[]; }; export type SourceInfo = { sha256: string; size_bytes: number; }; export type ParseStats = { parser: string; status: "complete" | "partial" | "failed"; parsed_events: number; records_seen: number; skipped_records: number; issue_count: number; truncated: boolean; truncation_reason?: string | null; duration_ms: number; issues: ParseIssue[]; issues_truncated?: boolean; issue_counts?: Record; }; export type ParseIssue = { code: string; record_id?: number | null; message: string; skipped_record?: boolean; }; export type Analysis = { source: string; events: EventItem[]; incidents: Incident[]; campaigns?: Campaign[]; parse?: ParseStats | null; source_info?: SourceInfo | null; };