import { ErrorHandler, SuccessHandler } from '../handlers'; import type { RealtimeClientOptionsBeforePrune, ResponseCreateParams, ResponseCreateStrict, TokenProvider, RealtimeEventMap, RealtimeEventListener } from '../types'; type ConnectionState = 'idle' | 'connecting' | 'connected' | 'disconnected' | 'error'; type ConnectionListener = (state: ConnectionState) => void; export declare class RealtimeClientClass { private options; private connectionState; private connectionListeners; private connecting; private disconnecting; private peerConnectionManager; private mediaManager; private dataChannelManager; private messageSender; private eventRouter; private apiClient; private errorHandler; private successHandler; private chatStore?; private chatWired; private connectSeq; private dataChannelReady; private peerConnectionConnected; constructor(userOptions: RealtimeClientOptionsBeforePrune, success?: SuccessHandler, error?: ErrorHandler); /** * Обновляет состояние подключения на основе состояния PeerConnection и DataChannel * Соединение считается полностью установленным только когда оба готовы */ private updateConnectionState; setTokenProvider(tp: TokenProvider): void; private setConnectionState; getConnectionState(): ConnectionState; getStatus(): ConnectionState; /** * Возвращает true только если и PeerConnection и DataChannel полностью готовы */ isFullyConnected(): boolean; onConnectionStateChange(listener: ConnectionListener): () => boolean; private wireChatStore; on(type: K, handler: RealtimeEventListener): () => void; on(type: string, handler: (payload: any) => void): () => void; private preConnectCleanup; private makeAbortError; private assertNotAborted; enableMicrophone(): Promise; disableMicrophone(): Promise; connect(): Promise; disconnect(): Promise; sendRaw(event: any): Promise; sendResponse(): void; sendResponse(params: ResponseCreateParams): void; sendResponseStrict(options: ResponseCreateStrict): void; updateSession(patch: Partial): void; sendToolOutput(call_id: string, output: any): void; getPeerConnection(): import("react-native-webrtc").RTCPeerConnection | null; getDataChannel(): import("react-native-webrtc/lib/typescript/RTCDataChannel").default | null; getLocalStream(): import("react-native-webrtc").MediaStream | null; getRemoteStream(): import("react-native-webrtc").MediaStream | null; getChat(): import("../types").ChatMsg[]; clearChatHistory(): void; onChatUpdate(handler: (chat: any[]) => void): () => void; isConnected(): boolean; } export {}; //# sourceMappingURL=RealtimeClientClass.d.ts.map