UNPKG

@cometchat/calls-sdk-javascript

Version:

Cometchat's Javascript SDK for In-app Calling.

218 lines (217 loc) 7.54 kB
export declare const CallConstants: { readonly MODE: { readonly DEFAULT: "DEFAULT"; readonly SPOTLIGHT: "SPOTLIGHT"; readonly GRID: "TILE"; }; 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_INITIATOR: "initiator"; readonly CALL_SENDER: "sender"; 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 AUDIO_INPUT_DEVICES: "audioInputDevices"; readonly AUDIO_OUTPUT_DEVICES: "audioOutputDevices"; readonly VIDEO_INPUT_DEVICES: "videoInputDevices"; readonly POST_MESSAGES: { readonly TYPES: { readonly ACTION_MESSAGE: "cometchat_action_message"; readonly HANGUP: "hangup"; readonly COMETCHAT_RTC_SETTINGS: "cometchat_rtc_settings"; }; readonly ACTIONS: { readonly USER_JOINED: "onUserJoined"; readonly USER_LEFT: "onUserLeft"; readonly USER_LIST_CHANGED: "onUserListChanged"; readonly INITIAL_DEVICE_LIST: "initialDeviceList"; readonly DEVICE_CHANGE: "onDeviceChange"; readonly LOAD: "LOAD"; readonly CHANGE_AUDIO_INPUT: "changeAudioInput"; readonly CHANGE_AUDIO_OUTPUT: "changeAudioOutput"; readonly CHANGE_VIDEO_INPUT: "changeVideoInput"; readonly MUTE_AUDIO: "muteAudio"; readonly UNMUTE_AUDIO: "unMuteAudio"; readonly PAUSE_VIDEO: "pauseVideo"; readonly UNPAUSE_VIDEO: "unPauseVideo"; readonly SWITCH_MODE: "switchMode"; readonly START_SCREENSHARE: "startScreenShare"; readonly STOP_SCREENSHARE: "stopScreenShare"; readonly END_CALL: "endCall"; readonly START_RECORDING: "startRecording"; readonly STOP_RECORDING: "stopRecording"; readonly RECORDING_TOGGLED: "onRecordingToggled"; readonly USER_MUTED: "onUserMuted"; readonly ON_USER_UNMUTED: "onUserUnMuted"; readonly SCREEN_SHARE_STARTED: "SCREEN_SHARE_STARTED"; readonly SCREEN_SHARE_STOPPED: "SCREEN_SHARE_ENDED"; readonly SWITCH_TO_VIDEO_CALL: "switchedToVideo"; readonly SWITCHED_TO_VIDEO_CALL: "onCallSwitchedToVideo"; readonly OPEN_VIRTUAL_BACKGROUND: "openVirtualBackgroundMenu"; readonly SET_BACKGROUND_BLUR: "setBackgroundBlur"; readonly SET_BACKGROUND_IMAGE: "setBackgroundImage"; }; }; readonly MEDIA_DEVICE: { readonly ID: "id"; readonly NAME: "name"; readonly ACTIVE: "active"; }; readonly ZOOM_BUTTON_DEFAULT_PARAMS: { readonly position: "bottom-right"; readonly visible: true; }; readonly NAME_LABEL_DEFAULT_PARAMS: { readonly position: "bottom-left"; readonly visible: true; readonly color: "rgba(27, 27, 27, 0.4)"; }; readonly NETWORK_LABEL_DEFAULT_PARAMS: { readonly position: "bottom-right"; readonly visible: true; }; readonly MAIN_VIDEO_CONTAINER_SETTINGS: { readonly KEYS: { readonly POSITION: "position"; readonly VISIBILITY: "visible"; readonly COLOR: "color"; }; }; }; export 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: {}; }; CALL_SETTINGS_REQUIRED: { code: string; name: string; message: string; details: {}; }; JWT_NOT_FOUND: { code: string; name: string; message: string; details: {}; }; }; export declare const REGION: { readonly us: "us"; readonly eu: "eu"; readonly in: "in"; readonly US: "us"; readonly EU: "eu"; readonly IN: "in"; }; export declare const API_ERROR_CODES: { AUTH_ERR_AUTH_TOKEN_NOT_FOUND: string; }; export declare const GENERAL_CONSTS: { REGION: { us: string; eu: string; in: string; US: string; EU: string; IN: string; }; }; export declare const GENERAL_ERROR: { readonly GENERIC_EXCEPTION: { readonly code: "GENERIC_EXCEPTION"; }; readonly INVALID_ARGUMENT_EXCEPTION: { readonly code: "INVALID_ARGUMENT_EXCEPTION"; }; readonly API_ERROR: { readonly code: "API_ERROR"; }; 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."; }; readonly INVALID_CALL_APP_SETTINGS: { readonly code: "INVALID_CALL_APP_SETTINGS"; readonly message_instance: "appSettings must be an instance of CallAppSettings class"; readonly message_app_id: "Invalid app id, please check your appSettings"; readonly message_region: "Invalid region, please check your appSettings"; readonly message_host: "Invalid host, please check your appSettings"; }; readonly INVALID_CALL_SETTINGS: { readonly code: "INVALID_CALL_SETTINGS"; readonly message_instance: "callSettings must be an instance of CallSettings class"; }; readonly INVALID_PRESENTER_SETTINGS: { readonly code: "INVALID_PRESENTER_SETTINGS"; readonly message_instance: "presenterSettings must be an instance of PresenterSettings class"; }; readonly INVALID_ARGUMENT_EXCEPTION_CALL_TOKEN: { readonly code: "INVALID_ARGUMENT_EXCEPTION"; readonly message: "callToken must be valid please verify."; }; 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"; }; };