Files
leistungsbilanz-ts/src/domain/ports/project-history.store.ts
T
2026-07-23 21:56:13 +02:00

26 lines
660 B
TypeScript

import type { SerializedProjectCommand } from "../models/project-command.model.js";
export type ProjectHistoryDirection = "undo" | "redo";
export interface ProjectHistoryState {
projectId: string;
currentRevision: number;
undoDepth: number;
redoDepth: number;
undoChangeSetId: string | null;
redoChangeSetId: string | null;
}
export interface ProjectHistoryCommand {
changeSetId: string;
command: SerializedProjectCommand;
}
export interface ProjectHistoryStore {
getState(projectId: string): ProjectHistoryState | null;
getNextCommand(
projectId: string,
direction: ProjectHistoryDirection
): ProjectHistoryCommand | null;
}