Interface SyncManagerConfig

Sync manager configuration.

interface SyncManagerConfig {
    primary: string | DatabaseConfig;
    remote?: string | DatabaseConfig;
    sync?: SyncConfig;
    onSync?: ((result: SyncResult) => void);
    onConflict?: ((conflict: SyncConflict) => void);
    onOffline?: (() => void);
    onOnline?: (() => void);
    onError?: ((error: Error) => void);
    onProgress?: ((progress: SyncProgress) => void);
}

Properties

primary: string | DatabaseConfig

Primary database (writes go here)

remote?: string | DatabaseConfig

Remote database for sync (optional for offline-only)

sync?: SyncConfig

Sync configuration

onSync?: ((result: SyncResult) => void)

Called after successful sync

onConflict?: ((conflict: SyncConflict) => void)

Called when conflict detected

onOffline?: (() => void)

Called when going offline

onOnline?: (() => void)

Called when coming online

onError?: ((error: Error) => void)

Called on sync error

onProgress?: ((progress: SyncProgress) => void)

Called on sync progress