import type { PeerScreenShare } from '../signaling/screen-share.js'; import type { WaVoipSettings } from '../signaling/voip-settings.js'; import { CallDirection, CallMediaType, CallState, type CallTransition, type EndCallReason, type PeerVideoStateChange, type RelayData } from '../types.js'; export interface CallStateData { state: CallState; connectedAt?: Date; acceptedAt?: Date; endedAt?: Date; audioMuted: boolean; /** * Microphone state the peer last announced for itself, `undefined` until it does. An * observation, not a local state, so it is recorded directly and not as a transition. */ peerAudioMuted?: boolean; videoOff: boolean; /** Local raise-hand state; the remote hands are {@link CallInfo.raisedHands}. */ handRaised: boolean; /** * Whether this side is sharing right now (the peer's is * {@link CallInfo.peerScreenShare}). While set, the call's one video stream carries * the screen and not a camera. */ screenSharing: boolean; silenced?: boolean; /** Incoming call waiting for a free slot; cannot accept until unblocked. */ acceptBlocked?: boolean; endReason?: EndCallReason; durationSecs?: number; } export declare class CallInfo { callId: string; peerJid: string; callCreator: string; direction: CallDirection; mediaType: CallMediaType; stateData: CallStateData; createdAt: Date; groupJid?: string; isOffline: boolean; callerPn?: string; encryptionKey?: Uint8Array; relayData?: RelayData; electedRelayIdx?: number; /** * Remote participants whose hand is raised, keyed by the device JID the stanza arrived * from. An entry survives until that participant lowers the hand. */ readonly raisedHands: Set; /** * Configuration the server sent alongside the offer of this call, in the * `` node, parsed once on arrival. Absent when the node did * not come or could not be read, and in that case every consumer stays on * the compiled defaults. */ voipSettings?: WaVoipSettings; /** * Last screen-share state the peer reported. Updated in place, so a `voip_call_state` * listener reads the current value without subscribing to `voip_call_screen_share`. */ peerScreenShare?: PeerScreenShare; /** * Last video state the peer announced, from its `