@rongcloud/engine 5.20.1-enterprise-alpha.2 → 5.20.2-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -251,11 +251,6 @@ declare const LogTagId: {
251
251
  readonly L_EVENT_LOOP_BLOCKING_S: "L-event_loop_blocking-S";
252
252
  readonly A_E_SEARCH_CONVERSATION_BY_CONTENT_T: "A-e_search_conversation_by_content-T";
253
253
  readonly A_E_SEARCH_CONVERSATION_BY_CONTENT_R: "A-e_search_conversation_by_content-R";
254
- readonly P_GET_SYS_VERSION_E: "P-get_sys_version-E";
255
- /** 清除本地缓存 */
256
- readonly A_CLEAR_LOCAL_CACHE_O: "A-clear_local_cache-O";
257
- readonly A_E_SET_MESSAGE_STATUS_TO_READ_T: "A-e_set_message_status_to_read-T";
258
- readonly A_E_SET_MESSAGE_STATUS_TO_READ_R: "A-e_set_message_status_to_read-R";
259
254
  };
260
255
 
261
256
  /**
@@ -666,7 +661,7 @@ declare enum ErrorCode {
666
661
  SYS_CONVERSATION_NOT_SUPPORT_MESSAGE = 20109,
667
662
  /**
668
663
  * 20512
669
- * appkey 的数据中心与请求云控的数据中心不匹配
664
+ * appkey的数据中心与请求云控的数据中心不匹配
670
665
  * @since 5.8.5
671
666
  */
672
667
  CLOUD_DATA_CENTER_INVALID = 20512,
@@ -697,12 +692,12 @@ declare enum ErrorCode {
697
692
  NOT_IN_DISCUSSION = 21406,
698
693
  /**
699
694
  * 21501
700
- * 发送的消息中包含敏感词(发送方发送失败,接收方不会收到消息)
695
+ * 发送的消息中包含敏感词 (发送方发送失败,接收方不会收到消息)
701
696
  */
702
697
  SENSITIVE_SHIELD = 21501,
703
698
  /**
704
699
  * 21502
705
- * 消息中敏感词已经被替换(接收方可以收到被替换之后的消息)
700
+ * 消息中敏感词已经被替换 (接收方可以收到被替换之后的消息)
706
701
  */
707
702
  SENSITIVE_REPLACE = 21502,
708
703
  /**
@@ -742,8 +737,8 @@ declare enum ErrorCode {
742
737
  NOT_IN_CHATROOM = 23406,
743
738
  /**
744
739
  * 23407
745
- * 聊天室禁言白名单人数超限 (最多 5 个)
746
- * 创建聊天室时,禁言白名单用户列表,支持批量设置,最多不超过 20 个
740
+ * 聊天室禁言白名单人数超限(最多5个)
741
+ * 创建聊天室时,禁言白名单用户列表,支持批量设置,最多不超过 20 个
747
742
  */
748
743
  GET_USERINFO_ERROR = 23407,
749
744
  /**
@@ -808,23 +803,23 @@ declare enum ErrorCode {
808
803
  CHATROOM_KEY_NOT_EXIST = 23427,
809
804
  /**
810
805
  * 23428
811
- * 聊天室批量设置或删除 KV 部分不成功
806
+ * 聊天室批量设置或删除KV部分不成功
812
807
  */
813
808
  CHATROOM_KV_STORE_NOT_ALL_SUCCESS = 23428,
814
809
  /**
815
810
  * 23429
816
- * 聊天室批量设置或删除 KV 数量超限(最多一次 10 条)
811
+ * 聊天室批量设置或删除KV数量超限(最多一次10条)
817
812
  */
818
813
  CHATROOM_KV_STORE_OUT_LIMIT = 23429,
819
814
  /**
820
815
  * 23431
821
- * 聊天室设置 KV 失败,出现在两人或者多端同时操作一个 KV。如果出现该错误,为避免和其他端同时操作,请延时一定时间再试
816
+ * 聊天室设置 KV 失败,出现在两人或者多端同时操作一个 KV。 如果出现该错误,为避免和其他端同时操作,请延时一定时间再试
822
817
  * @since 5.3.0
823
818
  */
824
819
  CHATROOM_KV_SET_ERROR = 23431,
825
820
  /**
826
821
  * 24001
827
- * 没有注册 DeviveId 也就是用户没有登陆
822
+ * 没有注册DeviveId 也就是用户没有登陆
828
823
  * @deprecated
829
824
  */
830
825
  HAVNODEVICEID = 24001,
@@ -854,7 +849,7 @@ declare enum ErrorCode {
854
849
  RC_USER_PROFILE_KEY_NOT_ALLOW_SDK_SET = 24360,
855
850
  /**
856
851
  * 24361
857
- * 用户托管基本属性的 key 列表中没有此 key
852
+ * 用户托管基本属性的key列表中没有此key
858
853
  * @since 5.9.10
859
854
  */
860
855
  RC_USER_PROFILE_KEY_NOT_EXIST = 24361,
@@ -872,7 +867,7 @@ declare enum ErrorCode {
872
867
  RC_USER_PROFILE_EXT_KV_COUNT_EXCEED_LIMIT = 24363,
873
868
  /**
874
869
  * 24364
875
- * 用户托管基本属性或扩展属性的 Value,字符超过最大上限
870
+ * 用户托管基本属性或扩展属性的Value,字符超过最大上限
876
871
  * @since 5.9.10
877
872
  */
878
873
  RC_USER_PROFILE_VALUE_LENGTH_EXCEED_LIMIT = 24364,
@@ -1007,7 +1002,7 @@ declare enum ErrorCode {
1007
1002
  RC_ENTRUST_SERVER_PARAMETER_ERROR = 25403,
1008
1003
  /**
1009
1004
  * 25404
1010
- * 非法操作,非群主修改群权限相关,msg 中返回传的对应的 key
1005
+ * 非法操作,非群主修改群权限相关,msg中返回传的对应的key
1011
1006
  * @since 5.12.0
1012
1007
  */
1013
1008
  RC_GROUP_ILLEGAL_ERROR = 25404,
@@ -1091,7 +1086,7 @@ declare enum ErrorCode {
1091
1086
  RC_GROUP_OWNER_NOT_ALLOW_QUIT_OR_KICK = 25417,
1092
1087
  /**
1093
1088
  * 25418
1094
- * 用户 ID 不在群组中
1089
+ * 用户ID不在群组中
1095
1090
  * @since 5.12.0
1096
1091
  */
1097
1092
  RC_GROUP_USER_NOT_IN_GROUP = 25418,
@@ -1163,13 +1158,13 @@ declare enum ErrorCode {
1163
1158
  RC_GROUP_OLD_GROUP_NOT_ENTRUST = 25429,
1164
1159
  /**
1165
1160
  * 25430
1166
- * 群 ID 不合法,包含特殊字符
1161
+ * 群ID不合法,包含特殊字符
1167
1162
  * @since 5.12.0
1168
1163
  */
1169
1164
  RC_GROUP_ID_INVALID = 25430,
1170
1165
  /**
1171
1166
  * 25432
1172
- * pagetoken 解析失败
1167
+ * pagetoken解析失败
1173
1168
  * @since 5.12.0
1174
1169
  */
1175
1170
  RC_PAGE_TOKEN_PARSING_FAILED = 25432,
@@ -1280,7 +1275,7 @@ declare enum ErrorCode {
1280
1275
  CONVERSATION_TAG_OVERSIZE = 26004,
1281
1276
  /**
1282
1277
  * 26005
1283
- * 未开通 v4 已读回执
1278
+ * 未开通v4已读回执
1284
1279
  */
1285
1280
  RC_READ_RECEIPT_V4_INVALID = 26005,
1286
1281
  /**
@@ -1295,7 +1290,7 @@ declare enum ErrorCode {
1295
1290
  RC_SERVER_PARAMETER_MESSAGEUIDS_CONFUSED = 26007,
1296
1291
  /**
1297
1292
  * 26009
1298
- * 消息 id 不合法
1293
+ * 消息id不合法
1299
1294
  */
1300
1295
  RC_SERVER_PARAMETER_MESSAGEUID_INVALID = 26009,
1301
1296
  /**
@@ -1310,12 +1305,12 @@ declare enum ErrorCode {
1310
1305
  RC_SUBSCRIBE_ONLINE_SERVICE_UNAVAILABLE = 26020,
1311
1306
  /**
1312
1307
  * 26021
1313
- * 用户被订阅量达到上限,详细查看开发文档。
1308
+ * 用户被订阅量达到上限, 详细查看开发文档。
1314
1309
  */
1315
1310
  RC_BESUBSCRIBED_USERIDS_COUNT_EXCEED_LIMIT = 26021,
1316
1311
  /**
1317
1312
  * 26022
1318
- * 订阅用户数达到上限,详细查看开发文档。
1313
+ * 订阅用户数达到上限, 详细查看开发文档。
1319
1314
  */
1320
1315
  RC_SUBSCRIBED_USERIDS_EXCEED_LIMIT = 26022,
1321
1316
  /**
@@ -1402,7 +1397,7 @@ declare enum ErrorCode {
1402
1397
  /**
1403
1398
  * 30012
1404
1399
  * PING 失败
1405
- * @solution 本地网络问题导致 ping 失败,SDK 会进入重连逻辑
1400
+ * @solution 本地网络问题导致ping失败,SDK 会进入重连逻辑
1406
1401
  * @since 5.2.0
1407
1402
  */
1408
1403
  RC_PING_EXCEED_LIMIT = 30012,
@@ -1451,7 +1446,7 @@ declare enum ErrorCode {
1451
1446
  RC_TCP_DISCONNECTED_NO_RMTP = 30021,
1452
1447
  /**
1453
1448
  * 31000
1454
- * 连接 ACK 超时
1449
+ * 连接ACK超时
1455
1450
  * @solution 网络问题,SDK 会进行重连
1456
1451
  * @since 5.2.0
1457
1452
  */
@@ -1464,7 +1459,7 @@ declare enum ErrorCode {
1464
1459
  RC_CONN_PROTO_VERSION_ERROR = 31001,
1465
1460
  /**
1466
1461
  * 31002
1467
- * 客户端 info 字段格式错误,正确格式:{平台类型}-{设备信息}-{sdk 版本}。其中设备信息:{手机类型}|{手机型号}|{网络类型,4G/WIFI}|{运营商标识,移动/电信/联通}
1462
+ * 客户端 info 字段格式错误,正确格式:{平台类型}-{设备信息}-{sdk版本}。 其中设备信息:{手机类型}|{手机型号}|{网络类型,4G/WIFI}|{运营商标识, 移动/电信/联通}
1468
1463
  * @solution 一般是 appkey 错误导致,建议在融云的开发者后台中确认一下当前应用的 appkey 标识是否正确
1469
1464
  * @since 5.2.0
1470
1465
  */
@@ -1539,7 +1534,7 @@ declare enum ErrorCode {
1539
1534
  RC_CONN_TOKEN_EXPIRED = 31020,
1540
1535
  /**
1541
1536
  * 31021
1542
- * Token 中携带 deviceId 时,检测 Token 中 deviceId 与链接设备 deviceId 不一致
1537
+ * Token 中携带 deviceId 时,检测 Token 中deviceId 与链接设备 deviceId 不一致
1543
1538
  * @since 5.7.0
1544
1539
  */
1545
1540
  RC_CONN_DEVICE_ERROR = 31021,
@@ -1569,13 +1564,13 @@ declare enum ErrorCode {
1569
1564
  RC_CONN_WRONG_CLUSTER = 31025,
1570
1565
  /**
1571
1566
  * 31026
1572
- * 开启 AppServer 联合鉴权功能后,到 AppServer 认证失败
1567
+ * 开启AppServer联合鉴权功能后,到AppServer认证失败
1573
1568
  * @since 5.2.0
1574
1569
  */
1575
1570
  RC_APP_AUTH_NOT_PASS = 31026,
1576
1571
  /**
1577
1572
  * 31027
1578
- * 该 token 已经被使用过,无法进行连接 一次性 token 只能连接一次,之后再使用会上报此错误
1573
+ * 该 token 已经被使用过,无法进行连接 一次性 token 只能连接一次,之后再使用会上报此错误
1579
1574
  * @since 5.2.0
1580
1575
  */
1581
1576
  RC_OTP_USED = 31027,
@@ -1628,13 +1623,13 @@ declare enum ErrorCode {
1628
1623
  CONNECTION_REFUSED = 32061,
1629
1624
  /**
1630
1625
  * 33000
1631
- * 将消息存储到本地数据时失败。发送或插入消息时,消息需要存储到本地数据库,当存库失败时,会回调此错误码
1626
+ * 将消息存储到本地数据时失败。 发送或插入消息时,消息需要存储到本地数据库,当存库失败时,会回调此错误码
1632
1627
  * @since 5.2.0
1633
1628
  */
1634
1629
  PROTOCOL_MESSAGE_SAVED_ERROR = 33000,
1635
1630
  /**
1636
1631
  * 33001
1637
- * 协议栈未初始化(可能原因:1,没有调用 SDK 初始化接口;2,SDK so 未正常加载)
1632
+ * 协议栈未初始化(可能原因:1,没有调用SDK初始化接口;2,SDK的so未正常加载)
1638
1633
  * @since 5.2.0
1639
1634
  */
1640
1635
  BIZ_ERROR_CLIENT_NOT_INIT = 33001,
@@ -1734,7 +1729,7 @@ declare enum ErrorCode {
1734
1729
  MESSAGE_EXPANDED_ERROR = 34009,
1735
1730
  /**
1736
1731
  * 34010
1737
- * 消息扩展大小超出限制,默认消息扩展字典 key 长度不超过 32 个字符,value 长度不超过 4096 个字符,设置的 Expansion 键值对不超过 300 个
1732
+ * 消息扩展大小超出限制, 默认消息扩展字典 key 长度不超过 32 个字符,value 长度不超过 4096 个字符,设置的 Expansion 键值对不超过 300 个
1738
1733
  * @since 5.2.0
1739
1734
  */
1740
1735
  EXPANSION_LIMIT_EXCEET = 34010,
@@ -1809,7 +1804,7 @@ declare enum ErrorCode {
1809
1804
  INVALID_PARAMETER_TIMESTAMP = 34202,
1810
1805
  /**
1811
1806
  * 34203
1812
- * 开发者接口调用时传入的 uid (服务器消息唯一 id) 非法
1807
+ * 开发者接口调用时传入的 uid (服务器消息唯一 id)非法
1813
1808
  */
1814
1809
  INVALID_PARAMETER_MESSAGE_UID = 34203,
1815
1810
  /**
@@ -1884,7 +1879,7 @@ declare enum ErrorCode {
1884
1879
  INVALID_PARAMETER_TIMESTRING = 34224,
1885
1880
  /**
1886
1881
  * 34225
1887
- * RCConversationIdentifier 参数非法。可能原因:开发者调用接口传入的 RCConversationIdentifier 参数类型不对或者参数为空
1882
+ * RCConversationIdentifier 参数非法。 可能原因:开发者调用接口传入的 RCConversationIdentifier 参数类型不对或者参数为空
1888
1883
  * @solution conversation is not valid
1889
1884
  * @since 5.9.9
1890
1885
  */
@@ -1972,7 +1967,7 @@ declare enum ErrorCode {
1972
1967
  INVALID_PARAMETER_KEY = 34260,
1973
1968
  /**
1974
1969
  * 34261
1975
- * 参数 keys 非法
1970
+ * 参数keys 非法
1976
1971
  */
1977
1972
  INVALID_PARAMETER_KEYS = 34261,
1978
1973
  /**
@@ -1998,14 +1993,14 @@ declare enum ErrorCode {
1998
1993
  /**
1999
1994
  * 34272
2000
1995
  * 参数 before 非法
2001
- * @solution beforeCount 无效,需要输入大于 0 的正整数
1996
+ * @solution beforeCount 无效,需要输入大于0 的正整数
2002
1997
  * @since 5.9.8
2003
1998
  */
2004
1999
  INVALID_PARAMETER_BEFORE = 34272,
2005
2000
  /**
2006
2001
  * 34273
2007
2002
  * 参数 after 非法
2008
- * @solution afterCount 输入无效,需要输入大于 0 的正整数
2003
+ * @solution afterCount 输入无效,需要输入大于0 的正整数
2009
2004
  * @since 5.9.8
2010
2005
  */
2011
2006
  INVALID_PARAMETER_AFTER = 34273,
@@ -2041,12 +2036,12 @@ declare enum ErrorCode {
2041
2036
  INVALID_PARAMETER_LIMIT = 34279,
2042
2037
  /**
2043
2038
  * 34280
2044
- * MessageDirection 错误
2039
+ * MessageDirection错误
2045
2040
  */
2046
2041
  INVALID_MESSAGE_DIRECTION = 34280,
2047
2042
  /**
2048
2043
  * 34281
2049
- * SentStatus 错误
2044
+ * SentStatus错误
2050
2045
  */
2051
2046
  INVALID_MESSAGE_SENT_STATUS = 34281,
2052
2047
  /**
@@ -2067,14 +2062,14 @@ declare enum ErrorCode {
2067
2062
  INVALID_PARAMETER_CONVERSATION_TYPE_LIST = 34284,
2068
2063
  /**
2069
2064
  * 34287
2070
- * 开发者调用接口传入的 ConversationIdentifier 数组参数为空、数组长度为 0 或超过限制、包含 null 或非法对象
2071
- * @solution 传入的 ConversationList 数组参数为空、数组长度为 0 或超过限制、包含 null 或非法对象
2065
+ * 开发者调用接口传入的 ConversationIdentifier 数组参数为空、数组长度为 0或超过限制、包含 null 或非法对象
2066
+ * @solution 传入的 ConversationList 数组参数为空、数组长度为 0或超过限制、包含 null 或非法对象
2072
2067
  * @since 5.9.9
2073
2068
  */
2074
2069
  INVALID_PARAMETER_CONVERSATION_LIST = 34287,
2075
2070
  /**
2076
2071
  * 34288
2077
- * 开发者调用接口传入的 ClearMessageOption 数组参数为空、数组长度为 0 或超过限制、包含 null 或非法对象
2072
+ * 开发者调用接口传入的 ClearMessageOption 数组参数为空、数组长度为 0或超过限制、包含 null 或非法对象
2078
2073
  */
2079
2074
  INVALID_PARAMETER_CLEAR_MESSAGE_OPTION_LIST = 34288,
2080
2075
  /**
@@ -2091,12 +2086,12 @@ declare enum ErrorCode {
2091
2086
  INVALID_PARAMETER_END_MESSAGE_UID = 34290,
2092
2087
  /**
2093
2088
  * 34291
2094
- * 不支持 V4 已读回执功能
2089
+ * 不支持V4已读回执功能
2095
2090
  */
2096
2091
  READ_RECEIPT_V4_NOT_SUPPORT = 34291,
2097
2092
  /**
2098
2093
  * 34292
2099
- * 不支持更新 v4 已读回执信息
2094
+ * 不支持更新v4已读回执信息
2100
2095
  */
2101
2096
  READ_RECEIPT_V4_UPDATE_NOT_SUPPORT = 34292,
2102
2097
  /**
@@ -2138,7 +2133,7 @@ declare enum ErrorCode {
2138
2133
  INVALID_PARAMETER_SUBSCRIBE_TYPE = 34306,
2139
2134
  /**
2140
2135
  * 34307
2141
- * 订阅事件传入的订阅时长非法 [60s ~ 30 天]
2136
+ * 订阅事件传入的订阅时长非法[60s ~ 30天]
2142
2137
  */
2143
2138
  INVALID_PARAMETER_SUBSCRIBE_EXPIRY = 34307,
2144
2139
  /**
@@ -2149,7 +2144,7 @@ declare enum ErrorCode {
2149
2144
  /**
2150
2145
  * 34309
2151
2146
  * 订阅事件传入的分页大小非法
2152
- * @solution 订阅相关接口传入的分页大小非法 [1~200]
2147
+ * @solution 订阅相关接口传入的分页大小非法[1~200]
2153
2148
  */
2154
2149
  INVALID_PARAMETER_SUBSCRIBE_PAGESIZE = 34309,
2155
2150
  /**
@@ -2343,7 +2338,7 @@ declare enum ErrorCode {
2343
2338
  HOSTNAME_ERROR = 35009,
2344
2339
  /**
2345
2340
  * 35010
2346
- * 开启 `禁止把已在线客户端踢下线` 开关后,该错误码标识已有同类型端在线,禁止链接
2341
+ * 开启`禁止把已在线客户端踢下线`开关后,该错误码标识已有同类型端在线,禁止链接
2347
2342
  * @deprecated
2348
2343
  */
2349
2344
  HAS_OHTER_SAME_CLIENT_ON_LINE = 35010,
@@ -2400,7 +2395,7 @@ declare enum ErrorCode {
2400
2395
  INVALID_PARAMETER_DRAFT = 35028,
2401
2396
  /**
2402
2397
  * 35029
2403
- * 开发者调用时传入的 message 无效,message 应是对象或者 BaseMessage 的子类
2398
+ * 开发者调用时传入的 message 无效, message 应是对象或者 BaseMessage 的子类
2404
2399
  */
2405
2400
  INVALID_PARAMETER_MESSAGE = 35029,
2406
2401
  /**
@@ -2546,7 +2541,7 @@ declare enum ErrorCode {
2546
2541
  SEND_READ_RECEIPT_CONF_ERROR = 35056,
2547
2542
  /**
2548
2543
  * 36001
2549
- * 加入聊天室 Id 为空
2544
+ * 加入聊天室Id为空
2550
2545
  * @deprecated
2551
2546
  */
2552
2547
  CHATROOM_ID_ISNULL = 36001,
@@ -2630,7 +2625,7 @@ declare enum ErrorCode {
2630
2625
  STREAM_MESSAGE_SYNCED = 39007,
2631
2626
  /**
2632
2627
  * 41002
2633
- * 获取七牛 token 失败
2628
+ * 获取七牛token失败
2634
2629
  * @deprecated
2635
2630
  */
2636
2631
  QNTKN_GET_ERROR = 41002,
@@ -6112,6 +6107,33 @@ interface IGroupMessageDeliverStatus {
6112
6107
  list: IGroupMessageDeliveredStatusInfo[];
6113
6108
  }
6114
6109
 
6110
+ /**
6111
+ * 异步任务结果结构
6112
+ * @description 该结构即将废弃,请使用 {@link RCResult} 替代
6113
+ * @category Interface
6114
+ */
6115
+ declare type IAsyncRes<T = void> = Pick<RCResult<T>, 'code' | 'data'> & {
6116
+ msg?: string;
6117
+ };
6118
+ /**
6119
+ * 异步任务结果定义
6120
+ * @description
6121
+ * 通过 `Promise.resolve` 来处理预期内的异常,进而通过 Uncatch Promise Error 暴露预期外的异常
6122
+ * @category Type
6123
+ */
6124
+ declare type IPromiseResult<T = void> = Promise<IAsyncRes<T>>;
6125
+
6126
+ /**
6127
+ * 拓展方法定义,便于 electron-solution 实现时保持接口类型推导可用
6128
+ */
6129
+ interface IExtraMethod {
6130
+ getHistoryMessagesByObjectNames(conversationType: ConversationType, targetId: string, sentTime: number, count: number, objectNames: string[], desc: 0 | 1, tag: string): Promise<IAsyncRes<{
6131
+ list: IReceivedMessage[];
6132
+ hasMore: boolean;
6133
+ }>>;
6134
+ updateMessageReceiptStatus(conersationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<IAsyncRes<boolean>>;
6135
+ }
6136
+
6115
6137
  interface IServerAddressData {
6116
6138
  addr: string;
6117
6139
  protocol: EConnectProtocol;
@@ -6470,22 +6492,6 @@ interface INaviInfo {
6470
6492
  };
6471
6493
  }
6472
6494
 
6473
- /**
6474
- * 异步任务结果结构
6475
- * @description 该结构即将废弃,请使用 {@link RCResult} 替代
6476
- * @category Interface
6477
- */
6478
- declare type IAsyncRes<T = void> = Pick<RCResult<T>, 'code' | 'data'> & {
6479
- msg?: string;
6480
- };
6481
- /**
6482
- * 异步任务结果定义
6483
- * @description
6484
- * 通过 `Promise.resolve` 来处理预期内的异常,进而通过 Uncatch Promise Error 暴露预期外的异常
6485
- * @category Type
6486
- */
6487
- declare type IPromiseResult<T = void> = Promise<IAsyncRes<T>>;
6488
-
6489
6495
  /**
6490
6496
  * 用户信息
6491
6497
  * @since 5.10.1
@@ -7047,7 +7053,7 @@ interface IGroupApplicationInfo {
7047
7053
  */
7048
7054
  type: GroupApplicationType;
7049
7055
  /**
7050
- * 操作时间:时间戳精确到毫秒
7056
+ * 申请发起时间
7051
7057
  */
7052
7058
  operationTime: number;
7053
7059
  /**
@@ -7569,6 +7575,13 @@ interface IIPCMethods {
7569
7575
  * 连接时间
7570
7576
  */
7571
7577
  getConnectedTime(): number;
7578
+ /**
7579
+ * 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
7580
+ * 对于未实现的方法,接口响应 Unsupport 错误码
7581
+ * @param method
7582
+ * @param args
7583
+ */
7584
+ callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
7572
7585
  /**
7573
7586
  * 获取历史消息
7574
7587
  * @param conversationType
@@ -8005,7 +8018,7 @@ interface IIPCMethods {
8005
8018
  /**
8006
8019
  * 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
8007
8020
  */
8008
- updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<RCResult<boolean>>;
8021
+ updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): IPromiseResult<boolean>;
8009
8022
  /**
8010
8023
  * 删除时间戳前的未读数
8011
8024
  */
@@ -8021,7 +8034,7 @@ interface IIPCMethods {
8021
8034
  * 获取所有群聊会话 @ 消息未读数
8022
8035
  */
8023
8036
  getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
8024
- clearLocalData(): Promise<RCResult<boolean>>;
8037
+ clearData(): Promise<IAsyncRes<boolean>>;
8025
8038
  /**
8026
8039
  * 获取运行时的系统信息,仅限 Electron 平台可用
8027
8040
  */
@@ -8569,6 +8582,7 @@ declare type EnableLogL = LogL.DEBUG | LogL.INFO | LogL.WARN | LogL.ERROR;
8569
8582
  declare type LogContent = string | number | boolean | null;
8570
8583
  declare type LogType = 'IM' | 'RTC';
8571
8584
  /**
8585
+ * @hidden
8572
8586
  * 日志数据结构
8573
8587
  */
8574
8588
  interface ILogData {
@@ -8609,6 +8623,40 @@ interface ILogData {
8609
8623
  loggerId?: string;
8610
8624
  }
8611
8625
 
8626
+ declare type LogReader = (startTime: number, endTime: number, level: LogL, realtimeReport: boolean, tableName?: string) => Promise<{
8627
+ logs: ILogData[];
8628
+ }>;
8629
+ declare type LogWriter = (data: ILogData) => void;
8630
+ /**
8631
+ * @hidden
8632
+ */
8633
+ declare class LogDBProxy {
8634
+ #private;
8635
+ /**
8636
+ * 仅供内部使用,谨慎调用
8637
+ */
8638
+ read(startTime: number, endTime: number, level: LogL, realtimeReport: boolean, tableName?: string): Promise<{
8639
+ logs: ILogData[];
8640
+ }>;
8641
+ /**
8642
+ * 仅供内部使用,谨慎调用
8643
+ */
8644
+ write(data: ILogData): void | Promise<void>;
8645
+ /**
8646
+ * 设置日志读取实现
8647
+ */
8648
+ setLogReader(reader: LogReader): this;
8649
+ /**
8650
+ * 设置日志写入实现
8651
+ */
8652
+ setLogWriter(writer: LogWriter): this;
8653
+ }
8654
+ /**
8655
+ * @hidden
8656
+ * 创建一个默认的日志代理
8657
+ */
8658
+ declare function createLogDBProxy(): LogDBProxy;
8659
+
8612
8660
  /**
8613
8661
  * Logger 抽象基类,定义日志采集接口与进程内打印,
8614
8662
  * 由子类继承实现入库逻辑
@@ -8617,15 +8665,12 @@ declare abstract class BasicLogger {
8617
8665
  protected readonly _appkey: string;
8618
8666
  protected readonly _id: string;
8619
8667
  protected readonly _type: LogType;
8668
+ protected readonly logDB: LogDBProxy;
8620
8669
  /**
8621
8670
  * traceId 计数
8622
8671
  */
8623
8672
  private static _traceIdCount;
8624
- constructor(_appkey: string, _id: string, _type: LogType);
8625
- /**
8626
- * 由子类继承实现日志入库
8627
- */
8628
- protected abstract _handleWrite(data: ILogData): void;
8673
+ constructor(_appkey: string, _id: string, _type: LogType, logDB: LogDBProxy);
8629
8674
  protected _write(logData: ILogData): void;
8630
8675
  /**
8631
8676
  * 创建事务追踪 ID,全局唯一,便于跨进程、异步事务追踪,需要考虑多进程
@@ -8665,6 +8710,8 @@ declare abstract class BasicLogger {
8665
8710
  * 内部质量数据统计接口
8666
8711
  */
8667
8712
  record: (tag: string, content?: LogContent | undefined, traceId?: string | undefined) => void;
8713
+ abstract getTimestamp4RealtimeLog(): number;
8714
+ abstract setTimestamp4RealtimeLog(timestamp: number): void;
8668
8715
  }
8669
8716
 
8670
8717
  declare type ILogger = Pick<BasicLogger, 'createTraceId' | 'info' | 'warn' | 'error' | 'debug' | 'setOutputLevel'>;
@@ -9521,14 +9568,9 @@ interface IAPIContextOption {
9521
9568
  */
9522
9569
  eventLoopBlockingCheck?: boolean;
9523
9570
  /**
9524
- * 开启已读回执信息本地存储
9525
- */
9526
- enableReadReceiptStorage: boolean;
9527
- /**
9528
- * 启动导航服务 V2,默认关闭,仅私有云有效
9529
- * @since 5.22.0
9571
+ * 日志存储代理
9530
9572
  */
9531
- useNaviV2?: boolean;
9573
+ loggerProxy?: LogDBProxy;
9532
9574
  }
9533
9575
  interface IConnectResult {
9534
9576
  /**
@@ -10242,6 +10284,13 @@ declare class APIContext {
10242
10284
  * 根据超级群的 targetId 数组,获取每个超级群下所有频道会话信息
10243
10285
  */
10244
10286
  getUltraGroupUnreadInfoList(targetIds: string[]): Promise<IAsyncRes<IUltraGroupUnreadInfo[]>>;
10287
+ /**
10288
+ * 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
10289
+ * 对于未实现的方法,接口响应 Unsupport 错误码
10290
+ * @param method 方法名
10291
+ * @param args
10292
+ */
10293
+ callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
10245
10294
  /**
10246
10295
  * 获取运行时的系统信息,仅限 Electron 平台可用
10247
10296
  */
@@ -10364,7 +10413,7 @@ declare class APIContext {
10364
10413
  /**
10365
10414
  * 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
10366
10415
  */
10367
- setMessageStatusToRead(conversation: IConversationOption, timestamp: number): Promise<RCResult<boolean>>;
10416
+ setMessageStatusToRead(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<IAsyncRes<boolean>>;
10368
10417
  /**
10369
10418
  * 设置当前用户在线状态
10370
10419
  * @deprecated 老版 V2 中用到
@@ -10427,7 +10476,7 @@ declare class APIContext {
10427
10476
  list: IReceivedMessage[];
10428
10477
  hasMore: boolean;
10429
10478
  }>>;
10430
- clearLocalData(): Promise<RCResult<boolean>>;
10479
+ clearData(): Promise<IAsyncRes<boolean>>;
10431
10480
  createLogger(id: string, type: LogType): BasicLogger;
10432
10481
  getConversations(conversationList: IConversationOption[]): Promise<IAsyncRes<IReceivedConversation[]>>;
10433
10482
  /**
@@ -10782,6 +10831,13 @@ declare abstract class BasicEngine {
10782
10831
  * 获取 engine 包内部 logger 工具
10783
10832
  */
10784
10833
  getInnerLogger(): BasicLogger;
10834
+ /**
10835
+ * 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
10836
+ * 对于未实现的方法,接口响应 Unsupport 错误码
10837
+ * @param method
10838
+ * @param args
10839
+ */
10840
+ abstract callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
10785
10841
  /**
10786
10842
  * 建立连接
10787
10843
  * @param token
@@ -11328,7 +11384,7 @@ declare abstract class BasicEngine {
11328
11384
  /**
11329
11385
  * 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
11330
11386
  */
11331
- abstract updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<RCResult<boolean>>;
11387
+ abstract updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): IPromiseResult<boolean>;
11332
11388
  /**
11333
11389
  * 删除时间戳前的未读数
11334
11390
  */
@@ -11372,7 +11428,7 @@ declare abstract class BasicEngine {
11372
11428
  * 获取所有群聊会话 @ 消息未读数
11373
11429
  */
11374
11430
  abstract getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
11375
- abstract clearLocalData(): Promise<RCResult<boolean>>;
11431
+ abstract clearData(): Promise<IAsyncRes<boolean>>;
11376
11432
  /**
11377
11433
  * 超级群获取指定会话未读 @ 消息列表
11378
11434
  */
@@ -11895,4 +11951,4 @@ declare class AppStorage {
11895
11951
  }): void;
11896
11952
  }
11897
11953
 
11898
- export { APIContext, AbsCodec, AppStorage, AreaCode, AssertRules, BasicEngine, BasicLogger, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectionStatus, ConversationListFilter, ConversationListFilterType, ConversationType, DirectionType, EnableLogL, ErrorCode, EventEmitter, FileType, FriendAddPermission, FriendApplicationStatus, FriendApplicationType, FriendRelationType, GetAllConversationListFilterParams, GetConversationListByPageIndexParams, GetConversationListByTimestampParams, GetConversationListResponse, GetTopConversationListParams, GetUnreadConversationListParams, GroupApplicationDirection, GroupApplicationStatus, GroupApplicationType, GroupInviteHandlePermission, GroupJoinPermission, GroupMemberInfoEditPermission, GroupMemberRole, GroupOperation, GroupOperationPermission, GroupOperationRole, GroupOperationStatus, GroupOperationType, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAppPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatModule, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomModule, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IClearMessageOption, ICombineV2MessageContent, ICombinedMessage, IConnectionStatusListener, IConversationIdentifier, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagListener, IConversationUnreadCount, ICreateGroupFail, IDataHostingModule, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEngineWatcher, IErrorKeys, IEventListener, IExpansionListener, IExpansionListenerData, IFirstUnreadMessageInfo, IFollowsInfo, IFriendAdd, IFriendApplicationInfo, IFriendApplicationStatusChange, IFriendDelete, IFriendInfo, IFriendInfoChangedSync, IFriendRelationInfo, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupApplicationInfo, IGroupFollowsChangedSync, IGroupFollowsList, IGroupFollowsUserInfo, IGroupInfo, IGroupInfoChanged, IGroupInfoOption, IGroupMemberInfo, IGroupMemberInfoChanged, IGroupMembers, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IGroupOperationInfo, IGroupReadReceiptData, IGroupRemarkChangedSync, IHarmonyOSPushConfig, IIPCMethods, IInsertMessage, IInsertMsgOptions, ILocalTagStatus, ILogData, ILogger, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, INaviInfo, INetwork, INotificationQuietHoursSetting, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPagingQueryOption, IPagingQueryResult, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessCode, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IQuitGroupConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IRequest, IResponse, IRuntime, ISendMsgOptions, IServerGroupBaseInfo, IStorage, IStreamMessageResponseChunkData, IStreamMessageResponseEventData, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserStatusInfo, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadMsg, IUpdateItem, IUpdateMyProfileFail, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IUserProfileInfo, IWatcher, IiOSPushConfig, InnerRTCKeyMaps, InterruptionLevel, ItypingStateListener, KVString, LogL, LogLevel, LogSource, LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_UPLOAD_FILE_SIZE, MentionedInfo, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageRegisterParams, MessageType, MessageTypeDescription, NotificationLevel, NotificationStatus, OnlineStatus, OperateStatus, Codec$1 as PBCodec, PlatformInfo, PluginContext, PushImportanceHonor, PushNotificationQuietHoursLevel, QueryFriendsDirectionType, RCConnectionStatus, RCResult, RTCApiType, RTCJoinType, RTCMode, RTCPluginContext, ReadReceiptInfoV5, ReadReceiptResponseV5, ReadReceiptUser, ReadReceiptUsersOption, ReadReceiptUsersResult, ReceivedStatus, SSEModule, SentStatus, StreamMessageResponseEventType, SubscribeOperationType, SubscribeType, SuspendablePromise, UPLOAD_FILE_CHUNK_SIZE, UUId, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod, UserProfileVisibility, Validator, ValidatorManage, VersionManage, assert, fail, fixUrlProtocol, forEach, getMessageTypeDescription, getUUID, getUUID22, hasMessageTypeDescription, httpRequest, isArray, isBoolean, isFunction, isHttpUrl, isInteger, isLimitedArray, isLimitedString, isNull, isNumber, isObject, isString, isUndefined, isValidConversation, isValidConversationType, isValidEnum, isValidFileType, isValidGroupId, isValidNotificationLevel, isValidTargetId, logger, map, notEmptyArray, notEmptyObject, notEmptyString, ok, runtime, trans2IReceivedStatusInfo, trans2NotificationLevel, trans2NotificationStatus, transformReceivedStatusFlag, usingCppEngine, validate };
11954
+ export { APIContext, AbsCodec, AppStorage, AreaCode, AssertRules, BasicEngine, BasicLogger, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectionStatus, ConversationListFilter, ConversationListFilterType, ConversationType, DirectionType, EnableLogL, ErrorCode, EventEmitter, FileType, FriendAddPermission, FriendApplicationStatus, FriendApplicationType, FriendRelationType, GetAllConversationListFilterParams, GetConversationListByPageIndexParams, GetConversationListByTimestampParams, GetConversationListResponse, GetTopConversationListParams, GetUnreadConversationListParams, GroupApplicationDirection, GroupApplicationStatus, GroupApplicationType, GroupInviteHandlePermission, GroupJoinPermission, GroupMemberInfoEditPermission, GroupMemberRole, GroupOperation, GroupOperationPermission, GroupOperationRole, GroupOperationStatus, GroupOperationType, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAppPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatModule, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomModule, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IClearMessageOption, ICombineV2MessageContent, ICombinedMessage, IConnectionStatusListener, IConversationIdentifier, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagListener, IConversationUnreadCount, ICreateGroupFail, IDataHostingModule, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEngineWatcher, IErrorKeys, IEventListener, IExpansionListener, IExpansionListenerData, IExtraMethod, IFirstUnreadMessageInfo, IFollowsInfo, IFriendAdd, IFriendApplicationInfo, IFriendApplicationStatusChange, IFriendDelete, IFriendInfo, IFriendInfoChangedSync, IFriendRelationInfo, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupApplicationInfo, IGroupFollowsChangedSync, IGroupFollowsList, IGroupFollowsUserInfo, IGroupInfo, IGroupInfoChanged, IGroupInfoOption, IGroupMemberInfo, IGroupMemberInfoChanged, IGroupMembers, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IGroupOperationInfo, IGroupReadReceiptData, IGroupRemarkChangedSync, IHarmonyOSPushConfig, IIPCMethods, IInsertMessage, IInsertMsgOptions, ILocalTagStatus, ILogData, ILogger, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, INaviInfo, INetwork, INotificationQuietHoursSetting, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPagingQueryOption, IPagingQueryResult, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessCode, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IQuitGroupConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IRequest, IResponse, IRuntime, ISendMsgOptions, IServerGroupBaseInfo, IStorage, IStreamMessageResponseChunkData, IStreamMessageResponseEventData, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserStatusInfo, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadMsg, IUpdateItem, IUpdateMyProfileFail, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IUserProfileInfo, IWatcher, IiOSPushConfig, InnerRTCKeyMaps, InterruptionLevel, ItypingStateListener, KVString, LogDBProxy, LogL, LogLevel, LogSource, LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_UPLOAD_FILE_SIZE, MentionedInfo, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageRegisterParams, MessageType, MessageTypeDescription, NotificationLevel, NotificationStatus, OnlineStatus, OperateStatus, Codec$1 as PBCodec, PlatformInfo, PluginContext, PushImportanceHonor, PushNotificationQuietHoursLevel, QueryFriendsDirectionType, RCConnectionStatus, RCResult, RTCApiType, RTCJoinType, RTCMode, RTCPluginContext, ReadReceiptInfoV5, ReadReceiptResponseV5, ReadReceiptUser, ReadReceiptUsersOption, ReadReceiptUsersResult, ReceivedStatus, SSEModule, SentStatus, StreamMessageResponseEventType, SubscribeOperationType, SubscribeType, SuspendablePromise, UPLOAD_FILE_CHUNK_SIZE, UUId, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod, UserProfileVisibility, Validator, ValidatorManage, VersionManage, assert, createLogDBProxy, fail, fixUrlProtocol, forEach, getMessageTypeDescription, getUUID, getUUID22, hasMessageTypeDescription, httpRequest, isArray, isBoolean, isFunction, isHttpUrl, isInteger, isLimitedArray, isLimitedString, isNull, isNumber, isObject, isString, isUndefined, isValidConversation, isValidConversationType, isValidEnum, isValidFileType, isValidGroupId, isValidNotificationLevel, isValidTargetId, logger, map, notEmptyArray, notEmptyObject, notEmptyString, ok, runtime, trans2IReceivedStatusInfo, trans2NotificationLevel, trans2NotificationStatus, transformReceivedStatusFlag, usingCppEngine, validate };