import type { IAggregate, IAggregateConstructor, IAggregateFactory, ICommand, ICommandHandler, IContainer, IEventSet, IMessageMeta, IObservable, RetryOnConcurrencyErrorOptions } from './interfaces/index.ts'; /** * Aggregate command handler. * * Subscribes to event store and awaits aggregate commands. * Upon command receiving creates an instance of aggregate, * restores its state, passes command and commits emitted events to event store. */ export declare class AggregateCommandHandler implements ICommandHandler { #private; constructor({ eventStore, aggregateType, aggregateFactory, handles, executionLocker, restoresFrom, retryOnConcurrencyError, tracerFactory, logger }: Pick & { aggregateType?: IAggregateConstructor; aggregateFactory?: IAggregateFactory; handles?: Readonly; restoresFrom?: Readonly; retryOnConcurrencyError?: RetryOnConcurrencyErrorOptions; }); /** Subscribe to all command types handled by aggregateType */ subscribe(commandBus: IObservable): void; /** Pass a command to corresponding aggregate */ execute(cmd: ICommand, meta?: IMessageMeta): Promise; }