Expose project revision timeline
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user