export type UndoOperationType = "create_transaction" | "update_transaction" | "delete_transaction" | "create_scheduled_transaction" | "update_scheduled_transaction" | "delete_scheduled_transaction" | "set_category_budget" | "set_category_target"; type UndoActionType = "delete" | "update" | "create"; type UndoEntityType = "transaction" | "scheduled_transaction" | "category_budget" | "category_target"; export interface UndoAction { type: UndoActionType; entity_type: UndoEntityType; entity_id: string; expected_state: Record; restore_state: Record; } export interface UndoEntry { id: string; budget_id: string; timestamp: string; operation: UndoOperationType; description: string; undo_action: UndoAction; status: "active" | "undone"; } export interface PendingOperation { id: string; budget_id: string; timestamp: string; description: string; } export interface UndoHistoryFile { entries: UndoEntry[]; id_mappings: Record; pending_operations?: PendingOperation[]; } export interface UndoConflict { entry_id: string; reason: string; expected_state: Record; current_state: Record | null; restore_state: Record; } export interface UndoExecutionResult { entry_id: string; status: "undone" | "conflict" | "skipped" | "error"; message: string; conflict?: UndoConflict; } export {};