nim-web-sdk-ng 10.7.2 → 10.8.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.
Files changed (64) hide show
  1. package/dist/esm/nim/src/NIMInterface.d.ts +12 -0
  2. package/dist/esm/nim/src/SyncServiceInterface.d.ts +2 -2
  3. package/dist/esm/nim/src/V2NIMConversationService.d.ts +72 -11
  4. package/dist/esm/nim/src/V2NIMMessageService.d.ts +27 -0
  5. package/dist/esm/nim/src/V2NIMNotificationService.d.ts +18 -14
  6. package/dist/esm/nim/src/V2NIMSignallingService.d.ts +15 -1
  7. package/dist/esm/nim/src/index.d.ts +2 -0
  8. package/dist/esm/nim/src/types.d.ts +1 -1
  9. package/dist/esm/nim.d.ts +1 -0
  10. package/dist/esm/nim.js +6 -6
  11. package/dist/v1/CHATROOM_BROWSER_SDK.js +6 -6
  12. package/dist/v1/CHATROOM_MINIAPP_SDK.js +5 -5
  13. package/dist/v1/CHATROOM_UNIAPP_SDK.js +5 -5
  14. package/dist/v1/QCHAT_BROWSER_SDK.js +7 -7
  15. package/dist/v1/QCHAT_UNIAPP_SDK.js +5 -5
  16. package/dist/v2/CHATROOM_BROWSER_SDK/V2NIMChatroomMessageService.d.ts +3 -1
  17. package/dist/v2/CHATROOM_BROWSER_SDK/V2NIMChatroomService.d.ts +12 -0
  18. package/dist/v2/CHATROOM_BROWSER_SDK.js +5 -5
  19. package/dist/v2/CHATROOM_MINIAPP_SDK/V2NIMChatroomMessageService.d.ts +3 -1
  20. package/dist/v2/CHATROOM_MINIAPP_SDK/V2NIMChatroomService.d.ts +12 -0
  21. package/dist/v2/CHATROOM_MINIAPP_SDK.js +4 -4
  22. package/dist/v2/CHATROOM_RN_SDK/V2NIMChatroomMessageService.d.ts +3 -1
  23. package/dist/v2/CHATROOM_RN_SDK/V2NIMChatroomService.d.ts +12 -0
  24. package/dist/v2/CHATROOM_RN_SDK.js +4 -4
  25. package/dist/v2/CHATROOM_UNIAPP_SDK/V2NIMChatroomMessageService.d.ts +3 -1
  26. package/dist/v2/CHATROOM_UNIAPP_SDK/V2NIMChatroomService.d.ts +12 -0
  27. package/dist/v2/CHATROOM_UNIAPP_SDK.js +4 -4
  28. package/dist/v2/NIM_BROWSER_SDK/NIMInterface.d.ts +12 -0
  29. package/dist/v2/NIM_BROWSER_SDK/SyncServiceInterface.d.ts +2 -2
  30. package/dist/v2/NIM_BROWSER_SDK/V2NIMConversationService.d.ts +72 -11
  31. package/dist/v2/NIM_BROWSER_SDK/V2NIMMessageService.d.ts +27 -0
  32. package/dist/v2/NIM_BROWSER_SDK/V2NIMNotificationService.d.ts +18 -14
  33. package/dist/v2/NIM_BROWSER_SDK/V2NIMSignallingService.d.ts +15 -1
  34. package/dist/v2/NIM_BROWSER_SDK/index.d.ts +2 -0
  35. package/dist/v2/NIM_BROWSER_SDK/types.d.ts +1 -1
  36. package/dist/v2/NIM_BROWSER_SDK.js +7 -7
  37. package/dist/v2/NIM_MINIAPP_SDK/NIMInterface.d.ts +12 -0
  38. package/dist/v2/NIM_MINIAPP_SDK/SyncServiceInterface.d.ts +2 -2
  39. package/dist/v2/NIM_MINIAPP_SDK/V2NIMConversationService.d.ts +72 -11
  40. package/dist/v2/NIM_MINIAPP_SDK/V2NIMMessageService.d.ts +27 -0
  41. package/dist/v2/NIM_MINIAPP_SDK/V2NIMNotificationService.d.ts +18 -14
  42. package/dist/v2/NIM_MINIAPP_SDK/V2NIMSignallingService.d.ts +15 -1
  43. package/dist/v2/NIM_MINIAPP_SDK/index.d.ts +2 -0
  44. package/dist/v2/NIM_MINIAPP_SDK/types.d.ts +1 -1
  45. package/dist/v2/NIM_MINIAPP_SDK.js +5 -5
  46. package/dist/v2/NIM_RN_SDK/NIMInterface.d.ts +12 -0
  47. package/dist/v2/NIM_RN_SDK/SyncServiceInterface.d.ts +2 -2
  48. package/dist/v2/NIM_RN_SDK/V2NIMConversationService.d.ts +72 -11
  49. package/dist/v2/NIM_RN_SDK/V2NIMMessageService.d.ts +27 -0
  50. package/dist/v2/NIM_RN_SDK/V2NIMNotificationService.d.ts +18 -14
  51. package/dist/v2/NIM_RN_SDK/V2NIMSignallingService.d.ts +15 -1
  52. package/dist/v2/NIM_RN_SDK/index.d.ts +2 -0
  53. package/dist/v2/NIM_RN_SDK/types.d.ts +1 -1
  54. package/dist/v2/NIM_RN_SDK.js +6 -6
  55. package/dist/v2/NIM_UNIAPP_SDK/NIMInterface.d.ts +12 -0
  56. package/dist/v2/NIM_UNIAPP_SDK/SyncServiceInterface.d.ts +2 -2
  57. package/dist/v2/NIM_UNIAPP_SDK/V2NIMConversationService.d.ts +72 -11
  58. package/dist/v2/NIM_UNIAPP_SDK/V2NIMMessageService.d.ts +27 -0
  59. package/dist/v2/NIM_UNIAPP_SDK/V2NIMNotificationService.d.ts +18 -14
  60. package/dist/v2/NIM_UNIAPP_SDK/V2NIMSignallingService.d.ts +15 -1
  61. package/dist/v2/NIM_UNIAPP_SDK/index.d.ts +2 -0
  62. package/dist/v2/NIM_UNIAPP_SDK/types.d.ts +1 -1
  63. package/dist/v2/NIM_UNIAPP_SDK.js +5 -5
  64. package/package.json +1 -1
@@ -316,6 +316,10 @@ export interface NIMOtherOptions {
316
316
  * 注: 若初始化第一参数中 apiVersion 是 v2 时, syncConfig 失效, 而 V2NIMSyncServiceConfig 生效.
317
317
  */
318
318
  V2NIMSyncServiceConfig?: SyncOptions;
319
+ /**
320
+ * 本地反垃圾词库的配置
321
+ */
322
+ V2NIMClientAntispamUtilConfig?: NIMEModuleParamV2NIMClientAntispamUtil;
319
323
  /**
320
324
  * @deprecated 这个字段即将废弃,所有的属性被移入 {@link NIMOtherOptions.cloudStorageConfig} 中
321
325
  *
@@ -434,6 +438,14 @@ export interface NIMOtherOptions {
434
438
  neroom?: any;
435
439
  };
436
440
  }
441
+ export declare type NIMEModuleParamV2NIMClientAntispamUtil = {
442
+ /**
443
+ * 是否打开本地反垃圾. 默认为 false
444
+ *
445
+ * 注: 需要在 IM 控制台配置本地反垃圾词库. 本开关打开后将会在登录完成后下载反垃圾词库.
446
+ */
447
+ enable?: boolean;
448
+ };
437
449
  export declare type NIMOtherOptionsLoggerConfig = {
438
450
  /**
439
451
  * 日志等级. 默认 off 关闭日志打印.
@@ -118,7 +118,7 @@ export interface SyncOptions {
118
118
  /**
119
119
  * @Multi_Lang_Tag
120
120
  * @locale cn
121
- * 是否同步消息会话 ack,时间戳单位毫秒。默认 false
121
+ * 是否同步消息会话 ack,时间戳单位毫秒。自 10.7.0+ 默认 true, 之前版本默认 false
122
122
  *
123
123
  * 会话 ACK 代表本账号在此会话里读过的最新消息的时间戳
124
124
  * @locale
@@ -223,7 +223,7 @@ export interface SyncOptions {
223
223
  /**
224
224
  * @Multi_Lang_Tag
225
225
  * @locale cn
226
- * 是否同步置顶会话信息,默认 false
226
+ * 是否同步置顶会话信息,自 10.7.0+ 默认 true, 之前版本默认 false
227
227
  * @locale
228
228
  *
229
229
  * @locale en
@@ -64,7 +64,7 @@ export declare class V2NIMConversationService extends NIMEBaseServiceClass<V2NIM
64
64
  /**
65
65
  * 创建会话
66
66
  *
67
- * 注: 会话 id 的值可以参见 util service {@link V2NIMUtilService.generateConversationId | generateConversationId}
67
+ * 注: 会话 id 的值可以参见 {@link V2NIMConversationIdUtil | V2NIMConversationIdUtil}
68
68
  *
69
69
  * 注: 在操作成功且是有效的操作时, 会抛出事件 {@link V2NIMConversationListener.onConversationCreated | V2NIMConversationListener.onConversationCreated}
70
70
  *
@@ -79,7 +79,7 @@ export declare class V2NIMConversationService extends NIMEBaseServiceClass<V2NIM
79
79
  /**
80
80
  * 删除会话
81
81
  *
82
- * 注: 在操作成功且是有效的操作时, 会抛出事件 {@link V2NIMConversationListener.onConversationDeleted | V2NIMConversationListener.onConversationCreated}
82
+ * 注: 在操作成功且是有效的操作时, 会抛出事件 {@link V2NIMConversationListener.onConversationDeleted | V2NIMConversationListener.onConversationDeleted}
83
83
  *
84
84
  * @param conversationId 会话 id
85
85
  * @param clearMessage 是否删除会话对应的历史消息. 默认为 false
@@ -192,6 +192,11 @@ export declare class V2NIMConversationService extends NIMEBaseServiceClass<V2NIM
192
192
  * 注: web 端中的表现为, 计算内存里缓存的符合条件的会话的未读数.
193
193
  *
194
194
  * @param filter 过滤条件
195
+ *
196
+ * @example
197
+ * ```ts
198
+ * const unreadCounts = await nim.V2NIMConversationService.getUnreadCountByFilter({ ignoreMuted: true })
199
+ * ```
195
200
  */
196
201
  getUnreadCountByFilter(filter: V2NIMConversationFilter): Promise<number>;
197
202
  /**
@@ -202,6 +207,11 @@ export declare class V2NIMConversationService extends NIMEBaseServiceClass<V2NIM
202
207
  * {@link V2NIMConversationListener.onConversationChanged | V2NIMConversationListener.onConversationChanged} <br/>
203
208
  * {@link V2NIMConversationListener.onTotalUnreadCountChanged | V2NIMConversationListener.onTotalUnreadCountChanged} <br/>
204
209
  * {@link V2NIMConversationListener.onUnreadCountChangedByFilter | V2NIMConversationListener.onUnreadCountChangedByFilter}
210
+ *
211
+ * @example
212
+ * ```ts
213
+ * await nim.V2NIMConversationService.clearTotalUnreadCount()
214
+ * ```
205
215
  */
206
216
  clearTotalUnreadCount(): Promise<void>;
207
217
  /**
@@ -215,6 +225,11 @@ export declare class V2NIMConversationService extends NIMEBaseServiceClass<V2NIM
215
225
  *
216
226
  * @param conversationIds 会话 id 列表
217
227
  * @returns 返回操作失败结果的列表
228
+ *
229
+ * @example
230
+ * ```ts
231
+ * const results = await nim.V2NIMConversationService.clearUnreadCountByIds(["CONVERSATION_ID1", "CONVERSATION_ID2"])
232
+ * ```
218
233
  */
219
234
  clearUnreadCountByIds(conversationIds: string[]): Promise<V2NIMConversationOperationResult[]>;
220
235
  /**
@@ -227,6 +242,10 @@ export declare class V2NIMConversationService extends NIMEBaseServiceClass<V2NIM
227
242
  * {@link V2NIMConversationListener.onUnreadCountChangedByFilter | V2NIMConversationListener.onUnreadCountChangedByFilter}
228
243
  *
229
244
  * @param groupId 指定的会话分组 id
245
+ * @example
246
+ * ```ts
247
+ * await nim.V2NIMConversationService.clearUnreadCountByGroupId("GROUP_ID")
248
+ * ```
230
249
  */
231
250
  clearUnreadCountByGroupId(groupId: string): Promise<void>;
232
251
  /**
@@ -239,6 +258,10 @@ export declare class V2NIMConversationService extends NIMEBaseServiceClass<V2NIM
239
258
  * {@link V2NIMConversationListener.onUnreadCountChangedByFilter | V2NIMConversationListener.onUnreadCountChangedByFilter}
240
259
  *
241
260
  * @param types 指定的会话类型列表
261
+ * @example
262
+ * ```ts
263
+ * await nim.V2NIMConversationService.clearUnreadCountByTypes([V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P])
264
+ * ```
242
265
  */
243
266
  clearUnreadCountByTypes(types: V2NIMConversationType[]): Promise<void>;
244
267
  /**
@@ -249,27 +272,57 @@ export declare class V2NIMConversationService extends NIMEBaseServiceClass<V2NIM
249
272
  * 注2: 同一种 filter 只能被订阅一次, 第二次的调用不会有任何效果
250
273
  *
251
274
  * @param filter 过滤条件
275
+ * @example
276
+ * ```ts
277
+ * // Eg. Subscribe to P2P conversation and ignore those muted conversation
278
+ * nim.V2NIMConversationService.subscribeUnreadCountByFilter({
279
+ * conversationTypes: [V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P];
280
+ * ignoreMuted: true;
281
+ * })
282
+ * ```
252
283
  */
253
284
  subscribeUnreadCountByFilter(filter: V2NIMConversationFilter): void;
254
285
  /**
255
286
  * 取消订阅指定过滤条件的会话未读变化
256
287
  *
257
288
  * @param filter 过滤条件
289
+ * @example
290
+ * ```ts
291
+ * // Eg. Subscribe to P2P conversation and ignore those muted conversation
292
+ * const filter = {
293
+ * conversationTypes: [V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P];
294
+ * ignoreMuted: true;
295
+ * }
296
+ * nim.V2NIMConversationService.subscribeUnreadCountByFilter(filter)
297
+ * nim.V2NIMConversationService.unsubscribeUnreadCountByFilter(filter)
298
+ * ```
258
299
  */
259
300
  unsubscribeUnreadCountByFilter(filter: V2NIMConversationFilter): void;
260
301
  /**
261
- * 标记会话已读时间戳
302
+ * 获取会话已读时间戳。自 10.3.0 版本开始支持
303
+ *
304
+ * @param conversationId 会话id
305
+ * @return 返回会话已读时间戳, 代表这个会话中本账号已读过在这个时间戳之前的所有消息
306
+ * @example
307
+ * ```ts
308
+ * const readTime = await nim.V2NIMConversationService.getConversationReadTime("CONVERSATION_ID")
309
+ * ```
310
+ */
311
+ getConversationReadTime(conversationId: string): Promise<number>;
312
+ /**
313
+ * 标记会话已读时间戳. 自 10.3.0 版本开始支持
262
314
  *
263
315
  * 注: 当该方法调用后,SDK 可能给多端账户抛出以下的事件
264
316
  *
265
317
  * {@link V2NIMConversationListener.onConversationReadTimeUpdated | V2NIMConversationListener.onConversationReadTimeUpdated} <br/>
266
- *
318
+ * @param conversationId 会话id
319
+ * @return 返回会话已读时间戳, 代表这个会话中本账号已读过在这个时间戳之前的所有消息
320
+ * @example
321
+ * ```ts
322
+ * const readTime = await nim.V2NIMConversationService.markConversationRead("CONVERSATION_ID")
323
+ * ```
267
324
  */
268
325
  markConversationRead(conversationId: string): Promise<number>;
269
- /**
270
- * 获取会话已读时间戳。该时间包含多端已读时间戳
271
- */
272
- getConversationReadTime(conversationId: string): Promise<number>;
273
326
  }
274
327
  export declare type V2NIMConversationFilter = {
275
328
  /**
@@ -649,14 +702,22 @@ export declare type V2NIMLastMessage = {
649
702
  senderName?: string;
650
703
  };
651
704
  export declare const enum V2NIMLastMessageState {
652
- /** 正常状态 */
705
+ /**
706
+ * 默认状态
707
+ *
708
+ * 注: 本地会话只有这个状态, 没有其他的
709
+ */
653
710
  V2NIM_MESSAGE_STATUS_DEFAULT = 0,
654
- /** 已撤回 */
711
+ /**
712
+ * 已撤回
713
+ *
714
+ * 注: 云端消息被撤回时, 会将消息状态置为已撤回.
715
+ */
655
716
  V2NIM_MESSAGE_STATUS_REVOKE = 1,
656
717
  /**
657
718
  * 被回溯
658
719
  *
659
- * 注: 当会话的最新消息被删除时, 需要回溯找到此时真正的最新消息
720
+ * 注: 当云端会话的最新消息被删除时, 需要回溯找到此时真正的最新消息
660
721
  */
661
722
  V2NIM_MESSAGE_STATUS_BACKFILL = 2
662
723
  }
@@ -392,6 +392,8 @@ export declare class V2NIMMessageCreator {
392
392
  /**
393
393
  * 构造图片消息
394
394
  *
395
+ * 注: 使用 dist/esm 产物时,需要额外引入 {@link V2NIMStorageService | V2NIMStorageService}, 才能使用上传能力
396
+ *
395
397
  * @param imageObj 图片文件. 浏览器环境请传入 File 对象, 小程序及 uniapp 环境请输入临时文件路径
396
398
  * @param name 文件显示名称
397
399
  * @param sceneName 场景名
@@ -402,6 +404,8 @@ export declare class V2NIMMessageCreator {
402
404
  /**
403
405
  * 构造语音消息
404
406
  *
407
+ * 注: 使用 dist/esm 产物时,需要额外引入 {@link V2NIMStorageService | V2NIMStorageService}, 才能使用上传能力
408
+ *
405
409
  * @param audioObj 语音文件. 浏览器环境请传入 File 对象, 小程序及 uniapp 环境请输入临时文件路径
406
410
  * @param name 文件显示名称
407
411
  * @param sceneName 场景名
@@ -411,6 +415,8 @@ export declare class V2NIMMessageCreator {
411
415
  /**
412
416
  * 构造视频消息
413
417
  *
418
+ * 注: 使用 dist/esm 产物时,需要额外引入 {@link V2NIMStorageService | V2NIMStorageService}, 才能使用上传能力
419
+ *
414
420
  * @param videoObj 视频文件. 浏览器环境请传入 File 对象, 小程序及 uniapp 环境请输入临时文件路径
415
421
  * @param name 文件显示名称
416
422
  * @param sceneName 场景名
@@ -422,6 +428,8 @@ export declare class V2NIMMessageCreator {
422
428
  /**
423
429
  * 构造文件消息
424
430
  *
431
+ * 注: 使用 dist/esm 产物时,需要额外引入 {@link V2NIMStorageService | V2NIMStorageService}, 才能使用上传能力
432
+ *
425
433
  * @param fileObj 文件. 浏览器环境请传入 File 对象, 小程序及 uniapp 环境请输入临时文件路径
426
434
  * @param name 文件显示名称
427
435
  * @param sceneName 场景名
@@ -708,6 +716,8 @@ export declare type V2NIMMessage = {
708
716
  robotConfig?: V2NIMMessageRobotConfig;
709
717
  /**
710
718
  * Thread 消息引用
719
+ *
720
+ * 注: 仅回参时存在, 若作为发送接口的入参使用则无效
711
721
  */
712
722
  threadRoot?: V2NIMMessageRefer;
713
723
  /**
@@ -716,6 +726,8 @@ export declare type V2NIMMessage = {
716
726
  threadReply?: V2NIMMessageRefer;
717
727
  /**
718
728
  * 消息的状态相关
729
+ *
730
+ * 注: 仅回参时存在, 若作为发送接口的入参则无效
719
731
  */
720
732
  messageStatus: V2NIMMessageStatus;
721
733
  /**
@@ -962,6 +974,8 @@ export interface V2NIMMessagePushConfig {
962
974
  forcePushContent?: string;
963
975
  /**
964
976
  * 强制推送目标账号列表。该设置仅在群聊时有效
977
+ *
978
+ * 注: 不存在则代表着强推给所有人. 空数组代表没有强推目标. 数组有值代表强推给指定的若干个账号
965
979
  */
966
980
  forcePushAccountIds?: string[];
967
981
  }
@@ -1385,6 +1399,12 @@ export interface V2NIMMessageListOption {
1385
1399
  */
1386
1400
  direction?: V2NIMQueryDirection;
1387
1401
  }
1402
+ export declare const enum V2NIMClearHistoryMode {
1403
+ /** 同时删除云端和本地 */
1404
+ V2NIM_CLEAR_HISTORY_MODE_ALL = 0,
1405
+ /** 仅删除本地, 云端拉取可以恢复, Web端不支持该值 */
1406
+ V2NIM_CLEAR_HISTORY_MODE_LOCAL = 1
1407
+ }
1388
1408
  /**
1389
1409
  * 清空历史消息接口参数
1390
1410
  */
@@ -1405,6 +1425,13 @@ export interface V2NIMClearHistoryMessageOption {
1405
1425
  * 扩展字段。多端同步时会同步到其它端
1406
1426
  */
1407
1427
  serverExtension?: string;
1428
+ /**
1429
+ * 清空历史消息模式
1430
+ * - 0: 同时删除云端和本地
1431
+ * - 1: 仅删除本地, 云端拉取可以恢复
1432
+ * 默认为 0
1433
+ */
1434
+ clearMode?: V2NIMClearHistoryMode;
1408
1435
  }
1409
1436
  export interface V2NIMMessageRevokeParams {
1410
1437
  /**
@@ -53,39 +53,43 @@ export interface V2NIMSendCustomNotificationParams {
53
53
  }
54
54
  export interface V2NIMNotificationConfig {
55
55
  /** 是否需要存离线通知 */
56
- offlineEnabled: boolean;
56
+ offlineEnabled?: boolean;
57
57
  /** 是否需要计算通知未读 */
58
- unreadEnabled: boolean;
58
+ unreadEnabled?: boolean;
59
59
  /** 消息id,用于查询系统通知日志 */
60
60
  clientNotificationId?: string;
61
61
  }
62
62
  export interface V2NIMNotificationPushConfig {
63
63
  /** 是否需要推送 */
64
- pushEnabled: boolean;
64
+ pushEnabled?: boolean;
65
65
  /** 是否需要推送通知发送者昵称 */
66
- pushNickEnabled: boolean;
66
+ pushNickEnabled?: boolean;
67
67
  /** 推送文案 */
68
- pushContent: string;
68
+ pushContent?: string;
69
69
  /** 推送数据 */
70
- pushPayload: string;
70
+ pushPayload?: string;
71
71
  /** 强制推送 */
72
- forcePush: boolean;
72
+ forcePush?: boolean;
73
73
  /** 强制推送文案 */
74
- forcePushContent: string;
75
- /** 强制推送目标账号 */
76
- forcePushAccounts: string[];
74
+ forcePushContent?: string;
75
+ /**
76
+ * 强制推送目标账号
77
+ *
78
+ * 注: 不存在则代表着强推给所有人. 空数组代表没有强推目标. 数组有值代表强推给指定的若干个账号
79
+ */
80
+ forcePushAccountIds: string[];
77
81
  }
78
82
  export interface V2NIMNotificationAntispamConfig {
79
83
  /** 指定消息是否需要经过安全通 */
80
- antispamEnabled: boolean;
84
+ antispamEnabled?: boolean;
81
85
  /** 开发者自定义的反垃圾字段,content必须是json格式 */
82
- antispamCustomNotification: string;
86
+ antispamCustomNotification?: string;
83
87
  }
84
88
  export interface V2NIMNotificationRouteConfig {
85
89
  /** 是否需要抄送 */
86
- routeEnabled: boolean;
90
+ routeEnabled?: boolean;
87
91
  /** 环境变量。用于指向不同的抄送,第三方回调设置 */
88
- routeEnvironment: string;
92
+ routeEnvironment?: string;
89
93
  }
90
94
  /**
91
95
  * 通知模块的监听事件
@@ -43,7 +43,7 @@ export declare class V2NIMSignallingService extends NIMEBaseServiceClass<V2NIMSi
43
43
  * 加入信令房间接口
44
44
  * @param params 加入信令房间参数
45
45
  */
46
- joinRoom(params: V2NIMSignallingJoinParams): Promise<V2NIMSignallingRoomInfo>;
46
+ joinRoom(params: V2NIMSignallingJoinParams): Promise<V2NIMSignallingJoinResult>;
47
47
  /**
48
48
  * 离开信令房间接口
49
49
  * @param channelId 频道ID
@@ -89,6 +89,16 @@ export declare class V2NIMSignallingService extends NIMEBaseServiceClass<V2NIMSi
89
89
  */
90
90
  getRoomInfoByChannelName(channelName: string): Promise<V2NIMSignallingRoomInfo>;
91
91
  }
92
+ export declare type V2NIMSignallingJoinResult = {
93
+ /**
94
+ * 频道房间相关信息
95
+ */
96
+ roomInfo: V2NIMSignallingRoomInfo;
97
+ /**
98
+ * 音视频房间相关信息
99
+ */
100
+ rtcInfo: V2NIMSignallingRtcInfo;
101
+ };
92
102
  export declare type V2NIMSignallingAcceptInviteParams = {
93
103
  /**
94
104
  * 信令频道ID
@@ -420,6 +430,10 @@ export declare type V2NIMSignallingChannelInfo = {
420
430
  * 频道类型. 房间创建后跟频道类型绑定
421
431
  */
422
432
  channelType: V2NIMSignallingChannelType;
433
+ /**
434
+ * 频道是否有效. 自 10.8.0+ 支持
435
+ */
436
+ channelValid: boolean;
423
437
  /**
424
438
  * 频道相关扩展字段, 长度限制4096
425
439
  */
@@ -32,6 +32,7 @@ import { V2NIMSignallingService } from './V2NIMSignallingService';
32
32
  import { V2NIMSubscriptionService } from './V2NIMSubscriptionService';
33
33
  import { V2NIMPassthroughService } from './V2NIMPassthroughService';
34
34
  import { YSFService } from './YSFService';
35
+ import { V2NIMLocalConversationService } from './V2NIMLocalConversationService';
35
36
  export declare class V2NIM {
36
37
  /**
37
38
  * @deprecated
@@ -165,6 +166,7 @@ export declare class V2NIM {
165
166
  V2NIMStorageService: V2NIMStorageService;
166
167
  /** ---------- 模块服务 ----------- */
167
168
  V2NIMLoginService: V2NIMLoginService;
169
+ V2NIMLocalConversationService: V2NIMLocalConversationService;
168
170
  V2NIMConversationService: V2NIMConversationService;
169
171
  V2NIMConversationGroupService: V2NIMConversationGroupService;
170
172
  V2NIMMessageService: V2NIMMessageService;
@@ -14,7 +14,7 @@ export declare type NIMEStrAnyObj = {
14
14
  [key: string]: any;
15
15
  };
16
16
  export declare type AnyArr = any[];
17
- export declare type NIMServiceName = 'auth' | 'V1NIMLoginService' | 'V2NIMLoginService' | 'V2NIMConversationService' | 'V2NIMConversationIdUtil' | 'V2NIMConversationGroupService' | 'V2NIMMessageService' | 'V2NIMClientAntispamUtil' | 'V2NIMMessageLogUtil' | 'V2NIMMessageExtendUtil' | 'V2NIMNotificationService' | 'V2NIMStorageService' | 'V2NIMStorageUtil' | 'V2NIMTeamService' | 'V2NIMUserService' | 'V2NIMFriendService' | 'V2NIMSettingService' | 'V2NIMSyncService' | 'V2NIMAIService' | 'V2NIMSignallingService' | 'V2NIMSubscriptionService' | 'DataStructureConverter' | 'V2NIMMessageConverter' | 'V2NIMMessageCreator' | 'V2NIMMessageAttachmentCreator' | 'V2NIMPassthroughService' | 'YSFService' | 'msg' | 'msgLog' | 'team' | 'superTeam' | 'misc' | 'sync' | 'user' | 'session' | 'systemMessage' | 'friend' | 'event' | 'msgExtend' | 'passThrough' | 'plugin' | 'cloudSession' | 'signaling' | 'cloudStorage' | 'offlinePush' | 'qchatChannel' | 'qchatMedia' | 'qchatMsg' | 'qchatRole' | 'qchatServer';
17
+ export declare type NIMServiceName = 'auth' | 'V1NIMLoginService' | 'V2NIMLoginService' | 'V2NIMLocalConversationService' | 'V2NIMConversationService' | 'V2NIMConversationIdUtil' | 'V2NIMConversationGroupService' | 'V2NIMMessageService' | 'V2NIMClientAntispamUtil' | 'V2NIMMessageLogUtil' | 'V2NIMMessageExtendUtil' | 'V2NIMNotificationService' | 'V2NIMStorageService' | 'V2NIMStorageUtil' | 'V2NIMTeamService' | 'V2NIMUserService' | 'V2NIMFriendService' | 'V2NIMSettingService' | 'V2NIMSyncService' | 'V2NIMAIService' | 'V2NIMSignallingService' | 'V2NIMSubscriptionService' | 'DataStructureConverter' | 'V2NIMMessageConverter' | 'V2NIMMessageCreator' | 'V2NIMMessageAttachmentCreator' | 'V2NIMPassthroughService' | 'YSFService' | 'msg' | 'msgLog' | 'team' | 'superTeam' | 'misc' | 'sync' | 'user' | 'session' | 'systemMessage' | 'friend' | 'event' | 'msgExtend' | 'passThrough' | 'plugin' | 'cloudSession' | 'signaling' | 'cloudStorage' | 'offlinePush' | 'qchatChannel' | 'qchatMedia' | 'qchatMsg' | 'qchatRole' | 'qchatServer';
18
18
  export declare class NIMEBaseServiceClass<I extends object> {
19
19
  on<T extends keyof I>(eventName: T, fn: (...args: ArgumentMap<I>[Extract<T, keyof I>]) => void): void;
20
20
  once<T extends keyof I>(eventName: T, fn: (...args: ArgumentMap<I>[Extract<T, keyof I>]) => void): void;
package/dist/esm/nim.d.ts CHANGED
@@ -11,6 +11,7 @@ declare let baiduAdapters: GetAdapterType;
11
11
  declare let ttAdapters: GetAdapterType;
12
12
  export { uniAppAdapters, browserAdapters, wxAdapters, aliAdapters, baiduAdapters, ttAdapters };
13
13
  export { setAdapters } from './adapters';
14
+ export { V2NIMLocalConversationService } from './nim/src/V2NIMLocalConversationService';
14
15
  export { V2NIMConversationService } from './nim/src/V2NIMConversationService';
15
16
  export { V2NIMConversationGroupService } from './nim/src/V2NIMConversationGroupService';
16
17
  export { V2NIMMessageService, V2NIMMessageConverter, V2NIMMessageLogUtil, V2NIMMessageExtendUtil } from './nim/src/V2NIMMessageService';