@tencentcloud/chat-uikit-engine-lite
Version:
Tencent Cloud TUIChatEngine SDK for Chat TUIKit
821 lines (797 loc) • 29.3 kB
TypeScript
import TencentCloudChat, { Conversation, Message, Profile, Group, ChatSDK } from '@tencentcloud/lite-chat/basic';
interface IConversationModel {
conversationID: string;
type: string;
subType: string;
unreadCount: number;
lastMessage?: {
nick: string;
nameCard: string;
lastTime: number | string;
lastSequence: string;
fromAccount: string;
isRevoked: boolean;
revoker?: string;
isPeerRead: boolean;
messageForShow: string;
type: string;
payload: any;
};
groupProfile?: any;
userProfile?: any;
groupAtInfoList?: any[];
remark: string;
isPinned: boolean;
messageRemindType: string;
markList: string[];
customData: string;
conversationGroupList: any[];
draftText: string;
isMuted: boolean;
operationType: number;
_conversation: any;
updateProperties(options: Conversation): void;
updateOperationType(operationType: number): void;
getConversation(): any;
deleteConversation(clearHistoryMessage?: boolean): Promise<any>;
pinConversation(): Promise<any>;
muteConversation(): Promise<any>;
setMessageRead(): Promise<any>;
getAvatar(): string;
getShowName(): string;
getGroupAtInfo(): string;
getLastMessage(key: string): string | null;
}
interface IGroupModel {
groupID: string;
name: string;
avatar: string;
type: TencentCloudChat.TYPES.GRP_WORK | TencentCloudChat.TYPES.GRP_PUBLIC | TencentCloudChat.TYPES.GRP_MEETING | TencentCloudChat.TYPES.GRP_AVCHATROOM | TencentCloudChat.TYPES.GRP_COMMUNITY;
introduction: string;
notification: string;
ownerID: string;
createTime: number;
infoSequence?: number;
lastInfoTime?: number;
selfInfo?: {
role?: string;
messageRemindType?: string;
joinTime?: number;
nameCard?: string;
userID?: string;
memberCustomField?: any[];
};
lastMessage?: any;
nextMessageSeq: number;
memberCount: number;
maxMemberCount: number;
muteAllMembers: boolean;
joinOption: string;
groupCustomField?: any[];
isSupportTopic: boolean;
groupAttributes: any;
groupCounters: any;
}
interface IMessageModel {
ID: string;
type: TencentCloudChat.TYPES;
payload: any;
conversationID: string;
conversationType: TencentCloudChat.TYPES;
to: string;
from: string;
flow: string;
time: number;
status: string;
isRevoked: boolean;
priority: TencentCloudChat.TYPES;
nick: string;
avatar: string;
isPeerRead: boolean;
nameCard: string;
atUserList: string[];
cloudCustomData: string;
isDeleted: boolean;
isModified: boolean;
needReadReceipt: boolean;
readReceiptInfo: any;
isBroadcastMessage: boolean;
isSupportExtension: boolean;
receiverList?: string[];
revoker: string;
sequence: number;
progress: number;
revokerInfo: {
userID: string;
nick: string;
avatar: string;
};
revokeReason: string;
hasRiskContent: boolean;
reactionList: ReactionInfo[];
updateProperties(options: Message): void;
getMessage(): Message;
modifyMessage(options: ModifyMessageParams): Promise<any>;
revokeMessage(): Promise<any>;
resendMessage(): Promise<any>;
deleteMessage(): Promise<any>;
quoteMessage(): Message;
replyMessage(): Message;
setMessageExtensions(extensions: object[]): Promise<any>;
deleteMessageExtensions(keyList?: string[]): Promise<any>;
getMessageExtensions(): Promise<any>;
getSignalingInfo(): Record<string, any> | null;
getMessageContent(): Record<string, any>;
}
type func = (...args: any[]) => any;
type SEARCH_TYPE = 'global' | 'conversation';
interface LoginParams {
SDKAppID: number;
userID: string;
userSig: string;
chat?: any;
unlimitedAVChatRoom?: boolean;
scene?: string;
fileUploadProxy?: string;
fileDownloadProxy?: string;
proxyServer?: string;
devMode?: boolean;
testEnv?: boolean;
}
interface UpdateMyProfileParams {
nick?: string;
avatar?: string;
gender?: TencentCloudChat.TYPES;
selfSignature?: string;
allowType?: TencentCloudChat.TYPES;
birthday?: number;
location?: string;
language?: number;
messageSettings?: number;
adminForbidType?: TencentCloudChat.TYPES;
level?: number;
role?: number;
profileCustomField?: object[];
}
interface UserIDListParams {
userIDList: string[];
}
interface SwitchUserStatusParams {
displayOnlineStatus: boolean;
}
interface DeleteConversationParams {
conversationIDList: string[];
clearHistoryMessage: boolean;
}
interface PinConversationParams {
conversationID: string;
isPinned: boolean;
}
interface MuteConversationParams {
groupID?: string;
userIDList?: string[];
messageRemindType: TencentCloudChat.TYPES;
}
interface MarkConversationParams {
conversationIDList: string[];
markType: number;
enableMark: boolean;
}
interface SetConversationDraftParams {
conversationID: string;
draftText?: string;
draftInfo?: {
html: string;
abstract: string;
messageID?: string;
type?: 'reply' | 'quote';
};
}
interface SendMessageBasicParams {
priority?: TencentCloudChat.TYPES.MSG_PRIORITY_LOWEST | TencentCloudChat.TYPES.MSG_PRIORITY_LOW | TencentCloudChat.TYPES.MSG_PRIORITY_NORMAL | TencentCloudChat.TYPES.MSG_PRIORITY_HIGH;
payload: any;
cloudCustomData?: string;
needReadReceipt?: boolean;
receiverList?: string[];
}
interface SendMessageParams extends SendMessageBasicParams {
to?: string;
conversationType?: TencentCloudChat.TYPES.CONV_C2C | TencentCloudChat.TYPES.CONV_GROUP;
}
interface SendForwardMessageMergeInfo {
title?: string;
abstractList?: string[];
compatibleText?: string;
}
interface SendForwardMessageOptions extends SendMessageOptions {
needMerge?: boolean;
params?: {
priority?: TencentCloudChat.TYPES.MSG_PRIORITY_LOWEST | TencentCloudChat.TYPES.MSG_PRIORITY_LOW | TencentCloudChat.TYPES.MSG_PRIORITY_NORMAL | TencentCloudChat.TYPES.MSG_PRIORITY_HIGH;
cloudCustomData?: string;
needReadReceipt?: boolean;
receiverList?: string[];
};
mergeInfo?: SendForwardMessageMergeInfo;
[key: string]: any;
}
interface OfflinePushInfo {
disablePush?: boolean;
disableVoipPush?: boolean;
title?: string;
description?: string;
extension?: string;
ignoreIOSBadge?: boolean;
androidOPPOChannelID?: string;
}
interface MessageControlInfo {
excludedFromUnreadCount?: boolean;
excludedFromLastMessage?: boolean;
excludedFromContentModeration?: boolean;
}
interface SendMessageOptions {
onlineUserOnly?: boolean;
offlinePushInfo?: OfflinePushInfo;
messageControlInfo?: MessageControlInfo;
}
interface TranslateTextParams {
sourceTextList: string[];
sourceLanguage?: string;
}
interface ConvertVoiceToTextParams {
message: IMessageModel;
language?: string;
}
declare enum ISearchType {
MESSAGE = "message",
CHAT_MESSAGE = "chat_message",
USER = "user",
GROUP = "group"
}
declare enum MessageType {
MSG_TEXT = "TIMTextElem",
MSG_IMAGE = "TIMImageElem",
MSG_SOUND = "TIMSoundElem",
MSG_FILE = "TIMFileElem",
MSG_VIDEO = "TIMVideoFileElem",
MSG_LOCATION = "TIMLocationElem",
MSG_CUSTOM = "TIMCustomElem",
MSG_MERGER = "TIMRelayElem"
}
declare enum GroupType {
GRP_WORK = "Private",
GRP_PUBLIC = "Public",
GRP_MEETING = "ChatRoom",
GRP_COMMUNITY = "Community"
}
interface ISearchCloudMessagesResultBase<T extends ISearchType> {
totalCount: number;
params: ISearchParamsMap[T];
}
interface ISearchCloudMessagesResultItem {
messageList: IMessageModel[];
messageCount: number;
conversation?: IConversationModel;
}
interface ISearchCloudUsersResultItem {
profile: Profile;
relation: TencentCloudChat.TYPES.SNS_TYPE_NO_RELATION | TencentCloudChat.TYPES.SNS_TYPE_A_WITH_B | TencentCloudChat.TYPES.SNS_TYPE_B_WITH_A | TencentCloudChat.TYPES.SNS_TYPE_BOTH_WAY;
}
interface ISearchCloudGroupsResultItem {
groupInfo: Group;
conversation?: IConversationModel;
}
interface IResultMap {
[ISearchType.MESSAGE]: ISearchCloudMessagesResultItem[];
[ISearchType.CHAT_MESSAGE]: ISearchCloudMessagesResultItem[];
[ISearchType.USER]: ISearchCloudUsersResultItem[];
[ISearchType.GROUP]: ISearchCloudGroupsResultItem[];
}
interface ISearchResult<T extends ISearchType> extends ISearchCloudMessagesResultBase<T> {
resultList: IResultMap[T] | [];
hasMore: boolean;
cursor: string;
}
interface ISearchParamsMap {
[ISearchType.MESSAGE]: SearchCloudMessagesParams;
[ISearchType.CHAT_MESSAGE]: SearchCloudMessagesParams;
[ISearchType.USER]: SearchCloudUsersParams;
[ISearchType.GROUP]: SearchCloudGroupsParams;
}
interface BaseSearchCloudParams {
keyword?: string;
keywordList?: string[];
keywordListMatchType?: 'or' | 'and';
cursor?: string;
count?: number;
}
interface SearchCloudMessagesParams extends BaseSearchCloudParams {
senderUserIDList?: string[];
messageTypeList?: any[];
conversationID?: string;
timePosition?: number;
timePeriod?: number;
}
interface SearchCloudUsersParams extends BaseSearchCloudParams {
gender?: string;
miniBirthday?: number;
maxBirthday?: number;
}
interface SearchCloudGroupsParams extends BaseSearchCloudParams {
groupTypeList?: any[];
}
interface SearchCloudGroupMembersParams extends BaseSearchCloudParams {
groupTypeList?: string[];
groupIDList?: string[];
}
interface ForwardMessageParams {
to: string;
conversationType: TencentCloudChat.TYPES.CONV_C2C | TencentCloudChat.TYPES.CONV_GROUP;
priority?: TencentCloudChat.TYPES;
payload: Message;
}
interface GetMessageListParams {
conversationID: string;
nextReqMessageID: string;
}
interface GetMessageListHoppingParams {
conversationID: string;
sequence?: number;
time?: number;
direction?: number;
count?: number;
}
interface GetGroupMessageReadParams {
message: IMessageModel;
filter: number;
cursor: string;
count: number;
}
interface GetMessageReactionsParams {
messageList: Message[];
maxUserCountPerReaction?: number;
}
interface ReactionInfo {
reactionID: string;
totalUserCount: number;
partialUserList: ReactionUserInfo[];
}
interface ReactionUserInfo {
userID: string;
nick: string;
avatar: string;
}
interface GetAllUserListOfMessageReactionParams {
message: IMessageModel;
reactionID: string;
nextSeq: number;
count?: number;
}
interface ModifyMessageParams {
type?: TencentCloudChat.TYPES;
payload?: any;
cloudCustomData?: string;
}
interface GroupServiceBasicParams {
groupID: string;
}
interface GetGroupProfileParams extends GroupServiceBasicParams {
groupCustomFieldFilter?: string[];
}
interface UpdateGroupParams extends GroupServiceBasicParams {
name?: string;
avatar?: string;
introduction?: string;
notification?: string;
muteAllMembers?: boolean;
joinOption?: TencentCloudChat.TYPES.JOIN_OPTIONS_FREE_ACCESS | TencentCloudChat.TYPES.JOIN_OPTIONS_NEED_PERMISSION | TencentCloudChat.TYPES.JOIN_OPTIONS_DISABLE_APPLY;
inviteOption?: TencentCloudChat.TYPES.JOIN_OPTIONS_FREE_ACCESS | TencentCloudChat.TYPES.JOIN_OPTIONS_NEED_PERMISSION | TencentCloudChat.TYPES.JOIN_OPTIONS_DISABLE_APPLY;
groupCustomField?: Record<string, string>[];
}
interface ChangGroupOwnerParams extends GroupServiceBasicParams {
newOwnerID: string;
}
interface GroupAttrParams extends GroupServiceBasicParams {
groupAttributes: Record<string, string>;
}
interface SetCountersParams extends GroupServiceBasicParams {
counters: Record<string, number>;
}
interface CountersParams extends GroupServiceBasicParams {
key: string;
value: number;
}
interface JoinGroupParams extends GroupServiceBasicParams {
applyMessage?: string;
}
interface KeyListParams extends GroupServiceBasicParams {
keyList: string[];
}
interface CreateGroupParams {
name: string;
type: string;
groupID?: string;
introduction?: string;
notification?: string;
avatar?: string;
maxMemberNum?: number;
joinOption: string;
memberList?: GroupMemberItem[];
groupCustomField?: any[];
isSupportTopic?: boolean;
}
interface GroupMemberItem {
userID: string;
role?: string;
memberCustomField?: any[];
}
interface handleGroupApplicationParams {
handleAction: 'Agree' | 'Reject';
handleMessage?: string;
application: any;
}
interface GetMemberListParams extends GroupServiceBasicParams {
count?: number;
offset?: number | string;
filter?: number;
}
interface GetMemberProfileParams extends GroupServiceBasicParams {
userIDList: string[];
memberCustomFieldFilter?: string[];
}
interface AddMemberParams extends GroupServiceBasicParams {
userIDList: string[];
}
interface DeleteMemberParams extends GroupServiceBasicParams {
userIDList: string[];
reason?: string;
duration?: number;
}
interface SetMemberMuteParams extends GroupServiceBasicParams {
userID: string;
muteTime: number;
}
interface SetMemberRoleParams extends GroupServiceBasicParams {
userID: string;
role: TencentCloudChat.TYPES;
}
interface SetMemberNameCardParams extends GroupServiceBasicParams {
userID?: string;
nameCard: string;
}
interface SetMemberCustomFiledParams extends GroupServiceBasicParams {
userID?: string;
memberCustomField: Record<string, string>[];
}
interface MarkMemberParams extends GroupServiceBasicParams {
userIDList: string[];
markType: number;
enableMark: boolean;
}
interface Friend {
userID: string;
remark: string;
groupList: any[];
source: string;
wording: string;
profile: any;
friendCustomFriend: any[];
}
interface FriendApplication {
userID: string;
avatar: string;
nick: string;
time: number;
source: string;
wording: string;
type: string;
}
interface AddFriendParams {
to: string;
source: string;
remark?: string;
groupName?: string;
wording?: string;
type?: TencentCloudChat.TYPES;
}
interface DeleteFriendParams {
userIDList: string[];
type?: TencentCloudChat.TYPES;
}
interface CheckFriendParams {
userIDList: string[];
type: Partial<TencentCloudChat.TYPES>;
}
interface GetFriendProfileParams {
userIDList: string[];
}
interface UpdateFriendParams {
userID: string;
remark?: string;
friendCustomField?: any[];
}
interface AcceptFriendApplicationParams {
userID: string;
remark?: string;
type: TencentCloudChat.TYPES;
}
interface DeleteFriendApplicationParams {
userID: string;
type: TencentCloudChat.TYPES;
}
interface FriendGroup {
name: string;
friendList: Friend[];
count: number;
}
interface FriendGroupParams {
name: string;
userIDList: string[];
}
interface RenameFriendGroupParams {
oldName: string;
newName: string;
}
interface IEventCenter {
addEvent(event: string, callback: func): void;
removeEvents(): void;
unbindIMEvents(): void;
}
interface ITUITranslateService {
setI18next(i18next?: any): void;
provideLanguages(languages: object): void;
useI18n(language?: string): void;
changeLanguage(language: string): Promise<any>;
t(key: string): string;
}
interface ITUIConversationService {
init(): void;
switchConversation(conversationID: string): Promise<any>;
getConversationList(): Promise<any>;
getConversationProfile(conversationID: string): Promise<any>;
deleteConversation(options: string | DeleteConversationParams): Promise<any>;
pinConversation(options: PinConversationParams): Promise<any>;
muteConversation(options: MuteConversationParams): Promise<any>;
setMessageRead(conversationID: string): Promise<any>;
clearHistoryMessage(conversationID: string): Promise<any>;
setConversationDraft(options: SetConversationDraftParams): Promise<any>;
markConversation(options: MarkConversationParams): Promise<any>;
}
declare enum MountedList {
TUIStore = "TUIStore",
TUITranslate = "TUITranslate",
TUIConversation = "TUIConversation",
TUIChat = "TUIChat",
TUIGroup = "TUIGroup",
TUIUser = "TUIUser",
TUIFriend = "TUIFriend",
TUIReport = "TUIReport",
TUISearch = "TUISearch"
}
declare enum StoreName {
APP = "application",
CONV = "conversation",
CHAT = "chat",
GRP = "group",
USER = "user",
FRIEND = "friend",
SEARCH = "search",
CUSTOM = "custom"
}
type Task = Record<StoreName, Record<string, Map<(data?: unknown) => void, 1>>>;
interface IOptions {
[key: string]: (newData?: any) => void;
}
interface ITUIStore {
task: Task;
watch(storeName: StoreName, options: IOptions): void;
unwatch(storeName: StoreName, options: IOptions): void;
update(storeName: StoreName, key: string, data: any): void;
getData(storeName: StoreName, key: string): any;
getConversationModel(conversationID: string): IConversationModel;
getMessageModel(messageID: string): IMessageModel;
reset(storeName: StoreName, keyList?: string[], isNotificationNeeded?: boolean): void;
}
declare class ChatEngine implements ITUIChatEngine {
static instance: ChatEngine;
isInited: boolean;
chat: ChatSDK;
EVENT: any;
TYPES: any;
eventCenter: IEventCenter;
TUIStore: ITUIStore;
TUITranslate: ITUITranslateService;
TUIConversation: ITUIConversationService;
TUIChat: ITUIChatService;
TUIGroup: ITUIGroupService;
TUIUser: ITUIUserService;
TUIFriend: ITUIFriendService;
TUIReport: ITUIReportService;
TUISearch: ITUISearchService;
private loginStatusPromise;
private userID;
constructor();
static getInstance(): ChatEngine;
mount(name: MountedList, instance: any): void;
login(options: LoginParams): Promise<unknown>;
logout(): Promise<void>;
isReady(): boolean;
setLogLevel(level: number): void;
destroy(): Promise<void>;
getMyUserID(): string;
private resetStore;
private initService;
private initOptionalServices;
private createChat;
private loginChat;
private onSDKReady;
private onSDKNotReady;
private checkCommercialAbility;
}
declare class TUIBase {
getEngine(): ChatEngine;
}
interface IMessageHandler {
handleTextMessage(message: Message): object;
handleFaceMessage(message: Message): object;
handleLocationMessage(message: Message): object;
handleImageMessage(message: Message): object;
handleAudioMessage(message: Message): object;
handleVideoMessage(message: Message): object;
handleFileMessage(message: Message): object;
handleCustomMessage(message: Message): object;
handleMergeMessage(message: Message): object;
handleGroupTipsMessage(message: Message): object;
handleGroupSystemMessage(message: Message): object;
handleCallKitSignaling(message: any): string | undefined;
}
interface ITUIChatService extends TUIBase {
messageHandler: IMessageHandler;
init: () => void;
updateMessageList(messageList: Message[], type: string): void;
sendTextMessage(options: SendMessageParams, sendMessageOptions?: SendMessageOptions): Promise<any>;
sendTextAtMessage(options: SendMessageParams, sendMessageOptions?: SendMessageOptions): Promise<any>;
sendImageMessage(options: SendMessageParams, sendMessageOptions?: SendMessageOptions): Promise<any>;
sendAudioMessage(options: SendMessageParams, sendMessageOptions?: SendMessageOptions): Promise<any>;
sendVideoMessage(options: SendMessageParams, sendMessageOptions?: SendMessageOptions): Promise<any>;
sendFileMessage(options: SendMessageParams, sendMessageOptions?: SendMessageOptions): Promise<any>;
sendCustomMessage(options: SendMessageParams, sendMessageOptions?: SendMessageOptions): Promise<any>;
sendFaceMessage(message: SendMessageParams, sendMessageOptions?: SendMessageOptions): Promise<any>;
sendLocationMessage(options: SendMessageParams, sendMessageOptions?: SendMessageOptions): Promise<any>;
sendForwardMessage(conversationList: Conversation[] | IConversationModel[], messageList: Message[] | IMessageModel, sendForwardMessageOptions?: SendForwardMessageOptions): Promise<any>;
revokeMessage(message: Message): Promise<any>;
resendMessage(message: Message): Promise<any>;
deleteMessage(messageList: Message[]): Promise<any>;
setMessageExtensions(message: Message, extensions: object[]): Promise<any>;
getMessageExtensions(message: Message): Promise<any>;
deleteMessageExtensions(message: Message, keyList?: string[]): Promise<any>;
modifyMessage(message: Message): Promise<any>;
quoteMessage(message: Message): Message;
replyMessage(message: Message): Message;
enterTypingState(): void;
leaveTypingState(): void;
sendMessageReadReceipt(messageList: IMessageModel[]): Promise<any>;
getGroupMessageReadMemberList(options: GetGroupMessageReadParams): Promise<any>;
getMessageList(options?: GetMessageListParams): Promise<any>;
getMessageListHopping(options?: GetMessageListHoppingParams): Promise<any>;
downloadMergedMessages(message: any): Promise<any>;
setTranslationLanguage(language: string): void;
translateText(options: TranslateTextParams): Promise<any>;
searchCloudMessages(options: SearchCloudMessagesParams): Promise<any>;
addMessageReaction(message: IMessageModel, reactionID: string): Promise<any>;
removeMessageReaction(message: IMessageModel, reactionID: string): Promise<any>;
getMessageReactions(options: GetMessageReactionsParams): void;
getAllUserListOfMessageReaction(options: GetAllUserListOfMessageReactionParams): Promise<any>;
convertVoiceToText(options: ConvertVoiceToTextParams): Promise<any>;
clearHistoryMessage(conversationID: string): Promise<any>;
updateMessageInfo(options: Record<string, any>): void;
}
interface ITUIGroupService {
init(): void;
switchGroup(groupID: string): void;
getGroupProfile(options: GetGroupProfileParams): Promise<any>;
updateGroupProfile(options: UpdateGroupParams): Promise<any>;
createGroup(options: CreateGroupParams): Promise<any>;
dismissGroup(groupID: string): Promise<any>;
searchGroupByID(groupID: string): Promise<any>;
joinGroup(options: JoinGroupParams): Promise<any>;
quitGroup(groupID: string): Promise<any>;
getGroupApplicationList(): Promise<any>;
handleGroupApplication(options: handleGroupApplicationParams): Promise<any>;
getGroupOnlineMemberCount(groupID: string): Promise<any>;
changeGroupOwner(options: ChangGroupOwnerParams): Promise<any>;
initGroupAttributes(groupAttributes: GroupAttrParams): Promise<any>;
setGroupAttributes(groupAttributes: GroupAttrParams): Promise<any>;
deleteGroupAttributes(options: KeyListParams): Promise<any>;
getGroupAttributes(options: KeyListParams): Promise<any>;
setGroupCounters(counters: SetCountersParams): Promise<any>;
increaseGroupCounter(options: CountersParams): Promise<any>;
decreaseGroupCounter(options: CountersParams): Promise<any>;
getGroupCounters(options: KeyListParams): Promise<any>;
getGroupMemberList(options: GetMemberListParams): Promise<any>;
getGroupMemberProfile(options: GetMemberProfileParams): Promise<any>;
addGroupMember(options: AddMemberParams): Promise<any>;
deleteGroupMember(options: DeleteMemberParams): Promise<any>;
setGroupMemberMuteTime(options: SetMemberMuteParams): Promise<any>;
setGroupMemberRole(options: SetMemberRoleParams): Promise<any>;
setGroupMemberNameCard(options: SetMemberNameCardParams): Promise<any>;
setGroupMemberCustomField(options: SetMemberCustomFiledParams): Promise<any>;
markGroupMemberList(options: MarkMemberParams): Promise<any>;
}
interface ITUIUserService extends TUIBase {
init(): void;
switchUserStatus(options: SwitchUserStatusParams): void;
switchMessageReadStatus(displayMessageReadReceipt: boolean): void;
getUserProfile(options?: UserIDListParams): Promise<any>;
updateMyProfile(options: UpdateMyProfileParams): Promise<any>;
addToBlacklist(options: UserIDListParams): Promise<any>;
removeFromBlacklist(options: UserIDListParams): Promise<any>;
getUserStatus(options: UserIDListParams): Promise<any>;
subscribeUserStatus(options: UserIDListParams): Promise<any> | void;
unsubscribeUserStatus(options?: UserIDListParams): Promise<any>;
}
interface ITUIFriendService {
init(): void;
getFriendList(): Promise<any>;
getFriendRemark(userIDList: string[]): Record<string, any>;
addFriend(options: AddFriendParams): Promise<any>;
deleteFriend(options: DeleteFriendParams): Promise<any>;
checkFriend(options: CheckFriendParams): Promise<any>;
getFriendProfile(options: GetFriendProfileParams): Promise<any>;
updateFriend(options: UpdateFriendParams): Promise<any>;
acceptFriendApplication(options: AcceptFriendApplicationParams): Promise<any>;
refuseFriendApplication(userID: string): Promise<any>;
deleteFriendApplication(options: DeleteFriendApplicationParams): Promise<any>;
setFriendApplicationRead(): Promise<any>;
createFriendGroup(options: FriendGroupParams): Promise<any>;
deleteFriendGroup(name: string): Promise<any>;
addToFriendGroup(options: FriendGroupParams): Promise<any>;
removeFromFriendGroup(options: FriendGroupParams): Promise<any>;
renameFriendGroup(options: RenameFriendGroupParams): Promise<any>;
}
interface ITUIReportService {
reportFeature(code: number, feature?: string): void;
}
interface ITUISearchService {
searchCloudMessages(options: SearchCloudMessagesParams): Promise<any>;
searchCloudUsers(options: SearchCloudUsersParams): Promise<any>;
searchCloudGroups(options: SearchCloudGroupsParams): Promise<any>;
}
interface ITUIChatEngine {
isInited: boolean;
chat: ChatSDK;
EVENT: any;
TYPES: any;
eventCenter: IEventCenter;
TUIStore: ITUIStore;
TUITranslate: any;
TUIConversation: ITUIConversationService;
TUIChat: ITUIChatService;
TUIGroup: ITUIGroupService;
TUIUser: ITUIUserService;
login(options: LoginParams): Promise<any>;
logout(): Promise<any>;
isReady(): boolean;
destroy(): Promise<any>;
setLogLevel(level: number): void;
mount(name: string, instance: any): void;
getMyUserID(): string;
}
interface ITUIGlobal {
global: any;
isOfficial: boolean;
[key: string]: any;
initOfficial(isOfficial: boolean): void;
getPlatform(): string;
}
declare const TUIChatEngine: ITUIChatEngine;
declare const tuiGlobal: ITUIGlobal;
declare const tuiStore: ITUIStore;
declare const tuiTranslate: ITUITranslateService;
declare const tuiConversation: ITUIConversationService;
declare const tuiUser: ITUIUserService;
declare const tuiChat: ITUIChatService;
declare const tuiGroup: ITUIGroupService;
declare const tuiFriend: ITUIFriendService;
declare const tuiReport: ITUIReportService;
declare const tuiSearch: ITUISearchService;
export { AcceptFriendApplicationParams, AddFriendParams, AddMemberParams, ChangGroupOwnerParams, CheckFriendParams, ConvertVoiceToTextParams, CountersParams, CreateGroupParams, DeleteConversationParams, DeleteFriendApplicationParams, DeleteFriendParams, DeleteMemberParams, ForwardMessageParams, Friend, FriendApplication, FriendGroup, FriendGroupParams, GetAllUserListOfMessageReactionParams, GetFriendProfileParams, GetGroupMessageReadParams, GetGroupProfileParams, GetMemberListParams, GetMemberProfileParams, GetMessageListHoppingParams, GetMessageListParams, GetMessageReactionsParams, GroupAttrParams, GroupServiceBasicParams, GroupType, IConversationModel, IGroupModel, IMessageModel, IResultMap, ISearchCloudGroupsResultItem, ISearchCloudMessagesResultItem, ISearchCloudUsersResultItem, ISearchParamsMap, ISearchResult, ISearchType, JoinGroupParams, KeyListParams, LoginParams, MarkConversationParams, MarkMemberParams, MessageControlInfo, MessageType, ModifyMessageParams, MuteConversationParams, OfflinePushInfo, PinConversationParams, ReactionInfo, RenameFriendGroupParams, SEARCH_TYPE, SearchCloudGroupMembersParams, SearchCloudGroupsParams, SearchCloudMessagesParams, SearchCloudUsersParams, SendForwardMessageMergeInfo, SendForwardMessageOptions, SendMessageOptions, SendMessageParams, SetConversationDraftParams, SetCountersParams, SetMemberCustomFiledParams, SetMemberMuteParams, SetMemberNameCardParams, SetMemberRoleParams, StoreName, SwitchUserStatusParams, TUIChatEngine, tuiChat as TUIChatService, tuiConversation as TUIConversationService, tuiFriend as TUIFriendService, tuiGlobal as TUIGlobal, tuiGroup as TUIGroupService, tuiReport as TUIReportService, tuiSearch as TUISearchService, tuiStore as TUIStore, tuiTranslate as TUITranslateService, tuiUser as TUIUserService, TranslateTextParams, UpdateFriendParams, UpdateGroupParams, UpdateMyProfileParams, UserIDListParams, TUIChatEngine as default, func, handleGroupApplicationParams };