@rongcloud/engine 5.7.2-beem.5 → 5.7.2-beem.7
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 +2098 -2030
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1506,2844 +1506,2868 @@ declare enum SentStatus {
|
|
|
1506
1506
|
DESTROYED = 60
|
|
1507
1507
|
}
|
|
1508
1508
|
|
|
1509
|
-
|
|
1509
|
+
/**
|
|
1510
|
+
* @category Interface
|
|
1511
|
+
*/
|
|
1512
|
+
interface IChatroomEntryListenerData {
|
|
1510
1513
|
/**
|
|
1511
|
-
*
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
+
* 更新的键
|
|
1515
|
+
*/
|
|
1516
|
+
key: string;
|
|
1514
1517
|
/**
|
|
1515
|
-
*
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
declare enum UltraMsgChangeType {
|
|
1531
|
-
MSG_EXPANSION = 1,
|
|
1532
|
-
MSG_MODIFY = 2,
|
|
1533
|
-
MSG_RECALL = 3,
|
|
1534
|
-
CHANNEL_CHANGE = 4,
|
|
1535
|
-
USER_GROUP_CHANGE = 5
|
|
1518
|
+
* 更新的值
|
|
1519
|
+
*/
|
|
1520
|
+
value: string;
|
|
1521
|
+
/**
|
|
1522
|
+
* 更新的时间
|
|
1523
|
+
*/
|
|
1524
|
+
timestamp: number;
|
|
1525
|
+
/**
|
|
1526
|
+
* 更新的聊天室 ID
|
|
1527
|
+
*/
|
|
1528
|
+
chatroomId: string;
|
|
1529
|
+
/**
|
|
1530
|
+
* 更新类型
|
|
1531
|
+
*/
|
|
1532
|
+
type: ChatroomEntryType;
|
|
1536
1533
|
}
|
|
1537
|
-
/**
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1534
|
+
/**
|
|
1535
|
+
* @category Interface
|
|
1536
|
+
*/
|
|
1537
|
+
interface IChatroomRejoinedFailed {
|
|
1538
|
+
/**
|
|
1539
|
+
* 自动重新加入的聊天室 ID
|
|
1540
|
+
*/
|
|
1541
|
+
chatroomId: string;
|
|
1542
|
+
/**
|
|
1543
|
+
* 自动重新加入失败的 code
|
|
1544
|
+
*/
|
|
1545
|
+
errorCode: number;
|
|
1545
1546
|
}
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1547
|
+
/**
|
|
1548
|
+
* @category Interface
|
|
1549
|
+
*/
|
|
1550
|
+
interface IChatroomRejoinedSuccessed {
|
|
1551
|
+
/**
|
|
1552
|
+
* 自动重新加入的聊天室 ID
|
|
1553
|
+
*/
|
|
1554
|
+
chatroomId: string;
|
|
1555
|
+
/**
|
|
1556
|
+
* 自动重新加入的聊天室拉取消息的数量
|
|
1557
|
+
*/
|
|
1558
|
+
count: number;
|
|
1552
1559
|
}
|
|
1553
|
-
|
|
1554
1560
|
/**
|
|
1555
|
-
*
|
|
1561
|
+
* @category Interface
|
|
1556
1562
|
*/
|
|
1557
|
-
|
|
1563
|
+
interface IChatroomUserChangeInfo {
|
|
1564
|
+
users: {
|
|
1565
|
+
[userId: string]: ChatroomUserChangeType;
|
|
1566
|
+
};
|
|
1567
|
+
chatroomId: string;
|
|
1568
|
+
}
|
|
1569
|
+
declare type IChatroomRejoinedInfo = IChatroomRejoinedFailed | IChatroomRejoinedSuccessed;
|
|
1570
|
+
/**
|
|
1571
|
+
* 聊天室信息
|
|
1572
|
+
* @category Interface
|
|
1573
|
+
*/
|
|
1574
|
+
interface IChatroomListenerData {
|
|
1558
1575
|
/**
|
|
1559
|
-
*
|
|
1576
|
+
* SDK 内部重连聊天室信息
|
|
1577
|
+
*/
|
|
1578
|
+
rejoinedRoom?: IChatroomRejoinedInfo;
|
|
1579
|
+
/**
|
|
1580
|
+
* 监听到的聊天室 KV 更新
|
|
1581
|
+
*/
|
|
1582
|
+
updatedEntries?: IChatroomEntryListenerData[];
|
|
1583
|
+
/**
|
|
1584
|
+
* 登录退出的用户通知
|
|
1560
1585
|
*/
|
|
1561
|
-
|
|
1586
|
+
userChange?: IChatroomUserChangeInfo;
|
|
1562
1587
|
/**
|
|
1563
|
-
*
|
|
1588
|
+
* 聊天室销毁
|
|
1564
1589
|
*/
|
|
1565
|
-
|
|
1590
|
+
chatroomDestroyed?: string;
|
|
1591
|
+
}
|
|
1592
|
+
/**
|
|
1593
|
+
* @category Interface
|
|
1594
|
+
*/
|
|
1595
|
+
interface IChatroomEntry {
|
|
1566
1596
|
/**
|
|
1567
|
-
*
|
|
1597
|
+
* 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
1568
1598
|
*/
|
|
1569
|
-
|
|
1599
|
+
key: string;
|
|
1570
1600
|
/**
|
|
1571
|
-
*
|
|
1601
|
+
* 属性对应的值, 最大长度 4096 字符
|
|
1572
1602
|
*/
|
|
1573
|
-
|
|
1603
|
+
value: string;
|
|
1574
1604
|
/**
|
|
1575
|
-
*
|
|
1605
|
+
* 设置成功后是否发送通知消息
|
|
1576
1606
|
*/
|
|
1577
|
-
|
|
1607
|
+
isSendNotification?: boolean;
|
|
1578
1608
|
/**
|
|
1579
|
-
*
|
|
1609
|
+
* RC:chrmKVNotiMsg 消息中携带的附加信息
|
|
1580
1610
|
*/
|
|
1581
|
-
|
|
1611
|
+
notificationExtra?: string;
|
|
1582
1612
|
/**
|
|
1583
|
-
*
|
|
1613
|
+
* 用户退出聊天室时是否清除此属性
|
|
1584
1614
|
*/
|
|
1585
|
-
|
|
1615
|
+
isAutoDelete?: boolean;
|
|
1586
1616
|
}
|
|
1587
1617
|
/**
|
|
1588
|
-
*
|
|
1618
|
+
* @category Interface
|
|
1589
1619
|
*/
|
|
1590
|
-
|
|
1620
|
+
interface IChatroomUser {
|
|
1591
1621
|
/**
|
|
1592
|
-
*
|
|
1622
|
+
* 用户 id
|
|
1593
1623
|
*/
|
|
1594
|
-
|
|
1624
|
+
id: string;
|
|
1595
1625
|
/**
|
|
1596
|
-
*
|
|
1626
|
+
* 加入聊天室的时间
|
|
1597
1627
|
*/
|
|
1598
|
-
|
|
1628
|
+
time: number;
|
|
1599
1629
|
}
|
|
1600
|
-
|
|
1630
|
+
/**
|
|
1631
|
+
* @category Interface
|
|
1632
|
+
*/
|
|
1633
|
+
interface IChatroomInfo {
|
|
1601
1634
|
/**
|
|
1602
|
-
*
|
|
1635
|
+
* 成员列表
|
|
1636
|
+
* @todo 需确认数组元素的数据结构
|
|
1603
1637
|
*/
|
|
1604
|
-
|
|
1638
|
+
userInfos: IChatroomUser[];
|
|
1605
1639
|
/**
|
|
1606
|
-
*
|
|
1640
|
+
* 房间内总人数
|
|
1607
1641
|
*/
|
|
1608
|
-
|
|
1609
|
-
}
|
|
1610
|
-
/**
|
|
1611
|
-
* CallLib 流程消息
|
|
1612
|
-
*/
|
|
1613
|
-
declare const CallLibMsgType: {
|
|
1614
|
-
'RC:VCAccept': string;
|
|
1615
|
-
'RC:VCRinging': string;
|
|
1616
|
-
'RC:VCSummary': string;
|
|
1617
|
-
'RC:VCHangup': string;
|
|
1618
|
-
'RC:VCInvite': string;
|
|
1619
|
-
'RC:VCModifyMedia': string;
|
|
1620
|
-
'RC:VCModifyMem': string;
|
|
1621
|
-
};
|
|
1622
|
-
declare enum RTCApiType {
|
|
1623
|
-
ROOM = 1,
|
|
1624
|
-
PERSON = 2
|
|
1625
|
-
}
|
|
1626
|
-
declare enum RTCIdentityChangeType {
|
|
1627
|
-
AnchorToViewer = 1,
|
|
1628
|
-
ViewerToAnchor = 2
|
|
1642
|
+
userCount: number;
|
|
1629
1643
|
}
|
|
1630
1644
|
/**
|
|
1631
|
-
*
|
|
1645
|
+
* @category Interface
|
|
1632
1646
|
*/
|
|
1633
|
-
|
|
1647
|
+
interface IRemoveChatroomEntry {
|
|
1634
1648
|
/**
|
|
1635
|
-
*
|
|
1649
|
+
* 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
1636
1650
|
*/
|
|
1637
|
-
|
|
1651
|
+
key: string;
|
|
1638
1652
|
/**
|
|
1639
|
-
*
|
|
1653
|
+
* 删除成功后是否发送通知消息
|
|
1640
1654
|
*/
|
|
1641
|
-
|
|
1655
|
+
isSendNotification?: boolean;
|
|
1642
1656
|
/**
|
|
1643
|
-
*
|
|
1657
|
+
* RC:chrmKVNotiMsg 消息中携带的附加信息
|
|
1644
1658
|
*/
|
|
1645
|
-
|
|
1659
|
+
notificationExtra?: string;
|
|
1646
1660
|
}
|
|
1647
|
-
|
|
1648
1661
|
/**
|
|
1649
1662
|
* @category Interface
|
|
1650
1663
|
*/
|
|
1651
|
-
interface
|
|
1664
|
+
interface IRemoveChatroomEntries {
|
|
1652
1665
|
/**
|
|
1653
|
-
*
|
|
1666
|
+
* key 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
1654
1667
|
*/
|
|
1655
|
-
|
|
1668
|
+
entries: {
|
|
1669
|
+
key: string;
|
|
1670
|
+
}[];
|
|
1656
1671
|
/**
|
|
1657
|
-
*
|
|
1672
|
+
* 删除成功后是否发送通知消息
|
|
1658
1673
|
*/
|
|
1659
|
-
imageUrl?: string;
|
|
1660
1674
|
/**
|
|
1661
|
-
|
|
1675
|
+
* RC:chrmKVNotiMsg 消息中携带的附加信息
|
|
1662
1676
|
*/
|
|
1663
|
-
|
|
1677
|
+
notificationExtra?: string;
|
|
1664
1678
|
}
|
|
1665
1679
|
/**
|
|
1666
1680
|
* @category Interface
|
|
1667
1681
|
*/
|
|
1668
|
-
interface
|
|
1682
|
+
interface IChatroomEntries {
|
|
1669
1683
|
/**
|
|
1670
|
-
*
|
|
1684
|
+
* entries ,要设置的属性列表
|
|
1685
|
+
* key 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
1686
|
+
* value 属性对应的值, 最大长度 4096 字符
|
|
1671
1687
|
*/
|
|
1672
|
-
|
|
1688
|
+
entries: {
|
|
1689
|
+
key: string;
|
|
1690
|
+
value: string;
|
|
1691
|
+
}[];
|
|
1673
1692
|
/**
|
|
1674
|
-
*
|
|
1693
|
+
* 设置成功后是否发送通知消息
|
|
1675
1694
|
*/
|
|
1676
|
-
apnsCollapseId?: string;
|
|
1677
1695
|
/**
|
|
1678
|
-
*
|
|
1696
|
+
* RC:chrmKVNotiMsg 消息中携带的附加信息
|
|
1679
1697
|
*/
|
|
1680
|
-
|
|
1698
|
+
notificationExtra?: string;
|
|
1681
1699
|
/**
|
|
1682
|
-
*
|
|
1700
|
+
* 用户退出聊天室时是否清除此属性
|
|
1683
1701
|
*/
|
|
1684
|
-
|
|
1702
|
+
isAutoDelete?: boolean;
|
|
1703
|
+
/**
|
|
1704
|
+
* 是否强制覆盖
|
|
1705
|
+
*/
|
|
1706
|
+
isForce?: boolean;
|
|
1685
1707
|
}
|
|
1708
|
+
|
|
1686
1709
|
/**
|
|
1687
1710
|
* @category Interface
|
|
1688
1711
|
*/
|
|
1689
|
-
interface
|
|
1712
|
+
interface IAsyncRes<T = void> {
|
|
1690
1713
|
/**
|
|
1691
|
-
*
|
|
1714
|
+
* Promise 执行结果
|
|
1692
1715
|
*/
|
|
1693
|
-
|
|
1716
|
+
code: ErrorCode;
|
|
1694
1717
|
/**
|
|
1695
|
-
*
|
|
1718
|
+
* 结果数据
|
|
1696
1719
|
*/
|
|
1697
|
-
|
|
1698
|
-
/**
|
|
1699
|
-
* 小米 Large icon 链接
|
|
1700
|
-
* Large icon 可以出现在大图版和多字版消息中,显示在右边。
|
|
1701
|
-
* 国内版仅 MIUI12 以上版本支持,以下版本均不支持;国际版支持。
|
|
1702
|
-
* 图片要求:大小 120 * 120px,格式为 png 或者 jpg 格式。
|
|
1703
|
-
*/
|
|
1704
|
-
miLargeIconUrl?: string;
|
|
1705
|
-
/**
|
|
1706
|
-
* 华为的 channelId
|
|
1707
|
-
*/
|
|
1708
|
-
channelIdHW?: string;
|
|
1709
|
-
/**
|
|
1710
|
-
* 华为推送消息分类
|
|
1711
|
-
* 更多信息请参考华为消息分类标准文档: https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/message-classification-0000001149358835
|
|
1712
|
-
* 5.7.3 版本开始支持
|
|
1713
|
-
*/
|
|
1714
|
-
categoryHW?: string;
|
|
1715
|
-
/**
|
|
1716
|
-
* 华为推送消息级别
|
|
1717
|
-
* LOW: 表示消息为资讯营销
|
|
1718
|
-
* NORMAL: 消息为服务与通讯
|
|
1719
|
-
*/
|
|
1720
|
-
importanceHW?: 'NORMAL' | 'LOW';
|
|
1721
|
-
/**
|
|
1722
|
-
* 华为通知类型的推送所使用的通知图片 url
|
|
1723
|
-
*/
|
|
1724
|
-
imageUrlHW?: string;
|
|
1725
|
-
/**
|
|
1726
|
-
* OPPO 的 channelId
|
|
1727
|
-
*/
|
|
1728
|
-
channelIdOPPO?: string;
|
|
1720
|
+
data?: T;
|
|
1729
1721
|
/**
|
|
1730
|
-
*
|
|
1722
|
+
* 错误消息
|
|
1731
1723
|
*/
|
|
1732
|
-
|
|
1733
|
-
/**
|
|
1734
|
-
* google FCM 的推送配置
|
|
1735
|
-
*/
|
|
1736
|
-
googleConfig?: IGooglePushConfig;
|
|
1724
|
+
msg?: string;
|
|
1737
1725
|
}
|
|
1738
1726
|
/**
|
|
1739
|
-
*
|
|
1740
|
-
* @
|
|
1727
|
+
* 异步任务结果定义
|
|
1728
|
+
* @description
|
|
1729
|
+
* 通过 `Promise.resolve` 来处理预期内的异常,进而通过 Uncatch Promise Error 暴露预期外的异常
|
|
1741
1730
|
*/
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
* 推送标题
|
|
1745
|
-
* 如果没有设置,会使用下面的默认标题显示规则
|
|
1746
|
-
* 默认标题显示规则:
|
|
1747
|
-
* 内置消息:单聊通知标题显示为发送者名称,群聊通知标题显示为群名称。
|
|
1748
|
-
* 自定义消息:默认不显示标题。
|
|
1749
|
-
*/
|
|
1750
|
-
pushTitle: string;
|
|
1751
|
-
/**
|
|
1752
|
-
* 推送内容
|
|
1753
|
-
* 优先使用 IPushConfig.pushContent, 如果没有,则使用发送消息的 pushContent 参数
|
|
1754
|
-
*/
|
|
1755
|
-
pushContent: string;
|
|
1756
|
-
/**
|
|
1757
|
-
* 远程推送附加信息
|
|
1758
|
-
* 优先使用 IPushConfig.pushData, 如果没有,则使用发送消息的 pushContent 参数
|
|
1759
|
-
*/
|
|
1760
|
-
pushData: string;
|
|
1761
|
-
/**
|
|
1762
|
-
* iOSConfig
|
|
1763
|
-
*/
|
|
1764
|
-
iOSConfig?: IiOSPushConfig;
|
|
1765
|
-
/**
|
|
1766
|
-
* androidConfig
|
|
1767
|
-
*/
|
|
1768
|
-
androidConfig?: IAndroidPushConfig;
|
|
1731
|
+
declare type IPromiseResult<T = void> = Promise<IAsyncRes<T>>;
|
|
1732
|
+
interface IConnectResult {
|
|
1769
1733
|
/**
|
|
1770
|
-
*
|
|
1734
|
+
* 连接错误码
|
|
1771
1735
|
*/
|
|
1772
|
-
|
|
1736
|
+
code: ErrorCode;
|
|
1773
1737
|
/**
|
|
1774
|
-
*
|
|
1738
|
+
* 导航获取成功后即可有相应的值,在导航数据获取完成之前该值为 undefined
|
|
1775
1739
|
*/
|
|
1776
|
-
|
|
1777
|
-
/**
|
|
1778
|
-
* 推送模板id
|
|
1779
|
-
*/
|
|
1780
|
-
templateId: string;
|
|
1740
|
+
userId?: string;
|
|
1781
1741
|
}
|
|
1782
1742
|
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
*/
|
|
1787
|
-
interface IMessageReader {
|
|
1788
|
-
readTime: number;
|
|
1789
|
-
userId: string;
|
|
1743
|
+
declare enum UltraGroupChannelType {
|
|
1744
|
+
PUBLIC = 0,
|
|
1745
|
+
PRIVATE = 1
|
|
1790
1746
|
}
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
totalMemberCount: number;
|
|
1796
|
-
list: IMessageReader[];
|
|
1747
|
+
declare enum UltraGroupChannelChangeType {
|
|
1748
|
+
PUBLIC_TO_PRIVATE = 2,
|
|
1749
|
+
PRIVATE_TO_PUBLIC = 3,
|
|
1750
|
+
PUBLIC_TO_PRIVATE_USER_NOT_IN = 6
|
|
1797
1751
|
}
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1752
|
+
/** PB 结构 MsgChange 属性 changeType 对应枚举值 */
|
|
1753
|
+
declare enum UltraMsgChangeType {
|
|
1754
|
+
MSG_EXPANSION = 1,
|
|
1755
|
+
MSG_MODIFY = 2,
|
|
1756
|
+
MSG_RECALL = 3,
|
|
1757
|
+
CHANNEL_CHANGE = 4,
|
|
1758
|
+
USER_GROUP_CHANGE = 5
|
|
1805
1759
|
}
|
|
1806
|
-
/**
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1760
|
+
/** PB 结构 MsgChange 属性 subChangeType 对应枚举值 */
|
|
1761
|
+
declare enum UltraMsgSubChangeType {
|
|
1762
|
+
CHANNEL_DELETE = 1,
|
|
1763
|
+
PUBLIC_TO_PRIVATE = 2,
|
|
1764
|
+
PRIVATE_TO_PUBLIC = 3,
|
|
1765
|
+
PRIVATE_CHANNEL_USER_JOIN_PUBLIC = 4,
|
|
1766
|
+
CHANNEL_USER_KICKED = 5,
|
|
1767
|
+
PUBLIC_TO_PRIVATE_USER_NOT_IN = 6
|
|
1768
|
+
}
|
|
1769
|
+
declare enum UserGroupChangeType {
|
|
1770
|
+
REMOVE_USER_GROUP = 1,
|
|
1771
|
+
JOIN_USER_GROUP = 2,
|
|
1772
|
+
EXIT_USER_GROUP = 3,
|
|
1773
|
+
CHANNEL_BIND_USER_GROUP = 4,
|
|
1774
|
+
CHANNEL_UNBIND_USER_GROUP = 5
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
interface IMentionInfo {
|
|
1778
|
+
type: MentionedType;
|
|
1822
1779
|
/**
|
|
1823
|
-
*
|
|
1780
|
+
* 被 @ 的用户 Id 列表,仅在 `type` 为 `2` 时有效
|
|
1824
1781
|
*/
|
|
1825
|
-
|
|
1782
|
+
userIdList: string[];
|
|
1826
1783
|
}
|
|
1827
1784
|
/**
|
|
1828
|
-
*
|
|
1785
|
+
* 从服务器拉取到的会话数据结构
|
|
1829
1786
|
* @category Interface
|
|
1830
1787
|
*/
|
|
1831
|
-
interface
|
|
1788
|
+
interface IReceivedConversation {
|
|
1832
1789
|
/**
|
|
1833
1790
|
* 会话的业务标识
|
|
1834
1791
|
*/
|
|
1835
1792
|
channelId?: string;
|
|
1836
1793
|
/**
|
|
1837
1794
|
* 会话类型
|
|
1838
|
-
* * 1: 单聊
|
|
1839
|
-
* * 3: 群聊
|
|
1840
|
-
* * 4: 聊天室
|
|
1841
|
-
* * 5: 客服会话
|
|
1842
|
-
* * 6: 系统消息
|
|
1843
|
-
* * 7: 默认关注的公众号
|
|
1844
|
-
* * 8: 手动关注的公众号
|
|
1845
|
-
* * 9: RTCLib 房间
|
|
1846
1795
|
*/
|
|
1847
1796
|
conversationType: ConversationType;
|
|
1848
1797
|
/**
|
|
1849
|
-
* 会话
|
|
1798
|
+
* 会话 Id
|
|
1799
|
+
* @description
|
|
1800
|
+
* 1. 当 `conversationType` 为 `ConversationType.GROUP` 时,该值为群组 Id
|
|
1801
|
+
* 1. 当 `conversationType` 为 `ConversationType.PRIVATE` 时,该值为对方用户 Id
|
|
1850
1802
|
*/
|
|
1851
1803
|
targetId: string;
|
|
1852
1804
|
/**
|
|
1853
|
-
*
|
|
1854
|
-
*/
|
|
1855
|
-
senderUserId: string;
|
|
1856
|
-
/**
|
|
1857
|
-
* 消息内容
|
|
1858
|
-
*/
|
|
1859
|
-
content: any;
|
|
1860
|
-
/**
|
|
1861
|
-
* 消息结构名称,即消息类型
|
|
1862
|
-
* @example RC:TxtMsg
|
|
1863
|
-
*/
|
|
1864
|
-
messageType: string;
|
|
1865
|
-
/**
|
|
1866
|
-
* 服务端存储的消息 Id
|
|
1867
|
-
*/
|
|
1868
|
-
messageUId: string;
|
|
1869
|
-
/**
|
|
1870
|
-
* 消息方向是发出 or 收取
|
|
1805
|
+
* 当前会话的未读消息数
|
|
1871
1806
|
*/
|
|
1872
|
-
|
|
1807
|
+
unreadMessageCount: number;
|
|
1873
1808
|
/**
|
|
1874
|
-
*
|
|
1809
|
+
* 会话中的最后一条消息
|
|
1875
1810
|
*/
|
|
1876
|
-
|
|
1811
|
+
latestMessage: IReceivedMessage | null;
|
|
1877
1812
|
/**
|
|
1878
|
-
*
|
|
1813
|
+
* 是否包含 @ 自己的消息,此数据仅在 `conversationType` 为 `ConversationType.GROUP` 时有效
|
|
1879
1814
|
*/
|
|
1880
|
-
|
|
1815
|
+
hasMentioned?: boolean;
|
|
1881
1816
|
/**
|
|
1882
|
-
*
|
|
1883
|
-
* @description 当 isOffLineMessage 为 true 时,该值无效
|
|
1817
|
+
* 消息中的 @ 数据,仅在 `conversationType` 为 `ConversationType.GROUP` 时有效
|
|
1884
1818
|
*/
|
|
1885
|
-
|
|
1819
|
+
mentionedInfo?: IMentionInfo | null;
|
|
1886
1820
|
/**
|
|
1887
|
-
*
|
|
1888
|
-
* @
|
|
1821
|
+
* 会话免打扰状态
|
|
1822
|
+
* @description
|
|
1823
|
+
* 1. 已开启免打扰
|
|
1824
|
+
* 2. 未开启免打扰
|
|
1889
1825
|
*/
|
|
1890
|
-
|
|
1826
|
+
notificationStatus: NotificationStatus;
|
|
1827
|
+
notificationLevel?: NotificationLevel;
|
|
1891
1828
|
/**
|
|
1892
|
-
*
|
|
1893
|
-
* @default true
|
|
1829
|
+
* 会话是否已置顶
|
|
1894
1830
|
*/
|
|
1895
|
-
|
|
1831
|
+
isTop: boolean;
|
|
1896
1832
|
/**
|
|
1897
|
-
*
|
|
1833
|
+
* 会话中消息的最后未读时间
|
|
1898
1834
|
*/
|
|
1899
|
-
|
|
1835
|
+
lastUnreadTime: number;
|
|
1900
1836
|
/**
|
|
1901
|
-
*
|
|
1902
|
-
* @description 静默消息不会发送 Push 信息和本地通知提醒
|
|
1837
|
+
* 搜索到的会话数量
|
|
1903
1838
|
*/
|
|
1904
|
-
|
|
1839
|
+
matchCount?: number;
|
|
1905
1840
|
/**
|
|
1906
|
-
*
|
|
1841
|
+
* 会话项变更时间戳
|
|
1907
1842
|
*/
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1843
|
+
versionTime?: number;
|
|
1844
|
+
unreadMentionedCount?: number;
|
|
1845
|
+
}
|
|
1846
|
+
/**
|
|
1847
|
+
* @category Interface
|
|
1848
|
+
*/
|
|
1849
|
+
interface IReceivedConversationByTag extends IReceivedConversation {
|
|
1850
|
+
isTopInTag: boolean;
|
|
1851
|
+
}
|
|
1852
|
+
interface IUltraGroupConversation extends IReceivedConversation {
|
|
1853
|
+
channelType?: UltraGroupChannelType;
|
|
1913
1854
|
/**
|
|
1914
|
-
*
|
|
1855
|
+
* 第一条未读消息
|
|
1915
1856
|
*/
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1857
|
+
firstUnreadMessage?: IUltraUnreadMsg | null;
|
|
1858
|
+
}
|
|
1859
|
+
/**
|
|
1860
|
+
* 设置会话状态 参数 信息
|
|
1861
|
+
*/
|
|
1862
|
+
interface ISetConversationStatusOptions {
|
|
1863
|
+
conversationType: ConversationType;
|
|
1864
|
+
targetId: string;
|
|
1865
|
+
isTop?: boolean;
|
|
1866
|
+
notificationStatus?: number;
|
|
1867
|
+
notificationLevel?: number;
|
|
1868
|
+
channelId?: string;
|
|
1869
|
+
}
|
|
1870
|
+
interface IUpdatedConversation {
|
|
1871
|
+
updatedItems: {
|
|
1872
|
+
[key: string]: {
|
|
1873
|
+
time: number;
|
|
1874
|
+
val: any;
|
|
1875
|
+
};
|
|
1876
|
+
};
|
|
1877
|
+
conversationType: number;
|
|
1878
|
+
targetId: string;
|
|
1879
|
+
latestMessage?: IReceivedMessage;
|
|
1880
|
+
unreadMessageCount?: number;
|
|
1881
|
+
hasMentioned?: boolean;
|
|
1882
|
+
mentionedInfo?: {
|
|
1883
|
+
/**
|
|
1884
|
+
* `@ 类型,其中 1 为 @ 所有人,2 为 @ 部分人`
|
|
1885
|
+
*/
|
|
1886
|
+
type: 1 | 2;
|
|
1887
|
+
/**
|
|
1888
|
+
* 被 @ 的用户 Id 列表,仅在 `type` 为 `2` 时有效
|
|
1889
|
+
*/
|
|
1890
|
+
userIdList: string[];
|
|
1891
|
+
};
|
|
1892
|
+
lastUnreadTime?: number;
|
|
1893
|
+
notificationStatus?: number;
|
|
1894
|
+
notificationLevel?: number;
|
|
1895
|
+
isTop?: boolean;
|
|
1919
1896
|
/**
|
|
1920
|
-
*
|
|
1897
|
+
* 会话标识
|
|
1921
1898
|
*/
|
|
1922
|
-
|
|
1899
|
+
channelId?: string;
|
|
1900
|
+
tags?: IUpdatedConversation[];
|
|
1901
|
+
versionTime?: number;
|
|
1923
1902
|
/**
|
|
1924
|
-
*
|
|
1925
|
-
|
|
1926
|
-
|
|
1903
|
+
* @ 消息未读数
|
|
1904
|
+
*/
|
|
1905
|
+
unreadMentionedCount?: number;
|
|
1906
|
+
}
|
|
1907
|
+
/**
|
|
1908
|
+
* @category Interface
|
|
1909
|
+
*/
|
|
1910
|
+
interface IBaseConversationInfo {
|
|
1911
|
+
conversationType: ConversationType;
|
|
1912
|
+
targetId: string;
|
|
1913
|
+
channelId: string;
|
|
1914
|
+
}
|
|
1915
|
+
/**
|
|
1916
|
+
* @category Interface
|
|
1917
|
+
*/
|
|
1918
|
+
interface IConversationState extends IBaseConversationInfo {
|
|
1919
|
+
unreadCount: number;
|
|
1920
|
+
unreadMentionedCount: number;
|
|
1921
|
+
}
|
|
1922
|
+
/**
|
|
1923
|
+
* 指定超级群会话传参
|
|
1924
|
+
* @category Interface
|
|
1925
|
+
*/
|
|
1926
|
+
interface IUltraGroupOption {
|
|
1927
|
+
targetId: string;
|
|
1928
|
+
channelId?: string;
|
|
1929
|
+
}
|
|
1930
|
+
/**
|
|
1931
|
+
* @category Interface
|
|
1932
|
+
*/
|
|
1933
|
+
interface IGetUltraGroupListOption {
|
|
1934
|
+
targetId?: string;
|
|
1935
|
+
channelType?: UltraGroupChannelType;
|
|
1936
|
+
}
|
|
1937
|
+
/**
|
|
1938
|
+
* 超级群频道变更通知内容
|
|
1939
|
+
*/
|
|
1940
|
+
interface IUltraChannelChangeInfo {
|
|
1941
|
+
targetId: string;
|
|
1942
|
+
channelId: string;
|
|
1943
|
+
channelType: UltraGroupChannelType;
|
|
1944
|
+
changeType: UltraGroupChannelChangeType;
|
|
1945
|
+
}
|
|
1946
|
+
/**
|
|
1947
|
+
* 超级群私有频道用户被踢出白名单通知内容
|
|
1948
|
+
*/
|
|
1949
|
+
interface IUltraChannelUserKickedInfo {
|
|
1950
|
+
targetId: string;
|
|
1951
|
+
channelId: string;
|
|
1952
|
+
channelType: UltraGroupChannelType;
|
|
1953
|
+
userId: string;
|
|
1954
|
+
}
|
|
1955
|
+
/**
|
|
1956
|
+
* 超级群频道被删除通知内容
|
|
1957
|
+
*/
|
|
1958
|
+
interface IUltraChannelDeleteInfo {
|
|
1959
|
+
targetId: string;
|
|
1960
|
+
channelId: string;
|
|
1961
|
+
channelType: UltraGroupChannelType;
|
|
1962
|
+
deleteTime: number;
|
|
1963
|
+
}
|
|
1964
|
+
/**
|
|
1965
|
+
* 获取超级群获取指定会话未读 @ 消息列表
|
|
1966
|
+
*/
|
|
1967
|
+
interface IUltraUnreadConversation {
|
|
1968
|
+
targetId: string;
|
|
1969
|
+
channelId?: string;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
/**
|
|
1973
|
+
* 拓展方法定义,便于 electron-solution 实现时保持接口类型推导可用
|
|
1974
|
+
*/
|
|
1975
|
+
interface IExtraMethod {
|
|
1976
|
+
getConversationsByPage(conversationTypes: ConversationType[], sentTime: number, count: number, channelId?: string): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
1977
|
+
getHistoryMessagesByObjectNames(conversationType: ConversationType, targetId: string, sentTime: number, count: number, objectNames: string[], desc: 0 | 1, tag: string): Promise<IAsyncRes<{
|
|
1978
|
+
list: IReceivedMessage[];
|
|
1979
|
+
hasMore: boolean;
|
|
1980
|
+
}>>;
|
|
1981
|
+
updateMessageReceiptStatus(conersationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<IAsyncRes<boolean>>;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
/**
|
|
1985
|
+
* 连接协议
|
|
1986
|
+
* 截止 5.7.4 版本,暂不支持 rpp 和 quic
|
|
1987
|
+
* v2 版本文档: https://a5bq662kv5.feishu.cn/wiki/wikcnfo3lEo2CPbonDxuXFvU0Kb#K7nbeN
|
|
1988
|
+
*/
|
|
1989
|
+
declare enum EConnectProtocol {
|
|
1990
|
+
RMTP = 1,
|
|
1991
|
+
TLS = 2,
|
|
1992
|
+
RPP = 3,
|
|
1993
|
+
QUIC = 4,
|
|
1994
|
+
WS = 5,
|
|
1995
|
+
WSS = 6
|
|
1996
|
+
}
|
|
1997
|
+
interface INaviRequestOption {
|
|
1998
|
+
appkey: string;
|
|
1999
|
+
uri: string;
|
|
2000
|
+
token: string;
|
|
2001
|
+
platform: string;
|
|
2002
|
+
isTcp?: boolean;
|
|
2003
|
+
}
|
|
2004
|
+
interface ICmpData {
|
|
2005
|
+
addr: string;
|
|
2006
|
+
protocol: EConnectProtocol;
|
|
2007
|
+
weight: number;
|
|
2008
|
+
}
|
|
2009
|
+
/**
|
|
2010
|
+
* 导航信息数据结构
|
|
2011
|
+
*/
|
|
2012
|
+
interface INaviInfo {
|
|
1927
2013
|
/**
|
|
1928
|
-
*
|
|
1929
|
-
|
|
1930
|
-
|
|
2014
|
+
* Navi 数据请求响应码,200 为成功请求
|
|
2015
|
+
*/
|
|
2016
|
+
code: number;
|
|
1931
2017
|
/**
|
|
1932
|
-
*
|
|
2018
|
+
* 获取 Navi 数据失败时的提示信息
|
|
1933
2019
|
*/
|
|
1934
|
-
|
|
2020
|
+
errorMessage?: string;
|
|
1935
2021
|
/**
|
|
1936
|
-
*
|
|
2022
|
+
* 获取 Navi 数据失败时的请求 url 信息
|
|
1937
2023
|
*/
|
|
1938
|
-
|
|
2024
|
+
url?: string;
|
|
1939
2025
|
/**
|
|
1940
|
-
*
|
|
2026
|
+
* 请求导航数据时使用的协议:http / https
|
|
2027
|
+
* @description 该字段为 SDK 内增加的字段,导航接口数据中不存在
|
|
1941
2028
|
*/
|
|
1942
|
-
|
|
2029
|
+
protocol: 'http' | 'https';
|
|
1943
2030
|
/**
|
|
1944
|
-
*
|
|
2031
|
+
* 获取导航时使用的 userId,小程序不走导航,故拿不到 userId
|
|
1945
2032
|
*/
|
|
1946
|
-
|
|
2033
|
+
userId?: string;
|
|
1947
2034
|
/**
|
|
1948
|
-
*
|
|
2035
|
+
* CMP 服务 Websocket 连接地址,包含域名与端口,不含 ws 或 wss 协议头
|
|
2036
|
+
* @example a.domain.com:443
|
|
2037
|
+
* @note 在 V2 版本废弃
|
|
1949
2038
|
*/
|
|
1950
|
-
|
|
2039
|
+
server: string;
|
|
1951
2040
|
/**
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
* @category Interface
|
|
1958
|
-
*/
|
|
1959
|
-
interface IUserProfile {
|
|
2041
|
+
* 备用 CMP 服务地址,包含域名与端口,不含 ws 或 wss 协议头,多个备用地址以 ',' 分割
|
|
2042
|
+
* @example a.domain.com:443,b.domain.com:443
|
|
2043
|
+
* @note 在 V2 版本废弃
|
|
2044
|
+
*/
|
|
2045
|
+
backupServer?: string;
|
|
1960
2046
|
/**
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
2047
|
+
* 备用 CMP 服务地址,POST 请求 TCP 连接返回的是 bs 字段,非 backupServer 字段
|
|
2048
|
+
* @note 在 V2 版本废弃
|
|
2049
|
+
*/
|
|
2050
|
+
bs?: string;
|
|
1964
2051
|
/**
|
|
1965
|
-
*
|
|
2052
|
+
* RTC 服务配置,其值可能为 null、无效字符串、有效 JSON 字符串
|
|
2053
|
+
* 1. 公有云未开通音视频时,值为 null
|
|
2054
|
+
* 2. 私有云无配置时为 `{ "strategy": 0 }`
|
|
1966
2055
|
*/
|
|
1967
|
-
|
|
2056
|
+
voipCallInfo: string | null;
|
|
1968
2057
|
/**
|
|
1969
|
-
*
|
|
1970
|
-
* @
|
|
2058
|
+
* 聊天室 kv 存储开关
|
|
2059
|
+
* @todo 需确认详细有效值
|
|
2060
|
+
* @description 公有云独有配置
|
|
1971
2061
|
*/
|
|
1972
|
-
|
|
2062
|
+
kvStorage: number;
|
|
1973
2063
|
/**
|
|
1974
|
-
*
|
|
2064
|
+
* HttpDNS 功能开关,在 web 端无效
|
|
2065
|
+
* @description 公有云独有配置
|
|
1975
2066
|
*/
|
|
1976
|
-
|
|
2067
|
+
openHttpDNS: boolean;
|
|
1977
2068
|
/**
|
|
1978
|
-
*
|
|
2069
|
+
* 历史消息云存储功能开关
|
|
2070
|
+
* @description
|
|
2071
|
+
* 1. 公有云通过 `developer.rongcloud.cn` 管理后台 `单群聊消息云端存储` 功能开关进行配置
|
|
2072
|
+
* 2. 私有云默认为 `true`
|
|
1979
2073
|
*/
|
|
1980
|
-
|
|
1981
|
-
}
|
|
1982
|
-
interface IOperateInfo {
|
|
1983
|
-
targetId: string;
|
|
1984
|
-
channelId?: string;
|
|
1985
|
-
userId: string;
|
|
1986
|
-
operationType: OperateStatus;
|
|
1987
|
-
operationTime?: number;
|
|
1988
|
-
}
|
|
1989
|
-
interface IOperateSummary {
|
|
1990
|
-
targetId: string;
|
|
1991
|
-
channelId?: string;
|
|
1992
|
-
count: number;
|
|
1993
|
-
operationType: OperateStatus;
|
|
1994
|
-
}
|
|
1995
|
-
interface IOperateStatusNotify {
|
|
1996
|
-
conversationType: ConversationType;
|
|
1997
|
-
hasInfo: boolean;
|
|
1998
|
-
hasSummary: boolean;
|
|
1999
|
-
info: IOperateInfo[];
|
|
2000
|
-
summary: IOperateSummary[];
|
|
2001
|
-
}
|
|
2002
|
-
interface IRecallMsgOptions {
|
|
2074
|
+
historyMsg: boolean;
|
|
2003
2075
|
/**
|
|
2004
|
-
*
|
|
2005
|
-
*
|
|
2006
|
-
|
|
2007
|
-
|
|
2076
|
+
* 聊天室历史消息开关
|
|
2077
|
+
* @description
|
|
2078
|
+
* 1. 私有云对聊天室功能支持有限,默认为 `false`
|
|
2079
|
+
* 2. TODO: 公有云配置待确认
|
|
2080
|
+
*/
|
|
2081
|
+
chatroomMsg: boolean;
|
|
2008
2082
|
/**
|
|
2009
|
-
*
|
|
2010
|
-
|
|
2011
|
-
|
|
2083
|
+
* 文件服务器地址
|
|
2084
|
+
* @description
|
|
2085
|
+
* 1. 公有云下,该地址为七牛云服务器地址
|
|
2086
|
+
* 2. 私有云下,该地址为私有云自研文件服务器地址
|
|
2087
|
+
* @note 在 V2 版本废弃
|
|
2088
|
+
*/
|
|
2089
|
+
uploadServer: string;
|
|
2012
2090
|
/**
|
|
2013
|
-
*
|
|
2014
|
-
|
|
2015
|
-
|
|
2091
|
+
* 实时位置共享配置,web 端无需处理
|
|
2092
|
+
*/
|
|
2093
|
+
location: null | string;
|
|
2016
2094
|
/**
|
|
2017
|
-
*
|
|
2018
|
-
|
|
2019
|
-
|
|
2095
|
+
* 实时日志上传开关
|
|
2096
|
+
* @todo 需确认有效值及作用
|
|
2097
|
+
*/
|
|
2098
|
+
monitor: number;
|
|
2020
2099
|
/**
|
|
2021
|
-
*
|
|
2100
|
+
* 是否允许加入多聊天室开关
|
|
2101
|
+
*/
|
|
2102
|
+
joinMChrm: boolean;
|
|
2103
|
+
/**
|
|
2104
|
+
* 是否开启公众号功能:`0` 为未开启,`1` 为已开启
|
|
2105
|
+
*/
|
|
2106
|
+
openMp: 0 | 1;
|
|
2107
|
+
/**
|
|
2108
|
+
* 是否开启用户级配置,若开启,需连接成功后立即拉取实时配置,0 | 1
|
|
2022
2109
|
* @description
|
|
2023
|
-
*
|
|
2024
|
-
|
|
2025
|
-
|
|
2110
|
+
* 配置来源:
|
|
2111
|
+
* 1. 导航
|
|
2112
|
+
* 2. 服务端实时下发
|
|
2113
|
+
* 已有配置字段:
|
|
2114
|
+
* 1. Lan. 推送使用的语言设置,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
2115
|
+
* 2. ShPushSwit. 推送是否显示详情设置,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
2116
|
+
* 3. MobPushSwit: Web/PC 在线,移动端不在线是否发送推送开关,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
2117
|
+
* 4. OffMsgDur: 离线消息保存天数,设置天数不可大于App级对应配置,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
2118
|
+
* 5. VoipInfo: 音视频相关配置,用户端不可自定义修改. 由服务端决定,与导航下发格式一致
|
|
2119
|
+
* @todo 需确认公有云与私有云区别
|
|
2120
|
+
*/
|
|
2121
|
+
openUS: 0 | 1;
|
|
2026
2122
|
/**
|
|
2027
|
-
*
|
|
2028
|
-
|
|
2029
|
-
|
|
2123
|
+
* 超级群功能开关,1表示开
|
|
2124
|
+
*/
|
|
2125
|
+
ugMsg?: 0 | 1;
|
|
2030
2126
|
/**
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2127
|
+
* 群离线消息最大下发条数,`0` 为关闭
|
|
2128
|
+
* @description 公有云独有配合
|
|
2129
|
+
*/
|
|
2130
|
+
grpMsgLimit: number;
|
|
2034
2131
|
/**
|
|
2035
|
-
*
|
|
2132
|
+
* 消息加密开关,0 为关闭
|
|
2133
|
+
* @todo
|
|
2134
|
+
* 1. 确定其控制的功能
|
|
2135
|
+
* 2. 确定 web 相关性
|
|
2136
|
+
* @note 在 V2 版本废弃
|
|
2036
2137
|
*/
|
|
2037
|
-
|
|
2038
|
-
}
|
|
2039
|
-
interface IRecallMsgContent {
|
|
2040
|
-
conversationType: number;
|
|
2041
|
-
targetId: string;
|
|
2042
|
-
sentTime: number;
|
|
2043
|
-
messageUId: string;
|
|
2138
|
+
isFormatted: number;
|
|
2044
2139
|
/**
|
|
2045
|
-
*
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
channelId: string;
|
|
2140
|
+
* GIF 动图大小限制,默认 2048 KB
|
|
2141
|
+
*/
|
|
2142
|
+
gifSize: number;
|
|
2049
2143
|
/**
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2144
|
+
* 上传小视频时长限制,单位:秒
|
|
2145
|
+
* @description 公有云字段,即私有云配置中的 `uploadVideoTimeLimit`
|
|
2146
|
+
*/
|
|
2147
|
+
videoTimes?: number;
|
|
2053
2148
|
/**
|
|
2054
|
-
*
|
|
2055
|
-
|
|
2056
|
-
|
|
2149
|
+
* 上传小视频时长限制,单位:秒
|
|
2150
|
+
* @description 私有云字段,即公有云配置中的 `videoTimes`
|
|
2151
|
+
*/
|
|
2152
|
+
uploadVideoTimeLimit?: number;
|
|
2057
2153
|
/**
|
|
2058
|
-
*
|
|
2154
|
+
* 实时日志上传开关:`0` 为关闭,`1` 为开启
|
|
2059
2155
|
*/
|
|
2060
|
-
|
|
2061
|
-
}
|
|
2062
|
-
/**
|
|
2063
|
-
* 发送消息时的可选项信息
|
|
2064
|
-
*/
|
|
2065
|
-
interface ISendMsgOptions {
|
|
2156
|
+
logSwitch: number;
|
|
2066
2157
|
/**
|
|
2067
|
-
*
|
|
2158
|
+
* 实时日志上传策略,值为 JSON 字符串
|
|
2159
|
+
* @example `'{
|
|
2160
|
+
* "url": "logcollection.ronghub.com", // 上传地址
|
|
2161
|
+
* "level": 1, // 日志等级
|
|
2162
|
+
* "itv": 6, // 上传频率,即时间间隔,单位 s
|
|
2163
|
+
* "times": 5 // 重试次数?
|
|
2164
|
+
* }'`
|
|
2068
2165
|
*/
|
|
2069
|
-
|
|
2166
|
+
logPolicy: string;
|
|
2070
2167
|
/**
|
|
2071
|
-
*
|
|
2168
|
+
* 百度 BOS 存储服务地址
|
|
2169
|
+
* @description 公有云独有配置
|
|
2170
|
+
* @example `gz.bcebos.com`
|
|
2171
|
+
* @deprecated 已废弃
|
|
2072
2172
|
*/
|
|
2073
|
-
|
|
2074
|
-
/**
|
|
2075
|
-
* 消息内容 key-value,最终会进行 JSON 序列化后发送
|
|
2076
|
-
*/
|
|
2077
|
-
[key: string]: any;
|
|
2078
|
-
/**
|
|
2079
|
-
* 消息可携带的用户数据
|
|
2080
|
-
*/
|
|
2081
|
-
user?: IUserProfile;
|
|
2082
|
-
/**
|
|
2083
|
-
* 其他拓展信息
|
|
2084
|
-
*/
|
|
2085
|
-
extra?: string;
|
|
2086
|
-
};
|
|
2173
|
+
bosAddr?: string;
|
|
2087
2174
|
/**
|
|
2088
|
-
*
|
|
2089
|
-
* @
|
|
2175
|
+
* 阿里上传配置,字符串数组,数组顺序代表 七牛、百度、阿里云 上传权重
|
|
2176
|
+
* @example
|
|
2177
|
+
* ```
|
|
2178
|
+
* `[{"qiniu":"upload.qiniup.com","p":"1"},
|
|
2179
|
+
* {"baidu":"gz.bcebos.com","p":"2"},
|
|
2180
|
+
* {"aliyun":"oss-cn-beijing.aliyuncs.com","p":"3"}]`
|
|
2181
|
+
* ```
|
|
2090
2182
|
*/
|
|
2091
|
-
|
|
2183
|
+
ossConfig?: string;
|
|
2092
2184
|
/**
|
|
2093
|
-
*
|
|
2094
|
-
* @description 只在发送未注册过的自定义消息时有效,否则使用注册时的配置
|
|
2185
|
+
* 私有云专有属性,可用来判断当前环境是公有云还是私有云,私有云环境下该值为 `1`
|
|
2095
2186
|
*/
|
|
2096
|
-
|
|
2187
|
+
type?: number;
|
|
2097
2188
|
/**
|
|
2098
|
-
*
|
|
2099
|
-
* @description
|
|
2100
|
-
* 1. 状态消息只有 pub,没有 ack 应答
|
|
2101
|
-
* 2. 状态消息默认不存储,不计数,`isPersited` 与 `isCounted` 配置将失效
|
|
2189
|
+
* @deprecated 已废弃
|
|
2102
2190
|
*/
|
|
2103
|
-
|
|
2191
|
+
compDays: number;
|
|
2104
2192
|
/**
|
|
2105
|
-
*
|
|
2106
|
-
* @description
|
|
2107
|
-
* 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
|
|
2193
|
+
* @deprecated 已废弃
|
|
2108
2194
|
*/
|
|
2109
|
-
|
|
2195
|
+
msgAck: unknown;
|
|
2110
2196
|
/**
|
|
2111
|
-
*
|
|
2197
|
+
* @deprecated 已废弃
|
|
2112
2198
|
*/
|
|
2113
|
-
|
|
2199
|
+
activeServer: string;
|
|
2114
2200
|
/**
|
|
2115
|
-
*
|
|
2201
|
+
* @deprecated 已废弃
|
|
2116
2202
|
*/
|
|
2117
|
-
|
|
2203
|
+
qnAddr: string;
|
|
2118
2204
|
/**
|
|
2119
|
-
*
|
|
2205
|
+
* @deprecated 已废弃
|
|
2120
2206
|
*/
|
|
2121
|
-
|
|
2207
|
+
extkitSwitch: number;
|
|
2122
2208
|
/**
|
|
2123
|
-
*
|
|
2124
|
-
* @description `1: @ 所有人 2: @ 指定用户`
|
|
2209
|
+
* @deprecated 已废弃
|
|
2125
2210
|
*/
|
|
2126
|
-
|
|
2211
|
+
alone: boolean;
|
|
2127
2212
|
/**
|
|
2128
|
-
*
|
|
2213
|
+
* @deprecated 已废弃
|
|
2129
2214
|
*/
|
|
2130
|
-
|
|
2215
|
+
voipServer: string;
|
|
2131
2216
|
/**
|
|
2132
|
-
*
|
|
2217
|
+
* 离线日志上报地址
|
|
2218
|
+
* @deprecated 已废弃
|
|
2133
2219
|
*/
|
|
2134
|
-
|
|
2220
|
+
offlinelogserver: string;
|
|
2135
2221
|
/**
|
|
2136
|
-
*
|
|
2222
|
+
* 在线日志上报地址
|
|
2223
|
+
* @deprecated 已废弃
|
|
2137
2224
|
*/
|
|
2138
|
-
|
|
2225
|
+
onlinelogserver?: string;
|
|
2139
2226
|
/**
|
|
2140
|
-
*
|
|
2227
|
+
* 链路加密字段,内容为 JSON 字符串,仅限 C++ 可用
|
|
2228
|
+
* @note 在 V2 版本废弃
|
|
2141
2229
|
*/
|
|
2142
|
-
|
|
2230
|
+
crypto?: string;
|
|
2143
2231
|
/**
|
|
2144
|
-
*
|
|
2232
|
+
* 群组回执开关, 1: 打开,0(或者没有): 关闭
|
|
2145
2233
|
*/
|
|
2146
|
-
|
|
2147
|
-
[key: string]: string;
|
|
2148
|
-
};
|
|
2234
|
+
grpRRVer?: number;
|
|
2149
2235
|
/**
|
|
2150
|
-
*
|
|
2151
|
-
* @todo 功能未知,需确认
|
|
2236
|
+
* 防黑产开关, 1: 打开,0:关闭
|
|
2152
2237
|
*/
|
|
2153
|
-
|
|
2238
|
+
openAnti?: number;
|
|
2154
2239
|
/**
|
|
2155
|
-
*
|
|
2156
|
-
|
|
2157
|
-
|
|
2240
|
+
* 鉴权认证
|
|
2241
|
+
*/
|
|
2242
|
+
jwt?: string;
|
|
2243
|
+
/**
|
|
2244
|
+
* 数据中心
|
|
2245
|
+
*/
|
|
2246
|
+
dc?: string;
|
|
2247
|
+
/**
|
|
2248
|
+
* 是否开启 tls
|
|
2249
|
+
*/
|
|
2250
|
+
openTLS?: number;
|
|
2251
|
+
/**
|
|
2252
|
+
* V2 版本中新增字段
|
|
2253
|
+
* 服务地址列表
|
|
2254
|
+
*/
|
|
2255
|
+
serverAddr?: ICmpData[];
|
|
2256
|
+
/**
|
|
2257
|
+
* V2 版本中新增字段
|
|
2258
|
+
* 新版本控制tag
|
|
2259
|
+
*/
|
|
2260
|
+
excludeLogTag?: string;
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
declare type INaviCache = {
|
|
2264
|
+
token: string;
|
|
2265
|
+
naviInfo: INaviInfo;
|
|
2266
|
+
timestamp: number;
|
|
2267
|
+
};
|
|
2268
|
+
/**
|
|
2269
|
+
* 导航数据管理类,负责管理导航有效期、导航请求、导航缓存
|
|
2270
|
+
*/
|
|
2271
|
+
declare abstract class BasicNavi {
|
|
2272
|
+
protected readonly appkey: string;
|
|
2273
|
+
protected readonly logger: BasicLogger;
|
|
2158
2274
|
/**
|
|
2159
|
-
*
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
channelId?: string;
|
|
2275
|
+
* 业务层的自定义导航配置
|
|
2276
|
+
*/
|
|
2277
|
+
protected readonly navigators: string[];
|
|
2278
|
+
constructor(appkey: string, logger: BasicLogger,
|
|
2164
2279
|
/**
|
|
2165
|
-
*
|
|
2166
|
-
* 重发消息时用到,重发消息的消息 ID
|
|
2280
|
+
* 业务层的自定义导航配置
|
|
2167
2281
|
*/
|
|
2168
|
-
|
|
2282
|
+
navigators: string[]);
|
|
2169
2283
|
/**
|
|
2170
|
-
*
|
|
2284
|
+
* 当前进行中的导航请求
|
|
2171
2285
|
*/
|
|
2172
|
-
|
|
2286
|
+
private crtRequest;
|
|
2173
2287
|
/**
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
messageDirection: number;
|
|
2183
|
-
readStatus?: number;
|
|
2184
|
-
sentStatus?: number;
|
|
2185
|
-
sentTime?: number;
|
|
2186
|
-
searchContent?: string;
|
|
2187
|
-
isUnread?: boolean;
|
|
2188
|
-
messageUId?: string;
|
|
2189
|
-
disableNotification?: boolean;
|
|
2190
|
-
canIncludeExpansion?: boolean;
|
|
2191
|
-
expansionMsg?: string;
|
|
2192
|
-
channelId: string;
|
|
2193
|
-
}
|
|
2194
|
-
interface IInsertMessage {
|
|
2195
|
-
conversationType: number;
|
|
2196
|
-
targetId: string;
|
|
2197
|
-
channelId: string;
|
|
2198
|
-
messageDirection: number;
|
|
2199
|
-
messageType: string;
|
|
2200
|
-
content: any;
|
|
2201
|
-
messageUId: string;
|
|
2202
|
-
senderUserId: string;
|
|
2203
|
-
sentStatus?: number;
|
|
2204
|
-
sentTime?: number;
|
|
2205
|
-
disableNotification?: boolean;
|
|
2206
|
-
canIncludeExpansion?: boolean;
|
|
2207
|
-
expansion?: {
|
|
2208
|
-
[key: string]: any;
|
|
2209
|
-
} | null;
|
|
2210
|
-
receivedStatus?: number;
|
|
2288
|
+
* 请求导航数据
|
|
2289
|
+
* @param token
|
|
2290
|
+
* @param ignoreCache 是否忽略缓存,强制从服务器重新拉取。
|
|
2291
|
+
* @param ignoreExpire 是否忽略有效期检查。理论上只需要在建立连接时需要检测 navi 有效期,其他场景无需检测
|
|
2292
|
+
* @param traceId 事务日志跟踪 ID
|
|
2293
|
+
*/
|
|
2294
|
+
request(token: string, ignoreCache: boolean, ignoreExpire: boolean, traceId: string): IPromiseResult<INaviInfo>;
|
|
2295
|
+
private sendRequest;
|
|
2211
2296
|
/**
|
|
2212
|
-
*
|
|
2297
|
+
* 从指定服务列表中顺序尝试获取导航
|
|
2298
|
+
* @param uris 导航服务列表
|
|
2299
|
+
* @param token
|
|
2300
|
+
* @param traceId
|
|
2213
2301
|
*/
|
|
2214
|
-
|
|
2302
|
+
private requestHandler;
|
|
2215
2303
|
/**
|
|
2216
|
-
*
|
|
2304
|
+
* 向目标导航服务发送请求
|
|
2305
|
+
* @param uri 导航服务地址
|
|
2306
|
+
* @param appkey
|
|
2307
|
+
* @param token
|
|
2308
|
+
* @param version
|
|
2309
|
+
* @param timeout 请求超时时间
|
|
2310
|
+
* @param traceId
|
|
2217
2311
|
*/
|
|
2218
|
-
|
|
2312
|
+
protected abstract httpRequest(uri: string, appkey: string, token: string, traceId: string, finished: boolean): IPromiseResult<INaviInfo>;
|
|
2219
2313
|
/**
|
|
2220
|
-
*
|
|
2314
|
+
* 向目标导航服务发送请求
|
|
2315
|
+
* @param uri 导航服务地址
|
|
2316
|
+
* @param appkey
|
|
2317
|
+
* @param token
|
|
2318
|
+
* @param version
|
|
2319
|
+
* @param timeout 请求超时时间
|
|
2320
|
+
* @param traceId
|
|
2221
2321
|
*/
|
|
2222
|
-
|
|
2223
|
-
isMentioned?: boolean;
|
|
2224
|
-
}
|
|
2225
|
-
interface ISendExMsgOptions {
|
|
2226
|
-
channelId: string;
|
|
2227
|
-
conversationType: ConversationType;
|
|
2228
|
-
targetId: string;
|
|
2322
|
+
protected abstract httpRequestV2(uri: string, appkey: string, token: string, traceId: string, finished: boolean): IPromiseResult<INaviInfo>;
|
|
2229
2323
|
/**
|
|
2230
|
-
*
|
|
2231
|
-
|
|
2232
|
-
|
|
2324
|
+
* 转换 Navi 接口 HTTP 请求状态码为 ErrorCode 定义
|
|
2325
|
+
* @param code
|
|
2326
|
+
*/
|
|
2327
|
+
protected transHttpCode(code: number): ErrorCode;
|
|
2233
2328
|
/**
|
|
2234
|
-
*
|
|
2235
|
-
|
|
2236
|
-
|
|
2329
|
+
* 设置缓存
|
|
2330
|
+
* @param formatedToken
|
|
2331
|
+
* @param naviInfo
|
|
2332
|
+
* @description 设置缓存的同时会检测缓存中的既有数据,适当清理,避免无效数据长时间占用存储空间
|
|
2333
|
+
*/
|
|
2334
|
+
protected abstract setNaviCache(formatedToken: string, naviInfo: INaviInfo): void;
|
|
2237
2335
|
/**
|
|
2238
|
-
*
|
|
2239
|
-
|
|
2240
|
-
|
|
2336
|
+
* 获取缓存数据
|
|
2337
|
+
* @param formatedToken
|
|
2338
|
+
*/
|
|
2339
|
+
protected abstract getNaviCache(formatedToken: string): INaviCache | null;
|
|
2241
2340
|
/**
|
|
2242
|
-
*
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
};
|
|
2341
|
+
* 获取缓存的导航信息
|
|
2342
|
+
* @param token
|
|
2343
|
+
*/
|
|
2344
|
+
getNaviInfoFromCache(token: string): INaviInfo | null;
|
|
2247
2345
|
/**
|
|
2248
|
-
*
|
|
2249
|
-
|
|
2250
|
-
|
|
2346
|
+
* RTC 配置变更,更新 navi 缓存
|
|
2347
|
+
* @param token
|
|
2348
|
+
* @param voipCallInfo
|
|
2349
|
+
*/
|
|
2350
|
+
updateVoipCallInfo(token: string, voipCallInfo: string): void;
|
|
2351
|
+
protected getNaviV2RequestOption(option: INaviRequestOption): IRequest;
|
|
2251
2352
|
/**
|
|
2252
|
-
*
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
} | null;
|
|
2353
|
+
* 是否使用 v2 版本导航
|
|
2354
|
+
* 仅私有云 rcx 使用 v1 版本
|
|
2355
|
+
*/
|
|
2356
|
+
useV2Navi(): boolean;
|
|
2257
2357
|
}
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
sendTime: number;
|
|
2265
|
-
/**
|
|
2266
|
-
* 删除的 keys
|
|
2267
|
-
*/
|
|
2268
|
-
keys?: string[];
|
|
2269
|
-
/**
|
|
2270
|
-
* 扩展对象
|
|
2271
|
-
*/
|
|
2272
|
-
expansion?: {
|
|
2273
|
-
[key: string]: string;
|
|
2274
|
-
};
|
|
2358
|
+
|
|
2359
|
+
/**
|
|
2360
|
+
* Websocket 导航工具类
|
|
2361
|
+
*/
|
|
2362
|
+
declare class WebSocketNavi extends BasicNavi {
|
|
2363
|
+
private runtime;
|
|
2275
2364
|
/**
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
interface IUltraModifyMsgOptions {
|
|
2281
|
-
canIncludeExpansion?: boolean;
|
|
2282
|
-
channelId: string;
|
|
2283
|
-
conversationType: ConversationType;
|
|
2284
|
-
targetId: string;
|
|
2285
|
-
messageUId: string;
|
|
2286
|
-
sendTime: number;
|
|
2365
|
+
* 小程序平台服务地址,多个地址以 ',' 分割
|
|
2366
|
+
*/
|
|
2367
|
+
private readonly miniCmpUris;
|
|
2368
|
+
constructor(appkey: string, logger: BasicLogger, runtime: IRuntime,
|
|
2287
2369
|
/**
|
|
2288
|
-
*
|
|
2370
|
+
* 小程序平台服务地址,多个地址以 ',' 分割
|
|
2289
2371
|
*/
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
/**
|
|
2296
|
-
* 消息可携带的用户数据
|
|
2297
|
-
*/
|
|
2298
|
-
user?: IUserProfile;
|
|
2299
|
-
/**
|
|
2300
|
-
* 其他拓展信息
|
|
2301
|
-
*/
|
|
2302
|
-
extra?: string;
|
|
2303
|
-
};
|
|
2304
|
-
}
|
|
2305
|
-
interface IUltraMsgQueryInfo {
|
|
2306
|
-
sendTime: number;
|
|
2307
|
-
messageUId: string;
|
|
2308
|
-
channelId?: string;
|
|
2309
|
-
}
|
|
2310
|
-
interface IUltraMsgQueryOptions {
|
|
2311
|
-
conversationType: ConversationType;
|
|
2312
|
-
targetId: string;
|
|
2313
|
-
messages: IUltraMsgQueryInfo[];
|
|
2372
|
+
miniCmpUris: string[], navigators?: string[]);
|
|
2373
|
+
protected httpRequest(uri: string, appkey: string, token: string, traceId: string, finished: boolean): IPromiseResult<INaviInfo>;
|
|
2374
|
+
protected httpRequestV2(uri: string, appkey: string, token: string, traceId: string): IPromiseResult<INaviInfo>;
|
|
2375
|
+
protected getNaviCache(formatedToken: string): INaviCache | null;
|
|
2376
|
+
protected setNaviCache(formatedToken: string, naviInfo: INaviInfo): void;
|
|
2314
2377
|
}
|
|
2378
|
+
|
|
2315
2379
|
/**
|
|
2316
|
-
* 被拦截的消息信息
|
|
2317
2380
|
* @category Interface
|
|
2318
2381
|
*/
|
|
2319
|
-
interface
|
|
2320
|
-
blockedMessageUId: string;
|
|
2321
|
-
conversationType: number;
|
|
2322
|
-
targetId: string;
|
|
2323
|
-
channelId: string;
|
|
2324
|
-
blockType: MessageBlockType;
|
|
2325
|
-
extra: any;
|
|
2326
|
-
sourceType?: MessageBlockSourceType;
|
|
2327
|
-
sourceContent?: {
|
|
2328
|
-
[key: string]: any;
|
|
2329
|
-
};
|
|
2330
|
-
}
|
|
2331
|
-
/**
|
|
2332
|
-
* 超级群获取指定会话未读 @ 消息列表参数
|
|
2333
|
-
*/
|
|
2334
|
-
interface IUltraGroupUnreadMentionedOption {
|
|
2335
|
-
/**
|
|
2336
|
-
* 会话 ID
|
|
2337
|
-
*/
|
|
2338
|
-
targetId: string;
|
|
2339
|
-
/**
|
|
2340
|
-
* 频道 ID
|
|
2341
|
-
*/
|
|
2342
|
-
channelId?: string;
|
|
2382
|
+
interface IUploadAuth {
|
|
2343
2383
|
/**
|
|
2344
|
-
*
|
|
2384
|
+
* 七牛 token 有效期
|
|
2345
2385
|
*/
|
|
2346
|
-
|
|
2386
|
+
deadline: number;
|
|
2347
2387
|
/**
|
|
2348
|
-
*
|
|
2349
|
-
*/
|
|
2350
|
-
|
|
2351
|
-
}
|
|
2352
|
-
/**
|
|
2353
|
-
* 超级群获取指定会话 @ 未读消息列表结果
|
|
2354
|
-
*/
|
|
2355
|
-
interface IUltraUnreadMsg {
|
|
2388
|
+
* 七牛上传 token
|
|
2389
|
+
*/
|
|
2390
|
+
token: string;
|
|
2356
2391
|
/**
|
|
2357
|
-
*
|
|
2392
|
+
* 百度上传 token
|
|
2358
2393
|
*/
|
|
2359
|
-
|
|
2394
|
+
bosToken: string;
|
|
2360
2395
|
/**
|
|
2361
|
-
*
|
|
2396
|
+
* 百度上传 header Date
|
|
2362
2397
|
*/
|
|
2363
|
-
|
|
2398
|
+
bosDate: string;
|
|
2364
2399
|
/**
|
|
2365
|
-
*
|
|
2400
|
+
* 百度上传路径
|
|
2366
2401
|
*/
|
|
2367
|
-
|
|
2368
|
-
}
|
|
2369
|
-
|
|
2370
|
-
interface IMentionInfo {
|
|
2371
|
-
type: MentionedType;
|
|
2402
|
+
path: string;
|
|
2372
2403
|
/**
|
|
2373
|
-
*
|
|
2404
|
+
* 上传文件名,阿里上传获取下载地址时,必须使用上传文件名,所以需抛出到业务端
|
|
2374
2405
|
*/
|
|
2375
|
-
|
|
2376
|
-
}
|
|
2377
|
-
/**
|
|
2378
|
-
* 从服务器拉取到的会话数据结构
|
|
2379
|
-
* @category Interface
|
|
2380
|
-
*/
|
|
2381
|
-
interface IReceivedConversation {
|
|
2382
|
-
/**
|
|
2383
|
-
* 会话的业务标识
|
|
2384
|
-
*/
|
|
2385
|
-
channelId?: string;
|
|
2406
|
+
fileName: string;
|
|
2386
2407
|
/**
|
|
2387
|
-
*
|
|
2408
|
+
* 阿里云 oss 的 AccessKeyId
|
|
2388
2409
|
*/
|
|
2389
|
-
|
|
2410
|
+
osskeyId: string;
|
|
2390
2411
|
/**
|
|
2391
|
-
*
|
|
2392
|
-
* @description
|
|
2393
|
-
* 1. 当 `conversationType` 为 `ConversationType.GROUP` 时,该值为群组 Id
|
|
2394
|
-
* 1. 当 `conversationType` 为 `ConversationType.PRIVATE` 时,该值为对方用户 Id
|
|
2412
|
+
* 阿里云 oss post 请求表单域中的字段 policy
|
|
2395
2413
|
*/
|
|
2396
|
-
|
|
2414
|
+
ossPolicy: string;
|
|
2397
2415
|
/**
|
|
2398
|
-
*
|
|
2416
|
+
* 阿里云 oss 根据 policy 计算的签名信息
|
|
2399
2417
|
*/
|
|
2400
|
-
|
|
2418
|
+
ossSign: string;
|
|
2401
2419
|
/**
|
|
2402
|
-
*
|
|
2420
|
+
* 阿里云 oss 存储空间名称
|
|
2403
2421
|
*/
|
|
2404
|
-
|
|
2422
|
+
ossBucketName: string;
|
|
2405
2423
|
/**
|
|
2406
|
-
*
|
|
2424
|
+
* s3 认证凭证,对应 post上传 x-amz-credential 字段
|
|
2407
2425
|
*/
|
|
2408
|
-
|
|
2426
|
+
s3Credential: string;
|
|
2409
2427
|
/**
|
|
2410
|
-
*
|
|
2428
|
+
* 加密算法,对应 post上传 x-amz-algorithm 字段
|
|
2411
2429
|
*/
|
|
2412
|
-
|
|
2430
|
+
s3Algorithm: string;
|
|
2413
2431
|
/**
|
|
2414
|
-
*
|
|
2415
|
-
* @description
|
|
2416
|
-
* 1. 已开启免打扰
|
|
2417
|
-
* 2. 未开启免打扰
|
|
2432
|
+
* s3 日期,对应 post上传 x-amz-date 字段
|
|
2418
2433
|
*/
|
|
2419
|
-
|
|
2420
|
-
notificationLevel?: NotificationLevel;
|
|
2434
|
+
s3Date: string;
|
|
2421
2435
|
/**
|
|
2422
|
-
*
|
|
2436
|
+
* s3 policy,对应 post上传 policy 字段
|
|
2423
2437
|
*/
|
|
2424
|
-
|
|
2438
|
+
s3Policy: string;
|
|
2425
2439
|
/**
|
|
2426
|
-
*
|
|
2440
|
+
* s3 签名信息,对应 post上传 x-amz-signature 字段
|
|
2427
2441
|
*/
|
|
2428
|
-
|
|
2442
|
+
s3Signature: string;
|
|
2429
2443
|
/**
|
|
2430
|
-
*
|
|
2444
|
+
* s3 存储空间名称
|
|
2431
2445
|
*/
|
|
2432
|
-
|
|
2446
|
+
s3BucketName: string;
|
|
2433
2447
|
/**
|
|
2434
|
-
*
|
|
2448
|
+
* stc Authorization 头
|
|
2435
2449
|
*/
|
|
2436
|
-
|
|
2437
|
-
unreadMentionedCount?: number;
|
|
2438
|
-
}
|
|
2439
|
-
/**
|
|
2440
|
-
* @category Interface
|
|
2441
|
-
*/
|
|
2442
|
-
interface IReceivedConversationByTag extends IReceivedConversation {
|
|
2443
|
-
isTopInTag: boolean;
|
|
2444
|
-
}
|
|
2445
|
-
interface IUltraGroupConversation extends IReceivedConversation {
|
|
2446
|
-
channelType?: UltraGroupChannelType;
|
|
2450
|
+
stcAuthorization: string;
|
|
2447
2451
|
/**
|
|
2448
|
-
*
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
}
|
|
2452
|
-
/**
|
|
2453
|
-
* 设置会话状态 参数 信息
|
|
2454
|
-
*/
|
|
2455
|
-
interface ISetConversationStatusOptions {
|
|
2456
|
-
conversationType: ConversationType;
|
|
2457
|
-
targetId: string;
|
|
2458
|
-
isTop?: boolean;
|
|
2459
|
-
notificationStatus?: number;
|
|
2460
|
-
notificationLevel?: number;
|
|
2461
|
-
channelId?: string;
|
|
2462
|
-
}
|
|
2463
|
-
interface IUpdatedConversation {
|
|
2464
|
-
updatedItems: {
|
|
2465
|
-
[key: string]: {
|
|
2466
|
-
time: number;
|
|
2467
|
-
val: any;
|
|
2468
|
-
};
|
|
2469
|
-
};
|
|
2470
|
-
conversationType: number;
|
|
2471
|
-
targetId: string;
|
|
2472
|
-
latestMessage?: IReceivedMessage;
|
|
2473
|
-
unreadMessageCount?: number;
|
|
2474
|
-
hasMentioned?: boolean;
|
|
2475
|
-
mentionedInfo?: {
|
|
2476
|
-
/**
|
|
2477
|
-
* `@ 类型,其中 1 为 @ 所有人,2 为 @ 部分人`
|
|
2478
|
-
*/
|
|
2479
|
-
type: 1 | 2;
|
|
2480
|
-
/**
|
|
2481
|
-
* 被 @ 的用户 Id 列表,仅在 `type` 为 `2` 时有效
|
|
2482
|
-
*/
|
|
2483
|
-
userIdList: string[];
|
|
2484
|
-
};
|
|
2485
|
-
lastUnreadTime?: number;
|
|
2486
|
-
notificationStatus?: number;
|
|
2487
|
-
notificationLevel?: number;
|
|
2488
|
-
isTop?: boolean;
|
|
2452
|
+
* stc xAmzContentSha256
|
|
2453
|
+
*/
|
|
2454
|
+
stcContentSha256: string;
|
|
2489
2455
|
/**
|
|
2490
|
-
*
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
tags?: IUpdatedConversation[];
|
|
2494
|
-
versionTime?: number;
|
|
2456
|
+
* stc date
|
|
2457
|
+
*/
|
|
2458
|
+
stcDate: string;
|
|
2495
2459
|
/**
|
|
2496
|
-
*
|
|
2460
|
+
* stc 存储空间名称
|
|
2497
2461
|
*/
|
|
2498
|
-
|
|
2499
|
-
}
|
|
2500
|
-
/**
|
|
2501
|
-
* @category Interface
|
|
2502
|
-
*/
|
|
2503
|
-
interface IBaseConversationInfo {
|
|
2504
|
-
conversationType: ConversationType;
|
|
2505
|
-
targetId: string;
|
|
2506
|
-
channelId: string;
|
|
2507
|
-
}
|
|
2508
|
-
/**
|
|
2509
|
-
* @category Interface
|
|
2510
|
-
*/
|
|
2511
|
-
interface IConversationState extends IBaseConversationInfo {
|
|
2512
|
-
unreadCount: number;
|
|
2513
|
-
unreadMentionedCount: number;
|
|
2514
|
-
}
|
|
2515
|
-
/**
|
|
2516
|
-
* 指定超级群会话传参
|
|
2517
|
-
* @category Interface
|
|
2518
|
-
*/
|
|
2519
|
-
interface IUltraGroupOption {
|
|
2520
|
-
targetId: string;
|
|
2521
|
-
channelId?: string;
|
|
2522
|
-
}
|
|
2523
|
-
/**
|
|
2524
|
-
* @category Interface
|
|
2525
|
-
*/
|
|
2526
|
-
interface IGetUltraGroupListOption {
|
|
2527
|
-
targetId?: string;
|
|
2528
|
-
channelType?: UltraGroupChannelType;
|
|
2462
|
+
stcBucketName: string;
|
|
2529
2463
|
}
|
|
2464
|
+
|
|
2530
2465
|
/**
|
|
2531
|
-
*
|
|
2466
|
+
* 当前运行时设备信息
|
|
2532
2467
|
*/
|
|
2533
|
-
interface
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2468
|
+
interface IOSInfo {
|
|
2469
|
+
/** 软件运行时的 CPU 架构信息 */
|
|
2470
|
+
arch: string;
|
|
2471
|
+
/** 平台标识 */
|
|
2472
|
+
platform: string;
|
|
2473
|
+
/** 操作系统名称 */
|
|
2474
|
+
type: string;
|
|
2475
|
+
/** 操作系统 release 标识 */
|
|
2476
|
+
release: string;
|
|
2477
|
+
/** 操作系统版本信息 */
|
|
2478
|
+
version: string;
|
|
2479
|
+
/** 内存余量 */
|
|
2480
|
+
freemem: number;
|
|
2481
|
+
/** 系统内存总量 */
|
|
2482
|
+
totalmem: number;
|
|
2483
|
+
/** 本次操作系统运行时长 */
|
|
2484
|
+
uptime: number;
|
|
2485
|
+
cpus: {
|
|
2486
|
+
/** CPU 型号标识 */
|
|
2487
|
+
model: string;
|
|
2488
|
+
/** 主频 MHz */
|
|
2489
|
+
speed: number;
|
|
2490
|
+
times: {
|
|
2491
|
+
user: number;
|
|
2492
|
+
nice: number;
|
|
2493
|
+
sys: number;
|
|
2494
|
+
idle: number;
|
|
2495
|
+
irq: number;
|
|
2496
|
+
};
|
|
2497
|
+
}[];
|
|
2498
|
+
networkInterfaces: {
|
|
2499
|
+
/** 网卡接口标识 */
|
|
2500
|
+
[link: string]: {
|
|
2501
|
+
/** IP */
|
|
2502
|
+
address: string;
|
|
2503
|
+
/** 子网掩码 */
|
|
2504
|
+
netmask: string;
|
|
2505
|
+
/** IP 协议版本 */
|
|
2506
|
+
family: string;
|
|
2507
|
+
/** Mac Address */
|
|
2508
|
+
mac: string;
|
|
2509
|
+
/** 是否回环地址 */
|
|
2510
|
+
internal: boolean;
|
|
2511
|
+
/** CIDR */
|
|
2512
|
+
cidr: string | null;
|
|
2513
|
+
}[] | undefined;
|
|
2514
|
+
};
|
|
2538
2515
|
}
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2516
|
+
|
|
2517
|
+
interface IProcessInfo {
|
|
2518
|
+
title: string;
|
|
2519
|
+
platform: string;
|
|
2520
|
+
arch: string;
|
|
2521
|
+
pid: number;
|
|
2522
|
+
ppid: number;
|
|
2523
|
+
uptime: number;
|
|
2524
|
+
cpuUsage: {
|
|
2525
|
+
user: number;
|
|
2526
|
+
system: number;
|
|
2527
|
+
};
|
|
2528
|
+
memoryUsage: {
|
|
2529
|
+
rss: number;
|
|
2530
|
+
heapTotal: number;
|
|
2531
|
+
heapUsed: number;
|
|
2532
|
+
external: number;
|
|
2533
|
+
arrayBuffers: number;
|
|
2534
|
+
};
|
|
2535
|
+
resourceUsage: {
|
|
2536
|
+
userCPUTime: number;
|
|
2537
|
+
systemCPUTime: number;
|
|
2538
|
+
maxRSS: number;
|
|
2539
|
+
sharedMemorySize: number;
|
|
2540
|
+
unsharedDataSize: number;
|
|
2541
|
+
unsharedStackSize: number;
|
|
2542
|
+
minorPageFault: number;
|
|
2543
|
+
majorPageFault: number;
|
|
2544
|
+
swappedOut: number;
|
|
2545
|
+
fsRead: number;
|
|
2546
|
+
fsWrite: number;
|
|
2547
|
+
ipcSent: number;
|
|
2548
|
+
ipcReceived: number;
|
|
2549
|
+
signalsCount: number;
|
|
2550
|
+
voluntaryContextSwitches: number;
|
|
2551
|
+
involuntaryContextSwitches: number;
|
|
2552
|
+
};
|
|
2547
2553
|
}
|
|
2554
|
+
|
|
2548
2555
|
/**
|
|
2549
|
-
*
|
|
2556
|
+
* 代理信息
|
|
2550
2557
|
*/
|
|
2551
|
-
interface
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
}
|
|
2557
|
-
/**
|
|
2558
|
-
* 获取超级群获取指定会话未读 @ 消息列表
|
|
2559
|
-
*/
|
|
2560
|
-
interface IUltraUnreadConversation {
|
|
2561
|
-
targetId: string;
|
|
2562
|
-
channelId?: string;
|
|
2558
|
+
interface IProxy {
|
|
2559
|
+
socksHost: string;
|
|
2560
|
+
socksPort: number;
|
|
2561
|
+
socksUsername?: string;
|
|
2562
|
+
socksPassword?: string;
|
|
2563
2563
|
}
|
|
2564
2564
|
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
interface IChatroomEntryListenerData {
|
|
2569
|
-
/**
|
|
2570
|
-
* 更新的键
|
|
2571
|
-
*/
|
|
2572
|
-
key: string;
|
|
2573
|
-
/**
|
|
2574
|
-
* 更新的值
|
|
2575
|
-
*/
|
|
2576
|
-
value: string;
|
|
2577
|
-
/**
|
|
2578
|
-
* 更新的时间
|
|
2579
|
-
*/
|
|
2580
|
-
timestamp: number;
|
|
2581
|
-
/**
|
|
2582
|
-
* 更新的聊天室 ID
|
|
2583
|
-
*/
|
|
2584
|
-
chatroomId: string;
|
|
2585
|
-
/**
|
|
2586
|
-
* 更新类型
|
|
2587
|
-
*/
|
|
2588
|
-
type: ChatroomEntryType;
|
|
2565
|
+
declare enum HttpMethod {
|
|
2566
|
+
GET = "GET",
|
|
2567
|
+
POST = "POST"
|
|
2589
2568
|
}
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
*/
|
|
2593
|
-
interface IChatroomRejoinedFailed {
|
|
2594
|
-
/**
|
|
2595
|
-
* 自动重新加入的聊天室 ID
|
|
2596
|
-
*/
|
|
2597
|
-
chatroomId: string;
|
|
2569
|
+
interface IRequest {
|
|
2570
|
+
url: string;
|
|
2598
2571
|
/**
|
|
2599
|
-
*
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
}
|
|
2603
|
-
/**
|
|
2604
|
-
* @category Interface
|
|
2605
|
-
*/
|
|
2606
|
-
interface IChatroomRejoinedSuccessed {
|
|
2572
|
+
* @default `HttpMethod.GET`
|
|
2573
|
+
*/
|
|
2574
|
+
method?: HttpMethod | 'GET' | 'POST';
|
|
2607
2575
|
/**
|
|
2608
|
-
*
|
|
2609
|
-
|
|
2610
|
-
|
|
2576
|
+
* 查询数据
|
|
2577
|
+
*/
|
|
2578
|
+
query?: {
|
|
2579
|
+
[key: string]: string | number | null;
|
|
2580
|
+
};
|
|
2611
2581
|
/**
|
|
2612
|
-
*
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
/**
|
|
2617
|
-
* @category Interface
|
|
2618
|
-
*/
|
|
2619
|
-
interface IChatroomUserChangeInfo {
|
|
2620
|
-
users: {
|
|
2621
|
-
[userId: string]: ChatroomUserChangeType;
|
|
2582
|
+
* Request Header 信息
|
|
2583
|
+
*/
|
|
2584
|
+
headers?: {
|
|
2585
|
+
[key: string]: string;
|
|
2622
2586
|
};
|
|
2623
|
-
chatroomId: string;
|
|
2624
|
-
}
|
|
2625
|
-
declare type IChatroomRejoinedInfo = IChatroomRejoinedFailed | IChatroomRejoinedSuccessed;
|
|
2626
|
-
/**
|
|
2627
|
-
* 聊天室信息
|
|
2628
|
-
* @category Interface
|
|
2629
|
-
*/
|
|
2630
|
-
interface IChatroomListenerData {
|
|
2631
2587
|
/**
|
|
2632
|
-
*
|
|
2633
|
-
|
|
2634
|
-
|
|
2588
|
+
* Request Body 数据
|
|
2589
|
+
*/
|
|
2590
|
+
body?: Object | string;
|
|
2635
2591
|
/**
|
|
2636
|
-
*
|
|
2637
|
-
|
|
2638
|
-
|
|
2592
|
+
* 超时设置,默认 `60s`
|
|
2593
|
+
*/
|
|
2594
|
+
timeout?: number;
|
|
2639
2595
|
/**
|
|
2640
|
-
*
|
|
2596
|
+
* 【Alipay-Only】
|
|
2597
|
+
* 期望返回的数据格式,如果为 json 则返回后会对返回的数据进行一次 JSON.parse
|
|
2641
2598
|
*/
|
|
2642
|
-
|
|
2599
|
+
dataType?: 'json' | 'text' | 'base64' | 'arraybuffer';
|
|
2643
2600
|
/**
|
|
2644
|
-
*
|
|
2601
|
+
* socks5 代理参数,仅 Electron 平台有效,web 平台默认为 null
|
|
2645
2602
|
*/
|
|
2646
|
-
|
|
2603
|
+
proxy?: IProxy | null;
|
|
2604
|
+
}
|
|
2605
|
+
interface IStorage {
|
|
2606
|
+
setItem(key: string, value: string): void;
|
|
2607
|
+
getItem(key: string): string | null;
|
|
2608
|
+
removeItem(key: string): void;
|
|
2609
|
+
clear(): void;
|
|
2610
|
+
}
|
|
2611
|
+
interface IResponse {
|
|
2612
|
+
status: number;
|
|
2613
|
+
data?: string;
|
|
2647
2614
|
}
|
|
2648
2615
|
/**
|
|
2649
|
-
*
|
|
2616
|
+
* 网络状态枚举
|
|
2650
2617
|
*/
|
|
2651
|
-
|
|
2618
|
+
declare enum NetworkType {
|
|
2619
|
+
WIFI = "wifi",
|
|
2620
|
+
FOUR_G = "4g",
|
|
2621
|
+
THREE_G = "3g",
|
|
2622
|
+
TWO_G = "2g",
|
|
2623
|
+
FIVE_G = "2g",
|
|
2624
|
+
THREE_GENT = "3gnet",
|
|
2625
|
+
UNKONWN = "unknown"
|
|
2626
|
+
}
|
|
2627
|
+
interface IWebSocket {
|
|
2628
|
+
id: number;
|
|
2652
2629
|
/**
|
|
2653
|
-
*
|
|
2630
|
+
* 监听连接建立事件,此时 WebSocket 实例已准备好收发数据
|
|
2631
|
+
* @param callback
|
|
2654
2632
|
*/
|
|
2655
|
-
|
|
2633
|
+
onOpen(callback: () => void): void;
|
|
2656
2634
|
/**
|
|
2657
|
-
*
|
|
2635
|
+
* 监听连接关闭事件
|
|
2636
|
+
* @param callback
|
|
2658
2637
|
*/
|
|
2659
|
-
|
|
2638
|
+
onClose(callback: (code?: number, reason?: string) => void): void;
|
|
2660
2639
|
/**
|
|
2661
|
-
*
|
|
2640
|
+
* 监听接收服务器消息事件
|
|
2641
|
+
* @param callback
|
|
2662
2642
|
*/
|
|
2663
|
-
|
|
2643
|
+
onMessage(callback: (data: string | ArrayBuffer) => void): void;
|
|
2664
2644
|
/**
|
|
2665
|
-
*
|
|
2645
|
+
* 监听链接错误事件
|
|
2646
|
+
* @param callback
|
|
2666
2647
|
*/
|
|
2667
|
-
|
|
2648
|
+
onError(callback: (error: unknown) => void): void;
|
|
2668
2649
|
/**
|
|
2669
|
-
*
|
|
2650
|
+
* 向服务器发送数据
|
|
2651
|
+
* @param data
|
|
2670
2652
|
*/
|
|
2671
|
-
|
|
2653
|
+
send(data: ArrayBuffer | string): void;
|
|
2654
|
+
/**
|
|
2655
|
+
* 关闭连接
|
|
2656
|
+
* @param code
|
|
2657
|
+
* @param reason
|
|
2658
|
+
*/
|
|
2659
|
+
close(code?: number, reason?: string): void;
|
|
2672
2660
|
}
|
|
2673
2661
|
/**
|
|
2674
|
-
*
|
|
2662
|
+
* 平台运行时抽象
|
|
2675
2663
|
*/
|
|
2676
|
-
interface
|
|
2664
|
+
interface IRuntime {
|
|
2677
2665
|
/**
|
|
2678
|
-
*
|
|
2666
|
+
* 平台标识
|
|
2679
2667
|
*/
|
|
2680
|
-
|
|
2668
|
+
tag: string;
|
|
2681
2669
|
/**
|
|
2682
|
-
*
|
|
2670
|
+
* 发送 http 请求
|
|
2671
|
+
* @param options
|
|
2683
2672
|
*/
|
|
2684
|
-
|
|
2685
|
-
}
|
|
2686
|
-
/**
|
|
2687
|
-
* @category Interface
|
|
2688
|
-
*/
|
|
2689
|
-
interface IChatroomInfo {
|
|
2673
|
+
httpReq(options: IRequest): Promise<IResponse>;
|
|
2690
2674
|
/**
|
|
2691
|
-
*
|
|
2692
|
-
* @todo 需确认数组元素的数据结构
|
|
2675
|
+
* 是否使用导航
|
|
2693
2676
|
*/
|
|
2694
|
-
|
|
2677
|
+
useNavi: boolean;
|
|
2695
2678
|
/**
|
|
2696
|
-
*
|
|
2679
|
+
* websocket 地址上附加的平台字段
|
|
2697
2680
|
*/
|
|
2698
|
-
|
|
2699
|
-
}
|
|
2700
|
-
/**
|
|
2701
|
-
* @category Interface
|
|
2702
|
-
*/
|
|
2703
|
-
interface IRemoveChatroomEntry {
|
|
2681
|
+
connectPlatform: string;
|
|
2704
2682
|
/**
|
|
2705
|
-
*
|
|
2683
|
+
* websocket 地址上 apiVer 字段,代表代码是否来源于 uniapp
|
|
2706
2684
|
*/
|
|
2707
|
-
|
|
2685
|
+
isFromUniapp: boolean;
|
|
2708
2686
|
/**
|
|
2709
|
-
*
|
|
2687
|
+
* 创建长连接实例
|
|
2710
2688
|
*/
|
|
2711
|
-
|
|
2689
|
+
createWebSocket(url: string, protocols?: string[]): IWebSocket;
|
|
2712
2690
|
/**
|
|
2713
|
-
*
|
|
2691
|
+
* 存储模块
|
|
2714
2692
|
*/
|
|
2715
|
-
|
|
2693
|
+
localStorage: IStorage;
|
|
2694
|
+
/**
|
|
2695
|
+
* 在某些非浏览器平台,其等同于 localStorage
|
|
2696
|
+
*/
|
|
2697
|
+
sessionStorage: IStorage;
|
|
2698
|
+
/**
|
|
2699
|
+
* 获取网络状态
|
|
2700
|
+
* 2g 3g 4g wifi unkown
|
|
2701
|
+
*/
|
|
2702
|
+
getNetworkType(): Promise<NetworkType>;
|
|
2716
2703
|
}
|
|
2704
|
+
|
|
2717
2705
|
/**
|
|
2718
|
-
*
|
|
2706
|
+
* 连接状态定义枚举值
|
|
2719
2707
|
*/
|
|
2720
|
-
|
|
2708
|
+
declare enum RCConnectionStatus {
|
|
2721
2709
|
/**
|
|
2722
|
-
*
|
|
2710
|
+
* 已连接
|
|
2723
2711
|
*/
|
|
2724
|
-
|
|
2725
|
-
key: string;
|
|
2726
|
-
}[];
|
|
2712
|
+
CONNECTED = 0,
|
|
2727
2713
|
/**
|
|
2728
|
-
*
|
|
2714
|
+
* 连接中
|
|
2729
2715
|
*/
|
|
2716
|
+
CONNECTING = 1,
|
|
2730
2717
|
/**
|
|
2731
|
-
*
|
|
2718
|
+
* 无连接,或已断开
|
|
2732
2719
|
*/
|
|
2733
|
-
|
|
2734
|
-
}
|
|
2735
|
-
/**
|
|
2736
|
-
* @category Interface
|
|
2737
|
-
*/
|
|
2738
|
-
interface IChatroomEntries {
|
|
2720
|
+
DISCONNECTED = 2,
|
|
2739
2721
|
/**
|
|
2740
|
-
*
|
|
2741
|
-
* key 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
2742
|
-
* value 属性对应的值, 最大长度 4096 字符
|
|
2722
|
+
* 连接暂停状态,SDK 内部 5s 后会自动尝试重连
|
|
2743
2723
|
*/
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
}[];
|
|
2724
|
+
SUSPENDED = 3
|
|
2725
|
+
}
|
|
2726
|
+
interface IConnectionListener {
|
|
2748
2727
|
/**
|
|
2749
|
-
*
|
|
2728
|
+
* 连接成功
|
|
2750
2729
|
*/
|
|
2730
|
+
onConnected(): void;
|
|
2751
2731
|
/**
|
|
2752
|
-
*
|
|
2732
|
+
* 连接中止,SDK 内部会进行重连
|
|
2733
|
+
* @param code 中止原因
|
|
2753
2734
|
*/
|
|
2754
|
-
|
|
2735
|
+
onSuspend(code: ErrorCode): void;
|
|
2755
2736
|
/**
|
|
2756
|
-
*
|
|
2737
|
+
* 连接中
|
|
2757
2738
|
*/
|
|
2758
|
-
|
|
2739
|
+
onConnecting(): void;
|
|
2759
2740
|
/**
|
|
2760
|
-
*
|
|
2741
|
+
* 连接已终止
|
|
2742
|
+
* @param code 连接终止原因
|
|
2761
2743
|
*/
|
|
2762
|
-
|
|
2744
|
+
onDisconnected(code: ErrorCode): void;
|
|
2763
2745
|
}
|
|
2764
|
-
|
|
2765
2746
|
/**
|
|
2766
|
-
*
|
|
2747
|
+
* 抽象连接管理器类,负责 engine 层的连接状态维持,和对外的连接状态通知
|
|
2767
2748
|
*/
|
|
2768
|
-
|
|
2749
|
+
declare abstract class AConnectionMgr {
|
|
2750
|
+
protected readonly appkey: string;
|
|
2751
|
+
private navi;
|
|
2752
|
+
protected logger: BasicLogger;
|
|
2753
|
+
private listener;
|
|
2754
|
+
constructor(appkey: string, navi: BasicNavi, logger: BasicLogger, listener: IConnectionListener);
|
|
2769
2755
|
/**
|
|
2770
|
-
*
|
|
2771
|
-
|
|
2772
|
-
|
|
2756
|
+
* 当前连接所用 token
|
|
2757
|
+
*/
|
|
2758
|
+
private token;
|
|
2773
2759
|
/**
|
|
2774
|
-
*
|
|
2775
|
-
|
|
2776
|
-
|
|
2760
|
+
* 获取当前连接中使用的 token
|
|
2761
|
+
* @returns
|
|
2762
|
+
*/
|
|
2763
|
+
getToken(): string;
|
|
2764
|
+
private reconnectKick;
|
|
2777
2765
|
/**
|
|
2778
|
-
*
|
|
2779
|
-
|
|
2780
|
-
|
|
2766
|
+
* 当前连接状态
|
|
2767
|
+
*/
|
|
2768
|
+
private _crtConnectionStatus;
|
|
2781
2769
|
/**
|
|
2782
|
-
*
|
|
2783
|
-
|
|
2784
|
-
|
|
2770
|
+
* 当前用户 ID
|
|
2771
|
+
*/
|
|
2772
|
+
protected _crtUserId: string;
|
|
2785
2773
|
/**
|
|
2786
|
-
*
|
|
2787
|
-
|
|
2788
|
-
|
|
2774
|
+
* 获取当前用户 ID
|
|
2775
|
+
* @returns
|
|
2776
|
+
*/
|
|
2777
|
+
getCurrentUserId(): string;
|
|
2789
2778
|
/**
|
|
2790
|
-
*
|
|
2779
|
+
* 缓存的 cmp 权重
|
|
2780
|
+
* disconnect 时重置
|
|
2791
2781
|
*/
|
|
2792
|
-
|
|
2782
|
+
private cmpWeightCache?;
|
|
2793
2783
|
/**
|
|
2794
|
-
*
|
|
2784
|
+
* 修改连接状态
|
|
2785
|
+
* @param status
|
|
2786
|
+
* @param code
|
|
2795
2787
|
*/
|
|
2796
|
-
|
|
2788
|
+
private setConnectionStatus;
|
|
2797
2789
|
/**
|
|
2798
|
-
*
|
|
2790
|
+
* 获取当前连接状态
|
|
2791
|
+
* @returns
|
|
2799
2792
|
*/
|
|
2800
|
-
|
|
2793
|
+
getConnectionStatus(): RCConnectionStatus;
|
|
2801
2794
|
/**
|
|
2802
|
-
*
|
|
2795
|
+
* 建立连接
|
|
2796
|
+
* @param token
|
|
2797
|
+
* @param reconnectKickEnable 设置断线重连时是否踢出当前正在重连的设备 (仅 Electron 环境有效)
|
|
2798
|
+
* 同一个账号在一台新设备上登录的时候,会把这个账号在之前登录的设备上踢出。
|
|
2799
|
+
* 由于 SDK 有断线重连功能,存在下面情况。
|
|
2800
|
+
* 用户在 A 设备登录,A 设备网络不稳定,没有连接成功,SDK 启动重连机制。
|
|
2801
|
+
* 用户此时又在 B 设备登录,B 设备连接成功。
|
|
2802
|
+
* A 设备网络稳定之后,用户在 A 设备连接成功,B 设备被踢出。
|
|
2803
|
+
* 这个字段就是为这种情况加的。
|
|
2804
|
+
* 设置 reconnectKickEnable 为 true 时,SDK 重连的时候发现此时已有别的设备连接成功,不再强行踢出已有设备,而是踢出重连设备。
|
|
2803
2805
|
*/
|
|
2804
|
-
|
|
2806
|
+
connect(token: string, reconnectKickEnable: boolean, traceId: string): IPromiseResult<string>;
|
|
2805
2807
|
/**
|
|
2806
|
-
*
|
|
2808
|
+
* 执行中的连接事务
|
|
2807
2809
|
*/
|
|
2808
|
-
|
|
2810
|
+
private _crtConnectionTask;
|
|
2809
2811
|
/**
|
|
2810
|
-
*
|
|
2812
|
+
* 尝试建立连接
|
|
2813
|
+
* @param token
|
|
2814
|
+
* @param reconnectKickEnable
|
|
2815
|
+
* @param ignoreNaviCache
|
|
2816
|
+
* @param traceId
|
|
2817
|
+
* @description 函数会检测当前是否有进行中的连接任务,若存在,则直接返回当前连接任务
|
|
2811
2818
|
*/
|
|
2812
|
-
|
|
2819
|
+
private try2Connect;
|
|
2813
2820
|
/**
|
|
2814
|
-
*
|
|
2821
|
+
* 创建连接任务
|
|
2822
|
+
* @param token
|
|
2823
|
+
* @param reconnectKickEnable
|
|
2824
|
+
* @param ignoreNaviCache
|
|
2825
|
+
* @param traceId
|
|
2826
|
+
* @returns
|
|
2815
2827
|
*/
|
|
2816
|
-
|
|
2828
|
+
private createConnectionTask;
|
|
2829
|
+
private reconnectTimer;
|
|
2817
2830
|
/**
|
|
2818
|
-
*
|
|
2831
|
+
* 尝试重连
|
|
2832
|
+
* @param ignoreNaviCache 是否忽略 navi 缓存以重新请求 navi
|
|
2819
2833
|
*/
|
|
2820
|
-
|
|
2834
|
+
private try2Reconnect;
|
|
2821
2835
|
/**
|
|
2822
|
-
*
|
|
2836
|
+
* 服务器主动断开时由子类调用,函数将根据 reason 确定是否尝试重连
|
|
2837
|
+
* @param reason
|
|
2823
2838
|
*/
|
|
2824
|
-
|
|
2839
|
+
protected onDisconnectByServer(code: ErrorCode): void;
|
|
2825
2840
|
/**
|
|
2826
|
-
*
|
|
2841
|
+
* Socket 异常中断时由子类调用,SDK 尝试恢复重连
|
|
2827
2842
|
*/
|
|
2828
|
-
|
|
2843
|
+
protected onDisconenctUnusual(code: ErrorCode): void;
|
|
2829
2844
|
/**
|
|
2830
|
-
*
|
|
2845
|
+
* 建立 Socket 连接,由子类集成实现
|
|
2846
|
+
* @param token
|
|
2847
|
+
* @param naviInfo
|
|
2848
|
+
* @param reconnectKickEnable
|
|
2849
|
+
* @param traceId
|
|
2831
2850
|
*/
|
|
2832
|
-
|
|
2851
|
+
protected abstract connectWithToken(token: string, naviInfo: INaviInfo, reconnectKickEnable: boolean, traceId: string): IPromiseResult<string>;
|
|
2833
2852
|
/**
|
|
2834
|
-
*
|
|
2853
|
+
* 当前累计心跳超时次数
|
|
2835
2854
|
*/
|
|
2836
|
-
|
|
2855
|
+
private _failedCount;
|
|
2837
2856
|
/**
|
|
2838
|
-
*
|
|
2857
|
+
* 允许连续 PING 超时次数,超出指定次数后会主动关闭 socket 并重新连接
|
|
2839
2858
|
*/
|
|
2840
|
-
|
|
2859
|
+
private readonly ALLOW_FAILED_TIMES;
|
|
2841
2860
|
/**
|
|
2842
|
-
*
|
|
2861
|
+
* 启动心跳计时器
|
|
2843
2862
|
*/
|
|
2844
|
-
|
|
2863
|
+
private checkAlive;
|
|
2845
2864
|
/**
|
|
2846
|
-
*
|
|
2865
|
+
* 关闭连接
|
|
2866
|
+
* @param inReconnect
|
|
2847
2867
|
*/
|
|
2848
|
-
|
|
2849
|
-
}
|
|
2850
|
-
|
|
2851
|
-
interface IRTCRoomInfo {
|
|
2852
|
-
roomId: string;
|
|
2853
|
-
roomData: unknown[];
|
|
2854
|
-
userCount: number;
|
|
2855
|
-
list: unknown[];
|
|
2856
|
-
}
|
|
2857
|
-
interface IRtcTokenData {
|
|
2858
|
-
rtcToken: string;
|
|
2859
|
-
}
|
|
2860
|
-
interface IRTCUsers {
|
|
2861
|
-
users: {
|
|
2862
|
-
[userId: string]: {
|
|
2863
|
-
/**
|
|
2864
|
-
* 发布的资源数据,是一个 JSON 字符串,解析后为发布的资源列表
|
|
2865
|
-
*/
|
|
2866
|
-
uris?: string;
|
|
2867
|
-
/**
|
|
2868
|
-
* 加房间的身份标识,保存主房间 roomId
|
|
2869
|
-
*/
|
|
2870
|
-
extra?: string;
|
|
2871
|
-
};
|
|
2872
|
-
};
|
|
2873
|
-
}
|
|
2874
|
-
interface IJoinRTCRoomData extends IRTCUsers {
|
|
2875
|
-
token: string;
|
|
2876
|
-
sessionId: string;
|
|
2877
|
-
roomInfo: {
|
|
2878
|
-
key: string;
|
|
2879
|
-
value: string;
|
|
2880
|
-
}[];
|
|
2881
|
-
kvEntries: IServerRTCRoomEntry[];
|
|
2882
|
-
offlineKickTime: number;
|
|
2883
|
-
}
|
|
2884
|
-
interface KVString {
|
|
2885
|
-
[key: string]: string;
|
|
2886
|
-
}
|
|
2887
|
-
/**
|
|
2888
|
-
* 设置 RTC 人员 inner、outer 数据
|
|
2889
|
-
*/
|
|
2890
|
-
interface IRTCUserData {
|
|
2891
|
-
[key: string]: string;
|
|
2892
|
-
}
|
|
2893
|
-
|
|
2894
|
-
/**
|
|
2895
|
-
* @category Interface
|
|
2896
|
-
*/
|
|
2897
|
-
interface IAsyncRes<T = void> {
|
|
2868
|
+
protected abstract close(inReconnect: boolean, closeDB?: boolean): void;
|
|
2898
2869
|
/**
|
|
2899
|
-
*
|
|
2870
|
+
* 完成一次 ping 过程,并返回响应状态码
|
|
2871
|
+
* @param timeout 超时时间
|
|
2900
2872
|
*/
|
|
2901
|
-
|
|
2873
|
+
protected abstract sendPing(timeout: number): Promise<ErrorCode>;
|
|
2902
2874
|
/**
|
|
2903
|
-
*
|
|
2875
|
+
* 业务层主动断开连接时调用
|
|
2904
2876
|
*/
|
|
2905
|
-
|
|
2877
|
+
disconnect(closeDB?: boolean): Promise<void>;
|
|
2906
2878
|
/**
|
|
2907
|
-
*
|
|
2879
|
+
* 清理重连计时器
|
|
2908
2880
|
*/
|
|
2909
|
-
|
|
2910
|
-
}
|
|
2911
|
-
/**
|
|
2912
|
-
* 异步任务结果定义
|
|
2913
|
-
* @description
|
|
2914
|
-
* 通过 `Promise.resolve` 来处理预期内的异常,进而通过 Uncatch Promise Error 暴露预期外的异常
|
|
2915
|
-
*/
|
|
2916
|
-
declare type IPromiseResult<T = void> = Promise<IAsyncRes<T>>;
|
|
2917
|
-
interface IConnectResult {
|
|
2881
|
+
private stopReconnectTimer;
|
|
2918
2882
|
/**
|
|
2919
|
-
*
|
|
2883
|
+
* 获取 CMP 列表
|
|
2920
2884
|
*/
|
|
2921
|
-
|
|
2885
|
+
protected getCmpList(navi: INaviInfo, isTcp?: boolean): ICmpData[];
|
|
2922
2886
|
/**
|
|
2923
|
-
*
|
|
2887
|
+
* 修改 CMP 权重
|
|
2924
2888
|
*/
|
|
2925
|
-
|
|
2889
|
+
protected updateCmpWeight(cmpUrl: string, isRise?: boolean): void;
|
|
2890
|
+
private clearCmpWeightCache;
|
|
2926
2891
|
}
|
|
2927
2892
|
|
|
2928
2893
|
/**
|
|
2929
|
-
*
|
|
2894
|
+
* 查询错误码是否为服务下发的 disconnect 通知 status 所转换
|
|
2895
|
+
* @param code
|
|
2896
|
+
* @description 排除重定向 31006,因 disconnect 和 connAck 都包含元素可被转换为 31006
|
|
2930
2897
|
*/
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2898
|
+
declare const isDisconnectCode: (code: ErrorCode) => boolean;
|
|
2899
|
+
/**
|
|
2900
|
+
* 查询错误码是否为服务下发的 connAck status 所转换
|
|
2901
|
+
* @param code
|
|
2902
|
+
* @description 排除重定向 31006,因 disconnect 和 connAck 都包含元素可被转换为 31006
|
|
2903
|
+
*/
|
|
2904
|
+
declare const isConnnectAckCode: (code: ErrorCode) => boolean;
|
|
2937
2905
|
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2906
|
+
/**
|
|
2907
|
+
* 进程内缓存数据
|
|
2908
|
+
*/
|
|
2909
|
+
interface IProcessCache {
|
|
2910
|
+
crtUserId: string;
|
|
2911
|
+
connectedTime: number;
|
|
2912
|
+
naviInfo: INaviInfo | null;
|
|
2913
|
+
connectionStatus: RCConnectionStatus;
|
|
2914
|
+
deviceId: string;
|
|
2941
2915
|
}
|
|
2942
|
-
|
|
2943
|
-
|
|
2916
|
+
/**
|
|
2917
|
+
* meeting 信令
|
|
2918
|
+
*/
|
|
2919
|
+
declare enum MeetingEventType {
|
|
2920
|
+
meetingData = 1,
|
|
2921
|
+
meetingState = 2,
|
|
2922
|
+
meetingUserState = 3,
|
|
2923
|
+
meetingResourceState = 4,
|
|
2924
|
+
rtcNackSeqId = 5
|
|
2925
|
+
}
|
|
2926
|
+
/**
|
|
2927
|
+
* 约束主进程 CppEngine 与 CppService 间的方法定义,以便于代码检查
|
|
2928
|
+
*/
|
|
2929
|
+
interface IEngine {
|
|
2944
2930
|
/**
|
|
2945
|
-
*
|
|
2931
|
+
* 注册本渲染进程至主进程,以接收主进程的消息通知,同时同步主进程的当前缓存数据
|
|
2946
2932
|
*/
|
|
2947
|
-
|
|
2933
|
+
getMainProcessCache(): IProcessCache;
|
|
2948
2934
|
/**
|
|
2949
|
-
*
|
|
2935
|
+
* 建立连接
|
|
2936
|
+
* @param token
|
|
2937
|
+
* @param reconnectKickEnable
|
|
2950
2938
|
*/
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
};
|
|
2939
|
+
connect(token: string, reconnectKickEnable: boolean, traceId: string): IPromiseResult<string>;
|
|
2940
|
+
getNaviInfoFromCache(): INaviInfo | null;
|
|
2954
2941
|
/**
|
|
2955
|
-
*
|
|
2942
|
+
* 上报版本信息
|
|
2943
|
+
* @param version
|
|
2956
2944
|
*/
|
|
2957
|
-
|
|
2958
|
-
[
|
|
2959
|
-
};
|
|
2945
|
+
reportSDKInfo(version: {
|
|
2946
|
+
[name: string]: string;
|
|
2947
|
+
}): void;
|
|
2960
2948
|
/**
|
|
2961
|
-
*
|
|
2949
|
+
* 连接时间
|
|
2962
2950
|
*/
|
|
2963
|
-
|
|
2951
|
+
getConnectedTime(): number;
|
|
2964
2952
|
/**
|
|
2965
|
-
*
|
|
2953
|
+
* 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
|
|
2954
|
+
* 对于未实现的方法,接口响应 Unsupport 错误码
|
|
2955
|
+
* @param method
|
|
2956
|
+
* @param args
|
|
2966
2957
|
*/
|
|
2967
|
-
|
|
2958
|
+
callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
|
|
2968
2959
|
/**
|
|
2969
|
-
*
|
|
2970
|
-
*
|
|
2960
|
+
* 获取历史消息
|
|
2961
|
+
* @param conversationType
|
|
2962
|
+
* @param targetId
|
|
2963
|
+
* @param timestamp
|
|
2964
|
+
* @param count
|
|
2965
|
+
* @param order
|
|
2971
2966
|
*/
|
|
2972
|
-
|
|
2967
|
+
getHistoryMessage(conversationType: ConversationType, targetId: string,
|
|
2973
2968
|
/**
|
|
2974
|
-
*
|
|
2969
|
+
* 拉取时间戳,值为 `0` 表示从当前时间拉取
|
|
2975
2970
|
*/
|
|
2976
|
-
|
|
2977
|
-
}
|
|
2978
|
-
interface IStorage {
|
|
2979
|
-
setItem(key: string, value: string): void;
|
|
2980
|
-
getItem(key: string): string | null;
|
|
2981
|
-
removeItem(key: string): void;
|
|
2982
|
-
clear(): void;
|
|
2983
|
-
}
|
|
2984
|
-
interface IResponse {
|
|
2985
|
-
status: number;
|
|
2986
|
-
data?: string;
|
|
2987
|
-
}
|
|
2988
|
-
/**
|
|
2989
|
-
* 网络状态枚举
|
|
2990
|
-
*/
|
|
2991
|
-
declare enum NetworkType {
|
|
2992
|
-
WIFI = "wifi",
|
|
2993
|
-
FOUR_G = "4g",
|
|
2994
|
-
THREE_G = "3g",
|
|
2995
|
-
TWO_G = "2g",
|
|
2996
|
-
FIVE_G = "2g",
|
|
2997
|
-
THREE_GENT = "3gnet",
|
|
2998
|
-
UNKONWN = "unknown"
|
|
2999
|
-
}
|
|
3000
|
-
interface IWebSocket {
|
|
3001
|
-
id: number;
|
|
2971
|
+
timestamp: number,
|
|
3002
2972
|
/**
|
|
3003
|
-
*
|
|
3004
|
-
* @param callback
|
|
2973
|
+
* 获取条数, 有效值 `1` - `20`
|
|
3005
2974
|
*/
|
|
3006
|
-
|
|
2975
|
+
count: number,
|
|
3007
2976
|
/**
|
|
3008
|
-
*
|
|
3009
|
-
*
|
|
2977
|
+
* @description
|
|
2978
|
+
* 1. `0` 表示升序,获取消息发送时间比传入 `sentTime` 小 的消息
|
|
2979
|
+
* 2. `1` 表示降序,获取消息发送时间比传入 `sentTime` 大 的消息
|
|
3010
2980
|
*/
|
|
3011
|
-
|
|
2981
|
+
order: 0 | 1,
|
|
3012
2982
|
/**
|
|
3013
|
-
*
|
|
3014
|
-
* @param callback
|
|
2983
|
+
* 会话的业务标识
|
|
3015
2984
|
*/
|
|
3016
|
-
|
|
2985
|
+
channelId: string,
|
|
3017
2986
|
/**
|
|
3018
|
-
*
|
|
3019
|
-
* @param callback
|
|
2987
|
+
* 消息类型
|
|
3020
2988
|
*/
|
|
3021
|
-
|
|
2989
|
+
objectName: string): IPromiseResult<{
|
|
2990
|
+
list: IReceivedMessage[];
|
|
2991
|
+
hasMore: boolean;
|
|
2992
|
+
}>;
|
|
3022
2993
|
/**
|
|
3023
|
-
*
|
|
3024
|
-
* @param data
|
|
2994
|
+
* 获取指定消息类型的历史消息
|
|
3025
2995
|
*/
|
|
3026
|
-
|
|
2996
|
+
getHistoryMessagesByObjectNames(conversationType: ConversationType, targetId: string, timestamp: number, count: number, messageTypes: string[], order: number, channelId: string): Promise<IAsyncRes<{
|
|
2997
|
+
list: IReceivedMessage[];
|
|
2998
|
+
hasMore: boolean;
|
|
2999
|
+
}>>;
|
|
3027
3000
|
/**
|
|
3028
|
-
*
|
|
3029
|
-
* @param code
|
|
3030
|
-
* @param reason
|
|
3001
|
+
* 删除历史消息 通过 messageUId
|
|
3031
3002
|
*/
|
|
3032
|
-
|
|
3033
|
-
}
|
|
3034
|
-
/**
|
|
3035
|
-
* 平台运行时抽象
|
|
3036
|
-
*/
|
|
3037
|
-
interface IRuntime {
|
|
3003
|
+
deleteRemoteMessage(conversationType: ConversationType, targetId: string,
|
|
3038
3004
|
/**
|
|
3039
|
-
*
|
|
3005
|
+
* @description
|
|
3006
|
+
* message 中 messageUId、setTime、messageDirection 为必须参数
|
|
3040
3007
|
*/
|
|
3041
|
-
|
|
3008
|
+
messages: {
|
|
3009
|
+
messageUId: string;
|
|
3010
|
+
sentTime: number;
|
|
3011
|
+
messageDirection: MessageDirection;
|
|
3012
|
+
}[],
|
|
3042
3013
|
/**
|
|
3043
|
-
*
|
|
3044
|
-
* @param options
|
|
3014
|
+
* 会话的业务标识
|
|
3045
3015
|
*/
|
|
3046
|
-
|
|
3016
|
+
channelId: string): Promise<ErrorCode>;
|
|
3017
|
+
recallMsg(conversationType: ConversationType, targetId: string, messageUId: string, sentTime: number, recallMsgOptions: IRecallMsgOptions): IPromiseResult<IReceivedMessage>;
|
|
3047
3018
|
/**
|
|
3048
|
-
*
|
|
3019
|
+
* 删除历史消息 通过 时间戳
|
|
3020
|
+
* @param timestamp 小于等于传入时间戳的消息均删除
|
|
3049
3021
|
*/
|
|
3050
|
-
|
|
3022
|
+
deleteRemoteMessageByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number,
|
|
3051
3023
|
/**
|
|
3052
|
-
*
|
|
3024
|
+
* 会话的业务标识
|
|
3053
3025
|
*/
|
|
3054
|
-
|
|
3026
|
+
channelId: string): Promise<ErrorCode>;
|
|
3055
3027
|
/**
|
|
3056
|
-
*
|
|
3028
|
+
* 获取会话列表
|
|
3029
|
+
* @param count 指定获取数量, 不传则获取全部会话列表,默认 `300`
|
|
3057
3030
|
*/
|
|
3058
|
-
|
|
3031
|
+
getConversationList(
|
|
3059
3032
|
/**
|
|
3060
|
-
*
|
|
3033
|
+
* 拉取数量, 有效值 0 - 1000, 默认 300
|
|
3061
3034
|
*/
|
|
3062
|
-
|
|
3035
|
+
count: number,
|
|
3063
3036
|
/**
|
|
3064
|
-
*
|
|
3037
|
+
* 会话类型
|
|
3038
|
+
* @todo 待确认是否生效
|
|
3065
3039
|
*/
|
|
3066
|
-
|
|
3040
|
+
conversationType?: ConversationType,
|
|
3067
3041
|
/**
|
|
3068
|
-
*
|
|
3042
|
+
* 起始时间
|
|
3069
3043
|
*/
|
|
3070
|
-
|
|
3044
|
+
startTime?: number,
|
|
3071
3045
|
/**
|
|
3072
|
-
*
|
|
3073
|
-
* 2g 3g 4g wifi unkown
|
|
3046
|
+
* 获取顺序
|
|
3074
3047
|
*/
|
|
3075
|
-
|
|
3076
|
-
}
|
|
3077
|
-
|
|
3078
|
-
/**
|
|
3079
|
-
* 拓展方法定义,便于 electron-solution 实现时保持接口类型推导可用
|
|
3080
|
-
*/
|
|
3081
|
-
interface IExtraMethod {
|
|
3082
|
-
getConversationsByPage(conversationTypes: ConversationType[], sentTime: number, count: number, channelId?: string): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
3083
|
-
getHistoryMessagesByObjectNames(conversationType: ConversationType, targetId: string, sentTime: number, count: number, objectNames: string[], desc: 0 | 1, tag: string): Promise<IAsyncRes<{
|
|
3084
|
-
list: IReceivedMessage[];
|
|
3085
|
-
hasMore: boolean;
|
|
3086
|
-
}>>;
|
|
3087
|
-
updateMessageReceiptStatus(conersationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<IAsyncRes<boolean>>;
|
|
3088
|
-
}
|
|
3089
|
-
|
|
3090
|
-
/**
|
|
3091
|
-
* 连接协议
|
|
3092
|
-
* 截止 5.7.4 版本,暂不支持 rpp 和 quic
|
|
3093
|
-
* v2 版本文档: https://a5bq662kv5.feishu.cn/wiki/wikcnfo3lEo2CPbonDxuXFvU0Kb#K7nbeN
|
|
3094
|
-
*/
|
|
3095
|
-
declare enum EConnectProtocol {
|
|
3096
|
-
RMTP = 1,
|
|
3097
|
-
TLS = 2,
|
|
3098
|
-
RPP = 3,
|
|
3099
|
-
QUIC = 4,
|
|
3100
|
-
WS = 5,
|
|
3101
|
-
WSS = 6
|
|
3102
|
-
}
|
|
3103
|
-
interface INaviRequestOption {
|
|
3104
|
-
appkey: string;
|
|
3105
|
-
uri: string;
|
|
3106
|
-
token: string;
|
|
3107
|
-
platform: string;
|
|
3108
|
-
isTcp?: boolean;
|
|
3109
|
-
}
|
|
3110
|
-
interface ICmpData {
|
|
3111
|
-
addr: string;
|
|
3112
|
-
protocol: EConnectProtocol;
|
|
3113
|
-
weight: number;
|
|
3114
|
-
}
|
|
3115
|
-
/**
|
|
3116
|
-
* 导航信息数据结构
|
|
3117
|
-
*/
|
|
3118
|
-
interface INaviInfo {
|
|
3048
|
+
order?: 0 | 1,
|
|
3119
3049
|
/**
|
|
3120
|
-
*
|
|
3050
|
+
* 会话的业务标识
|
|
3121
3051
|
*/
|
|
3122
|
-
|
|
3052
|
+
channelId?: string): IPromiseResult<IReceivedConversation[]>;
|
|
3123
3053
|
/**
|
|
3124
|
-
*
|
|
3054
|
+
* 分页获取会话列表,仅 electron中使用
|
|
3125
3055
|
*/
|
|
3126
|
-
|
|
3056
|
+
getConversationsByPage(conversationTypes: ConversationType[], startTime: number, count: number, channelId: string): IPromiseResult<IReceivedConversation[]>;
|
|
3127
3057
|
/**
|
|
3128
|
-
*
|
|
3058
|
+
* 获取指定会话
|
|
3129
3059
|
*/
|
|
3130
|
-
|
|
3060
|
+
getConversation(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IReceivedConversation | null>;
|
|
3131
3061
|
/**
|
|
3132
|
-
*
|
|
3133
|
-
* @description 该字段为 SDK 内增加的字段,导航接口数据中不存在
|
|
3062
|
+
* 获取未读会话列表
|
|
3134
3063
|
*/
|
|
3135
|
-
|
|
3064
|
+
getUnreadConversationList(conversationTypes: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
3136
3065
|
/**
|
|
3137
|
-
*
|
|
3066
|
+
* 删除会话
|
|
3067
|
+
* @description 该删除操作会删除服务器端存储的会话数据
|
|
3068
|
+
* @param conversationType
|
|
3069
|
+
* @param targetId
|
|
3138
3070
|
*/
|
|
3139
|
-
|
|
3071
|
+
removeConversation(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
|
|
3140
3072
|
/**
|
|
3141
|
-
*
|
|
3142
|
-
* @
|
|
3143
|
-
* @
|
|
3073
|
+
* 获取所有会话未读数
|
|
3074
|
+
* @param channelId 多组织 Id
|
|
3075
|
+
* @param conversationTypes
|
|
3076
|
+
* @param includeMuted 包含已设置免打扰的会话
|
|
3144
3077
|
*/
|
|
3145
|
-
|
|
3078
|
+
getAllConversationUnreadCount(channelId: string, conversationTypes: ConversationType[], includeMuted: boolean): IPromiseResult<number>;
|
|
3146
3079
|
/**
|
|
3147
|
-
*
|
|
3148
|
-
* @example a.domain.com:443,b.domain.com:443
|
|
3149
|
-
* @note 在 V2 版本废弃
|
|
3080
|
+
* 获取指定会话未读数
|
|
3150
3081
|
*/
|
|
3151
|
-
|
|
3082
|
+
getConversationUnreadCount(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<number>;
|
|
3152
3083
|
/**
|
|
3153
|
-
*
|
|
3154
|
-
* @note 在 V2 版本废弃
|
|
3084
|
+
* 清除指定会话未读数
|
|
3155
3085
|
*/
|
|
3156
|
-
|
|
3086
|
+
clearConversationUnreadCount(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
|
|
3157
3087
|
/**
|
|
3158
|
-
*
|
|
3159
|
-
* 1. 公有云未开通音视频时,值为 null
|
|
3160
|
-
* 2. 私有云无配置时为 `{ "strategy": 0 }`
|
|
3088
|
+
* 获取第一个未读消息
|
|
3161
3089
|
*/
|
|
3162
|
-
|
|
3090
|
+
getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IReceivedMessage | null>;
|
|
3163
3091
|
/**
|
|
3164
|
-
*
|
|
3165
|
-
* @
|
|
3166
|
-
* @description 公有云独有配置
|
|
3092
|
+
* 按UId批量取消息
|
|
3093
|
+
* @param msgUids
|
|
3167
3094
|
*/
|
|
3168
|
-
|
|
3095
|
+
getMessageByUids(msgUids: string[]): IReceivedMessage[];
|
|
3169
3096
|
/**
|
|
3170
|
-
*
|
|
3171
|
-
* @
|
|
3097
|
+
* 设置消息可搜索内容
|
|
3098
|
+
* @param messageId
|
|
3099
|
+
* @param content
|
|
3172
3100
|
*/
|
|
3173
|
-
|
|
3101
|
+
setMessageSearchContent(messageId: number, content: string): Promise<ErrorCode>;
|
|
3174
3102
|
/**
|
|
3175
|
-
*
|
|
3176
|
-
* @description
|
|
3177
|
-
* 1. 公有云通过 `developer.rongcloud.cn` 管理后台 `单群聊消息云端存储` 功能开关进行配置
|
|
3178
|
-
* 2. 私有云默认为 `true`
|
|
3103
|
+
* 按msgUids打量获取消息
|
|
3179
3104
|
*/
|
|
3180
|
-
|
|
3105
|
+
getMessageByMsgUids(targetId: string, channelId: string, conversationType: ConversationType, msgUids: string[]): IReceivedMessage[];
|
|
3181
3106
|
/**
|
|
3182
|
-
*
|
|
3183
|
-
* @
|
|
3184
|
-
* 1. 私有云对聊天室功能支持有限,默认为 `false`
|
|
3185
|
-
* 2. TODO: 公有云配置待确认
|
|
3107
|
+
* 设置/保存指定会话消息草稿
|
|
3108
|
+
* @draft 草稿内容
|
|
3186
3109
|
*/
|
|
3187
|
-
|
|
3110
|
+
saveConversationMessageDraft(conversationType: ConversationType, targetId: string, draft: string, channelId: string): Promise<ErrorCode>;
|
|
3188
3111
|
/**
|
|
3189
|
-
*
|
|
3190
|
-
* @description
|
|
3191
|
-
* 1. 公有云下,该地址为七牛云服务器地址
|
|
3192
|
-
* 2. 私有云下,该地址为私有云自研文件服务器地址
|
|
3193
|
-
* @note 在 V2 版本废弃
|
|
3112
|
+
* 获取指定会话消息草稿
|
|
3194
3113
|
*/
|
|
3195
|
-
|
|
3114
|
+
getConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<string>;
|
|
3196
3115
|
/**
|
|
3197
|
-
*
|
|
3116
|
+
* 清除指定会话消息草稿
|
|
3198
3117
|
*/
|
|
3199
|
-
|
|
3118
|
+
clearConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
|
|
3200
3119
|
/**
|
|
3201
|
-
*
|
|
3202
|
-
* @todo 需确认有效值及作用
|
|
3120
|
+
* 从服务端拉取会话状态
|
|
3203
3121
|
*/
|
|
3204
|
-
|
|
3122
|
+
pullConversationStatus(timestamp: number): Promise<IAsyncRes<IServerConversationStatus[]>>;
|
|
3205
3123
|
/**
|
|
3206
|
-
*
|
|
3124
|
+
* 批量设置会话 置顶、免打扰
|
|
3207
3125
|
*/
|
|
3208
|
-
|
|
3126
|
+
batchSetConversationStatus(statusList: ISetConversationStatusOptions[]): Promise<ErrorCode>;
|
|
3127
|
+
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void, traceId?: string): IPromiseResult<IReceivedMessage>;
|
|
3209
3128
|
/**
|
|
3210
|
-
*
|
|
3129
|
+
* 断开连接
|
|
3211
3130
|
*/
|
|
3212
|
-
|
|
3131
|
+
disconnect(closeDB?: boolean): void;
|
|
3213
3132
|
/**
|
|
3214
|
-
*
|
|
3215
|
-
* @description
|
|
3216
|
-
* 配置来源:
|
|
3217
|
-
* 1. 导航
|
|
3218
|
-
* 2. 服务端实时下发
|
|
3219
|
-
* 已有配置字段:
|
|
3220
|
-
* 1. Lan. 推送使用的语言设置,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
3221
|
-
* 2. ShPushSwit. 推送是否显示详情设置,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
3222
|
-
* 3. MobPushSwit: Web/PC 在线,移动端不在线是否发送推送开关,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
3223
|
-
* 4. OffMsgDur: 离线消息保存天数,设置天数不可大于App级对应配置,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
3224
|
-
* 5. VoipInfo: 音视频相关配置,用户端不可自定义修改. 由服务端决定,与导航下发格式一致
|
|
3225
|
-
* @todo 需确认公有云与私有云区别
|
|
3133
|
+
* 拉取用户级配置数据
|
|
3226
3134
|
*/
|
|
3227
|
-
|
|
3135
|
+
pullUserSettings(version: number): IPromiseResult<IServerUserSetting>;
|
|
3228
3136
|
/**
|
|
3229
|
-
*
|
|
3137
|
+
* 消息注册
|
|
3138
|
+
* @description
|
|
3139
|
+
* 消息注册需在应用初始化完成前进行,否则在搭配 C++ 协议栈使用时,
|
|
3140
|
+
* 本端发出的消息将不默认作为未知消息处理,不存储、不计数
|
|
3141
|
+
* @param objectName 消息类型,如:RC:TxtMsg
|
|
3142
|
+
* @param isPersited 是否存储
|
|
3143
|
+
* @param isCounted 是否技术
|
|
3144
|
+
* @param searchProps 搜索字段,只在搭配协议栈使用时有效
|
|
3145
|
+
* @param isStatusMessage 是否是状态消息
|
|
3230
3146
|
*/
|
|
3231
|
-
|
|
3147
|
+
registerMessageType(objectName: string, isPersited: boolean, isCounted: boolean, searchProps: string[], isStatusMessage: boolean): void;
|
|
3232
3148
|
/**
|
|
3233
|
-
*
|
|
3234
|
-
* @
|
|
3149
|
+
* 加入聊天室
|
|
3150
|
+
* @param count 拉取消息数量
|
|
3235
3151
|
*/
|
|
3236
|
-
|
|
3152
|
+
joinChatroom(chatroomId: string, count: number): Promise<ErrorCode>;
|
|
3237
3153
|
/**
|
|
3238
|
-
*
|
|
3239
|
-
* @
|
|
3240
|
-
* 1. 确定其控制的功能
|
|
3241
|
-
* 2. 确定 web 相关性
|
|
3242
|
-
* @note 在 V2 版本废弃
|
|
3154
|
+
* 加入已存在的聊天室
|
|
3155
|
+
* @param count 拉取消息数量
|
|
3243
3156
|
*/
|
|
3244
|
-
|
|
3157
|
+
joinExistChatroom(chatroomId: string, count: number): Promise<ErrorCode>;
|
|
3245
3158
|
/**
|
|
3246
|
-
*
|
|
3159
|
+
* 退出聊天室
|
|
3247
3160
|
*/
|
|
3248
|
-
|
|
3161
|
+
quitChatroom(chatroomId: string): Promise<ErrorCode>;
|
|
3249
3162
|
/**
|
|
3250
|
-
*
|
|
3251
|
-
* @
|
|
3163
|
+
* 获取聊天室信息
|
|
3164
|
+
* @param count 获取人数, 范围 0 - 20
|
|
3165
|
+
* @param order 排序方式, 1 正序, 2 倒序
|
|
3252
3166
|
*/
|
|
3253
|
-
|
|
3167
|
+
getChatroomInfo(chatroomId: string, count: number, order: number): IPromiseResult<IChatroomInfo>;
|
|
3254
3168
|
/**
|
|
3255
|
-
*
|
|
3256
|
-
* @description 私有云字段,即公有云配置中的 `videoTimes`
|
|
3169
|
+
* 获取聊天室历史消息
|
|
3257
3170
|
*/
|
|
3258
|
-
|
|
3171
|
+
getChatroomHistoryMessages(chatroomId: string, timestamp: number, count: number, order: number): IPromiseResult<{
|
|
3172
|
+
list: IReceivedMessage[];
|
|
3173
|
+
hasMore: boolean;
|
|
3174
|
+
}>;
|
|
3259
3175
|
/**
|
|
3260
|
-
*
|
|
3176
|
+
* 设置聊天室属性
|
|
3261
3177
|
*/
|
|
3262
|
-
|
|
3178
|
+
setChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
|
|
3263
3179
|
/**
|
|
3264
|
-
*
|
|
3265
|
-
* @example `'{
|
|
3266
|
-
* "url": "logcollection.ronghub.com", // 上传地址
|
|
3267
|
-
* "level": 1, // 日志等级
|
|
3268
|
-
* "itv": 6, // 上传频率,即时间间隔,单位 s
|
|
3269
|
-
* "times": 5 // 重试次数?
|
|
3270
|
-
* }'`
|
|
3180
|
+
* 批量设置聊天室属性
|
|
3271
3181
|
*/
|
|
3272
|
-
|
|
3182
|
+
setChatroomEntries(chatroomId: string, entry: IChrmKVEntries): Promise<{
|
|
3183
|
+
code: ErrorCode;
|
|
3184
|
+
data?: any;
|
|
3185
|
+
}>;
|
|
3273
3186
|
/**
|
|
3274
|
-
*
|
|
3275
|
-
* @description 公有云独有配置
|
|
3276
|
-
* @example `gz.bcebos.com`
|
|
3277
|
-
* @deprecated 已废弃
|
|
3187
|
+
* 强制设置聊天室属性
|
|
3278
3188
|
*/
|
|
3279
|
-
|
|
3189
|
+
forceSetChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
|
|
3280
3190
|
/**
|
|
3281
|
-
*
|
|
3282
|
-
* @example
|
|
3283
|
-
* ```
|
|
3284
|
-
* `[{"qiniu":"upload.qiniup.com","p":"1"},
|
|
3285
|
-
* {"baidu":"gz.bcebos.com","p":"2"},
|
|
3286
|
-
* {"aliyun":"oss-cn-beijing.aliyuncs.com","p":"3"}]`
|
|
3287
|
-
* ```
|
|
3191
|
+
* 删除聊天室属性
|
|
3288
3192
|
*/
|
|
3289
|
-
|
|
3193
|
+
removeChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
|
|
3290
3194
|
/**
|
|
3291
|
-
*
|
|
3195
|
+
* 批量删除聊天室属性
|
|
3292
3196
|
*/
|
|
3293
|
-
|
|
3197
|
+
removeChatroomEntries(chatroomId: string, entries: IChrmKVEntries): Promise<{
|
|
3198
|
+
code: ErrorCode;
|
|
3199
|
+
data?: any;
|
|
3200
|
+
}>;
|
|
3294
3201
|
/**
|
|
3295
|
-
*
|
|
3202
|
+
* 强制删除聊天室属性
|
|
3296
3203
|
*/
|
|
3297
|
-
|
|
3204
|
+
forceRemoveChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
|
|
3298
3205
|
/**
|
|
3299
|
-
*
|
|
3206
|
+
* 获取聊天室 key 对应 value
|
|
3300
3207
|
*/
|
|
3301
|
-
|
|
3208
|
+
getChatroomEntry(chatroomId: string, key: string): IPromiseResult<string | null>;
|
|
3302
3209
|
/**
|
|
3303
|
-
*
|
|
3210
|
+
* 获取聊天室所有 key value
|
|
3304
3211
|
*/
|
|
3305
|
-
|
|
3212
|
+
getAllChatroomEntry(chatroomId: string): IPromiseResult<{
|
|
3213
|
+
[key: string]: string;
|
|
3214
|
+
}>;
|
|
3306
3215
|
/**
|
|
3307
|
-
*
|
|
3216
|
+
* 获取上传认证信息
|
|
3217
|
+
* @description
|
|
3218
|
+
* 若不传 fileName 百度上传认证字段(bosToken、bosDate、path)均返回 null
|
|
3308
3219
|
*/
|
|
3309
|
-
|
|
3220
|
+
getFileToken(fileType: FileType, fileName?: string, httpMethod?: string, queryUriString?: string): Promise<IAsyncRes<IUploadAuth>>;
|
|
3310
3221
|
/**
|
|
3311
|
-
*
|
|
3222
|
+
* 获取文件上传后下载地址
|
|
3312
3223
|
*/
|
|
3313
|
-
|
|
3224
|
+
getFileUrl(fileType: FileType, uploadMethod: UploadMethod, fileName?: string, originName?: string): IPromiseResult<{
|
|
3225
|
+
downloadUrl: string;
|
|
3226
|
+
}>;
|
|
3314
3227
|
/**
|
|
3315
|
-
*
|
|
3228
|
+
* 创建标签
|
|
3229
|
+
* @param tag 标签
|
|
3316
3230
|
*/
|
|
3317
|
-
|
|
3231
|
+
createTag(tag: ITagParam): IPromiseResult;
|
|
3318
3232
|
/**
|
|
3319
|
-
*
|
|
3233
|
+
* 删除标签
|
|
3234
|
+
* @param tagId 标签id
|
|
3320
3235
|
*/
|
|
3321
|
-
|
|
3236
|
+
removeTag(tagId: string): IPromiseResult;
|
|
3322
3237
|
/**
|
|
3323
|
-
*
|
|
3324
|
-
* @
|
|
3238
|
+
* 编辑标签
|
|
3239
|
+
* @param tag 标签
|
|
3325
3240
|
*/
|
|
3326
|
-
|
|
3241
|
+
updateTag(tag: ITagParam): IPromiseResult;
|
|
3327
3242
|
/**
|
|
3328
|
-
*
|
|
3329
|
-
* @deprecated 已废弃
|
|
3243
|
+
* 获取标签列表
|
|
3330
3244
|
*/
|
|
3331
|
-
|
|
3245
|
+
getTagList(): IPromiseResult<Array<ITagInfo>>;
|
|
3332
3246
|
/**
|
|
3333
|
-
*
|
|
3334
|
-
* @
|
|
3247
|
+
* 添加会话到标签(给多个会话增加标签)
|
|
3248
|
+
* @param tagId 标签id
|
|
3249
|
+
* @param conversations 要添加的会话列表
|
|
3335
3250
|
*/
|
|
3336
|
-
|
|
3251
|
+
addTagForConversations(tagId: string, conversations: IConversationOption[]): IPromiseResult;
|
|
3337
3252
|
/**
|
|
3338
|
-
*
|
|
3253
|
+
* 删除标签中的会话(从多个会话中批量删除指定标签)
|
|
3254
|
+
* @param tagId 标签id
|
|
3255
|
+
* @param conversations 要删除的会话列表
|
|
3339
3256
|
*/
|
|
3340
|
-
|
|
3257
|
+
removeTagForConversations(tagId: string, conversations: IConversationOption[]): IPromiseResult;
|
|
3341
3258
|
/**
|
|
3342
|
-
*
|
|
3259
|
+
* 删除会话中的标签(从单一会话中批量删除标签)
|
|
3260
|
+
* @param conversationType 会话类型
|
|
3261
|
+
* @param targetId 会话id
|
|
3262
|
+
* @param tagIds 要删除的标签列表
|
|
3343
3263
|
*/
|
|
3344
|
-
|
|
3264
|
+
removeTagsForConversation(conversation: IConversationOption, tagIds: string[]): IPromiseResult;
|
|
3345
3265
|
/**
|
|
3346
|
-
*
|
|
3266
|
+
* 获取标签下的会话列表
|
|
3267
|
+
* @param tagId 标签id
|
|
3347
3268
|
*/
|
|
3348
|
-
|
|
3269
|
+
getConversationListByTag(tagId: string, startTime: number, count?: number, channelId?: string): IPromiseResult<IReceivedConversationByTag[]>;
|
|
3349
3270
|
/**
|
|
3350
|
-
*
|
|
3271
|
+
* 获取标签下的未读消息数
|
|
3272
|
+
* @param tagId 标签id
|
|
3273
|
+
* @param containMuted 是否包含免打扰会话
|
|
3351
3274
|
*/
|
|
3352
|
-
|
|
3275
|
+
getUnreadCountByTag(tagId: string, containMuted: boolean): IPromiseResult<number>;
|
|
3353
3276
|
/**
|
|
3354
|
-
*
|
|
3277
|
+
* 设置标签中会话置顶
|
|
3278
|
+
* @param conversation 会话
|
|
3355
3279
|
*/
|
|
3356
|
-
|
|
3280
|
+
setConversationStatusInTag(tagId: string, conversation: IConversationOption, status: ITagStatus): IPromiseResult;
|
|
3357
3281
|
/**
|
|
3358
|
-
*
|
|
3359
|
-
*
|
|
3282
|
+
* 获取会话里的标签
|
|
3283
|
+
* @param config
|
|
3360
3284
|
*/
|
|
3361
|
-
|
|
3285
|
+
getTagsForConversation(conversation: IConversationOption): IPromiseResult<IConversationTag[]>;
|
|
3362
3286
|
/**
|
|
3363
|
-
*
|
|
3364
|
-
*
|
|
3287
|
+
* 发送群组消息已读回执
|
|
3288
|
+
* 导航下发已读回执开关为 true 时调用
|
|
3365
3289
|
*/
|
|
3366
|
-
|
|
3367
|
-
}
|
|
3368
|
-
|
|
3369
|
-
declare type INaviCache = {
|
|
3370
|
-
token: string;
|
|
3371
|
-
naviInfo: INaviInfo;
|
|
3372
|
-
timestamp: number;
|
|
3373
|
-
};
|
|
3374
|
-
/**
|
|
3375
|
-
* 导航数据管理类,负责管理导航有效期、导航请求、导航缓存
|
|
3376
|
-
*/
|
|
3377
|
-
declare abstract class BasicNavi {
|
|
3378
|
-
protected readonly appkey: string;
|
|
3379
|
-
protected readonly logger: BasicLogger;
|
|
3290
|
+
sendReadReceiptMessage(targetId: string, messageUIds: string[], channelId?: string): Promise<IAsyncRes>;
|
|
3380
3291
|
/**
|
|
3381
|
-
*
|
|
3292
|
+
* 获取群组消息已读列表
|
|
3382
3293
|
*/
|
|
3383
|
-
|
|
3384
|
-
constructor(appkey: string, logger: BasicLogger,
|
|
3294
|
+
getMessageReader(targetId: string, messageUId: string, channelId?: string): IPromiseResult<IMessageReaderResponse>;
|
|
3385
3295
|
/**
|
|
3386
|
-
*
|
|
3296
|
+
* 设置群语音消息已听状态
|
|
3297
|
+
* @param targetId
|
|
3298
|
+
* @param channelId
|
|
3299
|
+
* @param messageUId
|
|
3387
3300
|
*/
|
|
3388
|
-
|
|
3301
|
+
setGroupVoiceMessagePlayed(targetId: string, channelId: string, messageUId: string): Promise<IAsyncRes>;
|
|
3389
3302
|
/**
|
|
3390
|
-
*
|
|
3303
|
+
* 获取群语音消息已听列表
|
|
3304
|
+
* @param targetId
|
|
3305
|
+
* @param channelId
|
|
3306
|
+
* @param messageUId
|
|
3391
3307
|
*/
|
|
3392
|
-
|
|
3308
|
+
getGroupVoiceMessageReader(targetId: string, channelId: string, messageUId: string): IPromiseResult<IMessageReaderResponse>;
|
|
3393
3309
|
/**
|
|
3394
|
-
*
|
|
3395
|
-
* @param token
|
|
3396
|
-
* @param ignoreCache 是否忽略缓存,强制从服务器重新拉取。
|
|
3397
|
-
* @param ignoreExpire 是否忽略有效期检查。理论上只需要在建立连接时需要检测 navi 有效期,其他场景无需检测
|
|
3398
|
-
* @param traceId 事务日志跟踪 ID
|
|
3310
|
+
* 设置群组消息已读
|
|
3399
3311
|
*/
|
|
3400
|
-
|
|
3401
|
-
private sendRequest;
|
|
3312
|
+
setReadMessages(targetId: string, channelId: string, beginMessageUId: string, endMessageUId: string): Promise<IAsyncRes>;
|
|
3402
3313
|
/**
|
|
3403
|
-
*
|
|
3404
|
-
* @param uris 导航服务列表
|
|
3405
|
-
* @param token
|
|
3406
|
-
* @param traceId
|
|
3314
|
+
* 获取群组消息已读回执信息
|
|
3407
3315
|
*/
|
|
3408
|
-
|
|
3316
|
+
getMessageReceiptInfo(targetId: string, messageUId: string, channelId?: string): IPromiseResult<IMessageReaderResponse>;
|
|
3409
3317
|
/**
|
|
3410
|
-
*
|
|
3411
|
-
* @param uri 导航服务地址
|
|
3412
|
-
* @param appkey
|
|
3413
|
-
* @param token
|
|
3414
|
-
* @param version
|
|
3415
|
-
* @param timeout 请求超时时间
|
|
3416
|
-
* @param traceId
|
|
3318
|
+
* 获取服务器时间
|
|
3417
3319
|
*/
|
|
3418
|
-
|
|
3320
|
+
getServerTime(): number;
|
|
3419
3321
|
/**
|
|
3420
|
-
*
|
|
3421
|
-
* @param uri 导航服务地址
|
|
3422
|
-
* @param appkey
|
|
3423
|
-
* @param token
|
|
3424
|
-
* @param version
|
|
3425
|
-
* @param timeout 请求超时时间
|
|
3426
|
-
* @param traceId
|
|
3322
|
+
* 获取设备ID
|
|
3427
3323
|
*/
|
|
3428
|
-
|
|
3324
|
+
getDeviceId(): string;
|
|
3429
3325
|
/**
|
|
3430
|
-
*
|
|
3431
|
-
* @param code
|
|
3326
|
+
* 获取当前 userId
|
|
3432
3327
|
*/
|
|
3433
|
-
|
|
3328
|
+
getCurrentUserId(): string;
|
|
3329
|
+
getConversationListWithAllChannel(): IPromiseResult<IReceivedConversation[]>;
|
|
3330
|
+
getConversationListWithAllChannelByPage(index: number, limit: number): IPromiseResult<IReceivedConversation[]>;
|
|
3434
3331
|
/**
|
|
3435
|
-
*
|
|
3436
|
-
* @param formatedToken
|
|
3437
|
-
* @param naviInfo
|
|
3438
|
-
* @description 设置缓存的同时会检测缓存中的既有数据,适当清理,避免无效数据长时间占用存储空间
|
|
3332
|
+
* 设置用户在线状态监听器
|
|
3439
3333
|
*/
|
|
3440
|
-
|
|
3334
|
+
setUserStatusListener(config: {
|
|
3335
|
+
userIds: string[];
|
|
3336
|
+
}, listener: Function): void;
|
|
3441
3337
|
/**
|
|
3442
|
-
*
|
|
3443
|
-
* @param formatedToken
|
|
3338
|
+
* 设置当前用户在线状态
|
|
3444
3339
|
*/
|
|
3445
|
-
|
|
3340
|
+
setUserStatus(status: number): Promise<ErrorCode>;
|
|
3446
3341
|
/**
|
|
3447
|
-
*
|
|
3448
|
-
* @param token
|
|
3342
|
+
* 订阅用户在线状态
|
|
3449
3343
|
*/
|
|
3450
|
-
|
|
3344
|
+
subscribeUserStatus(userIds: string[]): Promise<ErrorCode>;
|
|
3451
3345
|
/**
|
|
3452
|
-
*
|
|
3453
|
-
* @param token
|
|
3454
|
-
* @param voipCallInfo
|
|
3346
|
+
* 获取用户状态
|
|
3455
3347
|
*/
|
|
3456
|
-
|
|
3457
|
-
|
|
3348
|
+
getUserStatus(userId: string): IPromiseResult<{
|
|
3349
|
+
status: string;
|
|
3350
|
+
}>;
|
|
3458
3351
|
/**
|
|
3459
|
-
*
|
|
3460
|
-
* 仅私有云 rcx 使用 v1 版本
|
|
3352
|
+
* 清空所有会话
|
|
3461
3353
|
*/
|
|
3462
|
-
|
|
3463
|
-
}
|
|
3464
|
-
|
|
3465
|
-
/**
|
|
3466
|
-
* Websocket 导航工具类
|
|
3467
|
-
*/
|
|
3468
|
-
declare class WebSocketNavi extends BasicNavi {
|
|
3469
|
-
private runtime;
|
|
3354
|
+
clearConversations(conversationTypes?: ConversationType[], channelId?: string): Promise<ErrorCode>;
|
|
3470
3355
|
/**
|
|
3471
|
-
*
|
|
3356
|
+
* 加入黑名单
|
|
3472
3357
|
*/
|
|
3473
|
-
|
|
3474
|
-
constructor(appkey: string, logger: BasicLogger, runtime: IRuntime,
|
|
3358
|
+
addToBlacklist(userId: string): Promise<ErrorCode>;
|
|
3475
3359
|
/**
|
|
3476
|
-
*
|
|
3477
|
-
*/
|
|
3478
|
-
|
|
3479
|
-
protected httpRequest(uri: string, appkey: string, token: string, traceId: string, finished: boolean): IPromiseResult<INaviInfo>;
|
|
3480
|
-
protected httpRequestV2(uri: string, appkey: string, token: string, traceId: string): IPromiseResult<INaviInfo>;
|
|
3481
|
-
protected getNaviCache(formatedToken: string): INaviCache | null;
|
|
3482
|
-
protected setNaviCache(formatedToken: string, naviInfo: INaviInfo): void;
|
|
3483
|
-
}
|
|
3484
|
-
|
|
3485
|
-
/**
|
|
3486
|
-
* 当前运行时设备信息
|
|
3487
|
-
*/
|
|
3488
|
-
interface IOSInfo {
|
|
3489
|
-
/** 软件运行时的 CPU 架构信息 */
|
|
3490
|
-
arch: string;
|
|
3491
|
-
/** 平台标识 */
|
|
3492
|
-
platform: string;
|
|
3493
|
-
/** 操作系统名称 */
|
|
3494
|
-
type: string;
|
|
3495
|
-
/** 操作系统 release 标识 */
|
|
3496
|
-
release: string;
|
|
3497
|
-
/** 操作系统版本信息 */
|
|
3498
|
-
version: string;
|
|
3499
|
-
/** 内存余量 */
|
|
3500
|
-
freemem: number;
|
|
3501
|
-
/** 系统内存总量 */
|
|
3502
|
-
totalmem: number;
|
|
3503
|
-
/** 本次操作系统运行时长 */
|
|
3504
|
-
uptime: number;
|
|
3505
|
-
cpus: {
|
|
3506
|
-
/** CPU 型号标识 */
|
|
3507
|
-
model: string;
|
|
3508
|
-
/** 主频 MHz */
|
|
3509
|
-
speed: number;
|
|
3510
|
-
times: {
|
|
3511
|
-
user: number;
|
|
3512
|
-
nice: number;
|
|
3513
|
-
sys: number;
|
|
3514
|
-
idle: number;
|
|
3515
|
-
irq: number;
|
|
3516
|
-
};
|
|
3517
|
-
}[];
|
|
3518
|
-
networkInterfaces: {
|
|
3519
|
-
/** 网卡接口标识 */
|
|
3520
|
-
[link: string]: {
|
|
3521
|
-
/** IP */
|
|
3522
|
-
address: string;
|
|
3523
|
-
/** 子网掩码 */
|
|
3524
|
-
netmask: string;
|
|
3525
|
-
/** IP 协议版本 */
|
|
3526
|
-
family: string;
|
|
3527
|
-
/** Mac Address */
|
|
3528
|
-
mac: string;
|
|
3529
|
-
/** 是否回环地址 */
|
|
3530
|
-
internal: boolean;
|
|
3531
|
-
/** CIDR */
|
|
3532
|
-
cidr: string | null;
|
|
3533
|
-
}[] | undefined;
|
|
3534
|
-
};
|
|
3535
|
-
}
|
|
3536
|
-
|
|
3537
|
-
interface IProcessInfo {
|
|
3538
|
-
title: string;
|
|
3539
|
-
platform: string;
|
|
3540
|
-
arch: string;
|
|
3541
|
-
pid: number;
|
|
3542
|
-
ppid: number;
|
|
3543
|
-
uptime: number;
|
|
3544
|
-
cpuUsage: {
|
|
3545
|
-
user: number;
|
|
3546
|
-
system: number;
|
|
3547
|
-
};
|
|
3548
|
-
memoryUsage: {
|
|
3549
|
-
rss: number;
|
|
3550
|
-
heapTotal: number;
|
|
3551
|
-
heapUsed: number;
|
|
3552
|
-
external: number;
|
|
3553
|
-
arrayBuffers: number;
|
|
3554
|
-
};
|
|
3555
|
-
resourceUsage: {
|
|
3556
|
-
userCPUTime: number;
|
|
3557
|
-
systemCPUTime: number;
|
|
3558
|
-
maxRSS: number;
|
|
3559
|
-
sharedMemorySize: number;
|
|
3560
|
-
unsharedDataSize: number;
|
|
3561
|
-
unsharedStackSize: number;
|
|
3562
|
-
minorPageFault: number;
|
|
3563
|
-
majorPageFault: number;
|
|
3564
|
-
swappedOut: number;
|
|
3565
|
-
fsRead: number;
|
|
3566
|
-
fsWrite: number;
|
|
3567
|
-
ipcSent: number;
|
|
3568
|
-
ipcReceived: number;
|
|
3569
|
-
signalsCount: number;
|
|
3570
|
-
voluntaryContextSwitches: number;
|
|
3571
|
-
involuntaryContextSwitches: number;
|
|
3572
|
-
};
|
|
3573
|
-
}
|
|
3574
|
-
|
|
3575
|
-
/**
|
|
3576
|
-
* 连接状态定义枚举值
|
|
3577
|
-
*/
|
|
3578
|
-
declare enum RCConnectionStatus {
|
|
3360
|
+
* 将指定用户移除黑名单
|
|
3361
|
+
*/
|
|
3362
|
+
removeFromBlacklist(userId: string): Promise<ErrorCode>;
|
|
3579
3363
|
/**
|
|
3580
|
-
*
|
|
3364
|
+
* 获取黑名单列表
|
|
3581
3365
|
*/
|
|
3582
|
-
|
|
3366
|
+
getBlacklist(): IPromiseResult<string[]>;
|
|
3583
3367
|
/**
|
|
3584
|
-
*
|
|
3368
|
+
* 获取指定人员在黑名单中的状态
|
|
3585
3369
|
*/
|
|
3586
|
-
|
|
3370
|
+
getBlacklistStatus(userId: string): IPromiseResult<number>;
|
|
3587
3371
|
/**
|
|
3588
|
-
*
|
|
3372
|
+
* 向本地插入一条消息,不发送到服务器
|
|
3589
3373
|
*/
|
|
3590
|
-
|
|
3374
|
+
insertMessage(conversationType: ConversationType, targetId: string, insertOptions: IInsertMsgOptions): IPromiseResult<IReceivedMessage>;
|
|
3591
3375
|
/**
|
|
3592
|
-
*
|
|
3376
|
+
* 删除本地消息
|
|
3593
3377
|
*/
|
|
3594
|
-
|
|
3595
|
-
}
|
|
3596
|
-
interface IConnectionListener {
|
|
3378
|
+
deleteMessages(messageIds: number[]): Promise<ErrorCode>;
|
|
3597
3379
|
/**
|
|
3598
|
-
*
|
|
3380
|
+
* 通过时间戳删除本地消息
|
|
3599
3381
|
*/
|
|
3600
|
-
|
|
3382
|
+
deleteMessagesByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, cleanSpace: boolean, channelId: string): Promise<ErrorCode>;
|
|
3601
3383
|
/**
|
|
3602
|
-
*
|
|
3603
|
-
* @param code 中止原因
|
|
3384
|
+
* 清空会话下历史消息
|
|
3604
3385
|
*/
|
|
3605
|
-
|
|
3386
|
+
clearMessages(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
|
|
3606
3387
|
/**
|
|
3607
|
-
*
|
|
3388
|
+
* 获取消息
|
|
3608
3389
|
*/
|
|
3609
|
-
|
|
3390
|
+
getMessage(messageId: number | string): IPromiseResult<IReceivedMessage>;
|
|
3610
3391
|
/**
|
|
3611
|
-
*
|
|
3612
|
-
* @param code 连接终止原因
|
|
3392
|
+
* 设置消息附加信息
|
|
3613
3393
|
*/
|
|
3614
|
-
|
|
3615
|
-
}
|
|
3616
|
-
/**
|
|
3617
|
-
* 抽象连接管理器类,负责 engine 层的连接状态维持,和对外的连接状态通知
|
|
3618
|
-
*/
|
|
3619
|
-
declare abstract class AConnectionMgr {
|
|
3620
|
-
protected readonly appkey: string;
|
|
3621
|
-
private navi;
|
|
3622
|
-
protected logger: BasicLogger;
|
|
3623
|
-
private listener;
|
|
3624
|
-
constructor(appkey: string, navi: BasicNavi, logger: BasicLogger, listener: IConnectionListener);
|
|
3394
|
+
setTextMessageExtra(messageId: number, content: any): Promise<ErrorCode>;
|
|
3625
3395
|
/**
|
|
3626
|
-
*
|
|
3396
|
+
* 设置消息内容
|
|
3627
3397
|
*/
|
|
3628
|
-
|
|
3398
|
+
setMessageContent(messageId: number, content: any, messageType: string): Promise<ErrorCode>;
|
|
3629
3399
|
/**
|
|
3630
|
-
*
|
|
3631
|
-
* @returns
|
|
3400
|
+
* 设置消息搜索字段
|
|
3632
3401
|
*/
|
|
3633
|
-
|
|
3634
|
-
private reconnectKick;
|
|
3402
|
+
setMessageSearchField(messageId: number, content: any, searchFiles: string): Promise<ErrorCode>;
|
|
3635
3403
|
/**
|
|
3636
|
-
|
|
3404
|
+
* 通过关键字与 channelId 搜索所有会话
|
|
3637
3405
|
*/
|
|
3638
|
-
|
|
3406
|
+
searchConversationByContent(keyword: string, customMessageTypes: string[], channelId: string, conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
3407
|
+
searchConversationByContentWithAllChannel(keyword: string, customMessageTypes: string[], conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
3639
3408
|
/**
|
|
3640
|
-
*
|
|
3409
|
+
* 按内容搜索会话内的消息
|
|
3641
3410
|
*/
|
|
3642
|
-
|
|
3411
|
+
searchMessageByContent(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number, total: number, channelId: string): IPromiseResult<{
|
|
3412
|
+
messages: IReceivedMessage[];
|
|
3413
|
+
count: number;
|
|
3414
|
+
}>;
|
|
3643
3415
|
/**
|
|
3644
|
-
*
|
|
3645
|
-
* @returns
|
|
3416
|
+
* 按内容搜索指定会话(不区分 channelId)的消息
|
|
3646
3417
|
*/
|
|
3647
|
-
|
|
3418
|
+
searchMessageByContentWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number): IPromiseResult<{
|
|
3419
|
+
messages: IReceivedMessage[];
|
|
3420
|
+
count: number;
|
|
3421
|
+
}>;
|
|
3648
3422
|
/**
|
|
3649
|
-
|
|
3650
|
-
|
|
3423
|
+
* 按内容搜索时间范围内指定会话(不区分 channelId)的消息
|
|
3424
|
+
*/
|
|
3425
|
+
searchMessageByContentInTimeRangeWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, startTime: number, endTime: number, offset: number, limit: number): IPromiseResult<{
|
|
3426
|
+
messages: IReceivedMessage[];
|
|
3427
|
+
}>;
|
|
3428
|
+
/**
|
|
3429
|
+
* 获取会话下所有未读的 @ 消息
|
|
3651
3430
|
*/
|
|
3652
|
-
|
|
3431
|
+
getUnreadMentionedMessages(conversationType: ConversationType, targetId: string, channelId: string): IReceivedMessage[];
|
|
3653
3432
|
/**
|
|
3654
|
-
*
|
|
3655
|
-
* @param status
|
|
3656
|
-
* @param code
|
|
3433
|
+
* 设置消息发送状态
|
|
3657
3434
|
*/
|
|
3658
|
-
|
|
3435
|
+
setMessageSentStatus(messageId: number, sentStatus: number): Promise<ErrorCode>;
|
|
3659
3436
|
/**
|
|
3660
|
-
*
|
|
3661
|
-
* @returns
|
|
3437
|
+
* 设置消息接收状态
|
|
3662
3438
|
*/
|
|
3663
|
-
|
|
3439
|
+
setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<ErrorCode>;
|
|
3664
3440
|
/**
|
|
3665
|
-
*
|
|
3666
|
-
* @param token
|
|
3667
|
-
* @param reconnectKickEnable 设置断线重连时是否踢出当前正在重连的设备 (仅 Electron 环境有效)
|
|
3668
|
-
* 同一个账号在一台新设备上登录的时候,会把这个账号在之前登录的设备上踢出。
|
|
3669
|
-
* 由于 SDK 有断线重连功能,存在下面情况。
|
|
3670
|
-
* 用户在 A 设备登录,A 设备网络不稳定,没有连接成功,SDK 启动重连机制。
|
|
3671
|
-
* 用户此时又在 B 设备登录,B 设备连接成功。
|
|
3672
|
-
* A 设备网络稳定之后,用户在 A 设备连接成功,B 设备被踢出。
|
|
3673
|
-
* 这个字段就是为这种情况加的。
|
|
3674
|
-
* 设置 reconnectKickEnable 为 true 时,SDK 重连的时候发现此时已有别的设备连接成功,不再强行踢出已有设备,而是踢出重连设备。
|
|
3441
|
+
* 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
|
|
3675
3442
|
*/
|
|
3676
|
-
|
|
3443
|
+
updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): IPromiseResult<boolean>;
|
|
3677
3444
|
/**
|
|
3678
|
-
*
|
|
3445
|
+
* 删除时间戳前的未读数
|
|
3679
3446
|
*/
|
|
3680
|
-
|
|
3447
|
+
clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId: string): Promise<ErrorCode>;
|
|
3681
3448
|
/**
|
|
3682
|
-
*
|
|
3683
|
-
* @param token
|
|
3684
|
-
* @param reconnectKickEnable
|
|
3685
|
-
* @param ignoreNaviCache
|
|
3686
|
-
* @param traceId
|
|
3687
|
-
* @description 函数会检测当前是否有进行中的连接任务,若存在,则直接返回当前连接任务
|
|
3449
|
+
* 获取会话免打扰状态
|
|
3688
3450
|
*/
|
|
3689
|
-
|
|
3451
|
+
getConversationNotificationStatus(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<NotificationStatus>;
|
|
3690
3452
|
/**
|
|
3691
|
-
*
|
|
3692
|
-
* @param token
|
|
3693
|
-
* @param reconnectKickEnable
|
|
3694
|
-
* @param ignoreNaviCache
|
|
3695
|
-
* @param traceId
|
|
3696
|
-
* @returns
|
|
3453
|
+
* 协议栈获取远端历史消息
|
|
3697
3454
|
*/
|
|
3698
|
-
|
|
3699
|
-
|
|
3455
|
+
getRemoteHistoryMessages(conversationType: ConversationType, targetId: string, timestamp: number, count: number, order: 0 | 1, channelId: string): IPromiseResult<{
|
|
3456
|
+
list: IReceivedMessage[];
|
|
3457
|
+
hasMore: boolean;
|
|
3458
|
+
}>;
|
|
3700
3459
|
/**
|
|
3701
|
-
*
|
|
3702
|
-
* @param ignoreNaviCache 是否忽略 navi 缓存以重新请求 navi
|
|
3460
|
+
* 无差别获取本地免打扰列表
|
|
3703
3461
|
*/
|
|
3704
|
-
|
|
3462
|
+
getBlockConversationList(): Promise<IAsyncRes<IBaseConversationInfo[]>>;
|
|
3705
3463
|
/**
|
|
3706
|
-
*
|
|
3707
|
-
* @param reason
|
|
3464
|
+
* 无差别获取本地置顶列表
|
|
3708
3465
|
*/
|
|
3709
|
-
|
|
3466
|
+
getTopConversationList(conversationTypes?: ConversationType[], channelId?: string): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
3710
3467
|
/**
|
|
3711
|
-
*
|
|
3468
|
+
* 获取单个群聊会话 @ 消息未读数
|
|
3712
3469
|
*/
|
|
3713
|
-
|
|
3470
|
+
getUnreadMentionedCount(conversation: IConversationOption): Promise<IAsyncRes<number>>;
|
|
3714
3471
|
/**
|
|
3715
|
-
*
|
|
3716
|
-
* @param token
|
|
3717
|
-
* @param naviInfo
|
|
3718
|
-
* @param reconnectKickEnable
|
|
3719
|
-
* @param traceId
|
|
3472
|
+
* 获取所有群聊会话 @ 消息未读数
|
|
3720
3473
|
*/
|
|
3721
|
-
|
|
3474
|
+
getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
|
|
3475
|
+
clearData(): Promise<IAsyncRes<boolean>>;
|
|
3722
3476
|
/**
|
|
3723
|
-
*
|
|
3477
|
+
* 获取运行时的系统信息,仅限 Electron 平台可用
|
|
3724
3478
|
*/
|
|
3725
|
-
|
|
3479
|
+
getOSInfo(): IPromiseResult<IOSInfo>;
|
|
3726
3480
|
/**
|
|
3727
|
-
*
|
|
3481
|
+
* 获取应用主进程信息,仅限 Electron 平台可用
|
|
3728
3482
|
*/
|
|
3729
|
-
|
|
3483
|
+
getMainProcessInfo(): IPromiseResult<IProcessInfo>;
|
|
3730
3484
|
/**
|
|
3731
|
-
*
|
|
3485
|
+
* 设置代理
|
|
3732
3486
|
*/
|
|
3733
|
-
|
|
3487
|
+
setProxy(proxy: IProxy | null): IPromiseResult<IProxy>;
|
|
3734
3488
|
/**
|
|
3735
|
-
*
|
|
3736
|
-
* @param inReconnect
|
|
3489
|
+
* 获取代理
|
|
3737
3490
|
*/
|
|
3738
|
-
|
|
3491
|
+
getProxy(): IPromiseResult<IProxy>;
|
|
3739
3492
|
/**
|
|
3740
|
-
*
|
|
3741
|
-
* @param timeout 超时时间
|
|
3493
|
+
* 测试代理
|
|
3742
3494
|
*/
|
|
3743
|
-
|
|
3495
|
+
testProxy(proxy: IProxy, testHost: string): Promise<IResponse>;
|
|
3496
|
+
rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<IAsyncRes<any>>;
|
|
3497
|
+
rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<{
|
|
3498
|
+
code: ErrorCode;
|
|
3499
|
+
buffer?: any;
|
|
3500
|
+
}>;
|
|
3501
|
+
}
|
|
3502
|
+
|
|
3503
|
+
declare enum StoreKeys {
|
|
3744
3504
|
/**
|
|
3745
|
-
*
|
|
3505
|
+
* Navi 数据缓存,暂未使用
|
|
3746
3506
|
*/
|
|
3747
|
-
|
|
3507
|
+
NAVI = "rc-navi",
|
|
3748
3508
|
/**
|
|
3749
|
-
*
|
|
3509
|
+
* 实时日志已上报的时间戳
|
|
3750
3510
|
*/
|
|
3751
|
-
|
|
3511
|
+
REALTIME_LOG_TIMESTAMP = "rc-realtime-log-timestamp"
|
|
3512
|
+
}
|
|
3513
|
+
|
|
3514
|
+
/**
|
|
3515
|
+
* 音视频模式
|
|
3516
|
+
*/
|
|
3517
|
+
declare enum RTCMode {
|
|
3752
3518
|
/**
|
|
3753
|
-
*
|
|
3519
|
+
* 普通音视频模式
|
|
3754
3520
|
*/
|
|
3755
|
-
|
|
3521
|
+
RTC = 0,
|
|
3756
3522
|
/**
|
|
3757
|
-
*
|
|
3523
|
+
* 直播模式
|
|
3524
|
+
*/
|
|
3525
|
+
LIVE = 2,
|
|
3526
|
+
/**
|
|
3527
|
+
*sip呼叫
|
|
3528
|
+
*/
|
|
3529
|
+
SIP = 4,
|
|
3530
|
+
/**
|
|
3531
|
+
* 呼叫模式.包括单呼和群呼
|
|
3532
|
+
*/
|
|
3533
|
+
CALL = 5,
|
|
3534
|
+
/**
|
|
3535
|
+
* 会议
|
|
3536
|
+
*/
|
|
3537
|
+
MEETING = 6,
|
|
3538
|
+
/**
|
|
3539
|
+
* 跨应用多人房间
|
|
3540
|
+
*/
|
|
3541
|
+
CROSS_MUTI = 7,
|
|
3542
|
+
/**
|
|
3543
|
+
* 跨应用直播
|
|
3544
|
+
*/
|
|
3545
|
+
CROSS_LIVE = 8
|
|
3546
|
+
}
|
|
3547
|
+
/**
|
|
3548
|
+
* 直播类型
|
|
3549
|
+
*/
|
|
3550
|
+
declare enum LiveType {
|
|
3551
|
+
/**
|
|
3552
|
+
* 音视频直播
|
|
3553
|
+
*/
|
|
3554
|
+
AUDIO_AND_VIDEO = 0,
|
|
3555
|
+
/**
|
|
3556
|
+
* 音频直播
|
|
3557
|
+
*/
|
|
3558
|
+
AUDIO = 1
|
|
3559
|
+
}
|
|
3560
|
+
declare enum LiveRole {
|
|
3561
|
+
/**
|
|
3562
|
+
* 主播身份
|
|
3563
|
+
*/
|
|
3564
|
+
ANCHOR = 1,
|
|
3565
|
+
/**
|
|
3566
|
+
* 观众身份
|
|
3758
3567
|
*/
|
|
3759
|
-
|
|
3760
|
-
private clearCmpWeightCache;
|
|
3568
|
+
AUDIENCE = 2
|
|
3761
3569
|
}
|
|
3762
|
-
|
|
3763
|
-
/**
|
|
3764
|
-
* 查询错误码是否为服务下发的 disconnect 通知 status 所转换
|
|
3765
|
-
* @param code
|
|
3766
|
-
* @description 排除重定向 31006,因 disconnect 和 connAck 都包含元素可被转换为 31006
|
|
3767
|
-
*/
|
|
3768
|
-
declare const isDisconnectCode: (code: ErrorCode) => boolean;
|
|
3769
|
-
/**
|
|
3770
|
-
* 查询错误码是否为服务下发的 connAck status 所转换
|
|
3771
|
-
* @param code
|
|
3772
|
-
* @description 排除重定向 31006,因 disconnect 和 connAck 都包含元素可被转换为 31006
|
|
3773
|
-
*/
|
|
3774
|
-
declare const isConnnectAckCode: (code: ErrorCode) => boolean;
|
|
3775
|
-
|
|
3776
3570
|
/**
|
|
3777
|
-
*
|
|
3571
|
+
* CallLib 流程消息
|
|
3778
3572
|
*/
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3573
|
+
declare const CallLibMsgType: {
|
|
3574
|
+
'RC:VCAccept': string;
|
|
3575
|
+
'RC:VCRinging': string;
|
|
3576
|
+
'RC:VCSummary': string;
|
|
3577
|
+
'RC:VCHangup': string;
|
|
3578
|
+
'RC:VCInvite': string;
|
|
3579
|
+
'RC:VCModifyMedia': string;
|
|
3580
|
+
'RC:VCModifyMem': string;
|
|
3581
|
+
};
|
|
3582
|
+
declare enum RTCApiType {
|
|
3583
|
+
ROOM = 1,
|
|
3584
|
+
PERSON = 2
|
|
3585
|
+
}
|
|
3586
|
+
declare enum RTCIdentityChangeType {
|
|
3587
|
+
AnchorToViewer = 1,
|
|
3588
|
+
ViewerToAnchor = 2
|
|
3785
3589
|
}
|
|
3786
3590
|
/**
|
|
3787
|
-
*
|
|
3591
|
+
* RTC 房间加入类型
|
|
3788
3592
|
*/
|
|
3789
|
-
|
|
3593
|
+
declare enum RTCJoinType {
|
|
3790
3594
|
/**
|
|
3791
|
-
*
|
|
3595
|
+
* 踢前一个设备
|
|
3792
3596
|
*/
|
|
3793
|
-
|
|
3597
|
+
KICK = 0,
|
|
3794
3598
|
/**
|
|
3795
|
-
*
|
|
3796
|
-
* @param token
|
|
3797
|
-
* @param reconnectKickEnable
|
|
3599
|
+
* 当前加入拒绝
|
|
3798
3600
|
*/
|
|
3799
|
-
|
|
3800
|
-
getNaviInfoFromCache(): INaviInfo | null;
|
|
3601
|
+
REFUSE = 1,
|
|
3801
3602
|
/**
|
|
3802
|
-
*
|
|
3803
|
-
* @param version
|
|
3603
|
+
* 两个设备共存
|
|
3804
3604
|
*/
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3605
|
+
COEXIST = 2
|
|
3606
|
+
}
|
|
3607
|
+
|
|
3608
|
+
/**
|
|
3609
|
+
* @category Interface
|
|
3610
|
+
*/
|
|
3611
|
+
interface IGooglePushConfig {
|
|
3808
3612
|
/**
|
|
3809
|
-
*
|
|
3613
|
+
* 分组ID
|
|
3810
3614
|
*/
|
|
3811
|
-
|
|
3615
|
+
collapseKey?: string;
|
|
3812
3616
|
/**
|
|
3813
|
-
*
|
|
3814
|
-
* 对于未实现的方法,接口响应 Unsupport 错误码
|
|
3815
|
-
* @param method
|
|
3816
|
-
* @param args
|
|
3617
|
+
*
|
|
3817
3618
|
*/
|
|
3818
|
-
|
|
3619
|
+
imageUrl?: string;
|
|
3819
3620
|
/**
|
|
3820
|
-
|
|
3821
|
-
* @param conversationType
|
|
3822
|
-
* @param targetId
|
|
3823
|
-
* @param timestamp
|
|
3824
|
-
* @param count
|
|
3825
|
-
* @param order
|
|
3621
|
+
*优先级
|
|
3826
3622
|
*/
|
|
3827
|
-
|
|
3623
|
+
priority?: 'high' | 'normal';
|
|
3624
|
+
}
|
|
3625
|
+
/**
|
|
3626
|
+
* @category Interface
|
|
3627
|
+
*/
|
|
3628
|
+
interface IiOSPushConfig {
|
|
3828
3629
|
/**
|
|
3829
|
-
*
|
|
3630
|
+
* iOS 用于通知分组的 id
|
|
3830
3631
|
*/
|
|
3831
|
-
|
|
3632
|
+
threadId?: string;
|
|
3832
3633
|
/**
|
|
3833
|
-
*
|
|
3634
|
+
* iOS 用于通知覆盖的 id
|
|
3834
3635
|
*/
|
|
3835
|
-
|
|
3636
|
+
apnsCollapseId?: string;
|
|
3836
3637
|
/**
|
|
3837
|
-
*
|
|
3838
|
-
* 1. `0` 表示升序,获取消息发送时间比传入 `sentTime` 小 的消息
|
|
3839
|
-
* 2. `1` 表示降序,获取消息发送时间比传入 `sentTime` 大 的消息
|
|
3638
|
+
* iOS 分类,如果不设置后台默认取消息类型字符串,如RC:TxtMsg
|
|
3840
3639
|
*/
|
|
3841
|
-
|
|
3640
|
+
category?: string;
|
|
3842
3641
|
/**
|
|
3843
|
-
*
|
|
3642
|
+
* 和 category 对应
|
|
3844
3643
|
*/
|
|
3845
|
-
|
|
3644
|
+
richMediaUri?: string;
|
|
3645
|
+
}
|
|
3646
|
+
/**
|
|
3647
|
+
* @category Interface
|
|
3648
|
+
*/
|
|
3649
|
+
interface IAndroidPushConfig {
|
|
3846
3650
|
/**
|
|
3847
|
-
*
|
|
3651
|
+
* Android 的通知 id
|
|
3848
3652
|
*/
|
|
3849
|
-
|
|
3850
|
-
list: IReceivedMessage[];
|
|
3851
|
-
hasMore: boolean;
|
|
3852
|
-
}>;
|
|
3653
|
+
notificationId?: string;
|
|
3853
3654
|
/**
|
|
3854
|
-
*
|
|
3655
|
+
* 小米的 channelId
|
|
3855
3656
|
*/
|
|
3856
|
-
|
|
3857
|
-
list: IReceivedMessage[];
|
|
3858
|
-
hasMore: boolean;
|
|
3859
|
-
}>>;
|
|
3657
|
+
channelIdMi?: string;
|
|
3860
3658
|
/**
|
|
3861
|
-
*
|
|
3659
|
+
* 小米 Large icon 链接
|
|
3660
|
+
* Large icon 可以出现在大图版和多字版消息中,显示在右边。
|
|
3661
|
+
* 国内版仅 MIUI12 以上版本支持,以下版本均不支持;国际版支持。
|
|
3662
|
+
* 图片要求:大小 120 * 120px,格式为 png 或者 jpg 格式。
|
|
3862
3663
|
*/
|
|
3863
|
-
|
|
3664
|
+
miLargeIconUrl?: string;
|
|
3864
3665
|
/**
|
|
3865
|
-
*
|
|
3866
|
-
* message 中 messageUId、setTime、messageDirection 为必须参数
|
|
3666
|
+
* 华为的 channelId
|
|
3867
3667
|
*/
|
|
3868
|
-
|
|
3869
|
-
messageUId: string;
|
|
3870
|
-
sentTime: number;
|
|
3871
|
-
messageDirection: MessageDirection;
|
|
3872
|
-
}[],
|
|
3668
|
+
channelIdHW?: string;
|
|
3873
3669
|
/**
|
|
3874
|
-
*
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3670
|
+
* 华为推送消息分类
|
|
3671
|
+
* 更多信息请参考华为消息分类标准文档: https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/message-classification-0000001149358835
|
|
3672
|
+
* 5.7.3 版本开始支持
|
|
3673
|
+
*/
|
|
3674
|
+
categoryHW?: string;
|
|
3878
3675
|
/**
|
|
3879
|
-
*
|
|
3880
|
-
*
|
|
3676
|
+
* 华为推送消息级别
|
|
3677
|
+
* LOW: 表示消息为资讯营销
|
|
3678
|
+
* NORMAL: 消息为服务与通讯
|
|
3881
3679
|
*/
|
|
3882
|
-
|
|
3680
|
+
importanceHW?: 'NORMAL' | 'LOW';
|
|
3883
3681
|
/**
|
|
3884
|
-
*
|
|
3885
|
-
|
|
3886
|
-
|
|
3682
|
+
* 华为通知类型的推送所使用的通知图片 url
|
|
3683
|
+
*/
|
|
3684
|
+
imageUrlHW?: string;
|
|
3887
3685
|
/**
|
|
3888
|
-
*
|
|
3889
|
-
* @param count 指定获取数量, 不传则获取全部会话列表,默认 `300`
|
|
3686
|
+
* OPPO 的 channelId
|
|
3890
3687
|
*/
|
|
3891
|
-
|
|
3688
|
+
channelIdOPPO?: string;
|
|
3892
3689
|
/**
|
|
3893
|
-
*
|
|
3690
|
+
* vivo 的类型
|
|
3894
3691
|
*/
|
|
3895
|
-
|
|
3692
|
+
typeVivo?: string;
|
|
3896
3693
|
/**
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3694
|
+
* google FCM 的推送配置
|
|
3695
|
+
*/
|
|
3696
|
+
googleConfig?: IGooglePushConfig;
|
|
3697
|
+
}
|
|
3698
|
+
/**
|
|
3699
|
+
* 推送配置
|
|
3700
|
+
* @category Interface
|
|
3701
|
+
*/
|
|
3702
|
+
interface IPushConfig {
|
|
3901
3703
|
/**
|
|
3902
|
-
*
|
|
3704
|
+
* 推送标题
|
|
3705
|
+
* 如果没有设置,会使用下面的默认标题显示规则
|
|
3706
|
+
* 默认标题显示规则:
|
|
3707
|
+
* 内置消息:单聊通知标题显示为发送者名称,群聊通知标题显示为群名称。
|
|
3708
|
+
* 自定义消息:默认不显示标题。
|
|
3903
3709
|
*/
|
|
3904
|
-
|
|
3710
|
+
pushTitle: string;
|
|
3905
3711
|
/**
|
|
3906
|
-
*
|
|
3712
|
+
* 推送内容
|
|
3713
|
+
* 优先使用 IPushConfig.pushContent, 如果没有,则使用发送消息的 pushContent 参数
|
|
3907
3714
|
*/
|
|
3908
|
-
|
|
3715
|
+
pushContent: string;
|
|
3909
3716
|
/**
|
|
3910
|
-
*
|
|
3717
|
+
* 远程推送附加信息
|
|
3718
|
+
* 优先使用 IPushConfig.pushData, 如果没有,则使用发送消息的 pushContent 参数
|
|
3911
3719
|
*/
|
|
3912
|
-
|
|
3720
|
+
pushData: string;
|
|
3913
3721
|
/**
|
|
3914
|
-
*
|
|
3722
|
+
* iOSConfig
|
|
3915
3723
|
*/
|
|
3916
|
-
|
|
3724
|
+
iOSConfig?: IiOSPushConfig;
|
|
3917
3725
|
/**
|
|
3918
|
-
*
|
|
3726
|
+
* androidConfig
|
|
3919
3727
|
*/
|
|
3920
|
-
|
|
3728
|
+
androidConfig?: IAndroidPushConfig;
|
|
3921
3729
|
/**
|
|
3922
|
-
*
|
|
3730
|
+
* 是否显示推送标题. 仅针对 iOS 平台有效
|
|
3923
3731
|
*/
|
|
3924
|
-
|
|
3732
|
+
disablePushTitle: boolean;
|
|
3925
3733
|
/**
|
|
3926
|
-
*
|
|
3927
|
-
* @description 该删除操作会删除服务器端存储的会话数据
|
|
3928
|
-
* @param conversationType
|
|
3929
|
-
* @param targetId
|
|
3734
|
+
* 是否强制推送
|
|
3930
3735
|
*/
|
|
3931
|
-
|
|
3736
|
+
forceShowDetailContent: boolean;
|
|
3737
|
+
/**
|
|
3738
|
+
* 推送模板id
|
|
3739
|
+
*/
|
|
3740
|
+
templateId: string;
|
|
3741
|
+
}
|
|
3742
|
+
|
|
3743
|
+
/**
|
|
3744
|
+
* 已读回执数据结构
|
|
3745
|
+
* @category Interface
|
|
3746
|
+
*/
|
|
3747
|
+
interface IMessageReader {
|
|
3748
|
+
readTime: number;
|
|
3749
|
+
userId: string;
|
|
3750
|
+
}
|
|
3751
|
+
/**
|
|
3752
|
+
* @category Interface
|
|
3753
|
+
*/
|
|
3754
|
+
interface IMessageReaderResponse {
|
|
3755
|
+
totalMemberCount: number;
|
|
3756
|
+
list: IMessageReader[];
|
|
3757
|
+
}
|
|
3758
|
+
interface ILocalReadReceiptInfo {
|
|
3759
|
+
hasRespond?: boolean;
|
|
3760
|
+
readerInfo?: {
|
|
3761
|
+
[userId: string]: number;
|
|
3762
|
+
};
|
|
3763
|
+
readCount?: number;
|
|
3764
|
+
totalCount?: number;
|
|
3765
|
+
}
|
|
3766
|
+
/**
|
|
3767
|
+
* @category Interface
|
|
3768
|
+
*/
|
|
3769
|
+
interface IReadReceiptInfo {
|
|
3932
3770
|
/**
|
|
3933
|
-
*
|
|
3934
|
-
* @param channelId 多组织 Id
|
|
3935
|
-
* @param conversationTypes
|
|
3936
|
-
* @param includeMuted 包含已设置免打扰的会话
|
|
3771
|
+
* 是否已经发送已读回执
|
|
3937
3772
|
*/
|
|
3938
|
-
|
|
3773
|
+
hasRespond?: boolean;
|
|
3939
3774
|
/**
|
|
3940
|
-
*
|
|
3775
|
+
* 已阅读用户列表(不准确)
|
|
3941
3776
|
*/
|
|
3942
|
-
|
|
3777
|
+
readerList?: IMessageReader[];
|
|
3943
3778
|
/**
|
|
3944
|
-
*
|
|
3779
|
+
* 阅读人数(不准确)
|
|
3945
3780
|
*/
|
|
3946
|
-
|
|
3781
|
+
readCount?: number;
|
|
3947
3782
|
/**
|
|
3948
|
-
*
|
|
3783
|
+
* 群组总人数(不准确)
|
|
3949
3784
|
*/
|
|
3950
|
-
|
|
3785
|
+
totalCount?: number;
|
|
3786
|
+
}
|
|
3787
|
+
/**
|
|
3788
|
+
* 从服务端接收到的消息数据
|
|
3789
|
+
* @category Interface
|
|
3790
|
+
*/
|
|
3791
|
+
interface IReceivedMessage {
|
|
3951
3792
|
/**
|
|
3952
|
-
*
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
getMessageByUids(msgUids: string[]): IReceivedMessage[];
|
|
3793
|
+
* 会话的业务标识
|
|
3794
|
+
*/
|
|
3795
|
+
channelId?: string;
|
|
3956
3796
|
/**
|
|
3957
|
-
*
|
|
3958
|
-
*
|
|
3959
|
-
*
|
|
3797
|
+
* 会话类型
|
|
3798
|
+
* * 1: 单聊
|
|
3799
|
+
* * 3: 群聊
|
|
3800
|
+
* * 4: 聊天室
|
|
3801
|
+
* * 5: 客服会话
|
|
3802
|
+
* * 6: 系统消息
|
|
3803
|
+
* * 7: 默认关注的公众号
|
|
3804
|
+
* * 8: 手动关注的公众号
|
|
3805
|
+
* * 9: RTCLib 房间
|
|
3960
3806
|
*/
|
|
3961
|
-
|
|
3807
|
+
conversationType: ConversationType;
|
|
3962
3808
|
/**
|
|
3963
|
-
*
|
|
3809
|
+
* 会话 targetId
|
|
3964
3810
|
*/
|
|
3965
|
-
|
|
3811
|
+
targetId: string;
|
|
3966
3812
|
/**
|
|
3967
|
-
*
|
|
3968
|
-
* @draft 草稿内容
|
|
3813
|
+
* 消息发送者的用户 Id
|
|
3969
3814
|
*/
|
|
3970
|
-
|
|
3815
|
+
senderUserId: string;
|
|
3971
3816
|
/**
|
|
3972
|
-
*
|
|
3817
|
+
* 消息内容
|
|
3973
3818
|
*/
|
|
3974
|
-
|
|
3819
|
+
content: any;
|
|
3975
3820
|
/**
|
|
3976
|
-
*
|
|
3821
|
+
* 消息结构名称,即消息类型
|
|
3822
|
+
* @example RC:TxtMsg
|
|
3977
3823
|
*/
|
|
3978
|
-
|
|
3824
|
+
messageType: string;
|
|
3979
3825
|
/**
|
|
3980
|
-
*
|
|
3826
|
+
* 服务端存储的消息 Id
|
|
3981
3827
|
*/
|
|
3982
|
-
|
|
3828
|
+
messageUId: string;
|
|
3983
3829
|
/**
|
|
3984
|
-
*
|
|
3830
|
+
* 消息方向是发出 or 收取
|
|
3985
3831
|
*/
|
|
3986
|
-
|
|
3987
|
-
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void, traceId?: string): IPromiseResult<IReceivedMessage>;
|
|
3832
|
+
messageDirection: MessageDirection;
|
|
3988
3833
|
/**
|
|
3989
|
-
*
|
|
3834
|
+
* 是否为离线消息
|
|
3990
3835
|
*/
|
|
3991
|
-
|
|
3836
|
+
isOffLineMessage: boolean;
|
|
3992
3837
|
/**
|
|
3993
|
-
*
|
|
3838
|
+
* 消息在服务器端的发送时间
|
|
3994
3839
|
*/
|
|
3995
|
-
|
|
3840
|
+
sentTime: number;
|
|
3996
3841
|
/**
|
|
3997
|
-
*
|
|
3998
|
-
* @description
|
|
3999
|
-
* 消息注册需在应用初始化完成前进行,否则在搭配 C++ 协议栈使用时,
|
|
4000
|
-
* 本端发出的消息将不默认作为未知消息处理,不存储、不计数
|
|
4001
|
-
* @param objectName 消息类型,如:RC:TxtMsg
|
|
4002
|
-
* @param isPersited 是否存储
|
|
4003
|
-
* @param isCounted 是否技术
|
|
4004
|
-
* @param searchProps 搜索字段,只在搭配协议栈使用时有效
|
|
4005
|
-
* @param isStatusMessage 是否是状态消息
|
|
3842
|
+
* 消息接收时间,该时间通过消息的 `sentTime` 值在本地进行计算得出,不推荐使用
|
|
3843
|
+
* @description 当 isOffLineMessage 为 true 时,该值无效
|
|
4006
3844
|
*/
|
|
4007
|
-
|
|
3845
|
+
receivedTime: number;
|
|
4008
3846
|
/**
|
|
4009
|
-
*
|
|
4010
|
-
* @
|
|
3847
|
+
* 是否存储
|
|
3848
|
+
* @default true
|
|
4011
3849
|
*/
|
|
4012
|
-
|
|
3850
|
+
isPersited: boolean;
|
|
4013
3851
|
/**
|
|
4014
|
-
*
|
|
4015
|
-
* @
|
|
3852
|
+
* 是否计数
|
|
3853
|
+
* @default true
|
|
4016
3854
|
*/
|
|
4017
|
-
|
|
3855
|
+
isCounted: boolean;
|
|
4018
3856
|
/**
|
|
4019
|
-
*
|
|
3857
|
+
* 是否为 @ 消息
|
|
4020
3858
|
*/
|
|
4021
|
-
|
|
3859
|
+
isMentioned: boolean;
|
|
4022
3860
|
/**
|
|
4023
|
-
*
|
|
4024
|
-
* @
|
|
4025
|
-
* @param order 排序方式, 1 正序, 2 倒序
|
|
3861
|
+
* 消息是否静默
|
|
3862
|
+
* @description 静默消息不会发送 Push 信息和本地通知提醒
|
|
4026
3863
|
*/
|
|
4027
|
-
|
|
3864
|
+
disableNotification: boolean;
|
|
4028
3865
|
/**
|
|
4029
|
-
*
|
|
3866
|
+
* 是否是状态消息
|
|
4030
3867
|
*/
|
|
4031
|
-
|
|
4032
|
-
list: IReceivedMessage[];
|
|
4033
|
-
hasMore: boolean;
|
|
4034
|
-
}>;
|
|
3868
|
+
isStatusMessage: boolean;
|
|
4035
3869
|
/**
|
|
4036
|
-
*
|
|
4037
|
-
|
|
4038
|
-
|
|
3870
|
+
* 是否支持消息扩展存储
|
|
3871
|
+
*/
|
|
3872
|
+
canIncludeExpansion: boolean;
|
|
4039
3873
|
/**
|
|
4040
|
-
*
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
}>;
|
|
3874
|
+
* 消息携带的扩展存储
|
|
3875
|
+
*/
|
|
3876
|
+
expansion: {
|
|
3877
|
+
[key: string]: any;
|
|
3878
|
+
} | null;
|
|
4046
3879
|
/**
|
|
4047
|
-
*
|
|
4048
|
-
|
|
4049
|
-
|
|
3880
|
+
* 消息接收状态
|
|
3881
|
+
*/
|
|
3882
|
+
receivedStatus: number;
|
|
4050
3883
|
/**
|
|
4051
|
-
*
|
|
4052
|
-
|
|
4053
|
-
|
|
3884
|
+
* 消息本地 ID, web 端由 lib 内生成, PC 端由协议栈数据库生成自增ID
|
|
3885
|
+
*/
|
|
3886
|
+
messageId?: number;
|
|
4054
3887
|
/**
|
|
4055
|
-
*
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
code: ErrorCode;
|
|
4059
|
-
data?: any;
|
|
4060
|
-
}>;
|
|
3888
|
+
* 消息发送状态, web 端由 lib 内根据消息状态设置值为 发送中、已发送和发送失败 ,PC 端由协议栈自动维护或用户自己设置
|
|
3889
|
+
*/
|
|
3890
|
+
sentStatus?: SentStatus;
|
|
4061
3891
|
/**
|
|
4062
|
-
*
|
|
3892
|
+
* 已读回执信息(导航配置grpRRVer=1时群组类型消息内存在, 其他情况为undefined)
|
|
4063
3893
|
*/
|
|
4064
|
-
|
|
3894
|
+
readReceiptInfo?: IReadReceiptInfo;
|
|
4065
3895
|
/**
|
|
4066
|
-
*
|
|
3896
|
+
* 推送扩展
|
|
4067
3897
|
*/
|
|
4068
|
-
|
|
3898
|
+
pushConfig?: IPushConfig;
|
|
4069
3899
|
/**
|
|
4070
|
-
*
|
|
3900
|
+
* 超级群专有字段,是否断档,服务端收到大量消息可能会断档,所以消息存在此标志位,断档需要客户手动拉取历史消息
|
|
4071
3901
|
*/
|
|
4072
|
-
|
|
4073
|
-
[key: string]: string;
|
|
4074
|
-
}>;
|
|
3902
|
+
isInterrupt?: boolean;
|
|
4075
3903
|
/**
|
|
4076
|
-
*
|
|
4077
|
-
* @description
|
|
4078
|
-
* 若不传 fileName 百度上传认证字段(bosToken、bosDate、path)均返回 null
|
|
3904
|
+
* 拉取历史消息时表示该消息是否修改过(仅超级群有效)
|
|
4079
3905
|
*/
|
|
4080
|
-
|
|
3906
|
+
isModifyMessage?: boolean;
|
|
4081
3907
|
/**
|
|
4082
|
-
*
|
|
3908
|
+
* 拉取历史消息时表示该消息是否为超级群频道类型(仅超级群有效)
|
|
4083
3909
|
*/
|
|
4084
|
-
|
|
4085
|
-
downloadUrl: string;
|
|
4086
|
-
}>;
|
|
3910
|
+
channelType?: UltraGroupChannelType;
|
|
4087
3911
|
/**
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
3912
|
+
* 扩展内容
|
|
3913
|
+
*/
|
|
3914
|
+
extraContent?: string;
|
|
3915
|
+
}
|
|
3916
|
+
/**
|
|
3917
|
+
* @category Interface
|
|
3918
|
+
*/
|
|
3919
|
+
interface IUserProfile {
|
|
4092
3920
|
/**
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
removeTag(tagId: string): IPromiseResult;
|
|
3921
|
+
* 用户 ID
|
|
3922
|
+
*/
|
|
3923
|
+
id?: string;
|
|
4097
3924
|
/**
|
|
4098
|
-
*
|
|
4099
|
-
* @param tag 标签
|
|
3925
|
+
* 用户名
|
|
4100
3926
|
*/
|
|
4101
|
-
|
|
3927
|
+
name?: string;
|
|
4102
3928
|
/**
|
|
4103
|
-
*
|
|
3929
|
+
* 用户头像地址
|
|
3930
|
+
* @deprecated
|
|
4104
3931
|
*/
|
|
4105
|
-
|
|
3932
|
+
portraitUri?: string;
|
|
4106
3933
|
/**
|
|
4107
|
-
*
|
|
4108
|
-
* @param tagId 标签id
|
|
4109
|
-
* @param conversations 要添加的会话列表
|
|
3934
|
+
* user info 中附加信息
|
|
4110
3935
|
*/
|
|
4111
|
-
|
|
3936
|
+
extra?: string;
|
|
4112
3937
|
/**
|
|
4113
|
-
*
|
|
4114
|
-
* @param tagId 标签id
|
|
4115
|
-
* @param conversations 要删除的会话列表
|
|
3938
|
+
* 用户头像地址(向移动端兼容)
|
|
4116
3939
|
*/
|
|
4117
|
-
|
|
3940
|
+
portrait?: string;
|
|
3941
|
+
}
|
|
3942
|
+
interface IOperateInfo {
|
|
3943
|
+
targetId: string;
|
|
3944
|
+
channelId?: string;
|
|
3945
|
+
userId: string;
|
|
3946
|
+
operationType: OperateStatus;
|
|
3947
|
+
operationTime?: number;
|
|
3948
|
+
}
|
|
3949
|
+
interface IOperateSummary {
|
|
3950
|
+
targetId: string;
|
|
3951
|
+
channelId?: string;
|
|
3952
|
+
count: number;
|
|
3953
|
+
operationType: OperateStatus;
|
|
3954
|
+
}
|
|
3955
|
+
interface IOperateStatusNotify {
|
|
3956
|
+
conversationType: ConversationType;
|
|
3957
|
+
hasInfo: boolean;
|
|
3958
|
+
hasSummary: boolean;
|
|
3959
|
+
info: IOperateInfo[];
|
|
3960
|
+
summary: IOperateSummary[];
|
|
3961
|
+
}
|
|
3962
|
+
interface IRecallMsgOptions {
|
|
4118
3963
|
/**
|
|
4119
|
-
*
|
|
4120
|
-
*
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
*/
|
|
4124
|
-
removeTagsForConversation(conversation: IConversationOption, tagIds: string[]): IPromiseResult;
|
|
3964
|
+
* 会话组织机构标识
|
|
3965
|
+
* 默认值未 空字符串
|
|
3966
|
+
*/
|
|
3967
|
+
channelId: string;
|
|
4125
3968
|
/**
|
|
4126
|
-
*
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
getConversationListByTag(tagId: string, startTime: number, count?: number, channelId?: string): IPromiseResult<IReceivedConversationByTag[]>;
|
|
3969
|
+
* 发送消息携带的用户信息
|
|
3970
|
+
*/
|
|
3971
|
+
user?: IUserProfile;
|
|
4130
3972
|
/**
|
|
4131
|
-
*
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
*/
|
|
4135
|
-
getUnreadCountByTag(tagId: string, containMuted: boolean): IPromiseResult<number>;
|
|
3973
|
+
* Push 信息
|
|
3974
|
+
*/
|
|
3975
|
+
pushContent?: string;
|
|
4136
3976
|
/**
|
|
4137
|
-
*
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
setConversationStatusInTag(tagId: string, conversation: IConversationOption, status: ITagStatus): IPromiseResult;
|
|
3977
|
+
* 原消息体
|
|
3978
|
+
*/
|
|
3979
|
+
oriContent?: any;
|
|
4141
3980
|
/**
|
|
4142
|
-
*
|
|
4143
|
-
* @
|
|
4144
|
-
|
|
4145
|
-
|
|
3981
|
+
* 是否发送静默消息
|
|
3982
|
+
* @description
|
|
3983
|
+
* 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
|
|
3984
|
+
*/
|
|
3985
|
+
disableNotification?: boolean;
|
|
4146
3986
|
/**
|
|
4147
|
-
*
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
sendReadReceiptMessage(targetId: string, messageUIds: string[], channelId?: string): Promise<IAsyncRes>;
|
|
3987
|
+
* 移动端推送配置
|
|
3988
|
+
*/
|
|
3989
|
+
pushConfig?: IPushConfig;
|
|
4151
3990
|
/**
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
3991
|
+
* 其他拓展信息
|
|
3992
|
+
*/
|
|
3993
|
+
extra?: string;
|
|
4155
3994
|
/**
|
|
4156
|
-
*
|
|
3995
|
+
* 是否删除原始消息(在移动端会使用到),为 true 时移动端会不显示小灰条提示
|
|
4157
3996
|
*/
|
|
4158
|
-
|
|
3997
|
+
isDelete?: boolean;
|
|
3998
|
+
}
|
|
3999
|
+
interface IRecallMsgContent {
|
|
4000
|
+
conversationType: number;
|
|
4001
|
+
targetId: string;
|
|
4002
|
+
sentTime: number;
|
|
4003
|
+
messageUId: string;
|
|
4159
4004
|
/**
|
|
4160
|
-
*
|
|
4161
|
-
|
|
4162
|
-
|
|
4005
|
+
* 会话组织机构标识
|
|
4006
|
+
* 默认值未 空字符串
|
|
4007
|
+
*/
|
|
4008
|
+
channelId: string;
|
|
4163
4009
|
/**
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4010
|
+
* 其他拓展信息
|
|
4011
|
+
*/
|
|
4012
|
+
extra?: string;
|
|
4167
4013
|
/**
|
|
4168
|
-
*
|
|
4169
|
-
|
|
4170
|
-
|
|
4014
|
+
* 发送消息携带的用户信息
|
|
4015
|
+
*/
|
|
4016
|
+
user?: IUserProfile;
|
|
4171
4017
|
/**
|
|
4172
|
-
*
|
|
4018
|
+
* 是否删除原始消息(在移动端会使用到),为 true 时移动端会不显示小灰条提示
|
|
4173
4019
|
*/
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4020
|
+
isDelete?: boolean;
|
|
4021
|
+
}
|
|
4022
|
+
/**
|
|
4023
|
+
* 发送消息时的可选项信息
|
|
4024
|
+
*/
|
|
4025
|
+
interface ISendMsgOptions {
|
|
4177
4026
|
/**
|
|
4178
|
-
*
|
|
4027
|
+
* 消息类型,即消息结构的 ObjectName
|
|
4179
4028
|
*/
|
|
4180
|
-
|
|
4181
|
-
userIds: string[];
|
|
4182
|
-
}, listener: Function): void;
|
|
4029
|
+
messageType: string;
|
|
4183
4030
|
/**
|
|
4184
|
-
*
|
|
4031
|
+
* 消息内容
|
|
4185
4032
|
*/
|
|
4186
|
-
|
|
4033
|
+
content: {
|
|
4034
|
+
/**
|
|
4035
|
+
* 消息内容 key-value,最终会进行 JSON 序列化后发送
|
|
4036
|
+
*/
|
|
4037
|
+
[key: string]: any;
|
|
4038
|
+
/**
|
|
4039
|
+
* 消息可携带的用户数据
|
|
4040
|
+
*/
|
|
4041
|
+
user?: IUserProfile;
|
|
4042
|
+
/**
|
|
4043
|
+
* 其他拓展信息
|
|
4044
|
+
*/
|
|
4045
|
+
extra?: string;
|
|
4046
|
+
};
|
|
4187
4047
|
/**
|
|
4188
|
-
*
|
|
4048
|
+
* 是否存储
|
|
4049
|
+
* @description 只在发送未注册过的自定义消息时有效,否则使用注册时的配置
|
|
4189
4050
|
*/
|
|
4190
|
-
|
|
4051
|
+
isPersited?: boolean;
|
|
4191
4052
|
/**
|
|
4192
|
-
*
|
|
4053
|
+
* 是否计数
|
|
4054
|
+
* @description 只在发送未注册过的自定义消息时有效,否则使用注册时的配置
|
|
4193
4055
|
*/
|
|
4194
|
-
|
|
4195
|
-
status: string;
|
|
4196
|
-
}>;
|
|
4056
|
+
isCounted?: boolean;
|
|
4197
4057
|
/**
|
|
4198
|
-
*
|
|
4058
|
+
* 是否是状态消息,一般为无需注册的自定义消息
|
|
4059
|
+
* @description
|
|
4060
|
+
* 1. 状态消息只有 pub,没有 ack 应答
|
|
4061
|
+
* 2. 状态消息默认不存储,不计数,`isPersited` 与 `isCounted` 配置将失效
|
|
4199
4062
|
*/
|
|
4200
|
-
|
|
4063
|
+
isStatusMessage?: boolean;
|
|
4201
4064
|
/**
|
|
4202
|
-
*
|
|
4065
|
+
* 是否发送静默消息
|
|
4066
|
+
* @description
|
|
4067
|
+
* 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
|
|
4203
4068
|
*/
|
|
4204
|
-
|
|
4069
|
+
disableNotification?: boolean;
|
|
4205
4070
|
/**
|
|
4206
|
-
*
|
|
4071
|
+
* Push 信息
|
|
4207
4072
|
*/
|
|
4208
|
-
|
|
4073
|
+
pushContent?: string;
|
|
4209
4074
|
/**
|
|
4210
|
-
*
|
|
4075
|
+
* Push 通知携带的附加信息
|
|
4211
4076
|
*/
|
|
4212
|
-
|
|
4077
|
+
pushData?: string;
|
|
4213
4078
|
/**
|
|
4214
|
-
*
|
|
4079
|
+
* 是否为 @ 消息,只当 conversationType 值为 `ConversationType.GROUP` 时有效
|
|
4215
4080
|
*/
|
|
4216
|
-
|
|
4081
|
+
isMentioned?: boolean;
|
|
4217
4082
|
/**
|
|
4218
|
-
*
|
|
4083
|
+
* `@` 消息类型
|
|
4084
|
+
* @description `1: @ 所有人 2: @ 指定用户`
|
|
4219
4085
|
*/
|
|
4220
|
-
|
|
4086
|
+
mentionedType?: 1 | 2;
|
|
4221
4087
|
/**
|
|
4222
|
-
*
|
|
4088
|
+
* 被 @ 的用户 Id 列表,当 `mentionedType` 值为 `1` 时,该值可为空
|
|
4223
4089
|
*/
|
|
4224
|
-
|
|
4090
|
+
mentionedUserIdList?: string[];
|
|
4225
4091
|
/**
|
|
4226
|
-
*
|
|
4092
|
+
* 用于发送群定向消息,只当 conversationType 值为 `ConversationType.GROUP` 时有效
|
|
4227
4093
|
*/
|
|
4228
|
-
|
|
4094
|
+
directionalUserIdList?: string[];
|
|
4229
4095
|
/**
|
|
4230
|
-
*
|
|
4096
|
+
* 当对方为 iOS 设备且未在线时,其将收到 Voip Push. 此配置对 Android 无影响
|
|
4231
4097
|
*/
|
|
4232
|
-
|
|
4098
|
+
isVoipPush?: boolean;
|
|
4233
4099
|
/**
|
|
4234
|
-
*
|
|
4100
|
+
* 消息是否支持拓展内容
|
|
4235
4101
|
*/
|
|
4236
|
-
|
|
4102
|
+
canIncludeExpansion?: boolean;
|
|
4237
4103
|
/**
|
|
4238
|
-
*
|
|
4104
|
+
* 消息拓展内容数据
|
|
4239
4105
|
*/
|
|
4240
|
-
|
|
4106
|
+
expansion?: {
|
|
4107
|
+
[key: string]: string;
|
|
4108
|
+
};
|
|
4241
4109
|
/**
|
|
4242
|
-
*
|
|
4110
|
+
* 黑/白名单
|
|
4111
|
+
* @todo 功能未知,需确认
|
|
4243
4112
|
*/
|
|
4244
|
-
|
|
4113
|
+
isFilerWhiteBlacklist?: boolean;
|
|
4245
4114
|
/**
|
|
4246
|
-
*
|
|
4247
|
-
|
|
4248
|
-
|
|
4115
|
+
* 移动端推送配置
|
|
4116
|
+
*/
|
|
4117
|
+
pushConfig?: IPushConfig;
|
|
4249
4118
|
/**
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4119
|
+
* 会话业务标识
|
|
4120
|
+
* @description
|
|
4121
|
+
* 20 个字符长度限制
|
|
4122
|
+
*/
|
|
4123
|
+
channelId?: string;
|
|
4254
4124
|
/**
|
|
4255
|
-
*
|
|
4125
|
+
* 客户端的消息标识
|
|
4126
|
+
* 重发消息时用到,重发消息的消息 ID
|
|
4256
4127
|
*/
|
|
4257
|
-
|
|
4258
|
-
messages: IReceivedMessage[];
|
|
4259
|
-
count: number;
|
|
4260
|
-
}>;
|
|
4128
|
+
messageId?: number;
|
|
4261
4129
|
/**
|
|
4262
|
-
*
|
|
4130
|
+
* 超级群专有字段,是否断档,若断档需要客户判断是否拉取
|
|
4263
4131
|
*/
|
|
4264
|
-
|
|
4265
|
-
messages: IReceivedMessage[];
|
|
4266
|
-
count: number;
|
|
4267
|
-
}>;
|
|
4132
|
+
isInterrupt?: boolean;
|
|
4268
4133
|
/**
|
|
4269
|
-
*
|
|
4134
|
+
* 标识该消息是否为重发消息,仅 electron 中有效。
|
|
4270
4135
|
*/
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4136
|
+
isResend?: boolean;
|
|
4137
|
+
}
|
|
4138
|
+
interface IInsertMsgOptions {
|
|
4139
|
+
senderUserId: string;
|
|
4140
|
+
messageType: string;
|
|
4141
|
+
content: any;
|
|
4142
|
+
messageDirection: number;
|
|
4143
|
+
readStatus?: number;
|
|
4144
|
+
sentStatus?: number;
|
|
4145
|
+
sentTime?: number;
|
|
4146
|
+
searchContent?: string;
|
|
4147
|
+
isUnread?: boolean;
|
|
4148
|
+
messageUId?: string;
|
|
4149
|
+
disableNotification?: boolean;
|
|
4150
|
+
canIncludeExpansion?: boolean;
|
|
4151
|
+
expansionMsg?: string;
|
|
4152
|
+
channelId: string;
|
|
4153
|
+
}
|
|
4154
|
+
interface IInsertMessage {
|
|
4155
|
+
conversationType: number;
|
|
4156
|
+
targetId: string;
|
|
4157
|
+
channelId: string;
|
|
4158
|
+
messageDirection: number;
|
|
4159
|
+
messageType: string;
|
|
4160
|
+
content: any;
|
|
4161
|
+
messageUId: string;
|
|
4162
|
+
senderUserId: string;
|
|
4163
|
+
sentStatus?: number;
|
|
4164
|
+
sentTime?: number;
|
|
4165
|
+
disableNotification?: boolean;
|
|
4166
|
+
canIncludeExpansion?: boolean;
|
|
4167
|
+
expansion?: {
|
|
4168
|
+
[key: string]: any;
|
|
4169
|
+
} | null;
|
|
4170
|
+
receivedStatus?: number;
|
|
4274
4171
|
/**
|
|
4275
|
-
*
|
|
4172
|
+
* 插入消息是否计入未读数: true 计数 false 不计数, 默认不计数
|
|
4276
4173
|
*/
|
|
4277
|
-
|
|
4174
|
+
isUnread?: boolean;
|
|
4278
4175
|
/**
|
|
4279
|
-
*
|
|
4176
|
+
* 消息搜索关键字
|
|
4280
4177
|
*/
|
|
4281
|
-
|
|
4178
|
+
searchContent?: string;
|
|
4282
4179
|
/**
|
|
4283
|
-
*
|
|
4180
|
+
* 来源
|
|
4284
4181
|
*/
|
|
4285
|
-
|
|
4182
|
+
source?: string;
|
|
4183
|
+
isMentioned?: boolean;
|
|
4184
|
+
}
|
|
4185
|
+
interface ISendExMsgOptions {
|
|
4186
|
+
channelId: string;
|
|
4187
|
+
conversationType: ConversationType;
|
|
4188
|
+
targetId: string;
|
|
4286
4189
|
/**
|
|
4287
|
-
*
|
|
4288
|
-
|
|
4289
|
-
|
|
4190
|
+
* 消息 ID
|
|
4191
|
+
*/
|
|
4192
|
+
messageUId: string;
|
|
4290
4193
|
/**
|
|
4291
|
-
*
|
|
4292
|
-
|
|
4293
|
-
|
|
4194
|
+
* 原始消息是否支持扩展的字段
|
|
4195
|
+
*/
|
|
4196
|
+
canIncludeExpansion: boolean;
|
|
4294
4197
|
/**
|
|
4295
|
-
*
|
|
4296
|
-
|
|
4297
|
-
|
|
4198
|
+
* 删除的 keys
|
|
4199
|
+
*/
|
|
4200
|
+
keys?: string[];
|
|
4298
4201
|
/**
|
|
4299
|
-
*
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
}>;
|
|
4202
|
+
* 扩展对象
|
|
4203
|
+
*/
|
|
4204
|
+
expansion?: {
|
|
4205
|
+
[key: string]: string;
|
|
4206
|
+
};
|
|
4305
4207
|
/**
|
|
4306
|
-
*
|
|
4307
|
-
|
|
4308
|
-
|
|
4208
|
+
* 是否删除所有扩展
|
|
4209
|
+
*/
|
|
4210
|
+
removeAll?: boolean;
|
|
4309
4211
|
/**
|
|
4310
|
-
*
|
|
4311
|
-
|
|
4312
|
-
|
|
4212
|
+
* 原始消息的扩展
|
|
4213
|
+
*/
|
|
4214
|
+
originExpansion?: {
|
|
4215
|
+
[key: string]: string;
|
|
4216
|
+
} | null;
|
|
4217
|
+
}
|
|
4218
|
+
interface IUltraExMsgOptions {
|
|
4219
|
+
canIncludeExpansion: boolean;
|
|
4220
|
+
channelId: string;
|
|
4221
|
+
conversationType: ConversationType;
|
|
4222
|
+
targetId: string;
|
|
4223
|
+
messageUId: string;
|
|
4224
|
+
sendTime: number;
|
|
4313
4225
|
/**
|
|
4314
|
-
*
|
|
4315
|
-
|
|
4316
|
-
|
|
4226
|
+
* 删除的 keys
|
|
4227
|
+
*/
|
|
4228
|
+
keys?: string[];
|
|
4317
4229
|
/**
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4230
|
+
* 扩展对象
|
|
4231
|
+
*/
|
|
4232
|
+
expansion?: {
|
|
4233
|
+
[key: string]: string;
|
|
4234
|
+
};
|
|
4322
4235
|
/**
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4236
|
+
* 是否删除所有扩展
|
|
4237
|
+
*/
|
|
4238
|
+
removeAll?: boolean;
|
|
4239
|
+
}
|
|
4240
|
+
interface IUltraModifyMsgOptions {
|
|
4241
|
+
canIncludeExpansion?: boolean;
|
|
4242
|
+
channelId: string;
|
|
4243
|
+
conversationType: ConversationType;
|
|
4244
|
+
targetId: string;
|
|
4245
|
+
messageUId: string;
|
|
4246
|
+
sendTime: number;
|
|
4326
4247
|
/**
|
|
4327
|
-
*
|
|
4248
|
+
* 消息内容
|
|
4328
4249
|
*/
|
|
4329
|
-
|
|
4250
|
+
content: {
|
|
4251
|
+
/**
|
|
4252
|
+
* 消息内容 key-value,最终会进行 JSON 序列化后发送
|
|
4253
|
+
*/
|
|
4254
|
+
[key: string]: any;
|
|
4255
|
+
/**
|
|
4256
|
+
* 消息可携带的用户数据
|
|
4257
|
+
*/
|
|
4258
|
+
user?: IUserProfile;
|
|
4259
|
+
/**
|
|
4260
|
+
* 其他拓展信息
|
|
4261
|
+
*/
|
|
4262
|
+
extra?: string;
|
|
4263
|
+
};
|
|
4264
|
+
}
|
|
4265
|
+
interface IUltraMsgQueryInfo {
|
|
4266
|
+
sendTime: number;
|
|
4267
|
+
messageUId: string;
|
|
4268
|
+
channelId?: string;
|
|
4269
|
+
}
|
|
4270
|
+
interface IUltraMsgQueryOptions {
|
|
4271
|
+
conversationType: ConversationType;
|
|
4272
|
+
targetId: string;
|
|
4273
|
+
messages: IUltraMsgQueryInfo[];
|
|
4274
|
+
}
|
|
4275
|
+
/**
|
|
4276
|
+
* 被拦截的消息信息
|
|
4277
|
+
* @category Interface
|
|
4278
|
+
*/
|
|
4279
|
+
interface IBlockedMessageInfo {
|
|
4280
|
+
blockedMessageUId: string;
|
|
4281
|
+
conversationType: number;
|
|
4282
|
+
targetId: string;
|
|
4283
|
+
channelId: string;
|
|
4284
|
+
blockType: MessageBlockType;
|
|
4285
|
+
extra: any;
|
|
4286
|
+
sourceType?: MessageBlockSourceType;
|
|
4287
|
+
sourceContent?: {
|
|
4288
|
+
[key: string]: any;
|
|
4289
|
+
};
|
|
4290
|
+
}
|
|
4291
|
+
/**
|
|
4292
|
+
* 超级群获取指定会话未读 @ 消息列表参数
|
|
4293
|
+
*/
|
|
4294
|
+
interface IUltraGroupUnreadMentionedOption {
|
|
4330
4295
|
/**
|
|
4331
|
-
*
|
|
4332
|
-
|
|
4333
|
-
|
|
4296
|
+
* 会话 ID
|
|
4297
|
+
*/
|
|
4298
|
+
targetId: string;
|
|
4334
4299
|
/**
|
|
4335
|
-
*
|
|
4336
|
-
|
|
4337
|
-
|
|
4300
|
+
* 频道 ID
|
|
4301
|
+
*/
|
|
4302
|
+
channelId?: string;
|
|
4338
4303
|
/**
|
|
4339
|
-
*
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4304
|
+
* 消息的时间戳,首次获取传 0, 后续查询传未读 @ 列表中的消息时间戳
|
|
4305
|
+
*/
|
|
4306
|
+
sentTime: number;
|
|
4307
|
+
/**
|
|
4308
|
+
* 数据个数,最大50
|
|
4309
|
+
*/
|
|
4310
|
+
count: number;
|
|
4311
|
+
}
|
|
4312
|
+
/**
|
|
4313
|
+
* 超级群获取指定会话 @ 未读消息列表结果
|
|
4314
|
+
*/
|
|
4315
|
+
interface IUltraUnreadMsg {
|
|
4316
|
+
/**
|
|
4317
|
+
* 消息 ID
|
|
4318
|
+
*/
|
|
4319
|
+
messageUId?: string;
|
|
4320
|
+
/**
|
|
4321
|
+
* 消息时间戳
|
|
4322
|
+
*/
|
|
4323
|
+
sentTime: number;
|
|
4324
|
+
/**
|
|
4325
|
+
* @ 类型: 1 所有人;2: 部分人
|
|
4326
|
+
*/
|
|
4327
|
+
mentionedType?: number;
|
|
4328
|
+
}
|
|
4329
|
+
|
|
4330
|
+
interface IRTCRoomInfo {
|
|
4331
|
+
roomId: string;
|
|
4332
|
+
roomData: unknown[];
|
|
4333
|
+
userCount: number;
|
|
4334
|
+
list: unknown[];
|
|
4335
|
+
}
|
|
4336
|
+
interface IRtcTokenData {
|
|
4337
|
+
rtcToken: string;
|
|
4338
|
+
}
|
|
4339
|
+
interface IRTCUsers {
|
|
4340
|
+
users: {
|
|
4341
|
+
[userId: string]: {
|
|
4342
|
+
/**
|
|
4343
|
+
* 发布的资源数据,是一个 JSON 字符串,解析后为发布的资源列表
|
|
4344
|
+
*/
|
|
4345
|
+
uris?: string;
|
|
4346
|
+
/**
|
|
4347
|
+
* 加房间的身份标识,保存主房间 roomId
|
|
4348
|
+
*/
|
|
4349
|
+
extra?: string;
|
|
4350
|
+
};
|
|
4351
|
+
};
|
|
4352
|
+
}
|
|
4353
|
+
interface IJoinRTCRoomData extends IRTCUsers {
|
|
4354
|
+
token: string;
|
|
4355
|
+
sessionId: string;
|
|
4356
|
+
roomInfo: {
|
|
4357
|
+
key: string;
|
|
4358
|
+
value: string;
|
|
4359
|
+
}[];
|
|
4360
|
+
kvEntries: IServerRTCRoomEntry[];
|
|
4361
|
+
offlineKickTime: number;
|
|
4362
|
+
}
|
|
4363
|
+
interface KVString {
|
|
4364
|
+
[key: string]: string;
|
|
4365
|
+
}
|
|
4366
|
+
/**
|
|
4367
|
+
* 设置 RTC 人员 inner、outer 数据
|
|
4368
|
+
*/
|
|
4369
|
+
interface IRTCUserData {
|
|
4370
|
+
[key: string]: string;
|
|
4347
4371
|
}
|
|
4348
4372
|
|
|
4349
4373
|
interface IExpansionMsgContent {
|
|
@@ -5203,6 +5227,7 @@ declare class APIContext {
|
|
|
5203
5227
|
* rtc 数据变更通知 pluginContext
|
|
5204
5228
|
*/
|
|
5205
5229
|
private _rtcDataChange;
|
|
5230
|
+
private _meetingEvent;
|
|
5206
5231
|
/**
|
|
5207
5232
|
* 导航数据变更通知
|
|
5208
5233
|
*/
|
|
@@ -5273,6 +5298,10 @@ declare class APIContext {
|
|
|
5273
5298
|
* @param listener
|
|
5274
5299
|
*/
|
|
5275
5300
|
registerRTCSignalingListener(listener?: (buffer: Uint8Array) => void): void;
|
|
5301
|
+
/**
|
|
5302
|
+
* 监听 RTC Meeting 下行信令通知
|
|
5303
|
+
*/
|
|
5304
|
+
registerMeetingEventListener(listener?: (eventType: MeetingEventType, buffer: Uint8Array) => void): void;
|
|
5276
5305
|
checkSearchPropsMsg(messageType: string, msgContent: any): IAsyncRes;
|
|
5277
5306
|
/**
|
|
5278
5307
|
* 发送消息
|
|
@@ -5303,6 +5332,20 @@ declare class APIContext {
|
|
|
5303
5332
|
* @param messageUIds
|
|
5304
5333
|
*/
|
|
5305
5334
|
getMessageReader(targetId: string, messageUId: string, channelId?: string): Promise<IAsyncRes<IMessageReaderResponse>>;
|
|
5335
|
+
/**
|
|
5336
|
+
* 设置群语音消息已听状态
|
|
5337
|
+
* @param targetId
|
|
5338
|
+
* @param channelId
|
|
5339
|
+
* @param messageUId
|
|
5340
|
+
*/
|
|
5341
|
+
setGroupVoiceMessagePlayed(targetId: string, channelId: string, messageUId: string): Promise<IAsyncRes>;
|
|
5342
|
+
/**
|
|
5343
|
+
* 获取群语音消息已听列表
|
|
5344
|
+
* @param targetId
|
|
5345
|
+
* @param channelId
|
|
5346
|
+
* @param messageUId
|
|
5347
|
+
*/
|
|
5348
|
+
getGroupVoiceMessageReader(targetId: string, channelId: string, messageUId: string): IPromiseResult<IMessageReaderResponse>;
|
|
5306
5349
|
setReadMessages(targetId: string, channelId: string, beginMessageUId: string, endMessageUId: string): Promise<IAsyncRes>;
|
|
5307
5350
|
/**
|
|
5308
5351
|
* 获取群组消息已读回执
|
|
@@ -6177,6 +6220,10 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
6177
6220
|
* @param listener
|
|
6178
6221
|
*/
|
|
6179
6222
|
registerRTCSignalListener(listener?: (buffer: Uint8Array) => void): void;
|
|
6223
|
+
/**
|
|
6224
|
+
* 监听 RTC Meeting 下行信令通知
|
|
6225
|
+
*/
|
|
6226
|
+
registerMeetingEventListener(listener?: (eventType: MeetingEventType, buffer: Uint8Array) => void): void;
|
|
6180
6227
|
/**
|
|
6181
6228
|
* RTC 调用 signal 服务的通用接口
|
|
6182
6229
|
* @param roomId 房间 ID
|
|
@@ -6227,6 +6274,7 @@ interface IEngineWatcher extends IConnectionListener {
|
|
|
6227
6274
|
* RTC 数据变更
|
|
6228
6275
|
*/
|
|
6229
6276
|
onRTCDataChange: (data: IServerRTCRoomEntry[], roomId?: string) => void;
|
|
6277
|
+
onMeetingEvent: (eventType: number, buffer?: Uint8Array) => void;
|
|
6230
6278
|
pullFinished: () => void;
|
|
6231
6279
|
messageDelivered: (data: IMessageDeliver[]) => void;
|
|
6232
6280
|
groupMessageDeliveredStatus: (data: IGroupMessageDeliverStatus) => void;
|
|
@@ -6255,11 +6303,16 @@ declare abstract class AEngine {
|
|
|
6255
6303
|
*/
|
|
6256
6304
|
constructor(runtime: IRuntime, rtcCodec: Codec<RTCKeyMaps>, _watcher: IEngineWatcher, _options: IAPIContextOption, logger: BasicLogger);
|
|
6257
6305
|
protected _rtcSignalingListener?: (buffer: Uint8Array) => void;
|
|
6306
|
+
protected _meetingEventListener?: (eventType: MeetingEventType, buffer: Uint8Array) => void;
|
|
6258
6307
|
/**
|
|
6259
6308
|
* 注册 RTC KV 变更监听器
|
|
6260
6309
|
* @param listener
|
|
6261
6310
|
*/
|
|
6262
6311
|
registerRTCSignalingListener(listener: ((buffer: Uint8Array) => void) | undefined): void;
|
|
6312
|
+
/**
|
|
6313
|
+
* 注册Meeting事件监听器
|
|
6314
|
+
*/
|
|
6315
|
+
registerMeetingEventListener(listener: ((eventType: MeetingEventType, buffer: Uint8Array) => void) | undefined): void;
|
|
6263
6316
|
/**
|
|
6264
6317
|
* 忽视缓存,重新请求导航数据
|
|
6265
6318
|
*/
|
|
@@ -6493,6 +6546,20 @@ declare abstract class AEngine {
|
|
|
6493
6546
|
* @param messageUIds
|
|
6494
6547
|
*/
|
|
6495
6548
|
abstract getMessageReader(targetId: string, messageUId: string, channelId?: string): IPromiseResult<IMessageReaderResponse>;
|
|
6549
|
+
/**
|
|
6550
|
+
* 设置群语音消息已听状态
|
|
6551
|
+
* @param targetId
|
|
6552
|
+
* @param channelId
|
|
6553
|
+
* @param messageUId
|
|
6554
|
+
*/
|
|
6555
|
+
abstract setGroupVoiceMessagePlayed(targetId: string, channelId: string, messageUId: string): Promise<IAsyncRes>;
|
|
6556
|
+
/**
|
|
6557
|
+
* 获取群语音消息已听列表
|
|
6558
|
+
* @param targetId
|
|
6559
|
+
* @param channelId
|
|
6560
|
+
* @param messageUId
|
|
6561
|
+
*/
|
|
6562
|
+
abstract getGroupVoiceMessageReader(targetId: string, channelId: string, messageUId: string): IPromiseResult<IMessageReaderResponse>;
|
|
6496
6563
|
/**
|
|
6497
6564
|
* 发送群组消息已读回执
|
|
6498
6565
|
*/
|
|
@@ -7006,6 +7073,7 @@ declare abstract class AEngine {
|
|
|
7006
7073
|
* 接收 rtc 资源变更
|
|
7007
7074
|
*/
|
|
7008
7075
|
protected _receiveRtcKv(buffer: Uint8Array): void;
|
|
7076
|
+
protected _receiveMeetingEvent(eventType: MeetingEventType, buffer: Uint8Array): void;
|
|
7009
7077
|
/**
|
|
7010
7078
|
* Engine 反初始化
|
|
7011
7079
|
*/
|
|
@@ -7579,4 +7647,4 @@ declare type AbsCodec<T> = Codec<T>;
|
|
|
7579
7647
|
*/
|
|
7580
7648
|
declare const version: string;
|
|
7581
7649
|
|
|
7582
|
-
export { AConnectionMgr, AEngine, APIContext, AbsCodec, AppStorage, AssertRules, BAIDU_STORAGE_SERVER_URI, BasicLogger, BasicNavi, BasicReporter, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType, Codec, CodecPBMaps, ConnectionStatus, ConversationType, DB_LOG_FLUSH_FREQUENCY, DB_LOG_MAX_SIZE, DEFAULT_LOG_POLICY, DelayTimer, EnableLogL, ErrorCode, EventEmitter, FORMATED_VERSION, FileType, HTTP_TIMEOUT, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, ICancelRoomPKOptions, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionListener, IConnectionStatusListener, IConversationIdentifier, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IDeletedExpansion, IDeliveredUser, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IInsertMessage, IInsertMsgOptions, IIsValidExpansion, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, ILogDB, ILogData, ILogger, IM_CHATROOM_PULL_INTERVAL_TIME, IM_PING_INTERVAL_TIME, IM_PING_MIN_TIMEOUT, IM_PING_TIMEOUT, IM_SIGNAL_TIMEOUT, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReader, IMessageReaderResponse, IMetionedData, INaviCache, INaviInfo, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPluginGenerator, IProcessCache, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCRoomInfo, IRTCUserData, IRTCUsers, IReadReceiptInfo, IRecallMsgContent, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IReqRoomPKOptions, IRequest, IResRoomPKOptions, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStorage, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadConversation, IUltraUnreadMsg, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IWatcher, IWebSocket, IiOSPushConfig, IndexDBLogger, IndexDBReporter, RTCKeyMaps as InnerRTCKeyMaps, ItypingStateListener, KVString, LiveRole, LiveType, LogContent, LogL, LogLevel, LogSource, LogTagId, LogType, Logger, MAX_MESSAGE_CONTENT_BYTES, MAX_MESSAGE_EXPANSION_KEY_LENGTH, MAX_MESSAGE_EXPANSION_VAL_LENGTH, MINI_SOCKET_CONNECT_URIS, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NetworkType, NotificationLevel, NotificationStatus, ONE_LOG_SIZE_MAX, OperateStatus, PUBLIC_CLOUD_NAVI_URIS, PluginContext, QINIU_STORAGE_SERVER_URI, RCAssertError, RCConnectionStatus, REAT_TIME_LOG_SIZE, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATUS_MESSAGE, STORAGE_ROOT_KEY, SentStatus, StoreKeys, TagChangeType, UltraGroupChannelChangeType, UltraGroupChannelType, UltraMsgChangeType, UltraMsgSubChangeType, UploadMethod, UserGroupChangeType, VERSION, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketNavi, appendUrl, assert, clone, cloneByJSON, deInitLogDB, logger as engineLogger, forEach, getBrowser, getClientMessageId, getMimeKey, getUUID, getUUID22, getUploadFileName, indexOf, initLogDB, isArray, isArrayBuffer, isBoolean, isConnnectAckCode as isConnnectAck, isDisconnectCode as isDisconnectedByServer, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isTypeInConversationList, isUndefined, isValidChannelId, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, isValidNotificationLevel, base as logger, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, todo, transcsv, usingCppEngine, validate, version };
|
|
7650
|
+
export { AConnectionMgr, AEngine, APIContext, AbsCodec, AppStorage, AssertRules, BAIDU_STORAGE_SERVER_URI, BasicLogger, BasicNavi, BasicReporter, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType, Codec, CodecPBMaps, ConnectionStatus, ConversationType, DB_LOG_FLUSH_FREQUENCY, DB_LOG_MAX_SIZE, DEFAULT_LOG_POLICY, DelayTimer, EnableLogL, ErrorCode, EventEmitter, FORMATED_VERSION, FileType, HTTP_TIMEOUT, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, ICancelRoomPKOptions, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionListener, IConnectionStatusListener, IConversationIdentifier, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IDeletedExpansion, IDeliveredUser, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IInsertMessage, IInsertMsgOptions, IIsValidExpansion, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, ILogDB, ILogData, ILogger, IM_CHATROOM_PULL_INTERVAL_TIME, IM_PING_INTERVAL_TIME, IM_PING_MIN_TIMEOUT, IM_PING_TIMEOUT, IM_SIGNAL_TIMEOUT, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReader, IMessageReaderResponse, IMetionedData, INaviCache, INaviInfo, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPluginGenerator, IProcessCache, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCRoomInfo, IRTCUserData, IRTCUsers, IReadReceiptInfo, IRecallMsgContent, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IReqRoomPKOptions, IRequest, IResRoomPKOptions, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStorage, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadConversation, IUltraUnreadMsg, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IWatcher, IWebSocket, IiOSPushConfig, IndexDBLogger, IndexDBReporter, RTCKeyMaps as InnerRTCKeyMaps, ItypingStateListener, KVString, LiveRole, LiveType, LogContent, LogL, LogLevel, LogSource, LogTagId, LogType, Logger, MAX_MESSAGE_CONTENT_BYTES, MAX_MESSAGE_EXPANSION_KEY_LENGTH, MAX_MESSAGE_EXPANSION_VAL_LENGTH, MINI_SOCKET_CONNECT_URIS, MeetingEventType, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NetworkType, NotificationLevel, NotificationStatus, ONE_LOG_SIZE_MAX, OperateStatus, PUBLIC_CLOUD_NAVI_URIS, PluginContext, QINIU_STORAGE_SERVER_URI, RCAssertError, RCConnectionStatus, REAT_TIME_LOG_SIZE, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATUS_MESSAGE, STORAGE_ROOT_KEY, SentStatus, StoreKeys, TagChangeType, UltraGroupChannelChangeType, UltraGroupChannelType, UltraMsgChangeType, UltraMsgSubChangeType, UploadMethod, UserGroupChangeType, VERSION, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketNavi, appendUrl, assert, clone, cloneByJSON, deInitLogDB, logger as engineLogger, forEach, getBrowser, getClientMessageId, getMimeKey, getUUID, getUUID22, getUploadFileName, indexOf, initLogDB, isArray, isArrayBuffer, isBoolean, isConnnectAckCode as isConnnectAck, isDisconnectCode as isDisconnectedByServer, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isTypeInConversationList, isUndefined, isValidChannelId, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, isValidNotificationLevel, base as logger, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, todo, transcsv, usingCppEngine, validate, version };
|