Add atomic circuit update commands
This commit is contained in:
parent
b79faed320
commit
296cb0f1c4
17 changed files with 940 additions and 167 deletions
25
src/domain/ports/circuit-project-command.store.ts
Normal file
25
src/domain/ports/circuit-project-command.store.ts
Normal file
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue