import { OnModuleDestroy, OnModuleInit } from '@nestjs/common'; import { IEvent, IEventPublisher, EventBus, IMessageSource } from '@nestjs/cqrs'; import { ExplorerService } from '@nestjs/cqrs/dist/services/explorer.service'; import { Subject } from 'rxjs'; import { EventStoreOptionConfig, IEventConstructors, NatsEventStorePersistentSubscription as ESPersistentSubscription, NatsEventStoreVolatileSubscription as ESVolatileSubscription, ExtendedNatsVolatileSubscription, ExtendedNatsPersistentSubscription, EventStoreModuleOptions } from '../contract'; import { Message } from 'node-nats-streaming'; export declare class NatsEventStore implements IEventPublisher, OnModuleDestroy, OnModuleInit, IMessageSource { private readonly configService; private readonly esStreamConfig; private readonly explorerService; private readonly eventsBus; private logger; private eventStore; private eventHandlers; private subject$; private readonly featureStream?; private persistentSubscriptions; private persistentSubscriptionsCount; private volatileSubscriptions; private volatileSubscriptionsCount; constructor(eventStore: any, configService: EventStoreModuleOptions, esStreamConfig: EventStoreOptionConfig, explorerService: ExplorerService, eventsBus: EventBus); private initSubs; publish(event: IEvent & { handlerType?: string; }, stream?: string): Promise; private getStreamId; subscribeToPersistentSubscriptions(subscriptions: ESPersistentSubscription[]): Promise; subscribeToVolatileSubscriptions(subscriptions: ESVolatileSubscription[]): Promise; subscribeToVolatileSubscription(stream: string, startAt?: number, maxInFlight?: number, ackWait?: number, manualAcks?: boolean): Promise; get allVolatileSubscriptionsLive(): boolean; get allPersistentSubscriptionsLive(): boolean; subscribeToPersistentSubscription(stream: string, durableName: string, startAt?: number, maxInFlight?: number, ackWait?: number, manualAcks?: boolean): Promise; onEvent(payload: Message): Promise; onDropped(error: any): void; get isLive(): boolean; addEventHandlers(eventHandlers: IEventConstructors): void; onModuleInit(): any; onModuleDestroy(): any; bridgeEventsTo(subject: Subject): Promise; }