import { LoggerContext } from './../../../platform-sdk-logging'; import type gremlin from 'gremlin'; import { NeptuneClusterSpec } from "../config/types"; import { NeptuneReaderQueries, NeptuneWriterQueries } from './queries'; export declare type GremlinClient = gremlin.driver.Client; export declare type GremlinRemoteConnection = gremlin.driver.DriverRemoteConnection; export declare type InternalGremlinClientListener = (...args: any[]) => void; export declare type InternalGremlinClient = GremlinClient & { addListener(event: string, listener: InternalGremlinClientListener): void; removeListener(event: string, listener: InternalGremlinClientListener): void; _connection: { _handleClose?: (code: number, message: string) => void; _ws?: WebSocket; isOpen: boolean; open: () => Promise; }; }; export declare type InternalGremlinRemoteConnection = GremlinRemoteConnection & { _client: InternalGremlinClient; }; export declare type BaseNeptuneConnection = NeptuneClusterSpec & { readonly gremlinClient: GremlinClient; readonly gremlinConnection: GremlinRemoteConnection; readonly endpoint: string; readonly port: number; readonly readOnly: boolean; }; export interface ReaderNeptuneConnection extends BaseNeptuneConnection { readonly queries: NeptuneReaderQueries; } export interface WriterNeptuneConnection extends BaseNeptuneConnection { readonly queries: NeptuneWriterQueries; } export declare type GetConnectionInput = { accountId?: string; autoHandleAccountIdPropertyPrefix?: boolean; }; export declare type RefreshConfigInput = { force: boolean; }; export interface NeptuneClient { getReaderConnectionForCurrent(context: LoggerContext, options: GetConnectionInput): Promise; getReaderConnectionForNext(context: LoggerContext, options: GetConnectionInput): Promise; getWriterConnectionForCurrent(context: LoggerContext, options: GetConnectionInput): Promise; getWriterConnectionForNext(context: LoggerContext, options: GetConnectionInput): Promise; close(context: LoggerContext): void; isForceClosed(): boolean; refreshConfig(context: LoggerContext, options?: RefreshConfigInput): Promise; } export declare type NeptuneStaticConfig = NeptuneClusterSpec & { /** * Endpoint domain name (not URL) */ endpoint: string; /** * Port number */ port: number; /** * Connection timeout */ connectTimeout: number; };