import { OnModuleDestroy, OnModuleInit } from '@nestjs/common'; import { IEvent, IEventPublisher, EventBus, IMessageSource } from '@nestjs/cqrs'; import { ExplorerService } from '@nestjs/cqrs/dist/services/explorer.service'; import * as Long from 'long'; import { Subject } from 'rxjs'; import { EventStorePersistentSubscription, ResolvedEvent, EventStoreCatchUpSubscription, EventStoreSubscription as EventStoreVolatileSubscription } from 'node-eventstore-client'; import { EventStoreOptionConfig, IEventConstructors, EventStorePersistentSubscription as ESPersistentSubscription, EventStoreCatchupSubscription as ESCatchUpSubscription, EventStoreVolatileSubscription as ESVolatileSubscription, ExtendedCatchUpSubscription, ExtendedVolatileSubscription, ExtendedPersistentSubscription, EventStoreModuleOptions } from '../contract'; export declare class EventStore implements IEventPublisher, OnModuleDestroy, OnModuleInit, IMessageSource { private readonly explorerService; private readonly eventsBus; private logger; private eventStore; private store; private eventHandlers; private subject$; private readonly featureStream?; private catchupSubscriptions; private catchupSubscriptionsCount; private persistentSubscriptions; private persistentSubscriptionsCount; private volatileSubscriptions; private volatileSubscriptionsCount; constructor(eventStore: any, configService: EventStoreModuleOptions, esStreamConfig: EventStoreOptionConfig, explorerService: ExplorerService, eventsBus: EventBus); publish(event: IEvent, stream?: string): Promise; subscribeToPersistentSubscriptions(subscriptions: ESPersistentSubscription[]): Promise; subscribeToCatchUpSubscriptions(subscriptions: ESCatchUpSubscription[]): Promise; subscribeToVolatileSubscriptions(subscriptions: ESVolatileSubscription[]): Promise; subscribeToCatchupSubscription(stream: string, resolveLinkTos?: boolean, lastCheckpoint?: number | Long | null): ExtendedCatchUpSubscription; subscribeToVolatileSubscription(stream: string, resolveLinkTos?: boolean): Promise; get allCatchUpSubscriptionsLive(): boolean; get allVolatileSubscriptionsLive(): boolean; get allPersistentSubscriptionsLive(): boolean; subscribeToPersistentSubscription(stream: string, subscriptionName: string): Promise; onEvent(_subscription: EventStorePersistentSubscription | EventStoreCatchUpSubscription | EventStoreVolatileSubscription, payload: ResolvedEvent): Promise; onDropped(subscription: ExtendedPersistentSubscription | ExtendedCatchUpSubscription | ExtendedVolatileSubscription, _reason: string, error: Error): void; onLiveProcessingStarted(subscription: ExtendedCatchUpSubscription): void; get isLive(): boolean; addEventHandlers(eventHandlers: IEventConstructors): void; onModuleInit(): any; onModuleDestroy(): any; bridgeEventsTo(subject: Subject): Promise; }