Expose project revision timeline

This commit is contained in:
2026-07-25 21:57:03 +02:00
parent 4b47bc2bcc
commit 5a0c9019af
14 changed files with 365 additions and 8 deletions
+29
View File
@@ -1,4 +1,5 @@
import type { SerializedProjectCommand } from "../models/project-command.model.js";
import type { ProjectRevisionSource } from "./project-revision.store.js";
export type ProjectHistoryDirection = "undo" | "redo";
@@ -16,8 +17,36 @@ export interface ProjectHistoryCommand {
command: SerializedProjectCommand;
}
export interface ProjectRevisionSummary {
revisionId: string;
changeSetId: string;
revisionNumber: number;
createdAtIso: string;
actorId: string | null;
source: ProjectRevisionSource;
description: string | null;
commandType: string;
payloadSchemaVersion: number;
}
export interface ProjectRevisionPage {
projectId: string;
currentRevision: number;
revisions: ProjectRevisionSummary[];
nextBeforeRevision: number | null;
}
export interface ListProjectRevisionsInput {
projectId: string;
limit: number;
beforeRevision?: number;
}
export interface ProjectHistoryStore {
getState(projectId: string): ProjectHistoryState | null;
listRevisions(
input: ListProjectRevisionsInput
): ProjectRevisionPage | null;
getNextCommand(
projectId: string,
direction: ProjectHistoryDirection