@dugongjs/nestjs
Version:
15 lines (14 loc) • 1.29 kB
TypeScript
import { IConsumedMessageRepository, IDomainEventRepository, IMessageConsumer, WaitForMessageConsumer, type EventSourcedAggregateRoot } from "@dugongjs/core";
import type { ILoggerFactory } from "../logger/i-logger-factory.js";
export declare class WaitForMessageConsumerService {
private readonly currentOrigin;
private readonly domainEventRepository;
private readonly consumedMessageRepository;
private readonly messageConsumer;
private readonly logger?;
constructor(currentOrigin: string, domainEventRepository: IDomainEventRepository, consumedMessageRepository: IConsumedMessageRepository, messageConsumer: IMessageConsumer<any>, loggerFactory?: ILoggerFactory);
getWaitForMessageConsumer(aggregateClass: EventSourcedAggregateRoot): WaitForMessageConsumer;
waitForMessagesToBeConsumed(aggregateClass: EventSourcedAggregateRoot, consumerName: string, ...ids: string[]): Promise<void>;
waitForMessagesToBeConsumedByTenant(aggregateClass: EventSourcedAggregateRoot, consumerName: string, tenantId: string | null, ...ids: string[]): Promise<void>;
waitForAggregateDomainEventsToBeConsumed(aggregateClass: EventSourcedAggregateRoot, consumerName: string, aggregateId: string, tenantId?: string | null, fromSequenceNumber?: number): Promise<void>;
}