import { Result } from "../common/result"; export interface Command { readonly commandId?: string; readonly timestamp?: Date; readonly initiatedBy?: string; readonly correlationId?: string; } export declare abstract class BaseCommand implements Command { readonly commandId: string; readonly timestamp: Date; readonly initiatedBy?: string; readonly correlationId?: string; constructor(initiatedBy?: string, correlationId?: string); private generateCommandId; } export interface CommandHandler, TResult = void> { handle(command: TCommand): Promise>; } export interface CommandBus { dispatch(command: Command): Promise>; register, TResult>(commandType: new (...args: any[]) => TCommand, handler: CommandHandler): void; }