import { BehaviorSubject, Subject, Subscription } from 'rxjs'; import type { InternalStoreDocType, RxCollection, RxDocumentData } from '../../types'; import type { CheckpointDocData, RxPipelineHandler, RxPipelineOptions } from './types'; export declare class RxPipeline { readonly identifier: string; readonly source: RxCollection; readonly destination: RxCollection; readonly handler: RxPipelineHandler; readonly batchSize: number; processQueue: Promise; subs: Subscription[]; stopped: boolean; toRun: number; checkpointId: string; lastSourceDocTime: BehaviorSubject; lastProcessedDocTime: BehaviorSubject; somethingChanged: Subject; secretFunctionName: string; waitBeforeWriteFn: () => Promise; /** * The handler of the pipeline must never throw. * If it did anyway, the pipeline will be stuck and always * throw the previous error on all operations. */ error: any; constructor(identifier: string, source: RxCollection, destination: RxCollection, handler: RxPipelineHandler, batchSize?: number); trigger(): void; awaitIdle(): Promise; close(): Promise; /** * Remove the pipeline and all metadata which it has stored */ remove(): Promise; } export declare function getCheckpointDoc(pipeline: RxPipeline): Promise> | undefined>; export declare function setCheckpointDoc(pipeline: RxPipeline, newCheckpoint: CheckpointDocData, previous?: RxDocumentData): Promise; export declare function addPipeline(this: RxCollection, options: RxPipelineOptions): Promise>;