export type EventSnapshot = {
  id: string;
  projectId: string | null;
  title: string;
  date: number;
  endDate: number | null;
  type: 'milestone' | 'checkpoint' | 'activity';
  isCompleted: number;
  isAiSuggested: number;
};

export type UpdateFields = {
  title?: string;
  date?: number;
  endDate?: number | null;
  type?: 'milestone' | 'checkpoint' | 'activity';
  isCompleted?: number;
};

export type HistoryEntry =
  | { kind: 'update'; id: string; prev: UpdateFields; next: UpdateFields }
  | { kind: 'create'; id: string; payload: EventSnapshot }
  | { kind: 'delete'; id: string; snapshot: EventSnapshot };
