/** * Relay Service Client * WebSocket, Real-time Collaboration, Operational Transform */ import type { Document, Operation, UserPresence } from '../types'; export interface RelayClientConfig { wsUrl?: string; timeout?: number; } export type OperationHandler = (operation: Operation) => void; export type PresenceHandler = (presence: UserPresence) => void; export type ConnectionHandler = (connected: boolean) => void; export interface RelayMessage { type: string; data: unknown; timestamp: number; } export declare class RelayClient { private wsUrl; private timeout; private ws?; private isConnected; private authToken?; private documentId?; private operationHandlers; private presenceHandlers; private connectionHandlers; private messageQueue; private reconnectAttempts; private maxReconnectAttempts; private reconnectDelay; constructor(config?: RelayClientConfig); connectWebSocket(documentId: string): Promise; disconnectWebSocket(): Promise; disconnect(): void; isConnectedStatus(): boolean; setAuthToken(token: string): void; sendOperation(operation: Operation): Promise; subscribeToOperations(handler: OperationHandler): () => void; broadcastPresence(presence: UserPresence): Promise; subscribeToPresence(handler: PresenceHandler): () => void; onConnectionChange(handler: ConnectionHandler): () => void; getDocumentSnapshot(): Promise; private sendMessage; private handleMessage; private flushMessageQueue; private attemptReconnect; private notifyConnectionHandlers; } //# sourceMappingURL=RelayClient.d.ts.map