node-nim 10.2.2-beta.1 → 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.
Files changed (56) hide show
  1. package/dist/chatroom_def/chatroom_def.js +121 -0
  2. package/dist/chatroom_def/chatroom_def.js.map +1 -0
  3. package/dist/loader.js +19 -4
  4. package/dist/loader.js.map +1 -1
  5. package/dist/nim/msglog.js +129 -67
  6. package/dist/nim/msglog.js.map +1 -1
  7. package/dist/nim/session.js +3 -3
  8. package/dist/nim/session.js.map +1 -1
  9. package/dist/nim/tool.js +3 -0
  10. package/dist/nim/tool.js.map +1 -1
  11. package/dist/nim_def/msglog_def.js +31 -1
  12. package/dist/nim_def/msglog_def.js.map +1 -1
  13. package/dist/node-nim.js +3 -1
  14. package/dist/node-nim.js.map +1 -1
  15. package/dist/v2/v2_nim_ai_service.js +40 -0
  16. package/dist/v2/v2_nim_ai_service.js.map +1 -0
  17. package/dist/v2/v2_nim_chatroom_service.js.map +1 -1
  18. package/dist/v2/v2_nim_client.js +14 -0
  19. package/dist/v2/v2_nim_client.js.map +1 -1
  20. package/dist/v2/v2_nim_conversation_service.js +24 -0
  21. package/dist/v2/v2_nim_conversation_service.js.map +1 -1
  22. package/dist/v2/v2_nim_friend_service.js.map +1 -1
  23. package/dist/v2/v2_nim_message_service.js +22 -0
  24. package/dist/v2/v2_nim_message_service.js.map +1 -1
  25. package/dist/v2/v2_nim_storage_service.js +82 -1
  26. package/dist/v2/v2_nim_storage_service.js.map +1 -1
  27. package/dist/v2/v2_nim_team_service.js +24 -0
  28. package/dist/v2/v2_nim_team_service.js.map +1 -1
  29. package/dist/v2/v2_nim_user_service.js +12 -0
  30. package/dist/v2/v2_nim_user_service.js.map +1 -1
  31. package/dist/v2/v2_nim_utilities.js +52 -1
  32. package/dist/v2/v2_nim_utilities.js.map +1 -1
  33. package/dist/v2_def/v2_nim_enum_def.js +34 -0
  34. package/dist/v2_def/v2_nim_enum_def.js.map +1 -1
  35. package/package.json +8 -2
  36. package/script/publish-to-netease-npm.js +9 -3
  37. package/types/chatroom_def/chatroom_def.d.ts +449 -0
  38. package/types/loader.d.ts +2 -2
  39. package/types/nim/msglog.d.ts +101 -68
  40. package/types/nim/session.d.ts +1 -1
  41. package/types/nim/tool.d.ts +1 -0
  42. package/types/nim_def/client_def.d.ts +2 -0
  43. package/types/nim_def/msglog_def.d.ts +34 -0
  44. package/types/node-nim.d.ts +2 -2
  45. package/types/v2/v2_nim_ai_service.d.ts +18 -0
  46. package/types/v2/v2_nim_chatroom_service.d.ts +2 -0
  47. package/types/v2/v2_nim_client.d.ts +9 -1
  48. package/types/v2/v2_nim_conversation_service.d.ts +10 -0
  49. package/types/v2/v2_nim_friend_service.d.ts +2 -2
  50. package/types/v2/v2_nim_message_service.d.ts +9 -1
  51. package/types/v2/v2_nim_storage_service.d.ts +32 -2
  52. package/types/v2/v2_nim_team_service.d.ts +9 -1
  53. package/types/v2/v2_nim_user_service.d.ts +4 -0
  54. package/types/v2/v2_nim_utilities.d.ts +38 -1
  55. package/types/v2_def/v2_nim_enum_def.d.ts +29 -1
  56. package/types/v2_def/v2_nim_struct_def.d.ts +148 -9
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from 'eventemitter3';
2
2
  import { NIMSessionType } from '../nim_def/session_def';
3
- import { NIMMsgLogAPI, QuerySingleMsgCallback, QueryMsgCallback, NIMMessageType, ModifyMultipleMsglogCallback, NIMMsgLogStatus, ModifySingleMsglogCallback, NIMMsgLogSubStatus, DBFunctionCallback, ImportDbPrgCallback, MessageStatusChangedCallback, LogsBackupExportInfo, LogsBackupImportInfo, DeleteHistoryOnLineAsyncCallback, DeleteHistoryOnLineAsyncExCallback, DeleteMessageSelfAsyncCallback, QueryMessageIsThreadRootCallback, QueryMsgAsyncParam, QueryMessageOnlineCallback, QueryThreadHistoryMsgAsyncParam, QueryThreadHistoryMsgCallback, FullTextSearchOnlineAsyncParam, FullTextSearchOnlineAsyncCallback, IMMessage, QueryMsgByKeywordOnlineParam, QueryMsgOnlineAsyncParam, DeleteMsglogSelfNotifyItemInfo, DeleteMsglogSelfNotifyParam, MessageStatusChangedResult, QueryMsgByOptionsAsyncParam, QueryMsglogResult, NIMMsglogSearchDirection, GetMessagesDynamicallyCallback, GetMessagesResult } from '../nim_def/msglog_def';
3
+ import { NIMMsgLogAPI, QuerySingleMsgCallback, QueryMsgCallback, NIMMessageType, ModifyMultipleMsglogCallback, NIMMsgLogStatus, ModifySingleMsglogCallback, NIMMsgLogSubStatus, DBFunctionCallback, ImportDbPrgCallback, MessageStatusChangedCallback, LogsBackupExportInfo, LogsBackupImportInfo, DeleteHistoryOnLineAsyncCallback, DeleteHistoryOnLineAsyncExCallback, DeleteMessageSelfAsyncCallback, QueryMessageIsThreadRootCallback, QueryMsgAsyncParam, QueryMessageOnlineCallback, QueryThreadHistoryMsgAsyncParam, QueryThreadHistoryMsgCallback, FullTextSearchOnlineAsyncParam, FullTextSearchOnlineAsyncCallback, IMMessage, QueryMsgByKeywordOnlineParam, QueryMsgOnlineAsyncParam, DeleteMsglogSelfNotifyItemInfo, DeleteMsglogSelfNotifyParam, MessageStatusChangedResult, QueryMsgByOptionsAsyncParam, QueryMsglogResult, NIMMsglogSearchDirection, GetMessagesDynamicallyCallback, GetMessagesResult, NIMBuildingMsglogIndexesCompleteReason, QueryMsgByKeywordParam, IsMessageIndexEstablishedCallback, BuildMsglogIndexesProgress, BuildMsglogIndexesComplete } from '../nim_def/msglog_def';
4
4
  import { NIMResCode } from '../nim_def/client_def';
5
5
  export declare interface NIMMsgLogEvents {
6
6
  /** 单向删除消息记录通知 */
@@ -16,9 +16,9 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
16
16
  /** 注册全局回调 */
17
17
  initEventHandlers(): void;
18
18
  /** 根据消息ID查询本地(单条)消息
19
- * @param clientMsgId 客户端消息ID
20
- * @param jsonExtension json扩展参数(备用,目前不需要)
21
- * @param cb 查询本地消息的回调函数
19
+ * @param clientMsgId 客户端消息ID
20
+ * @param jsonExtension json扩展参数(备用,目前不需要)
21
+ * @param cb 查询本地消息的回调函数
22
22
  * @return boolean 检查参数如果不符合要求则返回失败
23
23
  * @note
24
24
  * <pre>
@@ -27,13 +27,13 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
27
27
  */
28
28
  queryMsgByIDAysnc(clientMsgId: string, cb: QuerySingleMsgCallback | null, jsonExtension: string): Promise<[NIMResCode, string, IMMessage] | null>;
29
29
  /** 查询本地消息
30
- * @param accid 查询id,account_id/uid或者tid
31
- * @param to_type 会话类型,双人0,群组1 (见nim_msglog_def.h)
32
- * @param limit_count 一次查询数量,建议20
30
+ * @param accid 查询id,account_id/uid或者tid
31
+ * @param to_type 会话类型,双人0,群组1 (见nim_msglog_def.h)
32
+ * @param limit_count 一次查询数量,建议20
33
33
  * @param anchor_msg_time
34
34
  * 作为此次查询的定位点的消息历史的消息时间戳(上次查询最后一条消息的时间戳,按指定的时间的顺序起查,默认为逆序,2.4.0之前命名为last_name)
35
35
  * @param jsonExtension json扩展参数(备用,目前不需要)
36
- * @param cb 查询本地消息的回调函数
36
+ * @param cb 查询本地消息的回调函数
37
37
  * @return boolean 检查参数如果不符合要求则返回失败
38
38
  * @note
39
39
  * <pre>
@@ -57,8 +57,8 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
57
57
  */
58
58
  getMessagesDynamically(session_id: string, to_type: NIMSessionType, from_time: number, to_time: number, limit_count: number, anchor_client_msg_id: string, anchor_server_msg_id: string, direction: NIMMsglogSearchDirection, cb: GetMessagesDynamicallyCallback | null, jsonExtension: string): Promise<[GetMessagesResult] | null>;
59
59
  /** 在线查询消息(不包括系统消息)
60
- * @param param 查询参数
61
- * @param cb 在线查询消息的回调函数
60
+ * @param param 查询参数
61
+ * @param cb 在线查询消息的回调函数
62
62
  * @return boolean 检查参数如果不符合要求则返回失败
63
63
  * @note
64
64
  * <pre>
@@ -69,8 +69,8 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
69
69
  */
70
70
  queryMsgOnlineAsync(param: QueryMsgOnlineAsyncParam, cb: QueryMsgCallback | null): Promise<[NIMResCode, string, NIMSessionType, QueryMsglogResult] | null>;
71
71
  /** 在线查询消息(不包括系统消息)
72
- * @param param 查询参数
73
- * @param cb 在线查询消息的回调函数
72
+ * @param param 查询参数
73
+ * @param cb 在线查询消息的回调函数
74
74
  * @return boolean 检查参数如果不符合要求则返回失败
75
75
  * @note
76
76
  * <pre>
@@ -100,7 +100,7 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
100
100
  queryMsgOfSpecifiedTypeInASessionAsync(to_type: NIMSessionType, id: string, limit_count: number, fromTime: number, endTime: number, endClientMsgId: string, reverse: boolean, msgType: Array<NIMMessageType>, cb: QueryMsgCallback | null, jsonExtension: string): Promise<[NIMResCode, string, NIMSessionType, QueryMsglogResult] | null>;
101
101
  /** 根据指定条件查询本地消息,使用此接口可以完成全局搜索等功能,具体请参阅开发手册
102
102
  * @param param 查询参数
103
- * @param cb 在线查询消息的回调函数
103
+ * @param cb 在线查询消息的回调函数
104
104
  * @return boolean 检查参数如果不符合要求则返回失败
105
105
  * @note
106
106
  * <pre>
@@ -109,10 +109,10 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
109
109
  */
110
110
  queryMsgByOptionsAsync(param: QueryMsgByOptionsAsyncParam, cb: QueryMsgCallback | null): Promise<[NIMResCode, string, NIMSessionType, QueryMsglogResult] | null>;
111
111
  /** 批量设置已读状态
112
- * @param accid 查询id,account_id/uid或者tid
113
- * @param to_type 会话类型,双人0,群组1 (见nim_msglog_def.h)
112
+ * @param accid 查询id,account_id/uid或者tid
113
+ * @param to_type 会话类型,双人0,群组1 (见nim_msglog_def.h)
114
114
  * @param jsonExtension json扩展参数(备用,目前不需要)
115
- * @param cb 操作结果的回调函数
115
+ * @param cb 操作结果的回调函数
116
116
  * @return boolean 检查参数如果不符合要求则返回失败
117
117
  * @note
118
118
  * <pre>
@@ -121,10 +121,10 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
121
121
  */
122
122
  batchStatusReadAsync(accid: string, to_type: NIMSessionType, cb: ModifyMultipleMsglogCallback | null, jsonExtension: string): Promise<[NIMResCode, string, NIMSessionType] | null>;
123
123
  /** 删除某个会话的全部聊天记录
124
- * @param accid 要删除会话的id,account_id/uid或者tid
125
- * @param to_type 会话类型,双人0,群组1 (见nim_msglog_def.h)
126
- * @param revert_by_query_online 是否可以通过服务端查询消息记录(含入库选项)进行恢复,true:是,false:否
127
- * @param cb 操作结果的回调函数
124
+ * @param accid 要删除会话的id,account_id/uid或者tid
125
+ * @param to_type 会话类型,双人0,群组1 (见nim_msglog_def.h)
126
+ * @param revert_by_query_online 是否可以通过服务端查询消息记录(含入库选项)进行恢复,true:是,false:否
127
+ * @param cb 操作结果的回调函数
128
128
  * @param jsonExtension json扩展参数(备用,目前不需要)
129
129
  * @return boolean 检查参数如果不符合要求则返回失败
130
130
  * @note
@@ -134,10 +134,10 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
134
134
  */
135
135
  batchStatusDeleteAsync(accid: string, to_type: NIMSessionType, revert_by_query_online: boolean, cb: ModifyMultipleMsglogCallback | null, jsonExtension: string): Promise<[NIMResCode, string, NIMSessionType] | null>;
136
136
  /** 设置消息状态
137
- * @param msg_id 消息id
137
+ * @param msg_id 消息id
138
138
  * @param status 消息状态枚举值
139
139
  * @param jsonExtension json扩展参数(备用,目前不需要)
140
- * @param cb 操作结果的回调函数
140
+ * @param cb 操作结果的回调函数
141
141
  * @return boolean 检查参数如果不符合要求则返回失败
142
142
  * @note
143
143
  * <pre>
@@ -146,10 +146,10 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
146
146
  */
147
147
  setStatusAsync(msg_id: string, status: NIMMsgLogStatus, cb: ModifySingleMsglogCallback | null, jsonExtension: string): Promise<[NIMResCode, string] | null>;
148
148
  /** 设置消息子状态
149
- * @param msg_id 消息id
149
+ * @param msg_id 消息id
150
150
  * @param status 消息子状态枚举值
151
151
  * @param jsonExtension json扩展参数(备用,目前不需要)
152
- * @param cb 操作结果的回调函数
152
+ * @param cb 操作结果的回调函数
153
153
  * @return boolean 检查参数如果不符合要求则返回失败
154
154
  * @note
155
155
  * <pre>
@@ -172,11 +172,11 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
172
172
  */
173
173
  writeMsglogToLocalAsync(talkId: string, msg: IMMessage, needUpdateSession: boolean, composeLastMsg: boolean, excludeMsgType: Array<number>, cb: ModifySingleMsglogCallback | null): Promise<[NIMResCode, string] | null>;
174
174
  /** 删除指定会话类型的所有消息
175
- * @param delSessions 是否删除会话
176
- * @param to_type 会话类型
177
- * @param revert_by_query_online 是否可以通过服务端查询消息记录(含入库选项)进行恢复,true:是,false:否
175
+ * @param delSessions 是否删除会话
176
+ * @param to_type 会话类型
177
+ * @param revert_by_query_online 是否可以通过服务端查询消息记录(含入库选项)进行恢复,true:是,false:否
178
178
  * @param jsonExtension json扩展参数(备用,目前不需要)
179
- * @param cb 操作结果的回调函数
179
+ * @param cb 操作结果的回调函数
180
180
  * @return boolean 检查参数如果不符合要求则返回失败
181
181
  * @note
182
182
  * <pre>
@@ -185,11 +185,11 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
185
185
  */
186
186
  deleteBySessionTypeAsync(delSessions: boolean, to_type: NIMSessionType, revert_by_query_online: boolean, cb: ModifyMultipleMsglogCallback | null, jsonExtension: string): Promise<[NIMResCode, string, NIMSessionType] | null>;
187
187
  /** 删除指定一条消息
188
- * @param session_id 会话id,对方的account id或者群组tid
189
- * @param to_type 会话类型
190
- * @param msg_id 消息id
188
+ * @param session_id 会话id,对方的account id或者群组tid
189
+ * @param to_type 会话类型
190
+ * @param msg_id 消息id
191
191
  * @param jsonExtension json扩展参数(备用,目前不需要)
192
- * @param cb 操作结果的回调函数
192
+ * @param cb 操作结果的回调函数
193
193
  * @return boolean 检查参数如果不符合要求则返回失败
194
194
  * @note
195
195
  * <pre>
@@ -198,28 +198,28 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
198
198
  */
199
199
  deleteAsync(session_id: string, to_type: NIMSessionType, msg_id: string, cb: ModifySingleMsglogCallback | null, jsonExtension: string): Promise<[NIMResCode, string] | null>;
200
200
  /** 删除全部消息历史
201
- * @param del_session 是否删除所有会话列表项(即全部最近联系人)。
202
- ture则删除,并通过nim_session_reg_change_cb注册的回调通知上层kNIMSessionCommandRemoveAll事件(不会触发每个会话项的kNIMSessionCommandRemove事件);
203
- false则不删除,并将所有会话项的最后一条消息的状态kNIMSessionMsgStatus设置为已删除状态,并通过nim_session_reg_change_cb注册的回调通知上层kNIMSession
204
- CommandAllMsgDeleted事件(不会触发每个会话项的kNIMSessionCommandUpdate事件,避免频繁通知上层)。
205
- * @param revert_by_query_online 是否可以通过服务端查询消息记录(含入库选项)进行恢复,true:是,false:否
206
- * @param jsonExtension json扩展参数(备用,目前不需要)
207
- * @param cb 操作结果的回调函数
208
- * @return boolean 检查参数如果不符合要求则返回失败
209
- * @note
210
- * <pre>
211
- * 200:成功
212
- * </pre>
213
- */
201
+ * @param del_session 是否删除所有会话列表项(即全部最近联系人)。
202
+ ture则删除,并通过nim_session_reg_change_cb注册的回调通知上层kNIMSessionCommandRemoveAll事件(不会触发每个会话项的kNIMSessionCommandRemove事件);
203
+ false则不删除,并将所有会话项的最后一条消息的状态kNIMSessionMsgStatus设置为已删除状态,并通过nim_session_reg_change_cb注册的回调通知上层kNIMSession
204
+ CommandAllMsgDeleted事件(不会触发每个会话项的kNIMSessionCommandUpdate事件,避免频繁通知上层)。
205
+ * @param revert_by_query_online 是否可以通过服务端查询消息记录(含入库选项)进行恢复,true:是,false:否
206
+ * @param jsonExtension json扩展参数(备用,目前不需要)
207
+ * @param cb 操作结果的回调函数
208
+ * @return boolean 检查参数如果不符合要求则返回失败
209
+ * @note
210
+ * <pre>
211
+ * 200:成功
212
+ * </pre>
213
+ */
214
214
  deleteAllAsync(del_session: boolean, revert_by_query_online: boolean, cb: DBFunctionCallback | null, jsonExtension: string): Promise<[NIMResCode] | null>;
215
215
  /** 根据时间段删除部分会话的历史消息
216
- * @param session_id 要删除消息的会话ID
217
- * @param to_type 要删除消息的会话类型
218
- * @param revert_by_query_online 是否可以通过服务端查询消息记录(含入库选项)进行恢复,true:是,false:否
216
+ * @param session_id 要删除消息的会话ID
217
+ * @param to_type 要删除消息的会话类型
218
+ * @param revert_by_query_online 是否可以通过服务端查询消息记录(含入库选项)进行恢复,true:是,false:否
219
219
  * @param timestamp1 单位ms timestamp1 与 timestamp2 组成一个时间段,SDK 内部会判断大小调整入参顺序
220
220
  * @param timestamp2 单位ms timestamp2 与 timestamp1 组成一个时间段,SDK 内部会判断大小调整入参顺序
221
221
  * @param jsonExtension json扩展参数(备用,目前不需要)
222
- * @param cb 操作结果的回调函数
222
+ * @param cb 操作结果的回调函数
223
223
  * @return boolean 检查参数如果不符合要求则返回失败
224
224
  * @note
225
225
  * <pre>
@@ -228,9 +228,9 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
228
228
  */
229
229
  deleteMsgByTimeAsync(session_id: string, to_type: NIMSessionType, revert_by_query_online: boolean, timestamp1: number, timestamp2: number, cb: DBFunctionCallback | null, jsonExtension: string): Promise<[NIMResCode] | null>;
230
230
  /** 导出整个消息历史DB文件(不包括系统消息历史)
231
- * @param dst_path 导出时保存的目标全路径(UTF-8编码)。
231
+ * @param dst_path 导出时保存的目标全路径(UTF-8编码)。
232
232
  * @param jsonExtension json扩展参数(备用,目前不需要)
233
- * @param cb 操作结果的回调函数
233
+ * @param cb 操作结果的回调函数
234
234
  * @return boolean 检查参数如果不符合要求则返回失败
235
235
  * @note
236
236
  * <pre>
@@ -239,10 +239,10 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
239
239
  */
240
240
  exportDbAsync(dst_path: string, cb: DBFunctionCallback | null, jsonExtension: string): Promise<[NIMResCode]>;
241
241
  /** 导入消息历史DB文件(不包括系统消息历史)。先验证是否自己的消息历史文件和DB加密密钥(见nim_client_def.h里的kNIMDataBaseEncryptKey),如果验证不通过,则不导入。
242
- * @param src_path 导入源文件的全路径(UTF-8编码)。
243
- * @param jsonExtension json扩展参数(备用,目前不需要)
244
- * @param cb 操作结果的回调函数
245
- * @param prg_cb 导入进度的回调函数
242
+ * @param src_path 导入源文件的全路径(UTF-8编码)。
243
+ * @param jsonExtension json扩展参数(备用,目前不需要)
244
+ * @param cb 操作结果的回调函数
245
+ * @param prg_cb 导入进度的回调函数
246
246
  * @return boolean 检查参数如果不符合要求则返回失败
247
247
  * @note
248
248
  * <pre>
@@ -253,8 +253,8 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
253
253
  */
254
254
  importDbAsync(src_path: string, cb: DBFunctionCallback, prg_cb: ImportDbPrgCallback | null, jsonExtension: string): Promise<[NIMResCode]>;
255
255
  /** 发送消息已读回执
256
- * @param msg 已读消息
257
- * @param cb 操作结果的回调函数
256
+ * @param msg 已读消息
257
+ * @param cb 操作结果的回调函数
258
258
  * @return void 无返回值
259
259
  * @note
260
260
  * <pre>
@@ -266,20 +266,20 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
266
266
  */
267
267
  sendReceiptAsync(msg: IMMessage, cb: MessageStatusChangedCallback | null): Promise<[MessageStatusChangedResult]>;
268
268
  /** 查询自己发送的消息是否被对方已读
269
- * @param msg 消息。
269
+ * @param msg 消息。
270
270
  * @return boolean 是否被已读
271
271
  */
272
272
  querySentMessageBeReaded(msg: IMMessage): boolean;
273
273
  /** 查询收到的消息是否已经发送过已读回执
274
- * @param msg 消息。
274
+ * @param msg 消息。
275
275
  * @return boolean 是否已发送过
276
276
  */
277
277
  queryReceivedMsgReceiptSent(msg: IMMessage): boolean;
278
278
  /** 更新本地消息扩展字段内容
279
- * @param msg_id 消息id
279
+ * @param msg_id 消息id
280
280
  * @param local_ext 本地扩展字段内容
281
281
  * @param jsonExtension json扩展参数(备用,目前不需要)
282
- * @param cb 操作结果的回调函数
282
+ * @param cb 操作结果的回调函数
283
283
  * @return boolean 检查参数如果不符合要求则返回失败
284
284
  * @note
285
285
  * <pre>
@@ -289,7 +289,7 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
289
289
  updateLocalExtAsync(msg_id: string, local_ext: string, cb: ModifySingleMsglogCallback | null, jsonExtension: string): Promise<[NIMResCode, string]>;
290
290
  /** 全部未读消息历史标记为已读
291
291
  * @param jsonExtension json扩展参数(备用,目前不需要)
292
- * @param cb 操作结果的回调函数
292
+ * @param cb 操作结果的回调函数
293
293
  * @return boolean 检查参数如果不符合要求则返回失败
294
294
  * @note
295
295
  * <pre>
@@ -319,7 +319,7 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
319
319
  * @param accid 对方的accid
320
320
  * @param del_remote 是否同时删除所有的漫游消息 true : 是 false : 否
321
321
  * @param jsonExtension json扩展参数(备用,目前不需要)
322
- * @param cb 操作结果的回调函数
322
+ * @param cb 操作结果的回调函数
323
323
  * @return void
324
324
  * @note
325
325
  * <pre>
@@ -332,7 +332,7 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
332
332
  * @param to_type 会话类型,双人0,群组1 (见nim_msglog_def.h)
333
333
  * @param needs_notify_self 是否通知其它终端
334
334
  * @param jsonExtension 扩展字段
335
- * @param cb 操作结果的回调函数
335
+ * @param cb 操作结果的回调函数
336
336
  * @return void
337
337
  * @note 错误码 200:成功
338
338
  */
@@ -340,7 +340,7 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
340
340
  /** 单向删除某条消息记录(同时删除本地与云端)
341
341
  * @param msg 要删除的消息
342
342
  * @param exts 用户自定义扩展字段
343
- * @param cb 操作结果的回调函数
343
+ * @param cb 操作结果的回调函数
344
344
  * @return void 无返回值
345
345
  * @note
346
346
  * <pre>
@@ -350,7 +350,7 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
350
350
  deleteMessageSelfAsync(msg: IMMessage, ext: string, cb: DeleteMessageSelfAsyncCallback | null): Promise<[NIMResCode]>;
351
351
  /** 查询某条消息是否为thread聊天的根消息
352
352
  * @param client_id 要查询的消息的客户端ID
353
- * @param cb 操作结果的回调函数
353
+ * @param cb 操作结果的回调函数
354
354
  * @return void 无返回值
355
355
  * @note
356
356
  * <pre>
@@ -360,7 +360,7 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
360
360
  queryMessageIsThreadRoot(client_id: string, cb: QueryMessageIsThreadRootCallback | null): Promise<[NIMResCode, string, boolean, number]>;
361
361
  /** 查询某条消息的具体内容一般用在thread talk 场景中
362
362
  * @param param 要查询的消息的相关参数,可以在msglog.threadinfo中得到
363
- * @param cb 查询结果的回调函数
363
+ * @param cb 查询结果的回调函数
364
364
  * @return void 无返回值
365
365
  * @note
366
366
  * <pre>
@@ -371,7 +371,7 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
371
371
  /** 分页查询thread talk消息历史
372
372
  * @param msg 要查询的消息
373
373
  * @param param 要查询的消息的相关参数,可以在msglog.threadinfo中得到
374
- * @param cb 查询结果的回调函数
374
+ * @param cb 查询结果的回调函数
375
375
  * @return void 无返回值
376
376
  * @note
377
377
  * <pre>
@@ -400,4 +400,37 @@ export declare class NIMMsgLog extends EventEmitter<NIMMsgLogEvents> {
400
400
  * </pre>
401
401
  */
402
402
  fullTextSearchOnlineAsync(param: FullTextSearchOnlineAsyncParam, cb: FullTextSearchOnlineAsyncCallback | null): Promise<[NIMResCode, QueryMsglogResult]>;
403
+ /**
404
+ * @brief 根据关键字在本地查询关联消息的内容,与其他关键字查询接口不同,本接口使用全文检索引擎进行查询
405
+ * 如果您有历史数据,请先调用 IsMessageIndexEstablished 判断是否已经同步完成所有旧消息索引
406
+ * 如果尚未同步完成,可使用 BuildingMsglogIndexes 来构建历史消息索引,以提供全文检索接口快速查询内容
407
+ * @param param 查询参数 @see QueryMsgByKeywordParam
408
+ * @param cb 查询消息的回调函数
409
+ * @return bool 检查参数如果不符合要求则返回失败
410
+ * @note
411
+ * <pre>
412
+ * 200:成功
413
+ * 414:参数错误
414
+ * </pre>
415
+ */
416
+ queryMessagesByKeywordAsync(param: QueryMsgByKeywordParam, cb: QueryMsgCallback | null): Promise<[NIMResCode, string, NIMSessionType, QueryMsglogResult]>;
417
+ /**
418
+ * @brief 判断消息索引是否已经建立完成,如果已经建立完成,则可以使用 QueryMessagesByKeywordAsync 接口通过关键字全文检索
419
+ * @param cb 是否已经建立完成的回调函数
420
+ * @return void
421
+ */
422
+ isMessageIndexEstablished(cb: IsMessageIndexEstablishedCallback): Promise<boolean>;
423
+ /**
424
+ * @brief 对旧的历史消息构建消息索引表
425
+ * @param page_size 每页同步多少条消息,建议最小不低于 1000,最大不超过 5000
426
+ * @param progress 构建消息索引表进度回调 @see BuildMsglogIndexesProgress
427
+ * @param completion 构建消息索引表完成回调 @see BuildMsglogIndexesComplete
428
+ * @return void
429
+ */
430
+ buildMsglogIndexes(page_size: number, progress: BuildMsglogIndexesProgress | null, complete: BuildMsglogIndexesComplete | null): Promise<[NIMBuildingMsglogIndexesCompleteReason, string]>;
431
+ /**
432
+ * @brief 取消构建消息索引表
433
+ * @return void
434
+ */
435
+ cancelMsglogIndexesBuilding(): void;
403
436
  }
@@ -74,7 +74,7 @@ export declare class NIMSession extends EventEmitter<NIMSessionEvents> {
74
74
  * @param jsonExtension json扩展参数(备用,目前不需要)
75
75
  * @return void 无返回值
76
76
  */
77
- queryAllRecentSessionAsync(msg_excluded_type_list: Array<NIMMessageType>, cb: QuerySessionListCallback | null, jsonExtension: string): Promise<[NIMResCode, SessionDataList]>;
77
+ queryAllRecentSessionAsync(msg_excluded_type_list: Array<NIMMessageType>, cb: QuerySessionListCallback | null, jsonExtension: string): Promise<[number, SessionDataList]>;
78
78
  /** 删除最近联系人
79
79
  * @param to_type 会话类型,双人0,群组1 (nim_msglog_def.h)
80
80
  * @param id 对方的account id或者群组tid。
@@ -74,4 +74,5 @@ export declare class NIMTool extends EventEmitter<NIMToolEvents> {
74
74
  * </pre>
75
75
  */
76
76
  filterClientAntispam(text: string, replaceString: string, libName: string, cb: FilterClientAntispamCallback | null): Promise<[boolean, NIMResCode, string]>;
77
+ parseStringToJsonObject(jsonString: string): object;
77
78
  }
@@ -166,6 +166,8 @@ export interface SDKConfig {
166
166
  ,默认为false,开启后获取的缩略图为原格式,关闭后获取的缩略图为第一帧静态图 */
167
167
  client_antispam_?: boolean; /**< boolean 客户端反垃圾,默认为false,如需开启请提前咨询技术支持或销售 */
168
168
  team_msg_ack_?: boolean; /**< boolean 群消息已读功能开关, 默认为false,如需开启请提前咨询技术支持或销售 */
169
+ team_query_tinfo_override_by_local_?: boolean; /**< boolean 在线查询群组信息时是否使用本地数据对 member_valid 字段进行覆盖 */
170
+ team_sync_tlist_limit_?: number; /**< int 同步群列表数量限制,范围 100-2000,默认 2000 */
169
171
  need_update_lbs_befor_relogin_?: boolean; /**< boolean 在进行重新登录前是否先刷新一下lbs,对于切换网络的场景适用 */
170
172
  custom_client_type_?: number; /**< int, 自定义客户端类型字段,大于0 */
171
173
  /***********消息“已接收回执”发送配置 begin************/
@@ -116,6 +116,22 @@ export declare enum NIMMsglogSearchDirection {
116
116
  kForward = 0 /** < 以时间点为准向前搜索 */,
117
117
  kBackward = 1 /** < 以时间点为准向后搜索 */
118
118
  }
119
+ export declare enum NIMMsglogSearchSegmentEngine {
120
+ kSegmentEngineDefault = 0,
121
+ kSegmentEngineSimple = 1,
122
+ kSegmentEngineJiebaCutWithHMM = 2,
123
+ kSegmentEngineJiebaCutWithoutHMM = 3,
124
+ kSegmentEngineJiebaCutAll = 4,
125
+ kSegmentEngineJiebaCutForSearch = 5,
126
+ kSegmentEngineJiebaCutHMM = 6
127
+ }
128
+ export declare enum NIMBuildingMsglogIndexesCompleteReason {
129
+ kBuildingMsglogIndexesCompleted = 0,
130
+ kBuildingMsglogIndexesCanceled = 1,
131
+ kBuildingMsglogIndexesError = 2,
132
+ kBuildingMsglogIndexesFullDisk = 3,
133
+ kBuildingMsglogIndexesInProgress = 4
134
+ }
119
135
  /** @enum NIMMsglogQuerySource 消息历史查询来源 */
120
136
  export declare enum NIMMsglogQuerySource {
121
137
  kNIMMsglogQuerySourceLocal = 0 /** < 本地查询*/,
@@ -317,6 +333,17 @@ export interface GetMessagesResult {
317
333
  reliable_?: boolean; /**< 结果是否可信:例如当查询范围不在可信时间段内, 但远端请求失败时, 返回的本地结果可能不完整 */
318
334
  messages_?: Array<IMMessage>; /**< 历史消息列表 */
319
335
  }
336
+ export interface QueryMsgByKeywordParam {
337
+ keyword_: string; /**< 要查询的关键字 */
338
+ account_id_?: string; /**< 查询id,对方的account id或者群组tid */
339
+ to_type_?: NIMSessionType; /**< enum 会话类型,双人0,群组1 (nim_msglog_def.h) */
340
+ type_: Array<NIMMessageType>; /**< array 要获取的消息类型,默认只有文本类消息,可自行扩充其他类型消息,除通知类消息不受支持外,其他类型消息(包括自定义消息)均可检索 */
341
+ limit_count_?: number; /**< number 本次查询的消息条数上限 */
342
+ from_time_?: number; /**< number 起始时间点,单位:毫秒 */
343
+ end_time_?: number; /**< number 结束时间点,单位:毫秒 */
344
+ direction_?: NIMMsglogSearchDirection; /**< enum 查询方向 */
345
+ segment_engine_?: NIMMsglogSearchSegmentEngine; /**< enum 分段引擎 */
346
+ }
320
347
  export type QueryMsgCallback = (rescode: NIMResCode, id: string, to_type: NIMSessionType, result: QueryMsglogResult) => void;
321
348
  export type GetMessagesDynamicallyCallback = (result: GetMessagesResult) => void;
322
349
  export type QuerySingleMsgCallback = (rescode: NIMResCode, id: string, msg: IMMessage) => void;
@@ -334,6 +361,9 @@ export type QueryMessageIsThreadRootCallback = (rescode: NIMResCode, client_id:
334
361
  export type QueryMessageOnlineCallback = (rescode: NIMResCode, client_id: string, msg: IMMessage) => void;
335
362
  export type QueryThreadHistoryMsgCallback = (rescode: NIMResCode, root_msg: IMMessage, total: number, last_msg_time: number, msg_array: Array<IMMessage>) => void;
336
363
  export type FullTextSearchOnlineAsyncCallback = (rescode: NIMResCode, result: QueryMsglogResult) => void;
364
+ export type IsMessageIndexEstablishedCallback = (is_established: boolean) => void;
365
+ export type BuildMsglogIndexesProgress = (total: number, built_count: number) => void;
366
+ export type BuildMsglogIndexesComplete = (reason: NIMBuildingMsglogIndexesCompleteReason, message: string) => void;
337
367
  export interface NIMMsgLogAPI {
338
368
  InitEventHandlers(): void;
339
369
  QueryMsgByIDAysnc(clientMsgId: string, cb: QuerySingleMsgCallback | null, jsonExtension: string): boolean;
@@ -371,4 +401,8 @@ export interface NIMMsgLogAPI {
371
401
  QueryThreadHistoryMsg(msg: IMMessage, param: QueryThreadHistoryMsgAsyncParam, cb: QueryThreadHistoryMsgCallback | null): void;
372
402
  QueryLocalThreadHistoryMsg(msg: IMMessage, cb: QueryMsgCallback | null): void;
373
403
  FullTextSearchOnlineAsync(param: FullTextSearchOnlineAsyncParam, cb: FullTextSearchOnlineAsyncCallback | null): void;
404
+ QueryMessagesByKeywordAsync(param: QueryMsgByKeywordParam, cb: QueryMsgCallback | null): void;
405
+ IsMessageIndexEstablished(cb: IsMessageIndexEstablishedCallback | null): void;
406
+ BuildMsglogIndexes(page_size: number, progress: BuildMsglogIndexesProgress | null, complete: BuildMsglogIndexesComplete | null): void;
407
+ CancelMsglogIndexesBuilding(): void;
374
408
  }
@@ -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';
@@ -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, V2NIMFriendAddRejection, V2NIMFriendAddParams, V2NIMFriendDeleteParams, V2NIMFriendSetParams, V2NIMFriendAddApplicationQueryOption, V2NIMFriendAddApplicationResult, V2NIMFriendSearchOption } from 'ts/v2_def/v2_nim_struct_def';
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: [V2NIMFriendAddRejection];
11
+ friendAddRejected: [V2NIMFriendAddApplication];
12
12
  /** 更新好友信息 */
13
13
  friendInfoChanged: [V2NIMFriend];
14
14
  }
@@ -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 服务器扩展字段 */