Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • CometChat

Index

Properties

Methods

Properties

Static ACTION_TYPE

ACTION_TYPE: { MEMBER_ADDED: string; MEMBER_BANNED: string; MEMBER_INVITED: string; MEMBER_JOINED: string; MEMBER_KICKED: string; MEMBER_LEFT: string; MEMBER_SCOPE_CHANGED: string; MEMBER_UNBANNED: string; MESSAGE_EDITED: string; MESSSAGE_DELETED: string; TYPE_GROUP: string; TYPE_GROUP_MEMBER: string; TYPE_USER: string } = ...

Type declaration

  • MEMBER_ADDED: string
  • MEMBER_BANNED: string
  • MEMBER_INVITED: string
  • MEMBER_JOINED: string
  • MEMBER_KICKED: string
  • MEMBER_LEFT: string
  • MEMBER_SCOPE_CHANGED: string
  • MEMBER_UNBANNED: string
  • MESSAGE_EDITED: string
  • MESSSAGE_DELETED: string
  • TYPE_GROUP: string
  • TYPE_GROUP_MEMBER: string
  • TYPE_USER: string

Static AUDIO_MODE

AUDIO_MODE: { BLUETOOTH: string; EARPIECE: string; HEADPHONES: string; SPEAKER: string } = ...

Type declaration

  • BLUETOOTH: string
  • EARPIECE: string
  • HEADPHONES: string
  • SPEAKER: string

Static Action

Action: typeof Action = ...

Static AppSettings

AppSettings: typeof AppSettings = ...

Static AppSettingsBuilder

AppSettingsBuilder: typeof AppSettingsBuilder = ...

Static Attachment

Attachment: typeof Attachment = ...

Static BannedMembersRequest

BannedMembersRequest: typeof BannedMembersRequest = ...

Static BannedMembersRequestBuilder

BannedMembersRequestBuilder: typeof BannedMembersRequestBuilder = ...

Static BlockedUsersRequest

BlockedUsersRequest: typeof BlockedUsersRequest = ...

Static BlockedUsersRequestBuilder

BlockedUsersRequestBuilder: typeof BlockedUsersRequestBuilder = ...

Static CALL_MODE

CALL_MODE: { DEFAULT: string; SINGLE: string; SPOTLIGHT: string } = ...

Type declaration

  • DEFAULT: string
  • SINGLE: string
  • SPOTLIGHT: string

Static CALL_STATUS

CALL_STATUS: { BUSY: string; CANCELLED: string; ENDED: string; INITIATED: string; ONGOING: string; REJECTED: string; UNANSWERED: string } = ...

Type declaration

  • BUSY: string
  • CANCELLED: string
  • ENDED: string
  • INITIATED: string
  • ONGOING: string
  • REJECTED: string
  • UNANSWERED: string

Static CALL_TYPE

CALL_TYPE: { AUDIO: string; VIDEO: string } = ...

Type declaration

  • AUDIO: string
  • VIDEO: string

Static CATEGORY_ACTION

CATEGORY_ACTION: string = ...

Static CATEGORY_CALL

CATEGORY_CALL: string = ...

Static CATEGORY_CUSTOM

CATEGORY_CUSTOM: string = ...

Static CATEGORY_MESSAGE

CATEGORY_MESSAGE: string = ...

Static CONNECTION_STATUS

CONNECTION_STATUS: { CONNECTED: string; CONNECTING: string; DISCONNECTED: string; FEATURE_THROTTLED: string } = ...

Type declaration

  • CONNECTED: string
  • CONNECTING: string
  • DISCONNECTED: string
  • FEATURE_THROTTLED: string

Static Call

Call: typeof Call = ...

Static CallController

CallController: typeof CallController = ...

Static CallListener

CallListener: typeof CallListener = ...

Static CallSettings

CallSettings: typeof CallSettings = ...

Static CallSettingsBuilder

CallSettingsBuilder: typeof CallSettingsBuilder = ...

Static CallingComponent

CallingComponent: typeof CallingComponent = ...

Static CometChatException

CometChatException: typeof CometChatException = ...

Static CometChatHelper

CometChatHelper: typeof CometChatHelper = ...

Static ConnectionListener

ConnectionListener: typeof ConnectionListener = ...

Static Conversation

Conversation: typeof Conversation = ...

Static ConversationsRequest

ConversationsRequest: typeof ConversationsRequest = ...

Static ConversationsRequestBuilder

ConversationsRequestBuilder: typeof ConversationsRequestBuilder = ...

Static CustomMessage

CustomMessage: typeof CustomMessage = ...

Static GROUP_MEMBER_SCOPE

GROUP_MEMBER_SCOPE: { ADMIN: string; MODERATOR: string; PARTICIPANT: string } = ...

Type declaration

  • ADMIN: string
  • MODERATOR: string
  • PARTICIPANT: string

Static GROUP_TYPE

GROUP_TYPE: { PASSWORD: string; PRIVATE: string; PROTECTED: string; PUBLIC: string } = ...

Type declaration

  • PASSWORD: string
  • PRIVATE: string
  • PROTECTED: string
  • PUBLIC: string

Static Group

Group: typeof Group = ...

Static GroupListener

GroupListener: typeof GroupListener = ...

Static GroupMember

GroupMember: typeof GroupMember = ...

Static GroupMembersRequest

GroupMembersRequest: typeof GroupMembersRequest = ...

Static GroupMembersRequestBuilder

GroupMembersRequestBuilder: typeof GroupMembersRequestBuilder = ...

Static GroupsRequest

GroupsRequest: typeof GroupsRequest = ...

Static GroupsRequestBuilder

GroupsRequestBuilder: typeof GroupsRequestBuilder = ...

Static LoginListener

LoginListener: typeof LoginListener = ...

Static MESSAGE_TYPE

MESSAGE_TYPE: { AUDIO: string; CUSTOM: string; FILE: string; IMAGE: string; MEDIA: string; TEXT: string; VIDEO: string } = ...

Type declaration

  • AUDIO: string
  • CUSTOM: string
  • FILE: string
  • IMAGE: string
  • MEDIA: string
  • TEXT: string
  • VIDEO: string

Static MediaMessage

MediaMessage: typeof MediaMessage = ...

Static MessageListener

MessageListener: typeof MessageListener = ...

Static MessagesRequest

MessagesRequest: typeof MessagesRequest = ...

Static MessagesRequestBuilder

MessagesRequestBuilder: typeof MessagesRequestBuilder = ...

Static OngoingCallListener

OngoingCallListener: typeof OngoingCallListener = ...

Static RECEIVER_TYPE

RECEIVER_TYPE: { GROUP: string; USER: string } = ...

Type declaration

  • GROUP: string
  • USER: string

Static TextMessage

TextMessage: typeof TextMessage = ...

Static TransientMessage

TransientMessage: typeof TransientMessage = ...

Static TypingIndicator

TypingIndicator: typeof TypingIndicator = ...

Static USER_STATUS

USER_STATUS: { OFFLINE: string; ONLINE: string } = ...

Type declaration

  • OFFLINE: string
  • ONLINE: string

Static User

User: typeof User = ...

Static UserListener

UserListener: typeof UserListener = ...

Static UsersRequest

UsersRequest: typeof UsersRequest = ...

Static UsersRequestBuilder

UsersRequestBuilder: typeof UsersRequestBuilder = ...

Methods

getJWT

  • getJWT(passThroughData: any): Promise<unknown>
  • Parameters

    • passThroughData: any

    Returns Promise<unknown>

Static acceptCall

  • acceptCall(sessionid: string): Promise<Call>
  • Function to accept an incoming user/group call.

    memberof

    CometChat

    Parameters

    • sessionid: string

    Returns Promise<Call>

Static addCallListener

  • addCallListener(name: string, callListener: CallListener): void
  • Function to add a Call Listener.

    memberof

    CometChat

    Parameters

    Returns void

Static addConnectionListener

  • Function to add a Connection Listner.

    memberof

    CometChat

    Parameters

    Returns void

Static addGroupListener

  • addGroupListener(name: string, groupListener: GroupListener): void
  • Function to add a Group Listener.

    memberof

    CometChat

    Parameters

    Returns void

Static addLoginListener

  • addLoginListener(name: string, loginListener: LoginListener): void
  • Function to add a Login Listener.

    memberof

    CometChat

    Parameters

    Returns void

Static addMembersToGroup

  • addMembersToGroup(guid: string, groupMembers: GroupMember[], bannedMembersList: string[]): Promise<Object>
  • Function to add members in a group. This function can also be used to ban a group member from a group.

    memberof

    CometChat

    Parameters

    • guid: string
    • groupMembers: GroupMember[]
    • bannedMembersList: string[]

    Returns Promise<Object>

Static addMessageListener

  • Function to add a Message Listner.

    memberof

    CometChat

    Parameters

    Returns void

Static addUserListener

  • addUserListener(name: string, userListener: UserListener): void
  • Function to add a User Listener.

    memberof

    CometChat

    Parameters

    Returns void

Static banGroupMember

  • banGroupMember(guid: string, uid: string): Promise<boolean>
  • Function to ban a group member from a group.

    memberof

    CometChat

    Parameters

    • guid: string
    • uid: string

    Returns Promise<boolean>

Static blockUsers

  • blockUsers(blockedUids: String[]): Promise<Object>
  • Function to block users.

    memberof

    CometChat

    Parameters

    • blockedUids: String[]

    Returns Promise<Object>

Static callExtension

  • callExtension(slug: string, method: string, endpoint: string, data?: Object): Promise<Object>
  • Function to call extension API.

    memberof

    CometChat

    Parameters

    • slug: string
    • method: string
    • endpoint: string
    • data: Object = ...

    Returns Promise<Object>

Static connect

  • connect(): void
  • Method to connect to WebSocket server.

    static
    memberof

    CometChat

    Returns void

    void

Static createGroup

  • createGroup(group: any): Promise<Group>
  • Function to create a group.

    memberof

    CometChat

    Parameters

    • group: any

    Returns Promise<Group>

Static createUser

  • createUser(user: any, apiKey: string): Promise<User>
  • Function to create a user.

    memberof

    CometChat

    Parameters

    • user: any
    • apiKey: string

    Returns Promise<User>

Static deleteConversation

  • deleteConversation(conversationWith: string, conversationType: string): Promise<string>
  • function to delete conversation for a specific user/group.

    memberof

    CometChat

    Parameters

    • conversationWith: string
    • conversationType: string

    Returns Promise<string>

    Promise

Static deleteGroup

  • deleteGroup(guid: string): Promise<boolean>
  • Function to delete a group.

    memberof

    CometChat

    Parameters

    • guid: string

    Returns Promise<boolean>

Static deleteMessage

  • deleteMessage(messageId: string): Promise<BaseMessage>
  • Funtion to delete a message.

    memberof

    CometChat

    Parameters

    • messageId: string

    Returns Promise<BaseMessage>

Static disconnect

  • disconnect(): void
  • Method to disconnect to WebSocket server.

    static
    memberof

    CometChat

    Returns void

    void

Static editMessage

Static endCall

  • endCall(sessionid: string, isInternal?: boolean): Promise<Call>
  • Function to end an ongoing call.

    memberof

    CometChat

    Parameters

    • sessionid: string
    • Optional isInternal: boolean

      Optional

    Returns Promise<Call>

Static endTyping

  • endTyping(typingNotification: any): void
  • Function to send stop typing notification to the provided uid/ guid.

    memberof

    CometChat

    Parameters

    • typingNotification: any

    Returns void

Static getActiveCall

  • getActiveCall(): Call
  • Function to get the active call.

    memberof

    CometChat

    Returns Call

Static getCallParticipantCount

  • getCallParticipantCount(sessionId: string, type: string): Promise<number>
  • Function to fetch participant count of an ongoing call.

    memberof

    CometChat

    Parameters

    • sessionId: string
    • type: string

    Returns Promise<number>

Static getConnectionStatus

  • getConnectionStatus(): string
  • Get the current connection status

    memberof

    CometChat

    Returns string

Static getConversation

  • getConversation(conversationWith: string, conversationType: string): Promise<Conversation>
  • Function to fetch conversation for a specific user/group.

    memberof

    CometChat

    Parameters

    • conversationWith: string
    • conversationType: string

    Returns Promise<Conversation>

Static getExtensionDetails

  • getExtensionDetails(extensionId: string): Promise<CCExtension>
  • Returns an object of CCExtension Class which has the details of the extension.

    memberof

    CometChat

    Parameters

    • extensionId: string

    Returns Promise<CCExtension>

Static getGroup

  • getGroup(guid: string | Object): Promise<Group>
  • Function to fetch details of a group.

    memberof

    CometChat

    Parameters

    • guid: string | Object

    Returns Promise<Group>

Static getLastDeliveredMessageId

  • getLastDeliveredMessageId(): Promise<any>
  • Function to get the last delivered message id from local storage.

    memberof

    CometChat

    Returns Promise<any>

Static getLoggedinUser

  • getLoggedinUser(): Promise<User>
  • This function will return logged in user from local storage.

    memberof

    CometChat

    Returns Promise<User>

Static getMessageDetails

Static getMessageReceipts

  • getMessageReceipts(messageId: any): Promise<Object>
  • Function to fetch message receipt details for the provided messageID.

    memberof

    CometChat

    Parameters

    • messageId: any

    Returns Promise<Object>

Static getOnlineGroupMemberCount

  • getOnlineGroupMemberCount(groups: String[]): Promise<Object>
  • This function will return online group members count for given GUIDs.

    memberof

    CometChat

    Parameters

    • groups: String[]

    Returns Promise<Object>

Static getOnlineUserCount

  • getOnlineUserCount(): Promise<number>
  • This function will return online user count.

    memberof

    CometChat

    Returns Promise<number>

Static getUnreadMessageCount

  • getUnreadMessageCount(doHideMessages?: boolean): Promise<Object>
  • Function to fetch unread message count.

    memberof

    CometChat

    Parameters

    • doHideMessages: boolean = false

    Returns Promise<Object>

Static getUnreadMessageCountForAllGroups

  • getUnreadMessageCountForAllGroups(doHideMessages?: boolean): Promise<Object>
  • Function to fetch unread message count for all groups.

    memberof

    CometChat

    Parameters

    • doHideMessages: boolean = false

    Returns Promise<Object>

Static getUnreadMessageCountForAllUsers

  • getUnreadMessageCountForAllUsers(doHideMessages?: boolean): Promise<Object>
  • Function to fetch unread message count for all users.

    memberof

    CometChat

    Parameters

    • doHideMessages: boolean = false

    Returns Promise<Object>

Static getUnreadMessageCountForGroup

  • getUnreadMessageCountForGroup(GUID: string, doHideMessages?: boolean): Promise<Object>
  • Function to fetch unread message count for a particular GUID.

    memberof

    CometChat

    Parameters

    • GUID: string
    • doHideMessages: boolean = false

    Returns Promise<Object>

Static getUnreadMessageCountForUser

  • getUnreadMessageCountForUser(UID: string, doHideMessages?: boolean): Promise<Object>
  • Function to fetch unread message count for a particular UID.

    memberof

    CometChat

    Parameters

    • UID: string
    • doHideMessages: boolean = false

    Returns Promise<Object>

Static getUser

  • getUser(uid: any): Promise<User>
  • Function to get the information for the uid provided as an argument

    memberof

    CometChat

    Parameters

    • uid: any

    Returns Promise<User>

Static init

  • init(appId?: any, appSettings: AppSettings): Promise<boolean>
  • Initialize the CometChat app with appId & Object of AppSettings Class.

    memberof

    CometChat

    Parameters

    Returns Promise<boolean>

Static initiateCall

  • initiateCall(call: any): Promise<Call>
  • Function to initiate a user/group call.

    memberof

    CometChat

    Parameters

    • call: any

    Returns Promise<Call>

Static isExtensionEnabled

  • isExtensionEnabled(extensionId: string): Promise<boolean>
  • Returns a boolean value which indicates if the extension is enabled or not.

    memberof

    CometChat

    Parameters

    • extensionId: string

    Returns Promise<boolean>

Static isFeatureEnabled

  • isFeatureEnabled(feature: string): Promise<boolean>
  • Returns a boolean value which indicates if a feature is enabled or not for the current plan.

    memberof

    CometChat

    Parameters

    • feature: string

    Returns Promise<boolean>

Static isInitialized

  • isInitialized(): boolean
  • Function to check whether CometChat class initialized before.

    memberof

    CometChat

    Returns boolean

Static joinGroup

  • joinGroup(grp: any, type?: GroupType, password?: string): Promise<Group>
  • Function to join a public group.

    memberof

    CometChat

    Parameters

    • grp: any
    • type: GroupType = ...
    • password: string = ""

    Returns Promise<Group>

Static kickGroupMember

  • kickGroupMember(guid: string, uid: string): Promise<boolean>
  • Function to kick a member from a group.

    memberof

    CometChat

    Parameters

    • guid: string
    • uid: string

    Returns Promise<boolean>

Static leaveGroup

  • leaveGroup(guid: string): Promise<boolean>
  • Function to leave a group.

    memberof

    CometChat

    Parameters

    • guid: string

    Returns Promise<boolean>

Static login

  • login(...args: any): Promise<User>
  • 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)
    memberof

    CometChat

    Parameters

    • Rest ...args: any

    Returns Promise<User>

Static logout

  • logout(): Promise<Object>
  • Clears the authtoken from server and clears the local cache.

    memberof

    CometChat

    Returns Promise<Object>

Static markAsDelivered

  • markAsDelivered(...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
    memberof

    CometChat

    Parameters

    • Rest ...args: any

    Returns any

Static markAsRead

  • markAsRead(...args: any): any
  • Mark all messages upto a specified message id as read. There are two ways markAsRead works:

    1. message
    2. messageID, receiverID, receiverType, senderID
    memberof

    CometChat

    Parameters

    • Rest ...args: any

    Returns any

Static registerTokenForPushNotification

  • registerTokenForPushNotification(token: string, settings?: {}): Promise<string>
  • Function to register the FCM token for Push Notification.

    memberof

    CometChat

    Parameters

    • token: string
    • Optional settings: {}

    Returns Promise<string>

Static rejectCall

  • rejectCall(sessionId: string, status: any): Promise<Call>
  • Function to reject an incoming call or cancel an outgoing call.

    memberof

    CometChat

    Parameters

    • sessionId: string
    • status: any

    Returns Promise<Call>

Static removeCallListener

  • removeCallListener(name: string): void
  • Function to remove a Call Listener.

    memberof

    CometChat

    Parameters

    • name: string

    Returns void

Static removeConnectionListener

  • removeConnectionListener(name: string): void
  • Function to remove a Connection Listner.

    memberof

    CometChat

    Parameters

    • name: string

    Returns void

Static removeGroupListener

  • removeGroupListener(name: string): void
  • Function to remove a Group Listener.

    memberof

    CometChat

    Parameters

    • name: string

    Returns void

Static removeLoginListener

  • removeLoginListener(name: string): void
  • Function to remove a Login Listener.

    memberof

    CometChat

    Parameters

    • name: string

    Returns void

Static removeMessageListener

  • removeMessageListener(name: string): void
  • Function to remove a Message Listner.

    memberof

    CometChat

    Parameters

    • name: string

    Returns void

Static removeUserListener

  • removeUserListener(name: string): void
  • Function to remove a User Listener.

    memberof

    CometChat

    Parameters

    • name: string

    Returns void

Static sendCustomMessage

Static sendMediaMessage

Static sendMessage

Static sendTransientMessage

  • Send a transient message.

    memberof

    CometChat

    Parameters

    Returns void

Static setSource

  • setSource(resource: string, platform: string, language: string): void
  • Function to set resource, platform and language variable.

    memberof

    CometChat

    Parameters

    • resource: string
    • platform: string
    • language: string

    Returns void

Static startCall

  • function to start the call.

    static
    memberof

    CometChat

    Parameters

    Returns void

Static startTyping

  • startTyping(typingNotification: any): void
  • Function to send start typing notification to the provided uid/ guid.

    memberof

    CometChat

    Parameters

    • typingNotification: any

    Returns void

Static tagConversation

  • tagConversation(conversationWith: string, conversationType: string, tags?: String[]): Promise<Conversation>
  • Function to tag a conversation for a specific user/group.

    memberof

    CometChat

    Parameters

    • conversationWith: string
    • conversationType: string
    • tags: String[] = ...

    Returns Promise<Conversation>

Static transferGroupOwnership

  • transferGroupOwnership(guid: string, uid: string): Promise<string>
  • Function to transfer ownership of a group.

    memberof

    CometChat

    Parameters

    • guid: string
    • uid: string

    Returns Promise<string>

Static unbanGroupMember

  • unbanGroupMember(guid: string, uid: string): Promise<boolean>
  • Function to unban a group member from a group.

    memberof

    CometChat

    Parameters

    • guid: string
    • uid: string

    Returns Promise<boolean>

Static unblockUsers

  • unblockUsers(blockedUids: String[]): Promise<Object>
  • Function to unblock users.

    memberof

    CometChat

    Parameters

    • blockedUids: String[]

    Returns Promise<Object>

Static updateCurrentUserDetails

  • updateCurrentUserDetails(user: any): Promise<User>
  • Function to update the logged-in user and returns the result with updated user

    memberof

    CometChat

    Parameters

    • user: any

    Returns Promise<User>

    Promise

Static updateGroup

  • updateGroup(group: any): Promise<Group>
  • Function to update a group.

    memberof

    CometChat

    Parameters

    • group: any

    Returns Promise<Group>

Static updateGroupMemberScope

  • updateGroupMemberScope(guid: string, uid: string, scope: GroupMemberScope): Promise<boolean>
  • Function to change the scope of a member in a group.

    memberof

    CometChat

    Parameters

    • guid: string
    • uid: string
    • scope: GroupMemberScope

    Returns Promise<boolean>

Static updateUser

  • updateUser(user: any, apiKey: string): Promise<User>
  • Function to update the already existing user and returns the result with updated user.

    memberof

    CometChat

    Parameters

    • user: any
    • apiKey: string

    Returns Promise<User>