import * as v from "valibot"; import * as zustand0 from "zustand"; import * as zustand_middleware0 from "zustand/middleware"; import React from "react"; import JitsiMeetJS from "@cometchat/calls-lib-webrtc"; import { AppStateStatus } from "react-native"; //#region calls-sdk-core/event-listeners/onTrack.d.ts declare function onTrack(track: any): void; //#endregion //#region calls-sdk-core/utils/calculate-tile-layout.d.ts interface TileLayout { rows: number; columns: number; tileWidth: number; tileHeight: number; paddingVertical: number; allocatedWidth: number; allocatedHeight: number; } /** * Calculates the optimal tile layout for a container * @param containerWidth - Width of the container * @param containerHeight - Height of the container * @param numberOfTiles - Total number of tiles to arrange * @returns TileLayout object containing rows, columns, and tile dimensions * @throws Error if input parameters are invalid */ declare function calculateTileLayout(containerWidth: number, containerHeight: number, numberOfTiles: number): TileLayout; //#endregion //#region calls-sdk-core/utils/common.d.ts declare const getAvatarTextInitials: (fullName: string) => string; declare const miliSecondsToMMSS: (ms: number) => string; declare function getHueFromName(name: string): number; declare function getColorFromName(name: string): string; declare function safeParseJson(jsonString: string): T | null; declare const getMediaType: (track: any) => MediaType; declare function differenceBy(array: T[], values: U[], iteratee: (value: T | U) => any): T[]; declare function sleep(ms?: number): Promise; declare function isArrayOfObjEqual(arr1: any[], arr2: any[]): boolean; declare function isDeviceEqual(device1: MediaDeviceInfo | undefined, device2: MediaDeviceInfo | undefined): boolean; declare function getDefaultDevice(devices: T[]): T; /** * Returns a promise that resolves when the given Zustand store * satisfies the provided predicate. Resolves immediately if the * condition is already met. Includes a timeout to avoid hanging * forever (defaults to 5 000 ms). */ declare function waitForStoreState(store: { getState: () => T; subscribe: (listener: (state: T) => void) => () => void; }, predicate: (state: T) => boolean, timeoutMs?: number): Promise; //#endregion //#region calls-sdk-core/utils/connection-error.d.ts declare function isFatalConnectionError(error: ConnectionError): boolean; //#endregion //#region calls-sdk-core/utils/constants.d.ts declare const MIN_ASPECT_RATIO: number; declare const MAX_ASPECT_RATIO: number; declare const GRID_GAP = 8; declare const MIN_TILE_WIDTH = 240; declare const PARTICIPANT_ROLE: { readonly MODERATOR: "moderator"; readonly NONE: "none"; }; declare const MEDIA_TYPE: { readonly AUDIO: "audio"; readonly VIDEO: "video"; readonly SCREENSHARE: "screenshare"; }; declare const LAYOUT: { readonly TILE: "TILE"; readonly SIDEBAR: "SIDEBAR"; readonly SPOTLIGHT: "SPOTLIGHT"; }; declare const SESSION_TYPE: { readonly VOICE: "VOICE"; readonly VIDEO: "VIDEO"; }; declare const CAMERA_FACING: { readonly FRONT: "FRONT"; readonly REAR: "REAR"; }; declare const CAMERA_FACING_INTERNAL: { readonly USER: "user"; readonly ENVIRONMENT: "environment"; }; declare const VIDEO_PAUSE_AUTHORITY: { USER: number; BACKGROUND: number; SCREEN_SHARE: number; }; declare const CONFERENCE_COMMANDS: { userInfo: string; initialConfig: string; }; declare const VIDEO_QUALITY_LEVELS: { ULTRA: number; HIGH: number; STANDARD: number; LOW: number; NONE: number; }; declare const SDK_PLATFORM: { readonly WEB: "web"; readonly ANDROID: "android"; readonly IOS: "ios"; readonly REACT_NATIVE_ANDROID: "react-native-android"; readonly REACT_NATIVE_IOS: "react-native-ios"; }; declare const EVENT_LISTENER_METHODS: { readonly SessionStatusListener: { readonly onSessionJoined: "onSessionJoined"; readonly onSessionLeft: "onSessionLeft"; readonly onConnectionLost: "onConnectionLost"; readonly onConnectionRestored: "onConnectionRestored"; readonly onConnectionClosed: "onConnectionClosed"; readonly onConnectionFailed: "onConnectionFailed"; readonly onSessionTimedOut: "onSessionTimedOut"; }; readonly MediaEventsListener: { readonly onAudioMuted: "onAudioMuted"; readonly onAudioUnMuted: "onAudioUnMuted"; readonly onVideoPaused: "onVideoPaused"; readonly onVideoResumed: "onVideoResumed"; readonly onRecordingStarted: "onRecordingStarted"; readonly onRecordingStopped: "onRecordingStopped"; readonly onScreenShareStarted: "onScreenShareStarted"; readonly onScreenShareStopped: "onScreenShareStopped"; }; readonly ParticipantEventsListner: { readonly onParticipantJoined: "onParticipantJoined"; readonly onParticipantLeft: "onParticipantLeft"; readonly onParticipantAudioMuted: "onParticipantAudioMuted"; readonly onParticipantAudioUnmuted: "onParticipantAudioUnmuted"; readonly onParticipantVideoPaused: "onParticipantVideoPaused"; readonly onParticipantVideoResumed: "onParticipantVideoResumed"; readonly onParticipantHandRaised: "onParticipantHandRaised"; readonly onParticipantHandLowered: "onParticipantHandLowered"; readonly onParticipantStartedScreenShare: "onParticipantStartedScreenShare"; readonly onParticipantStoppedScreenShare: "onParticipantStoppedScreenShare"; readonly onParticipantStartedRecording: "onParticipantStartedRecording"; readonly onParticipantStoppedRecording: "onParticipantStoppedRecording"; readonly onDominantSpeakerChanged: "onDominantSpeakerChanged"; readonly onParticipantListChanged: "onParticipantListChanged"; }; readonly ButtonClickListener: { readonly onLeaveSessionButtonClicked: "onLeaveSessionButtonClicked"; readonly onRaiseHandButtonClicked: "onRaiseHandButtonClicked"; readonly onShareInviteButtonClicked: "onShareInviteButtonClicked"; readonly onChangeLayoutButtonClicked: "onChangeLayoutButtonClicked"; readonly onParticipantListButtonClicked: "onParticipantListButtonClicked"; readonly onToggleAudioButtonClicked: "onToggleAudioButtonClicked"; readonly onToggleVideoButtonClicked: "onToggleVideoButtonClicked"; readonly onRecordingToggleButtonClicked: "onRecordingToggleButtonClicked"; readonly onScreenShareButtonClicked: "onScreenShareButtonClicked"; readonly onChatButtonClicked: "onChatButtonClicked"; }; readonly CallLayoutListener: { readonly onCallLayoutChanged: "onCallLayoutChanged"; readonly onParticipantListVisible: "onParticipantListVisible"; readonly onParticipantListHidden: "onParticipantListHidden"; }; }; declare const EVENT_LISTENER_METHODS_WEB: { readonly MediaEventsListener: { readonly onAudioInputDeviceChanged: "onAudioInputDeviceChanged"; readonly onVideoInputDeviceChanged: "onVideoInputDeviceChanged"; readonly onAudioOutputDeviceChanged: "onAudioOutputDeviceChanged"; readonly onAudioInputDevicesChanged: "onAudioInputDevicesChanged"; readonly onVideoInputDevicesChanged: "onVideoInputDevicesChanged"; readonly onAudioOutputDevicesChanged: "onAudioOutputDevicesChanged"; readonly onAudioMuted: "onAudioMuted"; readonly onAudioUnMuted: "onAudioUnMuted"; readonly onVideoPaused: "onVideoPaused"; readonly onVideoResumed: "onVideoResumed"; readonly onRecordingStarted: "onRecordingStarted"; readonly onRecordingStopped: "onRecordingStopped"; readonly onScreenShareStarted: "onScreenShareStarted"; readonly onScreenShareStopped: "onScreenShareStopped"; }; readonly SessionStatusListener: { readonly onSessionJoined: "onSessionJoined"; readonly onSessionLeft: "onSessionLeft"; readonly onConnectionLost: "onConnectionLost"; readonly onConnectionRestored: "onConnectionRestored"; readonly onConnectionClosed: "onConnectionClosed"; readonly onConnectionFailed: "onConnectionFailed"; readonly onSessionTimedOut: "onSessionTimedOut"; }; readonly ParticipantEventsListner: { readonly onParticipantJoined: "onParticipantJoined"; readonly onParticipantLeft: "onParticipantLeft"; readonly onParticipantAudioMuted: "onParticipantAudioMuted"; readonly onParticipantAudioUnmuted: "onParticipantAudioUnmuted"; readonly onParticipantVideoPaused: "onParticipantVideoPaused"; readonly onParticipantVideoResumed: "onParticipantVideoResumed"; readonly onParticipantHandRaised: "onParticipantHandRaised"; readonly onParticipantHandLowered: "onParticipantHandLowered"; readonly onParticipantStartedScreenShare: "onParticipantStartedScreenShare"; readonly onParticipantStoppedScreenShare: "onParticipantStoppedScreenShare"; readonly onParticipantStartedRecording: "onParticipantStartedRecording"; readonly onParticipantStoppedRecording: "onParticipantStoppedRecording"; readonly onDominantSpeakerChanged: "onDominantSpeakerChanged"; readonly onParticipantListChanged: "onParticipantListChanged"; }; readonly ButtonClickListener: { readonly onLeaveSessionButtonClicked: "onLeaveSessionButtonClicked"; readonly onRaiseHandButtonClicked: "onRaiseHandButtonClicked"; readonly onShareInviteButtonClicked: "onShareInviteButtonClicked"; readonly onChangeLayoutButtonClicked: "onChangeLayoutButtonClicked"; readonly onParticipantListButtonClicked: "onParticipantListButtonClicked"; readonly onToggleAudioButtonClicked: "onToggleAudioButtonClicked"; readonly onToggleVideoButtonClicked: "onToggleVideoButtonClicked"; readonly onRecordingToggleButtonClicked: "onRecordingToggleButtonClicked"; readonly onScreenShareButtonClicked: "onScreenShareButtonClicked"; readonly onChatButtonClicked: "onChatButtonClicked"; }; readonly CallLayoutListener: { readonly onCallLayoutChanged: "onCallLayoutChanged"; readonly onParticipantListVisible: "onParticipantListVisible"; readonly onParticipantListHidden: "onParticipantListHidden"; }; }; declare const EVENT_LISTENER_METHODS_MOBILE: { readonly MediaEventsListener: { readonly onAudioModeChanged: "onAudioModeChanged"; readonly onCameraFacingChanged: "onCameraFacingChanged"; readonly onAudioMuted: "onAudioMuted"; readonly onAudioUnMuted: "onAudioUnMuted"; readonly onVideoPaused: "onVideoPaused"; readonly onVideoResumed: "onVideoResumed"; readonly onRecordingStarted: "onRecordingStarted"; readonly onRecordingStopped: "onRecordingStopped"; readonly onScreenShareStarted: "onScreenShareStarted"; readonly onScreenShareStopped: "onScreenShareStopped"; }; readonly ButtonClickListener: { readonly onSwitchCameraButtonClicked: "onSwitchCameraButtonClicked"; readonly onLeaveSessionButtonClicked: "onLeaveSessionButtonClicked"; readonly onRaiseHandButtonClicked: "onRaiseHandButtonClicked"; readonly onShareInviteButtonClicked: "onShareInviteButtonClicked"; readonly onChangeLayoutButtonClicked: "onChangeLayoutButtonClicked"; readonly onParticipantListButtonClicked: "onParticipantListButtonClicked"; readonly onToggleAudioButtonClicked: "onToggleAudioButtonClicked"; readonly onToggleVideoButtonClicked: "onToggleVideoButtonClicked"; readonly onRecordingToggleButtonClicked: "onRecordingToggleButtonClicked"; readonly onScreenShareButtonClicked: "onScreenShareButtonClicked"; readonly onChatButtonClicked: "onChatButtonClicked"; }; readonly CallLayoutListener: { readonly onPictureInPictureLayoutEnabled: "onPictureInPictureLayoutEnabled"; readonly onPictureInPictureLayoutDisabled: "onPictureInPictureLayoutDisabled"; readonly onCallLayoutChanged: "onCallLayoutChanged"; readonly onParticipantListVisible: "onParticipantListVisible"; readonly onParticipantListHidden: "onParticipantListHidden"; }; readonly SessionStatusListener: { readonly onSessionJoined: "onSessionJoined"; readonly onSessionLeft: "onSessionLeft"; readonly onConnectionLost: "onConnectionLost"; readonly onConnectionRestored: "onConnectionRestored"; readonly onConnectionClosed: "onConnectionClosed"; readonly onConnectionFailed: "onConnectionFailed"; readonly onSessionTimedOut: "onSessionTimedOut"; }; readonly ParticipantEventsListner: { readonly onParticipantJoined: "onParticipantJoined"; readonly onParticipantLeft: "onParticipantLeft"; readonly onParticipantAudioMuted: "onParticipantAudioMuted"; readonly onParticipantAudioUnmuted: "onParticipantAudioUnmuted"; readonly onParticipantVideoPaused: "onParticipantVideoPaused"; readonly onParticipantVideoResumed: "onParticipantVideoResumed"; readonly onParticipantHandRaised: "onParticipantHandRaised"; readonly onParticipantHandLowered: "onParticipantHandLowered"; readonly onParticipantStartedScreenShare: "onParticipantStartedScreenShare"; readonly onParticipantStoppedScreenShare: "onParticipantStoppedScreenShare"; readonly onParticipantStartedRecording: "onParticipantStartedRecording"; readonly onParticipantStoppedRecording: "onParticipantStoppedRecording"; readonly onDominantSpeakerChanged: "onDominantSpeakerChanged"; readonly onParticipantListChanged: "onParticipantListChanged"; }; }; declare const INTERNAL_EVENTS: { readonly connectionWillClose: "internal.sessionWillClose"; readonly onConnectionEstablished: "internal.onConnectionEstablished"; readonly onSessionJoined: "internal.onSessionJoined"; readonly notification: "internal.notification"; readonly queryPermission: "internal.queryPermission"; readonly lifecycle: { readonly componentDidMount: "internal.componentDidMount"; readonly componentWillUnmount: "internal.componentWillUnmount"; readonly SDKInitialized: "internal.SDKInitialized"; }; }; //#endregion //#region calls-sdk-core/utils/debounce.d.ts declare function debounce any>(func: T, delay: number): (...args: Parameters) => void; //#endregion //#region calls-sdk-core/store/base.d.ts type AudioInputDevice = MediaDeviceInfo & { kind: Extract; }; type AudioOutputDevice = MediaDeviceInfo & { kind: Extract; }; type VideoInputDevice = MediaDeviceInfo & { kind: Extract; }; type Subscription = (() => void) | { remove: () => void; }; type BaseState = { participantListVisible: boolean; moreMenuVisible: boolean; subscriptions: Subscription[]; isPIPLayoutEnabled: boolean; audioModes: AudioMode[]; audioInputDevices: AudioInputDevice[]; audioOutputDevices: AudioOutputDevice[]; videoInputDevices: VideoInputDevice[]; audioInputDevice?: AudioInputDevice & { skipSubscribe: boolean; }; audioOutputDevice?: AudioOutputDevice; videoInputDevice?: VideoInputDevice & { skipSubscribe: boolean; }; previewVideoInputDevice?: VideoInputDevice; selectedAudioModeType?: AudioMode['type']; audioModeMenuVisible: boolean; layout: Layout; sidebarLayoutSetProgrammatically: boolean; cameraFacing: CameraFacingInternal; connectionRetryCount: number; settingsDialogVisible: boolean; virtualBackgroundDialogVisible: boolean; idealTimeoutTimer?: NodeJS.Timeout; idleTimeoutModalVisible: boolean; mirrorLocalVideo: boolean; isDesktopSharingEnabled: boolean; isBlurSupported: boolean; appState?: AppStateStatus; desktopSharingFrameRate: 5 | 15 | 30; chatButtonUnreadCount: number; enableNoiseReduction: boolean; sdkPlatform: SDKPlatform; platformVersion?: string | number; userAgent?: string; previewVideoTrack?: any; isMobileBrowser: boolean; mainAreaDimension: { width: number; height: number; }; tileDimensions: { tileWidth: number; tileHeight: number; }; callContainerDimension: { width: number; height: number; }; visibleParticipants: { startIndex: number; endIndex: number; }; sidebarVisibleParticipants: { startIndex: number; endIndex: number; }; }; type Actions$5 = { toggleParticipantListVisible: () => void; reset: () => void; toggleMoreMenuVisible: () => void; addSubscriptions: (subscriptions: Subscription[]) => void; incrementConnectionRetryCount: () => void; clearIdealTimeoutTimer: () => void; restartIdealTimeoutTimer: () => void; isMobileSDK: () => boolean; isMobile: () => boolean; }; declare const useBaseStore: zustand0.UseBoundStore, "subscribe"> & { subscribe: { (listener: (selectedState: BaseState & Actions$5, previousSelectedState: BaseState & Actions$5) => void): () => void; (selector: (state: BaseState & Actions$5) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: { equalityFn?: ((a: U, b: U) => boolean) | undefined; fireImmediately?: boolean; } | undefined): () => void; }; }, "persist"> & { persist: { setOptions: (options: Partial>) => void; clearStorage: () => void; rehydrate: () => Promise | void; hasHydrated: () => boolean; onHydrate: (fn: (state: BaseState & Actions$5) => void) => () => void; onFinishHydration: (fn: (state: BaseState & Actions$5) => void) => () => void; getOptions: () => Partial>; }; }>; declare const toggleParticipantListVisible: () => void; declare const hideParticipantList: () => void; declare const showParticipantList: () => void; declare const toggleParticipantList: () => void; declare const toggleMoreMenuVisible: () => void; declare const toggleAudioModeMenuVisible: () => void; declare const setLayout: (layout: Layout, sidebarLayoutSetProgrammatically?: boolean) => void; declare const hideAllBottomSheets: () => void; declare const enablePictureInPictureLayout: () => void; declare const disablePictureInPictureLayout: () => void; declare const showSettingsDialog: () => void; declare const hideSettingsDialog: () => void; declare const toggleSettingsDialog: () => void; declare const showVirtualBackgroundDialog: () => void; declare const hideVirtualBackgroundDialog: () => void; declare const toggleMirrorLocalVideo: () => void; declare const toggleEnableNoiseReduction: () => void; declare const setChatButtonUnreadCount: (count: number) => void; declare const setAudioMode: (mode: AudioMode["type"]) => void; declare const getLayout: () => Layout; declare function initBaseStoreSubscriptions(): void; //#endregion //#region calls-sdk-core/store/conference.d.ts type ConferenceState = { conferenceError?: string; conference: any; conferenceJoined: boolean; conferenceJoinedAt: number | null; conferenceStartedAt: number | null; p2p: boolean; conferenceStatus: 'initial' | 'joining' | 'joined' | 'error' | 'interrupted' | 'left' | 'restored' | 'reconnecting'; connectionQuality: Map; raiseHandMap: Map; recording: { status: ValueOf; mode: ValueOf; error?: string; sessionId?: string; initiator?: any; }; isRecording: boolean; }; type Actions$4 = { reset: () => void; conferenceWillJoin: (conference: any) => void; raiseHand: (participantId: string, timestamp: number) => void; lowerHand: (participantId: string) => void; leaveConference: () => Promise; endConference: () => Promise; stopRecording: () => Promise; }; declare const useConferenceStore: zustand0.UseBoundStore, "subscribe"> & { subscribe: { (listener: (selectedState: ConferenceState & Actions$4, previousSelectedState: ConferenceState & Actions$4) => void): () => void; (selector: (state: ConferenceState & Actions$4) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: { equalityFn?: ((a: U, b: U) => boolean) | undefined; fireImmediately?: boolean; } | undefined): () => void; }; }>; declare const useSessionTimer: () => number; declare function raisedHandLocal(): void; declare function lowerHandLocal(): void; declare function toggleRaiseHand(): void; declare const useIsRecording: () => boolean; declare function startRecording(): Promise; declare function stopRecording(): Promise; declare function toggleRecording(): Promise; declare const getIsConferenceJoined: () => boolean; //#endregion //#region calls-sdk-core/store/config.d.ts type ConfigStateInternal = { devSessionId: string; internalSettings?: string; sessionId?: string; iAmRecorder: boolean; showFrameRate: boolean; enableCompanionMode: boolean; sdkPlatform?: SDKPlatform; }; type ConfigStateMobile = { audioMode?: AudioMode['type']; hideAudioModeButton: boolean; }; type ConfigStateWeb = { enableNoiseReduction: boolean; audioInputDeviceId?: string; audioOutputDeviceId?: string; videoInputDeviceId?: string; hideScreenSharingButton: boolean; hideVirtualBackgroundButton: boolean; /** * @unstable This API may change or be removed in a future release. * When enabled, the SDK renders only remote audio elements without any * visual UI (no video tiles, controls, or overlays). This allows the * host app to provide its own custom UI while the SDK handles the * underlying call connection and audio playback. */ unstable_renderAudioOnly: boolean; }; type ConfigStateBoth = { sessionType: SessionType; layout: Layout; initialCameraFacing?: CameraFacing; autoStartRecording: boolean; hideRecordingButton: boolean; hideControlPanel: boolean; hideLeaveSessionButton: boolean; hideHeaderPanel: boolean; hideRaiseHandButton: boolean; hideShareInviteButton: boolean; hideChangeLayoutButton: boolean; hideToggleAudioButton: boolean; hideToggleVideoButton: boolean; hideParticipantListButton: boolean; hideChatButton: boolean; hideSessionTimer: boolean; hideNetworkIndicator: boolean; hideRecordingStatusIndicator: boolean; hideSwitchCameraButton: boolean; enableParticipantContextMenu: boolean; displayName: string; startAudioMuted: boolean; startVideoPaused: boolean; title: string; idleTimeoutPeriodBeforePrompt: number; idleTimeoutPeriodAfterPrompt: number; enableSpotlightDrag: boolean; enableSpotlightSwap: boolean; isPeerCall: boolean; enableNotifications: boolean; }; type ConfigState = ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth; type Actions$3 = { reset: () => void; }; declare const useConfigStore: zustand0.UseBoundStore, "subscribe"> & { subscribe: { (listener: (selectedState: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3, previousSelectedState: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3) => void): () => void; (selector: (state: ConfigStateInternal & ConfigStateMobile & ConfigStateWeb & ConfigStateBoth & Actions$3) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: { equalityFn?: ((a: U, b: U) => boolean) | undefined; fireImmediately?: boolean; } | undefined): () => void; }; }>; declare const setConfig: (config: Partial) => void; //#endregion //#region calls-sdk-core/types/InternalSettingSchema.d.ts declare const InternalSettingSchema: v.ObjectSchema<{ readonly callToken: v.StringSchema; readonly settings: v.ObjectSchema<{ readonly WEBRTC_HOST: v.OptionalSchema, undefined>; readonly ANALYTICS_HOST: v.OptionalSchema, undefined>; readonly ANALYTICS_VERSION: v.OptionalSchema, undefined>; readonly PRESENTER_MODE_ENABLED: v.OptionalSchema, undefined>; readonly connectionConfig: v.ObjectSchema<{ readonly audioQuality: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly bridgeChannel: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly constraints: v.OptionalSchema, undefined>; readonly max: v.OptionalSchema, undefined>; readonly min: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly width: v.OptionalSchema, undefined>; readonly max: v.OptionalSchema, undefined>; readonly min: v.OptionalSchema, undefined>; }, undefined>, undefined>; }, undefined>, undefined>; }, undefined>, undefined>; readonly e2ee: v.OptionalSchema, undefined>; readonly e2eping: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly flags: v.OptionalSchema, undefined>; readonly sendMultipleVideoStreams: v.OptionalSchema, undefined>; readonly sourceNameSignaling: v.OptionalSchema, undefined>; readonly ssrcRewritingEnabled: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly hosts: v.ObjectSchema<{ readonly domain: v.OptionalSchema, undefined>; readonly muc: v.OptionalSchema, undefined>; }, undefined>; readonly hiddenDomain: v.OptionalSchema, undefined>; readonly bosh: v.OptionalSchema, undefined>; readonly websocket: v.OptionalSchema, undefined>; readonly serviceUrl: v.StringSchema; readonly p2p: v.ObjectSchema<{ readonly enabled: v.BooleanSchema; }, undefined>; readonly resolution: v.OptionalSchema, undefined>; readonly videoQuality: v.OptionalSchema, undefined>, undefined>; readonly screenshareCodec: v.OptionalSchema, undefined>; readonly mobileScreenshareCodec: v.OptionalSchema, undefined>; readonly enableAdaptiveMode: v.OptionalSchema, undefined>; readonly av1: v.OptionalSchema, undefined>; readonly standard: v.OptionalSchema, undefined>; readonly high: v.OptionalSchema, undefined>; readonly fullHd: v.OptionalSchema, undefined>; readonly ultraHd: v.OptionalSchema, undefined>; readonly ssHigh: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly scalabilityModeEnabled: v.OptionalSchema, undefined>; readonly useSimulcast: v.OptionalSchema, undefined>; readonly useKSVC: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly h264: v.OptionalSchema, undefined>; readonly standard: v.OptionalSchema, undefined>; readonly high: v.OptionalSchema, undefined>; readonly fullHd: v.OptionalSchema, undefined>; readonly ultraHd: v.OptionalSchema, undefined>; readonly ssHigh: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly scalabilityModeEnabled: v.OptionalSchema, undefined>; readonly useSimulcast: v.OptionalSchema, undefined>; readonly useKSVC: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly vp8: v.OptionalSchema, undefined>; readonly standard: v.OptionalSchema, undefined>; readonly high: v.OptionalSchema, undefined>; readonly fullHd: v.OptionalSchema, undefined>; readonly ultraHd: v.OptionalSchema, undefined>; readonly ssHigh: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly scalabilityModeEnabled: v.OptionalSchema, undefined>; readonly useSimulcast: v.OptionalSchema, undefined>; readonly useKSVC: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly vp9: v.OptionalSchema, undefined>; readonly standard: v.OptionalSchema, undefined>; readonly high: v.OptionalSchema, undefined>; readonly fullHd: v.OptionalSchema, undefined>; readonly ultraHd: v.OptionalSchema, undefined>; readonly ssHigh: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly scalabilityModeEnabled: v.OptionalSchema, undefined>; readonly useSimulcast: v.OptionalSchema, undefined>; readonly useKSVC: v.OptionalSchema, undefined>; }, undefined>, undefined>; readonly minHeightForQualityLvl: v.OptionalSchema, v.StringSchema, undefined>, undefined>; readonly mobileCodecPreferenceOrder: v.OptionalSchema, undefined>, undefined>; }, undefined>, undefined>; }, undefined>; }, undefined>; readonly sessionId: v.StringSchema; readonly user: v.ObjectSchema<{ readonly uid: v.StringSchema; readonly name: v.StringSchema; readonly avatar: v.OptionalSchema, undefined>; readonly status: v.OptionalSchema, undefined>; readonly role: v.OptionalSchema, undefined>; readonly lastActiveAt: v.OptionalSchema, undefined>; }, undefined>; }, undefined>; type InternalSetting = v.InferOutput; //#endregion //#region calls-sdk-core/store/connection.d.ts type ConnectionState = { connection: any; error: ConnectionError | undefined; timeEstablished: number | undefined; jwt?: string; connectionConfig?: InternalSetting['settings']['connectionConfig']; connectionStatus: 'initial' | 'connecting' | 'connected' | 'error' | 'disconnecting'; }; type Actions$2 = { connectionWillConnect: (connection: any) => void; connectionEstablished: (connection: any) => void; connectionFailed: (error: ConnectionError) => void; disconnect: () => Promise; reset: () => void; }; declare const useConnectionStore: zustand0.UseBoundStore, "subscribe"> & { subscribe: { (listener: (selectedState: ConnectionState & Actions$2, previousSelectedState: ConnectionState & Actions$2) => void): () => void; (selector: (state: ConnectionState & Actions$2) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: { equalityFn?: ((a: U, b: U) => boolean) | undefined; fireImmediately?: boolean; } | undefined): () => void; }; }>; declare function waitForConnection(): Promise; //#endregion //#region calls-sdk-core/utils/schema/human-participant.d.ts declare const HumanParticipantSchema: v.ObjectSchema<{ readonly name: v.StringSchema; readonly pid: v.StringSchema; readonly ruid: v.StringSchema; readonly role: v.PicklistSchema<("moderator" | "none")[], undefined>; readonly uid: v.OptionalSchema, undefined>; readonly avatar: v.OptionalSchema, undefined>; readonly isLocal: v.BooleanSchema; readonly sources: v.OptionalSchema, v.LiteralSchema<"audio", undefined>], undefined>, v.MapSchema, v.AnySchema, undefined>, undefined>, undefined>; readonly type: v.LiteralSchema<"human", undefined>; }, undefined>; type HumanParticipant = v.InferInput; //#endregion //#region calls-sdk-core/store/participants.d.ts interface VirtualParticipant extends Omit { type: 'screen-share'; } type Participant$2 = HumanParticipant | VirtualParticipant; interface ParticipantsState { localParticipant: HumanParticipant; participants: HumanParticipant[]; virtualParticipants: VirtualParticipant[]; dominantSpeakers: string[]; pinnedParticipant?: Participant$2; } type Actions$1 = { addParticipant: (participant: HumanParticipant) => void; addVirtualParticipant: (participant: VirtualParticipant) => void; removeParticipant: (pid: string) => void; removeVirtualParticipant: (pid: string, type?: VirtualParticipant['type']) => void; clearParticipants: () => void; updateLocalParticipant: (participant: Partial) => void; updateParticipant: (participantId: string, participant: Partial) => void; updateParticipantRole: (pid: string, role: HumanParticipant['role']) => void; pinParticipant: (pid: string, type: Participant$2['type']) => void; unpinParticipant: () => void; getParticipantById: (pid: string) => HumanParticipant | undefined; reset: () => void; }; declare const useParticipantStore: zustand0.UseBoundStore, "subscribe"> & { subscribe: { (listener: (selectedState: ParticipantsState & Actions$1, previousSelectedState: ParticipantsState & Actions$1) => void): () => void; (selector: (state: ParticipantsState & Actions$1) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: { equalityFn?: ((a: U, b: U) => boolean) | undefined; fireImmediately?: boolean; } | undefined): () => void; }; }>; declare function useAllParticipants(): Participant$2[]; declare function getAllParticipants(): Participant$2[]; declare const pinParticipant: (participantId: string, type: Participant$2["type"]) => void; declare const unpinParticipant: () => void; declare const togglePinParticipant: (participantId: string, type: Participant$2["type"]) => void; declare const getMainParticipantFromState: (state: { pinnedParticipant?: Participant$2; participants: Participant$2[]; virtualParticipants: Participant$2[]; dominantSpeakers: string[]; localParticipant: HumanParticipant; }) => Participant$2; //#endregion //#region calls-sdk-core/store/toast.d.ts interface ToastAction { label: string; onPress: () => void; } interface ToastItem { id: string; message: string; type: NotificationType; duration: number; position: 'top' | 'bottom'; action?: ToastAction; createdAt: number; } interface ToastState { toasts: ToastItem[]; } interface ToastActions { addToast: (toast: Omit & { id?: string; }) => string; removeToast: (id: string) => void; clearAll: () => void; reset: () => void; } declare const useToastStore: zustand0.UseBoundStore>; declare function showToast(params: { id?: string; message: string; type?: NotificationType; duration?: number; position?: 'top' | 'bottom'; action?: ToastAction; }): string; //#endregion //#region calls-sdk-core/store/tracks.d.ts type StreamingStatus = 'active' | 'interrupted' | 'restoring' | 'inactive'; type Track = { local: boolean; mediaType: MediaType; muted: number; pid: string; streamingStatus: StreamingStatus; videoType: 'desktop' | 'camera' | null; originalTrack?: any; }; type TracksState = { tracks: Track[]; permissions: { audio: boolean; video: boolean; initialized: boolean; }; }; type Actions = { reset: () => void; addTrack: (originalTrack: any) => void; removeTrack: (originalTrack: any) => void; updateTrack: (originalTrack: any, updatedTrack: Partial) => void; updateLocalTrack: (mediaType: MediaType, updatedTrack: Partial) => void; }; declare const useTracksStore: zustand0.UseBoundStore, "subscribe"> & { subscribe: { (listener: (selectedState: TracksState & Actions, previousSelectedState: TracksState & Actions) => void): () => void; (selector: (state: TracksState & Actions) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: { equalityFn?: ((a: U, b: U) => boolean) | undefined; fireImmediately?: boolean; } | undefined): () => void; }; }>; declare const useTrackByParticipantId: (participantId: string, mediaType?: MediaType) => Track | undefined; declare const getTrackByParticipantId: (participantId: string, mediaType?: MediaType) => Track | undefined; declare const useLocalTrack: (mediaType?: MediaType) => Track | undefined; declare const getLocalTrack: (mediaType?: MediaType) => Track | undefined; declare const disposeLocalTracks: () => Promise; declare const muteAudioTrack: () => void; declare const unMuteAudioTrack: () => Promise; declare const toggleAudioTrack: () => void; declare const pauseVideoTrack: (authority?: number) => void; declare const resumeVideoTrack: (authority?: number) => Promise; declare const toggleVideoTrack: () => void; //#endregion //#region calls-sdk-core/store/utils/hooks.d.ts declare const useHideMuteAudioButton: () => boolean; declare const useHideToggleVideoButton: () => boolean; declare const useIsConferenceJoined: () => boolean; declare const useHideScreenSharingButton: () => boolean; declare const useHideSwitchCameraButton: () => boolean; declare const useHideChatButton: () => boolean; declare const useLocalParticipant: (selector?: (local: HumanParticipant) => T) => T; declare const useScreenShareRunning: () => any; declare const useTrackMuted: (mediaType: MediaType, participantId?: string) => boolean; declare const useMainParticipant: () => Participant$2; declare const getMainParticipant: () => Participant$2; declare const useIsReconnecting: () => boolean; declare const useHideRecordingButton: () => boolean; declare const useHideVirtualBackgroundButton: () => boolean; declare const useLayout: () => Layout; declare const useEnableParticipantContextMenu: () => boolean; declare const useRaisedHandTimestamp: (participantId?: string, type?: Participant$2["type"]) => number | undefined; declare const useIsParticipantPinned: (participantId: string, type: Participant$2["type"]) => boolean; declare const useOrderedParticipants: () => Participant$2[]; declare const useNonRecoverableError: () => string | undefined; declare const useIsSwitchCameraEnabledBrowser: () => any; declare const useIsAudioInputSelectionSupported: () => boolean; declare const useIsVideoInputSelectionSupported: () => boolean; declare const useShouldMirrorLocalVideo: () => boolean; //#endregion //#region calls-sdk-core/store/utils/reset.d.ts declare function resetAllStores(): void; //#endregion //#region calls-sdk-core/store/utils/switch-camera.d.ts declare const switchCamera: () => void; //#endregion //#region calls-sdk-core/utils/session-methods-core.d.ts declare class SessionMethodsCore { /** * Mutes the local user's audio during the call. */ static muteAudio(): void; /** * Unmutes the local user's audio during the call. */ static unmuteAudio(): void; /** * Toggles the local user's audio mute state. * If audio is muted, it will be unmuted, and vice versa. */ static toggleAudio(): void; /** * Pauses the local user's video stream. */ static pauseVideo(): void; /** * Resumes the local user's video stream. */ static resumeVideo(): void; /** * Toggles the local user's video stream. * If video is paused, it will be resumed, and vice versa. */ static toggleVideo(): void; /** * Local user leaves the current session. */ static leaveSession(): void; /** * Ends the current session for all participants. * This will terminate the conference and disconnect everyone. */ static endSessionForAll(): void; /** * Raises the user's virtual hand in the call. */ static raiseHand(): void; /** * Lowers the user's virtual hand in the call. */ static lowerHand(): void; /** * Toggles the user's virtual hand state. * If the hand is raised, it will be lowered, and vice versa. */ static toggleHand(): void; /** * Switches between the front and rear camera. */ static switchCamera(): void; /** * Sets the layout type for the call. * @param layout - The type of layout to set (tile, sidebar or spotlight). */ static setLayout(layout: Layout): void; /** * Starts recording the call. */ static startRecording(): void; /** * Stops the ongoing call recording. */ static stopRecording(): void; /** * Toggles the call recording state. * If recording is active, it will be stopped, and vice versa. */ static toggleRecording(): void; /** * Pins a participant's video to focus on them. * @param participantId - The ID of the participant to pin. * @param type - The type of the participant. */ static pinParticipant(participantId: string, type: Participant$2['type']): void; /** * Unpins a participant's video. */ static unpinParticipant(): void; /** * Mutes the audio of a specific participant. * @param participantId - The ID of the participant to mute. */ static muteParticipant(participantId: string): void; /** * Pauses the video stream of a specific participant. * @param participantId - The ID of the participant whose video to pause. */ static pauseParticipantVideo(participantId: string): void; /** * Sets the unread message count displayed on the chat button. * @param count - The number of unread messages. */ static setChatButtonUnreadCount(count: number): void; /** * Toggles the visibility of the participant list panel. */ static toggleParticipantList(): void; /** * Shows the participant list panel. */ static showParticipantList(): void; /** * Hides the participant list panel. */ static hideParticipantList(): void; /** * @deprecated switchToVideoCall is deprecated and not supported. */ static switchToVideoCall(): void; /** * @deprecated use leaveSession() instead */ static endSession(): void; /** * Retrieves call details for a given session ID and auth token. * @param sessionID - The session ID of the call. * @param authToken - The authentication token required to make the API call. * @returns A Promise that resolves to a CallLog object containing the call details. * @throws {CometChatCallsException} If there is an error retrieving the call details. * @deprecated This method is deprecated and not supported. */ static getCallDetails(_sessionID: string, _authToken: string): void; } //#endregion //#region calls-sdk-core/utils/try-catch.d.ts type Success = { data: T; error: null; }; type Failure = { data: null; error: E; }; type Result = Success | Failure; declare function tryCatch(promise: Promise, timeoutMs?: number): Promise>; declare function tryCatchSync(fn: () => T): Result; //#endregion //#region calls-sdk-core/utils/update-config.d.ts declare function updateConfig(config: Partial): void; //#endregion //#region calls-sdk-core/types/common.d.ts type AudioModeType = 'BLUETOOTH' | 'EARPIECE' | 'HEADPHONES' | 'SPEAKER'; type AudioMode = { type: AudioModeType; selected: boolean; uid?: string; }; type CameraFacingInternal = ValueOf; type CameraFacing = ValueOf; type SessionType = ValueOf; type Layout = ValueOf; type MediaType = ValueOf; type ValueOf = T[keyof T]; type ParticipantRole = ValueOf; type NotificationType = 'info' | 'success' | 'warning' | 'error'; type SDKPlatform = ValueOf; interface ITrackOptions { cameraDeviceId?: string | null; constraints?: { video?: { height?: { ideal?: number; max?: number; min?: number; }; }; }; desktopSharingSourceDevice?: string; desktopSharingSources?: string[]; devices?: string[]; facingMode?: string; firePermissionPromptIsShownEvent?: boolean; micDeviceId?: string | null; timeout?: number; } type Prettify = { [K in keyof T]: T[K] } & unknown; type Paths = T extends object ? { [K in keyof T]: T[K] extends object ? `${K & string}.${Paths}` : `${K & string}` }[keyof T] : never; type ConnectionError = { name: string; message?: string; details?: Record; recoverable?: boolean; }; //#endregion //#region calls-sdk-core/types/union-to-array.d.ts type UnionToIntersection = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never; type UnionToOvlds = UnionToIntersection void : never>; type PopUnion = UnionToOvlds extends ((a: infer A) => void) ? A : never; type IsUnion = [T] extends [UnionToIntersection] ? false : true; type UnionToArray = IsUnion extends true ? UnionToArray>, [PopUnion, ...A$1]> : [T, ...A$1]; //#endregion //#region calls-sdk-core/types/sdk-events.d.ts declare const ParticipantSchema: v.ObjectSchema<{ readonly pid: v.StringSchema; readonly name: v.StringSchema; readonly uid: v.StringSchema; readonly avatar: v.OptionalSchema, undefined>; }, undefined>; type Participant$1 = v.InferOutput; type _SDKEvents = { [k in ValueOf]: () => void } & { [k in ValueOf]: () => void } & { [k in ValueOf]: (payload: Participant$1) => void } & { [k in ValueOf]: () => void }; type SDKEvents = Omit<_SDKEvents, 'onParticipantListChanged' | 'onConnectionFailed'> & { onCallLayoutChanged: (payload: Layout) => void; onConnectionFailed: (payload: ConnectionError) => void; onParticipantListVisible: () => void; onParticipantListHidden: () => void; onParticipantListChanged: (payload: Participant$1[]) => void; }; type MobileSDKEvents = SDKEvents & { onAudioModeChanged: (payload: AudioMode['type']) => void; onCameraFacingChanged: (payload: CameraFacing) => void; onSwitchCameraButtonClicked: () => void; onPictureInPictureLayoutEnabled: () => void; onPictureInPictureLayoutDisabled: () => void; }; type WebSDKEvents = SDKEvents & { onAudioInputDeviceChanged: (device: MediaDeviceInfo) => void; onVideoInputDeviceChanged: (device: MediaDeviceInfo) => void; onAudioOutputDeviceChanged: (device: MediaDeviceInfo) => void; onAudioInputDevicesChanged: (device: MediaDeviceInfo[]) => void; onVideoInputDevicesChanged: (device: MediaDeviceInfo[]) => void; onAudioOutputDevicesChanged: (device: MediaDeviceInfo[]) => void; }; type InternalEvents = { [INTERNAL_EVENTS.onConnectionEstablished]: () => void; [INTERNAL_EVENTS.connectionWillClose]: () => void; [INTERNAL_EVENTS.notification]: (payload: { message: string; type: NotificationType; duration?: number; position?: 'top' | 'bottom'; action?: { label: string; onPress: () => void; }; }) => void; [INTERNAL_EVENTS.lifecycle.componentDidMount]: () => void; [INTERNAL_EVENTS.lifecycle.componentWillUnmount]: () => void; [INTERNAL_EVENTS.onSessionJoined]: () => void; [INTERNAL_EVENTS.lifecycle.SDKInitialized]: () => void; [INTERNAL_EVENTS.queryPermission]: () => void; }; type AllSDKEvents = MobileSDKEvents & WebSDKEvents; type AllEvents = AllSDKEvents & InternalEvents; type _NativeListenerActions = { [K in keyof AllSDKEvents]: { type: K; } & (Parameters[0] extends undefined ? {} : { payload: Parameters[0]; }) }; type NativeListenerActions = UnionToArray<_NativeListenerActions[keyof _NativeListenerActions]>; //#endregion //#region calls-sdk-core/event-manager/event-bus.d.ts type EventBusAction = K$1 extends keyof AllEvents ? AllEvents[K$1] extends (() => void) ? { type: K$1; } : AllEvents[K$1] extends ((payload: infer P) => void) ? { type: K$1; payload: P; } : never : never; declare class EventBus { actionListenersMap: Map>; emittingEvents: boolean; constructor(); startEmitting(): void; stopEmitting(): void; publish(action: EventBusAction, forceEmit?: boolean): void; subscribe(actionType: K$1, listener: AllEvents[K$1], options?: { signal?: AbortSignal; }): () => void; } declare const eventBus: EventBus; //#endregion //#region calls-sdk-core/handlers/conference.d.ts declare function _createConference(): Promise; declare function createConference(): Promise; declare function muteParticipant(participantId: string): void; declare function pauseParticipantVideo(participantId: string): void; //#endregion //#region calls-sdk-core/handlers/connection.d.ts declare function connect(autoJoinConference?: boolean): Promise; //#endregion //#region calls-sdk-core/handlers/devices.d.ts declare function areDevicesDifferent(existingDevices?: MediaDeviceInfo[], newDevices?: MediaDeviceInfo[]): boolean; declare function updateInputOutputDevices(onlyUpdateIfLabelIsEmpty?: boolean): void; declare function _initDeviceList(): void; declare const initDeviceList: typeof _initDeviceList; //#endregion //#region calls-sdk-core/handlers/screen-share.d.ts declare function startScreenSharing(): void; declare function stopScreenSharing(): void; declare function addScreenShareParticipant(track: any): void; declare function removeScreenShareParticipant(participantId: string): void; //#endregion //#region calls-sdk-core/handlers/session.d.ts declare function startSession(): void; declare function leaveSession(options?: { forceLeave?: boolean; shouldEndSession?: boolean; }): Promise; declare function leaveSessionDueToIdleTimeout(): Promise; declare function reconnectSession(): Promise; declare function cancelPendingReconnect(): void; //#endregion //#region calls-sdk-core/handlers/track.d.ts declare function createLocalTrackF(type: 'audio' | 'video', deviceId?: string | null, timeout?: number | null, additionalOptions?: ITrackOptions): Promise; declare function createLocalTrack(type: 'audio' | 'video', deviceId?: string | null, cameraFacing?: CameraFacingInternal): Promise; declare function createLocalTracks(): void; declare function updateAudioInputDevice(deviceId: string): void; declare function updateAudioInputDeviceState(device?: AudioInputDevice, skipSubscribe?: boolean): void; declare function updateVideoInputDevice(deviceId: string | null, cameraFacing?: CameraFacingInternal): Promise; declare function updateVideoInputDeviceState(device?: VideoInputDevice, skipSubscribe?: boolean): void; declare function updateAudioOutputDevice(deviceId: string): void; //#endregion //#region calls-sdk-core/i18n/translations/en-US.d.ts declare namespace header { namespace layouts { let tileView: string; let sideLayout: string; let spotlight: string; } } declare namespace controlPanel { namespace audioControl { let muteMicrophone: string; let unmuteMicrophone: string; let audioDeviceOptions: string; let audioSettings: string; } namespace videoControl { let turnOffCamera: string; let turnOnCamera: string; let videoDeviceOptions: string; let videoSettings: string; } namespace settingsDialog { export let todo: string; export let title: string; export namespace tabs { let audio: string; let video: string; } export namespace deviceLabels { let microphone: string; let speaker: string; let camera: string; let frameRate: string; } export namespace deviceStates { let noMicrophoneSelected: string; let noSpeakerSelected: string; let noCameraSelected: string; } export namespace audioSettings_1 { let enableNoiseReduction: string; } export { audioSettings_1 as audioSettings }; export namespace videoSettings_1 { let mirrorMyVideo: string; let selectCameraToSeePreview: string; let loadingCameraPreview: string; let frameRateUnit: string; let frameRateNotice: string; } export { videoSettings_1 as videoSettings }; export namespace permissions { let errorTitle: string; let microphoneBlocked: string; let cameraBlocked: string; let microphoneAndCameraBlocked: string; } export namespace buttons { let cancel: string; let done: string; } } namespace recording { export let startRecording: string; export let stopRecording: string; export let startRecordingConfirmation: string; export let stopRecordingConfirmation: string; let cancel_1: string; export { cancel_1 as cancel }; } let raiseHand: string; let lowerHand: string; let startScreenSharing: string; let stopScreenSharing: string; let moreOptions: string; let leaveSession: string; let reactions: string; } declare namespace idealTimeout { let title_1: string; export { title_1 as title }; export let subtitle: string; export namespace buttons_1 { let stayInCall: string; let leaveNow: string; } export { buttons_1 as buttons }; } declare namespace participantList { export namespace header_1 { let title_2: string; export { title_2 as title }; export let closeButton: string; } export { header_1 as header }; export namespace search { let placeholder: string; } export namespace emptyState { let title_3: string; export { title_3 as title }; let subtitle_1: string; export { subtitle_1 as subtitle }; } } declare namespace virtualBackground { let title_4: string; export { title_4 as title }; export let addBackground: string; export let noCameraFeed: string; export namespace buttons_2 { let cancel_2: string; export { cancel_2 as cancel }; let done_1: string; export { done_1 as done }; } export { buttons_2 as buttons }; } declare namespace general { let error: string; } declare let other: {}; declare namespace __json_default_export { export { header, controlPanel, idealTimeout, participantList, virtualBackground, general, other }; } //#endregion //#region calls-sdk-core/i18n/state.d.ts type CometChatSupportedLocale = 'en-US'; type TranslationResource = typeof __json_default_export; interface TranslationState { translations: Record; currentLocale: CometChatSupportedLocale | Omit; } declare const useTranslationStore: zustand0.UseBoundStore & { reset: () => void; setLocale: (locale: CometChatSupportedLocale) => void; }>, "subscribe"> & { subscribe: { (listener: (selectedState: Omit & { reset: () => void; setLocale: (locale: CometChatSupportedLocale) => void; }, previousSelectedState: Omit & { reset: () => void; setLocale: (locale: CometChatSupportedLocale) => void; }) => void): () => void; (selector: (state: Omit & { reset: () => void; setLocale: (locale: CometChatSupportedLocale) => void; }) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: { equalityFn?: ((a: U, b: U) => boolean) | undefined; fireImmediately?: boolean; } | undefined): () => void; }; }>; //#endregion //#region calls-sdk-core/i18n/hook.d.ts declare const useTranslation: () => { t: (key: Paths) => string; currentLocale: "en-US" | Omit; translations: Record; }; //#endregion //#region src/app-settings.d.ts declare const RegionSchema: v.SchemaWithPipe, v.TransformAction, v.UnionSchema<[v.LiteralSchema<"eu", undefined>, v.LiteralSchema<"us", undefined>, v.LiteralSchema<"in", undefined>, v.LiteralSchema<"EU", undefined>, v.LiteralSchema<"US", undefined>, v.LiteralSchema<"IN", undefined>], undefined>]>; declare const CallAppSettingsSchema: v.ObjectSchema<{ readonly appId: v.StringSchema; readonly region: v.SchemaWithPipe, v.TransformAction, v.UnionSchema<[v.LiteralSchema<"eu", undefined>, v.LiteralSchema<"us", undefined>, v.LiteralSchema<"in", undefined>, v.LiteralSchema<"EU", undefined>, v.LiteralSchema<"US", undefined>, v.LiteralSchema<"IN", undefined>], undefined>]>; readonly authKey: v.OptionalSchema, undefined>; readonly adminHost: v.OptionalSchema, undefined>; readonly clientHost: v.OptionalSchema, undefined>; readonly host: v.OptionalSchema, undefined>; }, undefined>; type CallAppSettings = v.InferOutput; //#endregion //#region src/native-communication/native-to-js.native.d.ts declare function setupNativeEventListeners(): void; //#endregion //#region src/v4/Constants.d.ts declare const constants: { DEFAULT_STORE: string; MSG_VER_PRE: string; MSG_VER_POST: string; }; declare const ERROR_CODES: { API_ERROR: { code: string; }; }; declare const REGION: { readonly us: "us"; readonly eu: "eu"; readonly in: "in"; readonly US: "us"; readonly EU: "eu"; readonly IN: "in"; }; declare const DEFAULT_VALUES: { ZERO: number; MSGS_LIMIT: number; MSGS_MAX_LIMIT: number; USERS_LIMIT: number; USERS_MAX_LIMIT: number; GROUPS_LIMIT: number; GROUPS_MAX_LIMIT: number; CONVERSATION_MAX_LIMIT: number; CALL_TIMEOUT: number; DEFAULT_MSG_ID: number; DEFAULT_MAX_TYPING_INDICATOR_LIMIT: number; REGION_DEFAULT: string; REGION_DEFAULT_EU: string; REGION_DEFAULT_US: string; REGION_DEFAULT_IN: string; REGION_DEFAULT_PRIVATE: string; }; declare enum GroupType { Public = "public", Private = "private", Protected = "protected", Password = "password", } declare const GROUP_TYPE: { PUBLIC: string; PRIVATE: string; PROTECTED: string; PASSWORD: string; }; declare enum GroupMemberScope { Admin = "admin", Moderator = "moderator", Member = "member", } declare const GROUP_MEMBER_SCOPE: { ADMIN: string; MODERATOR: string; PARTICIPANT: string; }; declare const APPINFO: { platform: string; sdkVersion: string; apiVersion: string; sdkVersionWithUnderScore: string; userAgent: string; }; declare const SDKHeader: { platform: string; sdkVersion: string; sdk: string; }; declare const WS: { CONVERSATION: { TYPE: { CHAT: string; GROUP_CHAT: string; }; }; }; declare const ANALYTICS: { analyticsHost: string; analyticsVersion: string; }; declare const LOCAL_STORE: { COMMON_STORE: string; MESSAGE_LISTENERS_LIST: string; USERS_STORE: string; MESSAGES_STORE: string; KEYS_STORE: string; STORE_STRING: string; KEY_STRING: string; KEY_USER: string; KEY_APP_SETTINGS: string; KEY_APP_ID: string; KEY_DEVICE_ID: string; KEY_MESSAGE_LISTENER_LIST: string; }; declare const ResponseConstants: { RESPONSE_KEYS: { KEY_DATA: string; KEY_META: string; KEY_CURSOR: string; KEY_ACTION: string; KEY_MESSAGE: string; KEY_ERROR: string; KEY_ERROR_DETAILS: string; KEY_ERROR_CODE: string; KEY_ERROR_MESSAGE: string; KEY_AUTH_TOKEN: string; KEY_WS_CHANNEL: string; KEY_IDENTITY: string; KEY_SERVICE: string; KEY_ENTITIES: string; KEY_ENTITITY: string; KEY_ENTITYTYPE: string; KEY_ATTACHMENTS: string; CODE_REQUEST_OK: number; CODE_BAD_REQUEST: number; UNREAD_UNDELIVERED_KEYS: { ENTITY: string; ENTITY_TYPE: string; ENTITY_Id: string; COUNT: string; }; GROUP_MEMBERS_RESPONSE: { SUCCESS: string; ERROR: string; MESSAGE: string; }; KEY_ENTITY_TYPE: { USER: string; GROUP: string; }; }; }; declare const DELIVERY_RECEIPTS: { RECEIVER_ID: string; RECEIVER_TYPE: string; RECIPIENT: string; MESSAGE_ID: string; RECEIVED: string; DELIVERED_AT: string; ID: string; TIME: string; DELIVERED_TO_ME_AT: string; }; declare const READ_RECEIPTS: { RECEIVER_ID: string; RECEIVER_TYPE: string; RECIPIENT: string; MESSAGE_ID: string; READ: string; READ_AT: string; ID: string; TIME: string; READ_BY_ME_AT: string; }; declare const MessageConstatnts: { TYPE: { TEXT: string; MEDIA: string; IMAGE: string; VIDEO: string; AUDIO: string; FILE: string; CUSTOM: string; }; CATEGORY: { MESSAGE: string; ACTION: string; CALL: string; CUSTOM: string; }; RECEIVER_TYPE: { USER: string; GROUP: string; }; KEYS: { ATTATCHMENT: string; ATTATCHMENTS: string; ACTION: string; TYPE: string; DATA: string; ID: string; MUID: string; SENDER: string; RECEIVER: string; RECEIVER_ID: string; CATEGORY: string; RECEIVER_TYPE: string; SENT_AT: string; STATUS: string; TEXT: string; URL: string; METADATA: string; RECEIPTS: string; MY_RECEIPTS: string; CUSTOM_DATA: string; CUSTOM_SUB_TYPE: string; RESOURCE: string; }; KNOWN_MEDIA_TYPE: { IMAGE: never[]; VIDEO: never[]; AUDIO: never[]; FILE: never[]; }; PAGINATION: { AFFIX: { APPEND: string; PREPEND: string; }; CURSOR_FILEDS: { ID: string; SENT_AT: string; }; CURSOR_AFFIX_DEFAULT: string; CURSOR_FIELD_DEFAULT: string; KEYS: { PER_PAGE: string; CURSOR_AFFIX: string; AFFIX: string; CURSOR_FIELD: string; CURSOR_VALUE: string; UID: string; SENT_AT: string; ID: string; CURRENT_PAGE: string; UNREAD: string; HIDE_MESSAGES_FROM_BLOCKED_USER: string; SEARCH_KEY: string; ONLY_UPDATES: string; UPDATED_AT: string; CATEGORY: string; CATEGORIES: string; TYPE: string; TYPES: string; HIDE_REPLIES: string; HIDE_DELETED_MESSAGES: string; WITH_TAGS: string; TAGS: string; }; }; }; declare const ATTACHMENTS_CONSTANTS: { KEYS: { EXTENSION: string; MIME_TYPE: string; NAME: string; SIZE: string; URL: string; }; }; declare enum MessageCategory { ACTION = "action", MESSAGE = "message", CALL = "call", CUSTOM = "custom", } declare const TYPING_NOTIFICATION: { RECEIVER_ID: string; RECEIVER_TYPE: string; META: string; KEYS: { TYPING_NOTIFICATION: string; TIMESTAMP: string; }; ACTIONS: { STARTED: string; ENDED: string; }; }; declare const ActionConstatnts: { ACTION_SUBJECTS: { ACTION_ON: string; ACTION_BY: string; ACTION_FOR: string; }; ACTION_ENTITY_TYPE: { GROUP_USER: string; USER: string; GROUP: string; MESSAGE: string; }; ACTION_KEYS: { ACTION_CREATED: string; ACTION_UPDATED: string; ACTION_DELETED: string; ENTITIES: string; ENTITY: string; ENTITY_TYPE: string; TYPE_MEMBER_JOINED: string; TYPE_MEMBER_LEFT: string; TYPE_MEMBER_KICKED: string; TYPE_MEMBER_BANNED: string; TYPE_MEMBER_UNBANNED: string; TYPE_MEMBER_INVITED: string; TYPE_MEMBER_ADDED: string; ACTION_SCOPE_CHANGED: string; ACTION_TYPE_USER: string; ACTION_TYPE_GROUP: string; ACTION_TYPE_GROUP_MEMBER: string; TYPE_MESSAGE_EDITED: string; TYPE_MESSAGE_DELETED: string; ACTION_TYPE_CALL: string; EXTRAS: string; SCOPE: string; NEW: string; OLD: string; }; ActionMessages: { ACTION_GROUP_JOINED_MESSAGE: string; ACTION_GROUP_LEFT_MESSAGE: string; ACTION_MEMBER_KICKED_MESSAGE: string; ACTION_MEMBER_BANNED_MESSAGE: string; ACTION_MEMBER_UNBANNED_MESSAGE: string; ACTION_MEMBER_INVITED_MESSAGE: string; ACTION_MESSAGE_EDITED_MESSAGE: string; ACTION_MESSAGE_DELETED_MESSAGE: string; ACTION_MEMBER_SCOPE_CHANGED: string; ACTION_MEMBER_ADDED_TO_GROUP: string; }; ACTION_TYPE: { TYPE_MEMBER_JOINED: string; TYPE_MEMBER_LEFT: string; TYPE_MEMBER_KICKED: string; TYPE_MEMBER_BANNED: string; TYPE_MEMBER_UNBANNED: string; TYPE_MEMBER_INVITED: string; TYPE_MEMBER_SCOPE_CHANGED: string; TYPE_MESSAGE: string; TYPE_MESSAGE_EDITED: string; TYPE_MESSAGE_DELETED: string; TYPE_MEMBER_ADDED: string; }; ACTIONS: { MEMBER_ADDED: string; MEMBER_JOINED: string; MEMBER_LEFT: string; MEMBER_KICKED: string; MEMBER_BANNED: string; MEMBER_UNBANNED: string; MEMBER_INVITED: string; MEMBER_SCOPE_CHANGED: string; MESSAGE_EDITED: string; MESSSAGE_DELETED: string; TYPE_USER: string; TYPE_GROUP: string; TYPE_GROUP_MEMBER: string; }; }; declare const BlockedUsersConstants: { REQUEST_KEYS: { DIRECTIONS: { BOTH: string; HAS_BLOCKED_ME: string; BLOCKED_BY_ME: string; }; }; }; declare const CallConstants: { readonly CALL_MODE: { readonly DEFAULT: "DEFAULT"; readonly SPOTLIGHT: "SPOTLIGHT"; }; readonly AUDIO_MODE: { readonly SPEAKER: "SPEAKER"; readonly EARPIECE: "EARPIECE"; readonly BLUETOOTH: "BLUETOOTH"; readonly HEADPHONES: "HEADPHONES"; }; readonly CALL_TYPE: { readonly AUDIO: "audio"; readonly VIDEO: "video"; }; readonly RECEIVER_TYPE_GROUP: "group"; readonly RECEIVER_TYPE_USER: "user"; readonly CALL_KEYS: { readonly CALL_DATA: "data"; readonly CALL_ID: "id"; readonly CALL_SESSION_ID: "sessionid"; readonly CALL_RECEIVER: "receiver"; readonly CALL_SENDER: "sender"; readonly CALL_INITIATOR: "initiator"; readonly CALL_RECEIVER_TYPE: "receiverType"; readonly CALL_STATUS: "status"; readonly CALL_TYPE: "type"; readonly CALL_INITIATED_AT: "initiatedAt"; readonly CALL_JOINED_AT: "joinedAt"; readonly CALL_LEFT_AT: "leftAt"; readonly CALL_METADATA: "metadata"; readonly CALL_ENTITIES: "entities"; readonly CALL_ENTITY_TYPE: "entityType"; readonly CALL_ENTITY: "entity"; readonly CALL_ENTITY_USER: "user"; readonly CALL_ENTITY_GROUP: "group"; }; readonly CALL_STATUS: { readonly INITIATED: "initiated"; readonly ONGOING: "ongoing"; readonly UNANSWERED: "unanswered"; readonly REJECTED: "rejected"; readonly BUSY: "busy"; readonly CANCELLED: "cancelled"; readonly ENDED: "ended"; }; readonly ZOOM_BUTTON_DEFAULT_PARAMS: { readonly position: "bottom-right"; readonly visible: true; }; readonly FULL_SCREEN_BUTTON_DEFAULT_PARAMS: { readonly position: "bottom-right"; readonly visible: true; }; readonly USER_LIST_BUTTON_DEFAULT_PARAMS: { readonly position: "bottom-right"; readonly visible: true; }; readonly NAME_LABEL_DEFAULT_PARAMS: { readonly position: "bottom-left"; readonly visible: true; readonly color: "#333333"; }; readonly MAIN_VIDEO_CONTAINER_SETTINGS: { readonly KEYS: { readonly POSITION: "position"; readonly VISIBILITY: "visibility"; readonly COLOR: "color"; }; }; }; declare const GroupConstants: { KEYS: { NAME: string; GUID: string; TYPE: string; PASSWORD: string; ICON: string; DESCRIPTION: string; OWNER: string; METADATA: string; CREATED_AT: string; UPDATED_AT: string; HAS_JOINED: string; WS_CHANNEL: string; TAGS: string; }; }; declare const GroupMemersConstans: { KEYS: { SCOPE: string; UID: string; GUID: string; USER: string; NAME: string; }; }; declare const UserConstants: { UID: string; NAME: string; AUTH_TOKEN: string; AVATAR: string; LAST_ACTIVE_AT: string; LINK: string; META_DATA: string; ROLE: string; STATUS: string; STATUS_MESSAGE: string; USER_NAME: string; TAGS: string; SORT_BY: { NAME: string; STATUS: string; }; SORT_ORDER: { ASCENDING: string; DESCENDING: string; }; }; declare const Errors: { ERROR_IO_EXCEPTION: string; ERROR_JSON_EXCEPTION: string; ERROR_PASSWORD_MISSING: string; ERROR_LIMIT_EXCEEDED: string; ERROR_USER_NOT_LOGGED_IN: string; ERROR_INVALID_GUID: string; ERROR_PASSWORD_MISSING_MESSAGE: string; ERROR_LIMIT_EXCEEDED_MESSAGE: string; ERROR_USER_NOT_LOGGED_IN_MESSAGE: string; ERROR_INVALID_GUID_MESSAGE: string; ERROR_DEFAULT_MESSAGE: string; ERR_SETTINGS_HASH_OUTDATED: string; ERR_NO_AUTH: string; }; declare const CALL_ERROR: { CALL_ALREADY_INITIATED: { code: string; name: string; message: string; details: {}; }; ERROR_IN_CALLING: { code: string; name: string; message: string; details: {}; }; CANNOT_ACCEPT_CALL: { code: string; name: string; message: string; details: {}; }; NOT_INITIALIZED: { code: string; name: string; message: string; details: {}; }; NOT_LOGGED_IN: { code: string; name: string; message: string; details: {}; }; SESSION_ID_REQUIRED: { code: string; name: string; message: string; details: {}; }; JWT_NOT_FOUND: { code: string; name: string; message: string; details: {}; }; MODULE_NOT_INSTALLED: { code: string; name: string; message: string; details: {}; }; }; declare const PARAMETER_ERROR: { PARAMETER_REQUIRED: { code: string; name: string; message: string; details: {}; }; }; declare const GENERAL_ERROR: { readonly GENERIC_EXCEPTION: { readonly code: "GENERIC_EXCEPTION"; }; readonly INVALID_ARGUMENT_EXCEPTION: { readonly code: "INVALID_ARGUMENT_EXCEPTION"; }; readonly INVALID_PROP_EXCEPTION: { readonly code: "INVALID_PROP_EXCEPTION"; }; readonly API_ERROR: { readonly code: "API_ERROR"; }; readonly ERROR_PRESENTER_MODE: { readonly code: "ERROR_PRESENTER_MODE"; readonly message: "Presenter mode is disabled. To use presenter mode, please enable it from the CometChat Apps Dashboard"; }; readonly UNKNOWN_API_ERROR: { readonly code: "UNKNOWN_API_ERROR"; readonly message: "There is an unknown issue with the API request. Please check your internet connection and verify the api call."; }; }; declare const ReceiptErrors: { MISSING_PARAMETERS: { code: string; name: string; message: string; details: {}; }; INVALID_PARAMETER: { code: string; name: string; message: string; details: {}; }; NO_WEBSOCKET_CONNECTION: { code: string; name: string; message: string; details: {}; }; RECEIPTS_TEMPORARILY_BLOCKED: { code: string; name: string; message: string; details: {}; }; UNKNOWN_ERROR_OCCURRED: { code: string; name: string; message: string; details: {}; }; }; declare const APP_SETTINGS: { APP_SETTINGS: string; KEYS: { CHAT_HOST: string; CHAT_USE_SSL: string; GROUP_SERVICE: string; CALL_SERVICE: string; CHAT_WS_PORT: string; CHAT_WSS_PORT: string; CHAT_HTTP_BIND_PORT: string; CHAT_HTTPS_BIND_PORT: string; ADMIN_API_HOST: string; CLIENT_API_HOST: string; WEBRTC_HOST: string; WEBRTC_USE_SSL: string; WEBRTC_WS_PORT: string; WEBRTC_WSS_PORT: string; WEBRTC_HTTP_BIND_PORT: string; WEBRTC_HTTPS_BIND_PORT: string; EXTENSION_LIST: string; EXTENSION_KEYS: { ID: string; NAME: string; }; JID_HOST_OVERRIDE: string; CHAT_HOST_OVERRIDE: string; CHAT_HOST_APP_SPECIFIC: string; MODE: string; CONNECTION_TYPE: string; DEFAULT_MODE: string; LIMITED_TRANSIENT: string; NO_TRANSIENT: string; POLLING_ENABLED: string; POLLING_INTERVAL: string; ANALYTICS_PING_DISABLED: string; ANALYTICS_HOST: string; ANALYTICS_VERSION: string; ANALYTICS_USE_SSL: string; SETTINGS_HASH: string; SETTINGS_HASH_RECEIVED_AT: string; DENY_FALLBACK_TO_POLLING: string; APP_VERSION: string; MAIN_DOMAIN: string; CHAT_API_VERSION: string; WS_API_VERSION: string; REGION: string; EXTENSION_DOMAIN: string; WEBRTC_API_SUBDOMAIN: string; }; }; declare const COMMON_UTILITY_CONSTANTS: { TYPE_CONSTANTS: { BOOLEAN: string; STRING: string; OBJECT: string; NUMBER: string; }; }; declare const CONNECTION_STATUS: { CONNECTED: string; CONNECTING: string; DISCONNECTED: string; FEATURE_THROTTLED: string; }; declare const API_ERROR_CODES: { AUTH_ERR_AUTH_TOKEN_NOT_FOUND: string; }; declare const PROSODY_API: { DOMAIN_PREFIX: string; PATH: { ROOM: string; ROOM_SIZE: string; SESSIONS: string; }; RESPONSE: { PARTICIPANTS: string; }; QUERY_PARAMETERS: { DOMAIN: string; ROOM: string; }; }; declare const ProsodyApiErrors: { INVALID_SESSIONID: { code: string; name: string; message: string; details: string; }; INVALID_TYPE: { code: string; name: string; message: string; details: string; }; }; declare const JWT_API: { KEYS: { PASSTHROUGH: string; EXPAND: string; }; }; declare const ONLINE_MEMBER_COUNT_API: { ENDPOINTS: { GET_ONLINE_MEMBER_COUNT: string; }; RESPONSE: { ONLINE_USERS_COUNT: string; GROUPS: string; }; ERRORS: { INVALID_GROUPLIST: { code: string; name: string; message: string; details: string; }; }; }; //#endregion //#region src/v4/types/common.d.ts type Position = (typeof CallSettings.POSITION)[keyof typeof CallSettings.POSITION]; type AspectRatio = (typeof CallSettings.ASPECT_RATIO)[keyof typeof CallSettings.ASPECT_RATIO]; type ColorRGB = `rgb(${number}, ${number}, ${number})`; type ColorRGBA = `rgba(${number}, ${number}, ${number}, ${number})`; type ColorHEX = `#${string}`; type _ColorValue = ColorRGB | ColorRGBA | ColorHEX; type ColorValue = _ColorValue | Omit; type _Region = keyof typeof REGION; type Region = _Region | Omit; type _THost = `rtc-${_Region}.cometchat.io`; type Host = _THost | Omit; interface AudioMode$1 { isSelected: boolean; mode: string; } //#endregion //#region src/v4/types/callEvents.d.ts interface User$1 { name: string; avatar: string; isVideoMuted: string; isAudioMuted: string; isLocalUser: string; id: string; uid: string; } interface ICallEventsData { readonly onUserJoined: { name: string; avatar: string; joinnedAt: string; uid: string; isAudioMuted: boolean; isLocalUser: boolean; isVideoMuted: boolean; }; readonly onUserLeft: { name: string; avatar: string; joinnedAt: string; uid: string; }; readonly onUserListUpdated: Array<{ name: string; avatar: string; uid: string; }>; readonly onMediaDeviceListUpdated: { videoInputDevices: MediaDeviceInfo[]; audioInputDevices: MediaDeviceInfo[]; audioOutputDevices: MediaDeviceInfo[]; }; readonly onRecordingStarted: Partial; readonly onRecordingStopped: Partial; readonly onCallSwitchedToVideo: { sessionId: string; initiator: Partial; }; readonly onCallEnded: {}; readonly onSessionTimeout: () => void; readonly onUserMuted: { name: string; avatar: string; uid: string; }; } //#endregion //#region src/v4/models/ErrorModel.d.ts /** * * * @export * @interface ErrorModel */ interface ErrorModel { code: string | number; message?: string; details?: object | string; } //#endregion //#region src/v4/models/CometChatCallsException.d.ts declare class CometChatCallsException { code: ErrorModel['code']; message?: ErrorModel['message']; details?: ErrorModel['details']; constructor(errorModel: ErrorModel); } //#endregion //#region src/v4/models/Listner.d.ts interface IOngoingCallListener { onUserJoined: (user: Partial) => void; onUserLeft: (user: Partial) => void; onUserListUpdated: (userList: Partial) => void; onMediaDeviceListUpdated: (devices: Partial) => void; onRecordingStarted: (data: Partial) => void; onRecordingStopped: (data: Partial) => void; onUserMuted: (test: Partial) => void; onCallSwitchedToVideo: (data: Partial) => void; onCallEnded: () => void; onSessionTimeout: () => void; onCallEndButtonPressed: () => void; onAudioModesUpdated: (any: any) => void; onError: (error: CometChatCallsException) => void; } declare class OngoingCallListener { /** * This event is triggered when a user joins the call. */ onUserJoined?: IOngoingCallListener['onUserJoined']; /** * This event is triggered when a user leaves the call. */ onUserLeft?: IOngoingCallListener['onUserLeft']; /** * This event is triggered when the participant list of the call changes. */ onUserListUpdated?: IOngoingCallListener['onUserListUpdated']; /** * This event is triggered when an audio mode is updated. */ onAudioModesUpdated?: IOngoingCallListener['onAudioModesUpdated']; /** * This event is triggered when the call is ended. */ onCallEnded?: IOngoingCallListener['onCallEnded']; /** * This event is triggered when the call is ended due to session timeout. */ onSessionTimeout?: IOngoingCallListener['onSessionTimeout']; /** * This event is triggered when end call button is pressed. */ onCallEndButtonPressed?: IOngoingCallListener['onCallEndButtonPressed']; /** * This event is triggered when an error occurs. */ onError?: IOngoingCallListener['onError']; /** * This event is triggered when someone starts recording the call. */ onRecordingStarted?: IOngoingCallListener['onRecordingStarted']; /** * This event is triggered when someone stops recording the call. */ onRecordingStopped?: IOngoingCallListener['onRecordingStopped']; /** * This event is triggered when a user is muted. */ onUserMuted?: IOngoingCallListener['onUserMuted']; /** * This event is triggered when an audio call is switched to a video call. */ onCallSwitchedToVideo?: IOngoingCallListener['onCallSwitchedToVideo']; constructor(eventObj: Partial); } //#endregion //#region src/v4/models/CallSettings.d.ts declare class CallSettings { static readonly POSITION_TOP_LEFT = "top-left"; static readonly POSITION_TOP_RIGHT = "top-right"; static readonly POSITION_BOTTOM_LEFT = "bottom-left"; static readonly POSITION_BOTTOM_RIGHT = "bottom-right"; static readonly ASPECT_RATIO_DEFAULT = "default"; static readonly ASPECT_RATIO_CONTAIN = "contain"; static readonly ASPECT_RATIO_COVER = "cover"; static readonly POSITION: { readonly TOP_LEFT: "top-left"; readonly TOP_RIGHT: "top-right"; readonly BOTTOM_LEFT: "bottom-left"; readonly BOTTOM_RIGHT: "bottom-right"; }; static readonly ASPECT_RATIO: { readonly DEFAULT: "default"; readonly CONTAIN: "contain"; readonly COVER: "cover"; }; private defaultLayout; private isAudioOnly; private listener; private mode; private ShowEndCallButton; private ShowSwitchCameraButton; private ShowMuteAudioButton; private ShowPauseVideoButton; private ShowAudioModeButton; private StartAudioMuted; private StartVideoMuted; private defaultAudioMode; private ShowSwitchToVideoCallButton; private AvatarMode; private ShowRecordingButton; private idleTimeoutPeriod; private StartRecordingOnCallStart; private MainVideoContainerSetting; private EnableVideoTileClick; private enableDraggableVideoTile; constructor(builder: CallSettingsBuilder); isAudioOnlyCall(): boolean; isDefaultLayoutEnabled(): boolean; getCallEventListener(): OngoingCallListener; getMode(): string; isEndCallButtonEnabled(): boolean; isSwitchCameraButtonEnabled(): boolean; isMuteAudioButtonEnabled(): boolean; isPauseVideoButtonEnabled(): boolean; isAudioModeButtonEnabled(): boolean; getStartWithAudioMuted(): boolean; getStartWithVideoMuted(): boolean; getDefaultAudioMode(): string; isAudioToVideoButtonEnabled(): boolean; getAvatarMode(): string; isRecordingButtonEnabled(): boolean; getIdleTimeoutPeriod(): number; shouldStartRecordingOnCallStart(): boolean; getMainVideoContainerSetting(): MainVideoContainerSetting; isVideoTileClickEnabled(): boolean; isVideoTileDragEnabled(): boolean; } type CallModes = (typeof CallConstants.CALL_MODE)[keyof typeof CallConstants.CALL_MODE]; declare class CallSettingsBuilder { /** @private */defaultLayout: boolean; /** @private */ isAudioOnly: boolean; /** @private */ listener: OngoingCallListener; /** @private */ mode: CallModes; /** @private */ ShowEndCallButton: boolean; /** @private */ ShowSwitchCameraButton: boolean; /** @private */ ShowMuteAudioButton: boolean; /** @private */ ShowPauseVideoButton: boolean; /** @private */ ShowAudioModeButton: boolean; /** @private */ StartAudioMuted: boolean; /** @private */ StartVideoMuted: boolean; /** @private */ defaultAudioMode: (typeof CallConstants.AUDIO_MODE)[keyof typeof CallConstants.AUDIO_MODE]; /** @private */ ShowSwitchToVideoCallButton: boolean; /** @private */ AvatarMode: string; /** @private */ ShowRecordingButton: boolean; /** @private */ idleTimeoutPeriod: number; /** @private */ StartRecordingOnCallStart: boolean; /** @private */ MainVideoContainerSetting: MainVideoContainerSetting; /** @private */ EnableVideoTileClick: boolean; /** @private */ enableDraggableVideoTile: boolean; /** * * @param {boolean} defaultLayout * This methods shows/hides the default button layout. * If set to true the default button layout will be shown. * If set to false the default button layout will be hidden. * Default value is true * @returns */ enableDefaultLayout(defaultLayout: boolean): this; /** * * @param {boolean} isAudioOnly * This methods sets the type(audio/video) of the call. * If set to true, the call will be strictly an audio call. * If set to false, the call will be an audio-video call. * Default value is false * @returns */ setIsAudioOnlyCall(isAudioOnly: boolean): this; /** * * @param {OngoingCallListener} listener * This method sets the call event listener. * @returns */ setCallEventListener(listener: OngoingCallListener): this; /** * * @param {string} mode * This method sets the mode of the call. * @returns */ setMode(mode: CallModes): this; /** * * @param {boolean} showEndCallButton * This method shows/hides the end call button. * If set to true it will display the end call button. * If set to false it will hide the end call button. * Default value is true. * @returns */ showEndCallButton(showEndCallButton?: boolean): this; /** * * @param {boolean} showSwitchCameraButton * This method shows/hides the switch camera button. * If set to true it will display the switch camera button. * If set to false it will hide the switch camera button. * Note: For video call it remains hidden regardless of its value. * Default value is true. * @returns */ showSwitchCameraButton(showSwitchCameraButton?: boolean): this; /** * * @param {boolean} showMuteAudioButton * This method shows/hides the mute audio button. * If set to true it will display the mute audio button. * If set to false it will hide the mute audio button. * Default value is true. * @returns */ showMuteAudioButton(showMuteAudioButton?: boolean): this; /** * * @param {boolean} showPauseVideoButton * This method shows/hides the pause video button. * If set to true it will display the pause video button. * If set to false it will hide the pause video button. * Note: For video call it remains hidden regardless of its value. * Default value is true. * @returns */ showPauseVideoButton(showPauseVideoButton?: boolean): this; /** * * @param {boolean} showAudioModeButton * This method shows/hides the audio mode button. * If set to true it will display the audio mode button. * If set to false it will hide the audio mode button. * Default value is true. * @returns */ showAudioModeButton(showAudioModeButton?: boolean): this; /** * * @param {boolean} audioMuted * This method allows the call to be started with audio muted. * If set to true, the call will start with audio muted. * Default value is false. * @returns */ startWithAudioMuted(audioMuted?: boolean): this; /** * * @param {boolean} videoMuted * This method allows the call to be started with video muted. * If set to true, the call will start with video muted. * Note: This method has no effect for audio calls. * Default value is false. * @returns */ startWithVideoMuted(videoMuted?: boolean): this; /** * * @param {string} audioMode * This method will set the default audio mode. * @returns */ setDefaultAudioMode(audioMode: (typeof CallConstants.AUDIO_MODE)[keyof typeof CallConstants.AUDIO_MODE]): this; /** * * @param {boolean} showAudioToVideoSwitchButton * This method is obsolete and doesn't have any effect. * @deprecated * @returns */ showSwitchToVideoCallButton(showAudioToVideoSwitchButton?: boolean): this; /** * * @param {string} mode * This method is obsolete and doesn't have any effect. * @deprecated * @returns */ setAvatarMode(mode?: 'circle' | 'square' | 'fullscreen'): this; /** * * @param {boolean} showRecordingButton * This method shows/hides the recording button. * If set to true it will display the recording button. * If set to false it will hide the recording button. * Default value is false. * @returns */ showRecordingButton(showRecordingButton?: boolean): this; /** * * @param {number} idleTimeoutPeriod * This method sets the idle timeout period for the call. * If set and you are the only one in call, the call will end * after the idle timeout period, giving you the option to * extend the call 60 seconds before the call ends. * Default value is 180 seconds. * @returns */ setIdleTimeoutPeriod(idleTimeoutPeriod?: number): this; /** * * @param {boolean} startRecordingOnCallStart * This method starts the recording as soon as the call start. * If set to true it will start the recording as soon as the call start. * Default value is false. * @returns */ startRecordingOnCallStart(startRecordingOnCallStart?: boolean): this; /** * * This method is obsolete and doesn't have any effect. * @param {any} ...args * @deprecated * @returns */ setMainVideoContainerSetting(...args: any[]): this; /** * * @param {boolean} enableVideoTileClick * This method can be used to enable/disable video tile click functionality in Spotlight mode. * By default the video tile is clickable. * @returns */ enableVideoTileClick(enableVideoTileClick?: boolean): this; /** * * @param {boolean} enableVideoTileDrag * This method can be used to enable/disable video tile drag functionality in Spotlight mode. * By default the video tile is draggable. * @returns */ enableVideoTileDrag(enableVideoTileDrag?: boolean): this; /** * This method will return an object of the CallSettings class. * @returns {CallSettings} */ build(): CallSettings; } declare class MainVideoContainerSetting { private videoFit; private zoomButton; private fullScreenButton; private userListButton; private nameLabel; /** * * @param {string} mainVideoAspectRatio * This method is used to set the aspect ratio of main video. * The default value is `contain`. * @returns */ setMainVideoAspectRatio(mainVideoAspectRatio?: AspectRatio): void; /** * * @param {Position} position * @param {boolean} visibility * This method is used to set the position & visibility parameter of the full screen button. * By default the full screen button is visible in the `bottom-right` position. * @returns */ setFullScreenButtonParams(position?: Position, visibility?: boolean): void; /** * * @param {Position} position * @param {boolean} visibility * @param {string} backgroundColor * This method is used to set the position, visibility & background color of the name label. * By default the name label is visible in the `bottom-left` position with a background-color `#333333` * @returns */ setNameLabelParams(position?: Position, visibility?: boolean, backgroundColor?: string): void; /** * * @param {Position} position * @param {boolean} visibility * This method is used to set the position & visibility parameter of the zoom button. * By default the zoom button is visible in the `bottom-right` position. * @returns */ setZoomButtonParams(position?: Position, visibility?: boolean): void; /** * * @param {Position} position * @param {boolean} visibility * This method is used to set the position & visibility parameter of the user list button. * By default the user list button is visible in the `bottom-right` position. * @returns */ setUserListButtonParams(position?: Position, visibility?: boolean): void; } //#endregion //#region src/AppReactNativeSDK.d.ts interface AppProps extends Partial { callToken: string; /** * @deprecated Use `sessionSettings` instead. */ callSettings?: CallSettings | Partial; sessionSettings?: CallSettings | Partial; } declare function AppReactNativeSDK(props: AppProps): React.JSX.Element; //#endregion //#region src/v4/models/ListnerHandler.d.ts interface IMultiOngoingCallListener extends OngoingCallListener { _name: string; } declare class ListenerHandlers { static callHandlers?: IMultiOngoingCallListener[]; static addCallEventListener(name: string, callListener: OngoingCallListener): void; static removeCallEventListener(handler: string): void; } //#endregion //#region src/v4/models/CallAppSettings.d.ts declare class CallAppSettings$1 { private appId; private region; private host?; constructor(builder?: CallAppSettingsBuilder); setAppId(appId: string): this; setRegion(region: Region): this; setHost(host: Host): this; getAppId(): string; getRegion(): Region; getHost(): Host | undefined; } declare class CallAppSettingsBuilder { appId: string; region: Region; host?: Host; /** * Method to set appId of the app. * @param {string} appId appId of the app * @returns */ setAppId(appId: string): this; /** * Method to set region of the app. * @param {Region} region region of the app. * @returns {void} */ setRegion(region: Region): this; /** * Method to set host/domain of the app. * @param {string} host host/domain of the app. * @returns {void} */ setHost(host: Host): this; /** * This method will return an object of the CallsAppSettings class. * @returns {CallAppSettings} Returns the CallsAppSettings instance */ build(): CallAppSettings$1; } declare function validateCallAppSettings(appSettings: CallAppSettings$1): Promise; //#endregion //#region src/v4/models/CallGroup.d.ts declare class CallGroup { protected guid: string; protected name: string; protected icon: string; constructor(object: any); getGuid(): string; setGuid(guid: string): void; getName(): string; setName(name: string): void; getIcon(): string; setIcon(icon: string): void; toString(): string; static getGroupFromJson(object: any): CallGroup; } //#endregion //#region src/v4/models/CallUser.d.ts declare class CallUser { protected uid: string; protected name: string; protected avatar: string; constructor(object: any); getUid(): string; setUid(uid: string): void; getName(): string; setName(name: string): void; getAvatar(): string; setAvatar(avatar: string): void; toString(): string; static getUserFromJson(object: any): CallUser; } //#endregion //#region src/v4/models/Participant.d.ts /** * Represents a participant in a call. */ declare class Participant { /** * The unique identifier of the participant. */ private uid; /** * The name of the participant. */ private name; /** * The avatar of the participant. */ private avatar; /** * The total audio minutes of the participant. */ private totalAudioMinutes; /** * The total video minutes of the participant. */ private totalVideoMinutes; /** * The total duration in minutes of the participant. */ private totalDurationInMinutes; /** * The device ID of the participant. */ private deviceID; /** * Whether the participant has joined the call or not. */ private hasJoined; /** * The timestamp when the participant joined the call. */ private joinedAt; /** * The timestamp when the participant left the call. */ private leftAt; /** * The media ID of the participant. */ private mid; /** * The state of the participant. */ private state; /** * Creates a new instance of Participant. * @param object - The object containing the participant data. */ constructor(object: any); /** * Gets the unique identifier of the participant. * @returns The unique identifier of the participant. */ getUid(): string; /** * Sets the unique identifier of the participant. * @param value - The unique identifier of the participant. */ setUid(value: string): void; /** * Gets the name of the participant. * @returns The name of the participant. */ getName(): string; /** * Sets the name of the participant. * @param value - The name of the participant. */ setName(value: string): void; /** * Gets the avatar of the participant. * @returns The avatar of the participant. */ getAvatar(): string; /** * Sets the avatar of the participant. * @param value - The avatar of the participant. */ setAvatar(value: string): void; /** * Gets the total audio minutes of the participant. * @returns The total audio minutes of the participant. */ getTotalAudioMinutes(): number; /** * Sets the total audio minutes of the participant. * @param value - The total audio minutes of the participant. */ setTotalAudioMinutes(value: number): void; /** * Gets the total video minutes of the participant. * @returns The total video minutes of the participant. */ getTotalVideoMinutes(): number; /** * Sets the total video minutes of the participant. * @param value - The total video minutes of the participant. */ setTotalVideoMinutes(value: number): void; /** * Gets the total duration in minutes of the participant. * @returns The total duration in minutes of the participant. */ getTotalDurationInMinutes(): number; /** * Sets the total duration in minutes of the participant. * @param value - The total duration in minutes of the participant. */ setTotalDurationInMinutes(value: number): void; /** * Gets the device ID of the participant. * @returns The device ID of the participant. */ getDeviceID(): string; /** * Sets the device ID of the participant. * @param value - The device ID of the participant. */ setDeviceID(value: string): void; /** * Gets whether the participant has joined the call or not. * @returns Whether the participant has joined the call or not. */ getHasJoined(): boolean; /** * Sets whether the participant has joined the call or not. * @param value - Whether the participant has joined the call or not. */ setHasJoined(value: boolean): void; /** * Gets the timestamp when the participant joined the call. * @returns The timestamp when the participant joined the call. */ getJoinedAt(): number; /** * Sets the timestamp when the participant joined the call. * @param value - The timestamp when the participant joined the call. */ setJoinedAt(value: number): void; /** * Gets the timestamp when the participant left the call. * @returns The timestamp when the participant left the call. */ getLeftAt(): number; /** * Sets the timestamp when the participant left the call. * @param value - The timestamp when the participant left the call. */ setLeftAt(value: number): void; /** * Gets the media ID of the participant. * @returns The media ID of the participant. */ getMid(): string; /** * Sets the media ID of the participant. * @param value - The media ID of the participant. */ setMid(value: string): void; /** * Gets the state of the participant. * @returns The state of the participant. */ getState(): string; /** * Sets the state of the participant. * @param value - The state of the participant. */ setState(value: string): void; /** * Creates a new instance of Participant from a JSON object. * @param object - The JSON object containing the participant data. * @returns A new instance of Participant. */ static getParticipantFromJson(object: any): Participant; } //#endregion //#region src/v4/models/Recording.d.ts /** * Represents a recording object. */ declare class Recording { /** * The recording ID. */ private rid; /** * The URL of the recording. */ private recording_url; /** * The start time of the recording. */ private startTime; /** * The end time of the recording. */ private endTime; /** * The duration of the recording. */ private duration; /** * Creates a new instance of the Recording class. * @param data - The data to initialize the recording object. */ constructor(data: any); /** * Gets the recording ID. * @returns The recording ID. */ getRid(): string; /** * Sets the recording ID. * @param value - The recording ID to set. */ setRid(value: string): void; /** * Gets the recording URL. * @returns The recording URL. */ getRecordingURL(): string; /** * Sets the recording URL. * @param value - The recording URL to set. */ setRecordingURL(value: string): void; /** * Gets the start time of the recording. * @returns The start time of the recording. */ getStartTime(): number; /** * Sets the start time of the recording. * @param value - The start time of the recording to set. */ setStartTime(value: number): void; /** * Gets the end time of the recording. * @returns The end time of the recording. */ getEndTime(): number; /** * Sets the end time of the recording. * @param value - The end time of the recording to set. */ setEndTime(value: number): void; /** * Gets the duration of the recording. * @returns The duration of the recording. */ getDuration(): number; /** * Sets the duration of the recording. * @param value - The duration of the recording to set. */ setDuration(value: number): void; /** * Creates a new Recording object from the given JSON data. * @param data - The JSON data to create the Recording object from. * @returns A new Recording object. */ static getRecordingFromJson(data: any): Recording; } //#endregion //#region src/v4/models/CallLog.d.ts /** * Represents a call log. */ declare class CallLog { /** * The session ID of the call log. */ private sessionId; /** * The total audio minutes of the call log. */ private totalAudioMinutes; /** * The total video minutes of the call log. */ private totalVideoMinutes; /** * The total duration of the call log. */ private totalDuration; /** * Whether the call log has a recording. */ private hasRecording; /** * The time the call was initiated at. */ private initiatedAt; /** * The call category of the call log. */ private callCategory; /** * @type {CallUser} * The initiator of the call log. */ private initiator; /** * @type {CallUser | CallGroup} * The receiver of the call log. */ private receiver; /** * The receiver type of the call log. */ private receiverType; /** * The status of the call log. */ private status; /** * The total duration in minutes of the call log. */ private totalDurationInMinutes; /** * The total number of participants in the call log. */ private totalParticipants; /** * The type of the call log. */ private type; /** * The message ID of the call log. */ private mid; /** * The time the call ended at. */ private endedAt; /** * @type {Participant[]} * The participants of the call log. */ private participants; /** * @type {Recording[]} * The recordings of the call log. */ private recordings; /** * Creates a new instance of CallLog. * @param data - The data to initialize the call log with. */ constructor(data: any); /** * Gets the session ID of the call log. * @returns The session ID of the call log. */ getSessionID(): string; /** * Sets the session ID of the call log. * @param value - The session ID to set. */ setSessionID(value: string): void; /** * Gets the total audio minutes of the call log. * @returns The total audio minutes of the call log. */ getTotalAudioMinutes(): number; /** * Sets the total audio minutes of the call log. * @param value - The total audio minutes to set. */ setTotalAudioMinutes(value: number): void; /** * Gets the total video minutes of the call log. * @returns The total video minutes of the call log. */ getTotalVideoMinutes(): number; /** * Sets the total video minutes of the call log. * @param value - The total video minutes to set. */ setTotalVideoMinutes(value: number): void; /** * Gets the total duration of the call log. * @returns The total duration of the call log. */ getTotalDuration(): string; /** * Sets the total duration of the call log. * @param value - The total duration to set. */ setTotalDuration(value: string): void; /** * Gets whether the call log has a recording. * @returns Whether the call log has a recording. */ getHasRecording(): boolean; /** * Sets whether the call log has a recording. * @param value - Whether the call log has a recording. */ setHasRecording(value: boolean): void; /** * Gets the time the call was initiated at. * @returns The time the call was initiated at. */ getInitiatedAt(): number; /** * Sets the time the call was initiated at. * @param value - The time the call was initiated at. */ setInitiatedAt(value: number): void; /** * Gets the call category of the call log. * @returns The call category of the call log. */ getCallCategory(): string; /** * Sets the call category of the call log. * @param value - The call category to set. */ setCallCategory(value: string): void; /** * Gets the initiator of the call log. * @returns The initiator of the call log. */ getInitiator(): CallUser; /** * Sets the initiator of the call log. * @param value - The initiator to set. */ setInitiator(value: CallUser): void; /** * Gets the receiver of the call log. * @returns The receiver of the call log. */ getReceiver(): CallUser | CallGroup; /** * Sets the receiver of the call log. * @param value - The receiver to set. */ setReceiver(value: CallUser | CallGroup): void; /** * Gets the receiver type of the call log. * @returns The receiver type of the call log. */ getReceiverType(): string; /** * Sets the receiver type of the call log. * @param value - The receiver type to set. */ setReceiverType(value: string): void; /** * Gets the status of the call log. * @returns The status of the call log. */ getStatus(): string; /** * Sets the status of the call log. * @param value - The status to set. */ setStatus(value: string): void; /** * Gets the total duration in minutes of the call log. * @returns The total duration in minutes of the call log. */ getTotalDurationInMinutes(): number; /** * Sets the total duration in minutes of the call log. * @param value - The total duration in minutes to set. */ setTotalDurationInMinutes(value: number): void; /** * Gets the total number of participants in the call log. * @returns The total number of participants in the call log. */ getTotalParticipants(): number; /** * Sets the total number of participants in the call log. * @param value - The total number of participants to set. */ setTotalParticipants(value: number): void; /** * Gets the type of the call log. * @returns The type of the call log. */ getType(): string; /** * Sets the type of the call log. * @param value - The type to set. */ setType(value: string): void; /** * Gets the message ID of the call log. * @returns The message ID of the call log. */ getMid(): string; /** * Sets the message ID of the call log. * @param value - The message ID to set. */ setMid(value: string): void; /** * Gets the time the call ended at. * @returns The time the call ended at. */ getEndedAt(): number; /** * Sets the time the call ended at. * @param value - The time the call ended at. */ setEndedAt(value: number): void; /** * Gets the participants of the call log. * @returns The participants of the call log. */ getParticipants(): Participant[]; /** * Sets the participants of the call log. * @param value - The participants to set. */ setParticipants(value: Participant[]): void; /** * Gets the recordings of the call log. * @returns The recordings of the call log. */ getRecordings(): Recording[]; /** * Sets the recordings of the call log. * @param value - The recordings to set. */ setRecordings(value: Recording[]): void; /** * Creates a new instance of CallLog from JSON data. * @param data - The JSON data to create the call log from. * @returns A new instance of CallLog created from the JSON data. */ static callLogFromJson(data: any): CallLog; } //#endregion //#region src/v4/models/CometChatCallLogs.d.ts /** * Represents a request to fetch call logs. */ declare class CallLogRequest { /** * The maximum number of call logs to fetch. */ private limit; /** * The total number of pages of call logs. */ private totalPages; /** * The current page of call logs. */ private currentPage; /** * The type of call to filter by. */ private callType; /** * The status of call to filter by. */ private callStatus; /** * Whether the call has a recording or not. */ private hasRecording; /** * The category of call to filter by. */ private callCategory; /** * The direction of call to filter by. */ private callDirection; /** * The user ID to filter by. */ private uid; /** * The group ID to filter by. */ private guid; /** * The authentication token to use for the API call. */ private authToken; /** * Whether an API call is currently in progress. */ private inProgress; /** * The timestamp of the last update. */ private updatedAt; /** * Whether to only fetch updates. */ private onlyUpdates; /** * The timestamp of the call log. */ private timestamp?; /** * The ID of the call log. */ private id?; /** * The affix of the call log. */ private affix; /** * The last affix of the call log. */ private lastAffix; /** * The current method of the call log. */ private currentMethod; /** * The pagination metadata of the call log. */ private paginationMeta; /** * Creates a new CallLogRequest instance. * @param builder The builder object to use for constructing the request. */ constructor(builder: CallLogRequestBuilder); /** * Fetches the next page of call logs. * @returns A promise that resolves to an array of CallLog objects, or rejects with a CometChatCallsException if there was an error. */ fetchNext(): Promise; /** * Fetches the previous page of call logs. * @returns A promise that resolves to an array of CallLog objects, or an empty array if there are no previous pages, or rejects with a CometChatCallsException if there was an error.. */ fetchPrevious(): Promise; /** * Makes an API call to fetch call logs. * @param isFetchNext Whether to fetch the next page of call logs. * @returns A promise that resolves to an array of CallLog objects, or rejects with a CometChatCallsException if there was an error. */ private makeAPICall; /** * Gets the filter parameters for the API call. * @param isNext Whether to fetch the next page of call logs. * @returns The filter parameters object. */ private getParams; /** * Parses the API response and returns an array of CallLog objects. * @param response The API response string. * @returns An array of CallLog objects. */ private getCallLogList; } /** * A builder class for creating a request to fetch call logs. */ declare class CallLogRequestBuilder { limit: number; callType: string; callStatus: string; hasRecording: boolean; callCategory: string; callDirection: string; uid: string; guid: string; authToken: string; /** * Sets the limit of call logs to be fetched. * @param limit - The number of call logs to be fetched. * @returns The CallLogRequestBuilder object. */ setLimit(limit: number): this; /** * Sets the type of call to be fetched. * @param callType - The type of call to be fetched. Can be either 'video' or 'audio'. * @returns The CallLogRequestBuilder object. */ setCallType(callType: 'video' | 'audio'): this; /** * Sets the status of call to be fetched. * @param callStatus - The status of call to be fetched. Can be either 'ongoing', 'busy', 'rejected', 'cancelled', 'ended' or 'missed'. * @returns The CallLogRequestBuilder object. */ setCallStatus(callStatus: 'ongoing' | 'busy' | 'rejected' | 'cancelled' | 'ended' | 'missed'): this; /** * Sets whether the call has recording or not. * @param hasRecording - Whether the call has recording or not. * @returns The CallLogRequestBuilder object. */ setHasRecording(hasRecording: boolean): this; /** * Sets the category of call to be fetched. * @param callCategory - The category of call to be fetched. Can be either 'call' or 'meet'. * @returns The CallLogRequestBuilder object. */ setCallCategory(callCategory: 'call' | 'meet'): this; /** * Sets the direction of call to be fetched. * @param callDirection - The direction of call to be fetched. Can be either 'incoming' or 'outgoing'. * @returns The CallLogRequestBuilder object. */ setCallDirection(callDirection: 'incoming' | 'outgoing'): this; /** * Sets the user ID of the call logs to be fetched. * @param uid - The user ID of the call logs to be fetched. * @returns The CallLogRequestBuilder object. */ setUid(uid: string): this; /** * Sets the group ID of the call logs to be fetched. * @param guid - The group ID of the call logs to be fetched. * @returns The CallLogRequestBuilder object. */ setGuid(guid: string): this; /** * Sets the authorization token for the request. * @param authToken - The authorization token for the request. * @returns The CallLogRequestBuilder object. */ setAuthToken(authToken: string): this; /** * Builds and returns the CallLogRequest object. * @returns The CallLogRequest object. */ build(): CallLogRequest; } //#endregion //#region src/v4/models/PresenterSettings.d.ts declare class PresenterSettings { static readonly POSITION_TOP_LEFT = "top-left"; static readonly POSITION_TOP_RIGHT = "top-right"; static readonly POSITION_BOTTOM_LEFT = "bottom-left"; static readonly POSITION_BOTTOM_RIGHT = "bottom-right"; static readonly ASPECT_RATIO_DEFAULT = "default"; static readonly ASPECT_RATIO_CONTAIN = "contain"; static readonly ASPECT_RATIO_COVER = "cover"; static readonly POSITION: { readonly TOP_LEFT: "top-left"; readonly TOP_RIGHT: "top-right"; readonly BOTTOM_LEFT: "bottom-left"; readonly BOTTOM_RIGHT: "bottom-right"; }; static readonly ASPECT_RATIO: { readonly DEFAULT: "default"; readonly CONTAIN: "contain"; readonly COVER: "cover"; }; private defaultLayout; private isAudioOnly; private isPresenter; private listener; private ShowEndCallButton; private ShowSwitchCameraButton; private ShowMuteAudioButton; private ShowPauseVideoButton; private ShowAudioModeButton; private StartAudioMuted; private StartVideoMuted; private defaultAudioMode; private ShowRecordingButton; private idleTimeoutPeriod; constructor(builder: PresenterSettingsBuilder); isAudioOnlyCall(): boolean; getIsPresenter(): boolean; isDefaultLayoutEnabled(): boolean; getCallEventListener(): OngoingCallListener; isEndCallButtonEnabled(): boolean; isSwitchCameraButtonEnabled(): boolean; isMuteAudioButtonEnabled(): boolean; isPauseVideoButtonEnabled(): boolean; isAudioModeButtonEnabled(): boolean; getStartWithAudioMuted(): boolean; getStartWithVideoMuted(): boolean; getDefaultAudioMode(): string; isRecordingButtonEnabled(): boolean; getIdleTimeoutPeriod(): number; } declare class PresenterSettingsBuilder { /** @private */defaultLayout: boolean; /** @private */ isAudioOnly: boolean; /** @private */ isPresenter: boolean; /** @private */ listener: OngoingCallListener; /** @private */ ShowEndCallButton: boolean; /** @private */ ShowSwitchCameraButton: boolean; /** @private */ ShowMuteAudioButton: boolean; /** @private */ ShowPauseVideoButton: boolean; /** @private */ ShowAudioModeButton: boolean; /** @private */ StartAudioMuted: boolean; /** @private */ StartVideoMuted: boolean; /** @private */ defaultAudioMode: (typeof CallConstants.AUDIO_MODE)[keyof typeof CallConstants.AUDIO_MODE]; /** @private */ ShowRecordingButton: boolean; /** @private */ idleTimeoutPeriod: number; /** * * @param {boolean} defaultLayout * This methods shows/hides the default button layout. * If set to true the default button layout will be shown. * If set to false the default button layout will be hidden. * Default value is true * @returns */ enableDefaultLayout(defaultLayout: boolean): this; /** * * @param {boolean} isAudioOnly * This methods sets the type(audio/video) of the call. * If set to true, the call will be strictly an audio call. * If set to false, the call will be an audio-video call. * Default value is false * @returns */ setIsAudioOnlyCall(isAudioOnly: boolean): this; /** * * @param {boolean} isPresenter * This methods sets if the user is a presenter. * If set to true, the user will be a presenter (allowed to share video/audio). * If set to false, the user will not be a presenter (restricted). * Default value is false * @returns */ setIsPresenter(isPresenter: boolean): this; /** * * @param {OngoingCallListener} listener * This method sets the call event listener. * @returns */ setCallEventListener(listener: OngoingCallListener): this; /** * * @param {boolean} showEndCallButton * This method shows/hides the end call button. * If set to true it will display the end call button. * If set to false it will hide the end call button. * Default value is true. * @returns */ showEndCallButton(showEndCallButton?: boolean): this; /** * * @param {boolean} showSwitchCameraButton * This method shows/hides the switch camera button. * If set to true it will display the switch camera button. * If set to false it will hide the switch camera button. * Note: For video call it remains hidden regardless of its value. * Default value is true. * @returns */ showSwitchCameraButton(showSwitchCameraButton?: boolean): this; /** * * @param {boolean} showMuteAudioButton * This method shows/hides the mute audio button. * If set to true it will display the mute audio button. * If set to false it will hide the mute audio button. * Default value is true. * @returns */ showMuteAudioButton(showMuteAudioButton?: boolean): this; /** * * @param {boolean} showPauseVideoButton * This method shows/hides the pause video button. * If set to true it will display the pause video button. * If set to false it will hide the pause video button. * Note: For video call it remains hidden regardless of its value. * Default value is true. * @returns */ showPauseVideoButton(showPauseVideoButton?: boolean): this; /** * * @param {boolean} showAudioModeButton * This method shows/hides the audio mode button. * If set to true it will display the audio mode button. * If set to false it will hide the audio mode button. * Default value is true. * @returns */ showAudioModeButton(showAudioModeButton?: boolean): this; /** * * @param {boolean} audioMuted * This method allows the call to be started with audio muted. * If set to true, the call will start with audio muted. * Default value is false. * @returns */ startWithAudioMuted(audioMuted?: boolean): this; /** * * @param {boolean} videoMuted * This method allows the call to be started with video muted. * If set to true, the call will start with video muted. * Note: This method has no effect for audio calls. * Default value is false. * @returns */ startWithVideoMuted(videoMuted?: boolean): this; /** * * @param {string} audioMode * This method will set the default audio mode. * @returns */ setDefaultAudioMode(audioMode: (typeof CallConstants.AUDIO_MODE)[keyof typeof CallConstants.AUDIO_MODE]): this; /** * * @param {boolean} showRecordingButton * This method shows/hides the recording button. * If set to true it will display the recording button. * If set to false it will hide the recording button. * Default value is false. * @returns */ showRecordingButton(showRecordingButton?: boolean): this; /** * * @param {number} idleTimeoutPeriod * This method sets the idle timeout period for the call. * If set and you are the only one in call, the call will end * after the idle timeout period, giving you the option to * extend the call 60 seconds before the call ends. * Default value is 180 seconds. * @returns */ setIdleTimeoutPeriod(idleTimeoutPeriod: number): this; /** * This method will return an object of the CallSettings class. * @returns {PresenterSettings} */ build(): PresenterSettings; } //#endregion //#region src/v4/models/CometChatCallsComponentCore.d.ts type MyState$1 = { shouldLoad: boolean; errored: boolean; }; declare class CometChatCallsComponentCore extends React.Component<{ callSettings: CallSettings | PresenterSettings; callToken: string; presenterMode?: boolean; }, MyState$1> { static ref: any; callsettings: CallSettings | PresenterSettings; constructor(props: any); render(): React.JSX.Element; } //#endregion //#region src/v4/models/CometChatPresenterComponent.d.ts type MyState = { errored: boolean; }; declare class CometChatPresenterComponent extends React.Component<{ presenterSettings: PresenterSettings; callToken: string; }, MyState> { constructor(props: any); render(): React.JSX.Element; } //#endregion //#region src/v4/models/CometChatCalls.d.ts declare class CometChatCalls$1 { private static appSettings; private static inProgress; static CALL_MODE: { readonly DEFAULT: "DEFAULT"; readonly SPOTLIGHT: "SPOTLIGHT"; }; static AUDIO_MODE: { readonly SPEAKER: "SPEAKER"; readonly EARPIECE: "EARPIECE"; readonly BLUETOOTH: "BLUETOOTH"; readonly HEADPHONES: "HEADPHONES"; }; static addCallEventListener: typeof ListenerHandlers.addCallEventListener; static removeCallEventListener: typeof ListenerHandlers.removeCallEventListener; static OngoingCallListener: typeof OngoingCallListener; static CallSettingsBuilder: typeof CallSettingsBuilder; static CallSettings: typeof CallSettings; static PresenterSettingsBuilder: typeof PresenterSettingsBuilder; static PresenterSettings: typeof PresenterSettings; static CallAppSettingsBuilder: typeof CallAppSettingsBuilder; static CallAppSettings: typeof CallAppSettings$1; static Component: typeof CometChatCallsComponentCore; static PresenterComponent: typeof CometChatPresenterComponent; static CallLogRequestBuilder: typeof CallLogRequestBuilder; static CallLog: typeof CallLog; static CallUser: typeof CallUser; static CallGroup: typeof CallGroup; static Participant: typeof Participant; static Recording: typeof Recording; static generateToken(sessionID: string, authToken: string): Promise<{ token: string; }>; static init(appSettings: CallAppSettings$1): Promise; /** * Method end on-going call. * @returns {void} */ static endSession(): void; /** * Method to mute/unmute audio stream. * @param {boolean} muteAudio * @returns {void} */ static muteAudio(muteAudio: boolean): void; /** * Method to pause/unpause video stream. * @param {boolean} pauseVideo * @returns {void} */ static pauseVideo(pauseVideo: boolean): void; /** * Method to resume video stream. * @returns {void} */ static resumeVideo(): void; /** * Method to set audio mode. * @param {string} mode * @returns {void} */ static setAudioMode(mode: string): void; /** * Method to switch camera. * @returns {void} */ static switchCamera(): void; /** * Method to get all the available audio output devices. * @returns {Promise} */ static getAudioOutputModes(): Promise; /** * Method to switch from audio call to video call. * @returns {void} */ static switchToVideoCall(): void; /** * Method to Start Call Recording. * @returns {void} */ static startRecording(): void; /** * Method to Stop Call Recording. * @returns {void} */ static stopRecording(): void; /** @internal */ static getAppSettings(): CallAppSettings$1; /** * Retrieves call details for a given session ID and auth token. * @param sessionID - The session ID of the call. * @param authToken - The authentication token required to make the API call. * @returns A Promise that resolves to a CallLog object containing the call details. * @throws {CometChatCallsException} If there is an error retrieving the call details. */ static getCallDetails(sessionID: string, authToken: string): Promise>; } //#endregion //#region src/v4/models/RTCUser.d.ts declare class RTCUser { private uid; private avatar; private name; private jwt; private resource; constructor(uid: string); setUID(uid: string): void; getUID(): string; setName(name: string): void; getName(): string; setAvatar(avatar: string): void; getAvatar(): string; setJWT(jwt: string): void; getJWT(): string; setResource(resource: string): void; getResource(): string; } //#endregion //#region src/v4/models/CallLogFilterParams.d.ts /** * Represents the parameters used to filter call logs. */ declare class CallLogFilterParams { /** * The number of items to display per page. */ private perPage; /** * The page number to display. */ private page; /** * The mode of the call. */ private mode; /** * The type of the call. */ private type; /** * The status of the call. */ private status; /** * The direction of the call. */ private direction; /** * Whether the call has recordings. */ private hasRecording; /** * The user ID. */ private uid; /** * The group ID. */ private guid; /** * Creates a new instance of the CallLogFilterParams class. * @param data - The data to initialize the call log filter parameters object. */ /** * Sets the direction of the call. * @param value - The direction of the call. */ setDirection(value: string): void; /** * Sets the status of the call. * @param value - The status of the call. */ setStatus(value: string): void; /** * Sets the type of the call. * @param value - The type of the call. */ setType(value: string): void; /** * Sets the number of items to display per page. * @param value - The number of items to display per page. */ setPerPage(value: number): void; /** * Sets the page number to display. * @param value - The page number to display. */ setPage(value: number): void; /** * Sets the mode of the call. * @param value - The mode of the call. */ setMode(value: string): void; /** * Sets whether the call has recordings. * @param value - Whether the call has recordings. */ setHasRecordings(value: boolean): void; /** * Sets the user ID. * @param value - The user ID. */ setUid(value: string): void; /** * Sets the group ID. * @param value - The group ID. */ setGuid(value: string): void; /** * Converts the filter parameters to a map of key-value pairs. * @returns A map of key-value pairs representing the filter parameters. */ toMap(): { [key: string]: string; }; } //#endregion //#region src/v4/models/index.d.ts declare const addCallEventListener: typeof ListenerHandlers.addCallEventListener; declare const removeCallEventListener: typeof ListenerHandlers.removeCallEventListener; //#endregion //#region src/CometChatCalls.d.ts interface User { uid: string; name: string; status?: string; authToken?: string; lastActiveAt?: number; avatar?: string; role?: string; hasBlockedMe?: boolean; blockedByMe?: boolean; deactivatedAt?: number; wsChannel?: { identity: string; }; jwt?: string; } interface CometChatException { errorCode: string; errorDescription: string; message?: string; } interface LoginListener { onLoginSuccess?: (user: User) => void; onLoginFailure?: (error: CometChatException) => void; onLogoutSuccess?: () => void; onLogoutFailure?: (error: CometChatException) => void; } declare class CometChatCalls extends SessionMethodsCore { private static appSettings; private static isInitialized; private static loginInProgress; private static loggedInUser; private static loginListeners; static CALL_MODE: { readonly DEFAULT: "DEFAULT"; readonly SPOTLIGHT: "SPOTLIGHT"; }; static AUDIO_MODE: { readonly SPEAKER: "SPEAKER"; readonly EARPIECE: "EARPIECE"; readonly BLUETOOTH: "BLUETOOTH"; readonly HEADPHONES: "HEADPHONES"; }; static OngoingCallListener: typeof OngoingCallListener; static CallSettingsBuilder: typeof CallSettingsBuilder; static CallAppSettingsBuilder: typeof CallAppSettingsBuilder; static Component: typeof AppReactNativeSDK; /** * Initializes the CometChat Calls SDK with the provided app settings. * Must be called before any other SDK methods. * @param appSettings - The application settings for configuring the SDK. * @returns An object indicating success or failure with error details. */ static init(appSettings: CallAppSettings | CallAppSettings$1): Promise<{ readonly success: false; readonly error: { readonly name: "VALIDATION_ERROR"; readonly message: `Invalid app settings: ${string}`; readonly timestamp: number; }; } | { readonly success: true; readonly error: null; }>; /** * Logs in a user with their UID and an optional auth key. * If no auth key is provided, the one from app settings is used. * @param uid - The unique identifier of the user. * @param authKey - The authentication key. Falls back to the key provided in app settings. * @returns A Promise that resolves to the logged-in User object. * @throws {CometChatException} If login fails or validation errors occur. */ static login(uid: string, authKey?: string): Promise; /** * Logs in a user directly with an auth token. * @param authToken - The authentication token for the user. * @returns A Promise that resolves to the logged-in User object. * @throws {CometChatException} If login fails or the token is invalid. */ static loginWithAuthToken(authToken: string): Promise; /** * Logs out the currently logged-in user and clears local session data. * @returns A Promise that resolves to a success message string. * @throws {CometChatException} If no user is logged in or logout fails. */ static logout(): Promise; /** * Retrieves the currently logged-in user. * @returns The logged-in User object, or null if no user is logged in. */ static getLoggedInUser(): User | null; /** * Retrieves the auth token of the currently logged-in user. * @returns The auth token string, or null if no user is logged in. */ static getUserAuthToken(): string | null; /** * Checks whether a user is currently logged in. * @returns True if a user is logged in with a valid auth token, false otherwise. */ static isUserLoggedIn(): boolean; /** * Registers a login listener to receive login/logout lifecycle callbacks. * @param listenerId - A unique identifier for the listener. * @param listener - The listener object with callback methods. */ static addLoginListener(listenerId: string, listener: LoginListener): void; /** * Removes a previously registered login listener. * @param listenerId - The unique identifier of the listener to remove. */ static removeLoginListener(listenerId: string): void; /** * Generates a call token for the given session. * Uses the provided auth token or falls back to the logged-in user's token. * @param sessionId - The session ID to generate a token for. * @param authToken - Optional auth token. If omitted, the logged-in user's token is used. * @returns A Promise that resolves to an object containing the generated token. * @throws {CometChatException} If the session ID is missing, no auth token is available, or the SDK is not initialized. */ static generateToken(sessionId: string, authToken?: string): Promise<{ token: string; }>; private static getBaseURL; private static loginWithUID; private static authenticateWithToken; private static logoutInternal; private static callGenerateTokenAPI; private static callVerifyTokenAPI; private static getStorageKey; private static saveUser; private static getSavedUser; private static clearSavedUser; private static generateDeviceId; private static createError; private static notifyLoginSuccess; private static notifyLoginFailure; private static notifyLogoutSuccess; private static notifyLogoutFailure; /** * Adds an event listener for SDK events. * @param eventType - The type of event to listen for. * @param listener - The callback function to invoke when the event fires. * @param options - Optional configuration including an AbortSignal for automatic cleanup. * @returns An unsubscribe function to remove the listener. */ static addEventListener(eventType: K$1, listener: MobileSDKEvents[K$1], options?: { signal?: AbortSignal; }): () => void; /** * Sets the audio output mode (mobile only). * @param mode - The audio mode to set (e.g., 'SPEAKER', 'EARPIECE', 'BLUETOOTH', 'HEADPHONES'). */ static setAudioMode(mode: AudioMode['type']): void; /** * Enables Picture-in-Picture (PIP) layout during the call. */ static enablePictureInPictureLayout(): void; /** * Disables Picture-in-Picture (PIP) layout. */ static disablePictureInPictureLayout(): void; } //#endregion export { CometChatCalls };