UNPKG

@worldbrain/storex-sync

Version:

Offline-first syncing between multiple databases using Storex

31 lines (30 loc) 1.09 kB
import StorageManager from "@worldbrain/storex"; import { ClientSyncLogStorage } from "./client-sync-log"; import { SharedSyncLog } from "./shared-sync-log"; import { ReconcilerFunction, ExecutableOperation } from "./reconciliation"; export declare function shareLogEntries(args: { clientSyncLog: ClientSyncLogStorage; sharedSyncLog: SharedSyncLog; userId: any; deviceId: any; now: number; }): Promise<void>; export declare function receiveLogEntries(args: { clientSyncLog: ClientSyncLogStorage; sharedSyncLog: SharedSyncLog; deviceId: any; now: number; }): Promise<void>; export declare function writeReconcilation(args: { storageManager: StorageManager; reconciliation: ExecutableOperation[]; }): Promise<void>; export declare function doSync({ clientSyncLog, sharedSyncLog, storageManager, reconciler, now, userId, deviceId }: { clientSyncLog: ClientSyncLogStorage; sharedSyncLog: SharedSyncLog; storageManager: StorageManager; reconciler: ReconcilerFunction; now: number; userId: any; deviceId: any; }): Promise<void>;