@rongcloud/engine 5.30.0 → 5.32.0-c-rtc-alpha.2
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.cjs +1 -1
- package/index.cjs.js +1 -1
- package/index.d.ts +792 -837
- package/index.esm.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
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
|
|
200
|
-
readonly
|
|
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,125 @@ 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;
|
|
4716
|
+
private readonly pbModules;
|
|
4717
|
+
constructor(
|
|
4718
|
+
/**
|
|
4719
|
+
* proto 协议描述
|
|
4720
|
+
*/
|
|
4721
|
+
desc: string);
|
|
4722
|
+
/**
|
|
4723
|
+
* PB 数据序列化
|
|
4724
|
+
* @param pbname - PB 名称
|
|
4725
|
+
* @param params - 待序列化数据
|
|
4726
|
+
*/
|
|
4727
|
+
encode<K extends keyof T>(key: K, params: T[K]): ArrayBuffer;
|
|
4728
|
+
/**
|
|
4729
|
+
* 数据反序列化,反序列化的结果为未加工的原始数据,decode 函数本身不处理 format 过程
|
|
4730
|
+
* @param pbname 待解码数据的 PB 名
|
|
4731
|
+
* @param data 待解码数据
|
|
4732
|
+
*/
|
|
4733
|
+
decode<K extends keyof T>(pbname: K, uint8array: Uint8Array): T[K];
|
|
4734
|
+
}
|
|
4735
|
+
|
|
4494
4736
|
/**
|
|
4495
4737
|
* 翻译模式
|
|
4496
4738
|
*/
|
|
@@ -6295,45 +6537,7 @@ interface IFirstUnreadMessageInfo {
|
|
|
6295
6537
|
/**
|
|
6296
6538
|
* @category Interface
|
|
6297
6539
|
*/
|
|
6298
|
-
|
|
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
|
-
}
|
|
6540
|
+
declare type IUserProfile = IUserExtraValueInMessage;
|
|
6337
6541
|
/** [EN]
|
|
6338
6542
|
* Operation details
|
|
6339
6543
|
* @category Interface
|
|
@@ -6462,6 +6666,9 @@ interface IOperateStatusNotify {
|
|
|
6462
6666
|
*/
|
|
6463
6667
|
summary: IOperateSummary[];
|
|
6464
6668
|
}
|
|
6669
|
+
/**
|
|
6670
|
+
* 消息撤回配置
|
|
6671
|
+
*/
|
|
6465
6672
|
declare type IRecallMsgOptions = {
|
|
6466
6673
|
/**
|
|
6467
6674
|
* 消息的唯一 id,客户端依赖此属性查找要撤回的消息
|
|
@@ -6511,9 +6718,9 @@ declare type IRecallMsgOptions = {
|
|
|
6511
6718
|
isAdmin?: boolean;
|
|
6512
6719
|
};
|
|
6513
6720
|
/**
|
|
6514
|
-
*
|
|
6721
|
+
* 消息发送配置项
|
|
6515
6722
|
*/
|
|
6516
|
-
interface
|
|
6723
|
+
interface IMessageSendOptions {
|
|
6517
6724
|
/**
|
|
6518
6725
|
* 消息类型,即消息结构的 ObjectName
|
|
6519
6726
|
*/
|
|
@@ -6536,28 +6743,10 @@ interface ISendMsgOptions {
|
|
|
6536
6743
|
extra?: string;
|
|
6537
6744
|
};
|
|
6538
6745
|
/**
|
|
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` 配置将失效
|
|
6746
|
+
* 发送时指定消息是否为状态消息,仅对 Web 端有效;
|
|
6747
|
+
* @description 该属性为 Web 端特有属性,为保持向前兼容,因此保留;理论上应该在注册消息时设置消息类型是否是状态消息,之后不可更改。
|
|
6553
6748
|
*/
|
|
6554
6749
|
isStatusMessage?: boolean;
|
|
6555
|
-
/**
|
|
6556
|
-
* 是否发送静默消息
|
|
6557
|
-
* @description
|
|
6558
|
-
* 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
|
|
6559
|
-
*/
|
|
6560
|
-
disableNotification?: boolean;
|
|
6561
6750
|
/**
|
|
6562
6751
|
* Push 信息
|
|
6563
6752
|
*/
|
|
@@ -6572,11 +6761,12 @@ interface ISendMsgOptions {
|
|
|
6572
6761
|
isMentioned?: boolean;
|
|
6573
6762
|
/**
|
|
6574
6763
|
* `@` 消息类型
|
|
6575
|
-
* @
|
|
6764
|
+
* @deprecated 推荐使用 content.mentionedInfo.type
|
|
6576
6765
|
*/
|
|
6577
|
-
mentionedType?:
|
|
6766
|
+
mentionedType?: MentionedType;
|
|
6578
6767
|
/**
|
|
6579
6768
|
* 被 @ 的用户 Id 列表,当 `mentionedType` 值为 `1` 时,该值可为空
|
|
6769
|
+
* @deprecated 推荐使用 content.mentionedInfo.userIdList
|
|
6580
6770
|
*/
|
|
6581
6771
|
mentionedUserIdList?: string[];
|
|
6582
6772
|
/**
|
|
@@ -6598,8 +6788,7 @@ interface ISendMsgOptions {
|
|
|
6598
6788
|
[key: string]: string;
|
|
6599
6789
|
};
|
|
6600
6790
|
/**
|
|
6601
|
-
*
|
|
6602
|
-
* @todo 功能未知,需确认
|
|
6791
|
+
* 过滤黑/白名单?TODO:功能未知,需确认
|
|
6603
6792
|
*/
|
|
6604
6793
|
isFilerWhiteBlacklist?: boolean;
|
|
6605
6794
|
/**
|
|
@@ -6607,11 +6796,11 @@ interface ISendMsgOptions {
|
|
|
6607
6796
|
*/
|
|
6608
6797
|
pushConfig?: IPushConfig;
|
|
6609
6798
|
/**
|
|
6610
|
-
*
|
|
6799
|
+
* 是否发送静默消息
|
|
6611
6800
|
* @description
|
|
6612
|
-
*
|
|
6801
|
+
* 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
|
|
6613
6802
|
*/
|
|
6614
|
-
|
|
6803
|
+
disableNotification?: boolean;
|
|
6615
6804
|
/**
|
|
6616
6805
|
* 客户端的消息标识
|
|
6617
6806
|
* 重发消息时用到,重发消息的消息 ID
|
|
@@ -8132,6 +8321,97 @@ interface ITextMessageContent extends IExtraDataKeyInMessage, IUserExtraKeyInMes
|
|
|
8132
8321
|
*/
|
|
8133
8322
|
translateInfo?: TranslateInfo;
|
|
8134
8323
|
}
|
|
8324
|
+
/**
|
|
8325
|
+
* 服务器端定义的撤回通知消息结构,因历史原因,与 Electron 对外暴露的结构不一致
|
|
8326
|
+
* @hidden
|
|
8327
|
+
*/
|
|
8328
|
+
interface ISvrRecallNotificationMessageContent extends IExtraDataKeyInMessage, IUserExtraKeyInMessage {
|
|
8329
|
+
/**
|
|
8330
|
+
* 发起撤回的用户 ID
|
|
8331
|
+
*/
|
|
8332
|
+
operatorId?: string;
|
|
8333
|
+
/**
|
|
8334
|
+
* 被撤回的原始消息的发送时间,单位:毫秒
|
|
8335
|
+
*/
|
|
8336
|
+
recallTime: number;
|
|
8337
|
+
/**
|
|
8338
|
+
* 被撤回的原始消息的类型
|
|
8339
|
+
*/
|
|
8340
|
+
originalObjectName?: string;
|
|
8341
|
+
/**
|
|
8342
|
+
* 被撤回的原始消息的内容
|
|
8343
|
+
*/
|
|
8344
|
+
originalMessageContent?: any;
|
|
8345
|
+
/**
|
|
8346
|
+
* 被撤回的文本消息内容
|
|
8347
|
+
*/
|
|
8348
|
+
recallContent?: string;
|
|
8349
|
+
/**
|
|
8350
|
+
* 撤回消息的发送时间,单位:毫秒
|
|
8351
|
+
*/
|
|
8352
|
+
recallActionTime?: number;
|
|
8353
|
+
/**
|
|
8354
|
+
* 是否为管理员操作
|
|
8355
|
+
*/
|
|
8356
|
+
admin?: boolean;
|
|
8357
|
+
/**
|
|
8358
|
+
* 是否删除接收端本地存储的原始消息
|
|
8359
|
+
*/
|
|
8360
|
+
delete?: boolean;
|
|
8361
|
+
}
|
|
8362
|
+
/** [EN]
|
|
8363
|
+
* Recall notification message content data
|
|
8364
|
+
* @category Interface
|
|
8365
|
+
*/
|
|
8366
|
+
/**
|
|
8367
|
+
* 撤回通知消息 content 数据
|
|
8368
|
+
* @category Interface
|
|
8369
|
+
*/
|
|
8370
|
+
interface IRecallNotificationMessageContent extends Partial<ISvrRecallNotificationMessageContent> {
|
|
8371
|
+
/**
|
|
8372
|
+
* Electron 历史版本中使用错误,目前已废弃,请使用 `delete` 替代
|
|
8373
|
+
* @deprecated - 已废弃,请使用 `delete` 替代
|
|
8374
|
+
*/
|
|
8375
|
+
isDelete?: boolean;
|
|
8376
|
+
}
|
|
8377
|
+
/**
|
|
8378
|
+
* 撤回命令消息 content 数据
|
|
8379
|
+
* @category Interface
|
|
8380
|
+
*/
|
|
8381
|
+
interface IRecallCommandMessageContent extends IExtraDataKeyInMessage, IUserExtraKeyInMessage {
|
|
8382
|
+
/**
|
|
8383
|
+
* 会话类型
|
|
8384
|
+
*/
|
|
8385
|
+
conversationType: ConversationType;
|
|
8386
|
+
/**
|
|
8387
|
+
* 会话 TargetId
|
|
8388
|
+
*/
|
|
8389
|
+
targetId: string;
|
|
8390
|
+
/**
|
|
8391
|
+
* 会话 ChannelId
|
|
8392
|
+
*/
|
|
8393
|
+
channelId?: string;
|
|
8394
|
+
/**
|
|
8395
|
+
* 被撤回消息的唯一标识
|
|
8396
|
+
*/
|
|
8397
|
+
messageUId: string;
|
|
8398
|
+
/**
|
|
8399
|
+
* 被撤回消息的发送时间,Web 端依赖该时间对消息进行排序和会话更新处理
|
|
8400
|
+
*/
|
|
8401
|
+
sentTime: number;
|
|
8402
|
+
/**
|
|
8403
|
+
* 是否删除接收端本地存储的原始消息,对 Web 平台无效
|
|
8404
|
+
*/
|
|
8405
|
+
isDelete?: boolean;
|
|
8406
|
+
/**
|
|
8407
|
+
* 是否为管理员操作,当值为 true 时,允许撤回非本人发送的消息
|
|
8408
|
+
*/
|
|
8409
|
+
isAdmin?: boolean;
|
|
8410
|
+
/**
|
|
8411
|
+
* 撤回定向消息时,指定定向消息的接收者列表
|
|
8412
|
+
*/
|
|
8413
|
+
directionalUserIdList?: string[];
|
|
8414
|
+
}
|
|
8135
8415
|
|
|
8136
8416
|
/** [EN]
|
|
8137
8417
|
* @category Interface
|
|
@@ -9023,12 +9303,6 @@ interface INetwork {
|
|
|
9023
9303
|
type: NetworkType;
|
|
9024
9304
|
}
|
|
9025
9305
|
|
|
9026
|
-
interface IRTCRoomInfo {
|
|
9027
|
-
roomId: string;
|
|
9028
|
-
roomData: unknown[];
|
|
9029
|
-
userCount: number;
|
|
9030
|
-
list: unknown[];
|
|
9031
|
-
}
|
|
9032
9306
|
/** @deprecated */
|
|
9033
9307
|
interface IRtcTokenData {
|
|
9034
9308
|
rtcToken: string;
|
|
@@ -9411,6 +9685,7 @@ declare class RCResult<T = void> {
|
|
|
9411
9685
|
* @hidden
|
|
9412
9686
|
*/
|
|
9413
9687
|
constructor(code: number, msg: string, data?: T);
|
|
9688
|
+
static from<T = void>(code: number, msg?: string, data?: T): RCResult<T>;
|
|
9414
9689
|
/**
|
|
9415
9690
|
* 结果为 ok 时,进行后续异步操作
|
|
9416
9691
|
* @hidden
|
|
@@ -9578,6 +9853,11 @@ declare class Validator {
|
|
|
9578
9853
|
assertFunction(key: string, value: unknown, required?: boolean): Validator;
|
|
9579
9854
|
}
|
|
9580
9855
|
|
|
9856
|
+
declare const promiseWithResolvers: <T = void>() => {
|
|
9857
|
+
resolve: (value: T) => void;
|
|
9858
|
+
promise: Promise<T>;
|
|
9859
|
+
};
|
|
9860
|
+
|
|
9581
9861
|
interface IServerAddressData {
|
|
9582
9862
|
addr: string;
|
|
9583
9863
|
protocol: EConnectProtocol;
|
|
@@ -9945,6 +10225,13 @@ interface INaviInfo {
|
|
|
9945
10225
|
* 消息修改时间限制,单位:分钟
|
|
9946
10226
|
*/
|
|
9947
10227
|
msgModifyMinute?: number;
|
|
10228
|
+
/**
|
|
10229
|
+
* 是否开启单群聊消息撤回优化;(0 关闭,1 开启)
|
|
10230
|
+
* 开启后:
|
|
10231
|
+
* 1. 服务器会话列表 latestMessage 和历史消息中将存储 RC:RcNtf 消息。
|
|
10232
|
+
* 2. 拉取历史消息时,不再返回 RC:RcCmd 消息。
|
|
10233
|
+
*/
|
|
10234
|
+
supportRecallRefactor?: 0 | 1;
|
|
9948
10235
|
}
|
|
9949
10236
|
|
|
9950
10237
|
/** [EN]
|
|
@@ -9955,6 +10242,7 @@ interface INaviInfo {
|
|
|
9955
10242
|
* 异步任务结果
|
|
9956
10243
|
* @description 该结构即将废弃,请使用 {@link RCResult} 替代
|
|
9957
10244
|
* @category Interface
|
|
10245
|
+
* @deprecated 请使用 {@link RCResult} 替代
|
|
9958
10246
|
*/
|
|
9959
10247
|
interface IAsyncRes<T = void> extends Pick<RCResult<T>, 'code' | 'data'> {
|
|
9960
10248
|
msg?: string;
|
|
@@ -10613,10 +10901,10 @@ interface IFriendInfoChangedSync {
|
|
|
10613
10901
|
*/
|
|
10614
10902
|
interface IPagingQueryOption {
|
|
10615
10903
|
/** [EN]
|
|
10616
|
-
* Number of items per page,
|
|
10904
|
+
* Number of items per page, valid value [1, 100], default value 50
|
|
10617
10905
|
*/
|
|
10618
10906
|
/**
|
|
10619
|
-
*
|
|
10907
|
+
* 每页条数,有效值 [1, 100],默认值 50
|
|
10620
10908
|
*/
|
|
10621
10909
|
count: number;
|
|
10622
10910
|
/** [EN]
|
|
@@ -10627,13 +10915,15 @@ interface IPagingQueryOption {
|
|
|
10627
10915
|
*/
|
|
10628
10916
|
pageToken?: string;
|
|
10629
10917
|
/** [EN]
|
|
10630
|
-
* Sort type: Supports setting the order for retrieval. `true`: ascending order; `false`: descending order. Default is `
|
|
10918
|
+
* Sort type: Supports setting the order for retrieval. `true`: ascending order; `false`: descending order. Default is `false`.
|
|
10631
10919
|
*/
|
|
10632
10920
|
/**
|
|
10633
|
-
*
|
|
10921
|
+
* 排序类型:支持设置正序、倒序获取。`true`:正序;`false`:倒序。默认为 `false`
|
|
10634
10922
|
*/
|
|
10635
10923
|
order?: boolean;
|
|
10636
10924
|
}
|
|
10925
|
+
interface IGetGroupMembersOption extends IPagingQueryOption {
|
|
10926
|
+
}
|
|
10637
10927
|
/** [EN]
|
|
10638
10928
|
* Pagination request result
|
|
10639
10929
|
* @category Interface
|
|
@@ -10698,9 +10988,7 @@ interface IGroupInfoOption extends IGroupBaseInfo {
|
|
|
10698
10988
|
/**
|
|
10699
10989
|
* 扩展消息
|
|
10700
10990
|
*/
|
|
10701
|
-
extProfile?:
|
|
10702
|
-
[key: string]: string;
|
|
10703
|
-
};
|
|
10991
|
+
extProfile?: Record<string, string>;
|
|
10704
10992
|
/** [EN]
|
|
10705
10993
|
* Active join group permission mode
|
|
10706
10994
|
*/
|
|
@@ -11375,6 +11663,14 @@ interface IServerGroupBaseInfo {
|
|
|
11375
11663
|
profilePerm?: number;
|
|
11376
11664
|
memProfilePerm?: number;
|
|
11377
11665
|
}
|
|
11666
|
+
interface IMemberInviteResponse {
|
|
11667
|
+
groupId: string;
|
|
11668
|
+
inviterId: string;
|
|
11669
|
+
optType: GroupOperationRole;
|
|
11670
|
+
optResult: GroupOperationStatus;
|
|
11671
|
+
joinUserId?: string;
|
|
11672
|
+
reason?: string;
|
|
11673
|
+
}
|
|
11378
11674
|
|
|
11379
11675
|
interface INotificationQuietHoursSetting {
|
|
11380
11676
|
/** [EN]
|
|
@@ -11438,32 +11734,55 @@ declare function getMessageTypeDescription(type: string): MessageTypeDescription
|
|
|
11438
11734
|
*/
|
|
11439
11735
|
declare function hasMessageTypeDescription(type: string): boolean;
|
|
11440
11736
|
|
|
11737
|
+
/** [EN]
|
|
11738
|
+
* Get Conversation List By Timestamp Params
|
|
11739
|
+
*/
|
|
11441
11740
|
/**
|
|
11442
11741
|
* 按时间戳查询会话列表参数
|
|
11443
11742
|
*/
|
|
11444
11743
|
declare type IGetConversationListByTimestampParams = {
|
|
11744
|
+
/** [EN]
|
|
11745
|
+
* Get Conversation Start Time, precision to milliseconds, 0 represents the current time
|
|
11746
|
+
*/
|
|
11445
11747
|
/**
|
|
11446
11748
|
* 获取会话起始时间,需要精确到毫秒,0 表示当前时间
|
|
11447
11749
|
*/
|
|
11448
11750
|
startTime: number;
|
|
11751
|
+
/** [EN]
|
|
11752
|
+
* Get Conversation Count
|
|
11753
|
+
*/
|
|
11449
11754
|
/**
|
|
11450
11755
|
* 分页数量
|
|
11451
11756
|
*/
|
|
11452
11757
|
count: number;
|
|
11453
|
-
/**
|
|
11758
|
+
/** [EN]
|
|
11759
|
+
* Get Conversation Order. The parameter is invalid for Electron platform, and the default value is 0 for Electron platform;
|
|
11760
|
+
* * 0 - Query from startTime forward, data sorted by time in descending order
|
|
11761
|
+
* * 1 - Query from startTime backward, data sorted by time in ascending order
|
|
11762
|
+
*/
|
|
11763
|
+
/**
|
|
11454
11764
|
* 查询方向。该参数对 Electron 平台无效,Electron 平台下始终为 0;
|
|
11455
11765
|
* * 0 - 从 startTime 开始向前查询,数据按时间降序排序
|
|
11456
11766
|
* * 1 - 从 startTime 开始向后查询,数据按时间升序排序
|
|
11457
11767
|
*/
|
|
11458
11768
|
order?: 0 | 1;
|
|
11769
|
+
/** [EN]
|
|
11770
|
+
* Get Conversation Channel Id, used for multi-organization scene query; only Electron platform is valid
|
|
11771
|
+
*/
|
|
11459
11772
|
/**
|
|
11460
11773
|
* 单、群聊会话的组织 ID,用于多组织场景查询;仅 Electron 平台有效
|
|
11461
11774
|
*/
|
|
11462
11775
|
channelId?: string;
|
|
11776
|
+
/** [EN]
|
|
11777
|
+
* Get Conversation Top Priority, only Electron platform is valid
|
|
11778
|
+
*/
|
|
11463
11779
|
/**
|
|
11464
|
-
*
|
|
11780
|
+
* 是否置顶优先,仅对 Electron 平台有效
|
|
11465
11781
|
*/
|
|
11466
11782
|
topPriority?: boolean;
|
|
11783
|
+
/** [EN]
|
|
11784
|
+
* Get Conversation Types; the value is empty or the length is 0 to get all conversation types
|
|
11785
|
+
*/
|
|
11467
11786
|
/**
|
|
11468
11787
|
* 会话类型,值为空或长度为 0 时,获取全部会话类型;仅 Electron 平台有效
|
|
11469
11788
|
*/
|
|
@@ -11654,7 +11973,7 @@ interface IProcessCache {
|
|
|
11654
11973
|
deltaTime: number;
|
|
11655
11974
|
}
|
|
11656
11975
|
/**
|
|
11657
|
-
*
|
|
11976
|
+
* 约束跨平台、跨进程通信方法定义,以便于代码检查
|
|
11658
11977
|
*/
|
|
11659
11978
|
interface IIPCMethods {
|
|
11660
11979
|
/**
|
|
@@ -11666,7 +11985,7 @@ interface IIPCMethods {
|
|
|
11666
11985
|
* @param token
|
|
11667
11986
|
* @param reconnectKickEnable
|
|
11668
11987
|
*/
|
|
11669
|
-
connect(token: string, reconnectKickEnable: boolean, openCallPlus: boolean, traceId: string):
|
|
11988
|
+
connect(token: string, reconnectKickEnable: boolean, openCallPlus: boolean, traceId: string): Promise<RCResult<string>>;
|
|
11670
11989
|
getNaviInfoFromCache(): INaviInfo | null;
|
|
11671
11990
|
/**
|
|
11672
11991
|
* 上报版本信息
|
|
@@ -11809,11 +12128,11 @@ interface IIPCMethods {
|
|
|
11809
12128
|
clearTextMessageDraft(conversation: IConversationOption): Promise<RCResult>;
|
|
11810
12129
|
getConversationNotificationLevel(conversation: IConversationOption): Promise<RCResult<NotificationLevel>>;
|
|
11811
12130
|
getTotalUnreadCountByLevels(conversationTypes: ConversationType[], levels: NotificationLevel[], isMentioned?: boolean): Promise<RCResult<number>>;
|
|
11812
|
-
sendMessage(
|
|
12131
|
+
sendMessage(identifier: IConversationIdentifier, options: IMessageSendOptions, traceId: string, onBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
|
|
11813
12132
|
/**
|
|
11814
12133
|
* 断开连接
|
|
11815
12134
|
*/
|
|
11816
|
-
disconnect(closeDB?: boolean, disablePush?: boolean): Promise<
|
|
12135
|
+
disconnect(closeDB?: boolean, disablePush?: boolean): Promise<RCResult>;
|
|
11817
12136
|
/**
|
|
11818
12137
|
* 消息注册
|
|
11819
12138
|
* @description
|
|
@@ -11875,11 +12194,19 @@ interface IIPCMethods {
|
|
|
11875
12194
|
*/
|
|
11876
12195
|
setCheckChatRoomDuplicateMessage(enableCheck: boolean): Promise<RCResult>;
|
|
11877
12196
|
/**
|
|
11878
|
-
*
|
|
12197
|
+
* 获取存储服务鉴权信息
|
|
12198
|
+
* @param fileType 文件类型
|
|
12199
|
+
* @param fileName 文件名称
|
|
12200
|
+
* @param httpMethod STC 分段上传时的必填参数,有效值为 PUT | POST
|
|
12201
|
+
* @param queryString STC 分段上传时的查询字符串
|
|
11879
12202
|
* @description
|
|
11880
|
-
*
|
|
12203
|
+
* `httpMethod` 与 `queryString` 为 STC S3 分段上传时的专属参数,STC 分段上传包含三个过程:
|
|
12204
|
+
* 1. 开始分段前调用,此时 `httpMethod` 值应为 `POST`,`queryString` 值为 `uploads`
|
|
12205
|
+
* 2. 上传请求前调用,此时 `httpMethod` 值应为 `PUT`,`queryString` 值为 `partNumber={partamNumer}&uploadId={uploadId}`
|
|
12206
|
+
* 3. 上传结束前调用,此时 `httpMethod` 值应为 `POST`,`queryString` 值为 `uploadId={uploadId}`
|
|
12207
|
+
* @returns
|
|
11881
12208
|
*/
|
|
11882
|
-
getFileToken(fileType: FileType, fileName?: string, httpMethod?: string, queryUriString?: string): Promise<
|
|
12209
|
+
getFileToken(fileType: FileType, fileName?: string, httpMethod?: string, queryUriString?: string, url?: string, size?: number): Promise<RCResult<IUploadAuth>>;
|
|
11883
12210
|
/**
|
|
11884
12211
|
* 获取文件上传后下载地址
|
|
11885
12212
|
*/
|
|
@@ -11955,19 +12282,19 @@ interface IIPCMethods {
|
|
|
11955
12282
|
/**
|
|
11956
12283
|
* 获取群组消息已读列表
|
|
11957
12284
|
*/
|
|
11958
|
-
getMessageReader(targetId: string, messageUId: string, channelId
|
|
12285
|
+
getMessageReader(targetId: string, messageUId: string, channelId: string): Promise<RCResult<IMessageReaderResponse>>;
|
|
11959
12286
|
/**
|
|
11960
12287
|
* 发送已读回执 (V4)
|
|
11961
12288
|
*/
|
|
11962
|
-
sendReadReceiptMessageV4(conversation:
|
|
12289
|
+
sendReadReceiptMessageV4(conversation: IConversationIdentifier, startMsgUid: string, endMsgUid: string): Promise<RCResult>;
|
|
11963
12290
|
/**
|
|
11964
12291
|
* 获取消息已读回执列表,暂仅支持群聊 (V4)
|
|
11965
12292
|
*/
|
|
11966
|
-
getMessageReadReceiptV4(conversation:
|
|
12293
|
+
getMessageReadReceiptV4(conversation: IConversationIdentifier, messageUid: string): Promise<RCResult<IMessageReadReceiptV4Response>>;
|
|
11967
12294
|
/**
|
|
11968
12295
|
* 多端同步会话的已读时间 (V4)
|
|
11969
12296
|
*/
|
|
11970
|
-
updateConversationReadTime(conversation:
|
|
12297
|
+
updateConversationReadTime(conversation: IConversationIdentifier, timestamp: number): Promise<RCResult>;
|
|
11971
12298
|
/**
|
|
11972
12299
|
* 获取服务器时间
|
|
11973
12300
|
*/
|
|
@@ -11997,9 +12324,9 @@ interface IIPCMethods {
|
|
|
11997
12324
|
/**
|
|
11998
12325
|
* 获取用户状态
|
|
11999
12326
|
*/
|
|
12000
|
-
getUserStatus(userId: string):
|
|
12327
|
+
getUserStatus(userId: string): Promise<RCResult<{
|
|
12001
12328
|
status: string;
|
|
12002
|
-
}
|
|
12329
|
+
}>>;
|
|
12003
12330
|
/**
|
|
12004
12331
|
* 清空所有会话,目前仅 v2-adapter 中提供
|
|
12005
12332
|
*/
|
|
@@ -12007,19 +12334,19 @@ interface IIPCMethods {
|
|
|
12007
12334
|
/**
|
|
12008
12335
|
* 加入黑名单
|
|
12009
12336
|
*/
|
|
12010
|
-
addToBlacklist(userId: string): Promise<
|
|
12337
|
+
addToBlacklist(userId: string): Promise<RCResult>;
|
|
12011
12338
|
/**
|
|
12012
12339
|
* 将指定用户移除黑名单
|
|
12013
12340
|
*/
|
|
12014
|
-
removeFromBlacklist(userId: string): Promise<
|
|
12341
|
+
removeFromBlacklist(userId: string): Promise<RCResult>;
|
|
12015
12342
|
/**
|
|
12016
12343
|
* 获取黑名单列表
|
|
12017
12344
|
*/
|
|
12018
|
-
getBlacklist():
|
|
12345
|
+
getBlacklist(): Promise<RCResult<string[]>>;
|
|
12019
12346
|
/**
|
|
12020
12347
|
* 获取指定人员在黑名单中的状态
|
|
12021
12348
|
*/
|
|
12022
|
-
getBlacklistStatus(userId: string):
|
|
12349
|
+
getBlacklistStatus(userId: string): Promise<RCResult<number>>;
|
|
12023
12350
|
/**
|
|
12024
12351
|
* 向本地插入一条消息,不发送到服务器
|
|
12025
12352
|
*/
|
|
@@ -12064,7 +12391,7 @@ interface IIPCMethods {
|
|
|
12064
12391
|
* 通过关键字与 channelId 搜索所有会话
|
|
12065
12392
|
*/
|
|
12066
12393
|
searchConversationByContent(keyword: string, customMessageTypes: string[], channelId: string, conversationTypes: ConversationType[]): Promise<RCResult<IReceivedConversation[]>>;
|
|
12067
|
-
searchConversationByContentWithAllChannel(keyword: string, customMessageTypes: string[], conversationTypes?: ConversationType[]):
|
|
12394
|
+
searchConversationByContentWithAllChannel(keyword: string, customMessageTypes: string[], conversationTypes?: ConversationType[]): Promise<RCResult<IReceivedConversation[]>>;
|
|
12068
12395
|
/**
|
|
12069
12396
|
* 通过指定搜索策略和搜索参数,进行消息搜索
|
|
12070
12397
|
* @param params
|
|
@@ -12081,11 +12408,11 @@ interface IIPCMethods {
|
|
|
12081
12408
|
/**
|
|
12082
12409
|
* 设置消息发送状态
|
|
12083
12410
|
*/
|
|
12084
|
-
setMessageSentStatus(messageId: number, sentStatus: number): Promise<
|
|
12411
|
+
setMessageSentStatus(messageId: number, sentStatus: number): Promise<RCResult>;
|
|
12085
12412
|
/**
|
|
12086
12413
|
* 设置消息接收状态
|
|
12087
12414
|
*/
|
|
12088
|
-
setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<
|
|
12415
|
+
setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<RCResult>;
|
|
12089
12416
|
/**
|
|
12090
12417
|
* 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
|
|
12091
12418
|
*/
|
|
@@ -12093,7 +12420,7 @@ interface IIPCMethods {
|
|
|
12093
12420
|
/**
|
|
12094
12421
|
* 删除时间戳前的未读数
|
|
12095
12422
|
*/
|
|
12096
|
-
clearUnreadCountByTimestamp(
|
|
12423
|
+
clearUnreadCountByTimestamp(conversation: IConversationIdentifier, timestamp: number): Promise<RCResult>;
|
|
12097
12424
|
/**
|
|
12098
12425
|
* 获取所有群聊会话 @ 消息未读数,不包含超级群会话
|
|
12099
12426
|
*/
|
|
@@ -12110,85 +12437,122 @@ interface IIPCMethods {
|
|
|
12110
12437
|
/**
|
|
12111
12438
|
* 设置代理
|
|
12112
12439
|
*/
|
|
12113
|
-
setProxy(proxy: IProxy | null):
|
|
12440
|
+
setProxy(proxy: IProxy | null): Promise<RCResult>;
|
|
12114
12441
|
/**
|
|
12115
12442
|
* 获取代理
|
|
12116
12443
|
*/
|
|
12117
|
-
getProxy():
|
|
12444
|
+
getProxy(): Promise<RCResult<IProxy>>;
|
|
12118
12445
|
/**
|
|
12119
12446
|
* 测试代理
|
|
12120
12447
|
*/
|
|
12121
|
-
testProxy(proxy: IProxy, testHost: string): Promise<
|
|
12448
|
+
testProxy(proxy: IProxy, testHost: string): Promise<RCResult>;
|
|
12122
12449
|
/**
|
|
12123
12450
|
* 订阅用户状态事件
|
|
12124
12451
|
*/
|
|
12125
|
-
subscribeUser(userIds: string[], subscribeType: SubscribeType, expiry: number): Promise<
|
|
12452
|
+
subscribeUser(userIds: string[], subscribeType: SubscribeType, expiry: number): Promise<RCResult<string[]>>;
|
|
12126
12453
|
/**
|
|
12127
12454
|
* 取消订阅用户状态事件
|
|
12128
12455
|
*/
|
|
12129
|
-
unSubscribeUser(userIds: string[], subscribeType: SubscribeType): Promise<
|
|
12456
|
+
unSubscribeUser(userIds: string[], subscribeType: SubscribeType): Promise<RCResult>;
|
|
12130
12457
|
/**
|
|
12131
12458
|
* 获取已订阅列表
|
|
12132
12459
|
*/
|
|
12133
|
-
getSubscribeUserList(subscribeType: SubscribeType, count: number, offset: number): Promise<
|
|
12460
|
+
getSubscribeUserList(subscribeType: SubscribeType, count: number, offset: number): Promise<RCResult<ISubscribeUserStatusInfo[]>>;
|
|
12134
12461
|
/**
|
|
12135
12462
|
* 获取指定用户的在线状态
|
|
12136
12463
|
*/
|
|
12137
12464
|
getSubscribeUserStatus(subscribeType: SubscribeType, userIds: string[]): Promise<RCResult<ISubscribeUserStatusInfo[]>>;
|
|
12138
|
-
updateMyUserProfile(profile: IUserProfileInfo): Promise<
|
|
12465
|
+
updateMyUserProfile(profile: IUserProfileInfo): Promise<RCResult<IUpdateMyProfileFail>>;
|
|
12139
12466
|
getUserProfiles(userIds: string[]): Promise<RCResult<IUserProfileInfo[]>>;
|
|
12140
|
-
getMyUserProfile(): Promise<
|
|
12141
|
-
updateMyUserProfileVisibility(visibility: UserProfileVisibility): Promise<
|
|
12142
|
-
getMyUserProfileVisibility(): Promise<
|
|
12143
|
-
searchUserProfileByUniqueId(uniqueId: string): Promise<
|
|
12144
|
-
createGroup(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile:
|
|
12145
|
-
|
|
12146
|
-
|
|
12147
|
-
|
|
12148
|
-
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
|
|
12170
|
-
|
|
12171
|
-
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
|
|
12175
|
-
|
|
12176
|
-
|
|
12177
|
-
addFriend(userId: string, directionType: DirectionType, extra
|
|
12178
|
-
|
|
12179
|
-
|
|
12180
|
-
|
|
12181
|
-
|
|
12182
|
-
|
|
12183
|
-
|
|
12184
|
-
|
|
12185
|
-
|
|
12186
|
-
|
|
12187
|
-
|
|
12188
|
-
|
|
12189
|
-
|
|
12190
|
-
|
|
12191
|
-
|
|
12467
|
+
getMyUserProfile(): Promise<RCResult<IUserProfileInfo>>;
|
|
12468
|
+
updateMyUserProfileVisibility(visibility: UserProfileVisibility): Promise<RCResult>;
|
|
12469
|
+
getMyUserProfileVisibility(): Promise<RCResult<UserProfileVisibility>>;
|
|
12470
|
+
searchUserProfileByUniqueId(uniqueId: string): Promise<RCResult<IUserProfileInfo>>;
|
|
12471
|
+
createGroup(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile?: Record<string, string>, inviteeUserIds?: string[]): Promise<RCResult<ICreateGroupFail>>;
|
|
12472
|
+
updateGroupInfo(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile?: Record<string, string>): Promise<RCResult<IErrorKeys>>;
|
|
12473
|
+
getGroupsInfo(groupIds: string[]): Promise<RCResult<IGroupInfo[]>>;
|
|
12474
|
+
kickGroupMembers(groupId: string, userIds: string[], config: Required<IQuitGroupConfig>): Promise<RCResult>;
|
|
12475
|
+
quitGroup(groupId: string, config: Required<IQuitGroupConfig>): Promise<RCResult>;
|
|
12476
|
+
dismissGroup(groupId: string): Promise<RCResult>;
|
|
12477
|
+
transferGroupOwner(groupId: string, newOwnerId: string, quitGroupAfterTransfer: boolean, config: Required<IQuitGroupConfig>): Promise<RCResult>;
|
|
12478
|
+
setGroupManagers(type: GroupOperationType, groupId: string, userIds: string[]): Promise<RCResult>;
|
|
12479
|
+
getGroupMembersByRole(groupId: string, role: GroupMemberRole, option: Required<IGetGroupMembersOption>): Promise<RCResult<IPagingQueryResult<IGroupMemberInfo>>>;
|
|
12480
|
+
getGroupMembers(groupId: string, userIds: string[]): Promise<RCResult<IGroupMemberInfo[]>>;
|
|
12481
|
+
setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra?: string): Promise<RCResult<IErrorKeys>>;
|
|
12482
|
+
searchGroupMembers(groupId: string, nickName: string, option: Required<IPagingQueryOption>): Promise<RCResult<IPagingQueryResult<IGroupMemberInfo>>>;
|
|
12483
|
+
joinGroup(groupId: string): Promise<RCResult<IProcessCode>>;
|
|
12484
|
+
inviteUsersToGroup(groupId: string, userIds: string[]): Promise<RCResult<IProcessCode>>;
|
|
12485
|
+
memberInviteResponse(params: IMemberInviteResponse): Promise<RCResult<IProcessCode>>;
|
|
12486
|
+
getGroupApplications(option: Required<IPagingQueryOption>, directions: GroupApplicationDirection[], status: GroupApplicationStatus[]): Promise<RCResult<IPagingQueryResult<IGroupApplicationInfo>>>;
|
|
12487
|
+
getJoinedGroupsByRole(role: GroupMemberRole, option: Required<IPagingQueryOption>): Promise<RCResult<IPagingQueryResult<IGroupInfo>>>;
|
|
12488
|
+
searchJoinedGroups(groupName: string, option: Required<IPagingQueryOption>): Promise<RCResult<IPagingQueryResult<IGroupInfo>>>;
|
|
12489
|
+
getJoinedGroups(groupIds: string[]): Promise<RCResult<IGroupInfo[]>>;
|
|
12490
|
+
/**
|
|
12491
|
+
* 设置/移除 群组备注名
|
|
12492
|
+
* @param groupId
|
|
12493
|
+
* @param remark 备注名,设置为 '' 代表移除
|
|
12494
|
+
*/
|
|
12495
|
+
setGroupRemark(groupId: string, remark: string): Promise<RCResult>;
|
|
12496
|
+
setGroupFollows(optType: GroupOperationType, groupId: string, userIds: string[]): Promise<RCResult>;
|
|
12497
|
+
getGroupFollows(groupId: string): Promise<RCResult<IFollowsInfo[]>>;
|
|
12498
|
+
/**
|
|
12499
|
+
* 添加好友
|
|
12500
|
+
* @param userId
|
|
12501
|
+
* @param directionType
|
|
12502
|
+
* @param extra
|
|
12503
|
+
*/
|
|
12504
|
+
addFriend(userId: string, directionType: DirectionType, extra: string): Promise<RCResult<IProcessCode>>;
|
|
12505
|
+
/**
|
|
12506
|
+
* 删除好友
|
|
12507
|
+
* @param userIds
|
|
12508
|
+
* @param directionType
|
|
12509
|
+
*/
|
|
12510
|
+
deleteFriends(userIds: string[], directionType: DirectionType): Promise<RCResult>;
|
|
12511
|
+
/**
|
|
12512
|
+
* 接受好友请求
|
|
12513
|
+
* @param userId
|
|
12514
|
+
*/
|
|
12515
|
+
acceptFriendRequest(userId: string): Promise<RCResult>;
|
|
12516
|
+
/**
|
|
12517
|
+
* 拒绝好友请求
|
|
12518
|
+
* @param userId
|
|
12519
|
+
* @param reason
|
|
12520
|
+
*/
|
|
12521
|
+
refuseFriendRequest(userId: string, reason?: string): Promise<RCResult>;
|
|
12522
|
+
/**
|
|
12523
|
+
* 设置好友信息
|
|
12524
|
+
* @param userId
|
|
12525
|
+
* @param remark
|
|
12526
|
+
* @param extProfile
|
|
12527
|
+
*/
|
|
12528
|
+
setFriendInfo(userId: string, remark: string, extProfile: Record<string, string>): Promise<RCResult<IErrorKeys>>;
|
|
12529
|
+
/**
|
|
12530
|
+
* 检查好友关系
|
|
12531
|
+
* @param userIds
|
|
12532
|
+
* @param directionType
|
|
12533
|
+
*/
|
|
12534
|
+
checkFriends(userIds: string[], directionType: DirectionType): Promise<RCResult<IFriendRelationInfo[]>>;
|
|
12535
|
+
/**
|
|
12536
|
+
* 获取好友列表
|
|
12537
|
+
* @param directionType
|
|
12538
|
+
* @param option 分页查询参数,对 Electron 平台无效
|
|
12539
|
+
*/
|
|
12540
|
+
getFriends(directionType: QueryFriendsDirectionType, option: Required<IPagingQueryOption>): Promise<RCResult<IPagingQueryResult<IFriendInfo>>>;
|
|
12541
|
+
/**
|
|
12542
|
+
* 获取好友请求列表
|
|
12543
|
+
* @param option 分页参数
|
|
12544
|
+
* @param types 请求类型
|
|
12545
|
+
* @param status 请求状态
|
|
12546
|
+
*/
|
|
12547
|
+
getFriendApplications(option: Required<IPagingQueryOption>, types: FriendApplicationType[], status: FriendApplicationStatus[]): Promise<RCResult<IPagingQueryResult<IFriendApplicationInfo>>>;
|
|
12548
|
+
/**
|
|
12549
|
+
* 获取好友信息
|
|
12550
|
+
* @param userIds
|
|
12551
|
+
*/
|
|
12552
|
+
getFriendsInfo(userIds: string[]): Promise<RCResult<IFriendInfo[]>>;
|
|
12553
|
+
searchFriendsInfo(nickname: string): Promise<RCResult<IFriendInfo[]>>;
|
|
12554
|
+
setFriendAddPermission(permission: FriendAddPermission): Promise<RCResult>;
|
|
12555
|
+
getFriendAddPermission(): Promise<RCResult<FriendAddPermission>>;
|
|
12192
12556
|
setNotificationQuietHoursWithSetting(opts: INotificationQuietHoursSetting): Promise<RCResult>;
|
|
12193
12557
|
removeNotificationQuietHoursSetting(): Promise<RCResult>;
|
|
12194
12558
|
getNotificationQuietHoursSetting(): Promise<RCResult<INotificationQuietHoursSetting>>;
|
|
@@ -12225,12 +12589,13 @@ interface IIPCMethods {
|
|
|
12225
12589
|
* 获取自动翻译全局开关
|
|
12226
12590
|
*/
|
|
12227
12591
|
getAutoTranslateEnabled(): Promise<RCResult<boolean>>;
|
|
12228
|
-
|
|
12592
|
+
setCallInfo(targetId: string, key: string, value: string): Promise<RCResult<{
|
|
12593
|
+
key: string;
|
|
12594
|
+
value: string;
|
|
12595
|
+
}>>;
|
|
12596
|
+
rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<RCResult<any>>;
|
|
12229
12597
|
bindRTCRoomForChatroom(options: IRTCRoomBindOption): Promise<RCResult>;
|
|
12230
|
-
rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<
|
|
12231
|
-
code: ErrorCode;
|
|
12232
|
-
buffer?: any;
|
|
12233
|
-
}>;
|
|
12598
|
+
rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<RCResult<Uint8Array>>;
|
|
12234
12599
|
requestSpeechToTextForMessage(messageUId: string, option?: IConvertSpeechToTextOption): Promise<RCResult>;
|
|
12235
12600
|
setMessageSpeechToTextVisible(messageId: number, isVisible: boolean): Promise<RCResult>;
|
|
12236
12601
|
/**
|
|
@@ -12378,6 +12743,11 @@ interface IIPCMethods {
|
|
|
12378
12743
|
* @param includeUG 会话列表支持超级群开关
|
|
12379
12744
|
*/
|
|
12380
12745
|
getUnreadMentionMeConversationList(params: IGetUnreadMentionMeConversationListParams, includeUG: boolean): Promise<RCResult<IReceivedConversation[]>>;
|
|
12746
|
+
/**
|
|
12747
|
+
* 设置融云消息重排开关
|
|
12748
|
+
* @param enableCheck 是否开启融云消息重排开关
|
|
12749
|
+
*/
|
|
12750
|
+
setCheckDuplicateMessage(enableCheck: boolean): Promise<RCResult<boolean>>;
|
|
12381
12751
|
}
|
|
12382
12752
|
|
|
12383
12753
|
/**
|
|
@@ -12827,100 +13197,6 @@ declare type IUserSettingsChangedEvent = {
|
|
|
12827
13197
|
value: boolean;
|
|
12828
13198
|
};
|
|
12829
13199
|
|
|
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
13200
|
/**
|
|
12925
13201
|
* 判断当前是否运行在 electron 环境且搭配 c++ 协议栈使用
|
|
12926
13202
|
*/
|
|
@@ -12936,50 +13212,6 @@ declare const trans2IReceivedStatusInfo: (status: ReceivedStatus) => IReceivedSt
|
|
|
12936
13212
|
*/
|
|
12937
13213
|
declare const transformReceivedStatusFlag: (receivedStatusInfo: IReceivedStatusInfo) => number;
|
|
12938
13214
|
|
|
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
13215
|
/** [EN]
|
|
12984
13216
|
* Log level definitions
|
|
12985
13217
|
* @category Enum
|
|
@@ -13350,10 +13582,6 @@ interface IRuntime {
|
|
|
13350
13582
|
* 存储模块
|
|
13351
13583
|
*/
|
|
13352
13584
|
localStorage: IStorage;
|
|
13353
|
-
/**
|
|
13354
|
-
* 在某些非浏览器平台,其等同于 localStorage
|
|
13355
|
-
*/
|
|
13356
|
-
sessionStorage: IStorage;
|
|
13357
13585
|
/**
|
|
13358
13586
|
* 获取网络状态
|
|
13359
13587
|
* 2g 3g 4g wifi unkown
|
|
@@ -13669,6 +13897,24 @@ declare type IChatRoomEntries = IChatroomEntries;
|
|
|
13669
13897
|
* @deprecated
|
|
13670
13898
|
*/
|
|
13671
13899
|
declare type IRemoveChatRoomEntry = IRemoveChatroomEntry;
|
|
13900
|
+
/**
|
|
13901
|
+
* 发送消息时的可选项信息
|
|
13902
|
+
* @deprecated
|
|
13903
|
+
*/
|
|
13904
|
+
interface ISendMsgOptions extends IMessageSendOptions {
|
|
13905
|
+
/**
|
|
13906
|
+
* @deprecated 参数废弃。SDK 通过注册的消息类型来确定是否计数,发送时不可修改
|
|
13907
|
+
*/
|
|
13908
|
+
isCounted?: boolean;
|
|
13909
|
+
/**
|
|
13910
|
+
* @deprecated 参数废弃。SDK 通过注册的消息类型来确定是否存储,发送时不可修改
|
|
13911
|
+
*/
|
|
13912
|
+
isPersited?: boolean;
|
|
13913
|
+
/**
|
|
13914
|
+
* 会话 Channel ID
|
|
13915
|
+
*/
|
|
13916
|
+
channelId?: string;
|
|
13917
|
+
}
|
|
13672
13918
|
|
|
13673
13919
|
/**
|
|
13674
13920
|
* @todo 后期禁用此方法,容易滥用,且会丢失上下文的数据类型跟踪
|
|
@@ -13702,27 +13948,9 @@ declare type ModuleType<T> = {
|
|
|
13702
13948
|
* @deprecated 因该工具已向 RTC 业务暴露,因此暂时不可删除,待 RTC 迁移到新工具后删除
|
|
13703
13949
|
*/
|
|
13704
13950
|
declare class Codec<T> {
|
|
13705
|
-
|
|
13706
|
-
* Key 对应的 Value 结构映射表,用于不同 Key 数据的编解码
|
|
13707
|
-
*/
|
|
13708
|
-
private pbmaps;
|
|
13709
|
-
/**
|
|
13710
|
-
* 允许不传 logger 实例以向前兼容
|
|
13711
|
-
*/
|
|
13712
|
-
private logger?;
|
|
13713
|
-
private readonly pbModules;
|
|
13714
|
-
/** @deprecated */
|
|
13715
|
-
constructor(
|
|
13716
|
-
/**
|
|
13717
|
-
* Key 对应的 Value 结构映射表,用于不同 Key 数据的编解码
|
|
13718
|
-
*/
|
|
13719
|
-
pbmaps: T, pbDefined: string,
|
|
13720
|
-
/**
|
|
13721
|
-
* 允许不传 logger 实例以向前兼容
|
|
13722
|
-
*/
|
|
13723
|
-
logger?: ILogger | undefined);
|
|
13951
|
+
private readonly pbCodec;
|
|
13724
13952
|
/** @deprecated */
|
|
13725
|
-
|
|
13953
|
+
constructor(pbDefined: string);
|
|
13726
13954
|
/**
|
|
13727
13955
|
* 数据序列化
|
|
13728
13956
|
* @param pbname 待编码数据的 PB 名
|
|
@@ -13745,11 +13973,6 @@ declare class Codec<T> {
|
|
|
13745
13973
|
* @deprecated
|
|
13746
13974
|
*/
|
|
13747
13975
|
decode(pbname: string, uint8array: Uint8Array): any;
|
|
13748
|
-
/**
|
|
13749
|
-
* protobuf 结构中,int64 类型数据无法直接转为 JS 的 number 数据,需计算获取
|
|
13750
|
-
* @param data
|
|
13751
|
-
*/
|
|
13752
|
-
private fixInt64Values;
|
|
13753
13976
|
}
|
|
13754
13977
|
/**
|
|
13755
13978
|
* 请使用 `Codec` 替代 `AbsCodec`
|
|
@@ -13760,6 +13983,7 @@ declare type AbsCodec<T> = Codec<T>;
|
|
|
13760
13983
|
declare const RTCPBMap: CodecPBMaps;
|
|
13761
13984
|
/**
|
|
13762
13985
|
* 仅限 RCCppEngine 内用于类型约束,RTCLib 内不可直接使用
|
|
13986
|
+
* @deprecated
|
|
13763
13987
|
*/
|
|
13764
13988
|
declare type InnerRTCKeyMaps = typeof RTCPBMap;
|
|
13765
13989
|
|
|
@@ -13770,9 +13994,13 @@ declare class PluginContext {
|
|
|
13770
13994
|
* 获取 context
|
|
13771
13995
|
*/
|
|
13772
13996
|
__getContext(): APIContext;
|
|
13773
|
-
/**
|
|
13774
|
-
|
|
13775
|
-
|
|
13997
|
+
/**
|
|
13998
|
+
* 创建 PB 编解码器,目前仅对 RTC 业务使用
|
|
13999
|
+
* @param _ 废弃参数
|
|
14000
|
+
* @param pbDesc PB 描述
|
|
14001
|
+
*/
|
|
14002
|
+
createCodec<T extends CodecPBMaps>(_: T, pbDesc: string): Codec<T>;
|
|
14003
|
+
createPBCodec<T>(desc: string, _?: Map<string, keyof T>): Codec$1<T>;
|
|
13776
14004
|
/**
|
|
13777
14005
|
* 重新请求服务导航数据
|
|
13778
14006
|
*/
|
|
@@ -13840,8 +14068,10 @@ declare class PluginContext {
|
|
|
13840
14068
|
setPushConfig(config: IAppPushConfig): void;
|
|
13841
14069
|
/**
|
|
13842
14070
|
* 发送消息
|
|
14071
|
+
* @deprecated
|
|
13843
14072
|
*/
|
|
13844
|
-
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions):
|
|
14073
|
+
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions): Promise<RCResult<IReceivedMessage>>;
|
|
14074
|
+
sendMessageTo(identifier: IConversationIdentifier, options: IMessageSendOptions): Promise<RCResult<IReceivedMessage>>;
|
|
13845
14075
|
/**
|
|
13846
14076
|
* 消息注册
|
|
13847
14077
|
* @description 消息注册需在应用初始化完成前进行
|
|
@@ -13867,10 +14097,10 @@ declare class PluginContext {
|
|
|
13867
14097
|
* 获取应用主进程信息,仅限 Electron 平台可用
|
|
13868
14098
|
*/
|
|
13869
14099
|
getMainProcessInfo(): IPromiseResult<IProcessInfo>;
|
|
13870
|
-
setCallInfo(targetId: string, key: string, value: string):
|
|
14100
|
+
setCallInfo(targetId: string, key: string, value: string): Promise<RCResult<{
|
|
13871
14101
|
key: string;
|
|
13872
14102
|
value: string;
|
|
13873
|
-
}
|
|
14103
|
+
}>>;
|
|
13874
14104
|
/**
|
|
13875
14105
|
* 创建 logger 实例
|
|
13876
14106
|
* @param id 日志工具 ID,用于区分日志实例,以确定日志调用者身份
|
|
@@ -14089,16 +14319,6 @@ interface IAPIContextOption {
|
|
|
14089
14319
|
*/
|
|
14090
14320
|
loggerProxy?: LogDBProxy;
|
|
14091
14321
|
}
|
|
14092
|
-
interface IConnectResult {
|
|
14093
|
-
/**
|
|
14094
|
-
* 连接错误码
|
|
14095
|
-
*/
|
|
14096
|
-
code: ErrorCode;
|
|
14097
|
-
/**
|
|
14098
|
-
* 导航获取成功后即可有相应的值,在导航数据获取完成之前该值为 undefined
|
|
14099
|
-
*/
|
|
14100
|
-
userId?: string;
|
|
14101
|
-
}
|
|
14102
14322
|
|
|
14103
14323
|
/**
|
|
14104
14324
|
* 应用设置
|
|
@@ -14138,7 +14358,7 @@ declare class AppSettings {
|
|
|
14138
14358
|
interface IChatroomService extends Pick<IIPCMethods, 'getChatroomHistoryMessages' | 'joinChatroom' | 'quitChatroom' | 'getChatroomInfo' | 'setChatroomEntry' | 'setChatroomEntries' | 'removeChatroomEntry' | 'removeChatroomEntries' | 'getChatroomEntry' | 'getAllChatroomEntries' | 'bindRTCRoomForChatroom' | 'setCheckChatRoomDuplicateMessage'> {
|
|
14139
14359
|
}
|
|
14140
14360
|
|
|
14141
|
-
interface IModuleContext {
|
|
14361
|
+
interface IModuleContext extends Pick<IIPCMethods, 'sendMessage'> {
|
|
14142
14362
|
/**
|
|
14143
14363
|
* 应用 Key
|
|
14144
14364
|
*/
|
|
@@ -14175,6 +14395,10 @@ interface IModuleContext {
|
|
|
14175
14395
|
* 日志工具
|
|
14176
14396
|
*/
|
|
14177
14397
|
get logger(): BasicLogger;
|
|
14398
|
+
/**
|
|
14399
|
+
* 是否使用 C++ 引擎
|
|
14400
|
+
*/
|
|
14401
|
+
get usingCppEngine(): boolean;
|
|
14178
14402
|
}
|
|
14179
14403
|
|
|
14180
14404
|
declare class BaseModule {
|
|
@@ -14203,12 +14427,12 @@ declare class ChatroomModule extends BaseModule {
|
|
|
14203
14427
|
/**
|
|
14204
14428
|
* 聊天室服务
|
|
14205
14429
|
*/
|
|
14206
|
-
private readonly
|
|
14430
|
+
private readonly svr;
|
|
14207
14431
|
constructor(ctx: IModuleContext,
|
|
14208
14432
|
/**
|
|
14209
14433
|
* 聊天室服务
|
|
14210
14434
|
*/
|
|
14211
|
-
|
|
14435
|
+
svr: IChatroomService);
|
|
14212
14436
|
/**
|
|
14213
14437
|
* 加入聊天室,若聊天室不存在则创建聊天室
|
|
14214
14438
|
* @param chatroomId 聊天室房间 Id
|
|
@@ -14285,15 +14509,82 @@ declare class ChatroomModule extends BaseModule {
|
|
|
14285
14509
|
bindRTCRoomForChatroom(option: IRTCRoomBindOption): Promise<RCResult>;
|
|
14286
14510
|
}
|
|
14287
14511
|
|
|
14512
|
+
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'> {
|
|
14513
|
+
}
|
|
14514
|
+
|
|
14515
|
+
/**
|
|
14516
|
+
* 数据托管模块
|
|
14517
|
+
*/
|
|
14518
|
+
declare class DataHosting extends BaseModule {
|
|
14519
|
+
private readonly svr;
|
|
14520
|
+
constructor(ctx: IModuleContext, svr: IDataHostingService);
|
|
14521
|
+
/**
|
|
14522
|
+
* 验证用户信息托管是否可用
|
|
14523
|
+
*/
|
|
14524
|
+
private _userProfileEnabled;
|
|
14525
|
+
updateMyUserProfileVisibility(visibility: UserProfileVisibility): Promise<RCResult>;
|
|
14526
|
+
getMyUserProfileVisibility(): Promise<RCResult<UserProfileVisibility>>;
|
|
14527
|
+
searchUserProfileByUniqueId(uniqueId: string): Promise<RCResult<IUserProfileInfo>>;
|
|
14528
|
+
addFriend(userId: string, directionType: DirectionType, extra?: string): Promise<RCResult<IProcessCode>>;
|
|
14529
|
+
deleteFriends(userIds: string[], directionType: DirectionType): Promise<RCResult>;
|
|
14530
|
+
acceptFriendRequest(userId: string): Promise<RCResult>;
|
|
14531
|
+
refuseFriendRequest(userId: string, reason?: string): Promise<RCResult>;
|
|
14532
|
+
setFriendInfo(userId: string, remark: string, extProfile?: Record<string, string>): Promise<RCResult<IErrorKeys>>;
|
|
14533
|
+
checkFriends(userIds: string[], directionType: DirectionType): Promise<RCResult<IFriendRelationInfo[]>>;
|
|
14534
|
+
getFriends(directionType: QueryFriendsDirectionType, option?: IPagingQueryOption): Promise<RCResult<IPagingQueryResult<IFriendInfo>>>;
|
|
14535
|
+
getFriendApplications(option?: IPagingQueryOption, types?: FriendApplicationType[], status?: FriendApplicationStatus[]): Promise<RCResult<IPagingQueryResult<IFriendApplicationInfo>>>;
|
|
14536
|
+
getFriendsInfo(userIds: string[]): Promise<RCResult<IFriendInfo[]>>;
|
|
14537
|
+
searchFriendsInfo(nickname: string): Promise<RCResult<IFriendInfo[]>>;
|
|
14538
|
+
setFriendAddPermission(permission: FriendAddPermission): Promise<RCResult>;
|
|
14539
|
+
getFriendAddPermission(): Promise<RCResult<FriendAddPermission>>;
|
|
14540
|
+
createGroup(groupInfo: IGroupInfoOption, inviteeUserIds?: string[]): Promise<RCResult<ICreateGroupFail>>;
|
|
14541
|
+
updateGroupInfo(groupInfo: IGroupInfoOption): Promise<RCResult<IErrorKeys>>;
|
|
14542
|
+
getGroupsInfo(groupIds: string[]): Promise<RCResult<IGroupInfo[]>>;
|
|
14543
|
+
kickGroupMembers(groupId: string, userIds: string[], config?: IQuitGroupConfig): Promise<RCResult>;
|
|
14544
|
+
quitGroup(groupId: string, config?: IQuitGroupConfig): Promise<RCResult>;
|
|
14545
|
+
dismissGroup(groupId: string): Promise<RCResult>;
|
|
14546
|
+
transferGroupOwner(groupId: string, newOwnerId: string, quit?: boolean, config?: IQuitGroupConfig): Promise<RCResult>;
|
|
14547
|
+
addGroupManagers(groupId: string, userIds: string[]): Promise<RCResult>;
|
|
14548
|
+
removeGroupManagers(groupId: string, userIds: string[]): Promise<RCResult>;
|
|
14549
|
+
getGroupMembers(groupId: string, userIds: string[]): Promise<RCResult<IGroupMemberInfo[]>>;
|
|
14550
|
+
setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra?: string): Promise<RCResult<IErrorKeys>>;
|
|
14551
|
+
searchGroupMembers(groupId: string, nickName: string, option: IPagingQueryOption): Promise<RCResult<IPagingQueryResult<IGroupMemberInfo>>>;
|
|
14552
|
+
getGroupMembersByRole(groupId: string, role: GroupMemberRole, option: IGetGroupMembersOption): Promise<RCResult<IPagingQueryResult<IGroupMemberInfo>>>;
|
|
14553
|
+
addGroupFollows(groupId: string, userIds: string[]): Promise<RCResult>;
|
|
14554
|
+
removeGroupFollows(groupId: string, userIds: string[]): Promise<RCResult>;
|
|
14555
|
+
getGroupFollows(groupId: string): Promise<RCResult<IFollowsInfo[]>>;
|
|
14556
|
+
setGroupRemark(groupId: string, remark: string): Promise<RCResult>;
|
|
14557
|
+
joinGroup(groupId: string): Promise<RCResult<IProcessCode>>;
|
|
14558
|
+
inviteUsersToGroup(groupId: string, userIds: string[]): Promise<RCResult<IProcessCode>>;
|
|
14559
|
+
acceptGroupInvite(groupId: string, inviterId: string): Promise<RCResult>;
|
|
14560
|
+
refuseGroupInvite(groupId: string, inviterId: string, reason?: string): Promise<RCResult>;
|
|
14561
|
+
acceptGroupApplication(groupId: string, joinUserId: string, inviterId?: string): Promise<RCResult<IProcessCode>>;
|
|
14562
|
+
refuseGroupApplication(groupId: string, joinUserId: string, inviterId?: string, reason?: string): Promise<RCResult>;
|
|
14563
|
+
/**
|
|
14564
|
+
* 获取群组请求列表
|
|
14565
|
+
* @param option 分页查询参数
|
|
14566
|
+
* @param directions 群组请求方向,参数仅 Electron 平台支持,且 Electron 为必填项,Web 传递无效
|
|
14567
|
+
* @param status 群组请求状态,参数仅 Electron 平台支持,且 Electron 为必填项,Web 传递无效
|
|
14568
|
+
*/
|
|
14569
|
+
getGroupApplications(option: IPagingQueryOption, directions?: GroupApplicationDirection[], status?: GroupApplicationStatus[]): Promise<RCResult<IPagingQueryResult<IGroupApplicationInfo>>>;
|
|
14570
|
+
getJoinedGroupsByRole(role: GroupMemberRole, option: IPagingQueryOption): Promise<RCResult<IPagingQueryResult<IGroupInfo>>>;
|
|
14571
|
+
searchJoinedGroups(groupName: string, option: IPagingQueryOption): Promise<RCResult<IPagingQueryResult<IGroupInfo>>>;
|
|
14572
|
+
getJoinedGroups(groupIds: string[]): Promise<RCResult<IGroupInfo[]>>;
|
|
14573
|
+
}
|
|
14574
|
+
|
|
14288
14575
|
/**
|
|
14289
14576
|
* 会话聊天模块
|
|
14290
14577
|
*/
|
|
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'> {
|
|
14578
|
+
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
14579
|
getRealtimeConversations(count: number, startTime: number, order: 0 | 1): Promise<RCResult<IReceivedConversation[]>>;
|
|
14293
14580
|
getRealtimeConTotalUnreadCount(): Promise<RCResult<number>>;
|
|
14294
14581
|
clearRealtimeConUnreadCount(identifier: IConversationIdentifier): Promise<RCResult>;
|
|
14295
14582
|
removeRealtimeConversations(identifiers: IConversationIdentifier[]): Promise<RCResult>;
|
|
14296
14583
|
batchGetRealtimeConUnreadCount(identifiers: IConversationIdentifier[]): Promise<RCResult<IConversationUnreadCount[]>>;
|
|
14584
|
+
/**
|
|
14585
|
+
* 批量获取消息已读回执信息,暂仅支持群聊 (V4)
|
|
14586
|
+
*/
|
|
14587
|
+
batchGetMessageReadReceiptInfoV4(conversation: IConversationIdentifier, messageUIds: string[]): Promise<RCResult<IGroupReadReceiptData[]>>;
|
|
14297
14588
|
}
|
|
14298
14589
|
|
|
14299
14590
|
declare class ChatModule extends BaseModule {
|
|
@@ -14303,6 +14594,60 @@ declare class ChatModule extends BaseModule {
|
|
|
14303
14594
|
saveEditedMessageDraft(draft: IEditedMessageDraft, identifier: IConversationIdentifier): Promise<RCResult>;
|
|
14304
14595
|
getEditedMessageDraft(identifier: IConversationIdentifier): Promise<RCResult<IEditedMessageDraft | null>>;
|
|
14305
14596
|
clearEditedMessageDraft(identifier: IConversationIdentifier): Promise<RCResult>;
|
|
14597
|
+
/**
|
|
14598
|
+
* 超级群正在输入中
|
|
14599
|
+
* @param identifier 会话标识
|
|
14600
|
+
*/
|
|
14601
|
+
sendUltraGroupTypingStatus(identifier: IConversationIdentifier): Promise<RCResult>;
|
|
14602
|
+
/**
|
|
14603
|
+
* 发送单群聊输入状态中状态消息
|
|
14604
|
+
* @param identifier 会话标识
|
|
14605
|
+
* @param typingContentType 输入状态消息类型
|
|
14606
|
+
*/
|
|
14607
|
+
sendTypingStatus(identifier: IConversationIdentifier, typingContentType: string): Promise<RCResult<IReceivedMessage>>;
|
|
14608
|
+
/**
|
|
14609
|
+
* 多端未读数同步
|
|
14610
|
+
* @param identifier 会话标识
|
|
14611
|
+
* @param timestamp 同步时间戳
|
|
14612
|
+
*/
|
|
14613
|
+
sendSyncReadStatusMessage(identifier: IConversationIdentifier, timestamp: number): Promise<RCResult>;
|
|
14614
|
+
clearUnreadCountByTimestamp(identifier: IConversationIdentifier, timestamp: number): Promise<RCResult>;
|
|
14615
|
+
/**
|
|
14616
|
+
* 发送群已读回执请求(v1 版本)
|
|
14617
|
+
* @param identifier 会话标识
|
|
14618
|
+
* @param messageUId 消息 UID
|
|
14619
|
+
* @returns
|
|
14620
|
+
*/
|
|
14621
|
+
sendReadReceiptRequest(identifier: IConversationIdentifier, messageUId: string): Promise<RCResult>;
|
|
14622
|
+
/**
|
|
14623
|
+
* 发送单聊已读回执
|
|
14624
|
+
* @param identifier 会话标识
|
|
14625
|
+
* @param messageUId 消息 UID
|
|
14626
|
+
* @param timestamp 消息发送时间
|
|
14627
|
+
*/
|
|
14628
|
+
sendReadReceiptMessage(identifier: IConversationIdentifier, messageUId: string, timestamp: number): Promise<RCResult>;
|
|
14629
|
+
/**
|
|
14630
|
+
* 发送群组消息已读回执
|
|
14631
|
+
* @description 根据导航开关配置确定发送 v1 或 v2 版本;不支持处理其他已读回执版本
|
|
14632
|
+
* @param identifier 会话标识
|
|
14633
|
+
* @param messageList 消息列表
|
|
14634
|
+
*/
|
|
14635
|
+
sendReadReceipt(identifier: IConversationIdentifier, messageList: Record<string, string[]>): Promise<RCResult>;
|
|
14636
|
+
/**
|
|
14637
|
+
* 获取群组消息已读列表(V2)
|
|
14638
|
+
* @param targetId
|
|
14639
|
+
* @param messageUId
|
|
14640
|
+
*/
|
|
14641
|
+
getMessageReader(targetId: string, messageUId: string, channelId?: string): Promise<RCResult<IMessageReaderResponse>>;
|
|
14642
|
+
/**
|
|
14643
|
+
* 发送已读回执 (V4)
|
|
14644
|
+
*/
|
|
14645
|
+
sendReadReceiptMessageV4(conversation: IConversationIdentifier, endMsgUid: string, startMsgUid?: string): Promise<RCResult>;
|
|
14646
|
+
/**
|
|
14647
|
+
* 获取消息已读回执列表,暂仅支持群聊 (V4)
|
|
14648
|
+
*/
|
|
14649
|
+
getMessageReadReceiptV4(conversation: IConversationIdentifier, messageUId: string): Promise<RCResult<IMessageReadReceiptV4Response>>;
|
|
14650
|
+
batchGetMessageReadReceiptInfoV4(conversation: IConversationIdentifier, messageUIds: string[]): Promise<RCResult<IGroupReadReceiptData[]>>;
|
|
14306
14651
|
}
|
|
14307
14652
|
|
|
14308
14653
|
declare class APIContext {
|
|
@@ -14334,14 +14679,9 @@ declare class APIContext {
|
|
|
14334
14679
|
readonly sse: SSEModule;
|
|
14335
14680
|
readonly chatroom: ChatroomModule;
|
|
14336
14681
|
readonly chat: ChatModule;
|
|
14682
|
+
readonly dataHosting: DataHosting;
|
|
14337
14683
|
private _versionInfo;
|
|
14338
14684
|
private _typingInfo;
|
|
14339
|
-
/**
|
|
14340
|
-
* RTC 相关的编解码模块,用于向前兼容 RTC 旧版本的编解码,
|
|
14341
|
-
* 包括向 CppEngine 提供 RTC 业务编解码能力
|
|
14342
|
-
* @deprecated
|
|
14343
|
-
*/
|
|
14344
|
-
readonly rtcCodec: Codec<InnerRTCKeyMaps>;
|
|
14345
14685
|
/**
|
|
14346
14686
|
* engine 内部日志工具
|
|
14347
14687
|
*/
|
|
@@ -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<
|
|
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
|
|
14879
|
+
* 内部发送消息,日志记录不同于 sendMessage
|
|
14880
|
+
* @param identifier 会话标识
|
|
14881
|
+
* @param options 消息发送配置
|
|
14882
|
+
* @param traceId 追踪 ID
|
|
14883
|
+
* @param onBefore 消息发送之前的回调,用于返回消息的 messageId
|
|
14554
14884
|
*/
|
|
14555
|
-
|
|
14885
|
+
innerSendMessage(identifier: IConversationIdentifier, options: IMessageSendOptions, onBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
|
|
14556
14886
|
/**
|
|
14557
14887
|
* 发送消息
|
|
14558
|
-
* @param
|
|
14559
|
-
* @param
|
|
14560
|
-
* @param
|
|
14561
|
-
* @param
|
|
14562
|
-
* @param options
|
|
14888
|
+
* @param identifier 会话标识
|
|
14889
|
+
* @param options 消息发送配置
|
|
14890
|
+
* @param traceId 追踪 ID
|
|
14891
|
+
* @param onBefore 消息发送之前的回调,用于返回消息的 messageId
|
|
14563
14892
|
*/
|
|
14564
|
-
sendMessage(
|
|
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<
|
|
15189
|
+
setCallInfo(targetId: string, key: string, value: string): Promise<RCResult<{
|
|
14899
15190
|
key: string;
|
|
14900
15191
|
value: string;
|
|
14901
15192
|
}>>;
|
|
14902
|
-
private
|
|
15193
|
+
private _validateSubDriven;
|
|
14903
15194
|
/**
|
|
14904
15195
|
* 订阅用户状态事件
|
|
14905
15196
|
*/
|
|
14906
|
-
subscribeUser(userIds: string[], subscribeType: SubscribeType, expiry: number): Promise<
|
|
15197
|
+
subscribeUser(userIds: string[], subscribeType: SubscribeType, expiry: number): Promise<RCResult<string[]>>;
|
|
14907
15198
|
/**
|
|
14908
15199
|
* 取消订阅用户状态事件
|
|
14909
15200
|
*/
|
|
14910
|
-
unSubscribeUser(userIds: string[], subscribeType: SubscribeType): Promise<
|
|
15201
|
+
unSubscribeUser(userIds: string[], subscribeType: SubscribeType): Promise<RCResult>;
|
|
14911
15202
|
/**
|
|
14912
15203
|
* 获取已订阅列表
|
|
14913
15204
|
*/
|
|
14914
|
-
getSubscribeUserList(subscribeType: SubscribeType, count: number, offset: number): Promise<
|
|
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<
|
|
15211
|
+
updateMyUserProfile(profile: IUserProfileInfo): Promise<RCResult<IUpdateMyProfileFail>>;
|
|
14921
15212
|
getUserProfiles(userIds: string[]): Promise<RCResult<IUserProfileInfo[]>>;
|
|
14922
|
-
getMyUserProfile(): Promise<
|
|
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<
|
|
15226
|
+
*/
|
|
15227
|
+
addToBlacklist(userId: string): Promise<RCResult>;
|
|
14940
15228
|
/**
|
|
14941
15229
|
* 将指定用户移除黑名单
|
|
14942
15230
|
*/
|
|
14943
|
-
removeFromBlacklist(userId: string): Promise<
|
|
15231
|
+
removeFromBlacklist(userId: string): Promise<RCResult>;
|
|
14944
15232
|
/**
|
|
14945
15233
|
* 获取黑名单列表
|
|
14946
15234
|
*/
|
|
14947
|
-
getBlacklist(): Promise<
|
|
15235
|
+
getBlacklist(): Promise<RCResult<string[]>>;
|
|
14948
15236
|
/**
|
|
14949
15237
|
* 获取指定人员在黑名单中的状态
|
|
14950
15238
|
*/
|
|
14951
|
-
getBlacklistStatus(userId: string): Promise<
|
|
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<
|
|
15282
|
+
setMessageSentStatus(messageId: number, sentStatus: number): Promise<RCResult>;
|
|
14995
15283
|
/**
|
|
14996
15284
|
* 设置消息接收状态
|
|
14997
15285
|
*/
|
|
14998
|
-
setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<
|
|
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<
|
|
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<
|
|
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
|
|
15067
|
-
rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<
|
|
15068
|
-
|
|
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):
|
|
15359
|
+
setProxy(proxy: IProxy | null): Promise<RCResult>;
|
|
15076
15360
|
/**
|
|
15077
15361
|
* 获取代理
|
|
15078
15362
|
*/
|
|
15079
|
-
getProxy():
|
|
15363
|
+
getProxy(): Promise<RCResult<IProxy>>;
|
|
15080
15364
|
/**
|
|
15081
15365
|
* 测试代理
|
|
15082
15366
|
*/
|
|
15083
|
-
testProxy(proxy: IProxy, testHost: string): Promise<
|
|
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,15 +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<
|
|
15210
|
-
/**
|
|
15211
|
-
* @deprecated 兼容 rtc v3 方法调用
|
|
15212
|
-
*/
|
|
15213
|
-
getRTCRoomInfo(roomId: string): IPromiseResult<IRTCRoomInfo>;
|
|
15214
|
-
/**
|
|
15215
|
-
* @deprecated 兼容 rtc v3 方法调用
|
|
15216
|
-
*/
|
|
15217
|
-
getRTCUserInfoList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
15449
|
+
rtcPingResVersion(roomId: string, mode: number, broadcastType?: number): Promise<RCResult<any>>;
|
|
15218
15450
|
/**
|
|
15219
15451
|
* @deprecated
|
|
15220
15452
|
*/
|
|
@@ -15385,9 +15617,8 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
15385
15617
|
*/
|
|
15386
15618
|
declare type IUserSettingsModule = Pick<IIPCMethods, 'setTranslationLanguage' | 'getTranslationLanguage' | 'setAutoTranslateEnabled' | 'getAutoTranslateEnabled'>;
|
|
15387
15619
|
|
|
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'>;
|
|
15620
|
+
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
15621
|
declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContext {
|
|
15390
|
-
protected readonly rtcCodec: Codec<InnerRTCKeyMaps>;
|
|
15391
15622
|
protected readonly _watcher: IEngineWatcher;
|
|
15392
15623
|
protected readonly _options: IAPIContextOption;
|
|
15393
15624
|
private readonly _logger;
|
|
@@ -15402,6 +15633,9 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
15402
15633
|
*/
|
|
15403
15634
|
abstract get chat(): IChatService;
|
|
15404
15635
|
abstract get chatroom(): IChatroomService;
|
|
15636
|
+
/**
|
|
15637
|
+
* 用户级配置模块
|
|
15638
|
+
*/
|
|
15405
15639
|
abstract get userSettings(): IUserSettingsModule;
|
|
15406
15640
|
abstract get naviInfo(): INaviInfo | null;
|
|
15407
15641
|
get appkey(): string;
|
|
@@ -15409,11 +15643,16 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
15409
15643
|
abstract get connectionStatus(): RCConnectionStatus;
|
|
15410
15644
|
abstract get userId(): string;
|
|
15411
15645
|
get logger(): BasicLogger;
|
|
15646
|
+
abstract get usingCppEngine(): boolean;
|
|
15647
|
+
/**
|
|
15648
|
+
* 用户信息托管模块
|
|
15649
|
+
*/
|
|
15650
|
+
abstract get dataHosting(): IDataHostingService;
|
|
15412
15651
|
/**
|
|
15413
15652
|
* 引擎初始化
|
|
15414
15653
|
* @param _appkey
|
|
15415
15654
|
*/
|
|
15416
|
-
constructor(
|
|
15655
|
+
constructor(_watcher: IEngineWatcher, _options: IAPIContextOption, _logger: BasicLogger);
|
|
15417
15656
|
protected _rtcSignalingListener?: (buffer: Uint8Array) => void;
|
|
15418
15657
|
/**
|
|
15419
15658
|
* 注册 RTC KV 变更监听器
|
|
@@ -15435,7 +15674,7 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
15435
15674
|
* @param openCallPlus
|
|
15436
15675
|
* @param traceId
|
|
15437
15676
|
*/
|
|
15438
|
-
abstract connect(token: string, reconnectKickEnable: boolean, openCallPlus: boolean, traceId: string):
|
|
15677
|
+
abstract connect(token: string, reconnectKickEnable: boolean, openCallPlus: boolean, traceId: string): Promise<RCResult<string>>;
|
|
15439
15678
|
/**
|
|
15440
15679
|
* 发送 SDK 版本
|
|
15441
15680
|
* @param versionInfo
|
|
@@ -15457,59 +15696,27 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
15457
15696
|
* 清除指定会话消息草稿
|
|
15458
15697
|
*/
|
|
15459
15698
|
abstract clearTextMessageDraft(conversation: IConversationOption): Promise<RCResult>;
|
|
15460
|
-
abstract sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, traceId: string,
|
|
15461
15699
|
/**
|
|
15462
|
-
*
|
|
15463
|
-
|
|
15464
|
-
|
|
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
|
-
/**
|
|
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)
|
|
15700
|
+
* 发送消息
|
|
15701
|
+
* @param identifier 会话标识
|
|
15702
|
+
* @param options 消息发送配置
|
|
15703
|
+
* @param traceId 追踪 ID
|
|
15704
|
+
* @param onBefore 消息发送之前的回调,用于返回消息的 messageId
|
|
15485
15705
|
*/
|
|
15486
|
-
abstract
|
|
15706
|
+
abstract sendMessage(identifier: IConversationIdentifier, options: IMessageSendOptions, traceId: string, onBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
|
|
15487
15707
|
/**
|
|
15488
15708
|
* 断开连接
|
|
15489
15709
|
* @param closeDB 是否关闭数据库,默认为 true,仅 Electron 平台有效
|
|
15490
15710
|
* @param disablePush 是否禁用推送,默认为 false(≥ 5.20.0)
|
|
15491
15711
|
*/
|
|
15492
|
-
abstract disconnect(closeDB?: boolean, disablePush?: boolean): Promise<
|
|
15712
|
+
abstract disconnect(closeDB?: boolean, disablePush?: boolean): Promise<RCResult>;
|
|
15493
15713
|
/**
|
|
15494
15714
|
* 消息注册
|
|
15495
15715
|
* @description
|
|
15496
15716
|
* 消息注册需在应用初始化完成前进行,否则在搭配 C++ 协议栈使用时,本端发出的消息将不默认作为未知消息处理,不存储、不计数
|
|
15497
15717
|
*/
|
|
15498
15718
|
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>>;
|
|
15719
|
+
abstract getFileToken(fileType: FileType, fileName?: string, httpMethod?: string, queryUriString?: string, url?: string, size?: number): Promise<RCResult<IUploadAuth>>;
|
|
15513
15720
|
/**
|
|
15514
15721
|
* 获取文件的下载地址
|
|
15515
15722
|
* @param fileType 文件类型
|
|
@@ -15558,7 +15765,7 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
15558
15765
|
* @param targetId
|
|
15559
15766
|
* @param options
|
|
15560
15767
|
*/
|
|
15561
|
-
abstract sendUltraMessage(
|
|
15768
|
+
abstract sendUltraMessage(identifier: IConversationIdentifier, options: IMessageSendOptions, traceId: string, onSendBefore?: (messageId: number) => void): Promise<RCResult<IReceivedMessage>>;
|
|
15562
15769
|
/**
|
|
15563
15770
|
* 设置用户在线状态监听器
|
|
15564
15771
|
*/
|
|
@@ -15576,25 +15783,25 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
15576
15783
|
/**
|
|
15577
15784
|
* 获取用户状态
|
|
15578
15785
|
*/
|
|
15579
|
-
abstract getUserStatus(userId: string):
|
|
15786
|
+
abstract getUserStatus(userId: string): Promise<RCResult<{
|
|
15580
15787
|
status: string;
|
|
15581
|
-
}
|
|
15788
|
+
}>>;
|
|
15582
15789
|
/**
|
|
15583
15790
|
* 加入黑名单
|
|
15584
15791
|
*/
|
|
15585
|
-
abstract addToBlacklist(userId: string): Promise<
|
|
15792
|
+
abstract addToBlacklist(userId: string): Promise<RCResult>;
|
|
15586
15793
|
/**
|
|
15587
15794
|
* 将指定用户移除黑名单
|
|
15588
15795
|
*/
|
|
15589
|
-
abstract removeFromBlacklist(userId: string): Promise<
|
|
15796
|
+
abstract removeFromBlacklist(userId: string): Promise<RCResult>;
|
|
15590
15797
|
/**
|
|
15591
15798
|
* 获取黑名单列表
|
|
15592
15799
|
*/
|
|
15593
|
-
abstract getBlacklist():
|
|
15800
|
+
abstract getBlacklist(): Promise<RCResult<string[]>>;
|
|
15594
15801
|
/**
|
|
15595
15802
|
* 获取指定人员在黑名单中的状态
|
|
15596
15803
|
*/
|
|
15597
|
-
abstract getBlacklistStatus(userId: string):
|
|
15804
|
+
abstract getBlacklistStatus(userId: string): Promise<RCResult<number>>;
|
|
15598
15805
|
/**
|
|
15599
15806
|
* 向本地插入一条消息,不发送到服务器
|
|
15600
15807
|
*/
|
|
@@ -15636,28 +15843,24 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
15636
15843
|
/**
|
|
15637
15844
|
* 通过关键字搜索所有会话
|
|
15638
15845
|
*/
|
|
15639
|
-
abstract searchConversationByContentWithAllChannel(keyword: string, messageTypes: string[], conversationTypes: ConversationType[]):
|
|
15846
|
+
abstract searchConversationByContentWithAllChannel(keyword: string, messageTypes: string[], conversationTypes: ConversationType[]): Promise<RCResult<IReceivedConversation[]>>;
|
|
15640
15847
|
abstract searchMessagesWithParams(params: ISearchMessageParams): Promise<RCResult<ISearchMessagesResult>>;
|
|
15641
15848
|
/**
|
|
15642
15849
|
* 设置消息发送状态
|
|
15643
15850
|
*/
|
|
15644
|
-
abstract setMessageSentStatus(messageId: number, sentStatus: number): Promise<
|
|
15851
|
+
abstract setMessageSentStatus(messageId: number, sentStatus: number): Promise<RCResult>;
|
|
15645
15852
|
/**
|
|
15646
15853
|
* 设置消息接收状态
|
|
15647
15854
|
*/
|
|
15648
|
-
abstract setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<
|
|
15855
|
+
abstract setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<RCResult>;
|
|
15649
15856
|
/**
|
|
15650
15857
|
* 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
|
|
15651
15858
|
*/
|
|
15652
15859
|
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<{
|
|
15860
|
+
abstract setCallInfo(targetId: string, key: string, value: string): Promise<RCResult<{
|
|
15658
15861
|
key: string;
|
|
15659
15862
|
value: string;
|
|
15660
|
-
}
|
|
15863
|
+
}>>;
|
|
15661
15864
|
abstract clearLocalData(): Promise<RCResult<boolean>>;
|
|
15662
15865
|
/**
|
|
15663
15866
|
* 获取运行时的系统信息,仅限 Electron 平台可用
|
|
@@ -15674,7 +15877,7 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
15674
15877
|
/**
|
|
15675
15878
|
* 设置融云消息重排开关
|
|
15676
15879
|
*/
|
|
15677
|
-
abstract setCheckDuplicateMessage(enableCheck: boolean):
|
|
15880
|
+
abstract setCheckDuplicateMessage(enableCheck: boolean): Promise<RCResult<boolean>>;
|
|
15678
15881
|
/**
|
|
15679
15882
|
* RTC 通用调用接口
|
|
15680
15883
|
* 在非 Comet 协议下,入参 sourceData 应为 ArrayBuffer 数据,返回结果为 Uint8Array 数据
|
|
@@ -15683,12 +15886,9 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
15683
15886
|
* @param isQuery 使用 `qry` or `pub` 进行请求,按服务要求传递
|
|
15684
15887
|
* @param sourceData PB 数据
|
|
15685
15888
|
*/
|
|
15686
|
-
abstract rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: ArrayBuffer): Promise<
|
|
15687
|
-
|
|
15688
|
-
|
|
15689
|
-
}>;
|
|
15690
|
-
abstract rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<IAsyncRes<any>>;
|
|
15691
|
-
pullRTCRoomEntry(roomId: string, _timestamp: number): Promise<IAsyncRes<number>>;
|
|
15889
|
+
abstract rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: ArrayBuffer): Promise<RCResult<Uint8Array>>;
|
|
15890
|
+
abstract rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<RCResult<any>>;
|
|
15891
|
+
pullRTCRoomEntry(roomId: string, _timestamp: number): Promise<RCResult<number>>;
|
|
15692
15892
|
/**
|
|
15693
15893
|
* 接收 rtc 资源变更
|
|
15694
15894
|
*/
|
|
@@ -15700,15 +15900,15 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
15700
15900
|
/**
|
|
15701
15901
|
* 设置代理
|
|
15702
15902
|
*/
|
|
15703
|
-
abstract setProxy(proxy: IProxy | null):
|
|
15903
|
+
abstract setProxy(proxy: IProxy | null): Promise<RCResult>;
|
|
15704
15904
|
/**
|
|
15705
15905
|
* 获取代理
|
|
15706
15906
|
*/
|
|
15707
|
-
abstract getProxy():
|
|
15907
|
+
abstract getProxy(): Promise<RCResult<IProxy>>;
|
|
15708
15908
|
/**
|
|
15709
15909
|
* 测试代理
|
|
15710
15910
|
*/
|
|
15711
|
-
abstract testProxy(proxy: IProxy, testHost: string): Promise<
|
|
15911
|
+
abstract testProxy(proxy: IProxy, testHost: string): Promise<RCResult>;
|
|
15712
15912
|
/**
|
|
15713
15913
|
* 设置当前网络
|
|
15714
15914
|
*/
|
|
@@ -15716,73 +15916,22 @@ declare abstract class BasicEngine implements IIPCMethodsInEngine, IModuleContex
|
|
|
15716
15916
|
/**
|
|
15717
15917
|
* 订阅用户状态事件
|
|
15718
15918
|
*/
|
|
15719
|
-
abstract subscribeUser(userIds: string[], subscribeType: SubscribeType, expiry: number): Promise<
|
|
15919
|
+
abstract subscribeUser(userIds: string[], subscribeType: SubscribeType, expiry: number): Promise<RCResult<string[]>>;
|
|
15720
15920
|
/**
|
|
15721
15921
|
* 取消订阅用户状态事件
|
|
15722
15922
|
*/
|
|
15723
|
-
abstract unSubscribeUser(userIds: string[], subscribeType: SubscribeType): Promise<
|
|
15923
|
+
abstract unSubscribeUser(userIds: string[], subscribeType: SubscribeType): Promise<RCResult>;
|
|
15724
15924
|
/**
|
|
15725
15925
|
* 获取已订阅列表
|
|
15726
15926
|
*/
|
|
15727
|
-
abstract getSubscribeUserList(subscribeType: SubscribeType, count: number, offset: number): Promise<
|
|
15927
|
+
abstract getSubscribeUserList(subscribeType: SubscribeType, count: number, offset: number): Promise<RCResult<ISubscribeUserStatusInfo[]>>;
|
|
15728
15928
|
/**
|
|
15729
15929
|
* 获取指定用户的在线状态
|
|
15730
15930
|
*/
|
|
15731
15931
|
abstract getSubscribeUserStatus(subscribeType: SubscribeType, userIds: string[]): Promise<RCResult<ISubscribeUserStatusInfo[]>>;
|
|
15732
|
-
abstract updateMyUserProfile(profile: IUserProfileInfo): Promise<
|
|
15932
|
+
abstract updateMyUserProfile(profile: IUserProfileInfo): Promise<RCResult<IUpdateMyProfileFail>>;
|
|
15733
15933
|
abstract getUserProfiles(userIds: string[]): Promise<RCResult<IUserProfileInfo[]>>;
|
|
15734
|
-
abstract getMyUserProfile(): Promise<
|
|
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>>;
|
|
15934
|
+
abstract getMyUserProfile(): Promise<RCResult<IUserProfileInfo>>;
|
|
15786
15935
|
abstract setNotificationQuietHoursWithSetting(opts: INotificationQuietHoursSetting): Promise<RCResult>;
|
|
15787
15936
|
abstract removeNotificationQuietHoursSetting(): Promise<RCResult>;
|
|
15788
15937
|
abstract getNotificationQuietHoursSetting(): Promise<RCResult<INotificationQuietHoursSetting>>;
|
|
@@ -15855,107 +16004,6 @@ declare class SSEModule extends EventDispatcher<{
|
|
|
15855
16004
|
requestStreamMessageContent(messageUId: string): Promise<RCResult>;
|
|
15856
16005
|
}
|
|
15857
16006
|
|
|
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
16007
|
/**
|
|
15960
16008
|
* 预定义的验证规则,只包含 `值类型` 数据验证
|
|
15961
16009
|
* 引用类型数据需使用自定义 validator 校验函数进行校验
|
|
@@ -15992,15 +16040,7 @@ declare enum AssertRules {
|
|
|
15992
16040
|
/**
|
|
15993
16041
|
* ChannelId 验证,必须为 String 且不超过 20 位 且不能包含下划线
|
|
15994
16042
|
*/
|
|
15995
|
-
CHANNEL_ID = 7
|
|
15996
|
-
/**
|
|
15997
|
-
* 类型为会话
|
|
15998
|
-
*/
|
|
15999
|
-
CONVERSATION = 8,
|
|
16000
|
-
/**
|
|
16001
|
-
* 会话类型验证,必须为 ConversationType
|
|
16002
|
-
*/
|
|
16003
|
-
CONVERSATION_TYPE = 9
|
|
16043
|
+
CHANNEL_ID = 7
|
|
16004
16044
|
}
|
|
16005
16045
|
/**
|
|
16006
16046
|
* 参数校验,该方法用于对业务层入参数据检查,及时抛出异常通知业务层进行修改
|
|
@@ -16026,91 +16066,6 @@ declare const assert: (key: string, value: any, validator: AssertRules | ((value
|
|
|
16026
16066
|
*/
|
|
16027
16067
|
declare const validate: (key: string, value: any, validator: AssertRules | ((value?: any) => boolean), required?: boolean) => boolean;
|
|
16028
16068
|
|
|
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
16069
|
/**
|
|
16115
16070
|
* @deprecated 使用 UUId.gen() 替代
|
|
16116
16071
|
*/
|
|
@@ -16143,4 +16098,4 @@ declare class AppStorage {
|
|
|
16143
16098
|
}): void;
|
|
16144
16099
|
}
|
|
16145
16100
|
|
|
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,
|
|
16101
|
+
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 };
|