zego-zim-miniprogram
Version:
ZEGO ZIM SDK for mini program
1,268 lines (1,267 loc) • 45.1 kB
TypeScript
import { ZIM } from './ZIM';
import { ZIMBlacklistChangeAction, ZIMCallInvitationMode, ZIMCallUserInfo, ZIMConnectionEvent, ZIMConnectionState, ZIMConversationChangeInfo, ZIMConversationSyncState, ZIMConversationType, ZIMError, ZIMFriendApplicationInfo, ZIMFriendApplicationListChangeAction, ZIMFriendInfo, ZIMFriendListChangeAction, ZIMGroupApplicationInfo, ZIMGroupApplicationListChangeAction, ZIMGroupAttributesUpdateInfo, ZIMGroupEvent, ZIMGroupFullInfo, ZIMGroupMemberEvent, ZIMGroupMemberInfo, ZIMGroupMemberState, ZIMGroupMuteInfo, ZIMGroupOperatedInfo, ZIMGroupState, ZIMGroupVerifyInfo, ZIMMessage, ZIMMessageDeleteType, ZIMMessagePinStatusChangeInfo, ZIMMessageReaction, ZIMMessageReactionChangeInfo, ZIMMessageReceiptInfo, ZIMMessageReceivedInfo, ZIMMessageRootRepliedCountInfo, ZIMMessageSentStatusChangeInfo, ZIMRevokeMessage, ZIMRoomAttributesUpdateInfo, ZIMRoomEvent, ZIMRoomMemberAttributesUpdateInfo, ZIMRoomOperatedInfo, ZIMRoomState, ZIMUserFullInfo, ZIMUserInfo, ZIMUserRule, ZIMUserStatus } from './ZIMDefines';
export interface ZIMEventHandler {
/**
* The callback for error information.
*
* When an exception occurs in the SDK, the callback will prompt detailed information.
*
* @param zim ZIM instance.
* @param errorInfo The error information
*/
error: (zim: ZIM, errorInfo: ZIMError) => void;
/**
* Experimental API callback.
*
* Receive experimental API callbacks in JSON string format.
*
* @param zim ZIM instance.
* @param content Callback content in JSON string format.
*/
experimentalEventReceived: (zim: ZIM, content: string) => void;
/**
* A reminder callback that the token is about to expire.
*
* @param zim ZIM instance.
* @param data The token will expire event callback result
*/
tokenWillExpire: (zim: ZIM, data: ZIMEventOfTokenWillExpireResult) => void;
/**
* The event callback when the connection state changes.
*
* @param zim zim ZIM instance.
* @param data The connection state changed event callback result
*/
connectionStateChanged: (zim: ZIM, data: ZIMEventOfConnectionStateChangedResult) => void;
/**
* In the multi-terminal login scenario, after the user modifies their information on device A, other online multi-terminal devices will receive this callback. For offline devices, after the user goes online, they need to call the [ZIM.QueryUsersInfo] interface to actively query user information.
*
* @param zim ZIM instance.
* @param data The user info changed event callback result
*/
userInfoUpdated: (zim: ZIM, data: ZIMEventOfUserInfoUpdatedResult) => void;
/**
* TODO
*
* @param zim ZIM instance.
* @param data The user rule changed event callback result
*/
userRuleUpdated: (zim: ZIM, data: ZIMEventOfUserRuleUpdatedResult) => void;
/**
* TODO
*
* @param zim ZIM instance.
* @param data The user status changed event callback result
*/
userStatusUpdated: (zim: ZIM, data: ZIMEventOfUserStatusUpdatedResult) => void;
/**
* Received notification callback for session update.
*
* Available since: 2.0.0 and above.
* Description: Trigger this callback to return notification of session updates when a session is added, deleted, or modified.
* When to call /Trigger: Notifications are triggered when a new message is updated in the session, or when the session itself is added, deleted, or modified.
* Caution: ConversationID is the same as single chat toUserID and group chat GroupID.
* Related APIs: Through [sendPeerMessage] , [sendGroupMessage], [sendRoomMessage], [deleteConversation] [deleteMessage], [deleteMessageByConversationID] trigger.
*
* @param zim ZIM instance.
* @param data The conversation changed event callback result
*/
conversationChanged: (zim: ZIM, data: ZIMEventOfConversationChangedResult) => void;
/**
* Received notification callback for session update.
*
* Available since: 2.0.0 and above.
* Description: Trigger this callback to return notification of session updates when a session is added, deleted, or modified.
* When to call /Trigger: Notifications are triggered when a new message is updated in the session, or when the session itself is added, deleted, or modified.
* Caution: ConversationID is the same as single chat toUserID and group chat GroupID.
* Related APIs: Through [sendPeerMessage] , [sendGroupMessage], [sendRoomMessage], [deleteConversation] [deleteMessage], [deleteMessageByConversationID] trigger.
*
* @param zim ZIM instance.
* @param data The conversation total unread message count changed event callback result
*/
conversationTotalUnreadMessageCountUpdated: (zim: ZIM, data: ZIMEventOfConversationTotalUnreadMessageCountUpdatedResult) => void;
/**
* Received notification callback when the message receiver has read this receipt message.
*
* Available since: 2.5.0 and above.
* Description: When the message receiver has read the session, the message sender knows through this callback.
* When to call /Trigger: Trigger a notification when the message receiver has read the session.
* Related APIs: triggered when the peer calls via [sendConversationMessageReceiptRead].
*
* @param zim ZIM instance.
* @param data The conversation message receipt changed event callback result
*/
conversationMessageReceiptChanged: (zim: ZIM, data: ZIMEventOfConversationMessageReceiptChangedResult) => void;
/**
* When multiple login ends delete all sessions, the local end triggers the callback to notify the local end that all sessions are deleted.
*
* Available since: 2.12.0 and above.
* Description: When multiple login ends delete all sessions, the local end triggers the callback to notify the local end that all sessions are deleted.
* When to call /Trigger: When another end clears all unread sessions, the local end triggers a notification.
* Related APIs: Triggered by [deleteAllConversations].
*
* @param zim ZIM instance.
* @param data The conversations all deleted event callback result
*/
conversationsAllDeleted: (zim: ZIM, data: ZIMEventOfConversationsAllDeletedResult) => void;
/**
* Notification of synchronization status change events between the conversation list and the server
*
* Available since: 2.21.0 and above.
*
* @param zim ZIM instance.
* @param data The callback result of the conversation list and server status synchronization event
*/
conversationSyncStateChanged: (zim: ZIM, data: ZIMEventOfConversationSyncStateChangedResult) => void;
/**
* The callback for receiving peer-to-peer message.
*
* When receiving peer-to-peer message from other user, you will receive this callback.
*
* @deprecated Deprecated since ZIM 2.18.0, Please use [onPeerMessageReceived] instead.
* @param zim ZIM instance.
* @param data The receive peer message event callback result
*/
receivePeerMessage: (zim: ZIM, data: ZIMEventOfReceiveConversationMessageResult) => void;
/**
* The callback for receiving room message.
*
* This callback will be triggered when new message is received in a room.
*
* @deprecated This callback is deprecated. Please use [onRoomMessageReceived] instead.
* @param zim ZIM instance.
* @param data The receive room message event callback result
*/
receiveRoomMessage: (zim: ZIM, data: ZIMEventOfReceiveConversationMessageResult) => void;
/**
* The callback for receiving group message.
*
* This callback will be triggered when new message is received in a group.
*
* @deprecated This callback is deprecated. Please use [onGroupMessageReceived] instead.
* @param zim ZIM instance.
* @param data The receive group message event callback result
*/
receiveGroupMessage: (zim: ZIM, data: ZIMEventOfReceiveConversationMessageResult) => void;
/**
* The callback for receiving peer-to-peer message.
*
* When receiving peer-to-peer message from other user, you will receive this callback.
*
* @param zim ZIM instance.
* @param data The receive peer message event callback result
*/
peerMessageReceived: (zim: ZIM, data: ZIMEventOfConversationMessageReceivedResult) => void;
/**
* The callback for receiving room message.
*
* @param zim ZIM instance.
* @param data The receive room message event callback result
*/
roomMessageReceived: (zim: ZIM, data: ZIMEventOfConversationMessageReceivedResult) => void;
/**
* The callback for receiving group message.
*
* @param zim ZIM instance.
* @param data The receive group message event callback result
*/
groupMessageReceived: (zim: ZIM, data: ZIMEventOfConversationMessageReceivedResult) => void;
/**
* The callback for receiving broadcast message.
*
* Supported version: 2.10.0 or later.
* Description: The callback is received when the server interface [SendMessageToAllUsers] sends a message.
* Call time: This callback is received after logging in to the ZIM service and the server call the [SendMessageToAllUsers] interface to send a message.
*
* @param zim ZIM instance.
* @param data The event result for receiving broadcast message.
*/
broadcastMessageReceived: (zim: ZIM, data: ZIMEventOfBroadcastMessageReceivedResult) => void;
/**
* The callback for message sent status changed.
*
* @param zim ZIM instance.
* @param data The message sent status changed event callback result
*/
messageSentStatusChanged: (zim: ZIM, data: ZIMEventOfMessageSentStatusChangedResult) => void;
/**
* Received notification callback when the message receiver confirms that the message has been read.
*
* Available since: 2.5.0 and above.
* Description: When the message receiver confirms that the message has been read, the message sender knows through this callback.
* When to call /Trigger: Trigger a notification when the message receiver has read the message.
* Related APIs: Triggered when the peer calls via [sendMessageReceiptsRead].
*
* @param zim ZIM instance.
* @param data The message receipt change event callback result
*/
messageReceiptChanged: (zim: ZIM, data: ZIMEventOfMessageReceiptChangedResult) => void;
/**
* Received notification callback when some one else sends a message and then revoke a message sent by themselves.
*
* Available since: 2.5.0 and above.
* Description: This callback is received when some one else sends a message and then revoke.
* When to call /Trigger: This callback occurs when a ZIM instance is created with [create] and the other user revoke a message.
* Related APIs: You can revoke message to other members via [revokeMessage].
*
* @param zim ZIM instance.
* @param data The message revoke event callback result
*/
messageRevokeReceived: (zim: ZIM, data: ZIMEventOfMessageRevokeReceivedResult) => void;
/**
* The callback is received when reactions change
*
* Supported version: 2.10.0 or later.
* When to Call: This callback can be registered after the ZIM instance is created by [create] and before login.
* When to Trigger: After other users add or delete reactions to messages in private or group chats.
* Related APIs: [addMessageReaction]、[deleteMessageReaction]
*
* @param zim ZIM instance.
* @param data The message reaction change event callback result
*/
messageReactionsChanged: (zim: ZIM, data: ZIMEventOfMessageReactionsChangedResult) => void;
/**
* The callback is received when a message is deleted.
*
* @param zim ZIM instance.
* @param data The message delete event callback result
*/
messageDeleted: (zim: ZIM, data: ZIMEventOfMessageDeletedResult) => void;
/**
* The callback is received when the message replied information changes.
*
* @param zim ZIM instance.
* @param data The message replied information change event callback result
*/
messageRepliedInfoChanged: (zim: ZIM, data: ZIMEventOfMessageRepliedInfoChangedResult) => void;
/**
* The callback is received when the message replied count changes.
*
* @param zim ZIM instance.
* @param data The message replied count change event callback result
*/
messageRepliedCountChanged: (zim: ZIM, data: ZIMEventOfMessageRepliedCountChangedResult) => void;
/**
* The callback is received when a message is edited.
*
* @param zim ZIM instance.
* @param data The message edited event callback result.
*/
messageEdited: (zim: ZIM, data: ZIMEventOfMessageEditedResult) => void;
/**
* The callback is received when a message is pinned.
*
* @param zim ZIM instance.
* @param data The message edited event callback result.
*/
messagePinStatusChanged: (zim: ZIM, data: ZIMEventOfMessagePinStatusChangedResult) => void;
/**
* The event callback when the room connection status changes.
*
* Description:event callback when the room connection status changes.
* When to call::After creating a ZIM instance through [create], you can call this interface.
* Related APIs:through [onTokenWillExpire], the callback will be received when the token is about to expire.
*
* @param zim ZIM instance.
* @param data The room state change event callback result
*/
roomStateChanged: (zim: ZIM, data: ZIMEventOfRoomStateChangedResult) => void;
/**
* Callback when other members join the room.
*
* After joining a room, this callback will be triggered when other members also join this room.
*
* @param zim ZIM instance.
* @param data The room member joined event callback result
*/
roomMemberJoined: (zim: ZIM, data: ZIMEventOfRoomMemberChangedResult) => void;
/**
* Callback when other members leave the room.
*
* After joining a room, this callback will be triggered when other members leave this room.
*
* @param zim ZIM instance.
* @param data The room member left event callback result
*/
roomMemberLeft: (zim: ZIM, data: ZIMEventOfRoomMemberChangedResult) => void;
/**
* Event callback when the room attributes changes.
*
* Available since: 1.3.0.
* Description:When the room attribute in the room changes, it will be notified through this callback.
*
* @param zim ZIM instance.
* @param data The room attribute change event callback result
*/
roomAttributesUpdated: (zim: ZIM, data: ZIMEventOfRoomAttributesUpdatedResult) => void;
/**
* Event callback when the room attributes batch changes.
*
* Available since: 1.3.0.
* Description:When the room attribute in the room changes, it will be notified through this callback.
*
* @param zim ZIM instance.
* @param data The room attribute batch change event callback result
*/
roomAttributesBatchUpdated: (zim: ZIM, data: ZIMEventOfRoomAttributesUpdatedResult) => void;
/**
* Event callback when the room member attributes changes.
*
* @param zim ZIM instance.
* @param data The room member attribute change event callback result
*/
roomMemberAttributesUpdated: (zim: ZIM, data: ZIMEventOfRoomMembersAttributesUpdatedResult) => void;
/**
* Event callback when the group state changes.
*
* Description: allback notification of group status change.
* Use cases: Scenarios that require interaction based on the group status.
* When to call /Trigger: A notification is triggered when a group is created, joined, left, or dismissed.
* Related APIs: [createGroup] : creates a group. [joinGroup] : joins a group. [leaveGroup], leave the group. [dismissGroup]; dismiss the group.
*
* @param zim ZIM instance.
* @param data The group state change event callback result
*/
groupStateChanged: (zim: ZIM, data: ZIMEventOfGroupStateChangedResult) => void;
/**
* Event callback when the group name changes.
*
* Description: Group name change notification callback.
* Use cases: If the group name is changed, you need to synchronize the latest group name.
* When to call /Trigger: The group name is changed. Procedure
* Related APIs: [updateGroupName] : updates the group name.
*
* @param zim ZIM instance.
* @param data Group name change event result.
*/
groupNameUpdated: (zim: ZIM, data: ZIMEventOfGroupNameUpdatedResult) => void;
/**
* Event callback when the group avatar changes.
*
* todo
*
* @param zim ZIM instance.
* @param data Group avatar change event result.
*/
groupAvatarUrlUpdated: (zim: ZIM, data: ZIMEventOfGroupAvatarUrlUpdatedResult) => void;
/**
* Event callback when the group notice changes.
*
* Description: Group bulletin Change notification callback.
* Use cases: If a group bulletin changes, you need to synchronize the latest bulletin content.
* When to call /Trigger: The group bulletin is changed. Procedure.
* Related APIs: [updateGroupNotice], which updates the group notice.
*
* @param zim ZIM instance.
* @param data Group notice change event result.
*/
groupNoticeUpdated: (zim: ZIM, data: ZIMEventOfGroupNoticeUpdatedResult) => void;
/**
* Event callback when the group alias changes.
*
* Description: Group alias change notification callback.
* Use cases: If the group alias is changed, you need to synchronize the latest alias content.
* When to call /Trigger: The group alias is changed. Procedure.
* Related APIs: [updateGroupAlias], which updates the group alias.
*
* @param zim ZIM instance.
* @param data Group alias change event result.
*/
groupAliasUpdated: (zim: ZIM, data: ZIMEventOfGroupAliasUpdatedResult) => void;
/**
* Event callback when the group attributes change.
*
* Group attributes update notification callback.
* Description: Group attribute change notification callback.
* Use cases: When group attributes are changed, you need to synchronize the latest group attributes.
* When to call /Trigger: Triggered when group properties are set, updated, or deleted.
* Impacts on other APIs: [setGroupAttributes] updates group attributes. [deleteGroupAttributes], delete the group attribute.
*
* @param zim ZIM instance.
* @param data Group attribute change event result.
*/
groupAttributesUpdated: (zim: ZIM, data: ZIMEventOfGroupAttributesUpdatedResult) => void;
/**
* Event callback when the group is muted.
*
* @param zim ZIM instance.
* @param data Group mute event result.
*/
groupMutedInfoUpdated: (zim: ZIM, data: ZIMEventOfGroupMutedInfoUpdatedResult) => void;
/**
* Event callback when the group verification information changes.
*
* @param zim ZIM instance.
* @param data Group verification information change event result.
*/
groupVerifyInfoUpdated: (zim: ZIM, data: ZIMEventOfGroupVerifyInfoUpdatedResult) => void;
/**
* Event callback when the group member status changes.
*
* Use cases: Scenarios that require interaction based on group member states.
* When to call /Trigger: Notification is triggered when a group is created, joined, left, or dismissed, or a user is invited to join or kicked out of the group.
* Related APIs: [createGroup] : creates a group. [joinGroup] : joins a group. [leaveGroup], leave the group. [dismissGroup]; dismiss the group. [intiveUsersIntoGroup], which invites users to join the group. [kickoutGroupMember] kicks the user out of the group.
*
* @param zim
* @param data Group member status change event result.
*/
groupMemberStateChanged: (zim: ZIM, data: ZIMEventOfGroupMemberStateChangedResult) => void;
/**
* Event callback when the group member information changes.
*
* Use cases: After the basic information of group members is changed, you need to display or interact with group members on the page.
* When to call /Trigger: The result is displayed after the group member information is changed.
* Related APIs: [setGroupMemberNickname] : updates the nickname of a group member. [setGroupMemberRole] : updates the group member role. [transferGroupOwner], group master transfer.
*
* @param zim ZIM instance.
* @param data Group member information change event result.
*/
groupMemberInfoUpdated: (zim: ZIM, data: ZIMEventOfGroupMemberInfoUpdatedResult) => void;
/**
* Event callback when the group application list changes.
*
* @param zim ZIM instance.
* @param data Group application list change event result.
*/
groupApplicationListChanged: (zim: ZIM, data: ZIMEventOfGroupApplicationListChangedResult) => void;
/**
* Event callback when the group application information changes.
*
* @param zim ZIM instance.
* @param data Group application information change event result.
*/
groupApplicationUpdated: (zim: ZIM, data: ZIMEventOfGroupApplicationUpdatedResult) => void;
/**
* Event callback when the call invitation is created.
*
* @param zim ZIM instance.
* @param data Call invitation creation event result.
*/
callInvitationCreated: (zim: ZIM, data: ZIMEventOfCallInvitationCreatedResult) => void;
/**
* Event callback when the call invitation is received.
*
* Supported versions: 2.0.0 and above.
* Business scenario: The invitee will call this callback after the inviter sends a call invitation.
* When to call: After creating a ZIM instance through [create].
* Note: If the user is not in the invitation list or not online, this callback will not be called.
* Related interface: [callInvite].
*
* @param zim ZIM instance.
* @param data Call invitation reception event result.
*/
callInvitationReceived: (zim: ZIM, data: ZIMEventOfCallInvitationReceivedResult) => void;
/**
* Event callback when the call invitation is cancelled.
*
* Supported versions: 2.0.0 and above.
* Business scenario: The invitee will call this callback after the inviter cancels the call invitation.
* When to call: After creating a ZIM instance through [create].
* Note: If the user is not in the cancel invitation list or is offline, this callback will not be called.
* Related interface: [callCancel].
*
* @param zim ZIM instance.
* @param data Call invitation cancellation event result.
*/
callInvitationCancelled: (zim: ZIM, data: ZIMEventOfCallInvitationCancelledResult) => void;
/**
* Event callback when the call invitation is ended.
*
* @param zim ZIM instance.
* @param data Call invitation end event result.
*/
callInvitationEnded: (zim: ZIM, data: ZIMEventOfCallInvitationEndedResult) => void;
/**
* Event callback when the call invitation is rejected.
*
* Supported versions: 2.0.0 and above.
* Detail description: After the invitee accepts the call invitation, this callback will be received when the inviter is online.
* Business scenario: The inviter will receive this callback after the inviter accepts the call invitation.
* When to call: After creating a ZIM instance through [create].
* Note: This callback will not be called if the user is not online.
* Related interface: [callAccept].
*
* @deprecated Deprecated since 2.9.0, pleace use [onCallUserStateChanged] instead.
* @param zim ZIM instance.
* @param data Call invitation rejection event result.
*/
callInvitationRejected: (zim: ZIM, data: ZIMEventOfCallInvitationRejectedResult) => void;
/**
* Event callback when the call invitation is accepted.
*
* Detail description: After the invitee accepts the call invitation, this callback will be received when the inviter is online.
* Business scenario: The inviter will receive this callback after the inviter accepts the call invitation.
* When to call: After creating a ZIM instance through [create].
* Note: This callback will not be called if the user is not online.
* Related interface: [callAccept].
*
* @deprecated Deprecated since 2.9.0, pleace use [onCallUserStateChanged] instead.
* @param zim ZIM instance.
* @param data Call invitation acceptance event result.
*/
callInvitationAccepted: (zim: ZIM, data: ZIMEventOfCallInvitationAcceptedResult) => void;
/**
* Event callback when the call invitation times out.
*
* Supported versions: 2.9.0 and above.
* Detail description: When the call invitation times out, the invitee does not respond and will receive a callback.
* Business scenario: If the invitee does not respond before the timeout period, this callback will be received.
* When to call: After creating a ZIM instance through [create].
* Note: If the user is not on the invitation list or is not online, the callback will not be received.
* Related interfaces: [callInvite], [callAccept], [callReject].
*
* @param zim ZIM instance.
* @param data Call invitation timeout event result.
*/
callInvitationTimeout: (zim: ZIM, data: ZIMEventOfCallInvitationTimeoutResult) => void;
/**
* Event callback when the call invitation invitee times out.
*
* Supported versions: 2.0.0 and above.
* Detail description: When the call invitation times out, the invitee does not respond, and the inviter will receive a callback.
* Business scenario: The invitee does not respond before the timeout period, and the inviter will receive this callback.
* When to call: After creating a ZIM instance through [create].
* Note: If the user is not the inviter who initiated this call invitation or is not online, the callback will not be received.
* Related interfaces: [callInvite], [callAccept], [callReject].
*
* @deprecated Deprecated since 2.9.0, pleace use [onCallUserStateChanged] instead.
* @param zim ZIM instance.
* @param data Call invitation invitee answered timeout event result.
*/
callInviteesAnsweredTimeout: (zim: ZIM, data: ZIMEventOfCallInviteesAnsweredTimeoutResult) => void;
/**
* Event callback when the call invitation user status changes.
*
* Supported versions: 2.9.0 and above.
* Detail description: Listen for calling user status changes.
* When to call: When a new member is invited to a call, or a member accepts, rejects, exits, or a member response times out, all users on the current call invitation whose status is "Inviting," "Accepted," and "Received" receive the callback here. If the member is not online at the time of notification, the call is still ongoing when the login succeeds. The status changes of all members during the offline period will be sent to the user at one time.
* Note: If the user is not the inviter who initiated this call invitation or is not online, the callback will not be received.
* Related APIs: [callInvite], [callingInvite], [callAccept], [callReject],[callQuit].
*
* @param zim ZIM instance.
* @param data Call invitation user status change event result.
*/
callUserStateChanged: (zim: ZIM, data: ZIMEventOfCallUserStateChangedResult) => void;
/**
* Event callback when the friend list changes.
*
* @param zim ZIM instance.
* @param data Friend list change event result.
*/
friendListChanged: (zim: ZIM, data: ZIMEventOfFriendListChangedResult) => void;
/**
* Event callback when the friend information changes.
*
* @param zim
* @param data Friend information change event result.
*/
friendInfoUpdated: (zim: ZIM, data: ZIMEventOfFriendInfoUpdatedResult) => void;
/**
* Event callback when the friend application list changes.
*
* @param zim ZIM instance.
* @param data Friend application list change event result.
*/
friendApplicationListChanged: (zim: ZIM, data: ZIMEventOfFriendApplicationListChangedResult) => void;
/**
* Event callback when the friend application information changes.
*
* @param zim ZIM instance.
* @param data Friend application information change event result.
*/
friendApplicationUpdated: (zim: ZIM, data: ZIMEventOfFriendApplicationUpdatedResult) => void;
/**
* Event callback when the blacklist changes.
*
* @param zim ZIM instance.
* @param data Blacklist change event result.
*/
blacklistChanged: (zim: ZIM, data: ZIMEventOfBlacklistChangedResult) => void;
}
/**
* todo
*
* @param state Connection state
* @param event Connection event
* @param extendedData Extra information when the event occurs, a standard JSON string
*/
export interface ZIMEventOfConnectionStateChangedResult {
/** Connection state */
state: ZIMConnectionState;
/** Connection event */
event: ZIMConnectionEvent;
/** Extra information when the event occurs, a standard JSON string */
extendedData: string;
}
/**
* todo
*
* @param second The remaining seconds before the token expires.
*/
export interface ZIMEventOfTokenWillExpireResult {
/** The remaining seconds before the token expires. */
second: number;
}
/**
* todo
*
* @param info User info
*/
export interface ZIMEventOfUserInfoUpdatedResult {
/** User info */
info: ZIMUserFullInfo;
}
/**
* todo
*
* @param userStatusList User status list
*/
export interface ZIMEventOfUserStatusUpdatedResult {
/** User status list */
userStatusList: ZIMUserStatus[];
}
/**
* todo
*
* @param userRule User rule
*/
export interface ZIMEventOfUserRuleUpdatedResult {
/** User rule */
userRule: ZIMUserRule;
}
/**
* todo
*
* @param infoList Conversation change info list
*/
export interface ZIMEventOfConversationChangedResult {
/** Conversation change info list */
infoList: ZIMConversationChangeInfo[];
}
/**
* todo
*
* @param count Conversation count
*/
export interface ZIMEventOfConversationsAllDeletedResult {
/** Conversation count */
count: number;
}
/**
* todo
*
* @param state Conversation synchronization state
*/
export interface ZIMEventOfConversationSyncStateChangedResult {
/** Conversation synchronization state */
state: ZIMConversationSyncState;
}
/**
* todo
*
* @param totalUnreadMessageCount Total unread message count
*/
export interface ZIMEventOfConversationTotalUnreadMessageCountUpdatedResult {
/** Total unread message count */
totalUnreadMessageCount: number;
}
/**
* todo
*
* @param infos Conversation message receipt change info list
*/
export interface ZIMEventOfConversationMessageReceiptChangedResult {
/** Conversation message receipt change info list */
infos: ZIMMessageReceiptInfo[];
}
/**
* todo
*
* @param infos Message receipt change info list
*/
export interface ZIMEventOfMessageReceiptChangedResult {
/** Message receipt change info list */
infos: ZIMMessageReceiptInfo[];
}
/**
* todo
*
* @param messageList Message revoke list
*/
export interface ZIMEventOfMessageRevokeReceivedResult {
/** Message revoke list */
messageList: ZIMRevokeMessage[];
}
/**
* todo
*
* @param reactions Message reaction change info list
* @param changeInfoList Message reaction change info list
*/
export interface ZIMEventOfMessageReactionsChangedResult {
/** Message reaction change info list */
reactions: ZIMMessageReaction[];
/** Message reaction change info list */
changeInfoList: ZIMMessageReactionChangeInfo[];
}
/**
* todo
*
* @param infos Message root reply count change info list
*/
export interface ZIMEventOfMessageRepliedCountChangedResult {
/** Message root reply count change info list */
infos: ZIMMessageRootRepliedCountInfo[];
}
/**
* todo
*
* @param messageList Message replied info change info list
*/
export interface ZIMEventOfMessageRepliedInfoChangedResult {
/** Message replied info change info list */
messageList: ZIMMessage[];
}
/**
* todo
*
* @param conversationID Conversation ID
* @param conversationType Conversation type
* @param messageDeleteType Message delete type
* @param messageList Message delete list. This parameter is valid when isDeleteConversationAllMessage is false and ZIMMessageDeleteType is [ZIMMessageDeleteTypeMessageListDeleted].
*/
export interface ZIMEventOfMessageDeletedResult {
/** Conversation ID */
conversationID: string;
/** Conversation type */
conversationType: ZIMConversationType;
/** @deprecated This field is deprecated; please use [messageDeleteType] instead. */
isDeleteConversationAllMessage: boolean;
/** Message delete type */
messageDeleteType: ZIMMessageDeleteType;
/** Message delete list. This parameter is valid when isDeleteConversationAllMessage is false and ZIMMessageDeleteType is [ZIMMessageDeleteTypeMessageListDeleted]. */
messageList: ZIMMessage[];
}
/**
* todo
*
* @param infos Message sent status change info list
*/
export interface ZIMEventOfMessageSentStatusChangedResult {
/** Message sent status change info list */
infos: ZIMMessageSentStatusChangeInfo[];
}
/**
* todo
*
* @param message Broadcast message
*/
export interface ZIMEventOfBroadcastMessageReceivedResult {
/** Broadcast message */
message: ZIMMessage;
}
/**
* todo
*
* @param messageList Conversation message list
* @param fromConversationID Message source conversation ID
* @param info Message received info
*/
export interface ZIMEventOfConversationMessageReceivedResult {
/** Conversation message list */
messageList: ZIMMessage[];
/** Message source conversation ID */
fromConversationID: string;
/** Message received info */
info: ZIMMessageReceivedInfo;
}
/**
* todo
*
* @deprecated Deprecated; please use [ZIMEventOfConversationMessageReceivedResult] instead.
* @param messageList Conversation message list
* @param fromConversationID Message source conversation ID
*/
export interface ZIMEventOfReceiveConversationMessageResult {
/** Conversation message list */
messageList: ZIMMessage[];
/** Message source conversation ID */
fromConversationID: string;
}
/**
* The message edited event callback result.
*
* @param messageList The message list.
*/
export interface ZIMEventOfMessageEditedResult {
/** The message list. */
messageList: ZIMMessage[];
}
/**
* The message pinned event callback result.
*
* @param infos The message pin status change info list.
*/
export interface ZIMEventOfMessagePinStatusChangedResult {
/** The message pin status change info list. */
infos: ZIMMessagePinStatusChangeInfo[];
}
/**
* todo
*
* @param roomID Room ID
* @param state Room state
* @param event Room state change event
* @param extendedData Extended data
*/
export interface ZIMEventOfRoomStateChangedResult {
/** Room ID */
roomID: string;
/** Room state */
state: ZIMRoomState;
/** Room state change event */
event: ZIMRoomEvent;
/** Extended data */
extendedData: string;
}
/**
* todo
*
* @param roomID Room ID
* @param memberList Room member list
*/
export interface ZIMEventOfRoomMemberChangedResult {
/** Room ID */
roomID: string;
/** Room member list */
memberList: ZIMUserInfo[];
}
/**
* todo
*
* @param roomID Room ID
* @param infos Room attribute change info list
*/
export interface ZIMEventOfRoomAttributesUpdatedResult {
/** Room ID */
roomID: string;
/** Room attribute change info list */
infos: ZIMRoomAttributesUpdateInfo[];
}
/**
* todo
*
* @param roomID Room ID
* @param infos Room member attribute change info list
* @param operatedInfo Operated info
*/
export interface ZIMEventOfRoomMembersAttributesUpdatedResult {
/** Room ID */
roomID: string;
/** Room member attribute change info list */
infos: ZIMRoomMemberAttributesUpdateInfo[];
/** Operated info */
operatedInfo: ZIMRoomOperatedInfo;
}
/**
* todo
*
* @param state Group state
* @param event Group state change event
* @param operatedInfo Operated info
* @param groupInfo Group info
*/
export interface ZIMEventOfGroupStateChangedResult {
/** Group state */
state: ZIMGroupState;
/** Group state change event */
event: ZIMGroupEvent;
/** Operated info */
operatedInfo: ZIMGroupOperatedInfo;
/** Group info */
groupInfo: ZIMGroupFullInfo;
}
/**
* todo
*
* @param groupID Group ID
* @param groupName Group name
* @param operatedInfo Operated info
*/
export interface ZIMEventOfGroupNameUpdatedResult {
/** Group ID */
groupID: string;
/** Group name */
groupName: string;
/** Operated info */
operatedInfo: ZIMGroupOperatedInfo;
}
/**
* todo
*
* @param groupID Group ID
* @param groupAvatarUrl Group avatar URL
* @param operatedInfo Operated info
*/
export interface ZIMEventOfGroupAvatarUrlUpdatedResult {
/** Group ID */
groupID: string;
/** Group avatar URL */
groupAvatarUrl: string;
/** Operated info */
operatedInfo: ZIMGroupOperatedInfo;
}
/**
* todo
*
* @param groupID Group ID
* @param groupNotice Group notice
* @param operatedInfo Operated info
*/
export interface ZIMEventOfGroupNoticeUpdatedResult {
/** Group ID */
groupID: string;
/** Group notice */
groupNotice: string;
/** Operated info */
operatedInfo: ZIMGroupOperatedInfo;
}
/**
* todo
*
* @param groupID Group ID
* @param groupAlias Group alias
* @param operatedUserID Operated user ID
*/
export interface ZIMEventOfGroupAliasUpdatedResult {
/** Group ID */
groupID: string;
/** Group alias */
groupAlias: string;
/** Operated user ID */
operatedUserID: string;
}
/**
* todo
*
* @param groupID Group ID
* @param infoList Group attribute change info list
* @param operatedInfo Operated info
*/
export interface ZIMEventOfGroupAttributesUpdatedResult {
/** Group ID */
groupID: string;
/** Group attribute change info list */
infoList: ZIMGroupAttributesUpdateInfo[];
/** Operated info */
operatedInfo: ZIMGroupOperatedInfo;
}
/**
* todo
*
* @param groupID Group ID
* @param mutedInfo Group mute info
* @param operatedInfo Operated info
*/
export interface ZIMEventOfGroupMutedInfoUpdatedResult {
/** Group ID */
groupID: string;
/** Group mute info */
mutedInfo: ZIMGroupMuteInfo;
/** Operated info */
operatedInfo: ZIMGroupOperatedInfo;
}
/**
* todo
*
* @param groupID Group ID
* @param verifyInfo Group verify info
* @param operatedInfo Operated info
*/
export interface ZIMEventOfGroupVerifyInfoUpdatedResult {
/** Group ID */
groupID: string;
/** Group verify info */
verifyInfo: ZIMGroupVerifyInfo;
/** Operated info */
operatedInfo: ZIMGroupOperatedInfo;
}
/**
* todo
*
* @param action Group application list change action
* @param applicationList Group application list
*/
export interface ZIMEventOfGroupApplicationListChangedResult {
/** Group application list change action */
action: ZIMGroupApplicationListChangeAction;
/** Group application list */
applicationList: ZIMGroupApplicationInfo[];
}
/**
* todo
*
* @param applicationList Group application list
*/
export interface ZIMEventOfGroupApplicationUpdatedResult {
/** Group application list */
applicationList: ZIMGroupApplicationInfo[];
}
/**
* todo
*
* @param groupID Group ID
* @param state Group member state
* @param event Group member state change event
* @param userList Group member list
* @param operatedInfo Operated info
*/
export interface ZIMEventOfGroupMemberStateChangedResult {
/** Group ID */
groupID: string;
/** Group member state */
state: ZIMGroupMemberState;
/** Group member state change event */
event: ZIMGroupMemberEvent;
/** Group member list */
userList: ZIMGroupMemberInfo[];
/** Operated info */
operatedInfo: ZIMGroupOperatedInfo;
}
/**
* todo
*
* @param groupID Group ID
* @param userList Group member list
* @param operatedInfo Operated info
*/
export interface ZIMEventOfGroupMemberInfoUpdatedResult {
/** Group ID */
groupID: string;
/** Group member list */
userList: ZIMGroupMemberInfo[];
/** Operated info */
operatedInfo: ZIMGroupOperatedInfo;
}
/**
* todo
*
* @param callID Call ID
* @param mode Call mode
* @param caller Caller user ID
* @param extendedData Extended data
* @param timeout Call timeout
* @param createTime Call create time
* @param callUserList Call user list
*/
export interface ZIMEventOfCallInvitationCreatedResult {
/** Call ID */
callID: string;
/** Call mode */
mode: ZIMCallInvitationMode;
/** Caller user ID */
caller: string;
/** Extended data */
extendedData: string;
/** Call timeout */
timeout: number;
/** Call create time */
createTime: number;
/** Call user list */
callUserList: ZIMCallUserInfo[];
}
/**
* todo
*
* @param callID Call ID
* @param mode Call mode
* @param caller Caller user ID
* @param inviter Inviter user ID
* @param extendedData Extended data
* @param timeout Call timeout
* @param createTime Call create time
* @param callUserList Call user list
*/
export interface ZIMEventOfCallInvitationReceivedResult {
/** Call ID */
callID: string;
/** Call mode */
mode: ZIMCallInvitationMode;
/** Caller user ID */
caller: string;
/** Inviter user ID */
inviter: string;
/** Extended data */
extendedData: string;
/** Call timeout */
timeout: number;
/** Call create time */
createTime: number;
/** Call user list */
callUserList: ZIMCallUserInfo[];
}
/**
* todo
*
* @param callID Call ID
* @param mode Call invitation mode.
* @param inviter Inviter user ID
* @param extendedData Extended data
*/
export interface ZIMEventOfCallInvitationCancelledResult {
/** Call ID */
callID: string;
/** Call invitation mode. */
mode: ZIMCallInvitationMode;
/** Inviter user ID */
inviter: string;
/** Extended data */
extendedData: string;
}
/**
* todo
*
* @param callID Call ID
* @param mode Call mode
*/
export interface ZIMEventOfCallInvitationTimeoutResult {
/** Call ID */
callID: string;
/** Call mode */
mode: ZIMCallInvitationMode;
}
/**
* todo
*
* @param callID Call ID
* @param mode Call mode
* @param caller Caller user ID
* @param operatedUserID Operated user ID
* @param extendedData Extended data
* @param endTime Call end time
*/
export interface ZIMEventOfCallInvitationEndedResult {
/** Call ID */
callID: string;
/** Call mode */
mode: ZIMCallInvitationMode;
/** Caller user ID */
caller: string;
/** Operated user ID */
operatedUserID: string;
/** Extended data */
extendedData: string;
/** Call end time */
endTime: number;
}
/**
* todo
*
* @param callID Call ID
* @param callUserList Call user list
*/
export interface ZIMEventOfCallUserStateChangedResult {
/** Call ID */
callID: string;
/** Call user list */
callUserList: ZIMCallUserInfo[];
}
/**
* todo
*
* @deprecated Deprecated
* @param callID Call ID
* @param invitee Invitee user ID
* @param extendedData Extended data
*/
export interface ZIMEventOfCallInvitationAcceptedResult {
/** Call ID */
callID: string;
/** Invitee user ID */
invitee: string;
/** Extended data */
extendedData: string;
}
/**
* todo
*
* @deprecated Deprecated
* @param callID Call ID
* @param invitee Invitee user ID
* @param extendedData Extended data
*/
export interface ZIMEventOfCallInvitationRejectedResult {
/** Call ID */
callID: string;
/** Invitee user ID */
invitee: string;
/** Extended data */
extendedData: string;
}
/**
* todo
*
* @deprecated Deprecated
* @param callID Call ID
* @param invitees Invitee user ID list
*/
export interface ZIMEventOfCallInviteesAnsweredTimeoutResult {
/** Call ID */
callID: string;
/** Invitee user ID list */
invitees: string[];
}
/**
* todo
*
* @param userList Blacklist user list
* @param action Action type
*/
export interface ZIMEventOfBlacklistChangedResult {
/** Blacklist user list */
userList: ZIMUserInfo[];
/** Action type */
action: ZIMBlacklistChangeAction;
}
/**
* todo
*
* @param friendList Friend list
* @param action Action type
*/
export interface ZIMEventOfFriendListChangedResult {
/** Friend list */
friendList: ZIMFriendInfo[];
/** Action type */
action: ZIMFriendListChangeAction;
}
/**
* todo
*
* @param friendList Friend info list
*/
export interface ZIMEventOfFriendInfoUpdatedResult {
/** Friend info list */
friendList: ZIMFriendInfo[];
}
/**
* Friend application list change event callback.
*
* @param applicationList Friend application list
* @param action Action type
*/
export interface ZIMEventOfFriendApplicationListChangedResult {
/** Friend application list */
applicationList: ZIMFriendApplicationInfo[];
/** Action type */
action: ZIMFriendApplicationListChangeAction;
}
/**
* todo
*
* @param applicationList Friend application list
*/
export interface ZIMEventOfFriendApplicationUpdatedResult {
/** Friend application list */
applicationList: ZIMFriendApplicationInfo[];
}