@tencentcloud/chat-uikit-engine 2.4.3 → 3.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +89 -6
- package/index.js +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import TencentCloudChat, { Conversation, Message, ChatSDK } from '@tencentcloud/chat';
|
|
1
|
+
import TencentCloudChat, { Conversation, Message, Profile, Group, ChatSDK } from '@tencentcloud/lite-chat';
|
|
2
2
|
|
|
3
3
|
interface IConversationModel {
|
|
4
4
|
conversationID: string;
|
|
@@ -238,15 +238,89 @@ interface ConvertVoiceToTextParams {
|
|
|
238
238
|
message: IMessageModel;
|
|
239
239
|
language?: string;
|
|
240
240
|
}
|
|
241
|
-
|
|
241
|
+
declare enum ISearchType {
|
|
242
|
+
MESSAGE = "message",
|
|
243
|
+
CHAT_MESSAGE = "chat_message",
|
|
244
|
+
USER = "user",
|
|
245
|
+
GROUP = "group"
|
|
246
|
+
}
|
|
247
|
+
declare enum MessageType {
|
|
248
|
+
MSG_TEXT = "TIMTextElem",
|
|
249
|
+
MSG_IMAGE = "TIMImageElem",
|
|
250
|
+
MSG_SOUND = "TIMSoundElem",
|
|
251
|
+
MSG_FILE = "TIMFileElem",
|
|
252
|
+
MSG_VIDEO = "TIMVideoFileElem",
|
|
253
|
+
MSG_LOCATION = "TIMLocationElem",
|
|
254
|
+
MSG_CUSTOM = "TIMCustomElem",
|
|
255
|
+
MSG_MERGER = "TIMRelayElem"
|
|
256
|
+
}
|
|
257
|
+
declare enum GroupType {
|
|
258
|
+
GRP_WORK = "Private",
|
|
259
|
+
GRP_PUBLIC = "Public",
|
|
260
|
+
GRP_MEETING = "ChatRoom",
|
|
261
|
+
GRP_COMMUNITY = "Community"
|
|
262
|
+
}
|
|
263
|
+
interface ISearchCloudMessagesResultBase<T extends ISearchType> {
|
|
264
|
+
totalCount: number;
|
|
265
|
+
params: ISearchParamsMap[T];
|
|
266
|
+
}
|
|
267
|
+
interface ISearchCloudMessagesResultItem extends ISearchCloudMessagesResultBase<ISearchType.MESSAGE> {
|
|
268
|
+
messageList: IMessageModel[];
|
|
269
|
+
messageCount: number;
|
|
270
|
+
conversation: IConversationModel;
|
|
271
|
+
}
|
|
272
|
+
interface ISearchCloudUsersResultItem extends ISearchCloudMessagesResultBase<ISearchType.USER> {
|
|
273
|
+
profile: Profile;
|
|
274
|
+
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;
|
|
275
|
+
}
|
|
276
|
+
interface ISearchCloudGroupsResultItem extends ISearchCloudMessagesResultBase<ISearchType.USER> {
|
|
277
|
+
groupInfo: Group;
|
|
278
|
+
conversation: IConversationModel;
|
|
279
|
+
}
|
|
280
|
+
interface IResultMap {
|
|
281
|
+
[ISearchType.MESSAGE]: ISearchCloudMessagesResultItem[];
|
|
282
|
+
[ISearchType.CHAT_MESSAGE]: ISearchCloudMessagesResultItem[];
|
|
283
|
+
[ISearchType.USER]: ISearchCloudUsersResultItem[];
|
|
284
|
+
[ISearchType.GROUP]: ISearchCloudGroupsResultItem[];
|
|
285
|
+
}
|
|
286
|
+
interface ISearchResult<T extends ISearchType> {
|
|
287
|
+
resultList: IResultMap[T] | [];
|
|
288
|
+
hasMore: boolean;
|
|
289
|
+
cursor: string;
|
|
290
|
+
params?: ISearchParamsMap[T];
|
|
291
|
+
totalCount: number;
|
|
292
|
+
}
|
|
293
|
+
interface ISearchParamsMap {
|
|
294
|
+
[ISearchType.MESSAGE]: SearchCloudMessagesParams;
|
|
295
|
+
[ISearchType.CHAT_MESSAGE]: SearchCloudMessagesParams;
|
|
296
|
+
[ISearchType.USER]: SearchCloudUsersParams;
|
|
297
|
+
[ISearchType.GROUP]: SearchCloudGroupsParams;
|
|
298
|
+
}
|
|
299
|
+
interface BaseSearchCloudParams {
|
|
300
|
+
keyword?: string;
|
|
242
301
|
keywordList?: string[];
|
|
243
302
|
keywordListMatchType?: 'or' | 'and';
|
|
303
|
+
cursor?: string;
|
|
304
|
+
count?: number;
|
|
305
|
+
}
|
|
306
|
+
interface SearchCloudMessagesParams extends BaseSearchCloudParams {
|
|
244
307
|
senderUserIDList?: string[];
|
|
245
|
-
messageTypeList?:
|
|
308
|
+
messageTypeList?: any[];
|
|
246
309
|
conversationID?: string;
|
|
247
310
|
timePosition?: number;
|
|
248
311
|
timePeriod?: number;
|
|
249
|
-
|
|
312
|
+
}
|
|
313
|
+
interface SearchCloudUsersParams extends BaseSearchCloudParams {
|
|
314
|
+
gender?: string;
|
|
315
|
+
miniBirthday?: number;
|
|
316
|
+
maxBirthday?: number;
|
|
317
|
+
}
|
|
318
|
+
interface SearchCloudGroupsParams extends BaseSearchCloudParams {
|
|
319
|
+
groupTypeList?: any[];
|
|
320
|
+
}
|
|
321
|
+
interface SearchCloudGroupMembersParams extends BaseSearchCloudParams {
|
|
322
|
+
groupTypeList?: string[];
|
|
323
|
+
groupIDList?: string[];
|
|
250
324
|
}
|
|
251
325
|
interface ForwardMessageParams {
|
|
252
326
|
to: string;
|
|
@@ -477,7 +551,8 @@ declare enum MountedList {
|
|
|
477
551
|
TUIGroup = "TUIGroup",
|
|
478
552
|
TUIUser = "TUIUser",
|
|
479
553
|
TUIFriend = "TUIFriend",
|
|
480
|
-
TUIReport = "TUIReport"
|
|
554
|
+
TUIReport = "TUIReport",
|
|
555
|
+
TUISearch = "TUISearch"
|
|
481
556
|
}
|
|
482
557
|
|
|
483
558
|
declare enum StoreName {
|
|
@@ -521,6 +596,7 @@ declare class ChatEngine implements ITUIChatEngine {
|
|
|
521
596
|
TUIUser: ITUIUserService;
|
|
522
597
|
TUIFriend: ITUIFriendService;
|
|
523
598
|
TUIReport: ITUIReportService;
|
|
599
|
+
TUISearch: ITUISearchService;
|
|
524
600
|
private loginStatusPromise;
|
|
525
601
|
private userID;
|
|
526
602
|
constructor();
|
|
@@ -669,6 +745,12 @@ interface ITUIReportService {
|
|
|
669
745
|
reportFeature(code: number, feature?: string): void;
|
|
670
746
|
}
|
|
671
747
|
|
|
748
|
+
interface ITUISearchService {
|
|
749
|
+
searchCloudMessages(options: SearchCloudMessagesParams): Promise<any>;
|
|
750
|
+
searchCloudUsers(options: SearchCloudUsersParams): Promise<any>;
|
|
751
|
+
searchCloudGroups(options: SearchCloudGroupsParams): Promise<any>;
|
|
752
|
+
}
|
|
753
|
+
|
|
672
754
|
interface ITUIChatEngine {
|
|
673
755
|
isInited: boolean;
|
|
674
756
|
chat: ChatSDK;
|
|
@@ -708,5 +790,6 @@ declare const tuiChat: ITUIChatService;
|
|
|
708
790
|
declare const tuiGroup: ITUIGroupService;
|
|
709
791
|
declare const tuiFriend: ITUIFriendService;
|
|
710
792
|
declare const tuiReport: ITUIReportService;
|
|
793
|
+
declare const tuiSearch: ITUISearchService;
|
|
711
794
|
|
|
712
|
-
export { AcceptFriendApplicationParams, AddFriendParams, AddMemberParams, ChangGroupOwnerParams, CheckFriendParams, ConvertVoiceToTextParams, CountersParams, CreateGroupParams, DeleteFriendApplicationParams, DeleteFriendParams, DeleteMemberParams, ForwardMessageParams, Friend, FriendApplication, GetAllUserListOfMessageReactionParams, GetFriendProfileParams, GetGroupMessageReadParams, GetGroupProfileParams, GetMemberListParams, GetMemberProfileParams, GetMessageListHoppingParams, GetMessageListParams, GetMessageReactionsParams, GroupAttrParams, GroupServiceBasicParams, IConversationModel, IGroupModel, IMessageModel, JoinGroupParams, KeyListParams, LoginParams, MarkMemberParams, MessageControlInfo, ModifyMessageParams, MuteConversationParams, OfflinePushInfo, PinConversationParams, ReactionInfo, SEARCH_TYPE, SearchCloudMessagesParams, 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, tuiStore as TUIStore, tuiTranslate as TUITranslateService, tuiUser as TUIUserService, TranslateTextParams, UpdateFriendParams, UpdateGroupParams, UpdateMyProfileParams, UserIDListParams, TUIChatEngine as default, func, handleGroupApplicationParams };
|
|
795
|
+
export { AcceptFriendApplicationParams, AddFriendParams, AddMemberParams, ChangGroupOwnerParams, CheckFriendParams, ConvertVoiceToTextParams, CountersParams, CreateGroupParams, DeleteFriendApplicationParams, DeleteFriendParams, DeleteMemberParams, ForwardMessageParams, Friend, FriendApplication, 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, MarkMemberParams, MessageControlInfo, MessageType, ModifyMessageParams, MuteConversationParams, OfflinePushInfo, PinConversationParams, ReactionInfo, 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 };
|