/** * WebSocket Interceptor for Convex Sync Protocol * * Intercepts WebSocket messages to capture queries, mutations, actions, subscriptions, * and authentication protocol events. */ import type { EventStore } from "../store/event-store.js"; export declare class WebSocketInterceptor { private eventStore; private originalWebSocket; private pendingQueries; private queryContexts; private pendingMutations; private pendingActions; private pendingAuthTokenType; private eventSequence; /** Tracks the most recent mutation event ID for causality linking */ private lastMutationEventId; private lastMutationTimestamp; constructor(eventStore: EventStore); /** * Install the WebSocket interceptor */ install(): void; /** * Uninstall the interceptor */ uninstall(): void; /** * Handle client → server messages */ private handleClientMessage; /** * Handle server → client messages */ private handleServerMessage; /** * Handle query set modifications (subscriptions) */ private handleModifyQuerySet; private handleTransition; /** * Handle mutation requests */ private handleMutationRequest; /** * Handle action requests */ private handleActionRequest; private handleConnectMessage; private handleAuthenticateMessage; /** * Handle mutation responses */ private handleMutationResponse; /** * Handle action responses */ private handleActionResponse; private handleAuthErrorResponse; private nextEventId; private getQueryContext; private emitSubscriptionEvent; private resolveOperationTimings; private emitAuthEvent; /** * Extract and emit log events from logLines */ private emitLogEvents; }