import { ModuleMetadata, Type } from '@nestjs/common/interfaces'; import { ConnectionSettings, TcpEndPoint } from 'node-eventstore-client'; import { EventStoreOptionConfig } from './event-store-option.config'; import { ClientOpts } from 'node-nats-streaming'; import { BrokerTypes } from './shared-store.interface'; export declare type EventStoreModuleOptions = { type: 'event-store'; options: ConnectionSettings; tcpEndpoint: TcpEndPoint; } | { type: 'nats'; clusterId: string; clientId?: string; groupId?: string; options: ClientOpts; }; export interface EventStoreOptionsFactory { createEventStoreOptions(connectionName?: string): Promise | EventStoreModuleOptions; } export interface EventStoreModuleAsyncOptions extends Pick { type: BrokerTypes; name?: string; useExisting?: Type; useClass?: Type; useFactory?: (...args: any[]) => Promise | EventStoreModuleOptions; inject?: any[]; } export interface EventStoreFeatureOptionsFactory { createFeatureOptions(connectionName?: string): Promise | EventStoreOptionConfig; } export interface EventStoreFeatureAsyncOptions extends Pick { name?: string; type: BrokerTypes; useExisting?: Type; useClass?: Type; useFactory?: (...args: any[]) => Promise | EventStoreOptionConfig; inject?: any[]; }