forked from jappel/leistungsbilanz-ts
Add project command API
This commit is contained in:
parent
1e4dd26bb8
commit
e4c7cf06e9
19 changed files with 781 additions and 21 deletions
|
|
@ -1,3 +1,7 @@
|
|||
import type { SerializedProjectCommand } from "../models/project-command.model.js";
|
||||
|
||||
export type ProjectHistoryDirection = "undo" | "redo";
|
||||
|
||||
export interface ProjectHistoryState {
|
||||
projectId: string;
|
||||
currentRevision: number;
|
||||
|
|
@ -7,6 +11,15 @@ export interface ProjectHistoryState {
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue