delta-sync
Version:
A lightweight framework for bi-directional database synchronization with automatic version tracking and conflict resolution.
24 lines (23 loc) • 821 B
TypeScript
import { DataChangeSet, SyncProgress, SyncStatus } from './types';
export interface SyncOptions {
autoSync?: {
enabled?: boolean;
pullInterval?: number;
pushDebounce?: number;
retryDelay?: number;
};
onStatusUpdate?: (status: SyncStatus) => void;
onSyncProgress?: (progress: SyncProgress) => void;
onVersionUpdate?: (_ver: number) => void;
onChangePushed?: (changes: DataChangeSet) => void;
onChangePulled?: (changes: DataChangeSet) => void;
onPullAvailableCheck?: () => boolean;
onPushAvailableCheck?: () => boolean;
maxRetries?: number;
timeout?: number;
batchSize?: number;
payloadSize?: number;
maxFileSize?: number;
fileChunkSize?: number;
}
export declare const createDefaultOptions: (options: SyncOptions) => SyncOptions;