import { Observable } from 'lib0/observable'; import { SESSION_AUTO_CREATED, SESSION_STOPPED_EVENT, REMOTE_SESSION_RECORDING_START, REMOTE_SESSION_RECORDING_STOP, SESSION_SAVE_BUFFER_EVENT } from '../config'; import { type ISession, type IUserAttributes } from '@multiplayer-app/session-recorder-common'; export type SocketServiceEvents = typeof SESSION_STOPPED_EVENT | typeof SESSION_AUTO_CREATED | typeof REMOTE_SESSION_RECORDING_START | typeof REMOTE_SESSION_RECORDING_STOP | typeof SESSION_SAVE_BUFFER_EVENT; export interface SocketServiceOptions { apiKey: string; socketUrl: string; keepAlive?: boolean; usePostMessageFallback?: boolean; clientId?: string; } export declare class SocketService extends Observable { private socket; private queue; private isConnecting; private isConnected; private attempts; private sessionId; private options; private usePostMessage; private isInitialized; constructor(); /** * Initialize the socket service * @param config - Socket service configuration */ init(config: SocketServiceOptions): void; /** * Update the socket service configuration * @param config - Partial configuration to update */ updateConfigs(config: Partial): void; private _initConnection; private checkReconnectionAttempts; private sendViaPostMessage; private emitSocketEvent; private flushQueue; send(event: any): void; subscribeToSession(session: ISession): void; unsubscribeFromSession(stopSession?: boolean): void; setUser(data: { userAttributes: IUserAttributes | null; clientId?: string; }): void; close(): Promise; } //# sourceMappingURL=socket.service.d.ts.map