Add serializable project commands
This commit is contained in:
parent
903d977443
commit
b79faed320
9 changed files with 206 additions and 39 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue