forked from jappel/leistungsbilanz-ts
36 lines
936 B
TypeScript
36 lines
936 B
TypeScript
import type { AppendedProjectRevision } from "./project-revision.store.js";
|
|
import type { ProjectHistoryState } from "./project-history.store.js";
|
|
|
|
export interface ExecuteUserProjectCommandInput {
|
|
projectId: string;
|
|
expectedRevision: number;
|
|
description?: string;
|
|
actorId?: string;
|
|
command: unknown;
|
|
}
|
|
|
|
export interface ExecuteProjectHistoryCommandInput {
|
|
projectId: string;
|
|
expectedRevision: number;
|
|
actorId?: string;
|
|
}
|
|
|
|
export interface ExecutedProjectCommand {
|
|
revision: AppendedProjectRevision;
|
|
history: ProjectHistoryState;
|
|
}
|
|
|
|
export interface ProjectCommandExecutor {
|
|
executeUser(
|
|
input: ExecuteUserProjectCommandInput
|
|
): ExecutedProjectCommand;
|
|
executeRestore(
|
|
input: ExecuteUserProjectCommandInput
|
|
): ExecutedProjectCommand;
|
|
undo(
|
|
input: ExecuteProjectHistoryCommandInput
|
|
): ExecutedProjectCommand;
|
|
redo(
|
|
input: ExecuteProjectHistoryCommandInput
|
|
): ExecutedProjectCommand;
|
|
}
|