Add serializable project commands

This commit is contained in:
2026-07-23 21:23:31 +02:00
parent 903d977443
commit b79faed320
9 changed files with 206 additions and 39 deletions
+4 -16
View File
@@ -1,3 +1,5 @@
import type { SerializedProjectCommand } from "../models/project-command.model.js";
export type ProjectRevisionSource =
| "user"
| "undo"
@@ -5,28 +7,14 @@ export type ProjectRevisionSource =
| "restore"
| "migration";
export type ProjectChangeJsonValue =
| null
| boolean
| number
| string
| ProjectChangeJsonValue[]
| { [key: string]: ProjectChangeJsonValue };
export interface ProjectChangePayload {
schemaVersion: number;
data: ProjectChangeJsonValue;
}
export interface AppendProjectRevisionInput {
projectId: string;
expectedRevision: number;
source: ProjectRevisionSource;
commandType: string;
description?: string;
actorId?: string;
forward: ProjectChangePayload;
inverse: ProjectChangePayload;
forward: SerializedProjectCommand;
inverse: SerializedProjectCommand;
}
export interface AppendedProjectRevision {