UNPKG

@dugongjs/nestjs

Version:

15 lines (14 loc) 1.33 kB
import { AggregateContext, IExternalOriginMap, IOutboundMessageMapper, type AbstractEventSourcedAggregateRoot, type IDomainEventRepository, type IMessageProducer, type ISnapshotRepository, type ITransactionManager, type RemoveAbstract, type RunInTransaction, type TransactionContext } from "@dugongjs/core"; 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); createAggregateContext<TAggregateRootClass extends RemoveAbstract<typeof AbstractEventSourcedAggregateRoot>>(transactionContext: TransactionContext | null, aggregateClass: TAggregateRootClass): AggregateContext<TAggregateRootClass>; transaction<TResult>(runInTransaction: RunInTransaction<TResult>): Promise<TResult>; }