import { type Socket, type ManagerOptions, type SocketOptions } from 'socket.io-client'; import { WebAppSessionError, type StoredWebSession, type WebAppSession, type WebAppSessionFetch, type WebSessionStorageLike } from './web-app-session.service'; export interface WebSessionTwin { id: string; properties?: { desired?: { settings?: Record; }; }; } export interface WebAppConnectResult { socket: Socket; } export interface WebAppConnectionParams { urlId: string; sessionBaseUrl: string; phyhubUrl: string; code?: string; storedSession?: StoredWebSession; refreshLeadMs?: number; fetch?: WebAppSessionFetch; ioFactory?: (url: string, opts: Partial) => Socket; storage?: WebSessionStorageLike | null; logger?: Pick; } export declare class WebAppConnection { private readonly params; private socket; private session; private connected; private terminated; private latestWebTwin; private terminalError; private refreshTimer; private retryTimer; private rateLimitAttempts; private renewalInFlight; private reconnectRecoveryInFlight; private subscriptions; private sessionTerminatedListeners; private pendingConnectRejecters; private visibilityListener; private pageshowListener; constructor(params: WebAppConnectionParams); connect(): Promise; private establishInitialSession; private persistSession; registerSubscription(twinId: string): void; unregisterSubscription(twinId: string): void; onSessionTerminated(listener: (error: WebAppSessionError) => void): () => void; disconnect(): void; getSession(): WebAppSession | null; getSocket(): Socket | null; isConnected(): boolean; private waitForAuthenticated; private handleAuthenticated; getWebTwin(): WebSessionTwin | null; private handleDisconnect; private replaySubscriptions; private resolveHandshakeAuth; private getEffectiveRefreshLeadMs; private ensureFreshSession; private renewSession; private scheduleRefresh; private runScheduledRefresh; private handleConnectError; private handleRenewalError; private terminate; private handleWake; private attachVisibilityListener; private detachVisibilityListener; private attachPageshowListener; private detachPageshowListener; } //# sourceMappingURL=web-app-connection.service.d.ts.map