@rongcloud/engine 5.30.0 → 5.32.0-c-rtc-alpha.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/index.d.ts CHANGED
@@ -75,6 +75,10 @@ declare const Log: {
75
75
  readonly A_SEND_MSG_R: "A-send_msg-R";
76
76
  readonly L_SEND_MSG_T: "L-send_msg-T";
77
77
  readonly L_SEND_MSG_R: "L-send_msg-R";
78
+ readonly A_SEND_TYPING_STATUS_T: "A-send_typing_status-T";
79
+ readonly A_SEND_TYPING_STATUS_R: "A-send_typing_status-R";
80
+ readonly A_SEND_READ_RECEIPT_REQ_T: "A-send_read_receipt_req-T";
81
+ readonly A_SEND_READ_RECEIPT_REQ_R: "A-send_read_receipt_req-R";
78
82
  readonly L_PULL_MSG_T: "L-pull_msg-T";
79
83
  readonly L_PULL_MSG_R: "L-pull_msg-R";
80
84
  readonly L_PULL_MSG_E: "L-pull_msg-E";
@@ -152,12 +156,6 @@ declare const Log: {
152
156
  readonly A_SEND_READ_RECEIPT_R: "A-send_read_receipt-R";
153
157
  readonly A_SEND_READ_RECEIPT_V2_T: "A-send_read_receipt_v2-T";
154
158
  readonly A_SEND_READ_RECEIPT_V2_R: "A-send_read_receipt_v2-R";
155
- readonly A_SEND_MESSAGE_READ_RECEIPT_V4_T: "A-send_message_read_receipt_V4-T";
156
- readonly A_SEND_MESSAGE_READ_RECEIPT_V4_R: "A-send_message_read_receipt_V4-R";
157
- readonly A_GET_MESSAGE_READ_RECEIPT_V4_T: "A-get_message_read_receipt_V4-T";
158
- readonly A_GET_MESSAGE_READ_RECEIPT_V4_R: "A-get_message_read_receipt_V4-R";
159
- readonly A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_T: "A-batch_get_message_read_receipt_info_V4-T";
160
- readonly A_BATCH_GET_MESSAGE_READ_RECEIPT_INFO_V4_R: "A-batch_get_message_read_receipt_info_V4-R";
161
159
  readonly A_SYNC_READ_STATUS_T: "A-sync_read_status-T";
162
160
  readonly A_SYNC_READ_STATUS_R: "A-sync_read_status-R";
163
161
  /**
@@ -196,8 +194,9 @@ declare const Log: {
196
194
  /** 未知的通知 */
197
195
  readonly L_UNSUPPORT_NTF_FROM_MAIN_E: "L_UNSUPPORT_NTF_FROM_MAIN_E";
198
196
  readonly A_REMOVE_PROXY_O: "A-remove_proxy-O";
199
- readonly A_SET_PROXY_O: "A-set_proxy-O";
200
- readonly A_TEST_PROXY_O: "A-test_proxy-O";
197
+ readonly L_SET_PROXY_O: "L-set_proxy-O";
198
+ readonly L_TEST_PROXY_T: "L-test_proxy-T";
199
+ readonly L_TEST_PROXY_R: "L-test_proxy-R";
201
200
  /** WebSocket 连接与接收数据链路不一致 */
202
201
  readonly L_WS_DISACCORD_E: "L-ws_disaccord-E";
203
202
  /** 获取静态配置 */
@@ -426,6 +425,130 @@ declare const Log: {
426
425
  readonly A_GET_UNREAD_MENTION_ME_CONVERSATION_LIST_R: "A-get_unread_mention_me_conversation_list-R";
427
426
  readonly A_GET_USER_PROFILES_T: "A-get_user_profiles-T";
428
427
  readonly A_GET_USER_PROFILES_R: "A-get_user_profiles-R";
428
+ readonly A_ADD_TO_BLACKLIST_T: "A-add_to_blacklist-T";
429
+ readonly A_ADD_TO_BLACKLIST_R: "A-add_to_blacklist-R";
430
+ readonly A_REMOVE_FROM_BLACKLIST_T: "A-remove_from_blacklist-T";
431
+ readonly A_REMOVE_FROM_BLACKLIST_R: "A-remove_from_blacklist-R";
432
+ readonly A_GET_BLACKLIST_T: "A-get_blacklist-T";
433
+ readonly A_GET_BLACKLIST_R: "A-get_blacklist-R";
434
+ readonly A_GET_BLACKLIST_STATUS_T: "A-get_blacklist_status-T";
435
+ readonly A_GET_BLACKLIST_STATUS_R: "A-get_blacklist_status-R";
436
+ readonly A_E_SET_MSG_RECEIVED_STATUS_T: "A-e_set_msg_received_status-T";
437
+ readonly A_E_SET_MSG_RECEIVED_STATUS_R: "A-e_set_msg_received_status-R";
438
+ readonly A_E_SET_MSG_SENT_STATUS_T: "A-e_set_msg_sent_status-T";
439
+ readonly A_E_SET_MSG_SENT_STATUS_R: "A-e_set_msg_sent_status-R";
440
+ readonly A_E_SET_CHECK_DUPLICATE_MSG_T: "A-e_set_check_duplicate_msg-T";
441
+ readonly A_E_SET_CHECK_DUPLICATE_MSG_R: "A-e_set_check_duplicate_msg-R";
442
+ readonly A_SET_PROXY_T: "A-set_proxy-T";
443
+ readonly A_SET_PROXY_R: "A-set_proxy-R";
444
+ readonly A_GET_PROXY_T: "A-get_proxy-T";
445
+ readonly A_GET_PROXY_R: "A-get_proxy-R";
446
+ readonly A_TEST_PROXY_T: "A-test_proxy-T";
447
+ readonly A_TEST_PROXY_R: "A-test_proxy-R";
448
+ readonly A_CLEAR_UNREAD_COUNT_BY_TIME_T: "A-clear_unread_count_by_time-T";
449
+ readonly A_CLEAR_UNREAD_COUNT_BY_TIME_R: "A-clear_unread_count_by_time-R";
450
+ readonly A_GET_MSG_READER_T: "A-get_msg_reader-T";
451
+ readonly A_GET_MSG_READER_R: "A-get_msg_reader-R";
452
+ readonly A_SEND_READ_RECEIPT_V4_T: "A-send_read_receipt_v4-T";
453
+ readonly A_SEND_READ_RECEIPT_V4_R: "A-send_read_receipt_v4-R";
454
+ readonly A_GET_READ_RECEIPT_V4_T: "A-get_read_receipt_V4-T";
455
+ readonly A_GET_READ_RECEIPT_V4_R: "A-get_read_receipt_V4-R";
456
+ readonly A_BATCH_GET_READ_RECEIPT_INFO_V4_T: "A-batch_get_read_receipt_info_V4-T";
457
+ readonly A_BATCH_GET_READ_RECEIPT_INFO_V4_R: "A-batch_get_read_receipt_info_V4-R";
458
+ readonly A_ADD_FRIEND_T: "A-add_friend-T";
459
+ readonly A_ADD_FRIEND_R: "A-add_friend-R";
460
+ readonly A_DELETE_FRIENDS_T: "A-delete_friends-T";
461
+ readonly A_DELETE_FRIENDS_R: "A-delete_friends-R";
462
+ readonly A_ACCEPT_FRIEND_REQUEST_T: "A-accept_friend_request-T";
463
+ readonly A_ACCEPT_FRIEND_REQUEST_R: "A-accept_friend_request-R";
464
+ readonly A_REFUSE_FRIEND_REQUEST_T: "A-refuse_friend_request-T";
465
+ readonly A_REFUSE_FRIEND_REQUEST_R: "A-refuse_friend_request-R";
466
+ readonly A_SET_FRIEND_INFO_T: "A-set_friend_info-T";
467
+ readonly A_SET_FRIEND_INFO_R: "A-set_friend_info-R";
468
+ readonly A_CHECK_FRIENDS_T: "A-check_friends-T";
469
+ readonly A_CHECK_FRIENDS_R: "A-check_friends-R";
470
+ readonly A_GET_FRIENDS_T: "A-get_friends-T";
471
+ readonly A_GET_FRIENDS_R: "A-get_friends-R";
472
+ readonly A_GET_FRIEND_APPLICATIONS_T: "A-get_friend_applications-T";
473
+ readonly A_GET_FRIEND_APPLICATIONS_R: "A-get_friend_applications-R";
474
+ readonly A_GET_FRIENDS_INFO_T: "A-get_friends_info-T";
475
+ readonly A_GET_FRIENDS_INFO_R: "A-get_friends_info-R";
476
+ readonly A_SEARCH_FRIENDS_INFO_T: "A-search_friends_info-T";
477
+ readonly A_SEARCH_FRIENDS_INFO_R: "A-search_friends_info-R";
478
+ readonly A_SET_FRIEND_ADD_PERMISSION_T: "A-set_friend_add_permission-T";
479
+ readonly A_SET_FRIEND_ADD_PERMISSION_R: "A-set_friend_add_permission-R";
480
+ readonly A_GET_FRIEND_ADD_PERMISSION_T: "A-get_friend_add_permission-T";
481
+ readonly A_GET_FRIEND_ADD_PERMISSION_R: "A-get_friend_add_permission-R";
482
+ readonly A_CREATE_GROUP_T: "A-create_group-T";
483
+ readonly A_CREATE_GROUP_R: "A-create_group-R";
484
+ readonly A_UPDATE_GROUP_INFO_T: "A-update_group_info-T";
485
+ readonly A_UPDATE_GROUP_INFO_R: "A-update_group_info-R";
486
+ readonly A_GET_GROUPS_INFO_T: "A-get_groups_info-T";
487
+ readonly A_GET_GROUPS_INFO_R: "A-get_groups_info-R";
488
+ readonly A_KICK_GROUP_MEMBERS_T: "A-kick_group_members-T";
489
+ readonly A_KICK_GROUP_MEMBERS_R: "A-kick_group_members-R";
490
+ readonly A_QUIT_GROUP_T: "A-quit_group-T";
491
+ readonly A_QUIT_GROUP_R: "A-quit_group-R";
492
+ readonly A_DISMISS_GROUP_T: "A-dismiss_group-T";
493
+ readonly A_DISMISS_GROUP_R: "A-dismiss_group-R";
494
+ readonly A_TRANSFER_GROUP_OWNER_T: "A-transfer_group_owner-T";
495
+ readonly A_TRANSFER_GROUP_OWNER_R: "A-transfer_group_owner-R";
496
+ readonly A_ADD_GROUP_MANAGERS_T: "A-add_group_managers-T";
497
+ readonly A_ADD_GROUP_MANAGERS_R: "A-add_group_managers-R";
498
+ readonly A_REMOVE_GROUP_MANAGERS_T: "A-remove_group_managers-T";
499
+ readonly A_REMOVE_GROUP_MANAGERS_R: "A-remove_group_managers-R";
500
+ readonly A_GET_GROUP_MEMBERS_T: "A-get_group_members-T";
501
+ readonly A_GET_GROUP_MEMBERS_R: "A-get_group_members-R";
502
+ readonly A_SET_GROUP_MEMBER_INFO_T: "A-set_group_member_info-T";
503
+ readonly A_SET_GROUP_MEMBER_INFO_R: "A-set_group_member_info-R";
504
+ readonly A_SEARCH_GROUP_MEMBERS_T: "A-search_group_members-T";
505
+ readonly A_SEARCH_GROUP_MEMBERS_R: "A-search_group_members-R";
506
+ readonly A_JOIN_GROUP_T: "A-join_group-T";
507
+ readonly A_JOIN_GROUP_R: "A-join_group-R";
508
+ readonly A_INVITE_USERS_TO_GROUP_T: "A-invite_users_to_group-T";
509
+ readonly A_INVITE_USERS_TO_GROUP_R: "A-invite_users_to_group-R";
510
+ readonly A_ADD_GROUP_FOLLOWS_T: "A-add_group_follows-T";
511
+ readonly A_ADD_GROUP_FOLLOWS_R: "A-add_group_follows-R";
512
+ readonly A_REMOVE_GROUP_FOLLOWS_T: "A-remove_group_follows-T";
513
+ readonly A_REMOVE_GROUP_FOLLOWS_R: "A-remove_group_follows-R";
514
+ readonly A_GET_GROUP_FOLLOWS_T: "A-get_group_follows-T";
515
+ readonly A_GET_GROUP_FOLLOWS_R: "A-get_group_follows-R";
516
+ readonly A_SET_GROUP_REMARK_T: "A-set_group_remark-T";
517
+ readonly A_SET_GROUP_REMARK_R: "A-set_group_remark-R";
518
+ readonly A_GET_GROUP_MEMBERS_BY_ROLE_T: "A-get_group_members_by_role-T";
519
+ readonly A_GET_GROUP_MEMBERS_BY_ROLE_R: "A-get_group_members_by_role-R";
520
+ readonly A_ACCEPT_GROUP_INVITE_T: "A-accept_group_invite-T";
521
+ readonly A_ACCEPT_GROUP_INVITE_R: "A-accept_group_invite-R";
522
+ readonly A_REFUSE_GROUP_INVITE_T: "A-refuse_group_invite-T";
523
+ readonly A_REFUSE_GROUP_INVITE_R: "A-refuse_group_invite-R";
524
+ readonly A_ACCEPT_GROUP_APPLICATION_T: "A-accept_group_application-T";
525
+ readonly A_ACCEPT_GROUP_APPLICATION_R: "A-accept_group_application-R";
526
+ readonly A_REFUSE_GROUP_APPLICATION_T: "A-refuse_group_application-T";
527
+ readonly A_REFUSE_GROUP_APPLICATION_R: "A-refuse_group_application-R";
528
+ readonly A_GET_GROUP_APPLICATIONS_T: "A-get_group_applications-T";
529
+ readonly A_GET_GROUP_APPLICATIONS_R: "A-get_group_applications-R";
530
+ readonly A_GET_JOINED_GROUPS_BY_ROLES_T: "A-get_joined_groups_by_roles-T";
531
+ readonly A_GET_JOINED_GROUPS_BY_ROLES_R: "A-get_joined_groups_by_roles-R";
532
+ readonly A_SEARCH_JOINED_GROUPS_T: "A-search_joined_groups-T";
533
+ readonly A_SEARCH_JOINED_GROUPS_R: "A-search_joined_groups-R";
534
+ readonly A_GET_JOINED_GROUPS_T: "A-get_joined_groups-T";
535
+ readonly A_GET_JOINED_GROUPS_R: "A-get_joined_groups-R";
536
+ readonly A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_T: "A-search_user_profile_by_unique_id-T";
537
+ readonly A_SEARCH_USER_PROFILE_BY_UNIQUE_ID_R: "A-search_user_profile_by_unique_id-R";
538
+ readonly A_UPDATE_MY_USER_PROFILE_VISIBILITY_T: "A-update_my_user_profile_visibility-T";
539
+ readonly A_UPDATE_MY_USER_PROFILE_VISIBILITY_R: "A-update_my_user_profile_visibility-R";
540
+ readonly A_GET_MY_USER_PROFILE_VISIBILITY_T: "A-get_my_user_profile_visibility-T";
541
+ readonly A_GET_MY_USER_PROFILE_VISIBILITY_R: "A-get_my_user_profile_visibility-R";
542
+ readonly A_SUBSCRIBE_USER_STATUS_T: "A-subscribe_user_status-T";
543
+ readonly A_SUBSCRIBE_USER_STATUS_R: "A-subscribe_user_status-R";
544
+ readonly A_UNSUBSCRIBE_USER_STATUS_T: "A-unsubscribe_user_status-T";
545
+ readonly A_UNSUBSCRIBE_USER_STATUS_R: "A-unsubscribe_user_status-R";
546
+ readonly A_GET_SUBSCRIBE_USER_STATUS_LIST_T: "A-get_subscribe_user_status_list-T";
547
+ readonly A_GET_SUBSCRIBE_USER_STATUS_LIST_R: "A-get_subscribe_user_status_list-R";
548
+ readonly A_GET_MY_USER_PROFILE_T: "A-get_my_user_profile-T";
549
+ readonly A_GET_MY_USER_PROFILE_R: "A-get_my_user_profile-R";
550
+ readonly A_UPDATE_MY_USER_PROFILE_T: "A-update_my_user_profile-T";
551
+ readonly A_UPDATE_MY_USER_PROFILE_R: "A-update_my_user_profile-R";
429
552
  };
430
553
 
431
554
  /** [EN]
@@ -4491,6 +4614,114 @@ declare const UUId: {
4491
4614
  genWithLen(strLen?: number): string;
4492
4615
  };
4493
4616
 
4617
+ /**
4618
+ * 检查参数是否为字符串
4619
+ * 只做类型检查,不做长度检查,故当字符串长度为 0,结果依然为 true
4620
+ * @param value
4621
+ */
4622
+ declare const isString: (value: unknown) => boolean;
4623
+ /**
4624
+ * 检测参数是否为布尔值
4625
+ * @param value
4626
+ */
4627
+ declare const isBoolean: (value: unknown) => boolean;
4628
+ /**
4629
+ * 检查参数是否为 number 数据
4630
+ * @param value
4631
+ */
4632
+ declare const isNumber: (value: unknown) => boolean;
4633
+ /**
4634
+ * 检查参数是否为整数,可以指定最小值和最大值,区间包含最小值和最大值,
4635
+ */
4636
+ declare const isInteger: (option: {
4637
+ min?: number;
4638
+ max?: number;
4639
+ }) => (value: number) => boolean;
4640
+ /**
4641
+ * 检查参数是否为数组
4642
+ * 只做类型检查,不做长度检查
4643
+ * 如 UnitArray、BufferArray 等也属于数组
4644
+ * @param arr
4645
+ */
4646
+ declare const isArray: (arr: unknown) => boolean;
4647
+ /**
4648
+ * 有限制的字符串
4649
+ * 做长度检查、自定义检查
4650
+ * 先检测前后去空格是否为空
4651
+ */
4652
+ declare const isLimitedString: (option: {
4653
+ minLength?: number | undefined;
4654
+ maxLength?: number | undefined;
4655
+ validator?: ((val: string) => boolean) | undefined;
4656
+ isTrim?: boolean | undefined;
4657
+ }) => (str: unknown) => boolean;
4658
+ /**
4659
+ * 检查参数是否为长度非 0 的字符串
4660
+ * @param str
4661
+ */
4662
+ declare const notEmptyString: (str: unknown) => boolean;
4663
+ /**
4664
+ * 检查参数是否为长度非 0 的数组
4665
+ * @param str
4666
+ */
4667
+ declare const notEmptyArray: (arr: any[]) => boolean;
4668
+ /**
4669
+ * 检查参数是否为对象
4670
+ * @param val
4671
+ */
4672
+ declare const isObject: (val: any) => boolean;
4673
+ /**
4674
+ * 检查参数是否为函数
4675
+ * @param val
4676
+ */
4677
+ declare const isFunction: (val: any) => boolean;
4678
+ /**
4679
+ * 检查参数是否为 undefined
4680
+ * @param val
4681
+ */
4682
+ declare const isUndefined: (val: any) => boolean;
4683
+ /**
4684
+ * 检查参数是否为有效 http(s) 协议 url
4685
+ * @param value
4686
+ */
4687
+ declare const isHttpUrl: (value: any) => boolean;
4688
+ /**
4689
+ * 检查对象不为空
4690
+ * @param val
4691
+ */
4692
+ declare const notEmptyObject: (val: Object) => boolean;
4693
+ /**
4694
+ * @deprecated
4695
+ */
4696
+ declare const isValidConversationType: (conversation: number) => boolean;
4697
+ declare const isValidEnum: (param: {
4698
+ value: unknown;
4699
+ type: object;
4700
+ }) => boolean;
4701
+ /**
4702
+ * 检查是否是有效的 targetId
4703
+ */
4704
+ declare const isValidTargetId: (value: any) => boolean;
4705
+ /**
4706
+ * 检查是否是有效的 groupId
4707
+ */
4708
+ declare const isValidGroupId: (value: any) => boolean;
4709
+ /**
4710
+ * 判断是否是一个有效的文件类型
4711
+ */
4712
+ declare const isValidFileType: (fileType: number) => boolean;
4713
+
4714
+ declare class Codec$1<T> {
4715
+ private readonly protoRoot;
4716
+ /**
4717
+ * 构造函数
4718
+ * @param desc proto 协议描述
4719
+ */
4720
+ constructor(desc: string);
4721
+ encode<K extends keyof T>(key: K, params: T[K]): ArrayBuffer;
4722
+ decode<K extends keyof T>(pbname: K, uint8array: Uint8Array): T[K];
4723
+ }
4724
+
4494
4725
  /**
4495
4726
  * 翻译模式
4496
4727
  */
@@ -6295,45 +6526,7 @@ interface IFirstUnreadMessageInfo {
6295
6526
  /**
6296
6527
  * @category Interface
6297
6528
  */
6298
- interface IUserProfile {
6299
- /** [EN]
6300
- * User ID
6301
- */
6302
- /**
6303
- * 用户 ID
6304
- */
6305
- id?: string;
6306
- /** [EN]
6307
- * Username
6308
- */
6309
- /**
6310
- * 用户名
6311
- */
6312
- name?: string;
6313
- /** [EN]
6314
- * User avatar URL
6315
- * @deprecated
6316
- */
6317
- /**
6318
- * 用户头像地址
6319
- * @deprecated
6320
- */
6321
- portraitUri?: string;
6322
- /** [EN]
6323
- * Additional information in user info
6324
- */
6325
- /**
6326
- * user info 中附加信息
6327
- */
6328
- extra?: string;
6329
- /** [EN]
6330
- * User avatar URL (compatible with mobile devices)
6331
- */
6332
- /**
6333
- * 用户头像地址(向移动端兼容)
6334
- */
6335
- portrait?: string;
6336
- }
6529
+ declare type IUserProfile = IUserExtraValueInMessage;
6337
6530
  /** [EN]
6338
6531
  * Operation details
6339
6532
  * @category Interface
@@ -6462,6 +6655,9 @@ interface IOperateStatusNotify {
6462
6655
  */
6463
6656
  summary: IOperateSummary[];
6464
6657
  }
6658
+ /**
6659
+ * 消息撤回配置
6660
+ */
6465
6661
  declare type IRecallMsgOptions = {
6466
6662
  /**
6467
6663
  * 消息的唯一 id,客户端依赖此属性查找要撤回的消息
@@ -6511,9 +6707,9 @@ declare type IRecallMsgOptions = {
6511
6707
  isAdmin?: boolean;
6512
6708
  };
6513
6709
  /**
6514
- * 发送消息时的可选项信息
6710
+ * 消息发送配置项
6515
6711
  */
6516
- interface ISendMsgOptions {
6712
+ interface IMessageSendOptions {
6517
6713
  /**
6518
6714
  * 消息类型,即消息结构的 ObjectName
6519
6715
  */
@@ -6536,28 +6732,10 @@ interface ISendMsgOptions {
6536
6732
  extra?: string;
6537
6733
  };
6538
6734
  /**
6539
- * 是否存储
6540
- * @description 只在发送未注册过的自定义消息时有效,否则使用注册时的配置
6541
- */
6542
- isPersited?: boolean;
6543
- /**
6544
- * 是否计数
6545
- * @description 只在发送未注册过的自定义消息时有效,否则使用注册时的配置
6546
- */
6547
- isCounted?: boolean;
6548
- /**
6549
- * 是否是状态消息,一般为无需注册的自定义消息
6550
- * @description
6551
- * 1. 状态消息只有 pub,没有 ack 应答
6552
- * 2. 状态消息默认不存储,不计数,`isPersited` 与 `isCounted` 配置将失效
6735
+ * 发送时指定消息是否为状态消息,仅对 Web 端有效;
6736
+ * @description 该属性为 Web 端特有属性,为保持向前兼容,因此保留;理论上应该在注册消息时设置消息类型是否是状态消息,之后不可更改。
6553
6737
  */
6554
6738
  isStatusMessage?: boolean;
6555
- /**
6556
- * 是否发送静默消息
6557
- * @description
6558
- * 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
6559
- */
6560
- disableNotification?: boolean;
6561
6739
  /**
6562
6740
  * Push 信息
6563
6741
  */
@@ -6572,11 +6750,12 @@ interface ISendMsgOptions {
6572
6750
  isMentioned?: boolean;
6573
6751
  /**
6574
6752
  * `@` 消息类型
6575
- * @description `1: @ 所有人 2: @ 指定用户`
6753
+ * @deprecated 推荐使用 content.mentionedInfo.type
6576
6754
  */
6577
- mentionedType?: 1 | 2;
6755
+ mentionedType?: MentionedType;
6578
6756
  /**
6579
6757
  * 被 @ 的用户 Id 列表,当 `mentionedType` 值为 `1` 时,该值可为空
6758
+ * @deprecated 推荐使用 content.mentionedInfo.userIdList
6580
6759
  */
6581
6760
  mentionedUserIdList?: string[];
6582
6761
  /**
@@ -6598,8 +6777,7 @@ interface ISendMsgOptions {
6598
6777
  [key: string]: string;
6599
6778
  };
6600
6779
  /**
6601
- * 黑/白名单
6602
- * @todo 功能未知,需确认
6780
+ * 过滤黑/白名单?TODO:功能未知,需确认
6603
6781
  */
6604
6782
  isFilerWhiteBlacklist?: boolean;
6605
6783
  /**
@@ -6607,11 +6785,11 @@ interface ISendMsgOptions {
6607
6785
  */
6608
6786
  pushConfig?: IPushConfig;
6609
6787
  /**
6610
- * 会话业务标识
6788
+ * 是否发送静默消息
6611
6789
  * @description
6612
- * 20 个字符长度限制
6790
+ * 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
6613
6791
  */
6614
- channelId?: string;
6792
+ disableNotification?: boolean;
6615
6793
  /**
6616
6794
  * 客户端的消息标识
6617
6795
  * 重发消息时用到,重发消息的消息 ID
@@ -8132,6 +8310,97 @@ interface ITextMessageContent extends IExtraDataKeyInMessage, IUserExtraKeyInMes
8132
8310
  */
8133
8311
  translateInfo?: TranslateInfo;
8134
8312
  }
8313
+ /**
8314
+ * 服务器端定义的撤回通知消息结构,因历史原因,与 Electron 对外暴露的结构不一致
8315
+ * @hidden
8316
+ */
8317
+ interface ISvrRecallNotificationMessageContent extends IExtraDataKeyInMessage, IUserExtraKeyInMessage {
8318
+ /**
8319
+ * 发起撤回的用户 ID
8320
+ */
8321
+ operatorId?: string;
8322
+ /**
8323
+ * 被撤回的原始消息的发送时间,单位:毫秒
8324
+ */
8325
+ recallTime: number;
8326
+ /**
8327
+ * 被撤回的原始消息的类型
8328
+ */
8329
+ originalObjectName?: string;
8330
+ /**
8331
+ * 被撤回的原始消息的内容
8332
+ */
8333
+ originalMessageContent?: any;
8334
+ /**
8335
+ * 被撤回的文本消息内容
8336
+ */
8337
+ recallContent?: string;
8338
+ /**
8339
+ * 撤回消息的发送时间,单位:毫秒
8340
+ */
8341
+ recallActionTime?: number;
8342
+ /**
8343
+ * 是否为管理员操作
8344
+ */
8345
+ admin?: boolean;
8346
+ /**
8347
+ * 是否删除接收端本地存储的原始消息
8348
+ */
8349
+ delete?: boolean;
8350
+ }
8351
+ /** [EN]
8352
+ * Recall notification message content data
8353
+ * @category Interface
8354
+ */
8355
+ /**
8356
+ * 撤回通知消息 content 数据
8357
+ * @category Interface
8358
+ */
8359
+ interface IRecallNotificationMessageContent extends Partial<ISvrRecallNotificationMessageContent> {
8360
+ /**
8361
+ * Electron 历史版本中使用错误,目前已废弃,请使用 `delete` 替代
8362
+ * @deprecated - 已废弃,请使用 `delete` 替代
8363
+ */
8364
+ isDelete?: boolean;
8365
+ }
8366
+ /**
8367
+ * 撤回命令消息 content 数据
8368
+ * @category Interface
8369
+ */
8370
+ interface IRecallCommandMessageContent extends IExtraDataKeyInMessage, IUserExtraKeyInMessage {
8371
+ /**
8372
+ * 会话类型
8373
+ */
8374
+ conversationType: ConversationType;
8375
+ /**
8376
+ * 会话 TargetId
8377
+ */
8378
+ targetId: string;
8379
+ /**
8380
+ * 会话 ChannelId
8381
+ */
8382
+ channelId?: string;
8383
+ /**
8384
+ * 被撤回消息的唯一标识
8385
+ */
8386
+ messageUId: string;
8387
+ /**
8388
+ * 被撤回消息的发送时间,Web 端依赖该时间对消息进行排序和会话更新处理
8389
+ */
8390
+ sentTime: number;
8391
+ /**
8392
+ * 是否删除接收端本地存储的原始消息,对 Web 平台无效
8393
+ */
8394
+ isDelete?: boolean;
8395
+ /**
8396
+ * 是否为管理员操作,当值为 true 时,允许撤回非本人发送的消息
8397
+ */
8398
+ isAdmin?: boolean;
8399
+ /**
8400
+ * 撤回定向消息时,指定定向消息的接收者列表
8401
+ */
8402
+ directionalUserIdList?: string[];
8403
+ }
8135
8404
 
8136
8405
  /** [EN]
8137
8406
  * @category Interface
@@ -9411,6 +9680,7 @@ declare class RCResult<T = void> {
9411
9680
  * @hidden
9412
9681
  */
9413
9682
  constructor(code: number, msg: string, data?: T);
9683
+ static from<T = void>(code: number, msg?: string, data?: T): RCResult<T>;
9414
9684
  /**
9415
9685
  * 结果为 ok 时,进行后续异步操作
9416
9686
  * @hidden
@@ -9578,6 +9848,11 @@ declare class Validator {
9578
9848
  assertFunction(key: string, value: unknown, required?: boolean): Validator;
9579
9849
  }
9580
9850
 
9851
+ declare const promiseWithResolvers: <T = void>() => {
9852
+ resolve: (value: T) => void;
9853
+ promise: Promise<T>;
9854
+ };
9855
+
9581
9856
  interface IServerAddressData {
9582
9857
  addr: string;
9583
9858
  protocol: EConnectProtocol;
@@ -9945,6 +10220,13 @@ interface INaviInfo {
9945
10220
  * 消息修改时间限制,单位:分钟
9946
10221
  */
9947
10222
  msgModifyMinute?: number;
10223
+ /**
10224
+ * 是否开启单群聊消息撤回优化;(0 关闭,1 开启)
10225
+ * 开启后:
10226
+ * 1. 服务器会话列表 latestMessage 和历史消息中将存储 RC:RcNtf 消息。
10227
+ * 2. 拉取历史消息时,不再返回 RC:RcCmd 消息。
10228
+ */
10229
+ supportRecallRefactor?: 0 | 1;
9948
10230
  }
9949
10231
 
9950
10232
  /** [EN]
@@ -9955,6 +10237,7 @@ interface INaviInfo {
9955
10237
  * 异步任务结果
9956
10238
  * @description 该结构即将废弃,请使用 {@link RCResult} 替代
9957
10239
  * @category Interface
10240
+ * @deprecated 请使用 {@link RCResult} 替代
9958
10241
  */
9959
10242
  interface IAsyncRes<T = void> extends Pick<RCResult<T>, 'code' | 'data'> {
9960
10243
  msg?: string;
@@ -10613,10 +10896,10 @@ interface IFriendInfoChangedSync {
10613
10896
  */
10614
10897
  interface IPagingQueryOption {
10615
10898
  /** [EN]
10616
- * Number of items per page, range 1-200
10899
+ * Number of items per page, valid value [1, 100], default value 50
10617
10900
  */
10618
10901
  /**
10619
- * 每页条数,范围 1-200
10902
+ * 每页条数,有效值 [1, 100],默认值 50
10620
10903
  */
10621
10904
  count: number;
10622
10905
  /** [EN]
@@ -10627,13 +10910,15 @@ interface IPagingQueryOption {
10627
10910
  */
10628
10911
  pageToken?: string;
10629
10912
  /** [EN]
10630
- * Sort type: Supports setting the order for retrieval. `true`: ascending order; `false`: descending order. Default is `true`.
10913
+ * Sort type: Supports setting the order for retrieval. `true`: ascending order; `false`: descending order. Default is `false`.
10631
10914
  */
10632
10915
  /**
10633
- * 排序类型:支持设置正序、倒序获取。true:正序;false:倒序。默认为 true
10916
+ * 排序类型:支持设置正序、倒序获取。`true`:正序;`false`:倒序。默认为 `false`
10634
10917
  */
10635
10918
  order?: boolean;
10636
10919
  }
10920
+ interface IGetGroupMembersOption extends IPagingQueryOption {
10921
+ }
10637
10922
  /** [EN]
10638
10923
  * Pagination request result
10639
10924
  * @category Interface
@@ -10698,9 +10983,7 @@ interface IGroupInfoOption extends IGroupBaseInfo {
10698
10983
  /**
10699
10984
  * 扩展消息
10700
10985
  */
10701
- extProfile?: {
10702
- [key: string]: string;
10703
- };
10986
+ extProfile?: Record<string, string>;
10704
10987
  /** [EN]
10705
10988
  * Active join group permission mode
10706
10989
  */
@@ -11375,6 +11658,14 @@ interface IServerGroupBaseInfo {
11375
11658
  profilePerm?: number;
11376
11659
  memProfilePerm?: number;
11377
11660
  }
11661
+ interface IMemberInviteResponse {
11662
+ groupId: string;
11663
+ inviterId: string;
11664
+ optType: GroupOperationRole;
11665
+ optResult: GroupOperationStatus;
11666
+ joinUserId?: string;
11667
+ reason?: string;
11668
+ }
11378
11669
 
11379
11670
  interface INotificationQuietHoursSetting {
11380
11671
  /** [EN]
@@ -11438,32 +11729,55 @@ declare function getMessageTypeDescription(type: string): MessageTypeDescription
11438
11729
  */
11439
11730
  declare function hasMessageTypeDescription(type: string): boolean;
11440
11731
 
11732
+ /** [EN]
11733
+ * Get Conversation List By Timestamp Params
11734
+ */
11441
11735
  /**
11442
11736
  * 按时间戳查询会话列表参数
11443
11737
  */
11444
11738
  declare type IGetConversationListByTimestampParams = {
11739
+ /** [EN]
11740
+ * Get Conversation Start Time, precision to milliseconds, 0 represents the current time
11741
+ */
11445
11742
  /**
11446
11743
  * 获取会话起始时间,需要精确到毫秒,0 表示当前时间
11447
11744
  */
11448
11745
  startTime: number;
11746
+ /** [EN]
11747
+ * Get Conversation Count
11748
+ */
11449
11749
  /**
11450
11750
  * 分页数量
11451
11751
  */
11452
11752
  count: number;
11753
+ /** [EN]
11754
+ * Get Conversation Order. The parameter is invalid for Electron platform, and the default value is 0 for Electron platform;
11755
+ * * 0 - Query from startTime forward, data sorted by time in descending order
11756
+ * * 1 - Query from startTime backward, data sorted by time in ascending order
11757
+ */
11453
11758
  /**
11454
11759
  * 查询方向。该参数对 Electron 平台无效,Electron 平台下始终为 0;
11455
11760
  * * 0 - 从 startTime 开始向前查询,数据按时间降序排序
11456
11761
  * * 1 - 从 startTime 开始向后查询,数据按时间升序排序
11457
11762
  */
11458
11763
  order?: 0 | 1;
11764
+ /** [EN]
11765
+ * Get Conversation Channel Id, used for multi-organization scene query; only Electron platform is valid
11766
+ */
11459
11767
  /**
11460
11768
  * 单、群聊会话的组织 ID,用于多组织场景查询;仅 Electron 平台有效
11461
11769
  */
11462
11770
  channelId?: string;
11771
+ /** [EN]
11772
+ * Get Conversation Top Priority, only Electron platform is valid
11773
+ */
11463
11774
  /**
11464
- * 是否置顶优先,仅 Electron 平台有效
11775
+ * 是否置顶优先,仅对 Electron 平台有效
11465
11776
  */
11466
11777
  topPriority?: boolean;
11778
+ /** [EN]
11779
+ * Get Conversation Types; the value is empty or the length is 0 to get all conversation types
11780
+ */
11467
11781
  /**
11468
11782
  * 会话类型,值为空或长度为 0 时,获取全部会话类型;仅 Electron 平台有效
11469
11783
  */
@@ -11654,7 +11968,7 @@ interface IProcessCache {
11654
11968
  deltaTime: number;
11655
11969
  }
11656
11970
  /**
11657
- * 约束主进程 CppEngine 与 CppService 间的方法定义,以便于代码检查
11971
+ * 约束跨平台、跨进程通信方法定义,以便于代码检查
11658
11972
  */
11659
11973
  interface IIPCMethods {
11660
11974
  /**
@@ -11666,7 +11980,7 @@ interface IIPCMethods {
11666
11980
  * @param token
11667
11981
  * @param reconnectKickEnable
11668
11982
  */
11669
- connect(token: string, reconnectKickEnable: boolean, openCallPlus: boolean, traceId: string): IPromiseResult<string>;
11983
+ connect(token: string, reconnectKickEnable: boolean, openCallPlus: boolean, traceId: string): Promise<RCResult<string>>;
11670
11984
  getNaviInfoFromCache(): INaviInfo | null;
11671
11985
  /**
11672
11986
  * 上报版本信息
@@ -11809,7 +12123,7 @@ interface IIPCMethods {
11809
12123
  clearTextMessageDraft(conversation: IConversationOption): Promise<RCResult>;
11810
12124
  getConversationNotificationLevel(conversation: IConversationOption): Promise<RCResult<NotificationLevel>>;
11811
12125
  getTotalUnreadCountByLevels(conversationTypes: ConversationType[], levels: NotificationLevel[], isMentioned?: boolean): Promise<RCResult<number>>;
11812
- sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, traceId: string, onBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
12126
+ sendMessage(identifier: IConversationIdentifier, options: IMessageSendOptions, traceId: string, onBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
11813
12127
  /**
11814
12128
  * 断开连接
11815
12129
  */
@@ -11875,14 +12189,22 @@ interface IIPCMethods {
11875
12189
  */
11876
12190
  setCheckChatRoomDuplicateMessage(enableCheck: boolean): Promise<RCResult>;
11877
12191
  /**
11878
- * 获取上传认证信息
12192
+ * 获取存储服务鉴权信息
12193
+ * @param fileType 文件类型
12194
+ * @param fileName 文件名称
12195
+ * @param httpMethod STC 分段上传时的必填参数,有效值为 PUT | POST
12196
+ * @param queryString STC 分段上传时的查询字符串
11879
12197
  * @description
11880
- * 若不传 fileName 百度上传认证字段(bosToken、bosDate、path)均返回 null
11881
- */
11882
- getFileToken(fileType: FileType, fileName?: string, httpMethod?: string, queryUriString?: string): Promise<IAsyncRes<IUploadAuth>>;
11883
- /**
11884
- * 获取文件上传后下载地址
11885
- */
12198
+ * `httpMethod` `queryString` 为 STC S3 分段上传时的专属参数,STC 分段上传包含三个过程:
12199
+ * 1. 开始分段前调用,此时 `httpMethod` 值应为 `POST`,`queryString` 值为 `uploads`
12200
+ * 2. 上传请求前调用,此时 `httpMethod` 值应为 `PUT`,`queryString` 值为 `partNumber={partamNumer}&uploadId={uploadId}`
12201
+ * 3. 上传结束前调用,此时 `httpMethod` 值应为 `POST`,`queryString` 值为 `uploadId={uploadId}`
12202
+ * @returns
12203
+ */
12204
+ getFileToken(fileType: FileType, fileName?: string, httpMethod?: string, queryUriString?: string, url?: string, size?: number): Promise<RCResult<IUploadAuth>>;
12205
+ /**
12206
+ * 获取文件上传后下载地址
12207
+ */
11886
12208
  getFileUrl(fileType: FileType, uploadMethod: UploadMethod, fileName: string, originName: string): Promise<RCResult<{
11887
12209
  downloadUrl: string;
11888
12210
  }>>;
@@ -11955,19 +12277,19 @@ interface IIPCMethods {
11955
12277
  /**
11956
12278
  * 获取群组消息已读列表
11957
12279
  */
11958
- getMessageReader(targetId: string, messageUId: string, channelId?: string): IPromiseResult<IMessageReaderResponse>;
12280
+ getMessageReader(targetId: string, messageUId: string, channelId: string): Promise<RCResult<IMessageReaderResponse>>;
11959
12281
  /**
11960
12282
  * 发送已读回执 (V4)
11961
12283
  */
11962
- sendReadReceiptMessageV4(conversation: IConversationOption, startMsgUid: string, endMsgUid: string): Promise<IAsyncRes>;
12284
+ sendReadReceiptMessageV4(conversation: IConversationIdentifier, startMsgUid: string, endMsgUid: string): Promise<RCResult>;
11963
12285
  /**
11964
12286
  * 获取消息已读回执列表,暂仅支持群聊 (V4)
11965
12287
  */
11966
- getMessageReadReceiptV4(conversation: IConversationOption, messageUid: string): IPromiseResult<IMessageReadReceiptV4Response>;
12288
+ getMessageReadReceiptV4(conversation: IConversationIdentifier, messageUid: string): Promise<RCResult<IMessageReadReceiptV4Response>>;
11967
12289
  /**
11968
12290
  * 多端同步会话的已读时间 (V4)
11969
12291
  */
11970
- updateConversationReadTime(conversation: IConversationOption, timestamp: number): Promise<IAsyncRes>;
12292
+ updateConversationReadTime(conversation: IConversationIdentifier, timestamp: number): Promise<RCResult>;
11971
12293
  /**
11972
12294
  * 获取服务器时间
11973
12295
  */
@@ -11997,9 +12319,9 @@ interface IIPCMethods {
11997
12319
  /**
11998
12320
  * 获取用户状态
11999
12321
  */
12000
- getUserStatus(userId: string): IPromiseResult<{
12322
+ getUserStatus(userId: string): Promise<RCResult<{
12001
12323
  status: string;
12002
- }>;
12324
+ }>>;
12003
12325
  /**
12004
12326
  * 清空所有会话,目前仅 v2-adapter 中提供
12005
12327
  */
@@ -12007,19 +12329,19 @@ interface IIPCMethods {
12007
12329
  /**
12008
12330
  * 加入黑名单
12009
12331
  */
12010
- addToBlacklist(userId: string): Promise<ErrorCode>;
12332
+ addToBlacklist(userId: string): Promise<RCResult>;
12011
12333
  /**
12012
12334
  * 将指定用户移除黑名单
12013
12335
  */
12014
- removeFromBlacklist(userId: string): Promise<ErrorCode>;
12336
+ removeFromBlacklist(userId: string): Promise<RCResult>;
12015
12337
  /**
12016
12338
  * 获取黑名单列表
12017
12339
  */
12018
- getBlacklist(): IPromiseResult<string[]>;
12340
+ getBlacklist(): Promise<RCResult<string[]>>;
12019
12341
  /**
12020
12342
  * 获取指定人员在黑名单中的状态
12021
12343
  */
12022
- getBlacklistStatus(userId: string): IPromiseResult<number>;
12344
+ getBlacklistStatus(userId: string): Promise<RCResult<number>>;
12023
12345
  /**
12024
12346
  * 向本地插入一条消息,不发送到服务器
12025
12347
  */
@@ -12064,7 +12386,7 @@ interface IIPCMethods {
12064
12386
  * 通过关键字与 channelId 搜索所有会话
12065
12387
  */
12066
12388
  searchConversationByContent(keyword: string, customMessageTypes: string[], channelId: string, conversationTypes: ConversationType[]): Promise<RCResult<IReceivedConversation[]>>;
12067
- searchConversationByContentWithAllChannel(keyword: string, customMessageTypes: string[], conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
12389
+ searchConversationByContentWithAllChannel(keyword: string, customMessageTypes: string[], conversationTypes?: ConversationType[]): Promise<RCResult<IReceivedConversation[]>>;
12068
12390
  /**
12069
12391
  * 通过指定搜索策略和搜索参数,进行消息搜索
12070
12392
  * @param params
@@ -12081,11 +12403,11 @@ interface IIPCMethods {
12081
12403
  /**
12082
12404
  * 设置消息发送状态
12083
12405
  */
12084
- setMessageSentStatus(messageId: number, sentStatus: number): Promise<ErrorCode>;
12406
+ setMessageSentStatus(messageId: number, sentStatus: number): Promise<RCResult>;
12085
12407
  /**
12086
12408
  * 设置消息接收状态
12087
12409
  */
12088
- setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<ErrorCode>;
12410
+ setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<RCResult>;
12089
12411
  /**
12090
12412
  * 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
12091
12413
  */
@@ -12093,7 +12415,7 @@ interface IIPCMethods {
12093
12415
  /**
12094
12416
  * 删除时间戳前的未读数
12095
12417
  */
12096
- clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId: string): Promise<ErrorCode>;
12418
+ clearUnreadCountByTimestamp(conversation: IConversationIdentifier, timestamp: number): Promise<RCResult>;
12097
12419
  /**
12098
12420
  * 获取所有群聊会话 @ 消息未读数,不包含超级群会话
12099
12421
  */
@@ -12110,85 +12432,122 @@ interface IIPCMethods {
12110
12432
  /**
12111
12433
  * 设置代理
12112
12434
  */
12113
- setProxy(proxy: IProxy | null): IPromiseResult<IProxy>;
12435
+ setProxy(proxy: IProxy | null): Promise<RCResult>;
12114
12436
  /**
12115
12437
  * 获取代理
12116
12438
  */
12117
- getProxy(): IPromiseResult<IProxy>;
12439
+ getProxy(): Promise<RCResult<IProxy>>;
12118
12440
  /**
12119
12441
  * 测试代理
12120
12442
  */
12121
- testProxy(proxy: IProxy, testHost: string): Promise<IResponse>;
12443
+ testProxy(proxy: IProxy, testHost: string): Promise<RCResult>;
12122
12444
  /**
12123
12445
  * 订阅用户状态事件
12124
12446
  */
12125
- subscribeUser(userIds: string[], subscribeType: SubscribeType, expiry: number): Promise<IAsyncRes<string[]>>;
12447
+ subscribeUser(userIds: string[], subscribeType: SubscribeType, expiry: number): Promise<RCResult<string[]>>;
12126
12448
  /**
12127
12449
  * 取消订阅用户状态事件
12128
12450
  */
12129
- unSubscribeUser(userIds: string[], subscribeType: SubscribeType): Promise<IAsyncRes<void>>;
12451
+ unSubscribeUser(userIds: string[], subscribeType: SubscribeType): Promise<RCResult>;
12130
12452
  /**
12131
12453
  * 获取已订阅列表
12132
12454
  */
12133
- getSubscribeUserList(subscribeType: SubscribeType, count: number, offset: number): Promise<IAsyncRes<ISubscribeUserStatusInfo[]>>;
12455
+ getSubscribeUserList(subscribeType: SubscribeType, count: number, offset: number): Promise<RCResult<ISubscribeUserStatusInfo[]>>;
12134
12456
  /**
12135
12457
  * 获取指定用户的在线状态
12136
12458
  */
12137
12459
  getSubscribeUserStatus(subscribeType: SubscribeType, userIds: string[]): Promise<RCResult<ISubscribeUserStatusInfo[]>>;
12138
- updateMyUserProfile(profile: IUserProfileInfo): Promise<IAsyncRes<IUpdateMyProfileFail>>;
12460
+ updateMyUserProfile(profile: IUserProfileInfo): Promise<RCResult<IUpdateMyProfileFail>>;
12139
12461
  getUserProfiles(userIds: string[]): Promise<RCResult<IUserProfileInfo[]>>;
12140
- getMyUserProfile(): Promise<IAsyncRes<IUserProfileInfo>>;
12141
- updateMyUserProfileVisibility(visibility: UserProfileVisibility): Promise<IAsyncRes>;
12142
- getMyUserProfileVisibility(): Promise<IAsyncRes<UserProfileVisibility>>;
12143
- searchUserProfileByUniqueId(uniqueId: string): Promise<IAsyncRes<IUserProfileInfo>>;
12144
- createGroup(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
12145
- [key: string]: string;
12146
- } | undefined, inviteeUserIds: string[]): Promise<IAsyncRes<ICreateGroupFail>>;
12147
- updateGroupInfo(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
12148
- [key: string]: string;
12149
- } | undefined): Promise<IAsyncRes<IErrorKeys>>;
12150
- getGroupsInfo(groupIds: string[]): Promise<IAsyncRes<IGroupInfo[]>>;
12151
- kickGroupMembers(groupId: string, userIds: string[], config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
12152
- quitGroup(groupId: string, config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
12153
- dismissGroup(groupId: string): Promise<IAsyncRes<void>>;
12154
- transferGroupOwner(groupId: string, newOwnerId: string, quitGroupAfterTransfer: boolean, config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
12155
- setGroupManagers(type: GroupOperationType, groupId: string, userIds: string[]): Promise<IAsyncRes<void>>;
12156
- getGroupMembersByRole(groupId: string, role: GroupMemberRole, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupMemberInfo>>>;
12157
- getGroupMembers(groupId: string, userIds: string[]): Promise<IAsyncRes<IGroupMemberInfo[]>>;
12158
- setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra?: string): Promise<IAsyncRes<IErrorKeys>>;
12159
- searchGroupMembers(groupId: string, nickName: string, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupMemberInfo>>>;
12160
- joinGroup(groupId: string): Promise<IAsyncRes<IProcessCode>>;
12161
- inviteUsersToGroup(groupId: string, userIds: string[]): Promise<IAsyncRes<IProcessCode>>;
12162
- memberInviteResponse(params: {
12163
- groupId: string;
12164
- inviterId: string;
12165
- optType: GroupOperationRole;
12166
- optResult: GroupOperationStatus;
12167
- joinUserId?: string;
12168
- reason?: string;
12169
- }): Promise<IAsyncRes<IProcessCode>>;
12170
- getGroupApplications(option: IPagingQueryOption, directions: GroupApplicationDirection[], status: GroupApplicationStatus[]): Promise<IAsyncRes<IPagingQueryResult<IGroupApplicationInfo>>>;
12171
- getJoinedGroupsByRole(role: GroupMemberRole, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupInfo>>>;
12172
- searchJoinedGroups(groupName: string, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupInfo>>>;
12173
- getJoinedGroups(groupIds: string[]): Promise<IAsyncRes<IGroupInfo[]>>;
12174
- setGroupRemark(groupId: string, remark: string | null): Promise<IAsyncRes<void>>;
12175
- setGroupFollows(optType: GroupOperationType, groupId: string, userIds: string[]): Promise<IAsyncRes<void>>;
12176
- getGroupFollows(groupId: string): Promise<IAsyncRes<IFollowsInfo[]>>;
12177
- addFriend(userId: string, directionType: DirectionType, extra?: string): Promise<IAsyncRes<IProcessCode>>;
12178
- deleteFriends(userIds: string[], directionType: DirectionType): Promise<IAsyncRes<void>>;
12179
- acceptFriendApplication(userId: string): Promise<IAsyncRes<void>>;
12180
- refuseFriendApplication(userId: string, reason?: string): Promise<IAsyncRes<void>>;
12181
- setFriendInfo(userId: string, remark: string, extProfile: {
12182
- [key: string]: string;
12183
- }): Promise<IAsyncRes<IErrorKeys>>;
12184
- checkFriends(userIds: string[], directionType: DirectionType): Promise<IAsyncRes<IFriendRelationInfo[]>>;
12185
- getFriends(directionType: QueryFriendsDirectionType, option: IPagingQueryOption | undefined): Promise<IAsyncRes<IPagingQueryResult<IFriendInfo>>>;
12186
- getFriendApplications(option: IPagingQueryOption, type?: FriendApplicationType[], status?: FriendApplicationStatus[]): Promise<IAsyncRes<IPagingQueryResult<IFriendApplicationInfo>>>;
12187
- deleteFriendApplication(userId: string, type: FriendApplicationType): Promise<IAsyncRes<void>>;
12188
- getFriendsInfo(userIds: string[]): Promise<IAsyncRes<IFriendInfo[]>>;
12189
- searchFriendsInfo(nickname: string): Promise<IAsyncRes<IFriendInfo[]>>;
12190
- setFriendAddPermission(permission: FriendAddPermission): Promise<IAsyncRes<void>>;
12191
- getFriendAddPermission(): Promise<IAsyncRes<FriendAddPermission>>;
12462
+ getMyUserProfile(): Promise<RCResult<IUserProfileInfo>>;
12463
+ updateMyUserProfileVisibility(visibility: UserProfileVisibility): Promise<RCResult>;
12464
+ getMyUserProfileVisibility(): Promise<RCResult<UserProfileVisibility>>;
12465
+ searchUserProfileByUniqueId(uniqueId: string): Promise<RCResult<IUserProfileInfo>>;
12466
+ createGroup(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile?: Record<string, string>, inviteeUserIds?: string[]): Promise<RCResult<ICreateGroupFail>>;
12467
+ updateGroupInfo(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile?: Record<string, string>): Promise<RCResult<IErrorKeys>>;
12468
+ getGroupsInfo(groupIds: string[]): Promise<RCResult<IGroupInfo[]>>;
12469
+ kickGroupMembers(groupId: string, userIds: string[], config: Required<IQuitGroupConfig>): Promise<RCResult>;
12470
+ quitGroup(groupId: string, config: Required<IQuitGroupConfig>): Promise<RCResult>;
12471
+ dismissGroup(groupId: string): Promise<RCResult>;
12472
+ transferGroupOwner(groupId: string, newOwnerId: string, quitGroupAfterTransfer: boolean, config: Required<IQuitGroupConfig>): Promise<RCResult>;
12473
+ setGroupManagers(type: GroupOperationType, groupId: string, userIds: string[]): Promise<RCResult>;
12474
+ getGroupMembersByRole(groupId: string, role: GroupMemberRole, option: Required<IGetGroupMembersOption>): Promise<RCResult<IPagingQueryResult<IGroupMemberInfo>>>;
12475
+ getGroupMembers(groupId: string, userIds: string[]): Promise<RCResult<IGroupMemberInfo[]>>;
12476
+ setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra?: string): Promise<RCResult<IErrorKeys>>;
12477
+ searchGroupMembers(groupId: string, nickName: string, option: Required<IPagingQueryOption>): Promise<RCResult<IPagingQueryResult<IGroupMemberInfo>>>;
12478
+ joinGroup(groupId: string): Promise<RCResult<IProcessCode>>;
12479
+ inviteUsersToGroup(groupId: string, userIds: string[]): Promise<RCResult<IProcessCode>>;
12480
+ memberInviteResponse(params: IMemberInviteResponse): Promise<RCResult<IProcessCode>>;
12481
+ getGroupApplications(option: Required<IPagingQueryOption>, directions: GroupApplicationDirection[], status: GroupApplicationStatus[]): Promise<RCResult<IPagingQueryResult<IGroupApplicationInfo>>>;
12482
+ getJoinedGroupsByRole(role: GroupMemberRole, option: Required<IPagingQueryOption>): Promise<RCResult<IPagingQueryResult<IGroupInfo>>>;
12483
+ searchJoinedGroups(groupName: string, option: Required<IPagingQueryOption>): Promise<RCResult<IPagingQueryResult<IGroupInfo>>>;
12484
+ getJoinedGroups(groupIds: string[]): Promise<RCResult<IGroupInfo[]>>;
12485
+ /**
12486
+ * 设置/移除 群组备注名
12487
+ * @param groupId
12488
+ * @param remark 备注名,设置为 '' 代表移除
12489
+ */
12490
+ setGroupRemark(groupId: string, remark: string): Promise<RCResult>;
12491
+ setGroupFollows(optType: GroupOperationType, groupId: string, userIds: string[]): Promise<RCResult>;
12492
+ getGroupFollows(groupId: string): Promise<RCResult<IFollowsInfo[]>>;
12493
+ /**
12494
+ * 添加好友
12495
+ * @param userId
12496
+ * @param directionType
12497
+ * @param extra
12498
+ */
12499
+ addFriend(userId: string, directionType: DirectionType, extra: string): Promise<RCResult<IProcessCode>>;
12500
+ /**
12501
+ * 删除好友
12502
+ * @param userIds
12503
+ * @param directionType
12504
+ */
12505
+ deleteFriends(userIds: string[], directionType: DirectionType): Promise<RCResult>;
12506
+ /**
12507
+ * 接受好友请求
12508
+ * @param userId
12509
+ */
12510
+ acceptFriendRequest(userId: string): Promise<RCResult>;
12511
+ /**
12512
+ * 拒绝好友请求
12513
+ * @param userId
12514
+ * @param reason
12515
+ */
12516
+ refuseFriendRequest(userId: string, reason?: string): Promise<RCResult>;
12517
+ /**
12518
+ * 设置好友信息
12519
+ * @param userId
12520
+ * @param remark
12521
+ * @param extProfile
12522
+ */
12523
+ setFriendInfo(userId: string, remark: string, extProfile: Record<string, string>): Promise<RCResult<IErrorKeys>>;
12524
+ /**
12525
+ * 检查好友关系
12526
+ * @param userIds
12527
+ * @param directionType
12528
+ */
12529
+ checkFriends(userIds: string[], directionType: DirectionType): Promise<RCResult<IFriendRelationInfo[]>>;
12530
+ /**
12531
+ * 获取好友列表
12532
+ * @param directionType
12533
+ * @param option 分页查询参数,对 Electron 平台无效
12534
+ */
12535
+ getFriends(directionType: QueryFriendsDirectionType, option: Required<IPagingQueryOption>): Promise<RCResult<IPagingQueryResult<IFriendInfo>>>;
12536
+ /**
12537
+ * 获取好友请求列表
12538
+ * @param option 分页参数
12539
+ * @param types 请求类型
12540
+ * @param status 请求状态
12541
+ */
12542
+ getFriendApplications(option: Required<IPagingQueryOption>, types: FriendApplicationType[], status: FriendApplicationStatus[]): Promise<RCResult<IPagingQueryResult<IFriendApplicationInfo>>>;
12543
+ /**
12544
+ * 获取好友信息
12545
+ * @param userIds
12546
+ */
12547
+ getFriendsInfo(userIds: string[]): Promise<RCResult<IFriendInfo[]>>;
12548
+ searchFriendsInfo(nickname: string): Promise<RCResult<IFriendInfo[]>>;
12549
+ setFriendAddPermission(permission: FriendAddPermission): Promise<RCResult>;
12550
+ getFriendAddPermission(): Promise<RCResult<FriendAddPermission>>;
12192
12551
  setNotificationQuietHoursWithSetting(opts: INotificationQuietHoursSetting): Promise<RCResult>;
12193
12552
  removeNotificationQuietHoursSetting(): Promise<RCResult>;
12194
12553
  getNotificationQuietHoursSetting(): Promise<RCResult<INotificationQuietHoursSetting>>;
@@ -12225,12 +12584,13 @@ interface IIPCMethods {
12225
12584
  * 获取自动翻译全局开关
12226
12585
  */
12227
12586
  getAutoTranslateEnabled(): Promise<RCResult<boolean>>;
12228
- rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<IAsyncRes<any>>;
12587
+ setCallInfo(targetId: string, key: string, value: string): Promise<RCResult<{
12588
+ key: string;
12589
+ value: string;
12590
+ }>>;
12591
+ rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<RCResult<any>>;
12229
12592
  bindRTCRoomForChatroom(options: IRTCRoomBindOption): Promise<RCResult>;
12230
- rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<{
12231
- code: ErrorCode;
12232
- buffer?: any;
12233
- }>;
12593
+ rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<RCResult<Uint8Array>>;
12234
12594
  requestSpeechToTextForMessage(messageUId: string, option?: IConvertSpeechToTextOption): Promise<RCResult>;
12235
12595
  setMessageSpeechToTextVisible(messageId: number, isVisible: boolean): Promise<RCResult>;
12236
12596
  /**
@@ -12378,6 +12738,11 @@ interface IIPCMethods {
12378
12738
  * @param includeUG 会话列表支持超级群开关
12379
12739
  */
12380
12740
  getUnreadMentionMeConversationList(params: IGetUnreadMentionMeConversationListParams, includeUG: boolean): Promise<RCResult<IReceivedConversation[]>>;
12741
+ /**
12742
+ * 设置融云消息重排开关
12743
+ * @param enableCheck 是否开启融云消息重排开关
12744
+ */
12745
+ setCheckDuplicateMessage(enableCheck: boolean): Promise<RCResult<boolean>>;
12381
12746
  }
12382
12747
 
12383
12748
  /**
@@ -12827,100 +13192,6 @@ declare type IUserSettingsChangedEvent = {
12827
13192
  value: boolean;
12828
13193
  };
12829
13194
 
12830
- /**
12831
- * 检查参数是否为字符串
12832
- * 只做类型检查,不做长度检查,故当字符串长度为 0,结果依然为 true
12833
- * @param value
12834
- */
12835
- declare const isString: (value: unknown) => boolean;
12836
- /**
12837
- * 检测参数是否为布尔值
12838
- * @param value
12839
- */
12840
- declare const isBoolean: (value: unknown) => boolean;
12841
- /**
12842
- * 检查参数是否为 number 数据
12843
- * @param value
12844
- */
12845
- declare const isNumber: (value: unknown) => boolean;
12846
- /**
12847
- * 检查参数是否为整数,可以指定最小值和最大值,区间包含最小值和最大值,
12848
- */
12849
- declare const isInteger: (option: {
12850
- min?: number;
12851
- max?: number;
12852
- }) => (value: number) => boolean;
12853
- /**
12854
- * 检查参数是否为数组
12855
- * 只做类型检查,不做长度检查
12856
- * 如 UnitArray、BufferArray 等也属于数组
12857
- * @param arr
12858
- */
12859
- declare const isArray: (arr: unknown) => boolean;
12860
- /**
12861
- * 有限制的字符串
12862
- * 做长度检查、自定义检查
12863
- * 先检测前后去空格是否为空
12864
- */
12865
- declare const isLimitedString: (option: {
12866
- minLength?: number | undefined;
12867
- maxLength?: number | undefined;
12868
- validator?: ((val: string) => boolean) | undefined;
12869
- isTrim?: boolean | undefined;
12870
- }) => (str: unknown) => boolean;
12871
- /**
12872
- * 检查参数是否为长度非 0 的字符串
12873
- * @param str
12874
- */
12875
- declare const notEmptyString: (str: unknown) => boolean;
12876
- /**
12877
- * 检查参数是否为长度非 0 的数组
12878
- * @param str
12879
- */
12880
- declare const notEmptyArray: (arr: any[]) => boolean;
12881
- /**
12882
- * 检查参数是否为对象
12883
- * @param val
12884
- */
12885
- declare const isObject: (val: any) => boolean;
12886
- /**
12887
- * 检查参数是否为函数
12888
- * @param val
12889
- */
12890
- declare const isFunction: (val: any) => boolean;
12891
- /**
12892
- * 检查参数是否为 undefined
12893
- * @param val
12894
- */
12895
- declare const isUndefined: (val: any) => boolean;
12896
- /**
12897
- * 检查参数是否为有效 http(s) 协议 url
12898
- * @param value
12899
- */
12900
- declare const isHttpUrl: (value: any) => boolean;
12901
- /**
12902
- * 检查对象不为空
12903
- * @param val
12904
- */
12905
- declare const notEmptyObject: (val: Object) => boolean;
12906
- declare const isValidConversationType: (conversation: number) => boolean;
12907
- declare const isValidEnum: (param: {
12908
- value: unknown;
12909
- type: object;
12910
- }) => boolean;
12911
- /**
12912
- * 检查是否是有效的 targetId
12913
- */
12914
- declare const isValidTargetId: (value: any) => boolean;
12915
- /**
12916
- * 检查是否是有效的 groupId
12917
- */
12918
- declare const isValidGroupId: (value: any) => boolean;
12919
- /**
12920
- * 判断是否是一个有效的文件类型
12921
- */
12922
- declare const isValidFileType: (fileType: number) => boolean;
12923
-
12924
13195
  /**
12925
13196
  * 判断当前是否运行在 electron 环境且搭配 c++ 协议栈使用
12926
13197
  */
@@ -12936,50 +13207,6 @@ declare const trans2IReceivedStatusInfo: (status: ReceivedStatus) => IReceivedSt
12936
13207
  */
12937
13208
  declare const transformReceivedStatusFlag: (receivedStatusInfo: IReceivedStatusInfo) => number;
12938
13209
 
12939
- declare type PBModule = {
12940
- toArrayBuffer: () => ArrayBuffer;
12941
- getArrayData: never;
12942
- [key: string]: Function;
12943
- };
12944
- declare class Codec$1<T> {
12945
- #private;
12946
- /**
12947
- * 嵌套结构声明
12948
- * key: pbname
12949
- * value: [key: pbname + _ + 属性名,type: 值的 pbname ]
12950
- */
12951
- private nestedMap;
12952
- private readonly pbModules;
12953
- constructor(
12954
- /**
12955
- * proto 协议描述
12956
- */
12957
- desc: string,
12958
- /**
12959
- * 嵌套结构声明
12960
- * key: pbname
12961
- * value: [key: pbname + _ + 属性名,type: 值的 pbname ]
12962
- */
12963
- nestedMap: Map<string, keyof T>);
12964
- private _encode;
12965
- /**
12966
- * PB 数据序列化
12967
- * @param pbname - PB 名称
12968
- * @param params - 待序列化数据
12969
- */
12970
- encode<K extends keyof T>(key: K, params: T[K]): ArrayBuffer;
12971
- /**
12972
- * 数据反序列化,反序列化的结果为未加工的原始数据,decode 函数本身不处理 format 过程
12973
- * @param pbname 待解码数据的 PB 名
12974
- * @param data 待解码数据
12975
- */
12976
- decode<K extends keyof T>(pbname: K, uint8array: Uint8Array): T[K];
12977
- /**
12978
- * @deprecated
12979
- */
12980
- getModule(pbname: string): PBModule;
12981
- }
12982
-
12983
13210
  /** [EN]
12984
13211
  * Log level definitions
12985
13212
  * @category Enum
@@ -13669,6 +13896,24 @@ declare type IChatRoomEntries = IChatroomEntries;
13669
13896
  * @deprecated
13670
13897
  */
13671
13898
  declare type IRemoveChatRoomEntry = IRemoveChatroomEntry;
13899
+ /**
13900
+ * 发送消息时的可选项信息
13901
+ * @deprecated
13902
+ */
13903
+ interface ISendMsgOptions extends IMessageSendOptions {
13904
+ /**
13905
+ * @deprecated 参数废弃。SDK 通过注册的消息类型来确定是否计数,发送时不可修改
13906
+ */
13907
+ isCounted?: boolean;
13908
+ /**
13909
+ * @deprecated 参数废弃。SDK 通过注册的消息类型来确定是否存储,发送时不可修改
13910
+ */
13911
+ isPersited?: boolean;
13912
+ /**
13913
+ * 会话 Channel ID
13914
+ */
13915
+ channelId?: string;
13916
+ }
13672
13917
 
13673
13918
  /**
13674
13919
  * @todo 后期禁用此方法,容易滥用,且会丢失上下文的数据类型跟踪
@@ -13702,27 +13947,9 @@ declare type ModuleType<T> = {
13702
13947
  * @deprecated 因该工具已向 RTC 业务暴露,因此暂时不可删除,待 RTC 迁移到新工具后删除
13703
13948
  */
13704
13949
  declare class Codec<T> {
13705
- /**
13706
- * Key 对应的 Value 结构映射表,用于不同 Key 数据的编解码
13707
- */
13708
- private pbmaps;
13709
- /**
13710
- * 允许不传 logger 实例以向前兼容
13711
- */
13712
- private logger?;
13713
- private readonly pbModules;
13950
+ private readonly protoRoot;
13714
13951
  /** @deprecated */
13715
- constructor(
13716
- /**
13717
- * Key 对应的 Value 结构映射表,用于不同 Key 数据的编解码
13718
- */
13719
- pbmaps: T, pbDefined: string,
13720
- /**
13721
- * 允许不传 logger 实例以向前兼容
13722
- */
13723
- logger?: ILogger | undefined);
13724
- /** @deprecated */
13725
- getModule(pbname: string): any;
13952
+ constructor(pbDefined: string);
13726
13953
  /**
13727
13954
  * 数据序列化
13728
13955
  * @param pbname 待编码数据的 PB 名
@@ -13745,11 +13972,6 @@ declare class Codec<T> {
13745
13972
  * @deprecated
13746
13973
  */
13747
13974
  decode(pbname: string, uint8array: Uint8Array): any;
13748
- /**
13749
- * protobuf 结构中,int64 类型数据无法直接转为 JS 的 number 数据,需计算获取
13750
- * @param data
13751
- */
13752
- private fixInt64Values;
13753
13975
  }
13754
13976
  /**
13755
13977
  * 请使用 `Codec` 替代 `AbsCodec`
@@ -13771,8 +13993,8 @@ declare class PluginContext {
13771
13993
  */
13772
13994
  __getContext(): APIContext;
13773
13995
  /** @deprecated 使用 `createPBCodec` 替代 */
13774
- createCodec<T extends CodecPBMaps>(keymaps: T, pbDesc: string): Codec<T>;
13775
- createPBCodec<T>(desc: string, nestedMap: Map<string, keyof T>): Codec$1<T>;
13996
+ createCodec<T extends CodecPBMaps>(_: T, pbDesc: string): Codec<T>;
13997
+ createPBCodec<T>(desc: string, _?: Map<string, keyof T>): Codec$1<T>;
13776
13998
  /**
13777
13999
  * 重新请求服务导航数据
13778
14000
  */
@@ -13840,8 +14062,10 @@ declare class PluginContext {
13840
14062
  setPushConfig(config: IAppPushConfig): void;
13841
14063
  /**
13842
14064
  * 发送消息
14065
+ * @deprecated
13843
14066
  */
13844
- sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions): IPromiseResult<IReceivedMessage>;
14067
+ sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions): Promise<RCResult<IReceivedMessage>>;
14068
+ sendMessageTo(identifier: IConversationIdentifier, options: IMessageSendOptions): Promise<RCResult<IReceivedMessage>>;
13845
14069
  /**
13846
14070
  * 消息注册
13847
14071
  * @description 消息注册需在应用初始化完成前进行
@@ -13867,10 +14091,10 @@ declare class PluginContext {
13867
14091
  * 获取应用主进程信息,仅限 Electron 平台可用
13868
14092
  */
13869
14093
  getMainProcessInfo(): IPromiseResult<IProcessInfo>;
13870
- setCallInfo(targetId: string, key: string, value: string): IPromiseResult<{
14094
+ setCallInfo(targetId: string, key: string, value: string): Promise<RCResult<{
13871
14095
  key: string;
13872
14096
  value: string;
13873
- }>;
14097
+ }>>;
13874
14098
  /**
13875
14099
  * 创建 logger 实例
13876
14100
  * @param id 日志工具 ID,用于区分日志实例,以确定日志调用者身份
@@ -14089,16 +14313,6 @@ interface IAPIContextOption {
14089
14313
  */
14090
14314
  loggerProxy?: LogDBProxy;
14091
14315
  }
14092
- interface IConnectResult {
14093
- /**
14094
- * 连接错误码
14095
- */
14096
- code: ErrorCode;
14097
- /**
14098
- * 导航获取成功后即可有相应的值,在导航数据获取完成之前该值为 undefined
14099
- */
14100
- userId?: string;
14101
- }
14102
14316
 
14103
14317
  /**
14104
14318
  * 应用设置
@@ -14138,7 +14352,7 @@ declare class AppSettings {
14138
14352
  interface IChatroomService extends Pick<IIPCMethods, 'getChatroomHistoryMessages' | 'joinChatroom' | 'quitChatroom' | 'getChatroomInfo' | 'setChatroomEntry' | 'setChatroomEntries' | 'removeChatroomEntry' | 'removeChatroomEntries' | 'getChatroomEntry' | 'getAllChatroomEntries' | 'bindRTCRoomForChatroom' | 'setCheckChatRoomDuplicateMessage'> {
14139
14353
  }
14140
14354
 
14141
- interface IModuleContext {
14355
+ interface IModuleContext extends Pick<IIPCMethods, 'sendMessage'> {
14142
14356
  /**
14143
14357
  * 应用 Key
14144
14358
  */
@@ -14175,6 +14389,10 @@ interface IModuleContext {
14175
14389
  * 日志工具
14176
14390
  */
14177
14391
  get logger(): BasicLogger;
14392
+ /**
14393
+ * 是否使用 C++ 引擎
14394
+ */
14395
+ get usingCppEngine(): boolean;
14178
14396
  }
14179
14397
 
14180
14398
  declare class BaseModule {
@@ -14203,12 +14421,12 @@ declare class ChatroomModule extends BaseModule {
14203
14421
  /**
14204
14422
  * 聊天室服务
14205
14423
  */
14206
- private readonly serv;
14424
+ private readonly svr;
14207
14425
  constructor(ctx: IModuleContext,
14208
14426
  /**
14209
14427
  * 聊天室服务
14210
14428
  */
14211
- serv: IChatroomService);
14429
+ svr: IChatroomService);
14212
14430
  /**
14213
14431
  * 加入聊天室,若聊天室不存在则创建聊天室
14214
14432
  * @param chatroomId 聊天室房间 Id
@@ -14285,15 +14503,82 @@ declare class ChatroomModule extends BaseModule {
14285
14503
  bindRTCRoomForChatroom(option: IRTCRoomBindOption): Promise<RCResult>;
14286
14504
  }
14287
14505
 
14506
+ interface IDataHostingService extends Pick<IIPCMethods, 'searchUserProfileByUniqueId' | 'updateMyUserProfileVisibility' | 'getMyUserProfileVisibility' | 'createGroup' | 'updateGroupInfo' | 'getGroupsInfo' | 'kickGroupMembers' | 'quitGroup' | 'joinGroup' | 'inviteUsersToGroup' | 'memberInviteResponse' | 'getGroupApplications' | 'getJoinedGroupsByRole' | 'searchJoinedGroups' | 'getJoinedGroups' | 'dismissGroup' | 'transferGroupOwner' | 'setGroupManagers' | 'setGroupFollows' | 'getGroupFollows' | 'setGroupRemark' | 'addFriend' | 'deleteFriends' | 'acceptFriendRequest' | 'refuseFriendRequest' | 'setFriendInfo' | 'checkFriends' | 'getFriends' | 'getFriendApplications' | 'getFriendsInfo' | 'searchFriendsInfo' | 'setFriendAddPermission' | 'getFriendAddPermission' | 'getGroupMembersByRole' | 'getGroupMembers' | 'setGroupMemberInfo' | 'searchGroupMembers'> {
14507
+ }
14508
+
14509
+ /**
14510
+ * 数据托管模块
14511
+ */
14512
+ declare class DataHosting extends BaseModule {
14513
+ private readonly svr;
14514
+ constructor(ctx: IModuleContext, svr: IDataHostingService);
14515
+ /**
14516
+ * 验证用户信息托管是否可用
14517
+ */
14518
+ private _userProfileEnabled;
14519
+ updateMyUserProfileVisibility(visibility: UserProfileVisibility): Promise<RCResult>;
14520
+ getMyUserProfileVisibility(): Promise<RCResult<UserProfileVisibility>>;
14521
+ searchUserProfileByUniqueId(uniqueId: string): Promise<RCResult<IUserProfileInfo>>;
14522
+ addFriend(userId: string, directionType: DirectionType, extra?: string): Promise<RCResult<IProcessCode>>;
14523
+ deleteFriends(userIds: string[], directionType: DirectionType): Promise<RCResult>;
14524
+ acceptFriendRequest(userId: string): Promise<RCResult>;
14525
+ refuseFriendRequest(userId: string, reason?: string): Promise<RCResult>;
14526
+ setFriendInfo(userId: string, remark: string, extProfile?: Record<string, string>): Promise<RCResult<IErrorKeys>>;
14527
+ checkFriends(userIds: string[], directionType: DirectionType): Promise<RCResult<IFriendRelationInfo[]>>;
14528
+ getFriends(directionType: QueryFriendsDirectionType, option?: IPagingQueryOption): Promise<RCResult<IPagingQueryResult<IFriendInfo>>>;
14529
+ getFriendApplications(option?: IPagingQueryOption, types?: FriendApplicationType[], status?: FriendApplicationStatus[]): Promise<RCResult<IPagingQueryResult<IFriendApplicationInfo>>>;
14530
+ getFriendsInfo(userIds: string[]): Promise<RCResult<IFriendInfo[]>>;
14531
+ searchFriendsInfo(nickname: string): Promise<RCResult<IFriendInfo[]>>;
14532
+ setFriendAddPermission(permission: FriendAddPermission): Promise<RCResult>;
14533
+ getFriendAddPermission(): Promise<RCResult<FriendAddPermission>>;
14534
+ createGroup(groupInfo: IGroupInfoOption, inviteeUserIds?: string[]): Promise<RCResult<ICreateGroupFail>>;
14535
+ updateGroupInfo(groupInfo: IGroupInfoOption): Promise<RCResult<IErrorKeys>>;
14536
+ getGroupsInfo(groupIds: string[]): Promise<RCResult<IGroupInfo[]>>;
14537
+ kickGroupMembers(groupId: string, userIds: string[], config?: IQuitGroupConfig): Promise<RCResult>;
14538
+ quitGroup(groupId: string, config?: IQuitGroupConfig): Promise<RCResult>;
14539
+ dismissGroup(groupId: string): Promise<RCResult>;
14540
+ transferGroupOwner(groupId: string, newOwnerId: string, quit?: boolean, config?: IQuitGroupConfig): Promise<RCResult>;
14541
+ addGroupManagers(groupId: string, userIds: string[]): Promise<RCResult>;
14542
+ removeGroupManagers(groupId: string, userIds: string[]): Promise<RCResult>;
14543
+ getGroupMembers(groupId: string, userIds: string[]): Promise<RCResult<IGroupMemberInfo[]>>;
14544
+ setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra?: string): Promise<RCResult<IErrorKeys>>;
14545
+ searchGroupMembers(groupId: string, nickName: string, option: IPagingQueryOption): Promise<RCResult<IPagingQueryResult<IGroupMemberInfo>>>;
14546
+ getGroupMembersByRole(groupId: string, role: GroupMemberRole, option: IGetGroupMembersOption): Promise<RCResult<IPagingQueryResult<IGroupMemberInfo>>>;
14547
+ addGroupFollows(groupId: string, userIds: string[]): Promise<RCResult>;
14548
+ removeGroupFollows(groupId: string, userIds: string[]): Promise<RCResult>;
14549
+ getGroupFollows(groupId: string): Promise<RCResult<IFollowsInfo[]>>;
14550
+ setGroupRemark(groupId: string, remark: string): Promise<RCResult>;
14551
+ joinGroup(groupId: string): Promise<RCResult<IProcessCode>>;
14552
+ inviteUsersToGroup(groupId: string, userIds: string[]): Promise<RCResult<IProcessCode>>;
14553
+ acceptGroupInvite(groupId: string, inviterId: string): Promise<RCResult>;
14554
+ refuseGroupInvite(groupId: string, inviterId: string, reason?: string): Promise<RCResult>;
14555
+ acceptGroupApplication(groupId: string, joinUserId: string, inviterId?: string): Promise<RCResult<IProcessCode>>;
14556
+ refuseGroupApplication(groupId: string, joinUserId: string, inviterId?: string, reason?: string): Promise<RCResult>;
14557
+ /**
14558
+ * 获取群组请求列表
14559
+ * @param option 分页查询参数
14560
+ * @param directions 群组请求方向,参数仅 Electron 平台支持,且 Electron 为必填项,Web 传递无效
14561
+ * @param status 群组请求状态,参数仅 Electron 平台支持,且 Electron 为必填项,Web 传递无效
14562
+ */
14563
+ getGroupApplications(option: IPagingQueryOption, directions?: GroupApplicationDirection[], status?: GroupApplicationStatus[]): Promise<RCResult<IPagingQueryResult<IGroupApplicationInfo>>>;
14564
+ getJoinedGroupsByRole(role: GroupMemberRole, option: IPagingQueryOption): Promise<RCResult<IPagingQueryResult<IGroupInfo>>>;
14565
+ searchJoinedGroups(groupName: string, option: IPagingQueryOption): Promise<RCResult<IPagingQueryResult<IGroupInfo>>>;
14566
+ getJoinedGroups(groupIds: string[]): Promise<RCResult<IGroupInfo[]>>;
14567
+ }
14568
+
14288
14569
  /**
14289
14570
  * 会话聊天模块
14290
14571
  */
14291
- interface IChatService extends Pick<IIPCMethods, 'getTotalUnreadCount' | 'getConversation' | 'batchSetConversationToTop' | 'batchSetConversationNotificationLevel' | 'getConversationNotificationLevel' | 'setConversationTypeNotificationLevel' | 'getConversationTypeNotificationLevel' | 'clearAllSGUnreadCount' | 'deleteRemoteMessage' | 'deleteRemoteMessageByTimestamp' | 'batchClearRemoteHistoryMessages' | 'sendReadReceiptResponseV5' | 'getMessageReadReceiptInfoV5ByIdentifiers' | 'getMessagesReadReceiptUsersByPageV5' | 'getMessagesReadReceiptByUsersV5' | 'searchConversationByContent' | 'requestSpeechToTextForMessage' | 'setMessageSpeechToTextVisible' | 'addTagForConversations' | 'getTagsForConversation' | 'setConversationStatusInTag' | 'removeTagForConversations' | 'removeTagsForConversation' | 'getConversationListByTag' | 'getUnreadCountByTag' | 'getUntaggedConversationListByPage' | 'batchSetConversationTranslateStrategy' | 'modifyMessageWithParams' | 'refreshReferenceMessageWithParams' | 'batchDeleteConversations' | 'sendReadReceiptV2' | 'syncRemoteConversations' | 'sendUltraGroupTypingStatus' | 'getUltraGroupList' | 'getRemoteMessagesByUIds' | 'getUGUnreadMentionedDigest' | 'getHistoryMessagesByObjectNames' | 'getContinuousMessages' | 'getMessagesAroundTimestamp' | 'deleteLocalUGMessagesForAllChannel' | 'updateUGMessageExpansion' | 'setUGDefaultNotificationLevel' | 'getUGDefaultNotificationLevel' | 'getUnreadMentionedMessages' | 'getUnreadMentionedCount' | 'getAllUnreadMentionedCount' | 'getTotalUnreadCountByLevels' | 'getConversationUnreadCount' | 'getFirstUnreadMessage' | 'getFirstUnreadMessageDigest' | 'getUGUnreadCountForAllChannels' | 'getUGUnreadInfoList' | 'getUGFirstUnreadMessageDigest' | 'getConversations' | 'clearConversationUnreadCount' | 'getTopConversationList' | 'getUnreadConversationList' | 'getConversationListByPageIndex' | 'getAllConversationList' | 'getConversationListByTimestamp' | 'clearConversations' | 'getBlockedConversationList' | 'getBlockedUGList' | 'saveEditedMessageDraft' | 'getEditedMessageDraft' | 'clearEditedMessageDraft' | 'getUnreadMentionMeConversationList'> {
14572
+ interface IChatService extends Pick<IIPCMethods, 'getTotalUnreadCount' | 'getConversation' | 'batchSetConversationToTop' | 'batchSetConversationNotificationLevel' | 'getConversationNotificationLevel' | 'setConversationTypeNotificationLevel' | 'getConversationTypeNotificationLevel' | 'clearAllSGUnreadCount' | 'deleteRemoteMessage' | 'deleteRemoteMessageByTimestamp' | 'batchClearRemoteHistoryMessages' | 'sendReadReceiptResponseV5' | 'getMessageReadReceiptInfoV5ByIdentifiers' | 'getMessagesReadReceiptUsersByPageV5' | 'getMessagesReadReceiptByUsersV5' | 'searchConversationByContent' | 'requestSpeechToTextForMessage' | 'setMessageSpeechToTextVisible' | 'addTagForConversations' | 'getTagsForConversation' | 'setConversationStatusInTag' | 'removeTagForConversations' | 'removeTagsForConversation' | 'getConversationListByTag' | 'getUnreadCountByTag' | 'getUntaggedConversationListByPage' | 'batchSetConversationTranslateStrategy' | 'modifyMessageWithParams' | 'refreshReferenceMessageWithParams' | 'batchDeleteConversations' | 'sendReadReceiptV2' | 'syncRemoteConversations' | 'sendUltraGroupTypingStatus' | 'getUltraGroupList' | 'getRemoteMessagesByUIds' | 'getUGUnreadMentionedDigest' | 'getHistoryMessagesByObjectNames' | 'getContinuousMessages' | 'getMessagesAroundTimestamp' | 'deleteLocalUGMessagesForAllChannel' | 'updateUGMessageExpansion' | 'setUGDefaultNotificationLevel' | 'getUGDefaultNotificationLevel' | 'getUnreadMentionedMessages' | 'getUnreadMentionedCount' | 'getAllUnreadMentionedCount' | 'getTotalUnreadCountByLevels' | 'getConversationUnreadCount' | 'getFirstUnreadMessage' | 'getFirstUnreadMessageDigest' | 'getUGUnreadCountForAllChannels' | 'getUGUnreadInfoList' | 'getUGFirstUnreadMessageDigest' | 'getConversations' | 'clearConversationUnreadCount' | 'getTopConversationList' | 'getUnreadConversationList' | 'getConversationListByPageIndex' | 'getAllConversationList' | 'getConversationListByTimestamp' | 'clearConversations' | 'getBlockedConversationList' | 'getBlockedUGList' | 'saveEditedMessageDraft' | 'getEditedMessageDraft' | 'clearEditedMessageDraft' | 'getUnreadMentionMeConversationList' | 'sendUltraGroupTypingStatus' | 'updateConversationReadTime' | 'clearUnreadCountByTimestamp' | 'getMessageReader' | 'getMessageReadReceiptV4' | 'sendReadReceiptMessageV4'> {
14292
14573
  getRealtimeConversations(count: number, startTime: number, order: 0 | 1): Promise<RCResult<IReceivedConversation[]>>;
14293
14574
  getRealtimeConTotalUnreadCount(): Promise<RCResult<number>>;
14294
14575
  clearRealtimeConUnreadCount(identifier: IConversationIdentifier): Promise<RCResult>;
14295
14576
  removeRealtimeConversations(identifiers: IConversationIdentifier[]): Promise<RCResult>;
14296
14577
  batchGetRealtimeConUnreadCount(identifiers: IConversationIdentifier[]): Promise<RCResult<IConversationUnreadCount[]>>;
14578
+ /**
14579
+ * 批量获取消息已读回执信息,暂仅支持群聊 (V4)
14580
+ */
14581
+ batchGetMessageReadReceiptInfoV4(conversation: IConversationIdentifier, messageUIds: string[]): Promise<RCResult<IGroupReadReceiptData[]>>;
14297
14582
  }
14298
14583
 
14299
14584
  declare class ChatModule extends BaseModule {
@@ -14303,6 +14588,60 @@ declare class ChatModule extends BaseModule {
14303
14588
  saveEditedMessageDraft(draft: IEditedMessageDraft, identifier: IConversationIdentifier): Promise<RCResult>;
14304
14589
  getEditedMessageDraft(identifier: IConversationIdentifier): Promise<RCResult<IEditedMessageDraft | null>>;
14305
14590
  clearEditedMessageDraft(identifier: IConversationIdentifier): Promise<RCResult>;
14591
+ /**
14592
+ * 超级群正在输入中
14593
+ * @param identifier 会话标识
14594
+ */
14595
+ sendUltraGroupTypingStatus(identifier: IConversationIdentifier): Promise<RCResult>;
14596
+ /**
14597
+ * 发送单群聊输入状态中状态消息
14598
+ * @param identifier 会话标识
14599
+ * @param typingContentType 输入状态消息类型
14600
+ */
14601
+ sendTypingStatus(identifier: IConversationIdentifier, typingContentType: string): Promise<RCResult<IReceivedMessage>>;
14602
+ /**
14603
+ * 多端未读数同步
14604
+ * @param identifier 会话标识
14605
+ * @param timestamp 同步时间戳
14606
+ */
14607
+ sendSyncReadStatusMessage(identifier: IConversationIdentifier, timestamp: number): Promise<RCResult>;
14608
+ clearUnreadCountByTimestamp(identifier: IConversationIdentifier, timestamp: number): Promise<RCResult>;
14609
+ /**
14610
+ * 发送群已读回执请求(v1 版本)
14611
+ * @param identifier 会话标识
14612
+ * @param messageUId 消息 UID
14613
+ * @returns
14614
+ */
14615
+ sendReadReceiptRequest(identifier: IConversationIdentifier, messageUId: string): Promise<RCResult>;
14616
+ /**
14617
+ * 发送单聊已读回执
14618
+ * @param identifier 会话标识
14619
+ * @param messageUId 消息 UID
14620
+ * @param timestamp 消息发送时间
14621
+ */
14622
+ sendReadReceiptMessage(identifier: IConversationIdentifier, messageUId: string, timestamp: number): Promise<RCResult>;
14623
+ /**
14624
+ * 发送群组消息已读回执
14625
+ * @description 根据导航开关配置确定发送 v1 或 v2 版本;不支持处理其他已读回执版本
14626
+ * @param identifier 会话标识
14627
+ * @param messageList 消息列表
14628
+ */
14629
+ sendReadReceipt(identifier: IConversationIdentifier, messageList: Record<string, string[]>): Promise<RCResult>;
14630
+ /**
14631
+ * 获取群组消息已读列表(V2)
14632
+ * @param targetId
14633
+ * @param messageUId
14634
+ */
14635
+ getMessageReader(targetId: string, messageUId: string, channelId?: string): Promise<RCResult<IMessageReaderResponse>>;
14636
+ /**
14637
+ * 发送已读回执 (V4)
14638
+ */
14639
+ sendReadReceiptMessageV4(conversation: IConversationIdentifier, endMsgUid: string, startMsgUid?: string): Promise<RCResult>;
14640
+ /**
14641
+ * 获取消息已读回执列表,暂仅支持群聊 (V4)
14642
+ */
14643
+ getMessageReadReceiptV4(conversation: IConversationIdentifier, messageUId: string): Promise<RCResult<IMessageReadReceiptV4Response>>;
14644
+ batchGetMessageReadReceiptInfoV4(conversation: IConversationIdentifier, messageUIds: string[]): Promise<RCResult<IGroupReadReceiptData[]>>;
14306
14645
  }
14307
14646
 
14308
14647
  declare class APIContext {
@@ -14334,6 +14673,7 @@ declare class APIContext {
14334
14673
  readonly sse: SSEModule;
14335
14674
  readonly chatroom: ChatroomModule;
14336
14675
  readonly chat: ChatModule;
14676
+ readonly dataHosting: DataHosting;
14337
14677
  private _versionInfo;
14338
14678
  private _typingInfo;
14339
14679
  /**
@@ -14507,22 +14847,9 @@ declare class APIContext {
14507
14847
  private checkAuthed;
14508
14848
  get token(): string;
14509
14849
  refetchNaviInfo(): IPromiseResult<INaviInfo | null>;
14510
- /**
14511
- * 建立连接,连接失败则抛出异常,连接成功后返回用户 userId,否则返回相应的错误码
14512
- * @param token
14513
- * @param refreshNavi 是否需要重新请求导航,当值为 `false` 时,优先使用有效缓存导航,若缓存失效则重新获取导航
14514
- * @param reconnectKickEnable 设置断线重连时是否踢出当前正在重连的设备 (仅 Electron 环境有效)
14515
- * 同一个账号在一台新设备上登录的时候,会把这个账号在之前登录的设备上踢出。
14516
- 由于 SDK 有断线重连功能,存在下面情况。
14517
- 用户在 A 设备登录,A 设备网络不稳定,没有连接成功,SDK 启动重连机制。
14518
- 用户此时又在 B 设备登录,B 设备连接成功。
14519
- A 设备网络稳定之后,用户在 A 设备连接成功,B 设备被踢出。
14520
- 这个字段就是为这种情况加的。
14521
- 设置 reconnectKickEnable 为 true 时,SDK 重连的时候发现此时已有别的设备连接成功,不再强行踢出已有设备,而是踢出重连设备。
14522
- */
14523
- connect(token: string, reconnectKickEnable: boolean, traceId: string): Promise<IConnectResult>;
14850
+ connect(token: string, reconnectKickEnable: boolean): Promise<RCResult<string>>;
14524
14851
  disconnect(closeDB?: boolean, disablePush?: boolean): Promise<void>;
14525
- reconnect(reconnectKickEnable?: boolean): Promise<IConnectResult>;
14852
+ reconnect(reconnectKickEnable?: boolean): Promise<RCResult<string>>;
14526
14853
  /**
14527
14854
  * 超级群 channelId 转换
14528
14855
  * @param type 会话类型
@@ -14549,19 +14876,21 @@ declare class APIContext {
14549
14876
  */
14550
14877
  registerRTCSignalingListener(listener?: (buffer: Uint8Array) => void): void;
14551
14878
  /**
14552
- * 降低圈复杂度 - 将扩展验证的结果抽离
14553
- * @param expansion
14879
+ * 内部发送消息,日志记录不同于 sendMessage
14880
+ * @param identifier 会话标识
14881
+ * @param options 消息发送配置
14882
+ * @param traceId 追踪 ID
14883
+ * @param onBefore 消息发送之前的回调,用于返回消息的 messageId
14554
14884
  */
14555
- private _handleExpansioResult;
14885
+ innerSendMessage(identifier: IConversationIdentifier, options: IMessageSendOptions, onBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
14556
14886
  /**
14557
14887
  * 发送消息
14558
- * @param conversationType
14559
- * @param targetId
14560
- * @param objectName
14561
- * @param content
14562
- * @param options
14888
+ * @param identifier 会话标识
14889
+ * @param options 消息发送配置
14890
+ * @param traceId 追踪 ID
14891
+ * @param onBefore 消息发送之前的回调,用于返回消息的 messageId
14563
14892
  */
14564
- sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, traceId: string, onBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
14893
+ sendMessage(identifier: IConversationIdentifier, options: IMessageSendOptions, onBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
14565
14894
  /**
14566
14895
  * 更新消息拓展
14567
14896
  * @param expansion 拓展数据
@@ -14581,14 +14910,6 @@ declare class APIContext {
14581
14910
  * Web 历史版本中提供了超级群的消息拓展全删能力,需向前兼容,因此保留该接口;底层能力全支持,目前暂不开放。
14582
14911
  */
14583
14912
  removeAllMessageExpansion(attrs: IMessageAttrsForUpdateExpansion): Promise<RCResult>;
14584
- /**
14585
- * 发送群组消息已读回执,根据导航开关配置确定发送 v1 或 v2 版本;不支持处理其他已读回执版本
14586
- * @param targetId 群组会话 Id
14587
- * @param messageList 消息列表
14588
- * @param channelId 频道 Id
14589
- * @returns
14590
- */
14591
- sendReadReceipt(targetId: string, messageList: Record<string, string[]>, channelId?: string): Promise<RCResult>;
14592
14913
  /**
14593
14914
  * 发送群组消息已读回执 V2
14594
14915
  * 导航下发已读回执开关为 true 时调用
@@ -14597,29 +14918,6 @@ declare class APIContext {
14597
14918
  * @param channelId 频道 Id
14598
14919
  */
14599
14920
  sendReadReceiptV2(targetId: string, messageUIds: string[], channelId?: string, traceId?: string): Promise<RCResult>;
14600
- /**
14601
- * 获取群组消息已读列表
14602
- * 已读回执目前 3 个版本 有 naviInfo.grpRRVer 字段区分。
14603
- * 0:为目前有公有先支持版本,调用 sendReadReceiptResponseV2
14604
- * 1. 为 v2 版本,仅供 beem 使用目前公有云已废弃
14605
- * 3. 为 v4 版本,目前仅海外 IMkit 使用
14606
- * @param targetId
14607
- * @param messageUIds
14608
- */
14609
- getMessageReader(targetId: string, messageUId: string, channelId?: string): Promise<IAsyncRes<IMessageReaderResponse>>;
14610
- /**
14611
- * 发送已读回执 (V4)
14612
- */
14613
- sendReadReceiptMessageV4(conversation: IConversationOption, startMsgUid: string, endMsgUid: string): Promise<IAsyncRes>;
14614
- /**
14615
- * 获取消息已读回执列表,暂仅支持群聊 (V4)
14616
- */
14617
- getMessageReadReceiptV4(conversation: IConversationOption, messageUid: string): IPromiseResult<IMessageReadReceiptV4Response>;
14618
- batchGetMessageReadReceiptInfoV4(conversation: IConversationOption, messageUIds: string[]): IPromiseResult<IGroupReadReceiptData[]>;
14619
- /**
14620
- * 多端同步会话的已读时间(V4)
14621
- */
14622
- updateConversationReadTime(conversation: IConversationOption, timestamp: number): Promise<IAsyncRes>;
14623
14921
  /**
14624
14922
  * 反初始化,清空所有监听及计时器
14625
14923
  */
@@ -14736,8 +15034,6 @@ declare class APIContext {
14736
15034
  /**
14737
15035
  * 撤回消息
14738
15036
  * @param conversation 会话信息
14739
- * @param messageUId
14740
- * @param sentTime - 目前公有云已撤回消息已不再依赖消息的发送时间,私有云因存在一些老客户服务版本过旧,暂时仍需发送该参数
14741
15037
  * @param recallMsgOptions
14742
15038
  * @returns
14743
15039
  */
@@ -14771,10 +15067,10 @@ declare class APIContext {
14771
15067
  * 3. 上传结束前调用,此时 `httpMethod` 值应为 `POST`,`queryString` 值为 `uploadId={uploadId}`
14772
15068
  * @returns
14773
15069
  */
14774
- getFileToken(fileType: FileType, fileName?: string, httpMethod?: 'POST' | 'PUT', queryString?: string, url?: string, size?: number): Promise<IUploadAuth & {
15070
+ getFileToken(fileType: FileType, fileName?: string, httpMethod?: 'POST' | 'PUT', queryString?: string, url?: string, size?: number): Promise<RCResult<IUploadAuth & {
14775
15071
  qiniu: string;
14776
15072
  ossConfig: string;
14777
- }>;
15073
+ }>>;
14778
15074
  /**
14779
15075
  * 获取 七牛、阿里云上传后的可下载 URL
14780
15076
  * @param fileType 文件类型
@@ -14851,11 +15147,6 @@ declare class APIContext {
14851
15147
  * 获取所有群聊会话 @ 消息未读数,不包含超级群会话
14852
15148
  */
14853
15149
  getAllUnreadMentionedCount(): Promise<RCResult<number>>;
14854
- /**
14855
- * 超级群正在输入中
14856
- * @param options
14857
- */
14858
- sendUltraGroupTypingStatus(options: IConversationOption): Promise<RCResult>;
14859
15150
  /**
14860
15151
  * 根据消息 ID 查询消息列表
14861
15152
  * @param options
@@ -14895,34 +15186,31 @@ declare class APIContext {
14895
15186
  * 获取应用主进程信息,仅限 Electron 平台可用
14896
15187
  */
14897
15188
  getMainProcessInfo(): IPromiseResult<IProcessInfo>;
14898
- setCallInfo(targetId: string, key: string, value: string): Promise<IAsyncRes<{
15189
+ setCallInfo(targetId: string, key: string, value: string): Promise<RCResult<{
14899
15190
  key: string;
14900
15191
  value: string;
14901
15192
  }>>;
14902
- private _isEnableSubDriven;
15193
+ private _validateSubDriven;
14903
15194
  /**
14904
15195
  * 订阅用户状态事件
14905
15196
  */
14906
- subscribeUser(userIds: string[], subscribeType: SubscribeType, expiry: number): Promise<IAsyncRes<string[]>>;
15197
+ subscribeUser(userIds: string[], subscribeType: SubscribeType, expiry: number): Promise<RCResult<string[]>>;
14907
15198
  /**
14908
15199
  * 取消订阅用户状态事件
14909
15200
  */
14910
- unSubscribeUser(userIds: string[], subscribeType: SubscribeType): Promise<IAsyncRes<void>>;
15201
+ unSubscribeUser(userIds: string[], subscribeType: SubscribeType): Promise<RCResult>;
14911
15202
  /**
14912
15203
  * 获取已订阅列表
14913
15204
  */
14914
- getSubscribeUserList(subscribeType: SubscribeType, count: number, offset: number): Promise<IAsyncRes<ISubscribeUserStatusInfo[]>>;
15205
+ getSubscribeUserList(subscribeType: SubscribeType, count: number, offset: number): Promise<RCResult<ISubscribeUserStatusInfo[]>>;
14915
15206
  /**
14916
15207
  * 获取指定用户的在线状态
14917
15208
  */
14918
15209
  getSubscribeUserStatus(subscribeType: SubscribeType, userIds: string[]): Promise<RCResult<ISubscribeUserStatusInfo[]>>;
14919
15210
  getSubscribeUsersOnlineStatus(userIds: string[]): Promise<RCResult<ISubscribeUserOnlineStatus[]>>;
14920
- updateMyUserProfile(profile: IUserProfileInfo): Promise<IAsyncRes<IUpdateMyProfileFail>>;
15211
+ updateMyUserProfile(profile: IUserProfileInfo): Promise<RCResult<IUpdateMyProfileFail>>;
14921
15212
  getUserProfiles(userIds: string[]): Promise<RCResult<IUserProfileInfo[]>>;
14922
- getMyUserProfile(): Promise<IAsyncRes<IUserProfileInfo>>;
14923
- updateMyUserProfileVisibility(visibility: UserProfileVisibility): Promise<IAsyncRes>;
14924
- getMyUserProfileVisibility(): Promise<IAsyncRes<UserProfileVisibility>>;
14925
- searchUserProfileByUniqueId(uniqueId: string): Promise<IAsyncRes<IUserProfileInfo>>;
15213
+ getMyUserProfile(): Promise<RCResult<IUserProfileInfo>>;
14926
15214
  /**
14927
15215
  * 删除所有会话,目前仅 v2 提供
14928
15216
  */
@@ -14935,20 +15223,20 @@ declare class APIContext {
14935
15223
  }, listener: Function): void;
14936
15224
  /**
14937
15225
  * 添加用户黑名单
14938
- */
14939
- addToBlacklist(userId: string): Promise<ErrorCode>;
15226
+ */
15227
+ addToBlacklist(userId: string): Promise<RCResult>;
14940
15228
  /**
14941
15229
  * 将指定用户移除黑名单
14942
15230
  */
14943
- removeFromBlacklist(userId: string): Promise<ErrorCode>;
15231
+ removeFromBlacklist(userId: string): Promise<RCResult>;
14944
15232
  /**
14945
15233
  * 获取黑名单列表
14946
15234
  */
14947
- getBlacklist(): Promise<IAsyncRes<string[]>>;
15235
+ getBlacklist(): Promise<RCResult<string[]>>;
14948
15236
  /**
14949
15237
  * 获取指定人员在黑名单中的状态
14950
15238
  */
14951
- getBlacklistStatus(userId: string): Promise<IAsyncRes<number>>;
15239
+ getBlacklistStatus(userId: string): Promise<RCResult<number>>;
14952
15240
  /**
14953
15241
  * 向本地插入一条消息,不发送到服务器
14954
15242
  */
@@ -14991,11 +15279,11 @@ declare class APIContext {
14991
15279
  /**
14992
15280
  * 设置消息发送状态
14993
15281
  */
14994
- setMessageSentStatus(messageId: number, sentStatus: number): Promise<ErrorCode>;
15282
+ setMessageSentStatus(messageId: number, sentStatus: number): Promise<RCResult>;
14995
15283
  /**
14996
15284
  * 设置消息接收状态
14997
15285
  */
14998
- setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<ErrorCode>;
15286
+ setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<RCResult>;
14999
15287
  /**
15000
15288
  * 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
15001
15289
  */
@@ -15014,11 +15302,11 @@ declare class APIContext {
15014
15302
  * 获取用户在线状态
15015
15303
  * @deprecated 老版 V2 中用到
15016
15304
  */
15017
- getUserStatus(userId: string): Promise<IAsyncRes<{
15305
+ getUserStatus(userId: string): Promise<RCResult<{
15018
15306
  status: string;
15019
15307
  }>>;
15020
15308
  searchConversationByContent(keyword: string, messageTypes?: string[], channelId?: string, conversationTypes?: ConversationType[]): Promise<RCResult<IReceivedConversation[]>>;
15021
- searchConversationByContentWithAllChannel(keyword: string, messageTypes?: string[], conversationTypes?: ConversationType[]): Promise<IAsyncRes<IReceivedConversation[]>>;
15309
+ searchConversationByContentWithAllChannel(keyword: string, messageTypes?: string[], conversationTypes?: ConversationType[]): Promise<RCResult<IReceivedConversation[]>>;
15022
15310
  /**
15023
15311
  * 单会话搜索,为兼容老版本参数校验错误码和校验规则
15024
15312
  * @param conversation
@@ -15034,7 +15322,6 @@ declare class APIContext {
15034
15322
  searchMessagesWithParams(params: ISearchMessageParams): Promise<RCResult<ISearchMessagesResult>>;
15035
15323
  getMessagesAroundTimestamp(conversation: IConversationOption, timestamp: number, beforeCount: number, afterCount: number): Promise<RCResult<IReceivedMessage[]>>;
15036
15324
  getUnreadMentionedMessages(conversation: IConversationOption): Promise<RCResult<IReceivedMessage[]>>;
15037
- clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<ErrorCode>;
15038
15325
  /**
15039
15326
  * 查询指定超级群默认通知配置
15040
15327
  */
@@ -15063,68 +15350,21 @@ declare class APIContext {
15063
15350
  /**
15064
15351
  * 设置融云消息重排开关
15065
15352
  */
15066
- setCheckDuplicateMessage(enableCheck: boolean): Promise<IAsyncRes<boolean>>;
15067
- rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<{
15068
- code: ErrorCode;
15069
- buffer?: Uint8Array;
15070
- }>;
15071
- rtcPing(roomId: string, mode: number, mediaType?: number): Promise<IAsyncRes<any>>;
15353
+ setCheckDuplicateMessage(enableCheck?: boolean): Promise<RCResult<boolean>>;
15354
+ rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<RCResult<Uint8Array>>;
15355
+ rtcPing(roomId: string, mode: number, mediaType?: number): Promise<RCResult<any>>;
15072
15356
  /**
15073
15357
  * 设置代理
15074
15358
  */
15075
- setProxy(proxy: IProxy | null): IPromiseResult<IProxy>;
15359
+ setProxy(proxy: IProxy | null): Promise<RCResult>;
15076
15360
  /**
15077
15361
  * 获取代理
15078
15362
  */
15079
- getProxy(): IPromiseResult<IProxy>;
15363
+ getProxy(): Promise<RCResult<IProxy>>;
15080
15364
  /**
15081
15365
  * 测试代理
15082
15366
  */
15083
- testProxy(proxy: IProxy, testHost: string): Promise<IResponse>;
15084
- createGroup(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
15085
- [key: string]: string;
15086
- } | undefined, inviteeUserIds?: string[]): Promise<IAsyncRes<ICreateGroupFail>>;
15087
- updateGroupInfo(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
15088
- [key: string]: string;
15089
- } | undefined): Promise<IAsyncRes<IErrorKeys>>;
15090
- getGroupsInfo(groupIds: string[]): Promise<IAsyncRes<IGroupInfo[]>>;
15091
- kickGroupMembers(groupId: string, userIds: string[], config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
15092
- quitGroup(groupId: string, config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
15093
- dismissGroup(groupId: string): Promise<IAsyncRes<void>>;
15094
- transferGroupOwner(groupId: string, newOwnerId: string, config: IQuitGroupConfig, quitGroupAfterTransfer?: boolean): Promise<IAsyncRes<void>>;
15095
- setGroupManagers(type: GroupOperationType, groupId: string, userIds: string[]): Promise<IAsyncRes<void>>;
15096
- getGroupMembersByRole(groupId: string, role: GroupMemberRole, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupMemberInfo>>>;
15097
- getGroupMembers(groupId: string, userIds: string[]): Promise<IAsyncRes<IGroupMemberInfo[]>>;
15098
- setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra?: string): Promise<IAsyncRes<IErrorKeys>>;
15099
- searchGroupMembers(groupId: string, nickName: string, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupMemberInfo>>>;
15100
- joinGroup(groupId: string): Promise<IAsyncRes<IProcessCode>>;
15101
- inviteUsersToGroup(groupId: string, userIds: string[]): Promise<IAsyncRes<IProcessCode>>;
15102
- acceptGroupInvite(groupId: string, inviterId: string): Promise<IAsyncRes<IProcessCode>>;
15103
- refuseGroupInvite(groupId: string, inviterId: string, reason: string): Promise<IAsyncRes<IProcessCode>>;
15104
- acceptGroupApplication(groupId: string, joinUserId: string, inviterId: string): Promise<IAsyncRes<IProcessCode>>;
15105
- refuseGroupApplication(groupId: string, joinUserId: string, inviterId: string, reason?: string): Promise<IAsyncRes<IProcessCode>>;
15106
- getGroupApplications(option: IPagingQueryOption, directions?: GroupApplicationDirection[], status?: GroupApplicationStatus[]): Promise<IAsyncRes<IPagingQueryResult<IGroupApplicationInfo>>>;
15107
- getJoinedGroupsByRole(role: GroupMemberRole, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupInfo>>>;
15108
- searchJoinedGroups(groupName: string, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupInfo>>>;
15109
- getJoinedGroups(groupIds: string[]): Promise<IAsyncRes<IGroupInfo[]>>;
15110
- setGroupRemark(groupId: string, remark: string | null): Promise<IAsyncRes<void>>;
15111
- addGroupFollows(groupId: string, userIds: string[]): Promise<IAsyncRes<void>>;
15112
- removeGroupFollows(groupId: string, userIds: string[]): Promise<IAsyncRes<void>>;
15113
- getGroupFollows(groupId: string): Promise<IAsyncRes<IFollowsInfo[]>>;
15114
- addFriend(userId: string, directionType: DirectionType, extra: string): Promise<IAsyncRes<IProcessCode>>;
15115
- deleteFriends(userIds: string[], directionType: DirectionType): Promise<IAsyncRes<void>>;
15116
- acceptFriendApplication(userId: string): Promise<IAsyncRes<void>>;
15117
- refuseFriendApplication(userId: string, reason: string): Promise<IAsyncRes<void>>;
15118
- setFriendInfo(userId: string, remark: string, extProfile: {
15119
- [key: string]: string;
15120
- }): Promise<IAsyncRes<IErrorKeys>>;
15121
- checkFriends(userIds: string[], directionType: DirectionType): Promise<IAsyncRes<IFriendRelationInfo[]>>;
15122
- getFriends(directionType: QueryFriendsDirectionType, option: IPagingQueryOption | undefined): Promise<IAsyncRes<IPagingQueryResult<IFriendInfo>>>;
15123
- getFriendApplications(option: IPagingQueryOption, type?: FriendApplicationType[], status?: FriendApplicationStatus[]): Promise<IAsyncRes<IPagingQueryResult<IFriendApplicationInfo>>>;
15124
- getFriendsInfo(userIds: string[]): Promise<IAsyncRes<IFriendInfo[]>>;
15125
- searchFriendsInfo(nickname: string): Promise<IAsyncRes<IFriendInfo[]>>;
15126
- setFriendAddPermission(permission: FriendAddPermission): Promise<IAsyncRes<void>>;
15127
- getFriendAddPermission(): Promise<IAsyncRes<FriendAddPermission>>;
15367
+ testProxy(proxy: IProxy, testHost: string): Promise<RCResult>;
15128
15368
  /**
15129
15369
  * 查询实时会话列表
15130
15370
  */
@@ -15206,7 +15446,7 @@ declare class RTCPluginContext extends PluginContext {
15206
15446
  * rtc 房间保活
15207
15447
  * 新版本 rtc ping 返回值增加 version 信息
15208
15448
  */
15209
- rtcPingResVersion(roomId: string, mode: number, broadcastType?: number): Promise<IAsyncRes<any>>;
15449
+ rtcPingResVersion(roomId: string, mode: number, broadcastType?: number): Promise<RCResult<any>>;
15210
15450
  /**
15211
15451
  * @deprecated 兼容 rtc v3 方法调用
15212
15452
  */
@@ -15385,7 +15625,7 @@ declare class RTCPluginContext extends PluginContext {
15385
15625
  */
15386
15626
  declare type IUserSettingsModule = Pick<IIPCMethods, 'setTranslationLanguage' | 'getTranslationLanguage' | 'setAutoTranslateEnabled' | 'getAutoTranslateEnabled'>;
15387
15627
 
15388
- declare type IIPCMethodsInEngine = Pick<IIPCMethods, 'searchMessagesWithParams' | 'createTag' | 'removeTag' | 'updateTag' | 'getTagList' | 'translateWithParams' | 'getFileUrl' | 'saveTextMessageDraft' | 'getTextMessageDraft' | 'clearTextMessageDraft' | 'getHistoryMessage' | 'clearLocalMessages' | 'deleteLocalMessages' | 'deleteLocalMessagesByTimestamp' | 'batchClearLocalMessagesByTimestamp' | 'insertMessage' | 'batchInsertMessage' | 'setMessageContent' | 'getLocalMessageCount' | 'recallMsg' | 'getSubscribeUsersOnlineStatus' | 'getSubscribeUserStatus' | 'getUserProfiles'>;
15628
+ declare type IIPCMethodsInEngine = Pick<IIPCMethods, 'searchMessagesWithParams' | 'createTag' | 'removeTag' | 'updateTag' | 'getTagList' | 'translateWithParams' | 'getFileUrl' | 'saveTextMessageDraft' | 'getTextMessageDraft' | 'clearTextMessageDraft' | 'getHistoryMessage' | 'clearLocalMessages' | 'deleteLocalMessages' | 'deleteLocalMessagesByTimestamp' | 'batchClearLocalMessagesByTimestamp' | 'insertMessage' | 'batchInsertMessage' | 'setMessageContent' | 'getLocalMessageCount' | 'recallMsg' | 'getSubscribeUsersOnlineStatus' | 'getSubscribeUserStatus' | 'subscribeUser' | 'unSubscribeUser' | 'getSubscribeUserList' | 'getUserProfiles' | 'getMyUserProfile' | 'updateMyUserProfile' | 'sendMessage' | 'connect' | 'disconnect' | 'addToBlacklist' | 'removeFromBlacklist' | 'getBlacklist' | 'getBlacklistStatus' | 'setMessageReceivedStatus' | 'setMessageSentStatus' | 'setCheckDuplicateMessage' | 'setProxy' | 'getProxy' | 'testProxy' | 'setUserStatusListener' | 'getFileToken' | 'rtcSignaling' | 'rtcPing' | 'setCallInfo' | 'getUserStatus' | 'searchConversationByContentWithAllChannel'>;
15389
15629
  declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContext {
15390
15630
  protected readonly rtcCodec: Codec<InnerRTCKeyMaps>;
15391
15631
  protected readonly _watcher: IEngineWatcher;
@@ -15402,6 +15642,9 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
15402
15642
  */
15403
15643
  abstract get chat(): IChatService;
15404
15644
  abstract get chatroom(): IChatroomService;
15645
+ /**
15646
+ * 用户级配置模块
15647
+ */
15405
15648
  abstract get userSettings(): IUserSettingsModule;
15406
15649
  abstract get naviInfo(): INaviInfo | null;
15407
15650
  get appkey(): string;
@@ -15409,6 +15652,11 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
15409
15652
  abstract get connectionStatus(): RCConnectionStatus;
15410
15653
  abstract get userId(): string;
15411
15654
  get logger(): BasicLogger;
15655
+ abstract get usingCppEngine(): boolean;
15656
+ /**
15657
+ * 用户信息托管模块
15658
+ */
15659
+ abstract get dataHosting(): IDataHostingService;
15412
15660
  /**
15413
15661
  * 引擎初始化
15414
15662
  * @param _appkey
@@ -15435,7 +15683,7 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
15435
15683
  * @param openCallPlus
15436
15684
  * @param traceId
15437
15685
  */
15438
- abstract connect(token: string, reconnectKickEnable: boolean, openCallPlus: boolean, traceId: string): IPromiseResult<string>;
15686
+ abstract connect(token: string, reconnectKickEnable: boolean, openCallPlus: boolean, traceId: string): Promise<RCResult<string>>;
15439
15687
  /**
15440
15688
  * 发送 SDK 版本
15441
15689
  * @param versionInfo
@@ -15457,33 +15705,14 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
15457
15705
  * 清除指定会话消息草稿
15458
15706
  */
15459
15707
  abstract clearTextMessageDraft(conversation: IConversationOption): Promise<RCResult>;
15460
- abstract sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, traceId: string,
15461
- /**
15462
- * c++ 消息写库后存在自增 Id,必要时需要向业务层暴露,JSEngine 无需实现
15463
- */
15464
- onBefore?: (messageId: number) => void): IPromiseResult<IReceivedMessage>;
15465
- /**
15466
- * 获取群组消息已读列表
15467
- * @param targetId
15468
- * @param messageUIds
15469
- */
15470
- abstract getMessageReader(targetId: string, messageUId: string, channelId?: string): IPromiseResult<IMessageReaderResponse>;
15471
- /**
15472
- * 发送已读回执 (V4)
15473
- */
15474
- abstract sendReadReceiptMessageV4(conversation: IConversationOption, startMsgUid: string, endMsgUid: string): Promise<IAsyncRes>;
15475
15708
  /**
15476
- * 获取消息已读回执列表,暂仅支持群聊 (V4)
15477
- */
15478
- abstract getMessageReadReceiptV4(conversation: IConversationOption, messageUid: string): IPromiseResult<IMessageReadReceiptV4Response>;
15479
- /**
15480
- * 批量获取消息已读回执信息,暂仅支持群聊 (V4)
15481
- */
15482
- abstract batchGetMessageReadReceiptInfoV4(conversation: IConversationOption, messageUIds: string[]): IPromiseResult<IGroupReadReceiptData[]>;
15483
- /**
15484
- * 多端同步会话的已读时间 (V4)
15709
+ * 发送消息
15710
+ * @param identifier 会话标识
15711
+ * @param options 消息发送配置
15712
+ * @param traceId 追踪 ID
15713
+ * @param onBefore 消息发送之前的回调,用于返回消息的 messageId
15485
15714
  */
15486
- abstract updateConversationReadTime(conversation: IConversationOption, timestamp: number): Promise<IAsyncRes>;
15715
+ abstract sendMessage(identifier: IConversationIdentifier, options: IMessageSendOptions, traceId: string, onBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
15487
15716
  /**
15488
15717
  * 断开连接
15489
15718
  * @param closeDB 是否关闭数据库,默认为 true,仅 Electron 平台有效
@@ -15496,20 +15725,7 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
15496
15725
  * 消息注册需在应用初始化完成前进行,否则在搭配 C++ 协议栈使用时,本端发出的消息将不默认作为未知消息处理,不存储、不计数
15497
15726
  */
15498
15727
  abstract registerMessageType(objectName: string, desc: MessageRegisterParams): void;
15499
- /**
15500
- * 获取存储服务鉴权信息
15501
- * @param fileType 文件类型
15502
- * @param fileName 文件名称
15503
- * @param httpMethod STC 分段上传时的必填参数,有效值为 PUT | POST
15504
- * @param queryString STC 分段上传时的查询字符串
15505
- * @description
15506
- * `httpMethod` 与 `queryString` 为 STC S3 分段上传时的专属参数,STC 分段上传包含三个过程:
15507
- * 1. 开始分段前调用,此时 `httpMethod` 值应为 `POST`,`queryString` 值为 `uploads`
15508
- * 2. 上传请求前调用,此时 `httpMethod` 值应为 `PUT`,`queryString` 值为 `partNumber={partamNumer}&uploadId={uploadId}`
15509
- * 3. 上传结束前调用,此时 `httpMethod` 值应为 `POST`,`queryString` 值为 `uploadId={uploadId}`
15510
- * @returns
15511
- */
15512
- abstract getFileToken(fileType: FileType, fileName?: string, httpMethod?: string, queryString?: string, url?: string, size?: number): Promise<IAsyncRes<IUploadAuth>>;
15728
+ abstract getFileToken(fileType: FileType, fileName?: string, httpMethod?: string, queryUriString?: string, url?: string, size?: number): Promise<RCResult<IUploadAuth>>;
15513
15729
  /**
15514
15730
  * 获取文件的下载地址
15515
15731
  * @param fileType 文件类型
@@ -15558,7 +15774,7 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
15558
15774
  * @param targetId
15559
15775
  * @param options
15560
15776
  */
15561
- abstract sendUltraMessage(targetId: string, options: ISendMsgOptions, traceId: string, onSendBefore?: (messageId: number) => void): Promise<IAsyncRes<IReceivedMessage>>;
15777
+ abstract sendUltraMessage(identifier: IConversationIdentifier, options: IMessageSendOptions, traceId: string, onSendBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
15562
15778
  /**
15563
15779
  * 设置用户在线状态监听器
15564
15780
  */
@@ -15576,25 +15792,25 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
15576
15792
  /**
15577
15793
  * 获取用户状态
15578
15794
  */
15579
- abstract getUserStatus(userId: string): IPromiseResult<{
15795
+ abstract getUserStatus(userId: string): Promise<RCResult<{
15580
15796
  status: string;
15581
- }>;
15797
+ }>>;
15582
15798
  /**
15583
15799
  * 加入黑名单
15584
15800
  */
15585
- abstract addToBlacklist(userId: string): Promise<ErrorCode>;
15801
+ abstract addToBlacklist(userId: string): Promise<RCResult>;
15586
15802
  /**
15587
15803
  * 将指定用户移除黑名单
15588
15804
  */
15589
- abstract removeFromBlacklist(userId: string): Promise<ErrorCode>;
15805
+ abstract removeFromBlacklist(userId: string): Promise<RCResult>;
15590
15806
  /**
15591
15807
  * 获取黑名单列表
15592
15808
  */
15593
- abstract getBlacklist(): IPromiseResult<string[]>;
15809
+ abstract getBlacklist(): Promise<RCResult<string[]>>;
15594
15810
  /**
15595
15811
  * 获取指定人员在黑名单中的状态
15596
15812
  */
15597
- abstract getBlacklistStatus(userId: string): IPromiseResult<number>;
15813
+ abstract getBlacklistStatus(userId: string): Promise<RCResult<number>>;
15598
15814
  /**
15599
15815
  * 向本地插入一条消息,不发送到服务器
15600
15816
  */
@@ -15636,28 +15852,24 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
15636
15852
  /**
15637
15853
  * 通过关键字搜索所有会话
15638
15854
  */
15639
- abstract searchConversationByContentWithAllChannel(keyword: string, messageTypes: string[], conversationTypes: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
15855
+ abstract searchConversationByContentWithAllChannel(keyword: string, messageTypes: string[], conversationTypes: ConversationType[]): Promise<RCResult<IReceivedConversation[]>>;
15640
15856
  abstract searchMessagesWithParams(params: ISearchMessageParams): Promise<RCResult<ISearchMessagesResult>>;
15641
15857
  /**
15642
15858
  * 设置消息发送状态
15643
15859
  */
15644
- abstract setMessageSentStatus(messageId: number, sentStatus: number): Promise<ErrorCode>;
15860
+ abstract setMessageSentStatus(messageId: number, sentStatus: number): Promise<RCResult>;
15645
15861
  /**
15646
15862
  * 设置消息接收状态
15647
15863
  */
15648
- abstract setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<ErrorCode>;
15864
+ abstract setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<RCResult>;
15649
15865
  /**
15650
15866
  * 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
15651
15867
  */
15652
15868
  abstract updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<RCResult<boolean>>;
15653
- /**
15654
- * 删除时间戳前的未读数
15655
- */
15656
- abstract clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId: string): Promise<ErrorCode>;
15657
- abstract setCallInfo(targetId: string, key: string, value: string): IPromiseResult<{
15869
+ abstract setCallInfo(targetId: string, key: string, value: string): Promise<RCResult<{
15658
15870
  key: string;
15659
15871
  value: string;
15660
- }>;
15872
+ }>>;
15661
15873
  abstract clearLocalData(): Promise<RCResult<boolean>>;
15662
15874
  /**
15663
15875
  * 获取运行时的系统信息,仅限 Electron 平台可用
@@ -15674,7 +15886,7 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
15674
15886
  /**
15675
15887
  * 设置融云消息重排开关
15676
15888
  */
15677
- abstract setCheckDuplicateMessage(enableCheck: boolean): IPromiseResult<boolean>;
15889
+ abstract setCheckDuplicateMessage(enableCheck: boolean): Promise<RCResult<boolean>>;
15678
15890
  /**
15679
15891
  * RTC 通用调用接口
15680
15892
  * 在非 Comet 协议下,入参 sourceData 应为 ArrayBuffer 数据,返回结果为 Uint8Array 数据
@@ -15683,12 +15895,9 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
15683
15895
  * @param isQuery 使用 `qry` or `pub` 进行请求,按服务要求传递
15684
15896
  * @param sourceData PB 数据
15685
15897
  */
15686
- abstract rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: ArrayBuffer): Promise<{
15687
- code: ErrorCode;
15688
- buffer?: Uint8Array;
15689
- }>;
15690
- abstract rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<IAsyncRes<any>>;
15691
- pullRTCRoomEntry(roomId: string, _timestamp: number): Promise<IAsyncRes<number>>;
15898
+ abstract rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: ArrayBuffer): Promise<RCResult<Uint8Array>>;
15899
+ abstract rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<RCResult<any>>;
15900
+ pullRTCRoomEntry(roomId: string, _timestamp: number): Promise<RCResult<number>>;
15692
15901
  /**
15693
15902
  * 接收 rtc 资源变更
15694
15903
  */
@@ -15700,15 +15909,15 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
15700
15909
  /**
15701
15910
  * 设置代理
15702
15911
  */
15703
- abstract setProxy(proxy: IProxy | null): IPromiseResult<IProxy>;
15912
+ abstract setProxy(proxy: IProxy | null): Promise<RCResult>;
15704
15913
  /**
15705
15914
  * 获取代理
15706
15915
  */
15707
- abstract getProxy(): IPromiseResult<IProxy>;
15916
+ abstract getProxy(): Promise<RCResult<IProxy>>;
15708
15917
  /**
15709
15918
  * 测试代理
15710
15919
  */
15711
- abstract testProxy(proxy: IProxy, testHost: string): Promise<IResponse>;
15920
+ abstract testProxy(proxy: IProxy, testHost: string): Promise<RCResult>;
15712
15921
  /**
15713
15922
  * 设置当前网络
15714
15923
  */
@@ -15716,73 +15925,22 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
15716
15925
  /**
15717
15926
  * 订阅用户状态事件
15718
15927
  */
15719
- abstract subscribeUser(userIds: string[], subscribeType: SubscribeType, expiry: number): Promise<IAsyncRes<string[]>>;
15928
+ abstract subscribeUser(userIds: string[], subscribeType: SubscribeType, expiry: number): Promise<RCResult<string[]>>;
15720
15929
  /**
15721
15930
  * 取消订阅用户状态事件
15722
15931
  */
15723
- abstract unSubscribeUser(userIds: string[], subscribeType: SubscribeType): Promise<IAsyncRes<void>>;
15932
+ abstract unSubscribeUser(userIds: string[], subscribeType: SubscribeType): Promise<RCResult>;
15724
15933
  /**
15725
15934
  * 获取已订阅列表
15726
15935
  */
15727
- abstract getSubscribeUserList(subscribeType: SubscribeType, count: number, offset: number): Promise<IAsyncRes<ISubscribeUserStatusInfo[]>>;
15936
+ abstract getSubscribeUserList(subscribeType: SubscribeType, count: number, offset: number): Promise<RCResult<ISubscribeUserStatusInfo[]>>;
15728
15937
  /**
15729
15938
  * 获取指定用户的在线状态
15730
15939
  */
15731
15940
  abstract getSubscribeUserStatus(subscribeType: SubscribeType, userIds: string[]): Promise<RCResult<ISubscribeUserStatusInfo[]>>;
15732
- abstract updateMyUserProfile(profile: IUserProfileInfo): Promise<IAsyncRes<IUpdateMyProfileFail>>;
15941
+ abstract updateMyUserProfile(profile: IUserProfileInfo): Promise<RCResult<IUpdateMyProfileFail>>;
15733
15942
  abstract getUserProfiles(userIds: string[]): Promise<RCResult<IUserProfileInfo[]>>;
15734
- abstract getMyUserProfile(): Promise<IAsyncRes<IUserProfileInfo>>;
15735
- abstract updateMyUserProfileVisibility(visibility: UserProfileVisibility): Promise<IAsyncRes>;
15736
- abstract getMyUserProfileVisibility(): Promise<IAsyncRes<UserProfileVisibility>>;
15737
- abstract searchUserProfileByUniqueId(uniqueId: string): Promise<IAsyncRes<IUserProfileInfo>>;
15738
- abstract createGroup(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
15739
- [key: string]: string;
15740
- } | undefined, inviteeUserIds: string[]): Promise<IAsyncRes<ICreateGroupFail>>;
15741
- abstract updateGroupInfo(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
15742
- [key: string]: string;
15743
- } | undefined): Promise<IAsyncRes<IErrorKeys>>;
15744
- abstract getGroupsInfo(groupIds: string[]): Promise<IAsyncRes<IGroupInfo[]>>;
15745
- abstract kickGroupMembers(groupId: string, userIds: string[], config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
15746
- abstract quitGroup(groupId: string, config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
15747
- abstract dismissGroup(groupId: string): Promise<IAsyncRes<void>>;
15748
- abstract transferGroupOwner(groupId: string, newOwnerId: string, quitGroupAfterTransfer: boolean, config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
15749
- abstract setGroupManagers(type: GroupOperationType, groupId: string, userIds: string[]): Promise<IAsyncRes<void>>;
15750
- abstract getGroupMembersByRole(groupId: string, role: GroupMemberRole, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupMemberInfo>>>;
15751
- abstract getGroupMembers(groupId: string, userIds: string[]): Promise<IAsyncRes<IGroupMemberInfo[]>>;
15752
- abstract setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra?: string): Promise<IAsyncRes<IErrorKeys>>;
15753
- abstract searchGroupMembers(groupId: string, nickName: string, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupMemberInfo>>>;
15754
- abstract joinGroup(groupId: string): Promise<IAsyncRes<IProcessCode>>;
15755
- abstract inviteUsersToGroup(groupId: string, userIds: string[]): Promise<IAsyncRes<IProcessCode>>;
15756
- abstract memberInviteResponse(params: {
15757
- groupId: string;
15758
- inviterId: string;
15759
- optType: GroupOperationRole;
15760
- optResult: GroupOperationStatus;
15761
- joinUserId?: string;
15762
- reason?: string;
15763
- }): Promise<IAsyncRes<IProcessCode>>;
15764
- abstract getGroupApplications(option: IPagingQueryOption, directions?: GroupApplicationDirection[], status?: GroupApplicationStatus[]): Promise<IAsyncRes<IPagingQueryResult<IGroupApplicationInfo>>>;
15765
- abstract getJoinedGroupsByRole(role: GroupMemberRole, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupInfo>>>;
15766
- abstract searchJoinedGroups(groupName: string, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupInfo>>>;
15767
- abstract getJoinedGroups(groupIds: string[]): Promise<IAsyncRes<IGroupInfo[]>>;
15768
- abstract setGroupRemark(groupId: string, remark: string | null): Promise<IAsyncRes<void>>;
15769
- abstract setGroupFollows(optType: GroupOperationType, groupId: string, userIds: string[]): Promise<IAsyncRes<void>>;
15770
- abstract getGroupFollows(groupId: string): Promise<IAsyncRes<IFollowsInfo[]>>;
15771
- abstract addFriend(userId: string, directionType: DirectionType, extra: string): Promise<IAsyncRes<IProcessCode>>;
15772
- abstract deleteFriends(userIds: string[], directionType: DirectionType): Promise<IAsyncRes<void>>;
15773
- abstract acceptFriendApplication(userId: string): Promise<IAsyncRes<void>>;
15774
- abstract refuseFriendApplication(userId: string, reason: string): Promise<IAsyncRes<void>>;
15775
- abstract setFriendInfo(userId: string, remark: string, extProfile: {
15776
- [key: string]: string;
15777
- }): Promise<IAsyncRes<IErrorKeys>>;
15778
- abstract checkFriends(userIds: string[], directionType: DirectionType): Promise<IAsyncRes<IFriendRelationInfo[]>>;
15779
- abstract getFriends(directionType: QueryFriendsDirectionType, option: IPagingQueryOption | undefined): Promise<IAsyncRes<IPagingQueryResult<IFriendInfo>>>;
15780
- abstract getFriendApplications(option: IPagingQueryOption, type?: FriendApplicationType[], status?: FriendApplicationStatus[]): Promise<IAsyncRes<IPagingQueryResult<IFriendApplicationInfo>>>;
15781
- abstract deleteFriendApplication(userId: string, type: FriendApplicationType): Promise<IAsyncRes<void>>;
15782
- abstract getFriendsInfo(userIds: string[]): Promise<IAsyncRes<IFriendInfo[]>>;
15783
- abstract searchFriendsInfo(nickname: string): Promise<IAsyncRes<IFriendInfo[]>>;
15784
- abstract setFriendAddPermission(permission: FriendAddPermission): Promise<IAsyncRes<void>>;
15785
- abstract getFriendAddPermission(): Promise<IAsyncRes<FriendAddPermission>>;
15943
+ abstract getMyUserProfile(): Promise<RCResult<IUserProfileInfo>>;
15786
15944
  abstract setNotificationQuietHoursWithSetting(opts: INotificationQuietHoursSetting): Promise<RCResult>;
15787
15945
  abstract removeNotificationQuietHoursSetting(): Promise<RCResult>;
15788
15946
  abstract getNotificationQuietHoursSetting(): Promise<RCResult<INotificationQuietHoursSetting>>;
@@ -15855,107 +16013,6 @@ declare class SSEModule extends EventDispatcher<{
15855
16013
  requestStreamMessageContent(messageUId: string): Promise<RCResult>;
15856
16014
  }
15857
16015
 
15858
- interface IDataHostingModule {
15859
- }
15860
-
15861
- /**
15862
- * 错误码映射表,单个标签且对应唯一错误码
15863
- */
15864
- interface IErrorCodeKey {
15865
- 'set.proxy': number;
15866
- 'test.proxy': number;
15867
- 'test.proxy.socksHost': number;
15868
- 'test.proxy.socksPort': number;
15869
- channelId: number;
15870
- count: number;
15871
- startTime: number;
15872
- keyword: number;
15873
- messageTypes: number;
15874
- conversation: number;
15875
- conversationType: number;
15876
- targetId: number;
15877
- endTime: number;
15878
- offset: number;
15879
- limit: number;
15880
- userId: number;
15881
- timestamp: number;
15882
- sentTime: number;
15883
- order: number;
15884
- messageId: number;
15885
- receivedStatus: number;
15886
- receivedStatusInfo: number;
15887
- sentStatus: number;
15888
- content: number;
15889
- messageType: number;
15890
- messageIds: number;
15891
- typingContentType: number;
15892
- messageDirection: number;
15893
- canIncludeExpansion: number;
15894
- expansion: number;
15895
- disableNotification: number;
15896
- messages: number;
15897
- checkDuplicate: number;
15898
- messageUId: number;
15899
- key: number;
15900
- value: number;
15901
- isAutoDelete: number;
15902
- isSendNotification: number;
15903
- notificationExtra: number;
15904
- entries: number;
15905
- isForce: number;
15906
- rtcRoomId: number;
15907
- token: number;
15908
- conversations: number;
15909
- conversationTypes: number;
15910
- levels: number;
15911
- notificationLevel: number;
15912
- notificationLevels: number;
15913
- notificationStatus: number;
15914
- isTop: number;
15915
- isUpdateTime: number;
15916
- message: number;
15917
- isStatusMessage: number;
15918
- pushContent: number;
15919
- pushData: number;
15920
- isMentioned: number;
15921
- mentionedType: number;
15922
- mentionedUserIdList: number;
15923
- directionalUserIdList: number;
15924
- directedUserIds: number;
15925
- isVoipPush: number;
15926
- pushConfig: number;
15927
- startMsgUId: number;
15928
- endMsgUId: number;
15929
- clearMessageOption: number;
15930
- keys: number;
15931
- searchContent: number;
15932
- senderUserId: number;
15933
- tagId: number;
15934
- tagName: number;
15935
- tagIds: number;
15936
- containMuted: number;
15937
- channelType: number;
15938
- targetIds: number;
15939
- file: number;
15940
- fileType: number;
15941
- contentDisposition: number;
15942
- mediaUrl: number;
15943
- filename: number;
15944
- saveName: number;
15945
- serverType: number;
15946
- subscribeType: number;
15947
- expiry: number;
15948
- subscribeUserIds: number;
15949
- subscribePageSize: number;
15950
- conversationList: number;
15951
- conversationTypeNotSupport: number;
15952
- profile: number;
15953
- userProfileVisibility: number;
15954
- uniqueId: number;
15955
- extra: number;
15956
- disableUpdateLastMessage: number;
15957
- }
15958
-
15959
16016
  /**
15960
16017
  * 预定义的验证规则,只包含 `值类型` 数据验证
15961
16018
  * 引用类型数据需使用自定义 validator 校验函数进行校验
@@ -15992,15 +16049,7 @@ declare enum AssertRules {
15992
16049
  /**
15993
16050
  * ChannelId 验证,必须为 String 且不超过 20 位 且不能包含下划线
15994
16051
  */
15995
- CHANNEL_ID = 7,
15996
- /**
15997
- * 类型为会话
15998
- */
15999
- CONVERSATION = 8,
16000
- /**
16001
- * 会话类型验证,必须为 ConversationType
16002
- */
16003
- CONVERSATION_TYPE = 9
16052
+ CHANNEL_ID = 7
16004
16053
  }
16005
16054
  /**
16006
16055
  * 参数校验,该方法用于对业务层入参数据检查,及时抛出异常通知业务层进行修改
@@ -16026,91 +16075,6 @@ declare const assert: (key: string, value: any, validator: AssertRules | ((value
16026
16075
  */
16027
16076
  declare const validate: (key: string, value: any, validator: AssertRules | ((value?: any) => boolean), required?: boolean) => boolean;
16028
16077
 
16029
- /**
16030
- * @deprecated
16031
- */
16032
- declare class ValidatorManage<T> {
16033
- private _logTagT;
16034
- private _logTagR;
16035
- private verificationFaileList;
16036
- private context?;
16037
- private logger?;
16038
- private option?;
16039
- constructor(_logTagT: string, _logTagR: string);
16040
- /**
16041
- * 添加效验参数
16042
- * @param key 错误码标签
16043
- * @param value 需要校验的值
16044
- * @param validator 效验规则
16045
- * @param required 是否必填
16046
- * @param message 自定义错误信息
16047
- */
16048
- validate(key: keyof IErrorCodeKey, value: any, validator: AssertRules | ((value?: any) => {
16049
- errorKey?: keyof IErrorCodeKey;
16050
- valid: boolean;
16051
- }) | ((value?: any) => boolean), required?: boolean, message?: string): this;
16052
- /**
16053
- * 验证参数
16054
- * @param key 错误码标签
16055
- * @param value 需要校验的值
16056
- * @param validator 效验规则
16057
- * @param errorCode 错误码
16058
- * @param required 是否必填
16059
- * @param message 自定义错误信息
16060
- * @description 代替 validate 方法,支持传入错误码,无需定义 Key
16061
- */
16062
- validateParameters(key: string, value: any, validator: AssertRules | ((value?: any) => {
16063
- errorKey?: string;
16064
- valid: boolean;
16065
- errorCode?: ErrorCode;
16066
- }) | ((value?: any) => boolean), errorCode: ErrorCode, required?: boolean, message?: string): this;
16067
- private _getValidationResult;
16068
- /**
16069
- * 内部验证接口是否完成初始化,若未完成初始化,返回状态码 `ErrorCode.BIZ_ERROR_CLIENT_NOT_INIT`
16070
- * @param handler 验证初始化完成的回调,其接收 APIContext, BasicLogger 与 IAPIContextOption 两个类型参数
16071
- * @param errorTag 验证失败时,需要留存的日志信息
16072
- * @description 对外接口定义中,使用此函数验证 SDK 初始化是否完成。
16073
- */
16074
- ifReady(handler: (context: APIContext, logger: BasicLogger, option: IAPIContextOption, traceId: string) => Promise<IAsyncRes<T>>): Promise<IAsyncRes<T>>;
16075
- /**
16076
- * 尝试调用需要初始化完成的函数,若未完成初始化,抛出异常 `Not initialized yet!`
16077
- * @param handler
16078
- * @returns
16079
- * @throw `Not initialized yet!`
16080
- * @description 对外接口定义中,若无明确 code 码返回的情况下,使用该函数验证 SDK 初始化是否完成。
16081
- * 新增接口不可使用。
16082
- */
16083
- try2do(handler: (context: APIContext, logger: BasicLogger, option: IAPIContextOption) => T): T;
16084
- /**
16085
- * `_ifReady` 同步版本,若未完成初始化,返回状态码 `ErrorCode.BIZ_ERROR_CLIENT_NOT_INIT`
16086
- * @param handler 验证初始化完成的回调,其接收 APIContext, BasicLogger 与 IAPIContextOption 两个类型参数
16087
- * @description 对外接口定义中,使用此函数验证 SDK 初始化是否完成。
16088
- */
16089
- ifReadySync<T>(handler: (context: APIContext, logger: BasicLogger, option: IAPIContextOption) => IAsyncRes<T>): IAsyncRes<T>;
16090
- }
16091
-
16092
- /**
16093
- * 检查参数是否为数组
16094
- * 做长度检查、每一项的类型检查
16095
- */
16096
- declare const isLimitedArray: (option: {
16097
- minLength?: number | undefined;
16098
- maxLength?: number | undefined;
16099
- itemValidator?: ((val: unknown) => boolean) | ((val: unknown) => {
16100
- errorKey?: keyof IErrorCodeKey;
16101
- valid: boolean;
16102
- }) | undefined;
16103
- }) => (arr: any[]) => boolean;
16104
- /**
16105
- * @param conversation 会话信息
16106
- * @param conversationTypeList 接口支持的会话类型列表,不传则不校验
16107
- * @returns
16108
- */
16109
- declare const isValidConversation: (conversation: any, conversationTypeList?: ConversationType[] | undefined) => {
16110
- errorKey?: keyof IErrorCodeKey | undefined;
16111
- valid: boolean;
16112
- };
16113
-
16114
16078
  /**
16115
16079
  * @deprecated 使用 UUId.gen() 替代
16116
16080
  */
@@ -16143,4 +16107,4 @@ declare class AppStorage {
16143
16107
  }): void;
16144
16108
  }
16145
16109
 
16146
- export { APIContext, AbsCodec, AppSettings, AppStorage, AreaCode, AssertRules, BasicEngine, BasicLogger, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectionStatus, ConversationBatchDeletionParams, ConversationType, DirectionType, EnableLogL, ErrorCode, EventEmitter, FileType, FriendAddPermission, FriendApplicationStatus, FriendApplicationType, FriendRelationType, GroupApplicationDirection, GroupApplicationStatus, GroupApplicationType, GroupInviteHandlePermission, GroupJoinPermission, GroupMemberInfoEditPermission, GroupMemberRole, GroupOperation, GroupOperationPermission, GroupOperationRole, GroupOperationStatus, GroupOperationType, GroupReadReceiptVersion, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAppPushConfig, IAsyncRes, IAuditInfoKeyInMessage, IAuditInfoValueInMessage, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatService, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomErrorKeys, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomService, IChatroomUser, IChatroomUserChangeInfo, IClearMessageOption, ICombineMessageContent, ICombineV2MessageContent, ICombinedMessage, ICommandMessageContent, IConnectionStatusListener, IConversationFilter, IConversationIdentifier, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagListener, IConversationUnreadCount, IConvertHQVoiceMessageToTextOption, IConvertSpeechToTextOption, IConvertVoiceMessageToTextOption, ICreateGroupFail, IDataHostingModule, IDeletedExpansion, IDownloadAuth, IEditedMessageDraft, IEnginRefreshReferenceMessageResult, IEngineWatcher, IErrorKeys, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraDataKeyInMessage, IFileMessageContent, IFirstUnreadMessageInfo, IFollowsInfo, IFriendAdd, IFriendApplicationInfo, IFriendApplicationStatusChange, IFriendDelete, IFriendInfo, IFriendInfoChangedSync, IFriendRelationInfo, IGIFMessageContent, IGetConversationListByTimestampParams, IGetHistoryMessageOption, IGetHistoryMessageResult, IGetHistoryMessagesByTypesOption, IGetUltraGroupListOption, IGetUnreadMentionMeConversationListParams, IGooglePushConfig, IGroupApplicationInfo, IGroupFollowsChangedSync, IGroupFollowsList, IGroupFollowsUserInfo, IGroupInfo, IGroupInfoChanged, IGroupInfoOption, IGroupMemberInfo, IGroupMemberInfoChanged, IGroupMembers, IGroupNotificationMessageContent, IGroupOperationInfo, IGroupReadReceiptData, IGroupRemarkChangedSync, IHQVoiceMessageContent, IHarmonyOSPushConfig, IIPCMethods, IImageMessageContent, IInformationNotificationMessageContent, IInsertMessage, ILocalTagStatus, ILocationMessageContent, ILogData, ILogger, IMentionedInfoKeyInMessage, IMessageAttrsForUpdateExpansion, IMessageDesc, IMessageFilter, IMessageIdentifier, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, IModifyMessageParams, INaviInfo, INetwork, INotificationQuietHoursSetting, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPagingQueryOption, IPagingQueryResult, IPlatformOnlineStatus, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessCode, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IQuitGroupConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IReferContentInMessage, IReferContentKeyInMessage, IReferenceMessageContent, IRefreshReferenceMessageParams, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IRequest, IResponse, IRichContentMessageContent, IRuntime, ISearchMessageParams, ISearchMessagesResult, ISendMsgOptions, IServerGroupBaseInfo, ISightMessageContent, ISpeechToTextInfo, ISpeechToTextResponse, IStorage, IStreamMessageContent, IStreamMessageResponseChunkData, IStreamMessageResponseEventData, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserOnlineStatus, ISubscribeUserStatusInfo, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITextMessageContent, ITimeRange, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraUnreadMsg, IUpdateItem, IUpdateMyProfileFail, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserExtraKeyInMessage, IUserExtraValueInMessage, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IUserProfileInfo, IUserSettingsChangedEvent, IUserSettingsModule, IVoiceMessageContent, IWatcher, IiOSPushConfig, InnerInsertMessageParams, InnerRTCKeyMaps, InnerTransParam, InterruptionLevel, ItypingStateListener, KVString, LogDBProxy, LogL, LogLevel, LogSource, Log as LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_U32_INTEGER, MAX_UPLOAD_FILE_SIZE, MentionedInfo, MentionedType, MessageAuditType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageRegisterParams, MessageType, MessageTypeDescription, NotificationLevel, NotificationStatus, OnlineStatus, OperateStatus, Codec$1 as PBCodec, Platform, PluginContext, PushImportanceHonor, PushNotificationQuietHoursLevel, QueryFriendsDirectionType, RCConnectionStatus, RCResult, RTCApiType, RTCJoinType, RTCMode, RTCPluginContext, ReadReceiptInfoV5, ReadReceiptResponseV5, ReadReceiptUser, ReadReceiptUsersOption, ReadReceiptUsersResult, ReceivedStatus, ReferenceMessageStatus, SSEModule, SentStatus, SpeechToTextStatus, StreamMessageResponseEventType, SubscribeOperationType, SubscribeType, SuspendablePromise, TranslateInfo, TranslateItem, TranslateMessageParam, TranslateMessagesParams, TranslateMode, TranslateStatus, TranslateStrategy, TranslateTextParam, TranslateTextsParams, UPLOAD_FILE_CHUNK_SIZE, UUId, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod, UserProfileVisibility, UserSettingsChangedKey, UserType, Validator, ValidatorManage, VersionManage, assert, createLogDBProxy, fail, fixUrlProtocol, forEach, getMessageTypeDescription, getUUID, getUUID22, hasMessageTypeDescription, httpRequest, isArray, isBoolean, isFunction, isHttpUrl, isInteger, isLimitedArray, isLimitedString, isNull, isNumber, isObject, isString, isUndefined, isValidConversation, isValidConversationType, isValidEnum, isValidFileType, isValidGroupId, isValidTargetId, logger, map, notEmptyArray, notEmptyObject, notEmptyString, ok, runtime, trans2IReceivedStatusInfo, trans2NotificationLevel, trans2NotificationStatus, transformReceivedStatusFlag, usingCppEngine, validate };
16110
+ export { APIContext, AbsCodec, AppSettings, AppStorage, AreaCode, AssertRules, BasicEngine, BasicLogger, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectionStatus, ConversationBatchDeletionParams, ConversationType, DataHosting, DirectionType, EnableLogL, ErrorCode, EventEmitter, FileType, FriendAddPermission, FriendApplicationStatus, FriendApplicationType, FriendRelationType, GroupApplicationDirection, GroupApplicationStatus, GroupApplicationType, GroupInviteHandlePermission, GroupJoinPermission, GroupMemberInfoEditPermission, GroupMemberRole, GroupOperation, GroupOperationPermission, GroupOperationRole, GroupOperationStatus, GroupOperationType, GroupReadReceiptVersion, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAppPushConfig, IAsyncRes, IAuditInfoKeyInMessage, IAuditInfoValueInMessage, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatService, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomErrorKeys, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomService, IChatroomUser, IChatroomUserChangeInfo, IClearMessageOption, ICombineMessageContent, ICombineV2MessageContent, ICombinedMessage, ICommandMessageContent, IConnectionStatusListener, IConversationFilter, IConversationIdentifier, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagListener, IConversationUnreadCount, IConvertHQVoiceMessageToTextOption, IConvertSpeechToTextOption, IConvertVoiceMessageToTextOption, ICreateGroupFail, IDataHostingService, IDeletedExpansion, IDownloadAuth, IEditedMessageDraft, IEnginRefreshReferenceMessageResult, IEngineWatcher, IErrorKeys, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraDataKeyInMessage, IFileMessageContent, IFirstUnreadMessageInfo, IFollowsInfo, IFriendAdd, IFriendApplicationInfo, IFriendApplicationStatusChange, IFriendDelete, IFriendInfo, IFriendInfoChangedSync, IFriendRelationInfo, IGIFMessageContent, IGetConversationListByTimestampParams, IGetGroupMembersOption, IGetHistoryMessageOption, IGetHistoryMessageResult, IGetHistoryMessagesByTypesOption, IGetUltraGroupListOption, IGetUnreadMentionMeConversationListParams, IGooglePushConfig, IGroupApplicationInfo, IGroupFollowsChangedSync, IGroupFollowsList, IGroupFollowsUserInfo, IGroupInfo, IGroupInfoChanged, IGroupInfoOption, IGroupMemberInfo, IGroupMemberInfoChanged, IGroupMembers, IGroupNotificationMessageContent, IGroupOperationInfo, IGroupReadReceiptData, IGroupRemarkChangedSync, IHQVoiceMessageContent, IHarmonyOSPushConfig, IIPCMethods, IImageMessageContent, IInformationNotificationMessageContent, IInsertMessage, ILocalTagStatus, ILocationMessageContent, ILogData, ILogger, IMemberInviteResponse, IMentionedInfoKeyInMessage, IMessageAttrsForUpdateExpansion, IMessageDesc, IMessageFilter, IMessageIdentifier, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, IMessageSendOptions, IModifyMessageParams, INaviInfo, INetwork, INotificationQuietHoursSetting, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPagingQueryOption, IPagingQueryResult, IPlatformOnlineStatus, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessCode, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IQuitGroupConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallCommandMessageContent, IRecallMsgOptions, IRecallNotificationMessageContent, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IReferContentInMessage, IReferContentKeyInMessage, IReferenceMessageContent, IRefreshReferenceMessageParams, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IRequest, IResponse, IRichContentMessageContent, IRuntime, ISearchMessageParams, ISearchMessagesResult, ISendMsgOptions, IServerGroupBaseInfo, ISightMessageContent, ISpeechToTextInfo, ISpeechToTextResponse, IStorage, IStreamMessageContent, IStreamMessageResponseChunkData, IStreamMessageResponseEventData, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserOnlineStatus, ISubscribeUserStatusInfo, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITextMessageContent, ITimeRange, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraUnreadMsg, IUpdateItem, IUpdateMyProfileFail, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserExtraKeyInMessage, IUserExtraValueInMessage, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IUserProfileInfo, IUserSettingsChangedEvent, IUserSettingsModule, IVoiceMessageContent, IWatcher, IiOSPushConfig, InnerInsertMessageParams, InnerRTCKeyMaps, InnerTransParam, InterruptionLevel, ItypingStateListener, KVString, LogDBProxy, LogL, LogLevel, LogSource, Log as LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_U32_INTEGER, MAX_UPLOAD_FILE_SIZE, MentionedInfo, MentionedType, MessageAuditType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageRegisterParams, MessageType, MessageTypeDescription, NotificationLevel, NotificationStatus, OnlineStatus, OperateStatus, Codec$1 as PBCodec, Platform, PluginContext, PushImportanceHonor, PushNotificationQuietHoursLevel, QueryFriendsDirectionType, RCConnectionStatus, RCResult, RTCApiType, RTCJoinType, RTCMode, RTCPluginContext, ReadReceiptInfoV5, ReadReceiptResponseV5, ReadReceiptUser, ReadReceiptUsersOption, ReadReceiptUsersResult, ReceivedStatus, ReferenceMessageStatus, SSEModule, SentStatus, SpeechToTextStatus, StreamMessageResponseEventType, SubscribeOperationType, SubscribeType, SuspendablePromise, TranslateInfo, TranslateItem, TranslateMessageParam, TranslateMessagesParams, TranslateMode, TranslateStatus, TranslateStrategy, TranslateTextParam, TranslateTextsParams, UPLOAD_FILE_CHUNK_SIZE, UUId, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod, UserProfileVisibility, UserSettingsChangedKey, UserType, Validator, VersionManage, assert, createLogDBProxy, fail, fixUrlProtocol, forEach, getMessageTypeDescription, getUUID, getUUID22, hasMessageTypeDescription, httpRequest, isArray, isBoolean, isFunction, isHttpUrl, isInteger, isLimitedString, isNull, isNumber, isObject, isString, isUndefined, isValidConversationType, isValidEnum, isValidFileType, isValidGroupId, isValidTargetId, logger, map, notEmptyArray, notEmptyObject, notEmptyString, ok, promiseWithResolvers, runtime, trans2IReceivedStatusInfo, trans2NotificationLevel, trans2NotificationStatus, transformReceivedStatusFlag, usingCppEngine, validate };