node-nim 10.2.0 → 10.3.0-beta.1
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/README.md +0 -6
- package/dist/chatroom_def/chatroom_def.js +121 -0
- package/dist/chatroom_def/chatroom_def.js.map +1 -0
- package/dist/loader.js +19 -4
- package/dist/loader.js.map +1 -1
- package/dist/nim/msglog.js +163 -81
- package/dist/nim/msglog.js.map +1 -1
- package/dist/nim/session.js +3 -3
- package/dist/nim/session.js.map +1 -1
- package/dist/nim/super_team.js +59 -0
- package/dist/nim/super_team.js.map +1 -1
- package/dist/nim/talk.js +5 -5
- package/dist/nim/talk.js.map +1 -1
- package/dist/nim/team.js +48 -0
- package/dist/nim/team.js.map +1 -1
- package/dist/nim/tool.js +3 -0
- package/dist/nim/tool.js.map +1 -1
- package/dist/nim_def/client_def.js +1 -0
- package/dist/nim_def/client_def.js.map +1 -1
- package/dist/nim_def/msglog_def.js +31 -1
- package/dist/nim_def/msglog_def.js.map +1 -1
- package/dist/nim_def/super_team_def.js +8 -1
- package/dist/nim_def/super_team_def.js.map +1 -1
- package/dist/nim_def/team_def.js +8 -1
- package/dist/nim_def/team_def.js.map +1 -1
- package/dist/node-nim.js +3 -1
- package/dist/node-nim.js.map +1 -1
- package/dist/qchat/message.js +39 -0
- package/dist/qchat/message.js.map +1 -1
- package/dist/qchat_def/public_def.js +2 -0
- package/dist/qchat_def/public_def.js.map +1 -1
- package/dist/v2/v2_nim_ai_service.js +40 -0
- package/dist/v2/v2_nim_ai_service.js.map +1 -0
- package/dist/v2/v2_nim_chatroom_service.js.map +1 -1
- package/dist/v2/v2_nim_client.js +14 -0
- package/dist/v2/v2_nim_client.js.map +1 -1
- package/dist/v2/v2_nim_conversation_service.js +24 -0
- package/dist/v2/v2_nim_conversation_service.js.map +1 -1
- package/dist/v2/v2_nim_friend_service.js +41 -0
- package/dist/v2/v2_nim_friend_service.js.map +1 -1
- package/dist/v2/v2_nim_message_service.js +22 -0
- package/dist/v2/v2_nim_message_service.js.map +1 -1
- package/dist/v2/v2_nim_storage_service.js +82 -1
- package/dist/v2/v2_nim_storage_service.js.map +1 -1
- package/dist/v2/v2_nim_team_service.js +24 -0
- package/dist/v2/v2_nim_team_service.js.map +1 -1
- package/dist/v2/v2_nim_user_service.js +32 -0
- package/dist/v2/v2_nim_user_service.js.map +1 -1
- package/dist/v2/v2_nim_utilities.js +52 -1
- package/dist/v2/v2_nim_utilities.js.map +1 -1
- package/dist/v2_def/v2_nim_enum_def.js +60 -0
- package/dist/v2_def/v2_nim_enum_def.js.map +1 -1
- package/package.json +12 -3
- package/script/publish-to-netease-npm.js +9 -3
- package/types/chatroom_def/chatroom_def.d.ts +449 -0
- package/types/loader.d.ts +2 -2
- package/types/nim/client.d.ts +5 -5
- package/types/nim/msglog.d.ts +124 -80
- package/types/nim/session.d.ts +1 -1
- package/types/nim/super_team.d.ts +26 -1
- package/types/nim/talk.d.ts +4 -4
- package/types/nim/team.d.ts +21 -1
- package/types/nim/tool.d.ts +1 -0
- package/types/nim_def/client_def.d.ts +4 -1
- package/types/nim_def/msglog_def.d.ts +36 -1
- package/types/nim_def/super_team_def.d.ts +28 -0
- package/types/nim_def/talk_def.d.ts +1 -1
- package/types/nim_def/team_def.d.ts +19 -0
- package/types/node-nim.d.ts +2 -2
- package/types/qchat/message.d.ts +16 -1
- package/types/qchat_def/message_def.d.ts +36 -0
- package/types/qchat_def/public_def.d.ts +3 -1
- package/types/v2/v2_nim_ai_service.d.ts +18 -0
- package/types/v2/v2_nim_chatroom_service.d.ts +2 -0
- package/types/v2/v2_nim_client.d.ts +9 -1
- package/types/v2/v2_nim_conversation_service.d.ts +10 -0
- package/types/v2/v2_nim_friend_service.d.ts +14 -2
- package/types/v2/v2_nim_message_service.d.ts +9 -1
- package/types/v2/v2_nim_storage_service.d.ts +32 -2
- package/types/v2/v2_nim_team_service.d.ts +9 -1
- package/types/v2/v2_nim_user_service.d.ts +11 -1
- package/types/v2/v2_nim_utilities.d.ts +38 -1
- package/types/v2_def/v2_nim_enum_def.d.ts +46 -3
- package/types/v2_def/v2_nim_struct_def.d.ts +171 -8
|
@@ -53,6 +53,10 @@ export declare enum NIMSuperTeamMuteType {
|
|
|
53
53
|
kNIMSuperTeamMuteTypeNomalMute = 1 /**< 普通成员禁言 */,
|
|
54
54
|
kNIMSuperTeamMuteTypeAllMute = 3 /**< 全部禁言 */
|
|
55
55
|
}
|
|
56
|
+
export declare enum SuperTeamQueryOrder {
|
|
57
|
+
kSuperTeamQueryOrderDesc = 0,
|
|
58
|
+
kSuperTeamQueryOrderAsc = 1
|
|
59
|
+
}
|
|
56
60
|
export interface SuperTeamEvent {
|
|
57
61
|
res_code_?: NIMResCode; /**< 错误码 */
|
|
58
62
|
notification_id_?: NIMNotificationId; /**< 通知类型ID */
|
|
@@ -107,6 +111,24 @@ export interface SuperTeamMemberPropertyJsonValue {
|
|
|
107
111
|
export interface SuperTeamMemberProperty {
|
|
108
112
|
member_info_json_value_?: SuperTeamMemberPropertyJsonValue;
|
|
109
113
|
}
|
|
114
|
+
export interface SuperTeamMemberSerachResult {
|
|
115
|
+
team_member_propertys_?: Array<SuperTeamMemberProperty>;
|
|
116
|
+
offset_?: number;
|
|
117
|
+
finished_?: boolean;
|
|
118
|
+
}
|
|
119
|
+
export interface SuperTeamMemberKeywordSearchOption {
|
|
120
|
+
team_id_?: string;
|
|
121
|
+
keyword_?: string;
|
|
122
|
+
offset_?: number;
|
|
123
|
+
order_?: SuperTeamQueryOrder;
|
|
124
|
+
limit_?: number;
|
|
125
|
+
}
|
|
126
|
+
export interface SuperTeamMemberRoleTypeSearchOption {
|
|
127
|
+
role_types_?: Array<NIMSuperTeamUserType>;
|
|
128
|
+
offset_?: number;
|
|
129
|
+
order_?: SuperTeamQueryOrder;
|
|
130
|
+
limit_?: number;
|
|
131
|
+
}
|
|
110
132
|
export type SuperTeamEventCallback = (result: SuperTeamEvent) => void;
|
|
111
133
|
export type QueryAllMySuperTeamsCallback = (count: number, result: Array<string>) => void;
|
|
112
134
|
export type QueryAllMySuperTeamsInfoCallback = (count: number, result: Array<SuperTeamInfo>) => void;
|
|
@@ -115,6 +137,8 @@ export type QuerySuperTeamMembersCallback = (rescode: NIMResCode, tid: string, c
|
|
|
115
137
|
export type QuerySuperTeamMemberCallback = (result: SuperTeamMemberProperty) => void;
|
|
116
138
|
export type QuerySuperTeamInfoCallback = (tid: string, result: SuperTeamInfo) => void;
|
|
117
139
|
export type QuerySuperTeamMembersOnlineCallback = (rescode: NIMResCode, count: number, result: Array<SuperTeamMemberProperty>) => void;
|
|
140
|
+
export type SuperTeamMemberSerachCallback = (result: SuperTeamMemberSerachResult) => void;
|
|
141
|
+
export type SuperTeamGetMemberListCallback = (result: SuperTeamMemberSerachResult) => void;
|
|
118
142
|
export interface NIMSuperTeamAPI {
|
|
119
143
|
InitEventHandlers(): void;
|
|
120
144
|
InviteAsync(tid: string, ids: Array<string>, invitationPostscript: string, invitationAttachment: string, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
|
|
@@ -141,4 +165,8 @@ export interface NIMSuperTeamAPI {
|
|
|
141
165
|
MuteMemberAsync(tid: string, member_id: string, set_mute: boolean, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
|
|
142
166
|
MuteAsync(tid: string, set_mute: boolean, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
|
|
143
167
|
QuerySuperTeamsInfoByKeywordAsync(keyword: string, cb: QueryAllMySuperTeamsInfoCallback | null, jsonExtension: string): void;
|
|
168
|
+
SearchTeamMembers(option: SuperTeamMemberKeywordSearchOption, cb: SuperTeamMemberSerachCallback | null): void;
|
|
169
|
+
GetTeamMemberList(tid: string, option: SuperTeamMemberRoleTypeSearchOption, cb: SuperTeamGetMemberListCallback | null): void;
|
|
170
|
+
AddTeamMembersFollow(tid: string, account_ids: Array<string>, cb: SuperTeamEventCallback | null): boolean;
|
|
171
|
+
RemoveTeamMembersFollow(tid: string, account_ids: Array<string>, cb: SuperTeamEventCallback | null): boolean;
|
|
144
172
|
}
|
|
@@ -89,7 +89,7 @@ export interface NIMTalkAPI {
|
|
|
89
89
|
StopSendMsg(clientMsgId: string, type: NIMMessageType, jsonExtension: string): void;
|
|
90
90
|
RecallMsg(msg: IMMessage, notify_msg: string, cb: RecallMsgsCallback | null, apnstext: string, pushpayloadconst: string, jsonExtension: string): void;
|
|
91
91
|
GetAttachmentPathFromMsg(msg: IMMessage): string;
|
|
92
|
-
ReplyMessage(
|
|
92
|
+
ReplyMessage(formerMsg: IMMessage, replyMsg: IMMessage, progressCb: FileUpPrgCallback): void;
|
|
93
93
|
RegMessageFilter(cb: MessageFilterCallback | null, jsonExtension: string): void;
|
|
94
94
|
RegTeamNotificationFilter(cb: TeamNotificationFilterCallback | null, jsonExtension: string): void;
|
|
95
95
|
CreateTextMessage(receiver_id: string, session_type: NIMSessionType, client_msg_id: string, content: string, msg_setting: MessageSetting, timetag: number, sub_type: number): string;
|
|
@@ -57,6 +57,10 @@ export declare enum NIMTeamQueryType {
|
|
|
57
57
|
kNIMTeamQueryByTeamId = 1 /** < 仅匹配群组 ID,传字符串,SDK 会自动转为 long 类型数据与群组 ID 严格匹配 */,
|
|
58
58
|
kNIMTeamQueryByTeamName = 2 /** < 仅匹配群组名称 */
|
|
59
59
|
}
|
|
60
|
+
export declare enum TeamQueryOrder {
|
|
61
|
+
kTeamQueryOrderDesc = 0,
|
|
62
|
+
kTeamQueryOrderAsc = 1
|
|
63
|
+
}
|
|
60
64
|
export interface TeamEvent {
|
|
61
65
|
res_code_?: NIMResCode; /**< 错误码 */
|
|
62
66
|
notification_id_?: NIMNotificationId; /**< 通知类型ID */
|
|
@@ -114,6 +118,17 @@ export interface TeamMemberPropertyJsonValue {
|
|
|
114
118
|
export interface TeamMemberProperty {
|
|
115
119
|
member_info_json_value_?: TeamMemberPropertyJsonValue;
|
|
116
120
|
}
|
|
121
|
+
export interface TeamMemberSerachResult {
|
|
122
|
+
team_member_propertys_?: Array<TeamMemberProperty>;
|
|
123
|
+
offset_?: number;
|
|
124
|
+
finished_?: boolean;
|
|
125
|
+
}
|
|
126
|
+
export interface TeamMemberRoleTypeSearchOption {
|
|
127
|
+
role_types_?: Array<NIMTeamUserType>;
|
|
128
|
+
offset_?: number;
|
|
129
|
+
order_?: TeamQueryOrder;
|
|
130
|
+
limit_?: number;
|
|
131
|
+
}
|
|
117
132
|
export type TeamEventCallback = (result: TeamEvent) => void;
|
|
118
133
|
export type QueryAllMyTeamsCallback = (count: number, result: Array<string>) => void;
|
|
119
134
|
export type QueryAllMyTeamsInfoCallback = (count: number, result: Array<TeamInfo>) => void;
|
|
@@ -128,6 +143,7 @@ export type TeamMsgAckReadCallback = (tid: string, success_ids: Array<string>, f
|
|
|
128
143
|
export type UpdateTInfoLocalCallback = (success_ids: Array<string>, failure_ids: Array<string>) => void;
|
|
129
144
|
export type GetTeamInfoBatchSFTransCallback = (count: number, infos: Array<TeamInfo>) => void;
|
|
130
145
|
export type GetTeamInfoListCallback = (rescode: NIMResCode, infos: Array<TeamInfo>, failure_ids: Array<string>) => void;
|
|
146
|
+
export type TeamGetMemberListCallback = (result: TeamMemberSerachResult) => void;
|
|
131
147
|
export interface NIMTeamAPI {
|
|
132
148
|
InitEventHandlers(): void;
|
|
133
149
|
CreateTeamAsync(info: TeamInfo, ids: Array<string>, invitationPostscript: string, cb: TeamEventCallback | null, jsonExtension: string): boolean;
|
|
@@ -164,4 +180,7 @@ export interface NIMTeamAPI {
|
|
|
164
180
|
UpdateTInfoLocal(infos: Array<TeamInfo>, cb: UpdateTInfoLocalCallback | null, jsonExtension: string): void;
|
|
165
181
|
GetTeamInfoBatchSFTrans(cb: GetTeamInfoBatchSFTransCallback | null, time_tag: number, jsonExtension: string): void;
|
|
166
182
|
GetTeaminfoList(tids: Array<string>, cb: GetTeamInfoListCallback | null): void;
|
|
183
|
+
GetTeamMemberList(tid: string, option: TeamMemberRoleTypeSearchOption, cb: TeamGetMemberListCallback | null): void;
|
|
184
|
+
AddTeamMembersFollow(tid: string, account_ids: Array<string>, cb: TeamEventCallback | null): boolean;
|
|
185
|
+
RemoveTeamMembersFollow(tid: string, account_ids: Array<string>, cb: TeamEventCallback | null): boolean;
|
|
167
186
|
}
|
package/types/node-nim.d.ts
CHANGED
|
@@ -26,8 +26,8 @@ import { QChatAttachmentModule } from './qchat/attachment';
|
|
|
26
26
|
import { QChatRoleModule } from './qchat/role';
|
|
27
27
|
import { V2NIMClient } from './v2/v2_nim_client';
|
|
28
28
|
import { V2NIMChatroomClient } from './v2/v2_nim_chatroom_client';
|
|
29
|
-
import { V2NIMMessageCreator, V2NIMClientAntispamUtil, V2NIMChatroomMessageCreator, V2NIMConversationIdUtil } from './v2/v2_nim_utilities';
|
|
30
|
-
export { NIMClient, NIMDataSync, NIMFriend, NIMGlobal, NIMMsgLog, NIMNOS, NIMOnlineSession, NIMPassThroughProxy, NIMSession, NIMSubscribeEvent, NIMSuperTeam, NIMSysMsg, NIMTalk, NIMTeam, NIMTool, NIMUser, NIMPlugin, NIMTalkEx, QChatInstanceModule, QChatServerModule, QChatChannelModule, QChatChannelCategoryModule, QChatMessageModule, QChatSystemNotificationModule, QChatAttachmentModule, QChatRoleModule, V2NIMChatroomClient, V2NIMMessageCreator, V2NIMClientAntispamUtil, V2NIMChatroomMessageCreator, V2NIMConversationIdUtil };
|
|
29
|
+
import { V2NIMMessageCreator, V2NIMMessageConverter, V2NIMClientAntispamUtil, V2NIMChatroomMessageCreator, V2NIMConversationIdUtil, V2NIMStorageUtil } from './v2/v2_nim_utilities';
|
|
30
|
+
export { NIMClient, NIMDataSync, NIMFriend, NIMGlobal, NIMMsgLog, NIMNOS, NIMOnlineSession, NIMPassThroughProxy, NIMSession, NIMSubscribeEvent, NIMSuperTeam, NIMSysMsg, NIMTalk, NIMTeam, NIMTool, NIMUser, NIMPlugin, NIMTalkEx, QChatInstanceModule, QChatServerModule, QChatChannelModule, QChatChannelCategoryModule, QChatMessageModule, QChatSystemNotificationModule, QChatAttachmentModule, QChatRoleModule, V2NIMChatroomClient, V2NIMMessageCreator, V2NIMMessageConverter, V2NIMClientAntispamUtil, V2NIMChatroomMessageCreator, V2NIMConversationIdUtil, V2NIMStorageUtil };
|
|
31
31
|
export * from './nim_def/client_def';
|
|
32
32
|
export * from './nim_def/data_sync_def';
|
|
33
33
|
export * from './nim_def/friend_def';
|
package/types/qchat/message.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
|
-
import { QChatSendMessageParam, QChatUpdateMessageParam, QChatRevokeMessageParam, QChatDeleteMessageParam, QChatGetMessagesParam, QChatGetMessagesCacheParam, QChatGetLastMessagesParam, QChatMarkMessageReadParam, QChatReplyMessageParam, QChatGetMessageHistoryByIdsParam, QChatGetReferMessagesParam, QChatGetThreadMessagesParam, QChatGetThreadRootMessagesMetaParam, QChatAddQuickCommentParam, QChatRemoveQuickCommentParam, QChatGetQuickCommentsParam, QChatAddQuickCommentResp, QChatGetLastMessagesResp, QChatGetMessageHistoryByIdsResp, QChatGetMessagesCacheResp, QChatGetMessagesResp, QChatGetQuickCommentsResp, QChatGetReferMessagesResp, QChatGetThreadMessagesResp, QChatGetThreadRootMessagesMetaResp, QChatMarkMessageReadResp, QChatRemoveQuickCommentResp, QChatReplyMessageResp, QChatSendMessageResp, QChatUpdateMessageResp, QChatMsgUpdatedResp, QChatRecvMsgResp, QChatMessageSearchPageParam, QChatMessageSearchPageResp, QChatAreMentionedMeMessagesParam, QChatAreMentionedMeMessagesResp, QChatGetMentionedMeMessagesParam, QChatGetMentionedMeMessagesResp } from '../qchat_def/message_def';
|
|
2
|
+
import { QChatSendMessageParam, QChatUpdateMessageParam, QChatRevokeMessageParam, QChatDeleteMessageParam, QChatGetMessagesParam, QChatGetMessagesCacheParam, QChatGetLastMessagesParam, QChatMarkMessageReadParam, QChatReplyMessageParam, QChatGetMessageHistoryByIdsParam, QChatGetReferMessagesParam, QChatGetThreadMessagesParam, QChatGetThreadRootMessagesMetaParam, QChatAddQuickCommentParam, QChatRemoveQuickCommentParam, QChatGetQuickCommentsParam, QChatAddQuickCommentResp, QChatGetLastMessagesResp, QChatGetMessageHistoryByIdsResp, QChatGetMessagesCacheResp, QChatGetMessagesResp, QChatGetQuickCommentsResp, QChatGetReferMessagesResp, QChatGetThreadMessagesResp, QChatGetThreadRootMessagesMetaResp, QChatMarkMessageReadResp, QChatRemoveQuickCommentResp, QChatReplyMessageResp, QChatSendMessageResp, QChatUpdateMessageResp, QChatMsgUpdatedResp, QChatRecvMsgResp, QChatMessageSearchPageParam, QChatMessageSearchPageResp, QChatAreMentionedMeMessagesParam, QChatAreMentionedMeMessagesResp, QChatGetMentionedMeMessagesParam, QChatGetMentionedMeMessagesResp, QChatInsertOrReplaceTextCacheParam, QChatInsertOrReplaceTextCacheResp, QChatDeleteTextCacheParam, QChatDeleteTextCacheResp, QChatGetTextCacheParam, QChatGetTextCacheResp } from '../qchat_def/message_def';
|
|
3
3
|
export declare interface QChatMessageEvents {
|
|
4
4
|
/** 新消息通知 */
|
|
5
5
|
message: [QChatRecvMsgResp];
|
|
@@ -125,4 +125,19 @@ export declare class QChatMessageModule extends EventEmitter<QChatMessageEvents>
|
|
|
125
125
|
* @param param 接口参数 @see QChatSearchMsgByPageParam
|
|
126
126
|
*/
|
|
127
127
|
searchMsgByPage(param: QChatMessageSearchPageParam): Promise<QChatMessageSearchPageResp>;
|
|
128
|
+
/** @fn void insertOrReplaceTextCache(const QChatInsertOrReplaceTextCacheParam& param)
|
|
129
|
+
* @brief 插入或更新自定义文本缓存
|
|
130
|
+
* @param param 接口参数 @see QChatInsertOrReplaceTextCacheParam
|
|
131
|
+
*/
|
|
132
|
+
insertOrReplaceTextCache(param: QChatInsertOrReplaceTextCacheParam): Promise<QChatInsertOrReplaceTextCacheResp>;
|
|
133
|
+
/** @fn void deleteTextCache(const QChatDeleteTextCacheParam& param)
|
|
134
|
+
* @brief 删除自定义文本缓存
|
|
135
|
+
* @param param 接口参数 @see QChatDeleteTextCacheParam
|
|
136
|
+
*/
|
|
137
|
+
deleteTextCache(param: QChatDeleteTextCacheParam): Promise<QChatDeleteTextCacheResp>;
|
|
138
|
+
/** @fn void getTextCache(const QChatGetTextCacheParam& param)
|
|
139
|
+
* @brief 获取自定义文本缓存
|
|
140
|
+
* @param param 接口参数 @see QChatGetTextCacheParam
|
|
141
|
+
*/
|
|
142
|
+
getTextCache(param: QChatGetTextCacheParam): Promise<QChatGetTextCacheResp>;
|
|
128
143
|
}
|
|
@@ -341,6 +341,13 @@ export interface QChatAreMentionedMeMessagesResp {
|
|
|
341
341
|
/** 消息是否 @ 当前用户列表, key: 消息 id, value: 是否 @ 当前用户 */
|
|
342
342
|
result?: Map<string, boolean>;
|
|
343
343
|
}
|
|
344
|
+
/** @interface 获取圈组草稿内容回调内容 */
|
|
345
|
+
export interface QChatGetTextCacheResp {
|
|
346
|
+
/** 操作结果, 参考NIMResCode */
|
|
347
|
+
res_code: number;
|
|
348
|
+
/** 缓存的内容 */
|
|
349
|
+
value: string;
|
|
350
|
+
}
|
|
344
351
|
/** 接收消息回调 */
|
|
345
352
|
export type RecvMsgCallback = (resp: QChatRecvMsgResp) => void;
|
|
346
353
|
/** 发送消息回调 */
|
|
@@ -377,6 +384,8 @@ export type MessageSearchPageCallback = (resp: QChatMessageSearchPageResp) => vo
|
|
|
377
384
|
export type GetMentionedMeMessagesCallback = (resp: QChatGetMentionedMeMessagesResp) => void;
|
|
378
385
|
/** 查询消息是否 @ 当前用户回调 */
|
|
379
386
|
export type AreMentionedMeMessagesCallback = (resp: QChatAreMentionedMeMessagesResp) => void;
|
|
387
|
+
/** 获取圈组草稿内容回调 */
|
|
388
|
+
export type GetTextCacheCallback = (resp: QChatGetTextCacheResp) => void;
|
|
380
389
|
/** @interface QChatSendMessageParam */
|
|
381
390
|
export interface QChatSendMessageParam {
|
|
382
391
|
/** 圈组消息体 */
|
|
@@ -423,6 +432,8 @@ export interface QChatGetMessagesParam {
|
|
|
423
432
|
limit?: number;
|
|
424
433
|
/** 是否倒序, false: 否, true: 是 */
|
|
425
434
|
reverse?: boolean;
|
|
435
|
+
/** 是否包含本地消息 */
|
|
436
|
+
include_local_messsages?: boolean;
|
|
426
437
|
}
|
|
427
438
|
/** @interface QChatGetLastMessagesParam */
|
|
428
439
|
export interface QChatGetLastMessagesParam {
|
|
@@ -563,3 +574,28 @@ export interface QChatMessageSearchPageParam {
|
|
|
563
574
|
/** 查询游标, 查询的起始位置 */
|
|
564
575
|
cursor?: string;
|
|
565
576
|
}
|
|
577
|
+
/** @interface 圈组插入或替换草稿内容参数 */
|
|
578
|
+
export interface QChatInsertOrReplaceTextCacheParam {
|
|
579
|
+
/** 服务器ID */
|
|
580
|
+
server_id: string;
|
|
581
|
+
/** 频道ID */
|
|
582
|
+
channel_id: string;
|
|
583
|
+
/** 缓存的内容 */
|
|
584
|
+
value: string;
|
|
585
|
+
}
|
|
586
|
+
export type QChatInsertOrReplaceTextCacheResp = QChatBaseResp;
|
|
587
|
+
/** @interface 圈组删除草稿内容参数 */
|
|
588
|
+
export interface QChatDeleteTextCacheParam {
|
|
589
|
+
/** 服务器ID */
|
|
590
|
+
server_id: string;
|
|
591
|
+
/** 频道ID */
|
|
592
|
+
channel_id: string;
|
|
593
|
+
}
|
|
594
|
+
export type QChatDeleteTextCacheResp = QChatBaseResp;
|
|
595
|
+
/** @interface 圈组获取草稿内容参数 */
|
|
596
|
+
export interface QChatGetTextCacheParam {
|
|
597
|
+
/** 服务器ID */
|
|
598
|
+
server_id: string;
|
|
599
|
+
/** 频道ID */
|
|
600
|
+
channel_id: string;
|
|
601
|
+
}
|
|
@@ -281,7 +281,9 @@ export declare enum NIMQChatClientType {
|
|
|
281
281
|
/** Web */
|
|
282
282
|
kQChatClientTypeWeb = 16,
|
|
283
283
|
/** macOS */
|
|
284
|
-
kQChatClientTypeMacOS = 64
|
|
284
|
+
kQChatClientTypeMacOS = 64,
|
|
285
|
+
/** HarmonyOS */
|
|
286
|
+
kQChatClientTypeHarmonyOS = 65
|
|
285
287
|
}
|
|
286
288
|
export declare enum NIMQChatLoginStep {
|
|
287
289
|
/** 连接 Link 地址阶段 */
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { V2NIMAIUser, V2NIMAIModelCallResponse, V2NIMProxyAIModelCallParams } from 'ts/v2_def/v2_nim_struct_def';
|
|
2
|
+
import { EventEmitter } from "eventemitter3";
|
|
3
|
+
export declare interface V2NIMAIServiceEvents {
|
|
4
|
+
/** 数字人请求回调 */
|
|
5
|
+
proxyAIModelCall: [V2NIMAIModelCallResponse];
|
|
6
|
+
}
|
|
7
|
+
export declare class V2NIMAIService extends EventEmitter<V2NIMAIServiceEvents> {
|
|
8
|
+
instance: any;
|
|
9
|
+
constructor();
|
|
10
|
+
/** @brief 数字人拉取接口 */
|
|
11
|
+
getAIUserList(): Promise<Array<V2NIMAIUser>>;
|
|
12
|
+
/**
|
|
13
|
+
* AI 数字人请求代理接口
|
|
14
|
+
* @param params AI模型参数信息
|
|
15
|
+
* @returns Promise<void>
|
|
16
|
+
*/
|
|
17
|
+
proxyAIModelCall(params: V2NIMProxyAIModelCallParams): Promise<void>;
|
|
18
|
+
}
|
|
@@ -23,6 +23,8 @@ export declare interface V2NIMChatroomServiceEvents {
|
|
|
23
23
|
messageRevokedNotification: [string, number];
|
|
24
24
|
/** 角色标签更新 */
|
|
25
25
|
chatroomTagsUpdated: [string[]];
|
|
26
|
+
/** 本端发送消息状态回调 */
|
|
27
|
+
sendMessage: [V2NIMChatroomMessage];
|
|
26
28
|
}
|
|
27
29
|
/** @brief 聊天室服务 */
|
|
28
30
|
export declare class V2NIMChatroomService extends EventEmitter<V2NIMChatroomServiceEvents> {
|
|
@@ -6,18 +6,21 @@ import { V2NIMConversationService } from './v2_nim_conversation_service';
|
|
|
6
6
|
import { V2NIMMessageService } from './v2_nim_message_service';
|
|
7
7
|
import { V2NIMNotificationService } from './v2_nim_notification_service';
|
|
8
8
|
import { V2NIMStorageService } from './v2_nim_storage_service';
|
|
9
|
-
import { V2NIMConversationIdUtil, V2NIMMessageCreator, V2NIMClientAntispamUtil } from './v2_nim_utilities';
|
|
9
|
+
import { V2NIMConversationIdUtil, V2NIMMessageCreator, V2NIMMessageConverter, V2NIMClientAntispamUtil, V2NIMStorageUtil } from './v2_nim_utilities';
|
|
10
10
|
import { V2NIMTeamService } from './v2_nim_team_service';
|
|
11
11
|
import { V2NIMSettingService } from './v2_nim_setting_service';
|
|
12
12
|
import { V2NIMFriendService } from './v2_nim_friend_service';
|
|
13
13
|
import { V2NIMUserService } from './v2_nim_user_service';
|
|
14
|
+
import { V2NIMAIService } from "./v2_nim_ai_service";
|
|
14
15
|
export declare interface V2NIMClientEvents {
|
|
15
16
|
}
|
|
16
17
|
export declare class V2NIMClient extends EventEmitter<V2NIMClientEvents> {
|
|
17
18
|
instance: any;
|
|
18
19
|
conversationIdUtil: V2NIMConversationIdUtil | null;
|
|
19
20
|
messageCreator: V2NIMMessageCreator | null;
|
|
21
|
+
messageConverter: V2NIMMessageConverter | null;
|
|
20
22
|
clientAntispamUtil: V2NIMClientAntispamUtil | null;
|
|
23
|
+
storageUtil: V2NIMStorageUtil | null;
|
|
21
24
|
loginService: V2NIMLoginService | null;
|
|
22
25
|
conversationService: V2NIMConversationService | null;
|
|
23
26
|
conversationGroupService: V2NIMConversationGroupService | null;
|
|
@@ -28,6 +31,7 @@ export declare class V2NIMClient extends EventEmitter<V2NIMClientEvents> {
|
|
|
28
31
|
settingService: V2NIMSettingService | null;
|
|
29
32
|
userService: V2NIMUserService | null;
|
|
30
33
|
friendService: V2NIMFriendService | null;
|
|
34
|
+
aiService: V2NIMAIService | null;
|
|
31
35
|
constructor();
|
|
32
36
|
/**
|
|
33
37
|
* 初始化
|
|
@@ -56,6 +60,10 @@ export declare class V2NIMClient extends EventEmitter<V2NIMClientEvents> {
|
|
|
56
60
|
* @return V2NIMMessageService
|
|
57
61
|
*/
|
|
58
62
|
getMessageService(): V2NIMMessageService | null;
|
|
63
|
+
/** @brief 获取ai服务
|
|
64
|
+
* @return V2NIMAIService
|
|
65
|
+
*/
|
|
66
|
+
getAIService(): V2NIMAIService | null;
|
|
59
67
|
/** @brief 获取通知服务
|
|
60
68
|
* @return V2NIMNotificationService
|
|
61
69
|
*/
|
|
@@ -17,6 +17,8 @@ export declare interface V2NIMConversationServiceEvents {
|
|
|
17
17
|
totalUnreadCountChanged: [number];
|
|
18
18
|
/** 根据过滤条件订阅的会话未读数变更通知 */
|
|
19
19
|
unreadCountChangedByFilter: [V2NIMConversationFilter, number];
|
|
20
|
+
/** 同账号多端标记会话 ACK 通知时间戳变更 */
|
|
21
|
+
conversationReadTimeUpdated: [string, number];
|
|
20
22
|
}
|
|
21
23
|
export declare class V2NIMConversationService extends EventEmitter<V2NIMConversationServiceEvents> {
|
|
22
24
|
instance: any;
|
|
@@ -97,6 +99,14 @@ export declare class V2NIMConversationService extends EventEmitter<V2NIMConversa
|
|
|
97
99
|
* @param groupId 会话分组ID
|
|
98
100
|
*/
|
|
99
101
|
clearUnreadCountByGroupId(groupId: string): Promise<void>;
|
|
102
|
+
/** @brief 标记会话已读时间戳 */
|
|
103
|
+
/** @param conversationId 要标记的会话 ID */
|
|
104
|
+
/** @return void */
|
|
105
|
+
markConversationRead(conversationId: string): Promise<number>;
|
|
106
|
+
/** 获取会话已读时间戳 */
|
|
107
|
+
/** @param conversationId 会话 ID */
|
|
108
|
+
/** @return Promise<number> 时间戳 */
|
|
109
|
+
getConversationReadTime(conversationId: string): Promise<number>;
|
|
100
110
|
/** @brief 订阅指定过滤条件的会话未读数
|
|
101
111
|
* @param filter 过滤条件
|
|
102
112
|
* @return void
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V2NIMFriend, V2NIMFriendAddApplication,
|
|
1
|
+
import { V2NIMFriend, V2NIMFriendAddApplication, V2NIMFriendAddParams, V2NIMFriendDeleteParams, V2NIMFriendSetParams, V2NIMFriendAddApplicationQueryOption, V2NIMFriendAddApplicationResult, V2NIMFriendSearchOption } from 'ts/v2_def/v2_nim_struct_def';
|
|
2
2
|
import { EventEmitter } from 'eventemitter3';
|
|
3
3
|
export declare interface V2NIMFriendServiceEvents {
|
|
4
4
|
/** 添加好友 */
|
|
@@ -8,7 +8,7 @@ export declare interface V2NIMFriendServiceEvents {
|
|
|
8
8
|
/** 添加好友申请 */
|
|
9
9
|
friendAddApplication: [V2NIMFriendAddApplication];
|
|
10
10
|
/** 添加好友申请被拒绝 */
|
|
11
|
-
friendAddRejected: [
|
|
11
|
+
friendAddRejected: [V2NIMFriendAddApplication];
|
|
12
12
|
/** 更新好友信息 */
|
|
13
13
|
friendInfoChanged: [V2NIMFriend];
|
|
14
14
|
}
|
|
@@ -55,4 +55,16 @@ export declare class V2NIMFriendService extends EventEmitter<V2NIMFriendServiceE
|
|
|
55
55
|
/** @param option 查询申请添加好友相关信息参数 */
|
|
56
56
|
/** @return void */
|
|
57
57
|
getAddApplicationList(option: V2NIMFriendAddApplicationQueryOption): Promise<V2NIMFriendAddApplicationResult>;
|
|
58
|
+
/** @brief 获取申请添加好友未读数量 */
|
|
59
|
+
/** @return void */
|
|
60
|
+
getAddApplicationUnreadCount(): Promise<number>;
|
|
61
|
+
/** @brief 设置申请添加好友已读 */
|
|
62
|
+
/** @return void */
|
|
63
|
+
setAddApplicationRead(): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* 根据关键字搜索用户信息
|
|
66
|
+
* @param option 搜索选项 @see V2NIMFriendSearchOption
|
|
67
|
+
* @return Promise<Array<V2NIMFriend>>
|
|
68
|
+
*/
|
|
69
|
+
searchFriendByOption(option: V2NIMFriendSearchOption): Promise<Array<V2NIMFriend>>;
|
|
58
70
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V2NIMMessage, V2NIMSendMessageParams, V2NIMSendMessageResult, V2NIMMessageRevokeParams, V2NIMMessageListOption, V2NIMMessageRefer, V2NIMClearHistoryMessageOption, V2NIMMessagePin, V2NIMMessageQuickCommentPushConfig, V2NIMMessageQuickComment, V2NIMAddCollectionParams, V2NIMCollection, V2NIMCollectionOption, V2NIMP2PMessageReadReceipt, V2NIMTeamMessageReadReceipt, V2NIMTeamMessageReadReceiptDetail, V2NIMVoiceToTextParams, V2NIMMessageSearchParams, V2NIMClearHistoryNotification, V2NIMMessageDeletedNotification, V2NIMMessagePinNotification, V2NIMMessageQuickCommentNotification, V2NIMMessageRevokeNotification } from 'ts/v2_def/v2_nim_struct_def';
|
|
1
|
+
import { V2NIMMessage, V2NIMSendMessageParams, V2NIMSendMessageResult, V2NIMMessageRevokeParams, V2NIMMessageListOption, V2NIMMessageRefer, V2NIMTheadMessageListOption, V2NIMThreadMessageListResult, V2NIMClearHistoryMessageOption, V2NIMMessagePin, V2NIMMessageQuickCommentPushConfig, V2NIMMessageQuickComment, V2NIMAddCollectionParams, V2NIMCollection, V2NIMCollectionOption, V2NIMP2PMessageReadReceipt, V2NIMTeamMessageReadReceipt, V2NIMTeamMessageReadReceiptDetail, V2NIMVoiceToTextParams, V2NIMMessageSearchParams, V2NIMClearHistoryNotification, V2NIMMessageDeletedNotification, V2NIMMessagePinNotification, V2NIMMessageQuickCommentNotification, V2NIMMessageRevokeNotification } from 'ts/v2_def/v2_nim_struct_def';
|
|
2
2
|
import { EventEmitter } from 'eventemitter3';
|
|
3
3
|
import { V2NIMProgressCallback } from 'ts/v2_def/v2_nim_callback_def';
|
|
4
4
|
export declare interface V2NIMMessageServiceEvents {
|
|
@@ -18,6 +18,8 @@ export declare interface V2NIMMessageServiceEvents {
|
|
|
18
18
|
messageDeletedNotifications: [Array<V2NIMMessageDeletedNotification>];
|
|
19
19
|
/** 清空会话历史消息通知 */
|
|
20
20
|
clearHistoryNotifications: [Array<V2NIMClearHistoryNotification>];
|
|
21
|
+
/** 本端发送消息状态回调 */
|
|
22
|
+
sendMessage: [V2NIMMessage];
|
|
21
23
|
}
|
|
22
24
|
/** @brief 消息服务 */
|
|
23
25
|
export declare class V2NIMMessageService extends EventEmitter<V2NIMMessageServiceEvents> {
|
|
@@ -45,6 +47,12 @@ export declare class V2NIMMessageService extends EventEmitter<V2NIMMessageServic
|
|
|
45
47
|
/** @brief 根据消息引用列表查询消息 */
|
|
46
48
|
/** @param messageRefers 消息引用列表 */
|
|
47
49
|
getMessageListByRefers(messageRefers: Array<V2NIMMessageRefer>): Promise<Array<V2NIMMessage>>;
|
|
50
|
+
/** @brief 查询 thread 聊天云端消息列表 */
|
|
51
|
+
/** @param threadMessageListOption threadMessageListOption 消息查询选项 */
|
|
52
|
+
getThreadMessageList(threadMessageListOption: V2NIMTheadMessageListOption): Promise<V2NIMThreadMessageListResult>;
|
|
53
|
+
/** @brief 查询 thread 聊天本地消息列表 */
|
|
54
|
+
/** @param V2NIMMessageRefer messageRefer 消息查询选项 */
|
|
55
|
+
getLocalThreadMessageList(messageRefer: V2NIMMessageRefer): Promise<V2NIMThreadMessageListResult>;
|
|
48
56
|
/** @brief 删除消息 */
|
|
49
57
|
/** @param message 需要删除的消息 */
|
|
50
58
|
/** @param serverExtension 服务器扩展字段 */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { V2NIMUploadFileParams, V2NIMUploadFileTask, V2NIMStorageScene } from 'ts/v2_def/v2_nim_struct_def';
|
|
1
|
+
import { V2NIMUploadFileParams, V2NIMUploadFileTask, V2NIMStorageScene, V2NIMDownloadMessageAttachmentParams, V2NIMMessageAttachment, V2NIMGetMediaResourceInfoResult, V2NIMSize } from 'ts/v2_def/v2_nim_struct_def';
|
|
2
2
|
import { EventEmitter } from 'eventemitter3';
|
|
3
|
+
import { V2NIMProgressCallback } from "../v2_def/v2_nim_callback_def";
|
|
3
4
|
export declare interface V2NIMStorageServiceEvents {
|
|
4
5
|
}
|
|
5
6
|
/** @brief 存储服务 */
|
|
@@ -16,13 +17,42 @@ export declare class V2NIMStorageService extends EventEmitter<V2NIMStorageServic
|
|
|
16
17
|
createUploadFileTask(fileParams: V2NIMUploadFileParams): V2NIMUploadFileTask;
|
|
17
18
|
/** @brief 文件上传 */
|
|
18
19
|
/** @param fileParams 文件上传的相关参数 */
|
|
19
|
-
/** @return
|
|
20
|
+
/** @return Primise<string> */
|
|
20
21
|
uploadFile(fileTask: V2NIMUploadFileTask): Promise<string>;
|
|
21
22
|
/** @brief 取消文件上传 */
|
|
22
23
|
/** @param uploadId 文件上传任务 id */
|
|
23
24
|
/** @return void */
|
|
24
25
|
cancelUploadFile(fileTask: V2NIMUploadFileTask): Promise<void>;
|
|
26
|
+
/** @brief 下载文件 */
|
|
27
|
+
/** @param url 文件下载地址 */
|
|
28
|
+
/** @param filePath 文件保存路径 */
|
|
29
|
+
/** @param progressCallback 下载进度回调 */
|
|
30
|
+
/** @return Promise<void> 下载文件的 Promise 对象 */
|
|
31
|
+
downloadFile(url: string, filePath: string, progressCallback: V2NIMProgressCallback): Promise<string>;
|
|
32
|
+
/** @brief 取消下载文件 */
|
|
33
|
+
/** @param url 文件下载地址 */
|
|
34
|
+
/** @return Promise<void> 取消下载文件的 Promise 对象 */
|
|
35
|
+
cancelDownloadFile(url: string): Promise<void>;
|
|
25
36
|
/** @brief 查询存储场景列表 */
|
|
26
37
|
/** @return Array<V2NIMStorageScene> */
|
|
27
38
|
getStorageSceneList(): Array<V2NIMStorageScene>;
|
|
39
|
+
/** @brief 长链接转短链接 */
|
|
40
|
+
/** @param shortUrl 短链接地址 */
|
|
41
|
+
/** @return Promise<string> 长链接的 Promise 对象 */
|
|
42
|
+
shortUrlToLong(shortUrl: string): Promise<string>;
|
|
43
|
+
/** @brief 下载消息附件 */
|
|
44
|
+
/** @param downloadParam 下载参数 */
|
|
45
|
+
/** @param progress 下载进度回调 */
|
|
46
|
+
/** @return Promise<string> 下载文件的 Promise 对象 */
|
|
47
|
+
downloadAttachment(downloadParam: V2NIMDownloadMessageAttachmentParams, progress: V2NIMProgressCallback): Promise<string>;
|
|
48
|
+
/** @brief 获取图片消息中的图片缩略图 */
|
|
49
|
+
/** @param attachment 消息附件 */
|
|
50
|
+
/** @param thumbSize 图片缩略图的尺寸,若不指定则使用默认 150x150 */
|
|
51
|
+
/** @return Promise<V2NIMGetMediaResourceInfoResult> 获取图片缩略图的 Promise 对象 */
|
|
52
|
+
getImageThumbUrl(attachment: V2NIMMessageAttachment, thumbSize?: V2NIMSize): Promise<V2NIMGetMediaResourceInfoResult>;
|
|
53
|
+
/** @brief 获取视频消息中的视频缩略图 */
|
|
54
|
+
/** @param attachment 消息附件 */
|
|
55
|
+
/** @param thumbSize 视频缩略图的尺寸,若不指定则使用默认 150x150 */
|
|
56
|
+
/** @return Promise<V2NIMGetMediaResourceInfoResult> 获取视频缩略图的 Promise 对象 */
|
|
57
|
+
getVideoCoverUrl(attachment: V2NIMMessageAttachment, thumbSize?: V2NIMSize): Promise<V2NIMGetMediaResourceInfoResult>;
|
|
28
58
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V2NIMCreateTeamParams, V2NIMAntispamConfig, V2NIMCreateTeamResult, V2NIMError, V2NIMUpdateTeamInfoParams, V2NIMTeam, V2NIMUpdateSelfMemberInfoParams, V2NIMTeamMemberQueryOption, V2NIMTeamMemberListResult, V2NIMTeamMember, V2NIMTeamJoinActionInfo, V2NIMTeamJoinActionInfoResult, V2NIMTeamJoinActionInfoQueryOption } from 'ts/v2_def/v2_nim_struct_def';
|
|
1
|
+
import { V2NIMCreateTeamParams, V2NIMAntispamConfig, V2NIMCreateTeamResult, V2NIMError, V2NIMUpdateTeamInfoParams, V2NIMTeam, V2NIMUpdateSelfMemberInfoParams, V2NIMTeamMemberQueryOption, V2NIMTeamMemberListResult, V2NIMTeamMember, V2NIMTeamJoinActionInfo, V2NIMTeamJoinActionInfoResult, V2NIMTeamJoinActionInfoQueryOption, V2NIMTeamMemberSearchOption } from 'ts/v2_def/v2_nim_struct_def';
|
|
2
2
|
import { EventEmitter } from 'eventemitter3';
|
|
3
3
|
export declare interface V2NIMTeamServiceEvents {
|
|
4
4
|
/** 群组信息同步开始 */
|
|
@@ -181,4 +181,12 @@ export declare class V2NIMTeamService extends EventEmitter<V2NIMTeamServiceEvent
|
|
|
181
181
|
/** @param option 查询参数 */
|
|
182
182
|
/** @return void */
|
|
183
183
|
getTeamJoinActionInfoList(option: V2NIMTeamJoinActionInfoQueryOption): Promise<V2NIMTeamJoinActionInfoResult>;
|
|
184
|
+
/** @brief 根据关键字搜索群组,混合搜索高级群和超大群,使用 LIKE 方式匹配,只搜索群名称 */
|
|
185
|
+
/** @param keyword 关键字 */
|
|
186
|
+
/** @return Promise<Array<V2NIMTeam>> */
|
|
187
|
+
searchTeamByKeyword(keyword: string): Promise<Array<V2NIMTeam>>;
|
|
188
|
+
/** @brief 根据关键字搜索群组成员 */
|
|
189
|
+
/** @param option 搜索选项 */
|
|
190
|
+
/** @return Promise<V2NIMTeamMemberListResult> */
|
|
191
|
+
searchTeamMembers(option: V2NIMTeamMemberSearchOption): Promise<V2NIMTeamMemberListResult>;
|
|
184
192
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V2NIMUser, V2NIMUserUpdateParams } from 'ts/v2_def/v2_nim_struct_def';
|
|
1
|
+
import { V2NIMUser, V2NIMUserUpdateParams, V2NIMUserSearchOption } from 'ts/v2_def/v2_nim_struct_def';
|
|
2
2
|
import { EventEmitter } from 'eventemitter3';
|
|
3
3
|
export declare interface V2NIMUserServiceEvents {
|
|
4
4
|
/** 用户资料变更 */
|
|
@@ -31,4 +31,14 @@ export declare class V2NIMUserService extends EventEmitter<V2NIMUserServiceEvent
|
|
|
31
31
|
/** @brief 获取黑名单列表 */
|
|
32
32
|
/** @return void */
|
|
33
33
|
getBlockList(): Promise<Array<string>>;
|
|
34
|
+
/** @brief 根据用户账号列表从服务器获取用户资料, 主要使用 getUserList ,只有强制需要拉取最新用户信息才需要使用该接口 */
|
|
35
|
+
/** @param accountIds 用户账号列表 */
|
|
36
|
+
/** @return void */
|
|
37
|
+
getUserListFromCloud(accountIds: Array<string>): Promise<Array<V2NIMUser>>;
|
|
38
|
+
/**
|
|
39
|
+
* 根据关键字搜索好友信息
|
|
40
|
+
* @param option 搜索选项 @see V2NIMUserSearchOption
|
|
41
|
+
* @return Promise<Array<V2NIMUser>>
|
|
42
|
+
*/
|
|
43
|
+
searchUserByOption(option: V2NIMUserSearchOption): Promise<Array<V2NIMUser>>;
|
|
34
44
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V2NIMMessage, V2NIMClientAntispamResult, V2NIMChatroomMessage } from 'ts/v2_def/v2_nim_struct_def';
|
|
1
|
+
import { V2NIMMessage, V2NIMClientAntispamResult, V2NIMChatroomMessage, V2NIMMessageCallDuration } from 'ts/v2_def/v2_nim_struct_def';
|
|
2
2
|
import { EventEmitter } from 'eventemitter3';
|
|
3
3
|
/** @brief 消息创建器 */
|
|
4
4
|
export declare class V2NIMMessageCreator {
|
|
@@ -64,6 +64,29 @@ export declare class V2NIMMessageCreator {
|
|
|
64
64
|
/** @return V2NIMMessage */
|
|
65
65
|
static createForwardMessage(message: V2NIMMessage): V2NIMMessage | null;
|
|
66
66
|
createForwardMessage(message: V2NIMMessage): V2NIMMessage | null;
|
|
67
|
+
/** @brief 创建话单类消息 */
|
|
68
|
+
/** @param callType 话单类型,业务自定义,内容不校验 */
|
|
69
|
+
/** @param channelId 话单频道 ID,内容不校验 */
|
|
70
|
+
/** @param status 通话状态,业务自定义状态,内容不校验 */
|
|
71
|
+
/** @param durations 通话成员时长列表,内容不校验 */
|
|
72
|
+
/** @param text 话单描述 */
|
|
73
|
+
static createCallMessage(callType: number, channelId: string, status: number, durations: Array<V2NIMMessageCallDuration>, text: string): V2NIMMessage | null;
|
|
74
|
+
createCallMessage(callType: number, channelId: string, status: number, durations: Array<V2NIMMessageCallDuration>, text: string): V2NIMMessage;
|
|
75
|
+
}
|
|
76
|
+
/** @brief 消息序列化工具 */
|
|
77
|
+
export declare class V2NIMMessageConverter {
|
|
78
|
+
/**
|
|
79
|
+
* @brief 将消息序列化为 Json 字符串
|
|
80
|
+
* @param message V2NIMMessage 消息对象
|
|
81
|
+
* @return string
|
|
82
|
+
*/
|
|
83
|
+
messageSerialization(message: V2NIMMessage): string | null;
|
|
84
|
+
/**
|
|
85
|
+
* @brief 将 Json 字符串反序列化为消息对象
|
|
86
|
+
* @param message Json 字符串
|
|
87
|
+
* @return V2NIMMessage
|
|
88
|
+
*/
|
|
89
|
+
messageDeserialization(message: string): V2NIMMessage | null;
|
|
67
90
|
}
|
|
68
91
|
/** @brief 会话ID工具 */
|
|
69
92
|
export declare class V2NIMConversationIdUtil {
|
|
@@ -166,3 +189,17 @@ export declare class V2NIMChatroomMessageCreator extends EventEmitter {
|
|
|
166
189
|
static createForwardMessage(message: V2NIMChatroomMessage): V2NIMChatroomMessage | null;
|
|
167
190
|
createForwardMessage(message: V2NIMChatroomMessage): V2NIMChatroomMessage | null;
|
|
168
191
|
}
|
|
192
|
+
export declare class V2NIMStorageUtil {
|
|
193
|
+
/** @brief 生成图片缩略图链接 */
|
|
194
|
+
/** @param uri 图片原始链接 */
|
|
195
|
+
/** @param thumbSize 缩放的尺寸,如指定为 150,则取 150*150 */
|
|
196
|
+
/** @return string 图片缩略图链接 */
|
|
197
|
+
imageThumbUrl(uri: string, thumbSize: Number): string;
|
|
198
|
+
/** @brief 生成视频封面链接 */
|
|
199
|
+
/** @param uri 视频原始链接 */
|
|
200
|
+
/** @param offset 截图时间点,单位:秒 */
|
|
201
|
+
/** @param thumbSize 缩放的尺寸,如指定为 150,则取 150*150 */
|
|
202
|
+
/** @param type 截图类型,如:png、jpeg */
|
|
203
|
+
/** @return string 视频封面链接 */
|
|
204
|
+
videoCoverUrl(uri: string, offset: Number, thumbSize: Number, type: string): string;
|
|
205
|
+
}
|
|
@@ -583,7 +583,18 @@ declare enum V2NIMMessageNotificationType {
|
|
|
583
583
|
/** 接受邀请进群 */
|
|
584
584
|
V2NIM_MESSAGE_NOTIFICATION_TYPE_TEAM_INVITE_ACCEPT = 9,
|
|
585
585
|
/** 禁言群成员 */
|
|
586
|
-
V2NIM_MESSAGE_NOTIFICATION_TYPE_TEAM_BANNED_TEAM_MEMBER = 10
|
|
586
|
+
V2NIM_MESSAGE_NOTIFICATION_TYPE_TEAM_BANNED_TEAM_MEMBER = 10,
|
|
587
|
+
V2NIM_MESSAGE_NOTIFICATION_TYPE_SUPER_TEAM_INVITE = 401,
|
|
588
|
+
SSAGE_NOTIFICATION_TYPE_SUPER_TEAM_KICK = 402,
|
|
589
|
+
V2NIM_MESSAGE_NOTIFICATION_TYPE_SUPER_TEAM_LAVE = 403,
|
|
590
|
+
V2NIM_MESSAGE_NOTIFICATION_TYPE_SUPER_TEAM_UPDATE_TINFO = 404,
|
|
591
|
+
V2NIM_MESSAGE_NOTIFICATION_TYPE_SUPER_TEAM_DISMISS = 405,
|
|
592
|
+
V2NIM_MESSAGE_NOTIFICATION_TYPE_SUPER_TEAM_OWNER_TRANSFER = 406,
|
|
593
|
+
V2NIM_MESSAGE_NOTIFICATION_TYPE_SUPER_TEAM_ADD_MANAGER = 407,
|
|
594
|
+
V2NIM_MESSAGE_NOTIFICATION_TYPE_SUPER_TEAM_REMOVE_MANAGER = 408,
|
|
595
|
+
V2NIM_MESSAGE_NOTIFICATION_TYPE_SUPER_TEAM_BANNED_TEAM_MEMBER = 409,
|
|
596
|
+
V2NIM_MESSAGE_NOTIFICATION_TYPE_SUPER_TEAM_APPLY_PASS = 410,
|
|
597
|
+
V2NIM_MESSAGE_NOTIFICATION_TYPE_SUPER_TEAM_INVITE_ACCEPT = 411
|
|
587
598
|
}
|
|
588
599
|
declare enum V2NIMChatroomMessageNotificationType {
|
|
589
600
|
/** 成员进入聊天室 */
|
|
@@ -713,7 +724,11 @@ declare enum V2NIMLoginClientType {
|
|
|
713
724
|
/** WEB */
|
|
714
725
|
V2NIM_LOGIN_CLIENT_TYPE_WEB = 16,
|
|
715
726
|
/** REST API */
|
|
716
|
-
V2NIM_LOGIN_CLIENT_TYPE_RESTFUL = 32
|
|
727
|
+
V2NIM_LOGIN_CLIENT_TYPE_RESTFUL = 32,
|
|
728
|
+
/** macOS */
|
|
729
|
+
V2NIM_LOGIN_CLIENT_TYPE_MAC_OS = 64,
|
|
730
|
+
/** HarmonyOS */
|
|
731
|
+
V2NIM_LOGIN_CLIENT_TYPE_HARMONY_OS = 65
|
|
717
732
|
}
|
|
718
733
|
declare enum V2NIMLoginStatus {
|
|
719
734
|
/** 未登录 */
|
|
@@ -905,7 +920,9 @@ declare enum V2NIMFriendAddApplicationStatus {
|
|
|
905
920
|
/** 已拒绝 */
|
|
906
921
|
V2NIM_FRIEND_ADD_APPLICATION_STATUS_REJECTED = 2,
|
|
907
922
|
/** 已过期 */
|
|
908
|
-
V2NIM_FRIEND_ADD_APPLICATION_STATUS_EXPIRED = 3
|
|
923
|
+
V2NIM_FRIEND_ADD_APPLICATION_STATUS_EXPIRED = 3,
|
|
924
|
+
/** 直接加为好友 @since v10.3.0 */
|
|
925
|
+
V2NIM_FRIEND_ADD_APPLICATION_STATUS_DIRECT_ADD = 4
|
|
909
926
|
}
|
|
910
927
|
declare enum V2NIMFriendDeletionType {
|
|
911
928
|
/** 自己删除好友 */
|
|
@@ -1007,3 +1024,29 @@ declare enum V2NIMMessageAttachmentType {
|
|
|
1007
1024
|
/** 聊天室成员进入 */
|
|
1008
1025
|
V2NIM_MESSAGE_ATTACHMENT_TYPE_CHATROOM_MEMBER_ENTER_NOTIFICATION = 11
|
|
1009
1026
|
}
|
|
1027
|
+
declare enum V2NIMAIModelRoleType {
|
|
1028
|
+
/** 系统 */
|
|
1029
|
+
V2NIM_AI_MODEL_ROLE_TYPE_SYSTEM = 0,
|
|
1030
|
+
/** 用户 */
|
|
1031
|
+
V2NIM_AI_MODEL_ROLE_TYPE_USER = 1,
|
|
1032
|
+
/** 助手 */
|
|
1033
|
+
V2NIM_AI_MODEL_ROLE_TYPE_ASSISTANT = 2
|
|
1034
|
+
}
|
|
1035
|
+
declare enum V2NIMAIModelType {
|
|
1036
|
+
/** 未知 */
|
|
1037
|
+
V2NIM_AI_MODEL_TYPE_UNKNOW = 0,
|
|
1038
|
+
/** 通义千问大模型 */
|
|
1039
|
+
V2NIM_AI_MODEL_TYPE_QWEN = 1,
|
|
1040
|
+
/** 微软Azure */
|
|
1041
|
+
V2NIM_AI_MODEL_TYPE_AZURE = 2,
|
|
1042
|
+
/** 私有本地大模型 */
|
|
1043
|
+
V2NIM_AI_MODEL_TYPE_PRIVATE = 3
|
|
1044
|
+
}
|
|
1045
|
+
declare enum V2NIMDownloadAttachmentType {
|
|
1046
|
+
/** 原始资源,支持全部有附件的类型 */
|
|
1047
|
+
V2NIM_DOWNLOAD_ATTACHMENT_TYPE_SOURCE = 0,
|
|
1048
|
+
/** 图片缩略图,仅支持图片类附件 */
|
|
1049
|
+
V2NIM_DOWNLOAD_ATTACHMENT_TYPE_THUMBNAIL = 1,
|
|
1050
|
+
/** 视频封面,仅支持视频类附件 */
|
|
1051
|
+
V2NIM_DOWNLOAD_ATTACHMENT_TYPE_VIDEO_COVER = 2
|
|
1052
|
+
}
|