UNPKG

sveltekit-sync

Version:
14 lines (13 loc) 446 B
import type { RealtimeServerConfig } from '../realtime/types.js'; export interface SyncTableConfig<T = any> { table: string; columns?: string[]; where?: (userId: string) => any; transform?: (row: T) => Partial<T>; conflictResolution?: 'client-wins' | 'server-wins' | 'last-write-wins'; } export interface SyncConfig { tables: Record<string, SyncTableConfig>; realtime?: RealtimeServerConfig; batchSize?: number; }