@dugongjs/nestjs
Version:
12 lines (11 loc) • 1.03 kB
TypeScript
import { AbstractDomainEvent, AbstractEventSourcedAggregateRoot, AggregateMessageProducer, IMessageProducer, IOutboundMessageMapper, ITransactionManager, type RemoveAbstract } from "@dugongjs/core";
export declare class AggregateMessageProducerService {
private readonly transactionManager;
private readonly messageProducer;
private readonly outboundMessageMapper;
private readonly currentOrigin;
private readonly logger;
constructor(transactionManager: ITransactionManager, messageProducer: IMessageProducer<any>, outboundMessageMapper: IOutboundMessageMapper<any>, currentOrigin: string);
getAggregateMessageProducer<TAggregateRootClass extends RemoveAbstract<typeof AbstractEventSourcedAggregateRoot>>(aggregateClass: TAggregateRootClass): AggregateMessageProducer<TAggregateRootClass, any>;
publishDomainEventsAsMessages<TAggregateRootClass extends RemoveAbstract<typeof AbstractEventSourcedAggregateRoot>>(aggregateClass: TAggregateRootClass, domainEvents: AbstractDomainEvent[]): Promise<void>;
}