UNPKG

@dugongjs/nestjs

Version:

16 lines (15 loc) 1.38 kB
import { AggregateContext, IExternalOriginMap, IOutboundMessageMapper, type EventSourcedAggregateRoot, type IDomainEventRepository, type IMessageProducer, type ISnapshotRepository, type ITransactionManager, type RunInTransaction, type TransactionContext } from "@dugongjs/core"; import type { ILoggerFactory } from "../logger/i-logger-factory.js"; export declare class EventSourcingService { private readonly currentOrigin; private readonly transactionManager; private readonly domainEventRepository; private readonly snapshotRepository; private readonly externalOriginMap?; private readonly messageProducer?; private readonly outboundMessageMapper?; private readonly logger?; constructor(currentOrigin: string, transactionManager: ITransactionManager, domainEventRepository: IDomainEventRepository, snapshotRepository: ISnapshotRepository, externalOriginMap?: IExternalOriginMap | undefined, messageProducer?: IMessageProducer<any> | undefined, outboundMessageMapper?: IOutboundMessageMapper<any> | undefined, loggerFactory?: ILoggerFactory); createAggregateContext<TAggregateRootClass extends EventSourcedAggregateRoot>(transactionContext: TransactionContext | null, aggregateClass: TAggregateRootClass): AggregateContext<TAggregateRootClass>; transaction<TResult>(runInTransaction: RunInTransaction<TResult>): Promise<TResult>; }