import { OnModuleDestroy, OnModuleInit } from '@nestjs/common'; import { EventBus, IEvent, IEventPublisher, IMessageSource } from '@nestjs/cqrs'; import { ExplorerService } from '@nestjs/cqrs/dist/services/explorer.service'; import * as Long from 'long'; import { EventStoreCatchUpSubscription, EventStorePersistentSubscription, EventStoreSubscription as EventStoreVolatileSubscription, ResolvedEvent } from 'node-eventstore-client'; import { Subject } from 'rxjs'; import { IEventStoreConnectConfig } from './contract/event-store-connect-config.interface'; import { EventStoreCatchupSubscription as ESCatchUpSubscription, EventStoreOptionConfig, EventStorePersistentSubscription as ESPersistentSubscription, EventStoreVolatileSubscription as ESVolatileSubscription, ExtendedCatchUpSubscription, ExtendedPersistentSubscription, ExtendedVolatileSubscription, IEventConstructors } from './contract/event-store-option.config'; export declare class EventStore implements IEventPublisher, OnModuleDestroy, OnModuleInit, IMessageSource { private readonly explorerService; private readonly eventsBus; private logger; private eventStore; private eventHandlers; private subject$; private readonly featureStream?; private readonly subscriptionsDelay?; private catchupSubscriptions; private catchupSubscriptionsCount; private persistentSubscriptions; private persistentSubscriptionsCount; private volatileSubscriptions; private volatileSubscriptionsCount; constructor(eventStore: any, configService: IEventStoreConnectConfig, esStreamConfig: EventStoreOptionConfig, explorerService: ExplorerService, eventsBus: EventBus); sleep(time: number): Promise; 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): Promise; subscribeToVolatileSubscription(stream: string, resolveLinkTos?: boolean): Promise; readonly allCatchUpSubscriptionsLive: boolean; readonly allVolatileSubscriptionsLive: boolean; readonly 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; readonly isLive: boolean; addEventHandlers(eventHandlers: IEventConstructors): void; onModuleInit(): any; onModuleDestroy(): any; bridgeEventsTo(subject: Subject): Promise; }