// Generated by dts-bundle v0.7.3 /** *Initialises and returns the CometChat singleton object. * * @export * @param {string} appId appId generted at the time of perchase. unique for each client. * @returns {CometChat} */ export function init(appId: string): CometChat; export as namespace CometChat; export as namespace CometChatNotifications; export const DEFAULT_TIMEOUT = 45; export class CometChat { static AIAssistantBaseEvent: typeof AIAssistantBaseEvent; static AIAssistantRunStartedEvent: typeof AIAssistantRunStartedEvent; static AIAssistantRunFinishedEvent: typeof AIAssistantRunFinishedEvent; static AIAssistantMessageStartedEvent: typeof AIAssistantMessageStartedEvent; static AIAssistantMessageEndedEvent: typeof AIAssistantMessageEndedEvent; static AIAssistantContentReceivedEvent: typeof AIAssistantContentReceivedEvent; static AIAssistantToolStartedEvent: typeof AIAssistantToolStartedEvent; static AIAssistantToolEndedEvent: typeof AIAssistantToolEndedEvent; static AIAssistantToolArgumentEvent: typeof AIAssistantToolArgumentEvent; static AIAssistantToolResultEvent: typeof AIAssistantToolResultEvent; static AI_ASSISTANT_EVENTS: { RUN_STARTED: string; RUN_FINISHED: string; TEXT_MESSAGE_START: string; TEXT_MESSAGE_END: string; TEXT_MESSAGE_CONTENT: string; TOOL_CALL_STARTED: string; TOOL_CALL_ENDED: string; TOOL_CALL_RESULT: string; TOOL_CALL_ARGUMENT: string; }; static GroupType: typeof GroupType; static GroupMemberScope: typeof GroupMemberScope; static ResponseConstants: { RESPONSE_KEYS: { KEY_DATA: string; KEY_META: string; KEY_CURSOR: string; KEY_NEXT: string; KEY_PREVIOUS: 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_REACTIONS: 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; }; KEY_CONVERSATION_STARTER: string; KEY_SMART_REPLIES: string; KEY_CONVERSATION_SUMMARY: string; KEY_BOT_REPLY: string; }; }; static CallConstants: { CALL_MODE: { DEFAULT: string; SPOTLIGHT: string; SINGLE: string; TILE: string; GRID: string; }; CALL_TYPE: { AUDIO: string; VIDEO: string; }; RECEIVER_TYPE_GROUP: string; RECEIVER_TYPE_USER: string; CALL_KEYS: { CALL_DATA: string; CALL_ID: string; CALL_SESSION_ID: string; CALL_RECEIVER: string; CALL_SENDER: string; CALL_RECEIVER_TYPE: string; CALL_STATUS: string; CALL_TYPE: string; CALL_INITIATED_AT: string; CALL_JOINED_AT: string; CALL_LEFT_AT: string; CALL_METADATA: string; CALL_ENTITIES: string; CALL_ENTITY_TYPE: string; CALL_ENTITY: string; CALL_ENTITY_USER: string; CALL_ENTITY_GROUP: string; }; CALL_STATUS: { INITIATED: string; ONGOING: string; UNANSWERED: string; REJECTED: string; BUSY: string; CANCELLED: string; ENDED: string; }; AUDIO_INPUT_DEVICES: string; AUDIO_OUTPUT_DEVICES: string; VIDEO_INPUT_DEVICES: string; POST_MESSAGES: { TYPES: { ACTION_MESSAGE: string; HANGUP: string; COMETCHAT_RTC_SETTINGS: string; }; ACTIONS: { USER_JOINED: string; USER_LEFT: string; USER_LIST_CHANGED: string; INITIAL_DEVICE_LIST: string; DEVICE_CHANGE: string; LOAD: string; CHANGE_AUDIO_INPUT: string; CHANGE_AUDIO_OUTPUT: string; CHANGE_VIDEO_INPUT: string; MUTE_AUDIO: string; UNMUTE_AUDIO: string; PAUSE_VIDEO: string; UNPAUSE_VIDEO: string; SWITCH_MODE: string; START_SCREENSHARE: string; STOP_SCREENSHARE: string; END_CALL: string; START_RECORDING: string; STOP_RECORDING: string; RECORDING_TOGGLED: string; USER_MUTED: string; SCREEN_SHARE_STARTED: string; SCREEN_SHARE_STOPPED: string; SWITCH_TO_VIDEO_CALL: string; SWITCHED_TO_VIDEO_CALL: string; OPEN_VIRTUAL_BACKGROUND: string; SET_BACKGROUND_BLUR: string; SET_BACKGROUND_IMAGE: string; }; }; MEDIA_DEVICE: { ID: string; NAME: string; ACTIVE: string; }; ZOOM_BUTTON_DEFAULT_PARAMS: { position: string; visible: boolean; }; NAME_LABEL_DEFAULT_PARAMS: { position: string; visible: boolean; color: string; }; NETWORK_LABEL_DEFAULT_PARAMS: { position: string; visible: boolean; }; MAIN_VIDEO_CONTAINER_SETTINGS: { KEYS: { POSITION: string; VISIBILITY: string; COLOR: string; }; }; }; static 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; }; }; static 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: {}; }; }; static MessageConstatnts: { TYPE: { TEXT: string; MEDIA: string; IMAGE: string; VIDEO: string; AUDIO: string; FILE: string; CUSTOM: string; ASSISTANT: string; TOOL_RESULT: string; TOOL_ARGUMENTS: string; }; CATEGORY: { MESSAGE: string; ACTION: string; CALL: string; CUSTOM: string; INTERACTIVE: string; AGENTIC: 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; MENTIONS: string; INTERACTIVE_DATA: string; INTERACTION_GOAL: string; INTERACTIONS: string; ALLOW_SENDER_INTERACTION: string; ELEMENT_ID: string; INTERACTED_AT: string; ELEMENT_IDS: string; RUN_ID: string; THREAD_ID: string; TOOL_CALLS: string; FUNCTION: string; NAME: string; ARGUMENTS: string; TOOL_CALL_ID: string; DISPLAY_NAME: string; EXECUTION_TEXT: string; }; KNOWN_MEDIA_TYPE: { IMAGE: any[]; VIDEO: any[]; AUDIO: any[]; FILE: any[]; }; 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; MENTIONS_WITH_TAG_INFO: string; MENTIONS_WITH_BLOCKED_INFO: string; ONLY_INTERACTION_GOAL_COMPLETED: string; HAS_ATTACHMENTS: string; HAS_LINKS: string; HAS_MENTIONS: string; HAS_REACTIONS: string; MENTIONED_UIDS: string; ATTACHMENT_TYPES: string; WITH_PARENT: string; HIDE_QUOTED_MESSAGES: string; }; }; }; static 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; WEBRTC_WEB_FRONTEND_HOST: string; WEBRTC_WEB_FRONTEND_VERSION: string; SECURED_MEDIA_HOST: string; PARAMETERS: string; CORE_CONVERSATIONS_UPDATE_ON_CALL_ACTIVITIES: string; CORE_CONVERSATIONS_UPDATE_ON_GROUP_ACTIONS: string; CORE_CONVERSATIONS_UPDATE_ON_CUSTOM_MESSAGES: string; CORE_CONVERSATIONS_UPDATE_ON_REPLIES: string; FLAG_REASONS: string; }; }; static 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; }; }; static TYPING_NOTIFICATION: { RECEIVER_ID: string; RECEIVER_TYPE: string; META: string; KEYS: { TYPING_NOTIFICATION: string; TIMESTAMP: string; }; ACTIONS: { STARTED: string; ENDED: string; }; }; /** * @deprecated Use `PresenceConstants` instead. */ static PresenceConstatnts: { STATUS: { ONLINE: string; AVAILABLE: string; OFFLINE: string; JOINED: string; LEFT: string; }; }; static PresenceConstants: { STATUS: { ONLINE: string; AVAILABLE: string; OFFLINE: string; JOINED: string; LEFT: string; }; }; static APPINFO: { platform: string; sdkVersion: string; apiVersion: string; sdkVersionWithUnderScore: string; }; static 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; }; }; static GENERAL_ERROR: { MUST_BE_A_STRING: { code: string; name: string; message: string; details: {}; }; MUST_BE_A_NUMBER: { code: string; name: string; message: string; details: {}; }; MUST_BE_A_OBJECT: { code: string; name: string; message: string; details: {}; }; MUST_BE_AN_ARRAY: { code: string; name: string; message: string; details: {}; }; MUST_BE_A_BOOLEAN: { code: string; name: string; message: string; details: {}; }; MUST_BE_A_BLOB: { code: string; name: string; message: string; details: {}; }; INVALID: { code: string; name: string; message: string; details: {}; }; METHOD_COMPULSORY: { code: string; name: string; message: string; details: {}; }; LIMIT_EXCEEDED: { code: string; name: string; message: string; details: {}; }; MUST_BE_A_POSITIVE_NUMBER: { code: string; name: string; message: string; details: {}; }; INVALID_MEDIA_FILE: { code: string; name: string; message: string; details: {}; }; EMPTY_STRING: { code: string; name: string; message: string; details: {}; }; MISSING_KEY: { code: string; name: string; message: string; details: {}; }; EMPTY_ARRAY: { code: string; name: string; message: string; details: {}; }; INVALID_SEARCH_KEYWORD: { code: string; name: string; message: string; details: {}; }; INVALID_GROUP_PROPERTY: { code: string; name: string; message: string; details: {}; }; INVALID_USER_PROPERTY: { code: string; name: string; message: string; details: {}; }; PARAMETER_MUST_BE_A_NUMBER: { code: string; name: string; message: string; details: {}; }; PARAMETER_MUST_BE_AN_ARRAY: { code: string; name: string; message: string; details: {}; }; PARAMETER_MUST_BE_A_BOOLEAN: { code: string; name: string; message: string; details: {}; }; PARAMETER_MUST_BE_A_POSITIVE_NUMBER: { code: string; name: string; message: string; details: {}; }; PARAMETER_MUST_BE_A_STRING: { code: string; name: string; message: string; details: {}; }; PARAMETER_COMPULSORY: { code: string; name: string; message: string; details: {}; }; PASSWORD_COMPULSORY: { code: string; name: string; message: string; details: {}; }; INVALID_ARRAY: { code: string; name: string; message: string; details: {}; }; }; static ConversationErrors: { INVALID_CONVERSATION_TYPE: { code: string; name: string; message: string; details: string; }; CONVERSATION_NOT_FOUND: { code: string; name: string; message: string; details: string; }; }; static 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_SESSION_ID: string; KEY_MESSAGE_LISTENER_LIST: string; }; static SDKHeader: { platform: string; sdkVersion: string; sdk: string; }; static 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; }; static SESSION_STORE: { SESSION_ID: string; }; static REACTION_ACTION: typeof REACTION_ACTION; static ExtensionErrors: { INVALID_EXTENSION: { code: string; name: string; message: string; details: {}; }; EXTENSION_NOT_FOUND: { code: string; name: string; message: string; details: {}; }; }; static FeatureRestrictionErrors: { INVALID_FEATURE: { code: string; name: string; message: string; details: {}; }; FEATURE_NOT_FOUND: { code: string; name: string; message: string; details: {}; }; }; static WS: { CONVERSATION: { TYPE: { CHAT: string; GROUP_CHAT: string; }; }; }; static JWT_API: { KEYS: { PASSTHROUGH: string; EXPAND: string; }; }; static PROSODY_API: { DOMAIN_PREFIX: string; PATH: { ROOM: string; ROOM_SIZE: string; SESSIONS: string; }; RESPONSE: { PARTICIPANTS: string; }; QUERY_PARAMETERS: { DOMAIN: string; ROOM: string; }; }; static ProsodyApiErrors: { INVALID_SESSIONID: { code: string; name: string; message: string; details: string; }; INVALID_TYPE: { code: string; name: string; message: string; details: string; }; }; static 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; }; }; }; static 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: {}; }; }; static ANALYTICS: { analyticsHost: string; analyticsVersion: string; }; static API_ERROR_CODES: { AUTH_ERR_AUTH_TOKEN_NOT_FOUND: string; }; static ATTACHMENTS_CONSTANTS: { KEYS: { EXTENSION: string; MIME_TYPE: string; NAME: string; SIZE: string; URL: string; }; }; static BlockedUsersConstants: { REQUEST_KEYS: { DIRECTIONS: { BOTH: string; HAS_BLOCKED_ME: string; BLOCKED_BY_ME: string; }; }; }; static CALLING_COMPONENT_VERSION: number; static COMMON_UTILITY_CONSTANTS: { TYPE_CONSTANTS: { BOOLEAN: string; STRING: string; OBJECT: string; NUMBER: string; }; }; static DEFAULT_VALUES: { ZERO: number; MSGS_LIMIT: number; REACTIONS_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; REACTIONS_MAX_LIMIT: number; }; static 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; }; static GroupErrors: { NOT_A_GROUP: CometChatException; INVALID_SCOPE: CometChatException; INVALID_GROUP_TYPE: CometChatException; }; static GroupMemersConstans: { KEYS: { SCOPE: string; UID: string; GUID: string; USER: string; NAME: string; }; }; static MessageCategory: typeof MessageCategory; static MessageErrors: { INVALID_RECEIVER_TYPE: { code: string; name: string; message: string; details: string; }; }; static PARAMETER_ERROR: { PARAMETER_REQUIRED: { code: string; name: string; message: string; details: {}; }; }; static 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; }; static UserErrors: { INVALID_STATUS: CometChatException; INVALID_DIRECTION: CometChatException; USER_NOT_LOGGED_IN: CometChatException; }; static constants: { DEFAULT_STORE: string; MSG_VER_PRE: string; MSG_VER_POST: string; }; static GoalType: typeof GoalType; static AttachmentType: typeof AttachmentType; static ModerationStatus: typeof ModerationStatus; static CometChatException: typeof CometChatException; static TextMessage: typeof TextMessage; static MediaMessage: typeof MediaMessage; static CustomMessage: typeof CustomMessage; static BaseMessage: typeof BaseMessage; static Action: typeof Action; static Call: typeof Call; static TypingIndicator: typeof TypingIndicator; static TransientMessage: typeof TransientMessage; static InteractiveMessage: typeof InteractiveMessage; static InteractionGoal: typeof InteractionGoal; static Interaction: typeof Interaction; static InteractionReceipt: typeof InteractionReceipt; static MessageReceipt: typeof MessageReceipt; static AIAssistantMessage: typeof AIAssistantMessage; static AIToolCall: typeof AIToolCall; static AIToolCallFunction: typeof AIToolCallFunction; static AIAssistantMessageData: typeof AIAssistantMessageData; static AIToolResultMessage: typeof AIToolResultMessage; static AIToolResultMessageData: typeof AIToolResultMessageData; static AIToolArgumentMessage: typeof AIToolArgumentMessage; static AIToolArgumentMessageData: typeof AIToolArgumentMessageData; static Group: typeof Group; static User: typeof User; static GroupMember: typeof GroupMember; static Conversation: typeof Conversation; static ReactionCount: typeof ReactionCount; static ReactionEvent: typeof ReactionEvent; static Reaction: typeof Reaction; static USER_STATUS: { ONLINE: string; OFFLINE: string; }; static MessagesRequest: typeof MessagesRequest; static MessagesRequestBuilder: typeof MessagesRequestBuilder; static ReactionsRequest: typeof ReactionsRequest; static ReactionsRequestBuilder: typeof ReactionsRequestBuilder; static UsersRequest: typeof UsersRequest; static UsersRequestBuilder: typeof UsersRequestBuilder; static ConversationsRequest: typeof ConversationsRequest; static ConversationsRequestBuilder: typeof ConversationsRequestBuilder; static BlockedUsersRequest: typeof BlockedUsersRequest; static BlockedUsersRequestBuilder: typeof BlockedUsersRequestBuilder; static GroupsRequest: typeof GroupsRequest; static GroupsRequestBuilder: typeof GroupsRequestBuilder; static GroupMembersRequest: typeof GroupMembersRequest; static GroupMembersRequestBuilder: typeof GroupMembersRequestBuilder; static BannedMembersRequest: typeof BannedMembersRequest; static BannedMembersRequestBuilder: typeof BannedMembersRequestBuilder; static CallSettings: typeof CallSettings; static CallSettingsBuilder: typeof CallSettingsBuilder; static MainVideoContainerSetting: typeof MainVideoContainerSetting; static VirtualBackground: typeof VirtualBackground; static VirtualBackgroundBuilder: typeof VirtualBackgroundBuilder; static AppSettings: typeof AppSettings; static AppSettingsBuilder: typeof AppSettingsBuilder; static MessageListener: typeof MessageListener; static UserListener: typeof UserListener; static GroupListener: typeof GroupListener; static OngoingCallListener: typeof OngoingCallListener; static CallListener: typeof CallListener; static ConnectionListener: typeof ConnectionListener; static LoginListener: typeof LoginListener; static AIAssistantListener: typeof AIAssistantListener; static CallController: typeof CallController; static CometChatHelper: typeof CometChatHelper; static Attachment: typeof Attachment; static MediaDevice: typeof MediaDevice; static StorageMode: typeof StorageMode; static MESSAGE_TYPE: { TEXT: string; MEDIA: string; IMAGE: string; VIDEO: string; AUDIO: string; FILE: string; CUSTOM: string; ASSISTANT: string; TOOL_RESULT: string; TOOL_ARGUMENTS: string; }; static CATEGORY_MESSAGE: string; static CATEGORY_ACTION: string; static CATEGORY_CALL: string; static CATEGORY_CUSTOM: string; static CATEGORY_INTERACTIVE: string; static ACTION_TYPE: { 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; }; static CALL_TYPE: { AUDIO: string; VIDEO: string; }; static SORT_BY: { NAME: string; STATUS: string; }; static SORT_ORDER: { ASCENDING: string; DESCENDING: string; }; static CALL_MODE: { DEFAULT: string; SPOTLIGHT: string; SINGLE: string; TILE: string; GRID: string; }; static RECEIVER_TYPE: { USER: string; GROUP: string; }; static CONNECTION_STATUS: { CONNECTED: string; CONNECTING: string; DISCONNECTED: string; FEATURE_THROTTLED: string; }; static CALL_STATUS: { INITIATED: string; ONGOING: string; UNANSWERED: string; REJECTED: string; BUSY: string; CANCELLED: string; ENDED: string; }; static GROUP_MEMBER_SCOPE: { ADMIN: string; MODERATOR: string; PARTICIPANT: string; }; static GROUP_TYPE: { PUBLIC: string; PRIVATE: string; PROTECTED: string; PASSWORD: string; }; /** * Setter method for CometChat authToken. * @internal * @param {string} authToken * @memberof CometChat */ static setAuthToken(authToken: string): void; /** *Getter method for CometChat authToken. * @internal * @returns * @memberof CometChat */ getAuthToken(): string; /** * Getter for appId * @internal * @returns {string} */ static getAppId(): string; /** *Getter for apiKey. * @internal * @returns * @memberof CometChat */ getApiKey(): string; /** *Getter method for CometChat mode. * @internal * @returns * @memberof CometChat */ static getMode(): string; /** *Setter method for CometChat mode. * @internal * @returns * @memberof CometChat */ static setMode(mode: string): void; /** * Getter for sessionId. * @internal * @returns * @memberof CometChat */ static getSessionId(): string; /** * Initialize the storage with the current storage mode from AppSettings */ static initializeStorage(): Promise; /** * Storage event when a key is added/updated in localstorage. * @internal * @memberof CometChat */ static onStorageEvent(storageEvent: any): void; /** * This method triggers before a page unloads. * @internal * @memberof CometChat */ static beforeUnload(unloadEvent: any): void; /** * This method checks if Analytics Ping has started. * @internal * @returns {boolean} */ static didAnalyticsPingStart(): boolean; /** * This method gets data from session storage. * @internal * @returns {string | null} * @memberof CometChat */ static getDataFromSessionStorage(key: any): string; /** * This method adds data in the session storage. * @internal * @memberof CometChat */ static addDataToSessionStorage(key: any, value: any): void; /** * This method removes data from the session storage. * @internal * @memberof CometChat */ static removeDataFromSessionStorage(key: any): void; /**--------------------------------* * Core apis * --------------------------------**/ /** * Initialize the CometChat app with appId & Object of AppSettings Class. * @param {string} appId * @param {AppSettings} appSettings * @returns {CometChat} * @memberof CometChat */ static init(appId: any, appSettings: AppSettings): Promise; /** * Function to check whether CometChat class initialized before. * @returns {boolean} * @memberof CometChat */ static isInitialized(): boolean; /** * Returns the singleton object of CometChat class. If CometChat object is not created yet? it will create and returns it. * * @internal * @param {string} appId - An optional argument needed for first time initialization. * @returns {CometChat} */ static getInstance(appId?: string): CometChat; /** * Function to register the FCM token for Push Notification. * @param {string} token * @param {JSON Object} Settings * @returns {Promise} * @memberof CometChat */ static registerTokenForPushNotification(token: string, settings?: {}): Promise; /** * Login funtion will authenticate user provided as an argument. There are two ways to login: * 1. using UID and authKey (unsecure way) * 2. using authToken (secure way) * @param {...string[]} args * @returns {User | CometChatException} * @memberof CometChat */ static login(...args: any): Promise; /**-------------------------------------------------------------------* * Message related functions provided by CometChat class * *--------------------------------------------------------------------**/ /** * Function to send message. * @param {TextMessage | MediaMessage | CustomMessage | InteractiveMessage |any} message * @returns {Message | any} * @memberof CometChat */ static sendMessage(message: TextMessage | MediaMessage | CustomMessage | InteractiveMessage | any): Promise; /** * Function to send a message to user. * @internal * @param {*} message Object * @returns * @memberof CometChat */ static sendDirectMessage(message: Object): Promise; /** * Function to send a message to group. * @internal * @param {*} message * @returns * @memberof CometChat */ static sendGroupMessage(message: any): Promise; /** * Function to send a media message. * @param {MediaMessage} message * @returns {Message | any} * @memberof CometChat */ static sendMediaMessage(message: Object): Promise; /** * * Function to send a custom message. * @param {CustomMessage} message * @returns {Message | any} * @memberof CometChat */ static sendCustomMessage(message: CustomMessage): Promise; /** * * Function to send a interactive message. * @param {InteractiveMessage} message * @returns {Message | any} * @memberof CometChat */ static sendInteractiveMessage(message: InteractiveMessage): Promise; /** * * Function to get the last delivered message id from local storage. * @returns {any} * @memberof CometChat */ static getLastDeliveredMessageId(): Promise; /** * Function to send start typing notification to the provided uid/ guid. * @param {TypingIndicator | any} typingNotification * @memberof CometChat */ static startTyping(typingNotification: TypingIndicator | any): void; /** * Function to send stop typing notification to the provided uid/ guid. * @param {TypingIndicator | any} typingNotification * @memberof CometChat */ static endTyping(typingNotification: TypingIndicator | any): void; /** * Mark all messages upto a specified message id as read. There are two ways markAsRead works: * 1. message * 2. messageID, receiverID, receiverType, senderID * @param {...string[]} args * @memberof CometChat */ static markAsRead(...args: any): any; /** * Mark all messages upto a specified message id as delivered. There are two ways markAsDelivered works: * 1. message * 2. messageID, receiverID, receiverType, senderID * @param {...string[]} args * @memberof CometChat */ static markAsDelivered(...args: any): any; /** * Mark entire conversation as read for a user or group. * @param {string} conversationWith - User ID or Group ID * @param {string} conversationType - Conversation type (user or group) * @returns {Promise} * @memberof CometChat */ static markConversationAsRead(conversationWith: string, conversationType: string): Promise; /** * Mark entire conversation as delivered for a user or group. * @param {string} conversationWith - User ID or Group ID * @param {string} conversationType - Receiver type (user or group) * @returns {Promise} * @memberof CometChat */ static markConversationAsDelivered(conversationWith: string, conversationType: string): Promise; /** * @deprecated Please use markMessageAsUnread() instead. * Mark all the messages after the specified message id as unread. * @param {TextMessage | MediaMessage | CustomMessage | BaseMessage | any} message * @returns {Promise} * @memberof CometChat **/ static markAsUnread(message: TextMessage | MediaMessage | CustomMessage | any): Promise; /** * Mark all the messages after the specified message id as unread. * @param {TextMessage | MediaMessage | CustomMessage | BaseMessage | any} message * @returns {Promise} * @memberof CometChat **/ static markMessageAsUnread(message: TextMessage | MediaMessage | CustomMessage | any): Promise; /** * Send a transient message. * @param {string} uid * @param {string} receiverType * @memberof CometChat */ static sendTransientMessage(transientMessage: TransientMessage): void; /** * Triggers the onTextMessageReceived event. * @internal * @param {any} message * @memberof CometChat */ static sendTestMessage(message: any): Promise; /** * Function to fetch message details for the provided messageID. * @param {string | any} messageId * @returns {Message | any} * @memberof CometChat */ static getMessageDetails(messageId: string | any): Promise; /** * Function to fetch message receipt details for the provided messageID. * @param {string | any} messageId * @returns {MessageReceipt[]} * @memberof CometChat */ static getMessageReceipts(messageId: string | any): Promise; /** * Function to fetch unread message count. * @param {boolean} doHideMessages * @returns {Object} * @memberof CometChat */ static getUnreadMessageCount(doHideMessages?: boolean): Promise; /** * Function to fetch unread message count for all users. * @param {boolean} doHideMessages * @returns {Object} * @memberof CometChat */ static getUnreadMessageCountForAllUsers(doHideMessages?: boolean): Promise; /** * Function to fetch unread message count for all groups. * @param {boolean} doHideMessages * @returns {Object} * @memberof CometChat */ static getUnreadMessageCountForAllGroups(doHideMessages?: boolean): Promise; /** * Function to fetch unread message count for a particular UID. * @param {string} UID * @param {boolean} doHideMessages * @returns {Object} * @memberof CometChat */ static getUnreadMessageCountForUser(UID: string, doHideMessages?: boolean): Promise; /** * Function to fetch unread message count for a particular GUID. * @param {string} GUID * @param {boolean} doHideMessages * @returns {Object} * @memberof CometChat */ static getUnreadMessageCountForGroup(GUID: string, doHideMessages?: boolean): Promise; /** * Function to add reaction for the provided messageID. * @param {string | any} messageId * @param {string} reaction * @returns {Promise} * @memberof CometChat */ static addReaction(messageId: string | any, reaction: string): Promise; /** * Function to remove reaction for the provided messageID. * @param {string | any} messageId * @param {string} reaction * @returns {Promise} * @memberof CometChat */ static removeReaction(messageId: string | any, reaction: string): Promise; /** * Funtion to edit a message. * @param {BaseMessage} message * @returns {Promise} * @memberof CometChat */ static editMessage(message: BaseMessage): Promise; /** * Funtion to delete a message. * @param {string} messageId * @returns {Promise} * @memberof CometChat */ static deleteMessage(messageId: string): Promise; /**---------------------------------------------------------------------------------------* * Online User/Group Member count related functions provided by CometChat class * *----------------------------------------------------------------------------------------**/ /** * This function will return online user count * * @returns {Promise} * @memberof CometChat */ static getOnlineUserCount(): Promise; /** * This function will return online group members count for given GUIDs * * @param {String[]} groups * @returns {Promise} * @memberof CometChat */ static getOnlineGroupMemberCount(groups: String[]): Promise; /**-------------------------------------------------------------------* * User related functions provided by CometChat class * *--------------------------------------------------------------------**/ /** * Function to create a user. * @param {User | any} user * @param {string} apiKey * @returns {Promise} * @memberof CometChat */ static createUser(user: User | any, apiKey: string): Promise; /** * * Function to update the already existing user and returns the result with updated user. * @param {User | any} user * @param {string} apiKey * @returns {Promise} * @memberof CometChat */ static updateUser(user: User | any, apiKey: string): Promise; /** * * function to update the logged-in user and returns the result with updated user * @param {User} user * @returns Promise * @memberof CometChat */ static updateCurrentUserDetails(user: User | any): Promise; /** * function to get the information for the uid provided as an argument * @param {string} uid * @returns {Promise} * @memberof CometChat */ static getUser(uid: any): Promise; /** * * Function to check if logged-in user is available in local storage. If not present in local storage then fetch from API. * @internal * @returns {Promise} * @memberof CometChat */ static getLoggedInUser(): Promise; /** * * This function will return logged in user from local storage. * @returns {Promise} * @memberof CometChat */ static getLoggedinUser(): Promise; /** * Function to block users. * @param {String[]} blockedUids * @returns * @memberof CometChat */ static blockUsers(blockedUids: String[]): Promise; /** * Function to unblock users. * @param {String[]} blockedUids * @returns * @memberof CometChat */ static unblockUsers(blockedUids: String[]): Promise; /**-------------------------------------------------------------------* * Conversation related functions provided by CometChat class * *--------------------------------------------------------------------**/ /** * Function to fetch conversation for a specific user/group. * @param {string} conversationWith * @param {string} conversationType * @returns {Promise} * @memberof CometChat */ static getConversation(conversationWith: string, conversationType: string): Promise; /** * Function to tag a conversation for a specific user/group. * @param {string} conversationWith * @param {string} conversationType * @param {Array} tags * @returns {Promise} * @memberof CometChat */ static tagConversation(conversationWith: string, conversationType: string, tags?: Array): Promise; /** * function to delete conversation for a specific user/group. * @param {string} conversationWith * @param {string} conversationType * @returns Promise * @memberof CometChat */ static deleteConversation(conversationWith: string, conversationType: string): Promise; /**-------------------------------------------------------------------* * Group related functions provided by CometChat class * *--------------------------------------------------------------------**/ /** * Function to create a group. * @param {Group} group * @returns {Promise} * @memberof CometChat */ static createGroup(group: Group | any): Promise; /** * Function to fetch details of a group. * @param {string | Object} guid * @returns {Promise} * @memberof CometChat */ static getGroup(guid: string | Object): Promise; /** * Function to join a public group. * @param {guid} guid * @param {GroupType} type * @param {string} password * @returns {Promise} * @memberof CometChat */ static joinGroup(grp: any, type?: GroupType, password?: string): Promise; /** * * Function to update a group. * @param {Group} group * @returns {Promise} * @memberof CometChat */ static updateGroup(group: any): Promise; /** * * Function to delete a group. * @param {string} guid * @returns {Promise} * @memberof CometChat */ static deleteGroup(guid: string): Promise; /** * Function to leave a group. * @param {string} guid * @returns {Promise} * @memberof CometChat */ static leaveGroup(guid: string): Promise; /** * Function to kick a member from a group. * @param {string} guid * @param {string} uid * @returns {Promise} * @memberof CometChat */ static kickGroupMember(guid: string, uid: string): Promise; /** * Function to change the scope of a member in a group. * @param {string} guid * @param {string} uid * @param {GroupMemberScope} scope * @returns {Promise} * @memberof CometChat */ static updateGroupMemberScope(guid: string, uid: string, scope: GroupMemberScope): Promise; /** * Function to ban a group member from a group. * @param {string} guid * @param {string} uid * @returns {Promise} * @memberof CometChat */ static banGroupMember(guid: string, uid: string): Promise; /** * Function to unban a group member from a group. * @param {string} guid * @param {string} uid * @returns {Promise} * @memberof CometChat */ static unbanGroupMember(guid: string, uid: string): Promise; /** * Function to add members in a group. This function can also be used to ban a group member from a group. * @param {string} guid * @param {Array} groupMembers * @param {Array} bannedMembersList * @returns {Promise} * @memberof CometChat */ static addMembersToGroup(guid: string, groupMembers: Array, bannedMembersList: Array): Promise; /** * * Function to transfer ownership of a group. * @param {string} guid * @param {string} uid * @returns {Promise} * @memberof CometChat */ static transferGroupOwnership(guid: string, uid: string): Promise; /** * Function to create a group and add/ban members in/from that group. * @param {Group} group * @param {Array} members * @param {Array} banMembers * @returns {Promise} * @memberof CometChat */ static createGroupWithMembers(group: Group, members: Array, banMembers: Array): Promise; /**-------------------------------------------------------------------* * Call related functions provided by CometChat class * *--------------------------------------------------------------------**/ /** * Function to initiate a user/group call. * @param {Call} call * @param {number} [timeout] - Optional call timeout in seconds. Defaults to {@link DEFAULT_TIMEOUT} seconds. * @returns {Promise} * @memberof CometChat */ static initiateCall(call: Call | any, timeout?: number): Promise; /** * Function to accept an incoming user/group call. * @param {string} sessionid * @returns {Promise} * @memberof CometChat */ static acceptCall(sessionid: string): Promise; /** * Function to reject an incoming call or cancel an outgoing call. * @param {string} sessionId * @param {string} status * @returns {Promise} * @memberof CometChat */ static rejectCall(sessionId: string, status: any): Promise; /** * Function to end an ongoing call. * @param {string} sessionid * @param {boolean} isInternal - Optional * @returns {Promise} * @memberof CometChat */ static endCall(sessionid: string, isInternal?: boolean): Promise; /** * Function to get the active call. * @returns {Call} * @memberof CometChat */ static getActiveCall(): Call; /** * Function to clear any active call. * @returns {void} * @memberof CometChat */ static clearActiveCall(): void; /** * Function to start a call. * @param {CallSettings | string} callSettings * @param {HTMLElement} view * @param {UserCallEventListener} callEventHandler * @memberof CometChat */ static startCall(callSettings: CallSettings | string, view: HTMLElement, ongoingCallListener?: OngoingCallListener): void; /** * Function to fetch participant count of an ongoing call. * @param {string} sessionId * @param {string} type * @returns {Promise} * @memberof CometChat */ static getCallParticipantCount(sessionId: string, type: string): Promise; /** * Function to send unanswered response if a call in not answered in a specific time interval. * @internal * @param {string} sessionid * @returns {Promise} * @memberof CometChat */ static sendUnansweredResponse(sessionid: string): Promise; /**-------------------------------------------------------------------------------------------------------* * Events listeners setting and removing . * *--------------------------------------------------------------------------------------------------------**/ /** * * Function to add a Connection Listner. * @param {string} name * @param {ConnectionListener} connectionListener * @memberof CometChat */ static addConnectionListener(name: string, connectionListener: ConnectionListener): void; /** * * Function to remove a Connection Listner. * @param {string} name * @memberof CometChat */ static removeConnectionListener(name: string): void; /** * * Function to add a Message Listner. * @param {string} name * @param {MessageListener} messageListener * @memberof CometChat */ static addMessageListener(name: string, messageListener: MessageListener): void; /** * * Function to remove a Message Listner. * @param {string} name * @memberof CometChat */ static removeMessageListener(name: string): void; /** * * Function to add a Call Listener. * @param {string} name * @param {CallListener} callListener * @memberof CometChat */ static addCallListener(name: string, callListener: CallListener): void; /** * * Function to remove a Call Listener. * @param {string} name * @memberof CometChat */ static removeCallListener(name: string): void; /** * * Function to add an AI Assistant Listener. * @param {string} name * @param {AIAssistantListener} aiAssistantListener * @memberof CometChat */ static addAIAssistantListener(name: string, aiAssistantListener: AIAssistantListener): void; /** * * Function to remove an AI Assistant Listener. * @param {string} name * @memberof CometChat */ static removeAIAssistantListener(name: string): void; /** * * Function to add a User Listener. * @param {string} name * @param {UserListener} userListener * @memberof CometChat */ static addUserListener(name: string, userListener: UserListener): void; /** * * Function to remove a User Listener. * @param {string} name * @memberof CometChat */ static removeUserListener(name: string): void; /** * * Function to add a Group Listener. * @param {string} name * @param {GroupListener} groupListener * @memberof CometChat */ static addGroupListener(name: string, groupListener: GroupListener): void; /** * * Function to remove a Group Listener. * @param {string} name * @memberof CometChat */ static removeGroupListener(name: string): void; /** * Function to add a Login Listener. * * @param {string} name * @param {LoginListener} loginListener * @memberof CometChat */ static addLoginListener(name: string, loginListener: LoginListener): void; /** * Function to remove a Login Listener. * * @param {string} name * @memberof CometChat */ static removeLoginListener(name: string): void; /** * * Function to make WebSocket Connection. * @internal */ makeWSConnection(): void; /** * * Function is triggered when the WebSocket Connection is broken. * @internal */ accidentallyDisconnected(): void; /** * * Function to clear the analytical timer. * @internal */ static clearAnalyticsPingTimer(): void; /** * Get the current connection status * @returns {string} * @memberof CometChat */ static getConnectionStatus(): string; /** * Update the connection status. * @internal * @memberof CometChat */ setConnectionStatus(connectionStatus: any): void; /** * * Returns a boolean value which indicates if the extension is enabled or not. * @param {string} extensionId * @returns {Promise} * @memberof CometChat */ static isExtensionEnabled(extensionId: string): Promise; /** * * Returns a boolean value which indicates if the AI Feature is enabled or not. * @param {string} featureKey * @returns {Promise} * @memberof CometChat */ static isAIFeatureEnabled(featureKey: string): Promise; /** * Returns an object of CCExtension Class which has the details of the extension. * * @param {string} extensionId * @returns {Promise} * @memberof CometChat */ static getExtensionDetails(extensionId: string): Promise; /** * Get the XMPP/ WEBRTC details from the servers * @internal * @returns {Promise} * @memberof CometChat */ static getAppSettings(): Promise; /** * Returns a boolean value which indicates if a feature is enabled or not for the current plan. * @param {string} feature * @returns {Promise} * @memberof CometChat */ static isFeatureEnabled(feature: string): Promise; /** * Clears the authtoken from server and clears the local cache. * @returns {Promise} * @memberof CometChat */ static logout(): Promise; /** * Function to call extension API. * @param {string} slug * @param {string} method * @param {string} endpoint * @param {Object} data * @returns {Promise} * @memberof CometChat */ static callExtension(slug: string, method: string, endpoint: string, data?: Object): Promise; /** * Function to get conversation starter for a particular conversation. * @param {string} receiverId * @param {string} receiverType * @param {Object} configuration * @returns {Promise>} * @memberof CometChat */ static getConversationStarter(receiverId: string, receiverType: string, configuration?: Object): Promise>; /** * Function to get smart replies in a conversation. * @param {string} receiverId * @param {string} receiverType * @param {Object} configuration * @returns {Promise} * @memberof CometChat */ static getSmartReplies(receiverId: string, receiverType: string, configuration?: Object): Promise; /** * Function to get assistance from a bot in a particular conversation. * @param {string} receiverId * @param {string} receiverType * @param {string} botUID * @param {string} question * @param {Object} configuration * @returns {Promise} * @memberof CometChat */ static askBot(receiverId: string, receiverType: string, botUID: string, question: string, configuration?: Object): Promise; /** * Function to get summary of a conversation. * @param {string} receiverId * @param {string} receiverType * @param {Object} configuration * @returns {Promise} * @memberof CometChat */ static getConversationSummary(receiverId: string, receiverType: string, configuration?: Object): Promise; /** * Function to set resource, platform and language variable. * @param {string} resource * @param {string} platform * @param {string} language * @memberof CometChat */ static setSource(resource: string, platform: string, language: string): void; /** * Function to set demo app details. * @internal * @memberof CometChat */ static setDemoMetaInfo(details: { name: string; type: string; version: string; platform: string; }): void; /** * Function to clear local storage. * @internal * @memberof CometChat */ static clearCache(): Promise; /** * * Method to connect to WebSocket server. * * @static * @returns void * @memberof CometChat */ static connect(): void; /** * * Method to disconnect from WebSocket server. * * @static * @returns void * @memberof CometChat */ static disconnect(): void; /** * @internal * @param authToken * @returns */ internalRestart(authToken: any): void; /** * @internal * @param pushToLoginListener * @returns */ internalLogout(pushToLoginListener?: boolean): Promise; /** * Mark the element of a message as interacted. * @param {string} messageId * @param {string} elementId * @memberof CometChat */ static markAsInteracted(messageId: string | any, elementId: string): Promise; /** * Retrieves the ConversationUpdateSettings. * * @return A ConversationUpdateSettings object that holds the settings for updating the conversation. */ static getConversationUpdateSettings(): Promise; /** * Fetches the list of flag reasons configured in the CometChat Dashboard. * @returns {Promise} * @memberof CometChat */ static getFlagReasons(): Promise; /** * Allows users to flag a message with a specific reason and an optional remark. * @param {string} messageId * @param {{ reasonId?: string; remark?: string }} payload * @returns {Promise<{ success: boolean; message: string }>} * @memberof CometChat */ static flagMessage(messageId: string, payload: { reasonId: string; remark?: string; }): Promise<{ success: boolean; message: string; }>; } export class CometChatNotifications { static MessagesOptions: typeof MessagesOptions; static RepliesOptions: typeof RepliesOptions; static ReactionsOptions: typeof ReactionsOptions; static MemberActionsOptions: typeof MemberActionsOptions; static DayOfWeek: typeof DayOfWeek; static DNDOptions: typeof DNDOptions; static MutedConversationType: typeof MutedConversationType; static PushPlatforms: typeof PushPlatforms; static DaySchedule: typeof DaySchedule; /** * @deprecated This property is deprecated as of version 4.0.8 due to newer property 'NotificationPreferences'. * It will be removed in subsequent versions. */ static PushPreferences: typeof PushPreferences; static GroupPreferences: typeof GroupPreferences; static OneOnOnePreferences: typeof OneOnOnePreferences; static MutePreferences: typeof MutePreferences; static MutedConversation: typeof MutedConversation; static UnmutedConversation: typeof UnmutedConversation; static NotificationPreferences: typeof NotificationPreferences; /** * Function to get preferences set for the logged-in user. * @returns {Promise} * @memberof CometChatNotifications * @deprecated * * This method is deprecated as of version 4.0.8 due to newer method 'fetchPreferences'. It will be removed in subsequent versions. */ static fetchPushPreferences(): Promise; /** * Function to get preferences set for the logged-in user. * @returns {Promise} * @memberof CometChatNotifications */ static fetchPreferences(): Promise; /** * Function to update preferences for the logged-in user. * @param {PushPreferences} pushPreferences * @returns {Promise} * @memberof CometChatNotifications * @deprecated * * This method is deprecated as of version 4.0.8 due to newer method 'updatePreferences'. It will be removed in subsequent versions. */ static updatePushPreferences(pushPreferences: PushPreferences): Promise; /** * Function to update preferences for the logged-in user. * @param {NotificationPreferences} notificationPreferences * @returns {Promise} * @memberof CometChatNotifications */ static updatePreferences(notificationPreferences: NotificationPreferences): Promise; /** * Function to reset preferences for the logged-in user. * @returns {Promise} * @memberof CometChatNotifications * @deprecated * * This method is deprecated as of version 4.0.8 due to newer method 'resetPreferences'. It will be removed in subsequent versions. */ static resetPushPreferences(): Promise; /** * Function to reset preferences for the logged-in user. * @returns {Promise} * @memberof CometChatNotifications */ static resetPreferences(): Promise; /** * Function to register push token for the current authToken of the logged-in user. * @returns {Promise} * @param {string} pushToken * @param {PushPlatforms} platform * @param {string} providerId - Optional, default value is `default`. * @memberof CometChatNotifications */ static registerPushToken(pushToken: string, platform: PushPlatforms, providerId?: string): Promise; /** * Function to unregister push token registered for the current authToken of the logged-in user. * @returns {Promise} * @memberof CometChatNotifications */ static unregisterPushToken(): Promise; /** * Function to mute conversations for the logged-in user. * @returns {Promise} * @param {MutedConversation[]} mutedConversations * @memberof CometChatNotifications */ static muteConversations(mutedConversations: MutedConversation[]): Promise; /** * Function to unmute conversations for the logged-in user. * @returns {Promise} * @param {UnmutedConversation[]} unmutedConversations * @memberof CometChatNotifications */ static unmuteConversations(unmutedConversations: UnmutedConversation[]): Promise; /** * Function to retrieve list of muted conversations for the logged-in user. * @returns {Promise} * @memberof CometChatNotifications */ static getMutedConversations(): Promise; /** * Function to update timezone for the logged-in user. * @returns {Promise} * @param {string} timezone * @memberof CometChatNotifications */ static updateTimezone(timezone: String): Promise; /** * Function to get timezone for the logged-in user. * @returns {Promise<{timezone: string} | string>} A promise that resolves to an object containing the timezone or a string in case of an error. * @memberof CometChatNotifications */ static getTimezone(): Promise<{ timezone: string; } | string>; } /** * * @module CometChatException * @implements {ErrorModel} */ export class CometChatException implements ErrorModel { code?: string | number; name?: string; message?: string; details?: string; constructor(errorModel: ErrorModel); } /** @private */ export interface UserObj { uid: string; name: string; authToken: string; avatar: string; lastActiveAt: number; link: string; metadata: object; role: string; status: string; statusMessage: string; tags: Array; deactivatedAt: number; } /** * Implementation of UserObject */ export class User { /** * Method to get UID of the user. * @returns {string} */ getUid(): string; /** * Method to set UID of the user. * @param {string} uid */ setUid(uid: string): void; /** * Method to get name of the user. * @returns {string} */ getName(): string; /** * Method to set name of the user. * @param {string} name */ setName(name: string): void; /** * Method to get authToken of the user. * @returns {string} */ getAuthToken(): string; /** * Method to set authToken of the user. * @param {string} authToken */ setAuthToken(authToken: string): void; /** * Method to get avatar of the user. * @returns {string} */ getAvatar(): string; /** * Method to set avatar of the user. * @param {string} avatar */ setAvatar(avatar: string): void; /** * Method to get last active at timestamp of the user. * @returns {number} */ getLastActiveAt(): number; /** * Method to set last active at timestamp of the user. * @param {number} lastActiveAt */ setLastActiveAt(lastActiveAt: number): void; /** * Method to get link of the user. * @returns {string} */ getLink(): string; /** * Method to set link of the user. * @param {string} link */ setLink(link: string): string; /** * Method to get metadata of the user. * @returns {object} */ getMetadata(): object; /** * Method to set metadata of the user. * @param {object} metadata */ setMetadata(metadata: object): void; /** * Method to get role of the user. * @returns {string} */ getRole(): string; /** * Method to set role of the user. * @param {string} role */ setRole(role: string): void; /** * Method to get status of the user. * @returns {string} */ getStatus(): string; /** * Method to set status of the user. * @param {string} status */ setStatus(status: string): void; /** * Method to get status message of the user. * @returns {string} */ getStatusMessage(): string; /** * Method to set status message of the user. * @param {string} statusMessage */ setStatusMessage(statusMessage: string): void; setBlockedByMe(blockedByMe: boolean): void; /** * Method to know if the logged-in user has blocked the other user. * @returns {boolean} */ getBlockedByMe(): boolean; setHasBlockedMe(hasBlockedMe: boolean): void; /** * Method to know if the logged-in user has been blocked by the other user. * @returns {boolean} */ getHasBlockedMe(): boolean; /** * Method to set tags of the user. * @param {string[]} tags */ setTags(tags: Array): void; /** * Method to get tags of the user. * @returns {string[]} */ getTags(): Array; /** * Method to set deactivatedAt timestamp of a user. * @param {number} deactivatedAt */ setDeactivatedAt(deactivatedAt: number): void; /** * Method to get deactivatedAt timestamp of a user. * @returns {number} */ getDeactivatedAt(): number; constructor(...userObj: any[]); } /** @private */ export class Me extends User { constructor(userObj: UserObj | any); getWsChannel(): any; getJWT(): string; getFat(): string; } /** * * @module MediaMessage */ export class MediaMessage extends BaseMessage implements Message { /** @private */ static readonly TYPE: { TEXT: string; MEDIA: string; IMAGE: string; VIDEO: string; AUDIO: string; FILE: string; CUSTOM: string; ASSISTANT: string; TOOL_RESULT: string; TOOL_ARGUMENTS: string; }; /** @private */ static readonly RECEIVER_TYPE: { USER: string; GROUP: string; }; /** @private */ static readonly CATEGORY: { MESSAGE: string; ACTION: string; CALL: string; CUSTOM: string; INTERACTIVE: string; AGENTIC: string; }; private url; private file; private files; private _metaData; protected data?: any; private caption; private tags?; constructor(receiverId: string, file: object | string | Array | any, type: string, receiverType: string); /** * Method to set caption for the media message. * @param {string} text */ setCaption(text: string): void; /** * Method to get caption of the media message. * @returns {string} */ getCaption(): string; /** * Method to get sender of the message. * @returns {User} */ getSender(): User; /** * Method to get receiver of the message. * @returns {User | Group} */ getReceiver(): User | Group; /** * Method to get metadata of the message. * @returns {Object} */ getMetadata(): Object; /** * Method to set metadata of the message. * @param {Object} metadata */ setMetadata(metadata: Object): void; /** * Method to get data of the message. * @returns {Object} */ getData(): Object; /** * Method to set data of the message. * @param {Object} value */ setData(value: Object): void; /** * Method to get attachment of media message. * @returns {Attachment} */ getAttachment(): Attachment; /** * Method to set attachment of media message. * @param {Attachment} attachment */ setAttachment(attachment: Attachment): void; /** * Method to get all the attachments of media message. * @returns {Array} */ getAttachments(): Array; /** * Method to set multiple attachments of media message. * @param {Array} attachments */ setAttachments(attachments: Array): void; /** * Method to get URL of the media file. * @returns {string} */ getURL(): string; /** * Get the tags of the message. * @returns {Array} */ getTags(): Array; /** * @param {Array} tags * Set the tags for the message. */ setTags(tags: Array): void; /** * Gets the moderation status of the message. * @description If the message is not moderated, it returns "unmoderated". * If the message is moderated, it returns the status of the moderation. * @returns {ModerationStatus} */ getModerationStatus(): ModerationStatus; } /** * * @module BaseMessage */ export interface Message { } /** *Basic Message Object * * @export * @class BaseMessage */ export class BaseMessage implements Message { protected id?: number; protected conversationId?: string; protected parentMessageId?: number; protected muid?: string; protected sender?: User; protected receiverId?: string; protected receiver?: User | Group; protected data?: object; protected reactions?: ReactionCount[]; protected type?: string; protected category?: MessageCategory; protected receiverType?: string; protected sentAt?: number; protected deliveredAt?: number; protected readAt?: number; protected deliveredToMeAt?: number; protected readByMeAt?: number; protected metadata: Object; protected status?: string; protected receipts?: any[]; protected readReceipts?: MessageReceipt[]; protected deliveryReceipts?: MessageReceipt[]; protected editedAt: number; protected editedBy: string; protected deletedAt: number; protected deletedBy: string; protected replyCount: number; protected rawMessage: Object; protected unreadRepliesCount: number; protected mentionedUsers?: User[]; protected mentionedMe?: boolean; protected quotedMessageId?: number; protected quotedMessage?: BaseMessage; constructor(receiverId: string, messageType: string, receiverType: string, category: MessageCategory); /** * Get unread replies count of the message * @returns {number} */ getUnreadRepliesCount(): number; /** * @param {number} * Set unread replies count of the message */ setUnreadRepliesCount(value: number): void; /** * Get ID of the message * @returns {number} */ getId(): number; /** * @param {number} value * Set ID of the message */ setId(value: number): void; /** * Get conversation ID of the message. * @returns {string} */ getConversationId(): string; /** * @param {string} value * Set conversation ID of the message. */ setConversationId(value: string): void; /** * Get parent message ID of the message. * @returns {number} */ getParentMessageId(): number; /** * @param {number} value * Set parent message ID of the message. */ setParentMessageId(value: number): void; /** * Get MUID of the message. * @returns {string} */ getMuid(): string; /** * @param {string} value * Sets the MUID of the message. */ setMuid(value: string): void; /** * Get sender of the message. * @returns {User} */ getSender(): User; /** * @param {User} value * Set sender of the message. */ setSender(value: User): void; /** * Get receiver of the message. * @returns {User | Group} */ getReceiver(): User | Group; /** * @param {User | Group} value * Set receiver of the message. */ setReceiver(value: User | Group): void; /** * Get receiverID of the message. * @returns {string} */ getReceiverId(): string; /** * @param {string} value * Set receiverId of the message. */ setReceiverId(value: string): void; /** * Get type of the message. * @returns {string} */ getType(): string; /** * @param {string} value * Set type of the message. */ setType(value: string): void; /** * Get receiver type of the message. * @returns {string} */ getReceiverType(): string; /** * @param {string} value * Set the receiver type of the message. */ setReceiverType(value: string): void; /** * Get message's sentAt timestamp. * @returns {number} */ getSentAt(): number; /** * @param {number} value * Set message's sentAt timestamp. */ setSentAt(value: number): void; /** @private */ getStatus(): string; /** @private */ setStatus(value: string): void; /** * Get delivery timestamp of the message. * @returns {number} */ getDeliveredAt(): number; /** * @param {number} deliveredAt * Set delivery timestamp of the message. */ setDeliveredAt(deliveredAt: number): void; /** * Get timestamp of the message at which it was delivered to logged in user. * @returns {number} */ getDeliveredToMeAt(): number; /** * @param {number} deliveredToMeAt * Set timestamp of the message at which it was delivered to logged in user. */ setDeliveredToMeAt(deliveredToMeAt: number): void; /** * Get Timestamp of the when message was read at. * @returns */ getReadAt(): number; /** * @param {number} readAt * Set read timestamp of the message. */ setReadAt(readAt: number): void; /** * Get timestamp of the message at which it was read by the logged in user. * @returns {number} */ getReadByMeAt(): number; /** * @param {number} readByMeAt * Set timestamp of the message at which it was read by the logged in user. */ setReadByMeAt(readByMeAt: number): void; /** * Get category of the message. * @returns {string} */ getCategory(): MessageCategory; /** * @param {string} category * Set category of the message. */ setCategory(category: MessageCategory): void; /** * Get timestamp of the message when it was updated/edited. * @returns */ getEditedAt(): number; /** * @param {number} editedAt * Set timestamp of the message when it was updated/edited. */ setEditedAt(editedAt: number): void; /** * Get UID of the user who edited/updated the message. * @returns */ getEditedBy(): string; /** * @param {string} editedBy * Set UID of the user who edited/updated the message. */ setEditedBy(editedBy: string): void; /** * Get timestamp of the message when it was deleted. * @returns {number} */ getDeletedAt(): number; /** * @param {number} deletedAt * Set timestamp of the message when it was deleted. */ setDeletedAt(deletedAt: number): void; /** * Get UID of the user who deleted the message. * @returns {number} */ getDeletedBy(): string; /** * @param {string} deletedBy * Set UID of the user who deleted the message. */ setDeletedBy(deletedBy: string): void; /** * Get the number of replies of the message. * @returns {number} */ getReplyCount(): number; /** * @param {number} value * Set the number of replies of the message. */ setReplyCount(value: number): void; /** * Get the raw JSON of the message. * @returns */ getRawMessage(): Object; /** * @param {Object} rawMessage * Set the raw JSON of the message. */ setRawMessage(rawMessage: Object): void; /** * @param {User[]} mentionedUsers * Set the array of mentioned users */ setMentionedUsers(mentionedUsers: User[]): void; /** * Get the array of mentioned users * @returns */ getMentionedUsers(): User[]; /** * @param {boolean} hasMentionedMe * Method to set if the user was mentioned in the message */ setHasMentionedMe(hasMentionedMe: boolean): void; /** * Method to check if the user was mentioned in the message * @returns */ hasMentionedMe(): boolean; /** * Method to get data of the message. * @returns {Object} */ getData(): any; /** * Method to set data of the message. * @param {Object} value */ setData(value: object): void; /** * set the array of reactions in message * @param {ReactionCount[]} reactions */ setReactions(reactions: ReactionCount[]): void; /** * Get the array of reactions in message * @returns {ReactionCount[]} */ getReactions(): ReactionCount[]; /** * Get quoted message ID of the message. * @returns {number} */ getQuotedMessageId(): number; /** * @param {number} value * Set quoted message ID of the message. */ setQuotedMessageId(value: number): void; /** * Get quoted message of the message. * @returns {BaseMessage} */ getQuotedMessage(): BaseMessage; /** * @param {BaseMessage} value * Set quoted message of the message. */ setQuotedMessage(value: BaseMessage): void; } /** * * @module TextMessage */ export class TextMessage extends BaseMessage implements Message { /** @private */ static readonly TYPE: string; /** @private */ static readonly RECEIVER_TYPE: { USER: string; GROUP: string; }; /** @private */ static readonly CATEGORY: string; private text?; protected data?: any; private processedText?; private tags?; /** *Creates an instance of TextMessage. * @param {string} receiverUid * @param {string} text * @param {string} senderUid * @param {string} receiverType * @memberof TextMessage */ constructor(receiverId: string, text: string, receiverType: string); /** * Method to get sender of the message. * @returns {User} */ getSender(): User; /** * Method to get receiver of the message. * @returns {User | Group} */ getReceiver(): User | Group; /** * Method to get metadata of the message. * @returns {Object} */ getMetadata(): Object; /** * Method to set metadata of the message. * @param {Object} value */ setMetadata(value: Object): void; /** * Method to get data of the message. * @returns {Object} */ getData(): any; /** * Method to set data of the message. * @param {Object} value */ setData(value: any): void; /** * Method to get text of the message. * @returns {string} */ getText(): string; /** * Method to set text of the message. * @param {string} text */ setText(text: string): void; /** @internal */ setProcessedText(text: string): void; /** @internal */ getProcessedText(): string; /** * Get the tags of the message. * @returns {Array} */ getTags(): Array; /** * @param {Array} tags * Set the tags for the message. */ setTags(tags: Array): void; /** * Gets the moderation status of the message. * @description If the message is not moderated, it returns "unmoderated". * If the message is moderated, it returns the status of the moderation. * @returns {ModerationStatus} */ getModerationStatus(): ModerationStatus; } export const constants: { DEFAULT_STORE: string; MSG_VER_PRE: string; MSG_VER_POST: string; }; export const DEFAULT_VALUES: { ZERO: number; MSGS_LIMIT: number; REACTIONS_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; REACTIONS_MAX_LIMIT: number; }; export const CALLING_COMPONENT_VERSION = 5; export enum GroupType { Public = "public", Private = "private", Protected = "protected", Password = "password" } export const GROUP_TYPE: { PUBLIC: string; PRIVATE: string; PROTECTED: string; PASSWORD: string; }; export enum GroupMemberScope { Admin = "admin", Moderator = "moderator", Member = "member" } export enum StorageMode { LOCAL = "local", SESSION = "session" } export const GROUP_MEMBER_SCOPE: { ADMIN: string; MODERATOR: string; PARTICIPANT: string; }; export const APPINFO: { platform: string; sdkVersion: string; apiVersion: string; sdkVersionWithUnderScore: string; }; export const SDKHeader: { platform: string; sdkVersion: string; sdk: string; }; export const WS: { CONVERSATION: { TYPE: { CHAT: string; GROUP_CHAT: string; }; }; }; export const ANALYTICS: { analyticsHost: string; analyticsVersion: string; }; export 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_SESSION_ID: string; KEY_MESSAGE_LISTENER_LIST: string; }; export const ResponseConstants: { RESPONSE_KEYS: { KEY_DATA: string; KEY_META: string; KEY_CURSOR: string; KEY_NEXT: string; KEY_PREVIOUS: 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_REACTIONS: 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; }; KEY_CONVERSATION_STARTER: string; KEY_SMART_REPLIES: string; KEY_CONVERSATION_SUMMARY: string; KEY_BOT_REPLY: string; }; }; export 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; }; export 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; }; export const MessageConstatnts: { TYPE: { TEXT: string; MEDIA: string; IMAGE: string; VIDEO: string; AUDIO: string; FILE: string; CUSTOM: string; ASSISTANT: string; TOOL_RESULT: string; TOOL_ARGUMENTS: string; }; CATEGORY: { MESSAGE: string; ACTION: string; CALL: string; CUSTOM: string; INTERACTIVE: string; AGENTIC: 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; MENTIONS: string; INTERACTIVE_DATA: string; INTERACTION_GOAL: string; INTERACTIONS: string; ALLOW_SENDER_INTERACTION: string; ELEMENT_ID: string; INTERACTED_AT: string; ELEMENT_IDS: string; RUN_ID: string; THREAD_ID: string; TOOL_CALLS: string; FUNCTION: string; NAME: string; ARGUMENTS: string; TOOL_CALL_ID: string; DISPLAY_NAME: string; EXECUTION_TEXT: string; }; KNOWN_MEDIA_TYPE: { IMAGE: any[]; VIDEO: any[]; AUDIO: any[]; FILE: any[]; }; 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; MENTIONS_WITH_TAG_INFO: string; MENTIONS_WITH_BLOCKED_INFO: string; ONLY_INTERACTION_GOAL_COMPLETED: string; HAS_ATTACHMENTS: string; HAS_LINKS: string; HAS_MENTIONS: string; HAS_REACTIONS: string; MENTIONED_UIDS: string; ATTACHMENT_TYPES: string; WITH_PARENT: string; HIDE_QUOTED_MESSAGES: string; }; }; }; export const ATTACHMENTS_CONSTANTS: { KEYS: { EXTENSION: string; MIME_TYPE: string; NAME: string; SIZE: string; URL: string; }; }; export enum MessageCategory { ACTION = "action", MESSAGE = "message", CALL = "call", CUSTOM = "custom", INTERACTIVE = "interactive", AGENTIC = "agentic" } export enum GoalType { ANY_ACTION = "anyAction", ANY_OF = "anyOf", ALL_OF = "allOf", NONE = "none" } export const TYPING_NOTIFICATION: { RECEIVER_ID: string; RECEIVER_TYPE: string; META: string; KEYS: { TYPING_NOTIFICATION: string; TIMESTAMP: string; }; ACTIONS: { STARTED: string; ENDED: string; }; }; export 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; }; }; export const BlockedUsersConstants: { REQUEST_KEYS: { DIRECTIONS: { BOTH: string; HAS_BLOCKED_ME: string; BLOCKED_BY_ME: string; }; }; }; export const CallConstants: { CALL_MODE: { DEFAULT: string; SPOTLIGHT: string; SINGLE: string; TILE: string; GRID: string; }; CALL_TYPE: { AUDIO: string; VIDEO: string; }; RECEIVER_TYPE_GROUP: string; RECEIVER_TYPE_USER: string; CALL_KEYS: { CALL_DATA: string; CALL_ID: string; CALL_SESSION_ID: string; CALL_RECEIVER: string; CALL_SENDER: string; CALL_RECEIVER_TYPE: string; CALL_STATUS: string; CALL_TYPE: string; CALL_INITIATED_AT: string; CALL_JOINED_AT: string; CALL_LEFT_AT: string; CALL_METADATA: string; CALL_ENTITIES: string; CALL_ENTITY_TYPE: string; CALL_ENTITY: string; CALL_ENTITY_USER: string; CALL_ENTITY_GROUP: string; }; CALL_STATUS: { INITIATED: string; ONGOING: string; UNANSWERED: string; REJECTED: string; BUSY: string; CANCELLED: string; ENDED: string; }; AUDIO_INPUT_DEVICES: string; AUDIO_OUTPUT_DEVICES: string; VIDEO_INPUT_DEVICES: string; POST_MESSAGES: { TYPES: { ACTION_MESSAGE: string; HANGUP: string; COMETCHAT_RTC_SETTINGS: string; }; ACTIONS: { USER_JOINED: string; USER_LEFT: string; USER_LIST_CHANGED: string; INITIAL_DEVICE_LIST: string; DEVICE_CHANGE: string; LOAD: string; CHANGE_AUDIO_INPUT: string; CHANGE_AUDIO_OUTPUT: string; CHANGE_VIDEO_INPUT: string; MUTE_AUDIO: string; UNMUTE_AUDIO: string; PAUSE_VIDEO: string; UNPAUSE_VIDEO: string; SWITCH_MODE: string; START_SCREENSHARE: string; STOP_SCREENSHARE: string; END_CALL: string; START_RECORDING: string; STOP_RECORDING: string; RECORDING_TOGGLED: string; USER_MUTED: string; SCREEN_SHARE_STARTED: string; SCREEN_SHARE_STOPPED: string; SWITCH_TO_VIDEO_CALL: string; SWITCHED_TO_VIDEO_CALL: string; OPEN_VIRTUAL_BACKGROUND: string; SET_BACKGROUND_BLUR: string; SET_BACKGROUND_IMAGE: string; }; }; MEDIA_DEVICE: { ID: string; NAME: string; ACTIVE: string; }; ZOOM_BUTTON_DEFAULT_PARAMS: { position: string; visible: boolean; }; NAME_LABEL_DEFAULT_PARAMS: { position: string; visible: boolean; color: string; }; NETWORK_LABEL_DEFAULT_PARAMS: { position: string; visible: boolean; }; MAIN_VIDEO_CONTAINER_SETTINGS: { KEYS: { POSITION: string; VISIBILITY: string; COLOR: string; }; }; }; export 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; }; }; export const GroupMemersConstans: { KEYS: { SCOPE: string; UID: string; GUID: string; USER: string; NAME: string; }; }; export 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; }; }; export 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; }; export 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 const PARAMETER_ERROR: { PARAMETER_REQUIRED: { code: string; name: string; message: string; details: {}; }; }; export const GENERAL_ERROR: { MUST_BE_A_STRING: { code: string; name: string; message: string; details: {}; }; MUST_BE_A_NUMBER: { code: string; name: string; message: string; details: {}; }; MUST_BE_A_OBJECT: { code: string; name: string; message: string; details: {}; }; MUST_BE_AN_ARRAY: { code: string; name: string; message: string; details: {}; }; MUST_BE_A_BOOLEAN: { code: string; name: string; message: string; details: {}; }; MUST_BE_A_BLOB: { code: string; name: string; message: string; details: {}; }; INVALID: { code: string; name: string; message: string; details: {}; }; METHOD_COMPULSORY: { code: string; name: string; message: string; details: {}; }; LIMIT_EXCEEDED: { code: string; name: string; message: string; details: {}; }; MUST_BE_A_POSITIVE_NUMBER: { code: string; name: string; message: string; details: {}; }; INVALID_MEDIA_FILE: { code: string; name: string; message: string; details: {}; }; EMPTY_STRING: { code: string; name: string; message: string; details: {}; }; MISSING_KEY: { code: string; name: string; message: string; details: {}; }; EMPTY_ARRAY: { code: string; name: string; message: string; details: {}; }; INVALID_SEARCH_KEYWORD: { code: string; name: string; message: string; details: {}; }; INVALID_GROUP_PROPERTY: { code: string; name: string; message: string; details: {}; }; INVALID_USER_PROPERTY: { code: string; name: string; message: string; details: {}; }; PARAMETER_MUST_BE_A_NUMBER: { code: string; name: string; message: string; details: {}; }; PARAMETER_MUST_BE_AN_ARRAY: { code: string; name: string; message: string; details: {}; }; PARAMETER_MUST_BE_A_BOOLEAN: { code: string; name: string; message: string; details: {}; }; PARAMETER_MUST_BE_A_POSITIVE_NUMBER: { code: string; name: string; message: string; details: {}; }; PARAMETER_MUST_BE_A_STRING: { code: string; name: string; message: string; details: {}; }; PARAMETER_COMPULSORY: { code: string; name: string; message: string; details: {}; }; PASSWORD_COMPULSORY: { code: string; name: string; message: string; details: {}; }; INVALID_ARRAY: { code: string; name: string; message: string; details: {}; }; }; export 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: {}; }; }; export const UserErrors: { INVALID_STATUS: CometChatException; INVALID_DIRECTION: CometChatException; USER_NOT_LOGGED_IN: CometChatException; }; export const GroupErrors: { NOT_A_GROUP: CometChatException; INVALID_SCOPE: CometChatException; INVALID_GROUP_TYPE: CometChatException; }; export const ConversationErrors: { INVALID_CONVERSATION_TYPE: { code: string; name: string; message: string; details: string; }; CONVERSATION_NOT_FOUND: { code: string; name: string; message: string; details: string; }; }; export const AIErrors: { NO_CONVERSATION_STARTER: { code: string; name: string; message: string; details: string; }; NO_SMART_REPLY: { code: string; name: string; message: string; details: string; }; NO_CONVERSATION_SUMMARY: { code: string; name: string; message: string; details: string; }; NO_ASSISTANCE: { code: string; name: string; message: string; details: string; }; }; export const ExtensionErrors: { INVALID_EXTENSION: { code: string; name: string; message: string; details: {}; }; EXTENSION_NOT_FOUND: { code: string; name: string; message: string; details: {}; }; }; export const AIFeatureError: { INVALID_AI_FEATURE: { code: string; name: string; message: string; details: {}; }; }; export const MessageErrors: { INVALID_RECEIVER_TYPE: { code: string; name: string; message: string; details: string; }; }; export const FeatureRestrictionErrors: { INVALID_FEATURE: { code: string; name: string; message: string; details: {}; }; FEATURE_NOT_FOUND: { code: string; name: string; message: string; details: {}; }; }; /** * @deprecated Use `PresenceConstants` instead. */ export const PresenceConstatnts: { STATUS: { ONLINE: string; AVAILABLE: string; OFFLINE: string; JOINED: string; LEFT: string; }; }; export const PresenceConstants: { STATUS: { ONLINE: string; AVAILABLE: string; OFFLINE: string; JOINED: string; LEFT: string; }; }; export 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; WEBRTC_WEB_FRONTEND_HOST: string; WEBRTC_WEB_FRONTEND_VERSION: string; SECURED_MEDIA_HOST: string; PARAMETERS: string; CORE_CONVERSATIONS_UPDATE_ON_CALL_ACTIVITIES: string; CORE_CONVERSATIONS_UPDATE_ON_GROUP_ACTIONS: string; CORE_CONVERSATIONS_UPDATE_ON_CUSTOM_MESSAGES: string; CORE_CONVERSATIONS_UPDATE_ON_REPLIES: string; FLAG_REASONS: string; }; }; export const COMMON_UTILITY_CONSTANTS: { TYPE_CONSTANTS: { BOOLEAN: string; STRING: string; OBJECT: string; NUMBER: string; }; }; export const CONNECTION_STATUS: { CONNECTED: string; CONNECTING: string; DISCONNECTED: string; FEATURE_THROTTLED: string; }; export const SESSION_STORE: { SESSION_ID: string; }; export enum REACTION_ACTION { REACTION_ADDED = "message_reaction_added", REACTION_REMOVED = "message_reaction_removed" } export const API_ERROR_CODES: { AUTH_ERR_AUTH_TOKEN_NOT_FOUND: string; }; export const PROSODY_API: { DOMAIN_PREFIX: string; PATH: { ROOM: string; ROOM_SIZE: string; SESSIONS: string; }; RESPONSE: { PARTICIPANTS: string; }; QUERY_PARAMETERS: { DOMAIN: string; ROOM: string; }; }; export const ProsodyApiErrors: { INVALID_SESSIONID: { code: string; name: string; message: string; details: string; }; INVALID_TYPE: { code: string; name: string; message: string; details: string; }; }; export const JWT_API: { KEYS: { PASSTHROUGH: string; EXPAND: string; }; }; export 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; }; }; }; export const ADDITIONAL_CONSTANTS: { SECURE_URL_PROPERTY: string; }; export const AI_FEATURE_ACCESSIBLE = "features.ai.accessible"; export const AI_FEATURE_ENABLED = "features.ai.enabled"; export const AI_SLUG_ACCESSIBLE = "features.ai.%s.accessible"; export const AI_SLUG_ENABLED = "features.ai.%s.enabled"; export enum AttachmentType { IMAGE = "image", VIDEO = "video", AUDIO = "audio", FILE = "file" } export enum ModerationStatus { PENDING = "pending", APPROVED = "approved", DISAPPROVED = "disapproved", UNMODERATED = "unmoderated" } export const AI_ASSISTANT_EVENTS: { RUN_STARTED: string; RUN_FINISHED: string; TEXT_MESSAGE_START: string; TEXT_MESSAGE_END: string; TEXT_MESSAGE_CONTENT: string; TOOL_CALL_STARTED: string; TOOL_CALL_ENDED: string; TOOL_CALL_RESULT: string; TOOL_CALL_ARGUMENT: string; }; export interface FlagReason { id: string; name: string; description: string; default?: boolean; createdAt: number; updatedAt: number; } /** * * @module Group */ export class Group { /** @private */ static readonly TYPE: typeof GroupType; /** @private */ static readonly Type: typeof GroupType; private guid; private name; private type; private password; private icon; private description; private owner; private metadata; private createdAt; private updatedAt; private hasJoined; private wsChannel; private scope; private joinedAt; private membersCount; private tags; private isBanned; /** * Creates an instance of Group. * @param {string} guid * @param {string} name * @param {GroupType} type * @param {string} [passsword] * @param {string} [icon] * @param {string} [description] * @memberof Group */ constructor(guid: string, name?: string, type?: GroupType | string, passsword?: string, icon?: string, description?: string, hasJoined?: boolean); /** * Method to get GUID of the group. * @returns {string} */ getGuid(): string; /** * Method to set GUID of the group. * @param {string} guid */ setGuid(guid: string): void; /** * Method to get name of the group. * @returns {string} */ getName(): string; /** * Method to set name of the group. * @param {string} name */ setName(name: string): void; /** * Method to get the type of the group. * @returns {GroupType | string} */ getType(): GroupType | string; /** * Method to set the type of the group. * @param {GroupType | string} type */ setType(type: GroupType | string): void; /** * Method to get password of the group. * @returns {string} */ getPassword(): string; /** * Method to set password of the group. * @param {string} password */ setPassword(password: string): void; /** * Method to get icon of the group. * @returns {string} */ getIcon(): string; /** * Method to set icon of the group. * @param {string} icon */ setIcon(icon: string): void; /** * Method to get description of the group. * @returns {string} */ getDescription(): string; /** * Method to set description of the group. * @param {string} description */ setDescription(description: string): void; /** * Method to get owner of the group. * @returns {string} */ getOwner(): string; /** * Method to set owner of the group. * @param {string} owner */ setOwner(owner: string): void; /** * Method to get metadata of the group. * @returns {object} */ getMetadata(): object; /** * Method to set metadata of the group. * @param {object} metadata */ setMetadata(metadata: object): void; /** * Method to get the created at timestamp of the group. * @returns {number} */ getCreatedAt(): number; /** * Method to set the created at timestamp of the group. * @param {number} createdAt */ setCreatedAt(createdAt: number): void; /** * Method to get the updated at timestamp of the group. * @returns {number} */ getUpdatedAt(): number; /** * Method to set updated at timestamp of the group. * @param {number} updatedAt */ setUpdatedAt(updatedAt: number): void; /** * Method to get the joinedAt of the group. * @returns {boolean} */ getHasJoined(): boolean; /** * Method to set the joinedAt of the group. * @param {boolean} hasJoined */ setHasJoined(hasJoined: boolean): void; /** @private */ getWsChannel(): any; /** @private */ setWsChannel(wsChannel: any): void; /** * Method to set scope of the logged-in user in the group. * @param {string} scope */ setScope(scope: string): void; /** * Method to get scope of the logged-in user. * @returns {string} */ getScope(): string; /** * Method to get joinedAt timestamp of the logged-in user. * @returns {string} */ getJoinedAt(): string; /** * Method to set joinedAt timestamp of the logged-in user in the group. * @param {string} joinedAt */ setJoinedAt(joinedAt: string): void; /** * Method to get members count of the group. * @returns {number} */ getMembersCount(): number; /** * Method to set members count of the group. * @param {number} membersCount */ setMembersCount(membersCount: number): void; /** * Method to set tags of the group. * @param {string[]} tags */ setTags(tags: Array): void; /** * Method to get tags of the group. * @returns {string[]} */ getTags(): Array; /** * Method to check if the logged-in user is banned from the group or not. * @returns {boolean} status of the logged-in user as banned or not. */ isBannedFromGroup(): boolean; } export class MessageListener { /** * This event is triggered when a text message is received. */ onTextMessageReceived?: Function; /** * This event is triggered when a media message is received. */ onMediaMessageReceived?: Function; /** * This event is triggered when a custom message is received. */ onCustomMessageReceived?: Function; /** * This event is triggered when someone start typing. */ onTypingStarted?: Function; /** * This event is triggered when someone stops typing. */ onTypingEnded?: Function; /** * This event is triggered when a message is delivered. */ onMessagesDelivered?: Function; /** * This event is triggered when a message is read. */ onMessagesRead?: Function; /** * This event is triggered when a message is edited. */ onMessageEdited?: Function; /** * This event is triggered when a message is deleted. */ onMessageDeleted?: Function; /** * This event is triggered when a transient message is received. */ onTransientMessageReceived?: Function; /** * This event is triggered when a interactive message is received. */ onInteractiveMessageReceived?: Function; /** * This event is triggered when a interaction goal is completd . */ onInteractionGoalCompleted?: Function; /** * This event is triggered when a reaction is added. */ onMessageReactionAdded?: Function; /** /** * This event is triggered when a reaction is removed. */ onMessageReactionRemoved?: Function; /** * This event is triggered when a message is delivered to all members in a group. */ onMessagesDeliveredToAll?: Function; /** * This event is triggered when a message is read by all members in a group. */ onMessagesReadByAll?: Function; /** * This event is triggered when a message is moderated. */ onMessageModerated?: Function; /** * This event is triggered when an AI tool result is received. */ onAIToolResultReceived?: Function; /** * This event is triggered when an AI tool argument is received. */ onAIToolArgumentsReceived?: Function; /** * This event is triggered when an AI assistant message is received. */ onAIAssistantMessageReceived?: Function; constructor(...args: any[]); } export class CallListener { /** * This event is triggered when an incoming call is received. */ onIncomingCallReceived?: Function; /** * This event is triggered when an outgoing call is accepted. */ onOutgoingCallAccepted?: Function; /** * This event is triggered when an outgoing call is rejected. */ onOutgoingCallRejected?: Function; /** * This event is triggered when an incoming call is cancelled. */ onIncomingCallCancelled?: Function; /** * This event is triggered when call is ended. */ onCallEndedMessageReceived?: Function; constructor(...args: any[]); } export class AIAssistantListener { /** * This event is triggered when an AI assistant event is received. * @param event - The AI assistant event that was received */ onAIAssistantEventReceived?: (event: AIAssistantBaseEvent) => void; constructor(...args: any[]); } export class UserListener { /** * This event is triggered when a user comes online. */ onUserOnline?: Function; /** * This event is triggered when a user goes offline. */ onUserOffline?: Function; constructor(...args: any[]); } export class GroupListener { /** * This event is triggered when a user joins a group. */ onGroupMemberJoined?: Function; /** * This event is triggered when a group member leaves the group. */ onGroupMemberLeft?: Function; /** * This event is triggered when a group member is kicked from the group. */ onGroupMemberKicked?: Function; /** * This event is triggered when a group member is banned from the group. */ onGroupMemberBanned?: Function; /** * This event is triggered when a group member is unbanned from the group. */ onGroupMemberUnbanned?: Function; /** * This event is triggered when scope of a group member is changed. */ onGroupMemberScopeChanged?: Function; /** * This event is triggered when a user is added in the group. */ onGroupMemberAddedToGroup: Function; constructor(...args: any[]); } export class OngoingCallListener { /** * @internal */ onYouLeft?: Function; /** * @internal */ onYouJoined?: Function; /** * This event is triggered when a user joins the call. */ onUserJoined?: Function; /** * This event is triggered when a user leaves the call. */ onUserLeft?: Function; /** * This event is triggered when the participant list of the call changes. */ onUserListUpdated?: Function; /** * This event is triggered when the media device list changes. */ onMediaDeviceListUpdated?: Function; /** * This event is triggered when someone starts recording the call. */ onRecordingStarted?: Function; /** * This event is triggered when someone stops recording the call. */ onRecordingStopped?: Function; /** * This event is triggered when someone starts sharing their screen in the call. */ onScreenShareStarted?: Function; /** * This event is triggered when someone stops sharing their screen in the call. */ onScreenShareStopped?: Function; /** * This event is triggered when a user is muted. */ onUserMuted?: Function; /** * This event is triggered when an audio call is switched to a video call. */ onCallSwitchedToVideo?: Function; /** * This event is triggered when the call is ended. */ onCallEnded?: Function; /** * This event is triggered when an error occurs. */ onError?: Function; constructor(...args: any[]); } export class LoginListener { /** * This event is triggered when the user login is successful. */ loginSuccess?: Function; /** * This event is triggered when the user login fails. */ loginFailure?: Function; /** * This event is triggered when the user logout is successful. */ logoutSuccess?: Function; /** * This event is triggered when the user logout fails. */ logoutFailure?: Function; constructor(...args: any[]); } export class ConnectionListener { /** * This event is triggered when the WebSocket connection is in connected state. */ onConnected?: Function; /** * This event is triggered when the WebSocket connection is in connecting state. */ inConnecting?: Function; /** * This event is triggered when the WebSocket connection is in disconnected state. */ onDisconnected?: Function; /** * This event is triggered when the WebSocket connection is in feature throttled state. */ onFeatureThrottled?: Function; constructor(...args: any[]); } /** @internal */ export interface EventListener { _name: string; _eventListener?: MessageListener | UserListener | OngoingCallListener | CallListener | GroupListener | LoginListener | ConnectionListener | AIAssistantListener; } /** @internal */ export class Listener implements EventListener { _name: string; _callback: Function; constructor(name: string, callback: Function); } /** @internal */ export class MessagesListener extends Listener implements EventListener { _cursor?: number; _eventListener: MessageListener; constructor(name: string, messageEventListener?: MessageListener, cursor?: number, callback?: Function); } /** @internal */ export class UsersListener extends Listener implements EventListener { _cursor?: number; _eventListener: UserListener; constructor(name: string, userEventHandler?: UserListener, cursor?: number, callback?: Function); } /** @internal */ export class GroupsListener extends Listener implements EventListener { _cursor?: number; _eventListener: GroupListener; constructor(name: string, groupEventHandler?: GroupListener, cursor?: number, callback?: Function); } /** @internal */ export class UserCallListener extends Listener implements EventListener { _cursor?: number; _eventListener: OngoingCallListener; constructor(callEventHandler?: OngoingCallListener, cursor?: number, callback?: Function); } /** @internal */ export class CallsListener extends Listener implements EventListener { _cursor?: number; _eventListener: CallListener; constructor(name: string, callEventListner?: CallListener, cursor?: number, callback?: Function); } /** @internal */ export class UserLoginListener extends Listener implements EventListener { _cursor?: number; _eventListener: LoginListener; constructor(name: string, loginEventHandler?: LoginListener, cursor?: number, callback?: Function); } /** @internal */ export class AssistantsListener extends Listener implements EventListener { _cursor?: number; _eventListener: AIAssistantListener; constructor(name: string, aiEventHandler?: AIAssistantListener, cursor?: number, callback?: Function); } /** @internal */ export class WSConnectionListener extends Listener implements EventListener { _cursor?: number; _eventListener: ConnectionListener; constructor(name: string, connectionEventHandler?: ConnectionListener, cursor?: number, callback?: Function); } /** * * @module Call */ export class Call extends BaseMessage implements Message { static readonly TYPE: { TEXT: string; MEDIA: string; IMAGE: string; VIDEO: string; }; static readonly RECEIVER_TYPE: { USER: string; GROUP: string; }; static readonly CATEGORY: { MESSAGE: string; ACTION: string; CALL: string; CUSTOM: string; INTERACTIVE: string; }; static readonly 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; }; protected metadata: any; protected action: string; protected rawData: string; protected initiatedAt: number; protected joinedAt: number; protected data: any; protected callInitiator: User; protected callReceiver: User | Group; /** * @memberof {@link CometChat | CometChat } * @param receiverId * @param type * @param receiverType * @param category */ constructor(receiverId: any, type: any, receiverType: any, category?: any); /** * Get call initiator entity(User) * @returns {User} */ getCallInitiator(): User; /** * @param {User} user * Set details of the call initiator. */ setCallInitiator(user: User): void; /** * Get call receiver entity(User/Group) * @returns {User | Group} */ getCallReceiver(): Group | User; /** * @param {User | Group} receiver * Set details of the call receiver. */ setCallReceiver(receiver: User | Group): void; /** @internal */ getData(): object; /** @internal */ setData(data: object): void; /** * Get unique session id of the call message. * @returns {string} */ getSessionId(): string; /** * @param {string} sessionId * Set unique session id of the call message. */ setSessionId(sessionId: string): void; /** * Get JSONObject of data set by developer. * @returns */ getMetadata(): object; /** * @param {object} metadata * Set metadata of the call message. */ setMetadata(metadata: object): void; /** * Get sender of the message. * @returns {User} */ getSender(): User; /** * Get action of call. * @returns {string} */ getAction(): string; /** * @param {string} action * Set action of call. */ setAction(action: string): void; /** * Get Call initiated timestamp. * @returns {number} */ getInitiatedAt(): number; /** * @param {number} initiatedAt * Set call initiated timestamp. */ setInitiatedAt(initiatedAt: number): void; /** * Get Call join timestamp. * @returns {number} */ getJoinedAt(): number; /** * @param {number} joinedAt * Set call join timestamp. */ setJoinedAt(joinedAt: number): void; /** * Get raw JSON data of the call message. * @returns {any} */ getRawData(): any; /** * @param {any} rawData * Set raw JSON data of the call message. */ setRawData(rawData: any): void; /** * @internal * @param {string} receiverUid * @param {string} text * @param {string} senderUid * @param {string} receiverType * @memberof Actions */ static callFromJSON(rawMessage: any): Call | Message; } export class CallController { /** @internal */ TAG: string; /** @private */ static callController: CallController; /** @internal */ getCallListner(): UserCallListener; /** @internal */ setCallListner(callEventHandler: OngoingCallListener): void; static getInstance(): CallController; /** * returns the ongoing call object or null|undefined * * @internal * @returns {Call} * @memberof CallController */ getActiveCall(): Call; /** * Initialize the call. * * @internal * @param {Call} call * @param {number} [timeout] - Optional call timeout in seconds. Defaults to {@link DEFAULT_TIMEOUT} seconds. * @returns {Promise} * @memberof CallController */ initiateCall(call: Call, timeout?: number): Promise; /** * @internal * Method to clear timer. */ clearTimer(): void; /** *End the onGoing call * * @internal * @param {boolean} [isInternal] * @memberof CallController */ endCall(isInternal?: boolean): void; /** @internal */ onCallStarted(call: Call): Promise; /** @internal */ clearActiveCall(): void; /** @internal */ endCallSession(): void; /** @internal */ startCall(callsettings: CallSettings, view: HTMLElement): void; /** @internal */ addListener(): void; /** @internal */ removeListener(): void; /** @internal */ handler(message: any): void; /** * Method to get all the available audio input devices. * @returns {MediaDevice[]} */ getAudioInputDevices(): MediaDevice[]; /** * Method to get all the available audio output devices. * @returns {MediaDevice[]} */ getAudioOutputDevices(): MediaDevice[]; /** * Method to get all the available video input devices. * @returns {MediaDevice[]} */ getVideoInputDevices(): MediaDevice[]; /** * Method to change the audio input devices. * @param {string} deviceId * @returns {MediaDevice[]} */ setAudioInputDevice(deviceId: string): void; /** * Method to change the audio output devices. * @param {string} deviceId * @returns {MediaDevice[]} */ setAudioOutputDevice(deviceId: string): void; /** * Method to change the video input devices. * @param {string} deviceId * @returns {MediaDevice[]} */ setVideoInputDevice(deviceId: string): void; /** * Method to mute/unmute audio stream. * @param {boolean} muteAudio */ muteAudio(muteAudio: boolean): void; /** * Method to pause/unpause video stream. * @param {boolean} pauseVideo */ pauseVideo(pauseVideo: boolean): void; /** * Method to set mode. * @param mode */ setMode(mode: any): void; /** * Method to start screen share. */ startScreenShare(): void; /** * Method to stop screen share. */ stopScreenShare(): void; /** * Method to start call recording. */ startRecording(): void; /** * Method to stop call recording. */ stopRecording(): void; /** * Method to switch an audio call to video call. */ switchToVideoCall(): void; /** * Method to open the virtual background settings. */ openVirtualBackground(): void; /** * Method to set the background blur. This method takes number as input which decides the blur level of the background. */ setBackgroundBlur(blurLevel: number): void; /** * Method to set the background image. This method takes either a URL or file Object & sets that image as the background. */ setBackgroundImage(image: string | Object): void; /** @internal */ endSession(): void; } /** * * @module Action */ export class Action extends BaseMessage implements Message { static readonly TYPE: { TEXT: string; MEDIA: string; IMAGE: string; VIDEO: string; AUDIO: string; FILE: string; CUSTOM: string; ASSISTANT: string; TOOL_RESULT: string; TOOL_ARGUMENTS: string; }; static readonly RECEIVER_TYPE: { USER: string; GROUP: string; }; static readonly CATEGORY: { MESSAGE: string; ACTION: string; CALL: string; CUSTOM: string; INTERACTIVE: string; AGENTIC: string; }; static readonly 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; }; protected data?: any; protected actionBy: User | Group | BaseMessage; protected actionFor: User | Group | BaseMessage; protected actionOn: User | Group | BaseMessage; protected message: string; protected rawData: any; protected action: string; protected oldScope: string; protected newScope: string; /** * @internal */ static actionFromJSON(rawMessage: any): Action | Message; /** * Method to get old scope of a member. * @returns {string} */ getOldScope(): string; /** * @param {string} oldScope * Method to set old scope of a member. */ setOldScope(oldScope: string): void; /** * Method to get new scope of a member. * @returns {string} */ getNewScope(): string; /** * @param {string} newScope * Method to set new scope of a member. */ setNewScope(newScope: string): void; /** * Method to get raw JSON data in string. * @returns {string} */ getRawData(): any; /** * @param {any} rawData * Method to set raw JSON data. */ setRawData(rawData: any): void; /** * Method to get the default action message. * @returns {string} */ getMessage(): string; /** * @param {string} message * Method to set the default action message. */ setMessage(message: string): void; /** * Method to get the action which is being performed. * @returns {string} */ getAction(): string; /** * @param {string} action * Method to set the default action message. */ setAction(action: string): void; /** * Method to get the sender of the action message. * @returns {string} */ getSender(): User; /** * Method to get the entity which performed the action. * @returns {User | Group | BaseMessage} */ getActionBy(): User | Group | BaseMessage; /** * @param {User | Group | BaseMessage} by * Method to set the entity which performed the action. */ setActionBy(by: User | Group | BaseMessage): void; /** * Method to get the entity on which the action was performed. * @returns {User | Group | BaseMessage} */ getActionOn(): User | Group | BaseMessage; /** * @param {User | Group | BaseMessage} on * Method to set the entity on which the action was performed. */ setActionOn(on: User | Group | BaseMessage): void; /** * Method to get the entity for whom the action was performed. * @returns {User | Group | BaseMessage | any} */ getActionFor(): User | Group | BaseMessage | any; /** * @param {User | Group | BaseMessage} for * Method to set the entity for whom the action was performed. */ setActionFor(actionFor: User | Group | BaseMessage): void; /** * Method to get the metadata of the action message. * @returns {object} */ getMetadata(): object; /** * @param {object} metadata * Method to get the metadata of the action message. */ setMetadata(metadata: object): void; } export class GroupsRequest { constructor(builder?: GroupsRequestBuilder); /** * Get list of next set of groups based on the parameters specified in GroupsRequestBuilder class The Developer need to call this method repeatedly using the same object of GroupsRequest class to get paginated list of groups. * @returns {Promise} */ fetchNext(): Promise; /** * Gets the limit on the number of groups to be fetched in a single operation. * * @return {number} */ getLimit(): number; /** * Gets the search keyword used to filter the groups by their name or GUID. * Only groups whose names or GUIDs contain this keyword will be fetched. * * @return {string} */ getSearchKeyword(): string; /** * Gets the flag indicating whether only the groups the user has joined should be fetched. * * @return {boolean} */ isJoinedOnly(): any; /** * Gets the list of tags used to filter the groups. * Only groups associated with these tags will be fetched. * * @return {String[]} */ getTags(): String[]; /** * Gets the flag indicating whether tags should be included with the groups data. * * @return {boolean} */ isWithTags(): boolean; /** * Get the current page number that the request is on. * * @return {number} */ getPage(): number; } export class GroupsRequestBuilder { /** @private */ limit: number; /** @private */ searchKeyword: string; /** @private */ hasJoined: boolean; /** @private */ tags: Array; /** @private */ showTags: boolean; /** @private */ page: number; /** * * @param {number} limit * A method to set limit for the number of Groups returned in a single iteration. A maximum of 100 groups can fetched in a single iteration. * @returns */ setLimit(limit: number): this; /** * * @param {string} searchKeyword * A method to set the search string based on which the groups are to be fetched. * @returns */ setSearchKeyword(searchKeyword: string): this; /** * A method to fetch only joined groups. * @param {boolean} hasJoined * @returns */ joinedOnly(hasJoined: boolean): this; /** * * @param {string[]} tags * A method to set the tags based on which the groups are to be fetched. * @returns */ setTags(tags: Array): this; /** * * @param {boolean} withTags * A method to get the tags along with the other details of the groups. * @returns */ withTags(withTags: boolean): this; /** * * @param {number} page * A method to set the page number to start fetching from. Page 0 will fetch the first page. * @returns */ setPage(page: number): this; /** * This method will return an object of the GroupsRequest class. * @returns {GroupsRequest} */ build(): GroupsRequest; } export class GroupMembersRequest { static USER_STATUS: { ONLINE: string; OFFLINE: string; }; constructor(builder: GroupMembersRequestBuilder); /** * Get list of next set of group members based on the parameters specified in GroupMembersRequestBuilder class. The Developer need to call this method repeatedly using the same object of GroupMembersRequest class to get paginated list of group members. * @returns {Promise} */ fetchNext(): Promise; /** * Get the unique identifier of the group for which members are requested. * * @return {string}. */ getGuid(): string; /** * Get the maximum number of group members to fetch in a single operation. * * @return {number} */ getLimit(): number; /** * Gets the search keyword used to filter the group members by name or UID. * * @return {string} */ getSearchKeyword(): string; /** * Gets the list of scopes used to filter banned group members based on specific criteria. * The scopes define the categories or roles of the group members to be fetched. * * @return {String[]} */ getScopes(): String[]; /** * Get the current page number that the request is on. * * @return {number} */ getPage(): number; /** * Gets the status filter used to fetch members based on their online or offline status. * * @return {string} */ getStatus(): string; /** * @internal */ getNextData(): any; } export class GroupMembersRequestBuilder { /** @private */ limit: number; /** @private */ searchKeyword: string; /** @private */ guid: string; /** @private */ scopes?: Array; /** @private */ page: number; /** @private */ status: string; constructor(guid: string); /** * Set the unique identifier of the group. * * @param guid The group ID to set. * @returns */ setGuid(guid: string): this; /** * * @param {number} limit * A method to set limit for the number of group members returned in a single iteration. A maximum of 100 group members can fetched in a single iteration. * @returns */ setLimit(limit: number): this; /** * * @param {string} searchKeyword * A method to set the search string based on which the group members are to be fetched. * @returns */ setSearchKeyword(searchKeyword: string): this; /** * * @param {string[]} scopes * A method to set the search group members based on their scope. * @returns */ setScopes(scopes: Array): this; /** * * @param {number} page * A method to set the page number to start fetching from. Page 0 will fetch the first page. * @returns */ setPage(page: number): this; /** * A method to get the members belonging to a specific status. * @param {string} status * @returns */ setStatus(status: string): this; /** * This method will return an object of the GroupMembersRequest class. * @returns {GroupMembersRequest} */ build(): GroupMembersRequest; } export class BannedMembersRequest { constructor(builder: BannedMembersRequestBuilder); /** * Get list of next set of banned members based on the parameters specified in BannedMembersRequestBuilder class. The Developer need to call this method repeatedly using the same object of BannedMembersRequest class to get paginated list of banned members. * @returns {Promise} */ fetchNext(): Promise; /** * Get the unique identifier of the group for which banned members are requested. * * @return {string}. */ getGuid(): string; /** * Get the maximum number of banned group members to fetch in a single operation. * * @return {number} */ getLimit(): number; /** * Get the search keyword used to filter banned group members. * * @return {string} */ getSearchKeyword(): string; /** * Gets the list of scopes used to filter banned group members based on specific criteria. * The scopes define the categories or roles of the group members to be fetched. * * @return {String[]} */ getScopes(): String[]; /** * Get the current page number that the request is on. * * @return {number} */ getPage(): number; /** * @internal */ getNextData(): any; } export class BannedMembersRequestBuilder { /** @private */ limit: number; /** @private */ searchKeyword: string; /** @private */ guid: string; /** @private */ scopes?: Array; /** @private */ page: number; constructor(guid: string); /** * Set the unique identifier of the group. * * @param guid The group ID to set. * @returns */ setGuid(guid: string): this; /** * * @param {number} limit * A method to set limit for the number of banned members returned in a single iteration. A maximum of 100 banned members can fetched in a single iteration. * @returns */ setLimit(limit: number): this; /** * * @param {string} searchKeyword * A method to set the search string based on which the banned members are to be fetched. * @returns */ setSearchKeyword(searchKeyword: string): this; /** * * @param {string[]} scopes * A method to set the search banned members based on their scope. * @returns */ setScopes(scopes: Array): this; /** * * @param {number} page * A method to set the page number to start fetching from. Page 0 will fetch the first page. * @returns */ setPage(page: number): this; /** * This method will return an object of the BannedMembersRequest class. * @returns {BannedMembersRequest} */ build(): BannedMembersRequest; } export class UsersRequest { static USER_STATUS: { ONLINE: string; OFFLINE: string; }; constructor(builder?: UsersRequestBuilder); /** * Gets the limit on the number of users to be fetched. * * @return {number} */ getLimit(): number; /** * Gets the search keyword used to filter the users list. * This keyword is used to search for users based on their name or UID. * * @return {string} */ getSearchKeyword(): string; /** * Determines whether blocked users are excluded from the users list. * * @return {boolean} */ isHideBlockedUsers(): boolean; /** * Gets the status filter used to fetch users based on their online or offline status. * * @return {string} */ getStatus(): string; /** * Gets the user role filter used to fetch users based on their role. * * @return {string} */ getRole(): string; /** * Determines whether only friends are included in the users list. * * @return {boolean} */ isFriendsOnly(): boolean; /** * Gets the list of roles used to filter users. * Users will be fetched based on the specified roles. * * @return {String[]} */ getRoles(): String[]; /** * Gets the list of tags used to filter users. * Users will be fetched based on the specified tags. * * @return {String[]} */ getTags(): String[]; /** * Determines whether the tags are included in the users data when fetched. * * @return {boolean} */ isWithTags(): boolean; /** * Gets the list of UIDs used to fetch specific users. * * @return {} */ getUIDs(): String[]; /** * Gets the fields specified to search for the search keyword in the user data. * Possible fields are "name" and "uid". * * @return {String[]} */ getSearchIn(): String[]; /** * Gets the field by which the user list is sorted. * Possible values are "status" or "name". * * @return {string} */ getSortBy(): string; /** * Gets the order in which the user list is sorted. * Possible values are "asc" for ascending order and "desc" for descending order. * * @return {string} */ getSortOrder(): string; /** * Get the current page number that the request is on. * * @return {number} */ getPage(): number; /** * Get list of next set of users based on the parameters specified in UsersRequestBuilder class The Developer need to call this method repeatedly using the same object of UsersRequestBuilder class to get paginated list of users. * @returns {Promise} */ fetchNext(): Promise; /** * @internal */ getNextData(): any; } export class UsersRequestBuilder { /** @private */ limit: number; /** @private */ status: string; /** @private */ searchKeyword: string; /** @private */ shouldHideBlockedUsers: boolean; /** @private */ role: string; /** @private */ roles: Array; /** @private */ tags: Array; /** @private */ showFriendsOnly: boolean; /** @private */ showTags: boolean; /** @private */ UIDs: Array; /** @private */ SortBy: string; /** @private */ SortOrder: string; /** @private */ SearchIn: Array; /** @private */ page: number; /** * A method to set limit for the number of Users returned in a single iteration. A maximum of 100 users can fetched in a single iteration. * @param {number} limit * @returns */ setLimit(limit: number): this; /** * A method to get the users belonging to a specific status. * @param {string} status * @returns */ setStatus(status: string): this; /** * A method to set the search string based on which the users are to be fetched. * @param {string} searchKeyword * @returns */ setSearchKeyword(searchKeyword: string): this; /** * Method to hide blocked users. * @param {boolean} hideBlockedUsers * @returns */ hideBlockedUsers(hideBlockedUsers: boolean): this; /** * A method to get the users with the specified role. * @param {string} role * @returns */ setRole(role: string): this; /** * A method to get the users with the specified roles. * @param {string[]} role * @returns */ setRoles(roles: Array): this; /** * A method to fetch only friends. * @param {boolean} friendsOnly * @returns */ friendsOnly(friendsOnly: boolean): this; /** * A method to get the users with the specified tags. * @param {string[]} tags * @returns */ setTags(tags: Array): this; /** * A method to get the tags along with the other details of the users. * @param {boolean} withTags * @returns */ withTags(withTags: boolean): this; /** * A method to get the users with the specified UIDs. * @param {string[]} uids * @returns */ setUIDs(uids: Array): this; /** * A method to get the users sorted by either `name` or `status`. * It accepts a string as input. * By default the SDK fetches users sorted by `status`. * @param {string} sortBy * @returns */ sortBy(sortBy: string): this; /** * A method to get the users sorted either in `asc` or `desc` order. * It accepts a string as input. * By default the SDK fetches users sorted in `asc` order. * @param {string} sortOrder * @returns */ sortByOrder(sortOrder: string): this; /** * A method to set which field the search string should be searched. * It accepts an array of string as input. * It can be `["name"]`, `["uid"]` or `["name", "uid"]`. * By default the SDK searches the search string in `["name", "uid"]`. * @param {string[]} searchIn * @returns */ searchIn(searchIn: Array): this; /** * A method to set the page number to start fetching from. Page 0 will fetch the first page. * @param {number} page * @returns */ setPage(page: number): this; /** * This method will return an object of the UsersRequest class. * @returns {UsersRequest} */ build(): UsersRequest; } export class ConversationsRequest { /** * @private * @param {ConversationsRequestBuilder} builder */ constructor(builder?: ConversationsRequestBuilder); /** * Get list of next set of conversations based on the parameters specified in ConversationsRequestBuilder class. The Developer need to call this method repeatedly using the same object of ConversationsRequest class to get paginated list of conversations. * @returns {Promise} */ fetchNext(): Promise; /** * @internal */ getNextData(): any; /** * Checks if blocked users are to be included in the list of conversations. * @returns {boolean} */ isIncludeBlockedUsers(): boolean; /** * Checks if blocked information should be included in the list of conversations. * @returns {boolean} */ isWithBlockedInfo(): boolean; /** * Gets the limit for the number of items to be fetched or processed. * @returns {number} */ getLimit(): number; /** * Retrieves the type of the conversation. * This can be used to differentiate between different types of conversations, such as user and group. * @returns {string} */ getConversationType(): string; /** * Method to get the search string based on which the conversations will be fetched. * @returns {string} */ getSearchKeyword(): string; /** * Checks if the filtering should include both user and group tags. * @return true if both user and group tags are included. false otherwise. * @returns {boolean} */ isWithUserAndGroupTags(): boolean; /** * Gets the list of tags associated with the conversation item. * These tags can be used for categorization or filtering. * @returns {String[]} */ getTags(): String[]; /** * Determines whether the filtering or selection process should consider tags. * * @returns {boolean} */ isWithTags(): boolean; /** * Retrieves the list of group-specific tags. * These tags are used to filter and fetch conversations that are associated with groups tagged with these specified tags. * @returns {String[]} */ getGroupTags(): String[]; /** * Retrieves the list of user-specific tags. * These tags are used to filter and fetch conversations that are associated with users tagged with these specified tags. * @returns {String[]} */ getUserTags(): String[]; /** * Determines whether only unread conversations should be fetched. * * @returns {boolean} */ getUnread(): boolean; /** * Get the current page number that the request is on. * * @return {number} */ getPage(): number; /** * Determines whether agentic conversations should be hidden. * * @returns {boolean} */ getHideAgentic(): boolean; /** * Determines whether only agentic conversations should be fetched. * * @returns {boolean} */ getOnlyAgentic(): boolean; } export class ConversationsRequestBuilder { /** @private */ conversationType: string; /** @private */ limit: number; /** @private */ getUserAndGroupTags: boolean; /** @private */ tags: Array; /** @private */ WithTags: boolean; /** @private */ groupTags: Array; /** @private */ userTags: Array; /** @private */ IncludeBlockedUsers: boolean; /** @private */ WithBlockedInfo: boolean; /** @private */ searchKeyword: string; /** @private */ unreadOnly: boolean; /** @private */ page: number; /** @private */ hideAgentic: boolean; /** @private */ onlyAgentic: boolean; /** * * @param {number} limit * A method to set limit for the number of Conversations returned in a single iteration. A maximum of 50 conversations can fetched in a single iteration. * @returns */ setLimit(limit: number): this; /** * * @param {string} conversationType * A method to set the conversation type. It can take once of the two values: 1. 'user' - to fetch only the user conversations. 2. 'group' - to fetch only the group conversations. * @returns */ setConversationType(conversationType: string): this; /** * * @param {string} searchKeyword * Method to set the search string based on which the conversations will be fetched. * This string will be searched in the `conversationWith` property. * @returns */ setSearchKeyword(searchKeyword: string): this; /** * * @param {boolean} getUserAndGroupTags * A method to fetch the user/group tags in the ConversationWith Object. The default value is false. * @returns */ withUserAndGroupTags(getUserAndGroupTags: boolean): this; /** * A method to get conversations with the specified tags. * @param {Array} tags * @returns */ setTags(tags: Array): this; /** * A method to get the tags along with conversations. * @param {boolean} withTags * @returns */ withTags(withTags: boolean): this; /** * A method to filter conversation list by group tags. * @param {Array} groupTags * @returns */ setGroupTags(groupTags: Array): this; /** * A method to filter conversation list by user tags. * @param {Array} userTags * @returns */ setUserTags(userTags: Array): this; /** * A method to include blocked users in the list of conversations. * @param {boolean} _includeBlockedUsers * @returns * @deprecated This method is deprecated as of version 4.0.8 due to newer method 'includeBlockedUsers'. * It will be removed in subsequent versions. */ setIncludeBlockedUsers(_includeBlockedUsers: boolean): this; /** * A method to include blocked users in the list of conversations. * @param {boolean} _includeBlockedUsers * @returns */ includeBlockedUsers(_includeBlockedUsers: boolean): this; /** * A method to include blocked users information in the list of conversations. * @param {boolean} _withBlockedInfo * @returns * * @deprecated This method is deprecated as of version 4.0.8 due to newer method 'withBlockedInfo'. * It will be removed in subsequent versions. */ setWithBlockedInfo(_withBlockedInfo: boolean): this; /** * A method to include blocked users information in the list of conversations. * @param {boolean} _withBlockedInfo * @returns */ withBlockedInfo(_withBlockedInfo: boolean): this; /** * A method to fetch unread conversations. * @param {boolean} unread * @returns */ setUnread(unread: boolean): this; /** * A method to set the page number to start fetching from. Page 0 will fetch the first page. * @param {number} page * @returns */ setPage(page: number): this; /** * A method to hide agentic conversations from the list. * @param {boolean} hideAgentic * @returns */ setHideAgentic(hideAgentic: boolean): this; /** * A method to fetch only agentic conversations. * @param {boolean} onlyAgentic * @returns */ setOnlyAgentic(onlyAgentic: boolean): this; /** * This method will return an object of the ConversationsRequest class. * @returns {ConversationsRequest} */ build(): ConversationsRequest; } export class MessagesRequest { constructor(builder?: MessagesRequestBuilder); /** * Gets the limit on the number of messages to be fetched in a single operation. * * @return {number} */ getLimit(): number; /** * Gets the UID of the user for which the messages are being fetched. * * @return {string}. */ getUID(): string; /** * Gets the GUID of the group for which the messages are being fetched. * * @return {guid} */ getGUID(): string; /** * Gets the message ID from which subsequent or previous messages are to be fetched. * * @return {number} */ getMessageId(): number; /** * Gets the flag indicating whether to fetch only unread messages. * * @return {boolean} */ isUnread(): boolean; /** * Gets the flag indicating whether to hide messages from blocked users. * * @return {boolean} */ isHideMessagesFromBlockedUsers(): boolean; /** * Gets the timestamp from which messages are to be fetched. * Used to fetch messages around a specific time point. * * @return {number} */ getTimestamp(): number; /** * Gets the search keyword used to filter messages. * Only messages containing this keyword will be fetched. * * @return {string} */ getSearchKeyword(): string; /** * Gets the timestamp after which updated or edited messages are to be fetched. * * @return {string} */ getUpdatedAfter(): string; /** * Gets the flag indicating whether to fetch only updated or edited messages. * * @return {boolean} */ isUpdatesOnly(): any; /** * Gets the list of categories for which the messages are to be fetched. * * @return {String[]} */ getCategories(): String[]; /** * Gets the category for which the messages are to be fetched. * * @return {string} */ getCategory(): string; /** * Gets the list of types for which the messages are to be fetched. * * @return {String[]} */ getTypes(): String[]; /** * Gets the type for which the messages are to be fetched. * * @return {string} */ getType(): string; /** * Gets the parent message ID to fetch messages belonging to a specific thread. * * @return {number} */ getParentMessageId(): number; /** * Gets the flag indicating whether to exclude replies (threaded messages) when fetching messages. * * @return {boolean} */ isHideReplies(): boolean; /** * Gets the flag indicating whether to hide deleted messages when fetching messages. * * @return {boolean} */ isHideDeletedMessages(): boolean; /** * Gets the flag indicating whether to only fetch messages which have attachments. * * @return {boolean} */ getHasAttachments(): boolean; /** * Method to only fetch messages which have links. * * @return {boolean} */ getHasLinks(): boolean; /** * Method to only fetch messages which have mentions. * * @return {boolean} */ getHasMentions(): boolean; /** * Method to only fetch messages which have reactions. * * @return {boolean} */ getHasReactions(): boolean; /** * Method to only fetch messages which have the given mentioned UIDs. * * @return {String[]} */ getMentionedUIDs(): String[]; /** * Gets the list of tags for which the messages are to be fetched. * * @return {String[]} */ getTags(): String[]; /** * Gets the flag indicating whether messages should be fetched with their tags. * * @return {boolean} */ isWithTags(): boolean; /** * Gets the flag indicating whether to fetch mentioned messages with user tag information. * * @return {boolean} */ isMentionsWithTagInfo(): boolean; /** * Gets the flag indicating whether to fetch mentioned messages with blocked relation information. * * @return {boolean} */ isMentionsWithBlockedInfo(): boolean; /** * Gets the flag indicating whether to fetch only messages with completed interaction goals. * * @return {boolean} */ isInteractionGoalCompletedOnly(): boolean; /** * Returns the list of selected attachment types used for filtering messages. * @return {Array} */ getAttachmentTypes(): Array; /** * Gets the flag indicating whether to fetch messages with parent message information. */ isWithParent(): boolean; /** * Gets the flag indicating whether to hide quoted messages when fetching messages. * * @return {boolean} */ isHideQuotedMessages(): boolean; /** * Get list of next messages based on the parameters specified in MessagesRequestBuilder class. The Developer need to call this method repeatedly using the same object of MessagesRequest class to get paginated list of message. * @returns {Promise} */ fetchNext(): Promise; /** * Get list of previous messages based on the parameters specified in MessagesRequestBuilder class. The Developer need to call this method repeatedly using the same object of MessagesRequest class to get paginated list of message. * @returns {Promise} */ fetchPrevious(): Promise; } export class MessagesRequestBuilder { /** @private */ limit?: number; /** @private */ maxLimit: number; /** @private */ uid?: string; /** @private */ guid?: string; /** @private */ parentMessageId?: number; /** @private */ timestamp?: number; /** @private */ id?: number; /** @private */ unread?: boolean; /** @private */ HideMessagesFromBlockedUsers?: boolean; /** @private */ searchKey?: string; /** @private */ updatedAt?: string; /** @private */ onlyUpdate?: number; /** @private */ category?: string; /** @private */ categories?: Array; /** @private */ type?: string; /** @private */ types?: Array; /** @private */ HideReplies?: boolean; /** @private */ HideDeletedMessages?: boolean; /** @private */ tags?: Array; /** @private */ WithTags?: boolean; /** @private */ interactionGoalCompletedOnly?: boolean; /** @private */ mentionsWithUserTags?: boolean; /** @private */ mentionsWithBlockedRelation?: boolean; /** @private */ HasAttachments?: boolean; /** @private */ HasLinks?: boolean; /** @private */ HasMentions?: boolean; /** @private */ HasReactions?: boolean; /** @private */ mentionedUIDs?: Array; /** @private */ attachmentTypes?: Array; /** @private */ WithParent?: boolean; /** @private */ HideQuotedMessages?: boolean; /** * A method to set limit for the number of messages returned in a single iteration. A maximum of 100 messages can fetched in a single iteration. * @param {number} limit * @returns */ setLimit(limit: number): this; /** * A method to set GUID of a Group to get messages of that particular group conversation. * @param {string} guid * @returns */ setGUID(guid: string): this; /** * A method to set UID of a User to get messages of that particular user conversation. * @param {string} uid * @returns */ setUID(uid: string): this; /** * A method to set parent message id to get messages of that particular thread. * @param {number} parentMessageId * @returns */ setParentMessageId(parentMessageId: number): this; /** * A method to set timestamp to get messages before/after the specified timestamp. * @param {number} timestamp * @returns */ setTimestamp(timestamp?: number): this; /** * A method to set message ID of a particular message to get messages before/after the specified message. * @param {number} id * @returns */ setMessageId(id?: number): this; /** * A method to get only unread messages. * @param {boolean} unread * @returns */ setUnread(unread?: boolean): this; /** * Method to set parameters to hide or show message from blocked users. * @param {boolean} hideMessagesFromBlockedUsers * @returns */ hideMessagesFromBlockedUsers(hideMessagesFromBlockedUsers?: boolean): this; /** * A method to set the search string based on which the messages are to be fetched. * @param {string} searchKey * @returns */ setSearchKeyword(searchKey: string): this; /** * A method set timestamp to get fetch messages updated/edited after that timestamp. * @param {string} updatedAt * @returns */ setUpdatedAfter(updatedAt: string): this; /** * A method to get only edited/updated messages. * @param {boolean} onlyUpdate * @returns */ updatesOnly(onlyUpdate: boolean): this; /** * A method to set parameter to get the messages belonging to a specific category. * @param {string} category * @returns */ setCategory(category: string): this; /** * A method to set parameter to get the messages belonging to specific categories. * @param {string[]} categories * @returns */ setCategories(categories: Array): this; /** * A method to set parameter to get the messages belonging to a specific type. * @param {string} type * @returns */ setType(type: string): this; /** * A method to set parameter to get the messages belonging to specific types. * @param {string[]} types * @returns */ setTypes(types: Array): this; /** * A method to hide message replies. * @param {boolean} hideReplies * @returns */ hideReplies(hideReplies: boolean): this; /** * A method to hide deleted messages. * @param {boolean} hideDeletedMessages * @returns */ hideDeletedMessages(hideDeletedMessages: boolean): this; /** * Method to only fetch messages which have attachments. * @param {boolean} hasAttachments * @returns */ hasAttachments(hasAttachments: boolean): this; /** * Method to only fetch messages which have links. * @param {boolean} hasLinks * @returns */ hasLinks(hasLinks: boolean): this; /** * Method to only fetch messages which have mentions. * @param {boolean} hasMentions * @returns */ hasMentions(hasMentions: boolean): this; /** * Method to only fetch messages which have reactions. * @param {boolean} hasReactions * @returns */ hasReactions(hasReactions: boolean): this; /** * Method to only fetch messages which have the given mentioned UIDs. * @param {Array} mentionedUIDs * @returns */ setMentionedUIDs(mentionedUIDs: Array): this; /** * A method to set parameter to get the messages belonging to specific tags. * @param {Array} tags * @returns */ setTags(tags: Array): this; /** * A method to get messages with tags. * @param {boolean} withTags * @returns */ withTags(withTags: boolean): this; /** * A method to include the user tags when getting the list of message with mentions * @param {boolean} mentionsWithUserTags * @returns */ mentionsWithTagInfo(mentionsWithUserTags?: boolean): this; /** * A method to include the blocked relation when getting the list of message with mentions * @param {boolean} mentionsWithBlockedRelation * @returns */ mentionsWithBlockedInfo(mentionsWithBlockedRelation?: boolean): this; /** * A method to get only interacted messages. * @param {boolean} interactionGoalCompletedOnly * @returns */ setInteractionGoalCompletedOnly(interactionGoalCompletedOnly?: boolean): this; /** * Filters messages by specific attachment types. * @param {Array} attachmentTypes * @returns */ setAttachmentTypes(attachmentTypes: Array): this; /** * This method will set the flag indicating whether to fetch messages with parent message information. * @param {boolean} withParent * @returns {this} */ withParent(withParent?: boolean): this; /** * A method to hide quoted messages. * @param {boolean} hideQuotedMessages * @returns */ hideQuotedMessages(hideQuotedMessages: boolean): this; /** * This method will return an object of the MessagesRequest class. * @returns {MessagesRequest} */ build(): MessagesRequest; } /** * * @module TypingIndicator */ export class TypingIndicator { constructor(receiverId?: string, receiverType?: string, meta?: any); /** * Method to get receiver type of the transient message. * @returns {string} */ getReceiverType(): string; /** * Method to set receiver type of the transient message. * @param {string} receiverType */ setReceiverType(receiverType: string): void; /** * Method to get receiverID of typing indicator. * @returns {string} */ getReceiverId(): string; /** * Method to set receiverID of typing indicator. * @param {string} receiverId */ setReceiverId(receiverId: string): void; /** * Method to get metadata of the transient message. * @returns {object} */ getMetadata(): object; /** * Method to set metadata of the transient message. * @param {object} meta */ setMetadata(meta: object): void; /** * Method to get sender of the transient message. * @returns {User} */ getSender(): User; /** * Method to set sender of the transient message. * @param {User} sender */ setSender(sender: User): void; } /** * * @module CustomMessage */ export class CustomMessage extends BaseMessage implements Message { protected data?: Object; constructor(...args: any[]); /** * Retrieves the preview text for a custom message to be displayed in the Conversation List. * This method allows for a textual representation of the custom message that can be used * as a conversation snippet or preview, enhancing the user experience by providing context. * @returns {string} The text to display as the conversation preview. */ getConversationText(): string; /** * Sets the preview text for a custom message to be displayed in the Conversation List. * This method allows for a textual representation of the custom message that can be used * as a conversation snippet or preview, enhancing the user experience by providing context. * @param {string} text The text to set as the conversation preview. */ setConversationText(text: string): void; /** * Determines whether the custom message should be considered as the last message * in the conversation, potentially changing the order of conversations. * This method indicates if sending a custom message will update the conversation's last message, * which may affect the conversation's position in the list based on the sorting order. * @returns {boolean} A boolean value indicating whether sending the custom message triggers an update * to the last message of the conversation, potentially altering the conversation order. */ willUpdateConversation(): boolean; /** * Set the flag to determine if the conversation should be updated. * @param {boolean} updateConversation The flag to set if the conversation should be updated. */ shouldUpdateConversation(updateConversation: boolean): void; /** * Determines whether a push notification should be sent for the custom message. * This method checks if the current custom message configuration specifies that a push notification * is warranted when the message is sent. * @returns {boolean} A boolean value indicating whether to send a push notification for the custom message. */ willSendNotification(): boolean; /** * Set the flag to determine if a notification should be sent. * @param {boolean} sendNotification The flag to set if a notification should be sent. */ shouldSendNotification(sendNotification: boolean): void; /** * Method to get custom data of the message. * @returns {Object} */ getCustomData(): Object; /** * Method to set custom data of the message. * @param {Object} customData */ setCustomData(customData: Object): void; /** * Method to get sender of the message. * @returns {User} */ getSender(): User; /** * Method to get receiver of the message. * @returns {User | Group} */ getReceiver(): User | Group; /** * Methhod to get sub type of the message. * @returns {string} */ getSubType(): string; /** * Method to set sub type of the message. * @param {string} subType */ setSubType(subType: string): void; /** * Method to get metadata of the message. * @returns {Object} */ getMetadata(): Object; /** * Method to set metadata of the message. * @param {Object} metadata */ setMetadata(metadata: Object): void; /** * Method to get data of the message. * @returns */ getData(): any; /** * Get the tags of the message. * @returns {Array} */ getTags(): Array; /** * @param {Array} tags * Set the tags for the message. */ setTags(tags: Array): void; } /** * * @module GroupMember */ export class GroupMember extends User { constructor(uid: string, scope?: string); /** * Method to set scope of the group member. * @param {GroupMemberScope} scope */ setScope(scope: GroupMemberScope): void; /** * Method to set joinedAt of the group member. * @param {number} joinedAt */ setJoinedAt(joinedAt: number): void; /** * Method to set guid of the group member. * @param {string} guid */ setGuid(guid: string): void; /** * Method to get scope of the group member. * @returns {string} */ getScope(): string; /** * Method to get joinedAt of the group member. * @returns {number} */ getJoinedAt(): number; /** * Method to get guid of the group member. * @returns {string} */ getGuid(): string; } export class BlockedUsersRequest { static directions: { BOTH: string; HAS_BLOCKED_ME: string; BLOCKED_BY_ME: string; }; /** * @private * @param {BlockedUsersRequestBuilder} builder */ constructor(builder?: BlockedUsersRequestBuilder); /** * * Get list of next set of blocked users based on the parameters specified in BlockedUsersRequestBuilder class. The Developer need to call this method repeatedly using the same object of BlockedUsersRequest class to get paginated list of blocked users. * @returns {Promise} */ fetchNext(): Promise; /** * Gets the direction type to determine the nature of the blocked users to be fetched. * The direction specifies whether to fetch users who are blocked by the logged-in user, * users who have blocked the logged-in user, or both. * * @return {string}. It can be one of "blocked_by_me", "blocked_me", or "both". */ getDirection(): string; /** * Get the maximum number of blocked users to be fetched in a single operation. * @return {number} */ getLimit(): number; /** * Get the search keyword used to filter blocked users by name or UID. * * @return {string} */ getSearchKeyword(): string; /** * Get the current page number that the request is on. * * @return {number} */ getPage(): number; /** @internal */ getNextData(): any; } export class BlockedUsersRequestBuilder { /** @private */ limit: number; /** @private */ searchKeyword: string; /** @private */ direction: string; /** @private */ page: number; /** * * @param {number} limit * A method to set limit for the number of blocked users returned in a single iteration. A maximum of 100 blocked users can fetched in a single iteration. * @returns */ setLimit(limit: number): this; /** * * @param {string} searchKeyword * A method to set the search string based on which the blocked users are to be fetched. * @returns */ setSearchKeyword(searchKeyword: string): this; /** * * @param direction * A method to either fetch only users the logged-in user has blocked or the users who have blocked the logged-in user or both. * @returns */ setDirection(direction: string): this; /** * * @param {number} page * A method to set the page number to start fetching from. Page 0 will fetch the first page. * @returns */ setPage(page: number): this; /** @internal */ blockedByMe(): this; /** @internal */ hasBlockedMe(): this; /** * This method will return an object of the BlockedUsersRequest class. * @returns {BlockedUsersRequest} */ build(): BlockedUsersRequest; } /** * * @module AppSettings */ export class AppSettings { static SUBSCRIPTION_TYPE_NONE: string; static SUBSCRIPTION_TYPE_ALL_USERS: string; static SUBSCRIPTION_TYPE_ROLES: string; static SUBSCRIPTION_TYPE_FRIENDS: string; /** @private */ static REGION_EU: string; /** @private */ static REGION_US: string; /** @private */ static REGION_IN: string; /** @private */ static REGION_PRIVATE: string; /** Storage modes */ static STORAGE_MODE_LOCAL: StorageMode; static STORAGE_MODE_SESSION: StorageMode; /** @private */ subscriptionType: string; /** @private */ roles: string[]; /** @private */ region: string; /** @private */ autoJoinGroup: boolean; /** @private */ establishSocketConnection: boolean; /** @private */ adminHost: string; /** @private */ clientHost: string; /** @private */ storageMode: StorageMode; /** * @private * @param {AppSettingsBuilder} */ constructor(builder: AppSettingsBuilder); /** * This method returns the subscription type set using one of the following methods of the AppSettingsBuilder `subscribePresenceForAllUsers()`, `subscribePresenceForRoles()` or `subscribePresenceForFriends()`. * @returns {string} */ getSubscriptionType(): string; /** * This method returns the roles set using the `setRoles()` of the AppSettingsBuilder. * @returns {string[]} */ getRoles(): string[]; /** * This method returns the region set using the `setRegion()` of the AppSettingsBuilder. * @returns {string} */ getRegion(): string; /** * This method returns whether auto joining of group was enabled or not using the `enableAutoJoinForGroups()` of the AppSettingsBuilder. * @returns {boolean} */ getIsAutoJoinEnabled(): boolean; /** * This method returns whether the SDK should connect to WebSocket server when a user logs-in or not. * @returns {boolean} */ shouldAutoEstablishSocketConnection(): boolean; /** * This method returns the admin host to which the SDK should connect. * @returns {boolean} */ getAdminHost(): string; /** * This method returns the client host to which the SDK should connect. * @returns {string} */ getClientHost(): string; /** * This method returns the storage mode (local or session) set using the `setStorageMode()` of the AppSettingsBuilder. * @returns {StorageMode} */ getStorageMode(): StorageMode; } export class AppSettingsBuilder { /** @private */ subscriptionType: string; /** @private */ roles: string[]; /** @private */ region: string; /** @private */ autoJoinGroup: boolean; /** @private */ establishSocketConnection: boolean; /** @private */ adminHost: string; /** @private */ clientHost: string; /** @private */ storageMode: StorageMode; /** * A method to subscribe presence for all users. * @returns */ subscribePresenceForAllUsers(): this; /** * @param {string[]} roles * A method to subscribe presence for all roles. * @returns */ subscribePresenceForRoles(roles: string[]): this; /** * A method to subscribe presence for friends. * @returns */ subscribePresenceForFriends(): this; /** * @param {string} region * A method to set region of the app. * @returns */ setRegion(region?: string): this; /** * @param {boolean} isAutoJoinEnabled * A method to enable/disable auto joining group. The default value is true. * @returns */ enableAutoJoinForGroups(isAutoJoinEnabled?: boolean): this; /** * @param {boolean} establishSocketConnection * A method to auto connect to WebSocket server when a user logs-in. The default value is true. * @returns */ autoEstablishSocketConnection(establishSocketConnection?: boolean): this; /** * @param {string} adminHost * This method is used to override the admin host which the SDK uses to make an API call. * @returns */ overrideAdminHost(adminHost: string): this; /** * @param {string} clientHost * This method is used to override the client host which the SDK uses to make an API call. * @returns */ overrideClientHost(clientHost: string): this; /** * @param {StorageMode} storageMode * This method is used to set the storage mode for the SDK. Default is 'local' (localStorage). * Use 'session' for sessionStorage. * @returns {this} */ setStorageMode(storageMode: StorageMode): this; /** * This method will return an object of the AppSettings class. * @returns {AppSettings} */ build(): AppSettings; } export class CometChatHelper { /** @private */ constructor(); /** * Takes JSONMessage as an input and will return an Object of BaseMessage Class. * @param {Object} message * @returns {TextMessage | MediaMessage | CustomMessage | InteractiveMessage | BaseMessage} * @memberof CometChatHelper */ static processMessage(message: Object): Promise; /**-------------------------------------------------------------------* * Message related functions provided by CometChat class * *--------------------------------------------------------------------**/ /** * Takes a Message Object and converts it into Conversation Object. * @param {TextMessage | MediaMessage | CustomMessage | InteractiveMessage} message * @returns {Conversation} conversation * @memberof CometChat */ static getConversationFromMessage(message: TextMessage | MediaMessage | CustomMessage | InteractiveMessage | any): Promise; static updateMessageWithReactionInfo(baseMessage: BaseMessage, messageReaction: Reaction, action: REACTION_ACTION): BaseMessage | CometChatException; } /** * * @module Conversation */ export class Conversation { protected conversationId: string; protected conversationType: string; protected lastMessage: TextMessage | MediaMessage | CustomMessage | any; protected conversationWith: User | Group; protected unreadMessageCount: number; protected unreadMentionsCount: number; protected lastReadMessageId: string; protected latestMessageId: string; protected tags: Array; constructor(conversationId: string, conversationType: string, lastMessage: TextMessage | MediaMessage | CustomMessage | any, conversationWith: User | Group, unreadMessageCount: number, tags: Array, unreadMentionsCount: number | any, lastReadMessageId: string | any, latestMessageId?: string | any); /** * Method to set conversation ID of the conversation. * @param {string} conversationId */ setConversationId(conversationId: string): void; /** * Method to get unreadMentionsCount of the conversation. * @returns {number} */ getUnreadMentionsCount(): number; /** * Method to set unreadMentionsCount of the conversation. * @param {number} */ setUnreadMentionsCount(count: number): void; /** * Method to get lastReadMessageId of the conversation. * @returns {string} */ getLastReadMessageId(): string; /** * Method to set lastReadMessageId of the conversation. * @param {string} */ setLastReadMessageId(id: string): void; /** * Method to get latestMessageId of the conversation. * @returns {string} */ getLatestMessageId(): string; /** * Method to set latestMessageId of the conversation. * @param {string} */ setLatestMessageId(id: string): void; /** * Method to set conversation type of the conversation. * @param {string} conversationId */ setConversationType(conversationType: string): void; /** * Method to set last message of the conversation. * @param {TextMessage | MediaMessage | CustomMessage | any} conversationId */ setLastMessage(lastMessage: TextMessage | MediaMessage | CustomMessage | any): void; /** * Method to set conversationWith of the conversation. * @param {User | Group} conversationId */ setConversationWith(conversationWith: User | Group): void; /** * Method to set unread message count of the conversation. * @param {number} conversationId */ setUnreadMessageCount(unreadMessageCount: number): void; /** * Method to get conversation ID of the conversation. * @returns {string} */ getConversationId(): string; /** * Method to get conversation type of the conversation. * @returns {string} */ getConversationType(): string; /** * Method to get last message of the conversation. * @returns {TextMessage | MediaMessage | CustomMessage | any} */ getLastMessage(): TextMessage | MediaMessage | CustomMessage | any; /** * Method to get conversationWith of the conversation. * @returns {User | Group} */ getConversationWith(): User | Group; /** * Method to get unread message count of the conversation. * @returns {number} */ getUnreadMessageCount(): number; /** * Method to get tags of conversation. * @returns {Array} */ getTags(): Array; } export class Attachment { constructor(file: Object); /** * Create the file object from the provided JSON Object. * @private * @param {Object} file * @returns {FileObject} * @memberof FileObject */ createFileFromJSON(file: Object): Attachment; /** * Converts the FileObject to JSON Object. * @private * @param {FileObject} fileObject * @returns {Object} * @memberof FileObject */ static toJSON(attachment: Attachment): Object; /** * Get extension of the file. * @returns {string} */ getExtension(): string; /** * Method to set extension of the file. * @param {string} extension */ setExtension(extension: string): void; /** * Get mime type of the file. * @returns {string} */ getMimeType(): string; /** * Method to set mimeType of the file. * @param {string} mimeType */ setMimeType(mimeType: string): void; /** * Get name of the file. * @returns {string} */ getName(): string; /** * Method to set name of the file. * @param {string} name */ setName(name: string): void; /** * Get size of the file. * @returns {string} */ getSize(): number; /** * Method to set size of the file. * @param {string} name */ setSize(size: number): void; /** * Get URL of the file. * @returns {string} */ getUrl(): string; /** * Method to set URL of the file. * @param {string} name */ setUrl(url: string): void; } export class CallSettings { static POSITION_TOP_LEFT: string; static POSITION_TOP_RIGHT: string; static POSITION_BOTTOM_LEFT: string; static POSITION_BOTTOM_RIGHT: string; static ASPECT_RATIO_DEFAULT: string; static ASPECT_RATIO_CONTAIN: string; static ASPECT_RATIO_COVER: string; constructor(builder?: CallSettingsBuilder); shouldUseLegacyUI(): boolean; isRecordingButtonEnabled(): boolean; shouldStartRecordingOnCallStart(): boolean; getCustomCSS(): string; getSessionId(): string; isAudioOnlyCall(): boolean; getUser(): RTCUser; getRegion(): string; getAppId(): string; getDomain(): string; isDefaultLayoutEnabled(): boolean; getMode(): string; getStartWithAudioMuted(): boolean; getStartWithVideoMuted(): boolean; isEndCallButtonEnabled(): boolean; isMuteAudioButtonEnabled(): boolean; isPauseVideoButtonEnabled(): boolean; isScreenShareButtonEnabled(): boolean; isModeButtonEnabled(): boolean; getLocalizedStringObject(): Object; getAnalyticsSettings(): Object; isAudioToVideoButtonEnabled(): boolean; getVirtualBackground(): VirtualBackground; isVirtualBackgroundSettingEnabled(): boolean; getMainVideoContainerSetting(): MainVideoContainerSetting; } export class CallSettingsBuilder { /** @private */ sessionID: string; /** @private */ defaultLayout: boolean; /** @private */ isAudioOnly: boolean; /** @private */ region: string; /** @private */ domain: string; /** @private */ user: RTCUser; /** @private */ mode: string; /** @private */ ShowEndCallButton: boolean; /** @private */ ShowMuteAudioButton: boolean; /** @private */ ShowPauseVideoButton: boolean; /** @private */ ShowScreenShareButton: boolean; /** @private */ ShowSwitchModeButton: boolean; /** @private */ StartAudioMuted: boolean; /** @private */ StartVideoMuted: boolean; /** @private */ localizedObject: Object; /** @private */ analyticsSettings: Object; /** @private */ appId: string; /** @private */ customCSS: string; /** @private */ ShowRecordingButton: boolean; /** @private */ StartRecordingOnCallStart: boolean; /** @private */ useLegacyUI: boolean; /** @private */ ShowSwitchToVideoCallButton: boolean; /** @private */ virtualBackground: VirtualBackground; /** @private */ ShowVirtualBackgroundSetting: boolean; /** @private */ MainVideoContainerSetting: MainVideoContainerSetting; /** * * @param {string} sessionID * This methods sets the session ID of the call. * @returns */ setSessionID(sessionID: string): this; /** * * @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; /** * @private * @param {string} region * This method sets the region of the app. * @returns */ setRegion(region: string): this; /** * @private * @param {string} domain * This method sets the domain of the app. * @returns */ setDomain(domain: string): this; /** * @private * @param {RTCUser} user * This method sets the user. * @returns */ setUser(user: RTCUser): this; /** * * @param {string} mode * This method sets the mode of the call. * @returns */ setMode(mode: string): 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} 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. * Default value is true. * @returns */ showPauseVideoButton(showPauseVideoButton: boolean): this; /** * * @param {boolean} showScreenShareButton * This method shows/hides the screen share button. * If set to true it will display the screen share button. * If set to false it will hide the screen share button. * Default value is true. * @returns */ showScreenShareButton(showScreenShareButton: boolean): this; /** * * @param {boolean} showModeButton * This method shows/hides the switch mode button. * If set to true it will display the switch mode button. * If set to false it will hide the switch mode button. * Default value is true. * @returns */ showModeButton(showModeButton: boolean): this; /** * * @param {Object} localizedStringObject * This method will set the localized text in the call screen. * @returns */ setLocalizedStringObject(localizedStringObject: Object): this; /** * @private * @param {Object} analyticsSettings * This method will set the settings required for analytics. * @returns */ setAnalyticsSettings(analyticsSettings: Object): this; /** * * @param {string} appId * This method will set the appID. * @returns */ setAppId(appId: string): 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. * Default value is false. * @returns */ startWithVideoMuted(videoMuted: boolean): this; /** * * @param {boolean} customCSS * This method will set the custom CSS of the call screen. * @returns */ setCustomCSS(customCSS: string): 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 {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; /** * * @param {boolean} legacyUI * This method will render the legacy call UI. * If set to true it will render the legacy call UI. * Default value is false. * @returns */ forceLegacyUI(legacyUI: boolean): this; /** * * @param {boolean} showAudioToVideoSwitchButton * This method shows/hides the switch to video call button. * If set to true it will display the switch to video call button. * If set to false it will hide the switch to video call button. * Default value is true. * @returns */ showSwitchToVideoCallButton(showAudioToVideoSwitchButton: boolean): this; /** * * @param {VirtualBackground} virtualBackground * This method will set the virtual background setting. * This methods takes an Object of VirtualBackground Class. * @returns */ setVirtualBackground(virtualBackground: VirtualBackground): this; /** * * @param {boolean} showVirtualBackgroundSetting * This method shows/hides the virtual background setting button. * If set to true it will display the virtual background setting button. * If set to false it will hide the virtual background setting button. * Default value is true. * @returns */ showVirtualBackgroundSetting(showVirtualBackgroundSetting: boolean): this; /** * * @param {MainVideoContainerSetting} mainVideoContainerSetting * This method can be used to customize the main video container. * @returns */ setMainVideoContainerSetting(mainVideoContainerSetting: MainVideoContainerSetting): this; /** * This method will return an object of the CallSettings class. * @returns {CallSettings} */ build(): CallSettings; } export class VirtualBackground { constructor(builder?: VirtualBackgroundBuilder); shouldAllowBackgroundBlur(): boolean; shouldAllowUserImages(): boolean; shouldShowDefaultImages(): boolean; getImages(): Array; isBackgroundBlurEnforced(): number; getEnforcedBackgroundImage(): string; } export class VirtualBackgroundBuilder { /** @private */ AllowBackgroundBlur: boolean; /** @private */ AllowUserImages: boolean; /** @private */ ShowDefaultImages: boolean; /** @private */ SetImages: Array; /** @private */ EnforceBackgroundBlur: number; /** @private */ EnforceBackgroundImage: string; /** * * @param {boolean} AllowBackgroundBlur * This method will show the background blur option in Virtual Background. * If set to true it will show the background blur option. * Default value is true. * @returns */ allowBackgroundBlur(AllowBackgroundBlur: boolean): this; /** * * @param {boolean} AllowUserImage * This method will allow the user to add custom images as background. * If set to true it will allow the user to add custom images as background. * Default value is true. * @returns */ allowUserImages(AllowUserImages: boolean): this; /** * * @param {boolean} ShowDefaultImages * This method will show the default images to be used as background. * If set to true it will show the default images to be used as background. * Default value is true. * @returns */ showDefaultImages(ShowDefaultImages: boolean): this; /** * * @param {boolean} SetImages * This method will allow user to add custom Images to be used as background. It takes in an array of URLs. * @returns */ setImages(SetImages: Array): this; /** * * @param {number} EnforceBackgroundBlur * This method will enforce background blur. * This method takes number as input which decides the blur level of the background. * Default value is 0. * @returns */ enforceBackgroundBlur(EnforceBackgroundBlur: number): this; /** * * @param {string} EnforceBackgroundImage * This method will enforce background image. * If an URL of the image is sent then that image will be set as background. * By default no image is set. * @returns */ enforceBackgroundImage(EnforceBackgroundImage: string): this; /** * This method will return an object of the VirtualBackground class. * @returns {VirtualBackground} */ build(): VirtualBackground; } export class MainVideoContainerSetting { /** * * @param {string} mainVideoAspectRatio * This method is used to set the aspect ratio of main video. * The default value is `contain` * @returns */ setMainVideoAspectRatio(mainVideoAspectRatio: string): void; /** * * @param {string} 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: string, visibility: boolean): void; /** * * @param {string} 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 `rgba(27, 27, 27, 0.4)` * @returns */ setNameLabelParams(position: string, visibility: boolean, backgroundColor: string): void; /** * * @param {string} position * @param {boolean} visibility * This method is used to set the position, visibility of the network label. * By default the network label is visible in the `bottom-right` position. * @returns */ setNetworkLabelParams(position: string, visibility: boolean): void; } export class CCExtension { constructor(extension: any); /** * This method returns the id of the extension. * @returns {string} */ getId(): string; /** * This method returns the name of the extension. * @returns {string} */ getName(): string; } export class MediaDevice { constructor(id: string, name: string, active: boolean); /** * Method to get ID of the media device. * @returns {string} */ getId(): string; /** * Method to set ID of the media device. * @param {string} id */ setId(id: string): void; /** * Method to get name of the media device. * @returns {string} */ getName(): string; /** * Method to set name of the media device. * @param {string} name */ setName(name: string): void; /** * Method to check if the media device is active or not. * @returns {boolean} */ getIsActive(): boolean; /** * Method to set the media device as active. * @param {boolean} active */ setIsActive(active: boolean): void; } export class TransientMessage { protected data: any; constructor(receiverId: string, receiverType: string, data: any); /** * Method to get receiverID of the transient message. * @returns {string} */ getReceiverId(): string; /** * Method to set receiverID of the transient message. * @param {string} receiverId */ setReceiverId(receiverId: string): void; /** * Method to get receiver type of the transient message. * @returns {string} */ getReceiverType(): string; /** * Method to set receiver type of the transient message. * @param {string} receiverType */ setReceiverType(receiverType: string): void; /** * Method to get data of the transient message. * @returns {any} */ getData(): any; /** * Method to set data of the transient message. * @param {any} data */ setData(data: any): void; /** * Method to get sender of the transient message. * @returns {User} */ getSender(): User; /** * Method to set sender of the transient message. * @param {User} sender */ setSender(sender: User): void; } /** * * @module InteractiveMessage */ export class InteractiveMessage extends BaseMessage implements Message { /** @private */ static readonly TYPE: { TEXT: string; MEDIA: string; IMAGE: string; VIDEO: string; AUDIO: string; FILE: string; CUSTOM: string; ASSISTANT: string; TOOL_RESULT: string; TOOL_ARGUMENTS: string; }; /** @private */ static readonly RECEIVER_TYPE: { USER: string; GROUP: string; }; /** @private */ static readonly CATEGORY: { MESSAGE: string; ACTION: string; CALL: string; CUSTOM: string; INTERACTIVE: string; AGENTIC: string; }; private interactiveData; private interactionGoal; protected data?: Object; private interactions?; private tags?; private allowSenderInteraction?; constructor(...args: any[]); /** * Method to get sender of the message. * @returns {User} */ getSender(): User; /** * Method to get interactive data of the message. * @returns {Object} */ getInteractiveData(): Object; /** * Method to set interactive data of interactive message. * @param {Object} interactiveData */ setInteractiveData(interactiveData: Object): void; /** * Method to get receiver of the message. * @returns {User|Group} */ getReceiver(): User | Group; /** * Method to interaction goal of the message. * @returns {InteractionGoal} */ getInteractionGoal(): InteractionGoal; /** * Method to set interaction goal of interactive message. * @param {InteractionGoal} interactionGoal */ setInteractionGoal(interactionGoal: InteractionGoal): void; /** * Method to get interactions on the message. * @returns {Array} */ getInteractions(): Array; /** * Method to set interactions of interactive message. * @param {Array} interactions */ setInteractions(interactions: Array): void; /** * Method to get metadata of the message. * @returns {Object} */ getMetadata(): Object; /** * Method to set sender metadata of the message. * @returns {User} */ setMetadata(metadata: Object): void; /** * Method to get data of the message. * @returns {any} */ getData(): any; /** * Method to get tags of the message. * @returns {Array} */ getTags(): Array; /** * Get the set tags fo the message . * @returns {Array} */ setTags(tags: Array): void; /** * @param {boolean} flag * Set the flag if sender is allowed to interact with the with the message. */ setIsSenderInteractionAllowed(flag: boolean): void; /** * Get the flag which signifies if sender interaction is allowed . * @returns {boolean} */ getIsSenderInteractionAllowed(flag: boolean): boolean; } /** * * @module InteractionGoal */ export class InteractionGoal { constructor(type: GoalType, elementIds: Array); /** * Get the type of the interaction goal. * @returns {GoalType} */ getType(): GoalType; /** * @param {GoalType} type * Set the type of goal for the message. */ setType(type: GoalType): void; /** * Get the element ids of the interacttion goal. * @returns {Array} */ getElementIds(): Array; /** * @param {Array} elementIds * Set the element id for the intearction goal. */ setElementIds(elementIds: Array): void; } export class Interaction { constructor(elementId: string, interactedAt: number); /** * Get the element id of the interaction. * @returns {string} */ getElementId(): string; /** * Get the time of the interaction. * @returns {number} */ getInteractedAt(): number; /** * @param {string} elementId * Set the element id. */ setElementId(elementId: string): void; /** * @param {number} interactedAt * Set the time of intertaction . */ setInteractedAt(interactedAt: number): void; static getInteractionFromJSON(message: any): Interaction; } /** * * @module InteractionReceipt */ export class InteractionReceipt { /** * Method to get receiver type of the interaction receipt. * @returns {string} */ getReceiverType(): string; /** * Method to set receiver type of the interaction receipt. * @param {string} receiverType */ setReceiverType(receiverType: string): void; /** * Method to get sender of the interaction receipt. * @returns {User} */ getSender(): User; /** * Method to set sender of the interaction receipt. * @param {User} sender */ setSender(sender: User): void; /** * Method to get receiver id of the interaction receipt. * @returns {string} */ getReceiveId(): string; /** * Method to set receiver of the interaction receipt. * @param {string} receiverId */ setReceiverId(receiverId: string): void; /** * Method to get the message ID. * @returns {string} */ getMessageId(): string; /** * Method to set the message ID. * @param {string} messageId */ setMessageId(messageId: string): void; /** * Method to get the interactions. * @returns { Array} */ getInteractions(): Array; /** * Method to set the interactions. * @param {Array} interactions */ setInteractions(interactions: Array): void; } export class ReactionsRequest { constructor(builder?: ReactionsRequestBuilder); /** * Gets the limit on the number of reactions to be fetched in a single operation. * * @return {number}. */ getLimit(): number; /** * Gets the message ID for which reactions are to be fetched. * * @return {number} */ getMessageId(): number; /** * Gets the specific reaction type by which reactions are to be fetched. * * @return {string} */ getReaction(): string; /** * Get list of next reactions list based on the parameters specified in ReactionsRequestBuilder class. The Developer need to call this method repeatedly using the same object of ReactionsRequest class to get paginated list of reactions. * @returns {Promise} */ fetchNext(): Promise; /** * Get list of previous reactions list based on the parameters specified in ReactionsRequestBuilder class. The Developer need to call this method repeatedly using the same object of ReactionsRequest class to get paginated list of reactions. * @returns {Promise} */ fetchPrevious(): Promise; } export class ReactionsRequestBuilder { /** @private */ limit?: number; /** @private */ msgId: number; /** @private */ reaction?: string; /** * A method to set limit for the number of entries returned in a single iteration. A maximum of 20 entries can fetched in a single iteration. * @param {number} limit * @returns */ setLimit(limit: number): this; /** * A method to set message ID for which reactions needed to fetch. * @param {number} id * @returns */ setMessageId(id?: number): this; /** * A method to fetch list of Reaction for a specific reaction. * @returns */ setReaction(reaction: string): this; /** * This method will return an object of the ReactionsRequest class. * @returns {ReactionsRequest} */ build(): ReactionsRequest; } export class ReactionCount { constructor(reaction: string, count: number, reactedByMe: boolean); /** * Method to get reacted reaction. * @returns {string} */ getReaction(): string; /** * Method to set reacted reaction. */ setReaction(reaction: string): void; /** * Method to get no of users reacted with a reaction. * @returns {number} */ getCount(): number; /** * Method to set no of users reacted with a reaction. */ setCount(count: number): void; /** * Method to get if loggedIn user reacted with the a reaction. * @returns {boolean} */ getReactedByMe(): boolean; /** * Method to set if loggedIn user reacted with the a reaction. */ setReactedByMe(reactedByMe: boolean): void; } export class ReactionEvent { constructor(reaction: Reaction, receiverId: string, receiverType: string, conversationId: string, parentMessageId?: string); getReaction(): Reaction; setReaction(reaction: Reaction): void; getReceiverId(): string; setReceiverId(receiverId: string): void; getReceiverType(): string; setReceiverType(receiverType: string): void; getConversationId(): string; setConversationId(conversationId: string): void; getParentMessageId(): string; setParentMessageId(parentMessageId: string): void; } export class Reaction { constructor(reactionId: string, messageId: string, reaction: string, uid: string, reactedAt: number, reactedBy: User); getReactionId(): string; setReactionId(id: string): void; getMessageId(): string; setMessageId(messageId: string): void; getReaction(): string; setReaction(reaction: string): void; getUid(): string; setUid(uid: string): void; getReactedAt(): number; setReactedAt(reactedAt: number): void; getReactedBy(): User; setReactedBy(reactedBy: User): void; } export class ConversationUpdateSettings { constructor(); shouldUpdateOnCallActivities(): boolean; shouldUpdateOnGroupActions(): boolean; shouldUpdateOnCustomMessages(): boolean; shouldUpdateOnMessageReplies(): boolean; static fromJSON(jsonData: Object): ConversationUpdateSettings; } /** * * @module MessageReceipt */ export class MessageReceipt { RECEIPT_TYPE: { READ_RECEIPT: string; DELIVERY_RECEIPT: string; READ_BY_ALL_RECEIPT: string; DELIVERED_TO_ALL_RECEIPT: string; }; /** * Method to get receiver type of the message receipt. * @returns {string} */ getReceiverType(): string; /** * Method to set receiver type of the message receipt. * @param {string} receiverType */ setReceiverType(receiverType: string): void; /** * Method to get sender of the message receipt. * @returns {User} */ getSender(): User; /** * Method to set sender of the message receipt. * @param {User} sender */ setSender(sender: User): void; /** * Method to get receiver of the message receipt. * @returns {string} */ getReceiver(): string; /** * Method to set receiver of the message receipt. * @param {string} receiver */ setReceiver(receiver: string): void; /** * Method to get timestamp of the message receipt. * @returns {string} */ getTimestamp(): string; /** * Method to set timestamp of the message receipt. * @param {string} timestamp */ setTimestamp(timestamp: string): void; /** * Method to set readAt timestamp of the message receipt. * @param {number} readAt */ setReadAt(readAt: number): void; /** * Method to get readAt timestamp of the message receipt. * @returns {number} */ getReadAt(): number; /** * Method to set deliveredAt timestamp of the message receipt. * @param {number} deliveredAt */ setDeliveredAt(deliveredAt: number): void; /** * Method to get deliveredAt timestamp of the message receipt. * @returns {number} */ getDeliveredAt(): number; /** * Method to get the message ID. * @returns {string} */ getMessageId(): string; /** * Method to set the message ID. * @param {string} messageId */ setMessageId(messageId: string): void; /** * Method to get the receipt type of message receipt. * @returns {string} */ getReceiptType(): string; /** * Method to set the receipt type of message receipt. * @param {string} receiptType */ setReceiptType(receiptType?: string): void; } /** * * @module AIAssistantMessage */ export class AIAssistantMessageData { runId: string; threadId: string; text: string; constructor(runId: string, threadId: string, text: string); getRunId(): string; setRunId(runId: string): void; getThreadId(): string; setThreadId(threadId: string): void; getText(): string; setText(text: string): void; } export class AIAssistantMessage extends BaseMessage implements Message { protected data?: any; protected aiAssistantMessageData?: AIAssistantMessageData; constructor(receiverId: string, receiverType: string); /** * Method to get sender of the message. * @returns {User} */ getSender(): User; /** * Method to get receiver of the message. * @returns {User | Group} */ getReceiver(): User | Group; /** * Method to get data of the message. * @returns {AIAssistantMessageData} */ getAssistantMessageData(): AIAssistantMessageData; /** * Method to set data of the message. * @param {AIAssistantMessageData} data */ setAssistantMessageData(data: AIAssistantMessageData): void; /** * Method to get data of the message. * @returns {Object} */ getData(): any; /** * Get the tags of the message. * @returns {Array} */ getTags(): Array; /** * @param {Array} tags * Set the tags for the message. */ setTags(tags: Array): void; } /** * * @module AIToolResultMessage */ export class AIToolResultMessageData { runId: string; threadId: string; text: string; toolCallId: string; constructor(runId: string, threadId: string, text: string, toolCallId: string); /** * Get the run ID of the tool result message. * @returns {string} */ getRunId(): string; /** * Set the run ID of the tool result message. * @param {string} runId */ setRunId(runId: string): void; /** * Get the thread ID of the tool result message. * @returns {string} */ getThreadId(): string; /** * Set the thread ID of the tool result message. * @param {string} threadId */ setThreadId(threadId: string): void; /** * Get the text of the tool result message. * @returns {string} */ getText(): string; /** * Set the text of the tool result message. * @param {string} text */ setText(text: string): void; /** * Get the tool call ID of the tool result message. * @returns {string} */ getToolCallId(): string; /** * Set the tool call ID of the tool result message. * @param {string} toolCallId */ setToolCallId(toolCallId: string): void; } export class AIToolResultMessage extends BaseMessage implements Message { protected data?: any; protected toolMessageData?: AIToolResultMessageData; constructor(receiverId: string, receiverType: string); /** * Method to get sender of the message. * @returns {User} */ getSender(): User; /** * Method to get receiver of the message. * @returns {User | Group} */ getReceiver(): User | Group; /** * Method to get data of the message. * @returns {AIToolResultMessageData} */ getToolResultMessageData(): AIToolResultMessageData; /** * Method to set data of the message. * @param {AIAssistantMessageData} data */ setToolResultMessageData(data: AIToolResultMessageData): void; /** * Method to get data of the message. * @returns {Object} */ getData(): any; /** * Get the tags of the message. * @returns {Array} */ getTags(): Array; /** * @param {Array} tags * Set the tags for the message. */ setTags(tags: Array): void; } /** * * @module AIToolArgumentMessage */ export class AIToolCallFunction { name: string; arguments: string; constructor(name: string, args: string); /** * Get the name of the function. * @returns {string} */ getName(): string; /** * Set the name of the function. * @param {string} name */ setName(name: string): void; /** * Get the arguments of the function. * @returns {string} */ getArguments(): string; /** * Set the arguments of the function. * @param {string} args */ setArguments(args: string): void; } export class AIToolCall { id: string; type: string; displayName?: string; executionText?: string; function: AIToolCallFunction; constructor(id: string, type: string, functionObj: AIToolCallFunction, displayName?: string, executionText?: string); /** * Get the id of the tool call. * @returns {string} */ getId(): string; /** * Set the id of the tool call. * @param {string} id */ setId(id: string): void; /** * Get the type of the tool call. * @returns {string} */ getType(): string; /** * Set the type of the tool call. * @param {string} type */ setType(type: string): void; /** * Get the function associated with the tool call. * @returns {AIToolCallFunction} */ getFunction(): AIToolCallFunction; /** * Set the function associated with the tool call. * @param {AIToolCallFunction} functionObj */ setFunction(functionObj: AIToolCallFunction): void; /** * Get the display name of the tool call. * @returns {string | undefined} */ getDisplayName(): string | undefined; /** * Set the display name of the tool call. * @param {string} displayName */ setDisplayName(displayName: string): void; /** * Get the execution text of the tool call. * @returns {string | undefined} */ getExecutionText(): string | undefined; /** * Set the execution text of the tool call. * @param {string} executionText */ setExecutionText(executionText: string): void; /** * Convert the tool call to a JSON object. * @returns {Object} */ static fromJSON(json: any): AIToolCall; static fromArray(array: Array): Array; } export class AIToolArgumentMessageData { runId: string; threadId: string; toolCalls?: Array; constructor(runId: string, threadId: string, toolCalls?: Array); /** * Get the run ID of the tool argument message. * @returns {string} */ getRunId(): string; /** * Set the run ID of the tool argument message. * @param {string} runId */ setRunId(runId: string): void; /** * Get the thread ID of the tool argument message. * @returns {string} */ getThreadId(): string; /** * Set the thread ID of the tool argument message. * @param {string} threadId */ setThreadId(threadId: string): void; /** * Get the tool calls associated with the tool argument message. * @returns {Array | undefined} */ getToolCalls(): Array | undefined; /** * Set the tool calls associated with the tool argument message. * @param {Array} toolCalls */ setToolCalls(toolCalls: Array): void; } export class AIToolArgumentMessage extends BaseMessage implements Message { protected data?: any; protected aiToolArgumentMessageData?: AIToolArgumentMessageData; constructor(receiverId: string, receiverType: string); /** * Method to get sender of the message. * @returns {User} */ getSender(): User; /** * Method to get receiver of the message. * @returns {User | Group} */ getReceiver(): User | Group; /** * Method to get data of the message. * @returns {AIToolArgumentMessageData} */ getToolArgumentMessageData(): AIToolArgumentMessageData; /** * Method to set data of the message. * @param {AIToolArgumentMessageData} data */ setToolArgumentMessageData(data: AIToolArgumentMessageData): void; /** * Method to get data of the message. * @returns {Object} */ getData(): any; /** * Get the tags of the message. * @returns {Array} */ getTags(): Array; /** * @param {Array} tags * Set the tags for the message. */ setTags(tags: Array): void; } /** Push Notification Preferences Enums */ export enum MessagesOptions { DONT_SUBSCRIBE, SUBSCRIBE_TO_ALL, SUBSCRIBE_TO_MENTIONS } export enum RepliesOptions { DONT_SUBSCRIBE, SUBSCRIBE_TO_ALL, SUBSCRIBE_TO_MENTIONS } export enum ReactionsOptions { DONT_SUBSCRIBE, SUBSCRIBE_TO_REACTIONS_ON_OWN_MESSAGES, SUBSCRIBE_TO_REACTIONS_ON_ALL_MESSAGES } export enum MemberActionsOptions { DONT_SUBSCRIBE, SUBSCRIBE } export enum DNDOptions { DISABLED, ENABLED } export enum DayOfWeek { MONDAY = "monday", TUESDAY = "tuesday", WEDNESDAY = "wednesday", THURSDAY = "thursday", FRIDAY = "friday", SATURDAY = "saturday", SUNDAY = "sunday" } export enum MutedConversationType { ONE_ON_ONE = "oneOnOne", GROUP = "group" } export enum PushPlatforms { FCM_WEB = "fcm_web" } export const APIConstants: { KEY_GROUP_PREFERENCES: string; KEY_GROUP_MESSAGES: string; KEY_GROUP_REACTIONS: string; KEY_GROUP_REPLIES: string; KEY_GROUP_MEMBER_ADDED: string; KEY_GROUP_MEMBER_LEFT: string; KEY_GROUP_MEMBER_JOINED: string; KEY_GROUP_MEMBER_KICKED: string; KEY_GROUP_MEMBER_BANNED: string; KEY_GROUP_MEMBER_UNBANNED: string; KEY_GROUP_MEMBER_SCOPE_CHANGED: string; KEY_MUTE_PREFERENCES: string; KEY_MUTE_DND: string; KEY_MUTE_SCHEDULE: string; KEY_ONE_ON_ONE_PREFERENCES: string; KEY_ONE_ON_ONE_MESSAGES: string; KEY_ONE_ON_ONE_REACTIONS: string; KEY_ONE_ON_ONE_REPLIES: string; KEY_USE_PRIVACY_TEMPLATE: string; KEY_PROVIDER_ID: string; KEY_TIMEZONE: string; KEY_PLATFORM: string; KEY_FCM_TOKEN: string; KEY_CONVERSATIONS: string; KEY_GET_PREFERENCES: string; KEY_UPDATE_PREFERENCES: string; KEY_RESET_PREFERENCES: string; KEY_REGISTER_TOKEN: string; KEY_UNREGISTER_TOKEN: string; KEY_MUTE_CONVERSATIONS: string; KEY_UNMUTE_CONVERSATIONS: string; KEY_GET_MUTED_CONVERSATIONS: string; KEY_MUTED_CONVERSATIONS: string; KEY_FROM: string; KEY_TO: string; KEY_GET_TIMEZONE: string; KEY_UPDATE_TIMEZONE: string; }; export const APIResponseConstants: { TOKEN_REGISTER_SUCCESS: string; TOKEN_REGISTER_ERROR: string; TOKEN_UNREGISTER_SUCCESS: string; TOKEN_UNREGISTER_ERROR: string; MUTE_CONVERSATION_SUCCESS: string; MUTE_CONVERSATION_ERROR: string; UNMUTE_CONVERSATION_SUCCESS: string; UNMUTE_CONVERSATION_ERROR: string; TIMEZONE_UPDATE_SUCCESS: string; TIMEZONE_UPDATE_ERROR: string; TIMEZONE_FETCH_ERROR: string; }; export const DEFAULT_PROVIDER_ID = "default"; export class DaySchedule { constructor(from: number, to: number, dnd: boolean); /** * Get the from value of Day Schedule. * @returns {number} */ getFrom(): number; /** * @param {number} from * Set the from value of Day Schedule. */ setFrom(from: number): void; /** * Get the to value of Day Schedule. * @returns {number} */ getTo(): number; /** * @param {number} to * Set the to value of Day Schedule. */ setTo(to: number): void; /** * Get the value of DND of Day Schedule. * @returns {boolean} */ getDND(): boolean; /** * @param {boolean} dnd * Set the value of DND of Day Schedule. */ setDND(dnd: boolean): void; } /** * * @module GroupPreferences */ export class GroupPreferences { /** * Get the messages preferences for groups. * @returns {MessagesOptions} */ getMessagesPreference(): MessagesOptions; /** * Get the replies preferences for groups. * @returns {RepliesOptions} */ getRepliesPreference(): RepliesOptions; /** * Get the reactions preferences for groups. * @returns {ReactionsOptions} */ getReactionsPreference(): ReactionsOptions; /** * Get the member left preferences for groups. * @returns {MemberActionsOptions} */ getMemberLeftPreference(): MemberActionsOptions; /** * Get the member added preferences for groups. * @returns {MemberActionsOptions} */ getMemberAddedPreference(): MemberActionsOptions; /** * Get the member joined preferences for groups. * @returns {MemberActionsOptions} */ getMemberJoinedPreference(): MemberActionsOptions; /** * Get the member kicked preferences for groups. * @returns {MemberActionsOptions} */ getMemberKickedPreference(): MemberActionsOptions; /** * Get the member banned preferences for groups. * @returns {MemberActionsOptions} */ getMemberBannedPreference(): MemberActionsOptions; /** * Get the member unbanned preferences for groups. * @returns {MemberActionsOptions} */ getMemberUnbannedPreference(): MemberActionsOptions; /** * Get the member scope change preferences for groups. * @returns {MemberActionsOptions} */ getMemberScopeChangedPreference(): MemberActionsOptions; /** * @param {MessagesOptions} messagesPreference * Set messages preference for groups. */ setMessagesPreference(messagesPreference: MessagesOptions): void; /** * @param {RepliesOptions} repliesPreference * Set replies preference for groups. */ setRepliesPreference(repliesPreference: RepliesOptions): void; /** * @param {ReactionsOptions} reactionsPreference * Set reactions preference for groups. */ setReactionsPreference(reactionsPreference: ReactionsOptions): void; /** * @param {MemberActionsOptions} memberLeftPreference * Set member left preference for groups. */ setMemberLeftPreference(memberLeftPreference: MemberActionsOptions): void; /** * @param {MemberActionsOptions} memberAddedPreference * Set member added preference for groups. */ setMemberAddedPreference(memberAddedPreference: MemberActionsOptions): void; /** * @param {MemberActionsOptions} memberJoinedPreference * Set member joined preference for groups. */ setMemberJoinedPreference(memberJoinedPreference: MemberActionsOptions): void; /** * @param {MemberActionsOptions} memberKickedPreference * Set member kicked preference for groups. */ setMemberKickedPreference(memberKickedPreference: MemberActionsOptions): void; /** * @param {MemberActionsOptions} memberBannedPreference * Set member banned preference for groups. */ setMemberBannedPreference(memberBannedPreference: MemberActionsOptions): void; /** * @param {MemberActionsOptions} memberUnbannedPreference * Set member unbanned preference for groups. */ setMemberUnbannedPreference(memberUnbannedPreference: MemberActionsOptions): void; /** * @param {MemberActionsOptions} memberScopeChangedPreference * Set member scope change preference for groups. */ setMemberScopeChangedPreference(memberScopeChangedPreference: MemberActionsOptions): void; /** * @param {Object} jsonData * Convert JSON object to GroupPreferences. */ static fromJSON(jsonData: Object): GroupPreferences; } export class MutedConversation { /** * Get the id of muted conversation * @returns {string} */ getId(): string; /** * Set the id of muted conversation * @param {string} id */ setId(id: string): void; /** * Get the conversation type of muted conversation. * @returns {MutedConversationType} */ getType(): MutedConversationType; /** * Set the conversation type of muted conversation. * @param {MutedConversationType} type */ setType(type: MutedConversationType): void; /** * Get the date until which the conversation should be muted. * @returns {number} */ getUntil(): number; /** * Set the date until which the conversation should be muted. * @param {number} until */ setUntil(until: number): void; } export class MutePreferences { /** * Get the DND preferences. * @returns {DNDOptions} */ getDNDPreference(): DNDOptions; /** * @param {DNDOptions} dndPreferences * Set DND preferences. */ setDNDPreference(dndPreferences: DNDOptions): void; /** * Get the schedule preferences. * @returns {Map} */ getSchedulePreference(): Map; /** * @param {Map} schedule * Set the schedule preferences. */ setSchedulePreference(schedule: Map): void; /** * Get the schedule for a day. * @returns {DaySchedule} */ getScheduleFor(day: DayOfWeek): DaySchedule; /** * @param {DayOfWeek} day * @param {DaySchedule} schedule * Set the schedule for a day. */ setScheduleFor(day: DayOfWeek, schedule: DaySchedule): void; /** * @param {Object} jsonData * Convert JSON object to MutePreferences. */ static fromJSON(jsonData: Object): MutePreferences; } export class NotificationPreferences { /** * Get the OneOnOne preferences. * @returns {OneOnOnePreferences} */ getOneOnOnePreferences(): OneOnOnePreferences; /** * @param {OneOnOnePreferences} oneOnOnePreferences * Set the OneOnOne preferences. */ setOneOnOnePreferences(oneOnOnePreferences: OneOnOnePreferences): void; /** * Get the Muted preferences. * @returns {MutePreferences} */ getMutePreferences(): MutePreferences; /** * @param {MutePreferences} mutePreferences * Set the Mute preferences. */ setMutePreferences(mutePreferences: MutePreferences): void; /** * Get the Group preferences. * @returns {GroupPreferences} */ getGroupPreferences(): GroupPreferences; /** * @param {GroupPreferences} groupPreferences * Set the Group preferences. */ setGroupPreferences(groupPreferences: GroupPreferences): void; /** * Returns whether to use privacy template or not. * @returns {boolean} */ getUsePrivacyTemplate(): boolean; /** * @param {boolean} usePrivacyTemplate * Set whether to use privacy template or not. */ setUsePrivacyTemplate(usePrivacyTemplate: boolean): void; /** * @param {Object} jsonData * Convert JSON object to NotificationPreferences. */ static fromJSON(jsonData: Object): NotificationPreferences; } export class OneOnOnePreferences { /** * Get the reactions preferences for groups. * @returns {ReactionsOptions} */ getReactionsPreference(): ReactionsOptions; /** * @param {ReactionsOptions} reactionsPreference * Set reactions preference for groups. */ setReactionsPreference(reactionsPreference: ReactionsOptions): void; /** * Get the replies preferences for groups. * @returns {RepliesOptions} */ getRepliesPreference(): RepliesOptions; /** * @param {RepliesOptions} repliesPreference * Set replies preference for groups. */ setRepliesPreference(repliesPreference: RepliesOptions): void; /** * Get the messages preferences for groups. * @returns {MessagesOptions} */ getMessagesPreference(): MessagesOptions; /** * @param {MessagesOptions} messagesPreference * Set messages preference for groups. */ setMessagesPreference(messagesPreference: MessagesOptions): void; /** * @param {Object} jsonData * Convert JSON object to OneOnOnePreferences. */ static fromJSON(jsonData: Object): OneOnOnePreferences; } /** * @deprecated This class is deprecated as of version 4.0.8 due to newer class 'NotificationPreferences'. * It will be removed in subsequent versions. */ export class PushPreferences { /** * Get the OneOnOne preferences. * @returns {OneOnOnePreferences} */ getOneOnOnePreferences(): OneOnOnePreferences; /** * @param {OneOnOnePreferences} oneOnOnePreferences * Set the OneOnOne preferences. */ setOneOnOnePreferences(oneOnOnePreferences: OneOnOnePreferences): void; /** * Get the Muted preferences. * @returns {MutePreferences} */ getMutePreferences(): MutePreferences; /** * @param {MutePreferences} mutePreferences * Set the Mute preferences. */ setMutePreferences(mutePreferences: MutePreferences): void; /** * Get the Group preferences. * @returns {GroupPreferences} */ getGroupPreferences(): GroupPreferences; /** * @param {GroupPreferences} groupPreferences * Set the Group preferences. */ setGroupPreferences(groupPreferences: GroupPreferences): void; /** * Returns whether to use privacy template or not. * @returns {boolean} */ getUsePrivacyTemplate(): boolean; /** * @param {boolean} usePrivacyTemplate * Set whether to use privacy template or not. */ setUsePrivacyTemplate(usePrivacyTemplate: boolean): void; /** * @param {Object} jsonData * Convert JSON object to PushPreferences. */ static fromJSON(jsonData: Object): PushPreferences; } export class UnmutedConversation { /** * Get the id of unmuted conversation * @returns {string} */ getId(): string; /** * Set the id of unmuted conversation * @param {string} id */ setId(id: string): void; /** * Get the conversation type of unmuted conversation. * @returns {MutedConversationType} */ getType(): MutedConversationType; /** * Set the conversation type of unmuted conversation. * @param {MutedConversationType} type */ setType(type: MutedConversationType): void; } /** * * * @export * @interface ErrorModel */ export interface ErrorModel { code?: string | number; name?: string; message?: string; details?: string; } export class RTCUser { 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; } /** * Base interface for all assistant event data * @internal */ export interface AssistantBaseEventData { timestamp: number; runId: string; threadId: string; [key: string]: any; } /** * Base class for stream events in CometChat SDK */ export class AIAssistantBaseEvent { /** * The type of the stream event */ type: string; /** * The conversation ID associated with the event */ conversationId: string; /** * The message ID associated with the event */ messageId: string; /** * The parent message ID (if applicable) */ parentMessageId: string; /** * Additional data associated with the event */ data: T; /** * Constructor for BaseStreamEvent * @param type - The type of the stream event * @param conversationId - The conversation ID * @param messageId - The message ID * @param parentMessageId - The parent message ID * @param data - Additional data with timestamp */ constructor(type: string, conversationId: string, messageId: string, parentMessageId: string, data: T); /** * Get the type of the stream event * @returns The type as a string */ getType(): string; /** * Set the type of the stream event * @param type - The type to set */ setType(type: string): void; /** * Get the conversation ID * @returns The conversation ID as a string */ getConversationId(): string; /** * Set the conversation ID * @param conversationId - The conversation ID to set */ setConversationId(conversationId: string): void; /** * Get the message ID * @returns The message ID as a string */ getMessageId(): string; /** * Set the message ID * @param messageId - The message ID to set */ setMessageId(messageId: string): void; /** * Get the parent message ID * @deprecated Use getParentMessageId() instead * @returns The parent message ID as a string */ getPatentMessageId(): string; /** * Get the parent message ID * @returns The parent message ID as a string */ getParentMessageId(): string; /** * Set the parent message ID * @deprecated Use setParentMessageId() instead * @param parentMessageId - The parent message ID to set */ setPatentMessageId(parentMessageId: string): void; /** * Set the parent message ID * @param parentMessageId - The parent message ID to set */ setParentMessageId(parentMessageId: string): void; /** * Get the data object * @returns The data object */ getData(): T; /** * Set the data object * @param data - The data object to set */ setData(data: T): void; /** * Get the timestamp from the data object * @returns The timestamp as a number */ getTimestamp(): number; /** * Set the timestamp in the data object * @param timestamp - The timestamp to set */ setTimestamp(timestamp: number): void; /** * Get the run ID from the data object * @returns The run ID as a string */ getRunId(): string; /** * Set the run ID in the data object * @param runId - The run ID to set */ setRunId(runId: string): void; /** * Get the thread ID from the data object * @returns The thread ID as a string */ getThreadId(): string; /** * Set the thread ID in the data object * @param threadId - The thread ID to set */ setThreadId(threadId: string): void; /** * Convert the event to a JSON object * @returns JSON representation of the event */ toJSON(): object; /** * Create a BaseStreamEvent from a JSON object * @param json - The JSON object to create the event from * @returns A new BaseStreamEvent instance */ static fromJSON(json: any): AIAssistantBaseEvent; } /** * Data structure for run events (run_started, run_finished) * @internal */ export interface AssistantRunStartedEventData extends AssistantBaseEventData { [key: string]: any; } export class AIAssistantRunStartedEvent extends AIAssistantBaseEvent { constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantRunStartedEventData); } /** * Data structure for run events (run_started, run_finished) * @internal */ export interface AssistantRunFinishedEventData extends AssistantBaseEventData { [key: string]: any; } export class AIAssistantRunFinishedEvent extends AIAssistantBaseEvent { constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantRunFinishedEventData); } /** * Data structure for message events (text_message_start, text_message_end) * @internal */ export interface AssistantMessageStartedEventData extends AssistantBaseEventData { role: string; [key: string]: any; } export class AIAssistantMessageStartedEvent extends AIAssistantBaseEvent { constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantMessageStartedEventData); /** * Returns the role of the event * @returns {string | undefined} The role of the event */ getRole(): string | undefined; /** * Sets the role of the event * @param {string} role - The role to set */ setRole(role: string): void; } /** * Data structure for message events (text_message_start, text_message_end) * @internal */ export interface AssistantMessageEndedEventData extends AssistantBaseEventData { [key: string]: any; } export class AIAssistantMessageEndedEvent extends AIAssistantBaseEvent { constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantMessageEndedEventData); } /** * Data structure for content events (text_message_content) * @internal */ export interface AssistantContentEventData extends AssistantBaseEventData { delta: string; [key: string]: any; } /** * Event class for text message content received from assistant */ export class AIAssistantContentReceivedEvent extends AIAssistantBaseEvent { constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantContentEventData); /** * Gets the delta value for the content received event * @returns The delta string */ getDelta(): string; /** * Sets the delta value for the content received event * @param delta - The delta string to set */ setDelta(delta: string): void; } /** * Data structure for tool call started events * @internal */ export interface AssistantToolStartedEventData extends AssistantBaseEventData { toolCallId: string; toolCallName: string; displayName: string; executionText: string; [key: string]: any; } /** * Event class for tool call started events */ export class AIAssistantToolStartedEvent extends AIAssistantBaseEvent { constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantToolStartedEventData); /** * Gets the tool call ID for the tool started event * @returns The tool call ID */ getToolCallId(): string; /** * Sets the tool call ID for the tool started event * @param toolCallId - The tool call ID to set */ setToolCallId(toolCallId: string): void; /** * Gets the tool call name for the tool started event * @returns The tool call name */ getToolCallName(): string; /** * Sets the tool call name for the tool started event * @param toolCallName - The tool call name to set */ setToolCallName(toolCallName: string): void; /** * Gets the display name for the tool started event * @returns The display name */ getDisplayName(): string; /** * Sets the display name for the tool started event * @param displayName - The display name to set */ setDisplayName(displayName: string): void; /** * Gets the execution text for the tool started event * @returns The execution text */ getExecutionText(): string; /** * Sets the execution text for the tool started event * @param executionText - The execution text to set */ setExecutionText(executionText: string): void; } /** * Data structure for tool call argument events * @internal */ export interface AssistantToolArgumentEventData extends AssistantBaseEventData { toolCallId: string; delta: string; [key: string]: any; } /** * Event class for tool call argument events */ export class AIAssistantToolArgumentEvent extends AIAssistantBaseEvent { constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantToolArgumentEventData); /** * Gets the tool call ID for the tool argument event * @returns The tool call ID */ getToolCallId(): string; /** * Sets the tool call ID for the tool argument event * @param toolCallId - The tool call ID to set */ setToolCallId(toolCallId: string): void; /** * Gets the delta value for the tool argument event * @returns The delta string */ getDelta(): string; /** * Sets the delta value for the tool argument event * @param delta - The delta string to set */ setDelta(delta: string): void; } /** * Data structure for tool call ended events * @internal */ export interface AssistantToolEndedEventData extends AssistantBaseEventData { toolCallId: string; [key: string]: any; } /** * Event class for tool call ended events */ export class AIAssistantToolEndedEvent extends AIAssistantBaseEvent { constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantToolEndedEventData); /** * Gets the tool call ID for the tool ended event * @returns The tool call ID */ getToolCallId(): string; /** * Sets the tool call ID for the tool ended event * @param toolCallId - The tool call ID to set */ setToolCallId(toolCallId: string): void; /** * Converts the event to a JSON representation * @returns The JSON representation of the event */ static fromJSON(json: any): AIAssistantToolEndedEvent; } /** * Data structure for tool call result events * @internal */ export interface AssistantToolResultEventData extends AssistantBaseEventData { toolCallId: string; content: string; role: string; [key: string]: any; } /** * Event class for tool call result events */ export class AIAssistantToolResultEvent extends AIAssistantBaseEvent { constructor(conversationId: string, messageId: string, parentMessageId: string, data: AssistantToolResultEventData); /** * Gets the tool call ID for the tool result event * @returns The tool call ID */ getToolCallId(): string; /** * Sets the tool call ID for the tool result event * @param toolCallId - The tool call ID to set */ setToolCallId(toolCallId: string): void; /** * Gets the content of the tool result event * @returns The content string */ getContent(): string; /** * Sets the content of the tool result event * @param content - The content string to set */ setContent(content: string): void; /** * Returns the role of the event * @returns {string | undefined} The role of the event */ getRole(): string; /** * Sets the role of the event * @param {string} role - The role to set */ setRole(role: string): void; }