Add atomic circuit update commands
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import type { CircuitUpdateProjectCommand } from "../models/circuit-project-command.model.js";
|
||||
import type {
|
||||
AppendedProjectRevision,
|
||||
ProjectRevisionSource,
|
||||
} from "./project-revision.store.js";
|
||||
|
||||
export interface ExecuteCircuitUpdateCommandInput {
|
||||
projectId: string;
|
||||
expectedRevision: number;
|
||||
source: ProjectRevisionSource;
|
||||
description?: string;
|
||||
actorId?: string;
|
||||
command: CircuitUpdateProjectCommand;
|
||||
}
|
||||
|
||||
export interface ExecutedCircuitUpdateCommand {
|
||||
revision: AppendedProjectRevision;
|
||||
inverse: CircuitUpdateProjectCommand;
|
||||
}
|
||||
|
||||
export interface CircuitProjectCommandStore {
|
||||
executeUpdate(
|
||||
input: ExecuteCircuitUpdateCommandInput
|
||||
): ExecutedCircuitUpdateCommand;
|
||||
}
|
||||
@@ -13,8 +13,8 @@ export interface AppendProjectRevisionInput {
|
||||
source: ProjectRevisionSource;
|
||||
description?: string;
|
||||
actorId?: string;
|
||||
forward: SerializedProjectCommand;
|
||||
inverse: SerializedProjectCommand;
|
||||
forward: SerializedProjectCommand<unknown>;
|
||||
inverse: SerializedProjectCommand<unknown>;
|
||||
}
|
||||
|
||||
export interface AppendedProjectRevision {
|
||||
|
||||
Reference in New Issue
Block a user