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<void>;
    subscribeToPersistentSubscriptions(subscriptions: ESPersistentSubscription[]): Promise<void>;
    subscribeToCatchUpSubscriptions(subscriptions: ESCatchUpSubscription[]): Promise<void>;
    subscribeToVolatileSubscriptions(subscriptions: ESVolatileSubscription[]): Promise<void>;
    subscribeToCatchupSubscription(stream: string, resolveLinkTos?: boolean, lastCheckpoint?: number | Long | null): ExtendedCatchUpSubscription;
    subscribeToVolatileSubscription(stream: string, resolveLinkTos?: boolean): Promise<ExtendedVolatileSubscription>;
    get allCatchUpSubscriptionsLive(): boolean;
    get allVolatileSubscriptionsLive(): boolean;
    get allPersistentSubscriptionsLive(): boolean;
    subscribeToPersistentSubscription(stream: string, subscriptionName: string): Promise<ExtendedPersistentSubscription>;
    onEvent(_subscription: EventStorePersistentSubscription | EventStoreCatchUpSubscription | EventStoreVolatileSubscription, payload: ResolvedEvent): Promise<void>;
    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<T extends IEvent>(subject: Subject<T>): Promise<any>;
}
