import ChatEngine from '@tencentcloud/chat-uikit-engine-lite'; import type { ChatOfflinePushInfo } from '../hooks/useOfflinePushInfo'; import type { IConversationModel, IMessageModel, ISearchCloudMessagesResultItem, MessageControlInfo } from '@tencentcloud/chat-uikit-engine-lite'; enum ConversationType { C2C = ChatEngine.TYPES.CONV_C2C, GROUP = ChatEngine.TYPES.CONV_GROUP, SYSTEM = ChatEngine.TYPES.CONV_SYSTEM, } enum MessageType { TEXT = ChatEngine.TYPES.MSG_TEXT, IMAGE = ChatEngine.TYPES.MSG_IMAGE, AUDIO = ChatEngine.TYPES.MSG_AUDIO, VIDEO = ChatEngine.TYPES.MSG_VIDEO, FILE = ChatEngine.TYPES.MSG_FILE, FACE = ChatEngine.TYPES.MSG_FACE, LOCATION = ChatEngine.TYPES.MSG_LOCATION, GRP_TIP = ChatEngine.TYPES.MSG_GRP_TIP, CUSTOM = ChatEngine.TYPES.MSG_CUSTOM, MERGER = ChatEngine.TYPES.MSG_MERGER, } enum SearchType { MESSAGE = 'message', CHAT_MESSAGE = 'chat_message', USER = 'user', GROUP = 'group', } enum MessagePriority { LOWEST = ChatEngine.TYPES.MSG_PRIORITY_LOWEST, LOW = ChatEngine.TYPES.MSG_PRIORITY_LOW, NORMAL = ChatEngine.TYPES.MSG_PRIORITY_NORMAL, HIGH = ChatEngine.TYPES.MSG_PRIORITY_HIGH, } interface ConversationModel extends Omit { type: ConversationType; } interface MessageModel extends Omit { type: MessageType; conversationType: ConversationType; } interface SearchCloudMessagesResultItem extends Omit { messageList: MessageModel[]; conversation: ConversationModel; } interface SendMessageParams { priority?: MessagePriority; to?: string; conversationType?: ConversationType.C2C | ConversationType.GROUP; payload: any; cloudCustomData?: string; needReadReceipt?: boolean; receiverList?: string[]; } interface SendMessageOptions { onlineUserOnly?: boolean; offlinePushInfo?: ChatOfflinePushInfo; messageControlInfo?: MessageControlInfo; } export type { ISearchResult as SearchResult, ISearchParamsMap as SearchParamsMap, IGroupModel as GroupModel, ISearchCloudUsersResultItem as SearchCloudUsersResultItem, ISearchCloudGroupsResultItem as SearchCloudGroupsResultItem, } from '@tencentcloud/chat-uikit-engine-lite'; export type { MessageModel, ConversationModel, SearchCloudMessagesResultItem, SendMessageParams, SendMessageOptions, }; export { MessageType, ConversationType, // SearchType, };