UNPKG

@dugongjs/nestjs

Version:

13 lines (12 loc) 1.05 kB
import { AbstractDomainEvent, AggregateMessageProducer, IMessageProducer, IOutboundMessageMapper, ITransactionManager, type EventSourcedAggregateRoot } from "@dugongjs/core"; import type { ILoggerFactory } from "../logger/i-logger-factory.js"; 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, loggerFactory?: ILoggerFactory); getAggregateMessageProducer<TAggregateRootClass extends EventSourcedAggregateRoot>(aggregateClass: TAggregateRootClass): AggregateMessageProducer<TAggregateRootClass, any>; publishDomainEventsAsMessages<TAggregateRootClass extends EventSourcedAggregateRoot>(aggregateClass: TAggregateRootClass, domainEvents: AbstractDomainEvent[]): Promise<void>; }