/** * These files contain the replication protocol. * It can be used to replicated RxStorageInstances or RxCollections * or even to do a client(s)-server replication. */ import type { RxConflictHandler, RxReplicationHandler, RxStorageInstance, RxStorageInstanceReplicationInput, RxStorageInstanceReplicationState } from '../types/index.d.ts'; export * from './checkpoint.ts'; export * from './downstream.ts'; export * from './upstream.ts'; export * from './meta-instance.ts'; export * from './conflicts.ts'; export * from './helper.ts'; export * from './default-conflict-handler.ts'; /** * Used in tests to ensure all states are cleaned up * and we have no memory leak. */ export declare const OPEN_REPLICATION_STATES: Set>; export declare function replicateRxStorageInstance(input: RxStorageInstanceReplicationInput): RxStorageInstanceReplicationState; export declare function awaitRxStorageReplicationFirstInSync(state: RxStorageInstanceReplicationState): Promise; export declare function awaitRxStorageReplicationInSync(replicationState: RxStorageInstanceReplicationState): Promise<[any, any, any]>; export declare function awaitRxStorageReplicationIdle(state: RxStorageInstanceReplicationState): Promise; export declare function rxStorageInstanceToReplicationHandler(instance: RxStorageInstance, conflictHandler: RxConflictHandler, databaseInstanceToken: string, /** * If set to true, * the _meta.lwt from the pushed documents is kept. * (Used in the migration to ensure checkpoints are still valid) */ keepMeta?: boolean): RxReplicationHandler; export declare function cancelRxStorageReplication(replicationState: RxStorageInstanceReplicationState): Promise;