Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zego-zim-web

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zego-zim-web - npm Package Compare versions

Comparing version 1.2.2 to 2.0.0

1322

index.d.ts

@@ -0,768 +1,678 @@

export interface ZIMError {
code: ZIMErrorCode;
message: string;
}
export declare enum ZIMErrorCode {
/**
* Description: Success without exception.
*
* Use cases: Used to indicate that the operation is executed correctly.
*/
ZIMErrorCodeSuccess = 0,
/**
* Description: Failed, the guarantee is wrong.
*
* Use cases: Used in the operation guarantee strategy.
*/
ZIMErrorCodeFailed = 1,
/**
* Description: The incoming parameter is invalid.
*
* Use case: Used to protect the bottom strategy when the interface call fails due to incorrect parameters.
*/
ZIMErrorCodeParamInvalid = 6000001,
/**
* Description: The SDK is not initialized.
*
* Use case: Used for error return when the ZIM SDK is not initialized successfully.
*/
ZIMErrorCodeNoInit = 6000002,
/**
* Description: Trigger the background business frequency limit.
*
* Use cases: Used to trigger the error return when the background frequency limit is triggered.
*/
ZIMErrorCodeTouchLimit = 6000003,
/**
* Description: Invalid AppID.
*
* Use case: Used for error return of failure due to invalid AppID.
*/
ZIMErrorCodeInvalidAppid = 6000004,
/**
* Description: Failed to upload logs.
*
* Use cases: Used to return the error when the user fails to upload the log.
*/
ZIMErrorCodeUploadLogFailed = 6000010,
/**
* Description: Login failed.
*
* Use cases: Used to protect the bottom line when the login fails.
*/
ZIMErrorCodeLoginFailed = 6000101,
/**
* Description: The login failed due to background reasons.
*
* Use cases: Used for general error reporting of background errors that do not need to be external. The background error code will be marked with code.
*/
ZIMErrorCodeLoginServerError = 6000102,
/**
* Description: The token is invalid.
*
* Use cases: Used for the bottom-keeping strategy when the token verification fails.
*/
ZIMErrorCodeTokenInvalid = 6000103,
/**
* Description: Network Error.
*
* Use case: Used for error return when the connection status changes due to network reasons, or the execution operation fails due to network errors.
*/
ZIMErrorCodeNetworkError = 6000104,
/**
* Description: The token has expired.
*
* Use cases: Used to return an error that the target token has expired when the token verification fails.
*/
ZIMErrorCodeTokenExpired = 6000106,
/**
* Description: The token version number is wrong.
*
* Use case: Used to return an error that the target token version does not match when the token verification fails.
*/
ZIMErrorCodeTokenVersionError = 6000107,
/**
* Description: There is already a user logged in.
*
* Use case: Used in the case of already logged in, the error returned by calling login again.
*/
ZIMErrorCodeAlreadyLogin = 6000111,
/**
* Description: Not logged in.
*
* Use case: Used to call an error return that requires logging in to perform operations on the premise of unsuccessful login.
*/
ZIMErrorCodeNoLogin = 6000121,
/**
* Description: Connection service error
*
* Use case: Used for unified access link error return.
*/
ZIMErrorCodeConnectionServiceError = 6000150,
/**
* Description: Failed to send message.
*
* Use case: Used to protect the bottom policy when sending a message fails.
*/
ZIMErrorCodeSendMessageFailed = 6000201,
/**
* Description: The message sending failed due to background reasons.
*
* Use case: Used for general error reporting of background errors that do not need to be external. The background error code will be marked with code.
*/
ZIMErrorCodeMessageServerError = 6000202,
/**
* Description: The message failed to be sent due to network problems.
*
* Use case: Used for error return when sending a message failed due to network problems.
*/
ZIMErrorCodeMessageNetworkError = 6000204,
/**
* Description: The user is not in the correct room.
*
* Use case: Used to return the error that the user is not in the target room when sending a room message.
*/
ZIMErrorCodeSendRoomMessageFailedForNotInTheRoom = 6000205,
/**
* Description: The user is not joining room.
*
* Use case: Used for the bottom-keeping strategy when an error is caused by performing room operations when not entering the room.
*/
ZIMErrorCodeNotJoinRoom = 6000301,
/**
* Description: The room operation failed due to background reasons.
*
* Use case: Used for general error reporting of background errors that do not need to be external. The background error code will be marked with code.
*/
ZIMErrorCodeRoomServerError = 6000302,
/**
* Description: Failed to create room.
*
* Use case: Used to ensure the bottom-line strategy when the room fails to be created.
*/
ZIMErrorCodeCreateRoomFailed = 6000303,
/**
* Description: Failed to join the room.
*
* Use case: Used to ensure the bottom-line strategy when joining the room fails.
*/
ZIMErrorCodeJoinRoomFailed = 6000304,
/**
* Description: Failed to leave the room.
*
* Use case: Used to guarantee the bottom-line strategy when leaving the room failed.
*/
ZIMErrorCodeLeaveRoomFailed = 6000305,
/**
* Description: Want to create an existing room.
*
* Use case: It is used to return an error that fails to create a room using an existing RoomID.
*/
ZIMErrorCodeCreateExistRoom = 6000311,
/**
* Description: The number of rooms is limited.
*
* Use case: Used to create a room, the maximum number of rooms has been reached and it fails to return an error.
*/
ZIMErrorCodeCreateRoomCountLimit = 6000312,
/**
* Description: The number of users entering the room reaches the upper limit.
*
* Use case: Used to return the error when the number of users entering the room reaches the upper limit.
*/
ZIMErrorCodeJoinRoomLimit = 6000321
Success = 0,
Failed = 1,
CommonModuleParamInvalid = 6000001,
CommonModuleNotInit = 6000002,
CommonModuleInvalidAppID = 6000003,
CommonModuleTriggerSDKFrequencyLimit = 6000004,
CommonModuleTriggerServerFrequencyLimit = 6000005,
CommonModuleSwitchServerError = 6000006,
CommonModuleIMServerError = 6000007,
CommonModuleUploadLogError = 6000010,
NetworkModuleCommonError = 6000101,
NetworkModuleServerError = 6000102,
NetworkModuleTokenInvalid = 6000103,
NetworkModuleNetworkError = 6000104,
NetworkModuleTokenExpired = 6000106,
NetworkModuleTokenVersionError = 6000107,
NetworkModuleTokenTimeIsTooShort = 6000108,
NetworkModuleUserHasAlreadyLogged = 6000111,
NetworkModuleUserIsNotLogged = 6000121,
MessageModuleCommonError = 6000201,
MessageModuleServerError = 6000202,
MessageModuleSendMessageFailed = 6000203,
MessageModuleTargetDoesNotExist = 6000204,
MessageModuleCallError = 6000270,
MessageModuleCancelCallError = 6000271,
MessageModuleCallServerError = 6000272,
MessageModuleIsNotInvitor = 6000273,
MessageModuleIsNotInvitee = 6000274,
MessageModuleCallAlreadyExists = 6000275,
MessageModuleCallDoesNotExist = 6000276,
ConversationModuleCommonError = 6000601,
ConversationModuleServerError = 6000602,
ConversationModuleConversationDoesNotExist = 6000603,
RoomModuleCommonError = 6000301,
RoomModuleServerError = 6000302,
RoomModuleCreateRoomError = 6000303,
RoomModuleJoinRoomError = 6000304,
RoomModuleLeaveRoomError = 6000306,
RoomModuleUserIsNotInTheRoom = 6000321,
RoomModuleTheRoomDoesNotExist = 6000322,
RoomModuleTheRoomAlreadyExists = 6000323,
RoomModuleTheNumberOfExistingRoomsHasReachedLimit = 6000324,
RoomModuleTheNumberOfJoinedRoomsHasReachedLimit = 6000325,
RoomModuleRoomAttributesCommonError = 6000330,
RoomModuleRoomAttributesOperationFailedCompletely = 6000331,
RoomModuleRoomAttributesQueryFailed = 6000333,
RoomModuleTheNumberOfRoomAttributesExceedsLimit = 6000334,
RoomModuleTheLengthOfRoomAttributeKeyExceedsLimit = 6000335,
RoomModuleTheLengthOfRoomAttributeValueExceedsLimit = 6000336,
RoomModuleTheTotalLengthOfRoomAttributesValueExceedsLimit = 6000337,
GroupModuleCommonError = 6000501,
GroupModuleServerError = 6000502,
GroupModuleCreateGroupError = 6000503,
GroupModuleDismissGroupError = 6000504,
GroupModuleJoinGroupError = 6000505,
GroupModuleLeaveGroupError = 6000506,
GroupModuleKickoutGroupMemberError = 6000507,
GroupModuleInviteUserIntoGroupError = 6000508,
GroupModuleTransferOwnerError = 6000509,
GroupModuleUpdateGroupInfoError = 6000510,
GroupModuleQueryGroupInfoError = 6000511,
GroupModuleGroupAttributesOperationFailed = 6000512,
GroupModuleGroupAttributesQueryFailed = 6000513,
GroupModuleUpdateGroupMemberInfoError = 6000514,
GroupModuleQueryGroupMemberInfoError = 6000515,
GroupModuleQueryGroupListError = 6000516,
GroupModuleQueryGroupMemberListError = 6000517,
GroupModuleUserIsNotInTheGroup = 6000521,
GroupModuleMemberIsAlreadyInTheGroup = 6000522,
GroupModuleGroupDoesNotExist = 6000523,
GroupModuleGroupAlreadyExists = 6000524,
GroupModuleGroupMemberHasReachedLimit = 6000525,
GroupModuleGroupAttributeDoesNotExist = 6000526,
GroupModuleTheNumberOfGroupAttributesExceedsLimit = 6000531,
GroupModuleTheLengthOfGroupAttributeKeyExceedsLimit = 6000532,
GroupModuleTheLengthOfGroupAttributeValueExceedsLimit = 6000533,
GroupModuleTheTotalLengthOfGroupAttributesValueExceedsLimit = 6000534,
GroupModuleNoCorrespondingOperationAuthority = 6000541
}
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 Error information, please refer to the error codes document.
*/
error: (zim: ZIM, errorInfo: ZIMError) => void;
/**
* The event callback when the connection state changes.
*
* @param zim ZIM instance.
* @param state The current connection state after changed.
* @param event The event that caused the connection state to change.
* @param extendedData Extra information when the event occurs, a standard JSON format data.
*/
connectionStateChanged: (zim: ZIM, state: ZIMConnectionState, event: ZIMConnectionEvent, extendedData: string) => void;
/**
* A reminder callback that the token is about to expire.
*
* @param zim ZIM instance.
* @param second The remaining second before the token expires.
*/
tokenWillExpire: (zim: ZIM, second: number) => 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 messageList List of received messages.
* @param fromUserID The user ID of the message sender.
*/
receivePeerMessage: (zim: ZIM, messageList: Array<ZIMMessage>, fromUserID: string) => void;
/**
* The callback for receiving room message.
*
* This callback will be triggered when new message is received in a room.
*
* @param zim ZIM instance.
* @param messageList List of received messages.
* @param fromRoomID ID of the room where the message was received.
*/
receiveRoomMessage: (zim: ZIM, messageList: Array<ZIMMessage>, fromRoomID: string) => void;
/**
* event callback when the room connection status changes.
*
* Available since: 1.2.0 or above.
*
* 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 [tokenWillExpire], the callback will be received when the token is about to expire.
*
* @param zim ZIM instance.
* @param roomID The current room id.
* @param state The current room connection state after changed.
* @param event The event that caused the room connection state to change.
* @param extendedData Extra information when the event occurs, a standard JSON string.
*/
roomStateChanged: (zim: ZIM, state: ZIMRoomState, event: ZIMRoomEvent, extendedData: string, roomID: string) => void;
/**
* Callback when other members join the room.
*
* Available since: 1.2.0 or above.
*
* Description: After joining a room, when other members also join this room, they will receive this callback.
*
* Use cases:When other members in the room join, this callback will be called.
*
* When to call: After creating a ZIM instance through [create], and the user is in a room joined by other members, you can call this interface.
*
* Caution: If the user is not currently in this room, this callback will not be called.
*
* Related APIs: You can use [roomMemberLeft] to receive this callback when other room members leave.
*
* @param zim ZIM instance.
* @param memberList List of members who joined the room.
* @param roomID The ID of the room where this event occurred.
*/
roomMemberJoined: (zim: ZIM, memberList: Array<ZIMUserInfo>, roomID: string) => void;
/**
* Callback when other members leave the room.
*
* Available since: 1.2.0 or above.
*
* Description: After joining a room, when other members leave the room, they will receive this callback.
*
* Use cases: When other members in the room leave the room, this callback will be called.
*
* When to call: After creating a ZIM instance through [create], and the user is in the same room of other members, you can call this interface.
*
* Caution:If the user is not currently in this room, this callback will not be called.
*
* Related APIs: You can receive this callback when other room members join through [roomMemberJoined].
*
* @param zim ZIM instance.
* @param memberList List of members who left the room.
* @param roomID The ID of the room where this event occurred.
*/
roomMemberLeft: (zim: ZIM, memberList: Array<ZIMUserInfo>, roomID: string) => void;
connectionStateChanged: (zim: ZIM, data: ZIMEventOfConnectionStateChangedResult) => void;
tokenWillExpire: (zim: ZIM, data: ZIMEventOfTokenWillExpireResult) => void;
conversationChanged: (zim: ZIM, data: ZIMEventOfConversationChangedResult) => void;
conversationTotalUnreadMessageCountUpdated: (zim: ZIM, data: ZIMEventOfConversationTotalUnreadMessageCountUpdatedResult) => void;
receivePeerMessage: (zim: ZIM, data: ZIMEventOfReceiveConversationMessageResult) => void;
receiveGroupMessage: (zim: ZIM, data: ZIMEventOfReceiveConversationMessageResult) => void;
receiveRoomMessage: (zim: ZIM, data: ZIMEventOfReceiveConversationMessageResult) => void;
roomStateChanged: (zim: ZIM, data: ZIMEventOfRoomStateChangedResult) => void;
roomMemberJoined: (zim: ZIM, data: ZIMEventOfRoomMemberChangedResult) => void;
roomMemberLeft: (zim: ZIM, data: ZIMEventOfRoomMemberChangedResult) => void;
roomAttributesUpdated: (zim: ZIM, data: ZIMEventOfRoomAttributesUpdatedResult) => void;
roomAttributesBatchUpdated: (zim: ZIM, data: ZIMEventOfRoomAttributesUpdatedResult) => void;
groupStateChanged: (zim: ZIM, data: ZIMEventOfGroupStateChangedResult) => void;
groupNameUpdated: (zim: ZIM, data: ZIMEventOfGroupNameUpdatedResult) => void;
groupNoticeUpdated: (zim: ZIM, data: ZIMEventOfGroupNoticeUpdatedResult) => void;
groupAttributesUpdated: (zim: ZIM, data: ZIMEventOfGroupAttributesUpdatedResult) => void;
groupMemberStateChanged: (zim: ZIM, data: ZIMEventOfGroupMemberStateChangedResult) => void;
groupMemberInfoUpdated: (zim: ZIM, data: ZIMEventOfGroupMemberInfoUpdatedResult) => void;
callInvitationReceived: (zim: ZIM, data: ZIMEventOfCallInvitationReceivedResult) => void;
callInvitationCancelled: (zim: ZIM, data: ZIMEventOfCallInvitationCancelledResult) => void;
callInvitationTimeout: (zim: ZIM, data: ZIMEventOfCallInvitationTimeoutResult) => void;
callInvitationAccepted: (zim: ZIM, data: ZIMEventOfCallInvitationAcceptedResult) => void;
callInvitationRejected: (zim: ZIM, data: ZIMEventOfCallInvitationRejectedResult) => void;
callInviteesAnsweredTimeout: (zim: ZIM, data: ZIMEventOfCallInviteesAnsweredTimeoutResult) => void;
}
export interface ZIMEventOfConnectionStateChangedResult {
state: ZIMConnectionState;
event: ZIMConnectionEvent;
extendedData: string;
}
export interface ZIMEventOfTokenWillExpireResult {
second: number;
}
export interface ZIMEventOfConversationChangedResult {
infoList: ZIMConversationChangeInfo[];
}
export interface ZIMEventOfConversationTotalUnreadMessageCountUpdatedResult {
totalUnreadMessageCount: number;
}
export interface ZIMEventOfReceiveConversationMessageResult {
messageList: ZIMMessage[];
fromConversationID: string;
}
export interface ZIMEventOfRoomStateChangedResult {
roomID: string;
state: ZIMRoomState;
event: ZIMRoomEvent;
extendedData: string;
}
export interface ZIMEventOfRoomMemberChangedResult {
roomID: string;
memberList: ZIMUserInfo[];
}
export interface ZIMEventOfRoomAttributesUpdatedResult {
roomID: string;
infos: ZIMRoomAttributesUpdateInfo[];
}
export interface ZIMEventOfGroupStateChangedResult {
state: ZIMGroupState;
event: ZIMGroupEvent;
operatedInfo: ZIMGroupOperatedInfo;
groupInfo: ZIMGroupFullInfo;
}
export interface ZIMEventOfGroupNameUpdatedResult {
groupID: string;
groupName: string;
operatedInfo: ZIMGroupOperatedInfo;
}
export interface ZIMEventOfGroupNoticeUpdatedResult {
groupID: string;
groupNotice: string;
operatedInfo: ZIMGroupOperatedInfo;
}
export interface ZIMEventOfGroupAttributesUpdatedResult {
groupID: string;
infoList: ZIMGroupAttributesUpdateInfo[];
operatedInfo: ZIMGroupOperatedInfo;
}
export interface ZIMEventOfGroupMemberStateChangedResult {
groupID: string;
state: ZIMGroupMemberState;
event: ZIMGroupMemberEvent;
userList: ZIMGroupMemberInfo[];
operatedInfo: ZIMGroupOperatedInfo;
}
export interface ZIMEventOfGroupMemberInfoUpdatedResult {
groupID: string;
userList: ZIMGroupMemberInfo[];
operatedInfo: ZIMGroupOperatedInfo;
}
export interface ZIMEventOfCallInvitationReceivedResult {
callID: string;
inviter: string;
extendedData: string;
timeout: number;
}
export interface ZIMEventOfCallInvitationCancelledResult {
callID: string;
inviter: string;
extendedData: string;
}
export interface ZIMEventOfCallInvitationTimeoutResult {
callID: string;
}
export interface ZIMEventOfCallInvitationAcceptedResult {
callID: string;
invitee: string;
extendedData: string;
}
export interface ZIMEventOfCallInvitationRejectedResult {
callID: string;
invitee: string;
extendedData: string;
}
export interface ZIMEventOfCallInviteesAnsweredTimeoutResult {
callID: string;
invitees: string[];
}
export declare enum ZIMConnectionState {
/**
* Description: Unconnected state, enter this state before logging in and after logging out.
*
* Use cases: If there is a steady state abnormality in the process of logging in, such as AppID or Token are incorrect, or if the same user name is logged in elsewhere and the local end is kicked out, it will enter this state.
*/
ZIMConnectionStateDisconnected = 0,
/**
* Description: The state that the connection is being requested. It will enter this state after successful execution login function.
*
* Use cases: The display of the UI is usually performed using this state. If the connection is interrupted due to poor network quality, the SDK will perform an internal retry and will return to this state.
*/
ZIMConnectionStateConnecting = 1,
/**
* Description: The state that is successfully connected.
*
* Use cases: Entering this state indicates that login successfully and the user can use the SDK functions normally.
*/
ZIMConnectionStateConnected = 2
Disconnected = 0,
Connecting = 1,
Connected = 2,
Reconnecting = 3
}
export declare enum ZIMConnectionEvent {
/**
* Description: Success.
*/
ZIMConnectionEventSuccess = 0,
/**
* Description: The user actively logs in.
*/
ZIMConnectionEventActiveLogin = 1,
/**
* Description: Connection timed out.
*/
ZIMConnectionEventLoginTimeout = 2,
/**
* Description: The network connection is temporarily interrupted.
*/
ZIMConnectionEventLoginInterrupted = 3,
/**
* Description: Being kicked out.
*/
ZIMConnectionEventKickedOut = 4
Success = 0,
ActiveLogin = 1,
LoginTimeout = 2,
LoginInterrupted = 3,
KickedOut = 4
}
export interface ZIMLogConfig {
logLevel: string;
}
export interface ZIMUserInfo {
userID: string;
userName: string;
}
export interface ZIMErrorUserInfo {
userID: string;
reason: number;
}
export interface ZIMTokenRenewedResult {
token: string;
}
export interface ZIMUsersInfoQueriedResult {
userList: ZIMUserInfo[];
errorUserList: ZIMErrorUserInfo[];
}
export interface ZIMRoomMemberQueriedResult {
roomID: string;
memberList: ZIMUserInfo[];
nextFlag: string;
}
export declare enum ZIMConversationType {
Peer = 0,
Room = 1,
Group = 2
}
export declare enum ZIMConversationEvent {
Added = 0,
Updated = 1,
Disabled = 2
}
export declare enum ZIMConversationNotificationStatus {
Notify = 1,
DoNotDisturb = 2
}
export declare enum ZIMMessagePriority {
/**
* Description: Low priority.
*
* Use cases: Generally used to send unimportant messages such as barrage message in a room.
*/
ZIMMessagePriorityLow = 1,
/**
* Description: Medium priority.
*
* Use cases: Generally used to send regular chat messages.
*/
ZIMMessagePriorityMedium = 2,
/**
* Description: High priority.
*
* Use cases: Generally used to send important information such as gifts and rewards in a room.
*/
ZIMMessagePriorityHigh = 3
Low = 1,
Medium = 2,
High = 3
}
export declare enum ZIMMessageType {
/**
* Description: Normal text message.
*
* Use cases: Can be used to deliver ordinary text messages.
*/
ZIMMessageTypeText = 1,
/**
* Description: Custom binary message.
*
* Use cases: Can be used to transfer files, pictures and other binary messages.
*/
ZIMMessageTypeCustom = 2
Unknown = 0,
Text = 1,
Command = 2,
Barrage = 20
}
export declare enum ZIMRoomState {
/**
* Description: Disconnected state.
*
* Use cases: enter this state before entering the room and after exiting the room.
*/
ZIMRoomStateDisconnected = 0,
/**
* Description: The connection state is being requested.
*
* Use cases: and it will enter this state after the action of entering the room is executed successfully. The application interface is usually displayed through this state.
*/
ZIMRoomStateConnecting = 1,
/**
* Description: The connection is successful.
*
* Use cases: Entering this state means that the room has been successfully entered, and the user can use the room's functions normally.
*/
ZIMRoomStateConnected = 2
export declare enum ZIMMessageSentStatus {
Sending = 0,
Success = 1,
Failed = 2
}
export declare enum ZIMRoomEvent {
/**
* Description: Success.
*/
ZIMRoomEventSuccess = 0,
/**
* Description: The network in the room is temporarily interrupted.
*/
ZIMRoomEventNetworkInterrupted = 1,
/**
* Description: The network in the room is disconnected.
*/
ZIMRoomEventNetworkDisconnected = 2,
/**
* Description: The room not exist.
*/
ZIMRoomEventRoomNotExist = 3,
/**
* Description: The user actively creates a room.
*/
ZIMRoomEventActiveCreate = 4,
/**
* Description: Failed to create room.
*/
ZIMRoomEventCreateFailed = 5,
/**
* Description: The user starts to enter the room
*/
ZIMRoomEventActiveEnter = 6,
/**
* Description: user failed to enter the room.
*/
ZIMRoomEventEnterFailed = 7,
/**
* Description: user was kicked out of the room.
*/
ZIMRoomEventKickedOut = 8
export declare enum ZIMMessageDirection {
Send = 0,
Receive = 1
}
export interface ZIMError {
/**
* The storage path of the log files. Refer to the official website document for the default path.
*/
code: ZIMErrorCode;
/**
* Error infomation description.
*/
message: string;
export interface ZIMConversation {
conversationID: string;
conversationName: string;
type: ZIMConversationType;
unreadMessageCount: number;
orderKey: number;
notificationStatus: ZIMConversationNotificationStatus;
lastMessage?: ZIMMessage;
}
export interface ZIMLogConfig {
/**
* Local log level. The higher the level, the fewer print logs.
*
* value: 'debug' | 'info' | 'warn' | 'error' | 'report' | 'disable'
*/
logLevel: string;
export interface ZIMConversationChangeInfo {
event: ZIMConversationEvent;
conversation: ZIMConversation;
}
export interface ZIMMessage {
/**
* The priority of the message, this parameter can be modified before sending the message to specify the priority of the message.
*/
priority: ZIMMessagePriority;
/**
* Identifies the type of this message.
*/
type: ZIMMessageType;
/**
* The content of the text message or custom message.
*/
message: string | Uint8Array;
/**
* Description: The unique ID that identifies this message.
*
* Use cases: Can be used to index other messages.
*
* Caution: When the developer actively creates a message, there is no need to modify this parameter.
* This parameter only has a value during callback.
*/
messageID: string;
/**
* Description: Identifies which User sent this message.
*
* Use cases: Used to show who sent a message.
*
* Caution: When the developer actively creates a message, there is no need to modify this parameter.
* This parameter only has a value during callback.
*/
userID: string;
/**
* Description: Identifies the sending time of a message
*
* Use cases: Used to present the sending time of a message, and can be used for message sorting.
*
* Caution: This is a standard UNIX timestamp, in milliseconds.
*/
senderUserID: string;
timestamp: number;
conversationID: string;
conversationType: ZIMConversationType;
direction: ZIMMessageDirection;
sentStatus: ZIMMessageSentStatus;
orderKey: number;
conversationSeq: number;
}
export interface ZIMTextMessage extends ZIMMessage {
/**
* The content of the text message.
*/
type: ZIMMessageType.Text;
message: string;
}
export interface ZIMCustomMessage extends ZIMMessage {
/**
* The content of the custom message.
*/
export interface ZIMCommandMessage extends ZIMMessage {
type: ZIMMessageType.Command;
message: Uint8Array;
}
export interface ZIMUserInfo {
/**
* User ID, a string with a maximum length of 32 bytes or less. Only support numbers, English characters and '~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '=', '-', '`', ';', '’', ',', '.', '<', '>', '/', '\'.
*/
export interface ZIMBarrageMessage extends ZIMMessage {
type: ZIMMessageType.Barrage;
message: string;
}
export interface ZIMConversationQueryConfig {
nextConversation?: ZIMConversation;
count: number;
}
export interface ZIMConversationDeleteConfig {
isAlsoDeleteServerConversation: boolean;
}
export interface ZIMPushConfig {
title: string;
content: string;
extendedData: string;
}
export interface ZIMMessageSendConfig {
priority: ZIMMessagePriority;
pushConfig?: ZIMPushConfig;
}
export interface ZIMMessageDeleteConfig {
isAlsoDeleteServerMessage: boolean;
}
export interface ZIMMessageQueryConfig {
nextMessage?: ZIMMessage;
count: number;
reverse: boolean;
}
export interface ZIMConversationListQueriedResult {
conversationList: ZIMConversation[];
}
export interface ZIMConversationDeletedResult {
conversationID: string;
conversationType: ZIMConversationType;
}
export interface ZIMConversationNotificationStatusSetResult {
conversationID: string;
conversationType: ZIMConversationType;
}
export interface ZIMConversationUnreadMessageCountClearedResult {
conversationID: string;
conversationType: ZIMConversationType;
}
export interface ZIMMessageDeletedResult {
conversationID: string;
conversationType: ZIMConversationType;
}
export interface ZIMMessageSentResult {
message: ZIMMessage;
}
export interface ZIMMessageQueriedResult {
conversationID: string;
conversationType: ZIMConversationType;
messageList: ZIMMessage[];
}
export declare enum ZIMCallUserState {
Inviting = 0,
Accepted = 1,
Rejected = 2,
Cancelled = 3,
Offline = 4,
Received = 5
}
export interface ZIMCallUserInfo {
userID: string;
/**
* User name, a string with a maximum length of 64 bytes or less
*/
userName: string;
state: ZIMCallUserState;
}
export interface ZIMCallCancelConfig {
extendedData: string;
}
export interface ZIMCallAcceptConfig {
extendedData: string;
}
export interface ZIMCallRejectConfig {
extendedData: string;
}
export interface ZIMCallInviteConfig {
timeout: number;
extendedData: string;
}
export interface ZIMCallAcceptanceSentResult {
callID: string;
}
export interface ZIMCallRejectionSentResult {
callID: string;
}
export interface ZIMCallInvitationSentResult {
callID: string;
timeout: number;
errorInvitees: ZIMCallUserInfo[];
}
export interface ZIMCallCancelSentResult {
callID: string;
errorInvitees: string[];
}
export declare enum ZIMGroupMessageNotificationStatus {
Notify = 1,
Disturb = 2
}
export declare enum ZIMGroupState {
Quit = 0,
Enter = 1
}
export declare enum ZIMGroupEvent {
Created = 1,
Dismissed = 2,
Joined = 3,
Invited = 4,
Left = 5,
KickedOut = 6
}
export declare enum ZIMGroupMemberState {
Quit = 0,
Enter = 1
}
export declare enum ZIMGroupMemberEvent {
Joined = 1,
Left = 2,
KickedOut = 4,
Invited = 5
}
export declare enum ZIMGroupMemberRole {
Owner = 1,
Member = 3
}
export declare enum ZIMGroupAttributesUpdateAction {
Set = 0,
Delete = 1
}
export interface ZIMGroupInfo {
groupID: string;
groupName: string;
}
export interface ZIMGroupFullInfo {
baseInfo: ZIMGroupInfo;
groupNotice: string;
notificationStatus: ZIMGroupMessageNotificationStatus;
groupAttributes: Record<string, string>;
}
export interface ZIMGroup {
baseInfo: ZIMGroupInfo;
notificationStatus: ZIMGroupMessageNotificationStatus;
}
export interface ZIMGroupMemberInfo extends ZIMUserInfo {
memberNickname: string;
memberRole: number;
}
export interface ZIMGroupOperatedInfo {
operatedUserInfo: ZIMGroupMemberInfo;
}
export interface ZIMGroupAttributesUpdateInfo {
action: ZIMGroupAttributesUpdateAction;
groupAttributes: Record<string, string>;
}
export interface ZIMGroupAdvancedConfig {
groupNotice: string;
groupAttributes: Record<string, string>;
}
export interface ZIMGroupMemberQueryConfig {
nextFlag: number;
count: number;
}
export interface ZIMGroupLeftResult {
groupID: string;
}
export interface ZIMGroupDismissedResult {
groupID: string;
}
export interface ZIMGroupCreatedResult {
groupInfo: ZIMGroupFullInfo;
userList: ZIMGroupMemberInfo[];
errorUserList: ZIMErrorUserInfo[];
}
export interface ZIMGroupJoinedResult {
groupInfo: ZIMGroupFullInfo;
}
export interface ZIMGroupInfoQueriedResult {
groupInfo: ZIMGroupFullInfo;
}
export interface ZIMGroupListQueriedResult {
groupList: ZIMGroup[];
}
export interface ZIMGroupNameUpdatedResult {
groupID: string;
groupName: string;
}
export interface ZIMGroupNoticeUpdatedResult {
groupID: string;
groupNotice: string;
}
export interface ZIMGroupAttributesOperatedResult {
groupID: string;
errorKeys: string[];
}
export interface ZIMGroupAttributesQueriedResult {
groupID: string;
groupAttributes: Record<string, string>;
}
export interface ZIMGroupUsersInvitedResult {
groupID: string;
userList: ZIMGroupMemberInfo[];
errorUserList: ZIMErrorUserInfo[];
}
export interface ZIMGroupOwnerTransferredResult {
groupID: string;
toUserID: string;
}
export interface ZIMGroupMemberKickedResult {
groupID: string;
kickedUserIDs: string[];
errorUserList: ZIMErrorUserInfo[];
}
export interface ZIMGroupMemberListQueriedResult {
groupID: string;
userList: ZIMGroupMemberInfo[];
nextFlag: number;
}
export interface ZIMGroupMemberInfoQueriedResult {
groupID: string;
userInfo: ZIMGroupMemberInfo;
}
export interface ZIMGroupMemberNicknameUpdatedResult {
groupID: string;
forUserID: string;
nickname: string;
}
export interface ZIMGroupMemberRoleUpdatedResult {
groupID: string;
forUserID: string;
role: number;
}
export declare enum ZIMRoomState {
Disconnected = 0,
Connecting = 1,
Connected = 2
}
export declare enum ZIMRoomEvent {
Success = 0,
NetworkInterrupted = 1,
NetworkDisconnected = 2,
RoomNotExist = 3,
ActiveCreate = 4,
CreateFailed = 5,
ActiveEnter = 6,
EnterFailed = 7,
KickedOut = 8
}
export declare enum ZIMRoomAttributesUpdateAction {
Set = 0,
Delete = 1
}
export interface ZIMRoomInfo {
/**
* Room ID, a string with a maximum length of 32 bytes or less. Only support numbers, English characters and '~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '=', '-', '`', ';', '’', ',', '.', '<', '>', '/', '\'.
*/
roomID: string;
/**
* Room name, a string with a maximum length of 64 bytes or less
*/
roomName: string;
}
export interface ZIMQueryMessageConfig {
/**
* Description: The unique ID that identifies a message.
*/
messageID: string;
/**
* Description: How many messages are retrieved in one query.
*
* Caution: To obtain messages in pages to reduce overhead, it is recommended to obtain within 100 messages at a time.
*/
count: number;
/**
* Description: Whether to query message from old to new forwardly or from new to old reversely.
*/
reverse: boolean;
export interface ZIMRoomFullInfo {
baseInfo: ZIMRoomInfo;
}
export interface ZIMQueryMemberConfig {
/**
* Description: The flag of the paging query. For the first query, set this field to an empty string. If the "nextFlag" field of the callback is not an empty string, it needs to be set here to continue the query on the next page.
*/
export interface ZIMRoomAttributesUpdateInfo {
action: ZIMRoomAttributesUpdateAction;
roomAttributes: Record<string, string>;
}
export interface ZIMRoomMemberQueryConfig {
nextFlag: string;
/**
* Description: How many messages are retrieved in one query.
*
* Caution: To obtain messages in pages to reduce overhead, it is recommended to obtain within 100 messages at a time.
*/
count: number;
}
export interface ZIMRoomAdvancedConfig {
roomAttributes: Record<string, string>;
roomDestroyDelayTime: number;
}
export interface ZIMRoomAttributesDeleteConfig {
isForce: boolean;
}
export interface ZIMRoomAttributesSetConfig {
isForce: boolean;
isUpdateOwner: boolean;
isDeleteAfterOwnerLeft: boolean;
}
export interface ZIMRoomAttributesBatchOperationConfig {
isForce: boolean;
isUpdateOwner: boolean;
isDeleteAfterOwnerLeft: boolean;
}
export interface ZIMRoomCreatedResult {
/**
* The base object of the room.
*/
baseInfo: ZIMRoomInfo;
roomInfo: ZIMRoomFullInfo;
}
export interface ZIMRoomEnteredResult {
roomInfo: ZIMRoomFullInfo;
}
export interface ZIMRoomJoinedResult {
/**
* The base object of the room.
*/
baseInfo: ZIMRoomInfo;
roomInfo: ZIMRoomFullInfo;
}
export interface ZIMMemberQueriedResult {
/**
* memberList List of members in the room.
*/
memberList: Array<ZIMUserInfo>;
/**
* The flag of the paging query. If this field is an empty string, the query has been completed. Otherwise, you need to set this value to the "nextFlag" field of ZIMQueryMemberConfig for the next page query.
*/
nextFlag: string;
export interface ZIMRoomLeftResult {
roomID: string;
}
export interface ZIMRoomAttributesBatchOperatedResult {
roomID: string;
}
export interface ZIMRoomOnlineMemberCountQueriedResult {
/**
* The number of online members of the room.
*/
roomID: string;
count: number;
}
export interface ZIMMessageSentResult {
/**
* The sent message object, from which parameters such as messageID can be obtained.
*/
message: ZIMMessage;
export interface ZIMRoomAttributesOperatedResult {
roomID: string;
errorKeys: string[];
}
export interface ZIMRoomAttributesQueriedResult {
roomID: string;
roomAttributes: Record<string, string>;
}
export declare class ZIM {
private engine;
private constructor();
/**
* Gets the SDK's version number.
*
* When the SDK is running, the developer finds that it does not match the expected situation and submits the problem and related logs to the ZEGO technical staff for locating. The ZEGO technical staff may need the information of the engine version to assist in locating the problem.
* Developers can also collect this information as the version information of the engine used by the app, so that the SDK corresponding to each version of the app on the line.
*
* Available since: 1.2.0.
*
* Description: Get the SDK version.
*
* Use cases:
* 1. When the SDK is running, the developer finds that it does not match the expected situation and submits the problem and related logs to the ZEGO technical staff for locating. The ZEGO technical staff may need the information of the engine version to assist in locating the problem.
* 2. Developers can also collect this information as the version information of the engine used by the app, so that the SDK corresponding to each version of the app on the line.
*
* When to call : It can be called at any time.
*
* @return SDK version.
*/
private static TAG;
static getVersion(): string;
/**
* Create a ZIM instance.
*
* You need to create and initialize an ZIM instance before calling any other function.
* The SDK supports the creation of multiple ZIM instances.
*
* @param appID Application ID issued by ZEGO for developers, please contact ZEGO technical support to apply.
*/
static create(appID: number): ZIM | null;
/**
* Destroy the ZIM instance.
*
* Used to release resources used by ZIM.
*/
destroy(): void;
/**
* Set log related configuration.
*
* When you need to customize the log level, you need to call this function to set the log configuration.
*
* @param config Log configuration object.
*/
setLogConfig(config: ZIMLogConfig): void;
/**
* Upload log and call after setting up log config.
*
* Description: After calling [create] to create an instance, the log report can be called.
*/
uploadLog(): Promise<void>;
/**
* Set the event notification callback that need to be handled.
*
* @param type Event notification type.
* @param listener Event notification callback. Developers should override callback to focus on specific notification based on their own business scenarios.
*/
on<K extends keyof ZIMEventHandler>(type: K, listener: ZIMEventHandler[K]): void;
/**
* Clear the event notification callback.
*
* @param type Event notification type.
*/
off<K extends keyof ZIMEventHandler>(type: K): void;
/**
* Login, you must log in before using all functions.
*
* Description: After invoking this function, you will receive the [connectionStateChanged] callback,
* which can be used to determine whether the login is successful.
*
*
* @param userInfo Unique ID used to identify the user. Note that the userID must be unique under the same appID, otherwise mutual kicks out will occur.
* @param token The token issued by the developer's business server, used to ensure security. The generation rules are detailed in ZEGO document website.
*/
login(userInfo: ZIMUserInfo, token: string): Promise<void>;
/**
* Log out, you cannot receive messages after logging out.
*
* Description: After invoking this function, you will receive the [connectionStateChanged] callback.
*/
logout(): void;
/**
* Update the authentication token.
*
* Description: After receiving the [tokenWillExpire] callback, you needs to request your authentication server to regenerate a token in time.
*
* @param token The token issued by the developer's business server, used to ensure security. The generation rules are detailed in ZEGO document website.
*/
renewToken(token: string): Promise<void>;
/**
* Send peer-to-peer messages.
*
* Available since: 1.2.0 or above.
*
* Description: After this function is called, a message is sent to the specified user.
*
* Use cases: This function is used in 1V1 chat scenarios.
*
* @param message The message to be sent.
* @param toUserID The ID of the user who will receive the message.
*/
sendPeerMessage(message: ZIMMessage, toUserID: string): Promise<ZIMMessageSentResult>;
/**
* Send room messages.
*
* Available since: 1.2.0 or above
*
* Description: When this function is called, the message will be sent in the room.
*
* Use Cases: This feature is required for scenarios where multiple people in the room are chatting.
*
* @param message The message to be sent.
* @param toRoomID The ID of the room which will receive the message.
*/
sendRoomMessage(message: ZIMMessage, toRoomID: string): Promise<ZIMMessageSentResult>;
/**
* Create a room.
*
* Available since: 1.2.0 or above.
*
* Description: When a room is created, other users can join this room through [joinRoom] function.
*
* Use cases: When you need to create a multi-person chat scene, you can create a room by this API.
*
* When to call: It can be called after creating a ZIM instance through [create].
*
* Caution: When everyone leaves the room, the room will be automatically destroyed.
*
* Related APIs: You can join the room through [joinRoom] and leave the room with [leaveRoom].
*
* @param roomInfo The configuration information of the room to be created.
*/
createRoom(roomInfo: ZIMRoomInfo): Promise<ZIMRoomCreatedResult>;
/**
* Join a room.
*
* Available since: 1.2.0 or above.
*
* Description: If the room does not exist, the join fails and you need to call [createRoom] to create the room first.
*
* Use cases: In a multi-person chat scenario, users can call this interface to enter the room when they need to join the room.
*
* When to call: It can be called after creating a ZIM instance through [create].
*
* Caution: When everyone leaves the room, the room will be automatically destroyed.
*
* Related APIs: You can create a room with [createRoom] and leave the room with [leaveRoom].
*
* @param roomID ID of the room to join.
*/
renewToken(token: string): Promise<ZIMTokenRenewedResult>;
queryUsersInfo(userIDs: string[]): Promise<ZIMUsersInfoQueriedResult>;
queryConversationList(config: ZIMConversationQueryConfig): Promise<ZIMConversationListQueriedResult>;
deleteConversation(conversationID: string, conversationType: ZIMConversationType, config: ZIMConversationDeleteConfig): Promise<ZIMConversationDeletedResult>;
setConversationNotificationStatus(status: ZIMConversationNotificationStatus, conversationID: string, conversationType: ZIMConversationType): Promise<ZIMConversationNotificationStatusSetResult>;
clearConversationUnreadMessageCount(conversationID: string, conversationType: ZIMConversationType): Promise<ZIMConversationUnreadMessageCountClearedResult>;
sendPeerMessage(message: ZIMMessage, toUserID: string, config: ZIMMessageSendConfig): Promise<ZIMMessageSentResult>;
sendGroupMessage(message: ZIMMessage, toGroupID: string, config: ZIMMessageSendConfig): Promise<ZIMMessageSentResult>;
sendRoomMessage(message: ZIMMessage, toRoomID: string, config: ZIMMessageSendConfig): Promise<ZIMMessageSentResult>;
deleteMessages(messageList: ZIMMessage[], conversationID: string, conversationType: ZIMConversationType, config: ZIMMessageDeleteConfig): Promise<ZIMMessageDeletedResult>;
deleteAllMessage(conversationID: string, conversationType: ZIMConversationType, config: ZIMMessageDeleteConfig): Promise<ZIMMessageDeletedResult>;
queryHistoryMessage(conversationID: string, conversationType: ZIMConversationType, config: ZIMMessageQueryConfig): Promise<ZIMMessageQueriedResult>;
createRoom(roomInfo: ZIMRoomInfo, config?: ZIMRoomAdvancedConfig): Promise<ZIMRoomCreatedResult>;
enterRoom(roomInfo: ZIMRoomInfo, config?: ZIMRoomAdvancedConfig): Promise<ZIMRoomEnteredResult>;
joinRoom(roomID: string): Promise<ZIMRoomJoinedResult>;
/**
* Leave a room.
*
* Available since: 1.2.0 or above.
*
* Description: When users in the room need to leave the room, they can join this room through [leaveRoom].
*
* Use cases: In the multi-person chat scenario, when users in the room need to leave the room, they can leave the room through this interface.
*
* When to call: After creating a ZIM instance via [create], it can be called when the user is in the room.
*
* Caution: If the current user is not in this room, the exit fails. When everyone leaves the room, the room will be automatically destroyed.
*
* Related APIs: You can create a room through [createRoom] and join a room with [joinRoom].
*
* @param roomID ID of the room to leave.
*/
leaveRoom(roomID: string): Promise<void>;
/**
* Query the list of members in the room.
*
* Available since: 1.2.0 or above.
*
* Description: After joining a room, you can use this function to get the list of members in the room.
*
* Use cases: When a developer needs to obtain a list of room members for other business operations, this interface can be called to obtain a list of members.
*
* When to call: After creating a ZIM instance through [create], and the user is in the room that needs to be queried, you can call this interface.
*
* Caution: If the user is not currently in this room, the query fails.
*
* Related APIs: You can check the online number of people in the room through [queryRoomOnlineMemberCount].
*
* @param roomID ID of the room to query.
* @param config Configuration of query room member operation.
*/
queryRoomMember(roomID: string, config: ZIMQueryMemberConfig): Promise<ZIMMemberQueriedResult>;
/**
* Query the number of online members in the room.
*
* Available since: 1.2.0 or above.
*
* Description: After joining a room, you can use this function to get the number of online members in the room.
*
* Use cases: When a developer needs to obtain the number of room members who are online, this interface can be called.
*
* Calling time: After creating a ZIM instance through [create], and the user is in the room that needs to be queried, this interface can be called.
*
* Caution: If the user is not currently in this room, the query will fail.
*
* Related APIs: the room member can be inquired through [queryRoomMember].
*
* @param roomID ID of the room to query.
*/
leaveRoom(roomID: string): Promise<ZIMRoomLeftResult>;
queryRoomMemberList(roomID: string, config: ZIMRoomMemberQueryConfig): Promise<ZIMRoomMemberQueriedResult>;
queryRoomOnlineMemberCount(roomID: string): Promise<ZIMRoomOnlineMemberCountQueriedResult>;
queryRoomAllAttributes(roomID: string): Promise<ZIMRoomAttributesQueriedResult>;
setRoomAttributes(roomAttributes: Record<string, string>, roomID: string, config: ZIMRoomAttributesSetConfig): Promise<ZIMRoomAttributesOperatedResult>;
deleteRoomAttributes(keys: string[], roomID: string, config: ZIMRoomAttributesDeleteConfig): Promise<ZIMRoomAttributesOperatedResult>;
beginRoomAttributesBatchOperation(roomID: string, config: ZIMRoomAttributesBatchOperationConfig): void;
endRoomAttributesBatchOperation(roomID: string): Promise<ZIMRoomAttributesBatchOperatedResult>;
createGroup(groupInfo: ZIMGroupInfo, userIDs: string[], config?: ZIMGroupAdvancedConfig): Promise<ZIMGroupCreatedResult>;
joinGroup(groupID: string): Promise<ZIMGroupJoinedResult>;
leaveGroup(groupID: string): Promise<ZIMGroupLeftResult>;
dismissGroup(groupID: string): Promise<ZIMGroupDismissedResult>;
queryGroupList(): Promise<ZIMGroupListQueriedResult>;
updateGroupNotice(groupNotice: string, groupID: string): Promise<ZIMGroupNoticeUpdatedResult>;
updateGroupName(groupName: string, groupID: string): Promise<ZIMGroupNameUpdatedResult>;
queryGroupInfo(groupID: string): Promise<ZIMGroupInfoQueriedResult>;
setGroupAttributes(groupAttributes: Record<string, string>, groupID: string): Promise<ZIMGroupAttributesOperatedResult>;
deleteGroupAttributes(keys: string[], groupID: string): Promise<ZIMGroupAttributesOperatedResult>;
queryGroupAttributes(keys: string[], groupID: string): Promise<ZIMGroupAttributesQueriedResult>;
queryGroupAllAttributes(groupID: string): Promise<ZIMGroupAttributesQueriedResult>;
setGroupMemberNickname(nickname: string, forUserID: string, groupID: string): Promise<ZIMGroupMemberNicknameUpdatedResult>;
setGroupMemberRole(role: number, forUserID: string, groupID: string): Promise<ZIMGroupMemberRoleUpdatedResult>;
transferGroupOwner(toUserID: string, groupID: string): Promise<ZIMGroupOwnerTransferredResult>;
queryGroupMemberInfo(userID: string, groupID: string): Promise<ZIMGroupMemberInfoQueriedResult>;
inviteUsersIntoGroup(userIDs: string[], groupID: string): Promise<ZIMGroupUsersInvitedResult>;
kickGroupMembers(userIDs: string[], groupID: string): Promise<ZIMGroupMemberKickedResult>;
queryGroupMemberList(groupID: string, config: ZIMGroupMemberQueryConfig): Promise<ZIMGroupMemberListQueriedResult>;
callInvite(invitees: string[], config: ZIMCallInviteConfig): Promise<ZIMCallInvitationSentResult>;
callCancel(invitees: string[], callID: string, config: ZIMCallCancelConfig): Promise<ZIMCallCancelSentResult>;
callAccept(callID: string, config: ZIMCallAcceptConfig): Promise<ZIMCallAcceptanceSentResult>;
callReject(callID: string, config: ZIMCallRejectConfig): Promise<ZIMCallRejectionSentResult>;
}
{
"name": "zego-zim-web",
"version": "1.2.2",
"version": "2.0.0",
"description": "ZEGO ZIM SDK for Web",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,7 +0,65 @@

# 发布日志
# Overview
## 1.2.0 版本
ZEGOCLOUD In-app Chat provides an interactive messaging service with high reliability, high concurrency, and ultra-low latency. You can simply and quickly implement real-time messaging scenarios, such as large-scale live streaming, live audio room, online customer service system, and more.
**发布日期:2021-11-05**
And In-app Chat's great compatibility also provides a full-package solution that is compatible with ZEGOCLOUD's Voice, Video Call, and ZEGO Live products, which helps you to build exactly what you want fast.
首次发布,支持 1v1 通信、多人房间聊天等功能。
## Why ZEGOCLOUD's In-app Chat
### Global reach with ultra-low latency
ZEGOCLOUD's real-time communications network covers 200+ countries and regions. With an excellent global network scheduling strategy, it delivers real-time messages to users with an ultra-low latency as lower as 200 ms.
### Massive concurrency
Supports handling hundreds of millions of concurrent messages easily, meeting the needs of large-scale live communication events.
### Message deliverability
With ZEGOCLOUD's in-app chat, the priority of messages can be set to make sure all messages with higher priorities are transmitted.
### Optimized performance under weak networks
With ZEGOCLOUD's sophisticated QoS strategies, messages are delivered reliably even when under the 90% of packet loss rate of network conditions, so you can provide users with a smooth communication experience at all times.
## Features
| Module/Feature | Description |
|-----|-----|
| Monitor the login status | Supports the periodic heartbeat mechanism to monitor online status and update the login status in real time. |
| Conversation module | Supports obtaining the conversation list, sending messages to the specified user, group, and chatroom.|
| Room module | Create a chatroom, destroy a chatroom, obtain the chatroom list, which can be applied to the temporary chat events, such as live streaming and live audio room. |
| Group module | Create a group, ungroup, and save the relation chain of the group members. |
| Message module | Send text, image, file, audio, and other messages to users and to chatrooms. |
| Message priority | Message priorities can be set to ensure that messages with higher priorities are transmitted. |
| Store message history| Supports storing historical messages. |
| Push system notifications | Supports push system notifications with the server. |
| Call invitation | Supports implementing the basic control logic of the call invitation: sending, canceling, accepting, and refusing the call invitation. |
| Offline messages | Messages sent in the offline state can be saved properly and users receive the offline messages upon login. |
| Offline notifications| Supports sending offline notifications to an offline user, and the notifications are displayed in the client notification bar. |
## Use cases
| Scenario | Description |
|-----|-----|
| Online shopping | Build real-time purchasing-related communications with text, images, order information, and more. |
| Social interactions | Offer one-on-one chatting or room chatting capabilities, also provide signaling for real-time audio or video call invitations, which is the best addition to any app. |
| Interactive live streaming | Support sending bullet messages, sending virtual gifts, commenting live to, and managing room seats enhance the live streaming with interactivity. |
| Online education | Use internal signaling to build interactive features that help students learn, such as text, images, media files, and more. |
| Online consulting | With one-to-one chat or group chat capabilities, text message history, voice and video call recordings can be retrieved anytime for online consulting scenarios. |
| Work collaborations | Build more efficient office collaborations with the inclusions of files, images, call invitations, or other rich media in messages. |
| Online games | Provide various chatting modes, such as everyone, team-only to enhance the game experience with real-time communication, and support interactive gaming operations with customizable messages. |
| IoT devices| Monitor and message control between apps and devices like smartwatches, home security cameras, and other IoT devices. |
## Compatibility
| Platform | Version compatibility|
|-----|-----|
| Android | Android 4.1 or later. JDK 1.6 or later. |
| iOS | iOS 9.0 or later. |
| Windows | Windows 7 or later (32/64 bit). |
| macOS | macOS 10.11 or later. x64 and ARM64 Framework. |
| Web | <ul><li>Chrome 58 or later</li><li>Firefox 56 or later</li><li>Safari 11 or later</li><li>Opera 45 or later</li><li>QQ browser on Windows 10.1 or later, macOS 4.4 or later</li><li>360 Secure browser (Extreme)</li></ul> |

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc