export type WebSocketMessageType = | 'highlight:create' | 'highlight:update' | 'highlight:delete' | 'highlight:sync' | 'presence:online' | 'presence:offline' | 'sync:request' | 'sync:response' export interface WebSocketMessage { type: WebSocketMessageType payload: Record timestamp: number clientId: string } export interface SyncRequest { clientId: string lastSyncTime: number userId: string } export interface SyncResponse { highlights: any[] serverTime: number hasMore: boolean } export interface ClientPresence { clientId: string userId: string online: boolean lastSeen: number } export interface WebSocketServerOptions { port: number cors?: { origin: string | string[] credentials: boolean } }