import { Client as ElasticClient } from '@elastic/elasticsearch'; export interface IElasticDocConstructorOptions { index: string; node: string; auth?: { username: string; password: string; }; } export interface ISnapshot { date: string; aggregationData: any; } export type SnapshotProcessor = (iterator: AsyncIterable, prevSnapshot: ISnapshot | null) => Promise; export declare class ElasticDoc { client: ElasticClient; index: string; private sessionDocs; private indexInitialized; private latestTimestamp; private onlyNew; fastForward: boolean; private BATCH_SIZE; constructor(options: IElasticDocConstructorOptions); private ensureIndexExists; private createMappingsFromDoc; startPipingSession(options: { onlyNew?: boolean; }): Promise; pipeDocument(optionsArg: { docId: string; timestamp?: string | number; doc: any; }): Promise; endPipingSession(): Promise; takeSnapshot(processIterator: SnapshotProcessor): Promise; private getLastSnapshot; private getDocumentIterator; private storeSnapshot; }