@rongcloud/engine 5.7.2-beem.3 → 5.7.2-beemrtc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +2058 -2048
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1506,2838 +1506,2843 @@ 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
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
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;
|
|
1927
1896
|
/**
|
|
1928
|
-
*
|
|
1897
|
+
* 会话标识
|
|
1929
1898
|
*/
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
*/
|
|
1934
|
-
readReceiptInfo?: IReadReceiptInfo;
|
|
1935
|
-
/**
|
|
1936
|
-
* 推送扩展
|
|
1937
|
-
*/
|
|
1938
|
-
pushConfig?: IPushConfig;
|
|
1939
|
-
/**
|
|
1940
|
-
* 超级群专有字段,是否断档,服务端收到大量消息可能会断档,所以消息存在此标志位,断档需要客户手动拉取历史消息
|
|
1941
|
-
*/
|
|
1942
|
-
isInterrupt?: boolean;
|
|
1943
|
-
/**
|
|
1944
|
-
* 拉取历史消息时表示该消息是否修改过(仅超级群有效)
|
|
1945
|
-
*/
|
|
1946
|
-
isModifyMessage?: boolean;
|
|
1899
|
+
channelId?: string;
|
|
1900
|
+
tags?: IUpdatedConversation[];
|
|
1901
|
+
versionTime?: number;
|
|
1947
1902
|
/**
|
|
1948
|
-
*
|
|
1903
|
+
* @ 消息未读数
|
|
1949
1904
|
*/
|
|
1950
|
-
|
|
1951
|
-
/**
|
|
1952
|
-
* 扩展内容
|
|
1953
|
-
*/
|
|
1954
|
-
extraContent?: string;
|
|
1905
|
+
unreadMentionedCount?: number;
|
|
1955
1906
|
}
|
|
1956
1907
|
/**
|
|
1957
1908
|
* @category Interface
|
|
1958
1909
|
*/
|
|
1959
|
-
interface
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
id?: string;
|
|
1964
|
-
/**
|
|
1965
|
-
* 用户名
|
|
1966
|
-
*/
|
|
1967
|
-
name?: string;
|
|
1968
|
-
/**
|
|
1969
|
-
* 用户头像地址
|
|
1970
|
-
* @deprecated
|
|
1971
|
-
*/
|
|
1972
|
-
portraitUri?: string;
|
|
1973
|
-
/**
|
|
1974
|
-
* user info 中附加信息
|
|
1975
|
-
*/
|
|
1976
|
-
extra?: string;
|
|
1977
|
-
/**
|
|
1978
|
-
* 用户头像地址(向移动端兼容)
|
|
1979
|
-
*/
|
|
1980
|
-
portrait?: string;
|
|
1910
|
+
interface IBaseConversationInfo {
|
|
1911
|
+
conversationType: ConversationType;
|
|
1912
|
+
targetId: string;
|
|
1913
|
+
channelId: string;
|
|
1981
1914
|
}
|
|
1982
|
-
|
|
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 {
|
|
1983
1927
|
targetId: string;
|
|
1984
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;
|
|
1985
1953
|
userId: string;
|
|
1986
|
-
operationType: OperateStatus;
|
|
1987
|
-
operationTime?: number;
|
|
1988
1954
|
}
|
|
1989
|
-
|
|
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 {
|
|
1990
1968
|
targetId: string;
|
|
1991
1969
|
channelId?: string;
|
|
1992
|
-
count: number;
|
|
1993
|
-
operationType: OperateStatus;
|
|
1994
1970
|
}
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
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>>;
|
|
2001
1982
|
}
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
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 {
|
|
2026
2013
|
/**
|
|
2027
|
-
*
|
|
2028
|
-
|
|
2029
|
-
|
|
2014
|
+
* Navi 数据请求响应码,200 为成功请求
|
|
2015
|
+
*/
|
|
2016
|
+
code: number;
|
|
2030
2017
|
/**
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2018
|
+
* 获取 Navi 数据失败时的提示信息
|
|
2019
|
+
*/
|
|
2020
|
+
errorMessage?: string;
|
|
2034
2021
|
/**
|
|
2035
|
-
*
|
|
2022
|
+
* 获取 Navi 数据失败时的请求 url 信息
|
|
2036
2023
|
*/
|
|
2037
|
-
|
|
2038
|
-
}
|
|
2039
|
-
interface IRecallMsgContent {
|
|
2040
|
-
conversationType: number;
|
|
2041
|
-
targetId: string;
|
|
2042
|
-
sentTime: number;
|
|
2043
|
-
messageUId: string;
|
|
2024
|
+
url?: string;
|
|
2044
2025
|
/**
|
|
2045
|
-
*
|
|
2046
|
-
*
|
|
2047
|
-
|
|
2048
|
-
|
|
2026
|
+
* 请求导航数据时使用的协议:http / https
|
|
2027
|
+
* @description 该字段为 SDK 内增加的字段,导航接口数据中不存在
|
|
2028
|
+
*/
|
|
2029
|
+
protocol: 'http' | 'https';
|
|
2049
2030
|
/**
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2031
|
+
* 获取导航时使用的 userId,小程序不走导航,故拿不到 userId
|
|
2032
|
+
*/
|
|
2033
|
+
userId?: string;
|
|
2053
2034
|
/**
|
|
2054
|
-
*
|
|
2055
|
-
|
|
2056
|
-
|
|
2035
|
+
* CMP 服务 Websocket 连接地址,包含域名与端口,不含 ws 或 wss 协议头
|
|
2036
|
+
* @example a.domain.com:443
|
|
2037
|
+
* @note 在 V2 版本废弃
|
|
2038
|
+
*/
|
|
2039
|
+
server: string;
|
|
2057
2040
|
/**
|
|
2058
|
-
*
|
|
2041
|
+
* 备用 CMP 服务地址,包含域名与端口,不含 ws 或 wss 协议头,多个备用地址以 ',' 分割
|
|
2042
|
+
* @example a.domain.com:443,b.domain.com:443
|
|
2043
|
+
* @note 在 V2 版本废弃
|
|
2059
2044
|
*/
|
|
2060
|
-
|
|
2061
|
-
}
|
|
2062
|
-
/**
|
|
2063
|
-
* 发送消息时的可选项信息
|
|
2064
|
-
*/
|
|
2065
|
-
interface ISendMsgOptions {
|
|
2045
|
+
backupServer?: string;
|
|
2066
2046
|
/**
|
|
2067
|
-
*
|
|
2047
|
+
* 备用 CMP 服务地址,POST 请求 TCP 连接返回的是 bs 字段,非 backupServer 字段
|
|
2048
|
+
* @note 在 V2 版本废弃
|
|
2068
2049
|
*/
|
|
2069
|
-
|
|
2050
|
+
bs?: string;
|
|
2070
2051
|
/**
|
|
2071
|
-
*
|
|
2052
|
+
* RTC 服务配置,其值可能为 null、无效字符串、有效 JSON 字符串
|
|
2053
|
+
* 1. 公有云未开通音视频时,值为 null
|
|
2054
|
+
* 2. 私有云无配置时为 `{ "strategy": 0 }`
|
|
2072
2055
|
*/
|
|
2073
|
-
|
|
2074
|
-
/**
|
|
2075
|
-
* 消息内容 key-value,最终会进行 JSON 序列化后发送
|
|
2076
|
-
*/
|
|
2077
|
-
[key: string]: any;
|
|
2078
|
-
/**
|
|
2079
|
-
* 消息可携带的用户数据
|
|
2080
|
-
*/
|
|
2081
|
-
user?: IUserProfile;
|
|
2082
|
-
/**
|
|
2083
|
-
* 其他拓展信息
|
|
2084
|
-
*/
|
|
2085
|
-
extra?: string;
|
|
2086
|
-
};
|
|
2056
|
+
voipCallInfo: string | null;
|
|
2087
2057
|
/**
|
|
2088
|
-
*
|
|
2089
|
-
* @
|
|
2058
|
+
* 聊天室 kv 存储开关
|
|
2059
|
+
* @todo 需确认详细有效值
|
|
2060
|
+
* @description 公有云独有配置
|
|
2090
2061
|
*/
|
|
2091
|
-
|
|
2062
|
+
kvStorage: number;
|
|
2092
2063
|
/**
|
|
2093
|
-
*
|
|
2094
|
-
* @description
|
|
2064
|
+
* HttpDNS 功能开关,在 web 端无效
|
|
2065
|
+
* @description 公有云独有配置
|
|
2095
2066
|
*/
|
|
2096
|
-
|
|
2067
|
+
openHttpDNS: boolean;
|
|
2097
2068
|
/**
|
|
2098
|
-
*
|
|
2069
|
+
* 历史消息云存储功能开关
|
|
2099
2070
|
* @description
|
|
2100
|
-
* 1.
|
|
2101
|
-
* 2.
|
|
2071
|
+
* 1. 公有云通过 `developer.rongcloud.cn` 管理后台 `单群聊消息云端存储` 功能开关进行配置
|
|
2072
|
+
* 2. 私有云默认为 `true`
|
|
2102
2073
|
*/
|
|
2103
|
-
|
|
2074
|
+
historyMsg: boolean;
|
|
2104
2075
|
/**
|
|
2105
|
-
*
|
|
2076
|
+
* 聊天室历史消息开关
|
|
2106
2077
|
* @description
|
|
2107
|
-
*
|
|
2078
|
+
* 1. 私有云对聊天室功能支持有限,默认为 `false`
|
|
2079
|
+
* 2. TODO: 公有云配置待确认
|
|
2108
2080
|
*/
|
|
2109
|
-
|
|
2081
|
+
chatroomMsg: boolean;
|
|
2110
2082
|
/**
|
|
2111
|
-
*
|
|
2083
|
+
* 文件服务器地址
|
|
2084
|
+
* @description
|
|
2085
|
+
* 1. 公有云下,该地址为七牛云服务器地址
|
|
2086
|
+
* 2. 私有云下,该地址为私有云自研文件服务器地址
|
|
2087
|
+
* @note 在 V2 版本废弃
|
|
2112
2088
|
*/
|
|
2113
|
-
|
|
2089
|
+
uploadServer: string;
|
|
2114
2090
|
/**
|
|
2115
|
-
*
|
|
2091
|
+
* 实时位置共享配置,web 端无需处理
|
|
2116
2092
|
*/
|
|
2117
|
-
|
|
2093
|
+
location: null | string;
|
|
2118
2094
|
/**
|
|
2119
|
-
*
|
|
2095
|
+
* 实时日志上传开关
|
|
2096
|
+
* @todo 需确认有效值及作用
|
|
2120
2097
|
*/
|
|
2121
|
-
|
|
2098
|
+
monitor: number;
|
|
2122
2099
|
/**
|
|
2123
|
-
*
|
|
2124
|
-
* @description `1: @ 所有人 2: @ 指定用户`
|
|
2100
|
+
* 是否允许加入多聊天室开关
|
|
2125
2101
|
*/
|
|
2126
|
-
|
|
2102
|
+
joinMChrm: boolean;
|
|
2127
2103
|
/**
|
|
2128
|
-
*
|
|
2104
|
+
* 是否开启公众号功能:`0` 为未开启,`1` 为已开启
|
|
2129
2105
|
*/
|
|
2130
|
-
|
|
2106
|
+
openMp: 0 | 1;
|
|
2131
2107
|
/**
|
|
2132
|
-
*
|
|
2108
|
+
* 是否开启用户级配置,若开启,需连接成功后立即拉取实时配置,0 | 1
|
|
2109
|
+
* @description
|
|
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 需确认公有云与私有云区别
|
|
2133
2120
|
*/
|
|
2134
|
-
|
|
2121
|
+
openUS: 0 | 1;
|
|
2135
2122
|
/**
|
|
2136
|
-
*
|
|
2123
|
+
* 超级群功能开关,1表示开
|
|
2137
2124
|
*/
|
|
2138
|
-
|
|
2125
|
+
ugMsg?: 0 | 1;
|
|
2139
2126
|
/**
|
|
2140
|
-
*
|
|
2127
|
+
* 群离线消息最大下发条数,`0` 为关闭
|
|
2128
|
+
* @description 公有云独有配合
|
|
2141
2129
|
*/
|
|
2142
|
-
|
|
2130
|
+
grpMsgLimit: number;
|
|
2143
2131
|
/**
|
|
2144
|
-
*
|
|
2132
|
+
* 消息加密开关,0 为关闭
|
|
2133
|
+
* @todo
|
|
2134
|
+
* 1. 确定其控制的功能
|
|
2135
|
+
* 2. 确定 web 相关性
|
|
2136
|
+
* @note 在 V2 版本废弃
|
|
2145
2137
|
*/
|
|
2146
|
-
|
|
2147
|
-
[key: string]: string;
|
|
2148
|
-
};
|
|
2138
|
+
isFormatted: number;
|
|
2149
2139
|
/**
|
|
2150
|
-
*
|
|
2151
|
-
* @todo 功能未知,需确认
|
|
2140
|
+
* GIF 动图大小限制,默认 2048 KB
|
|
2152
2141
|
*/
|
|
2153
|
-
|
|
2154
|
-
/**
|
|
2155
|
-
* 移动端推送配置
|
|
2156
|
-
*/
|
|
2157
|
-
pushConfig?: IPushConfig;
|
|
2158
|
-
/**
|
|
2159
|
-
* 会话业务标识
|
|
2160
|
-
* @description
|
|
2161
|
-
* 20 个字符长度限制
|
|
2162
|
-
*/
|
|
2163
|
-
channelId?: string;
|
|
2142
|
+
gifSize: number;
|
|
2164
2143
|
/**
|
|
2165
|
-
*
|
|
2166
|
-
*
|
|
2144
|
+
* 上传小视频时长限制,单位:秒
|
|
2145
|
+
* @description 公有云字段,即私有云配置中的 `uploadVideoTimeLimit`
|
|
2167
2146
|
*/
|
|
2168
|
-
|
|
2147
|
+
videoTimes?: number;
|
|
2169
2148
|
/**
|
|
2170
|
-
*
|
|
2149
|
+
* 上传小视频时长限制,单位:秒
|
|
2150
|
+
* @description 私有云字段,即公有云配置中的 `videoTimes`
|
|
2171
2151
|
*/
|
|
2172
|
-
|
|
2152
|
+
uploadVideoTimeLimit?: number;
|
|
2173
2153
|
/**
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
}
|
|
2178
|
-
interface IInsertMsgOptions {
|
|
2179
|
-
senderUserId: string;
|
|
2180
|
-
messageType: string;
|
|
2181
|
-
content: any;
|
|
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;
|
|
2154
|
+
* 实时日志上传开关:`0` 为关闭,`1` 为开启
|
|
2155
|
+
*/
|
|
2156
|
+
logSwitch: number;
|
|
2211
2157
|
/**
|
|
2212
|
-
*
|
|
2158
|
+
* 实时日志上传策略,值为 JSON 字符串
|
|
2159
|
+
* @example `'{
|
|
2160
|
+
* "url": "logcollection.ronghub.com", // 上传地址
|
|
2161
|
+
* "level": 1, // 日志等级
|
|
2162
|
+
* "itv": 6, // 上传频率,即时间间隔,单位 s
|
|
2163
|
+
* "times": 5 // 重试次数?
|
|
2164
|
+
* }'`
|
|
2213
2165
|
*/
|
|
2214
|
-
|
|
2166
|
+
logPolicy: string;
|
|
2215
2167
|
/**
|
|
2216
|
-
*
|
|
2168
|
+
* 百度 BOS 存储服务地址
|
|
2169
|
+
* @description 公有云独有配置
|
|
2170
|
+
* @example `gz.bcebos.com`
|
|
2171
|
+
* @deprecated 已废弃
|
|
2217
2172
|
*/
|
|
2218
|
-
|
|
2173
|
+
bosAddr?: string;
|
|
2219
2174
|
/**
|
|
2220
|
-
*
|
|
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
|
+
* ```
|
|
2221
2182
|
*/
|
|
2222
|
-
|
|
2223
|
-
isMentioned?: boolean;
|
|
2224
|
-
}
|
|
2225
|
-
interface ISendExMsgOptions {
|
|
2226
|
-
channelId: string;
|
|
2227
|
-
conversationType: ConversationType;
|
|
2228
|
-
targetId: string;
|
|
2183
|
+
ossConfig?: string;
|
|
2229
2184
|
/**
|
|
2230
|
-
*
|
|
2231
|
-
|
|
2232
|
-
|
|
2185
|
+
* 私有云专有属性,可用来判断当前环境是公有云还是私有云,私有云环境下该值为 `1`
|
|
2186
|
+
*/
|
|
2187
|
+
type?: number;
|
|
2233
2188
|
/**
|
|
2234
|
-
*
|
|
2235
|
-
|
|
2236
|
-
|
|
2189
|
+
* @deprecated 已废弃
|
|
2190
|
+
*/
|
|
2191
|
+
compDays: number;
|
|
2237
2192
|
/**
|
|
2238
|
-
*
|
|
2239
|
-
|
|
2240
|
-
|
|
2193
|
+
* @deprecated 已废弃
|
|
2194
|
+
*/
|
|
2195
|
+
msgAck: unknown;
|
|
2241
2196
|
/**
|
|
2242
|
-
*
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
[key: string]: string;
|
|
2246
|
-
};
|
|
2197
|
+
* @deprecated 已废弃
|
|
2198
|
+
*/
|
|
2199
|
+
activeServer: string;
|
|
2247
2200
|
/**
|
|
2248
|
-
*
|
|
2249
|
-
|
|
2250
|
-
|
|
2201
|
+
* @deprecated 已废弃
|
|
2202
|
+
*/
|
|
2203
|
+
qnAddr: string;
|
|
2251
2204
|
/**
|
|
2252
|
-
*
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
[key: string]: string;
|
|
2256
|
-
} | null;
|
|
2257
|
-
}
|
|
2258
|
-
interface IUltraExMsgOptions {
|
|
2259
|
-
canIncludeExpansion: boolean;
|
|
2260
|
-
channelId: string;
|
|
2261
|
-
conversationType: ConversationType;
|
|
2262
|
-
targetId: string;
|
|
2263
|
-
messageUId: string;
|
|
2264
|
-
sendTime: number;
|
|
2205
|
+
* @deprecated 已废弃
|
|
2206
|
+
*/
|
|
2207
|
+
extkitSwitch: number;
|
|
2265
2208
|
/**
|
|
2266
|
-
*
|
|
2267
|
-
|
|
2268
|
-
|
|
2209
|
+
* @deprecated 已废弃
|
|
2210
|
+
*/
|
|
2211
|
+
alone: boolean;
|
|
2269
2212
|
/**
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
[key: string]: string;
|
|
2274
|
-
};
|
|
2213
|
+
* @deprecated 已废弃
|
|
2214
|
+
*/
|
|
2215
|
+
voipServer: string;
|
|
2275
2216
|
/**
|
|
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;
|
|
2217
|
+
* 离线日志上报地址
|
|
2218
|
+
* @deprecated 已废弃
|
|
2219
|
+
*/
|
|
2220
|
+
offlinelogserver: string;
|
|
2287
2221
|
/**
|
|
2288
|
-
*
|
|
2222
|
+
* 在线日志上报地址
|
|
2223
|
+
* @deprecated 已废弃
|
|
2289
2224
|
*/
|
|
2290
|
-
|
|
2291
|
-
/**
|
|
2292
|
-
* 消息内容 key-value,最终会进行 JSON 序列化后发送
|
|
2293
|
-
*/
|
|
2294
|
-
[key: string]: any;
|
|
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[];
|
|
2314
|
-
}
|
|
2315
|
-
/**
|
|
2316
|
-
* 被拦截的消息信息
|
|
2317
|
-
* @category Interface
|
|
2318
|
-
*/
|
|
2319
|
-
interface IBlockedMessageInfo {
|
|
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 {
|
|
2225
|
+
onlinelogserver?: string;
|
|
2335
2226
|
/**
|
|
2336
|
-
*
|
|
2337
|
-
|
|
2338
|
-
|
|
2227
|
+
* 链路加密字段,内容为 JSON 字符串,仅限 C++ 可用
|
|
2228
|
+
* @note 在 V2 版本废弃
|
|
2229
|
+
*/
|
|
2230
|
+
crypto?: string;
|
|
2339
2231
|
/**
|
|
2340
|
-
*
|
|
2341
|
-
|
|
2342
|
-
|
|
2232
|
+
* 群组回执开关, 1: 打开,0(或者没有): 关闭
|
|
2233
|
+
*/
|
|
2234
|
+
grpRRVer?: number;
|
|
2343
2235
|
/**
|
|
2344
|
-
*
|
|
2345
|
-
|
|
2346
|
-
|
|
2236
|
+
* 防黑产开关, 1: 打开,0:关闭
|
|
2237
|
+
*/
|
|
2238
|
+
openAnti?: number;
|
|
2347
2239
|
/**
|
|
2348
|
-
*
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
}
|
|
2352
|
-
/**
|
|
2353
|
-
* 超级群获取指定会话 @ 未读消息列表结果
|
|
2354
|
-
*/
|
|
2355
|
-
interface IUltraUnreadMsg {
|
|
2240
|
+
* 鉴权认证
|
|
2241
|
+
*/
|
|
2242
|
+
jwt?: string;
|
|
2356
2243
|
/**
|
|
2357
|
-
*
|
|
2358
|
-
|
|
2359
|
-
|
|
2244
|
+
* 数据中心
|
|
2245
|
+
*/
|
|
2246
|
+
dc?: string;
|
|
2360
2247
|
/**
|
|
2361
|
-
*
|
|
2362
|
-
|
|
2363
|
-
|
|
2248
|
+
* 是否开启 tls
|
|
2249
|
+
*/
|
|
2250
|
+
openTLS?: number;
|
|
2364
2251
|
/**
|
|
2365
|
-
*
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
interface IMentionInfo {
|
|
2371
|
-
type: MentionedType;
|
|
2252
|
+
* V2 版本中新增字段
|
|
2253
|
+
* 服务地址列表
|
|
2254
|
+
*/
|
|
2255
|
+
serverAddr?: ICmpData[];
|
|
2372
2256
|
/**
|
|
2373
|
-
*
|
|
2257
|
+
* V2 版本中新增字段
|
|
2258
|
+
* 新版本控制tag
|
|
2374
2259
|
*/
|
|
2375
|
-
|
|
2260
|
+
excludeLogTag?: string;
|
|
2376
2261
|
}
|
|
2262
|
+
|
|
2263
|
+
declare type INaviCache = {
|
|
2264
|
+
token: string;
|
|
2265
|
+
naviInfo: INaviInfo;
|
|
2266
|
+
timestamp: number;
|
|
2267
|
+
};
|
|
2377
2268
|
/**
|
|
2378
|
-
*
|
|
2379
|
-
* @category Interface
|
|
2269
|
+
* 导航数据管理类,负责管理导航有效期、导航请求、导航缓存
|
|
2380
2270
|
*/
|
|
2381
|
-
|
|
2271
|
+
declare abstract class BasicNavi {
|
|
2272
|
+
protected readonly appkey: string;
|
|
2273
|
+
protected readonly logger: BasicLogger;
|
|
2382
2274
|
/**
|
|
2383
|
-
*
|
|
2384
|
-
|
|
2385
|
-
|
|
2275
|
+
* 业务层的自定义导航配置
|
|
2276
|
+
*/
|
|
2277
|
+
protected readonly navigators: string[];
|
|
2278
|
+
constructor(appkey: string, logger: BasicLogger,
|
|
2386
2279
|
/**
|
|
2387
|
-
*
|
|
2280
|
+
* 业务层的自定义导航配置
|
|
2388
2281
|
*/
|
|
2389
|
-
|
|
2282
|
+
navigators: string[]);
|
|
2390
2283
|
/**
|
|
2391
|
-
*
|
|
2392
|
-
* @description
|
|
2393
|
-
* 1. 当 `conversationType` 为 `ConversationType.GROUP` 时,该值为群组 Id
|
|
2394
|
-
* 1. 当 `conversationType` 为 `ConversationType.PRIVATE` 时,该值为对方用户 Id
|
|
2284
|
+
* 当前进行中的导航请求
|
|
2395
2285
|
*/
|
|
2396
|
-
|
|
2286
|
+
private crtRequest;
|
|
2397
2287
|
/**
|
|
2398
|
-
*
|
|
2288
|
+
* 请求导航数据
|
|
2289
|
+
* @param token
|
|
2290
|
+
* @param ignoreCache 是否忽略缓存,强制从服务器重新拉取。
|
|
2291
|
+
* @param ignoreExpire 是否忽略有效期检查。理论上只需要在建立连接时需要检测 navi 有效期,其他场景无需检测
|
|
2292
|
+
* @param traceId 事务日志跟踪 ID
|
|
2399
2293
|
*/
|
|
2400
|
-
|
|
2294
|
+
request(token: string, ignoreCache: boolean, ignoreExpire: boolean, traceId: string): IPromiseResult<INaviInfo>;
|
|
2295
|
+
private sendRequest;
|
|
2401
2296
|
/**
|
|
2402
|
-
*
|
|
2297
|
+
* 从指定服务列表中顺序尝试获取导航
|
|
2298
|
+
* @param uris 导航服务列表
|
|
2299
|
+
* @param token
|
|
2300
|
+
* @param traceId
|
|
2403
2301
|
*/
|
|
2404
|
-
|
|
2302
|
+
private requestHandler;
|
|
2405
2303
|
/**
|
|
2406
|
-
*
|
|
2304
|
+
* 向目标导航服务发送请求
|
|
2305
|
+
* @param uri 导航服务地址
|
|
2306
|
+
* @param appkey
|
|
2307
|
+
* @param token
|
|
2308
|
+
* @param version
|
|
2309
|
+
* @param timeout 请求超时时间
|
|
2310
|
+
* @param traceId
|
|
2407
2311
|
*/
|
|
2408
|
-
|
|
2312
|
+
protected abstract httpRequest(uri: string, appkey: string, token: string, traceId: string, finished: boolean): IPromiseResult<INaviInfo>;
|
|
2409
2313
|
/**
|
|
2410
|
-
*
|
|
2314
|
+
* 向目标导航服务发送请求
|
|
2315
|
+
* @param uri 导航服务地址
|
|
2316
|
+
* @param appkey
|
|
2317
|
+
* @param token
|
|
2318
|
+
* @param version
|
|
2319
|
+
* @param timeout 请求超时时间
|
|
2320
|
+
* @param traceId
|
|
2411
2321
|
*/
|
|
2412
|
-
|
|
2322
|
+
protected abstract httpRequestV2(uri: string, appkey: string, token: string, traceId: string, finished: boolean): IPromiseResult<INaviInfo>;
|
|
2323
|
+
/**
|
|
2324
|
+
* 转换 Navi 接口 HTTP 请求状态码为 ErrorCode 定义
|
|
2325
|
+
* @param code
|
|
2326
|
+
*/
|
|
2327
|
+
protected transHttpCode(code: number): ErrorCode;
|
|
2413
2328
|
/**
|
|
2414
|
-
*
|
|
2415
|
-
* @
|
|
2416
|
-
*
|
|
2417
|
-
*
|
|
2329
|
+
* 设置缓存
|
|
2330
|
+
* @param formatedToken
|
|
2331
|
+
* @param naviInfo
|
|
2332
|
+
* @description 设置缓存的同时会检测缓存中的既有数据,适当清理,避免无效数据长时间占用存储空间
|
|
2418
2333
|
*/
|
|
2419
|
-
|
|
2420
|
-
notificationLevel?: NotificationLevel;
|
|
2334
|
+
protected abstract setNaviCache(formatedToken: string, naviInfo: INaviInfo): void;
|
|
2421
2335
|
/**
|
|
2422
|
-
*
|
|
2336
|
+
* 获取缓存数据
|
|
2337
|
+
* @param formatedToken
|
|
2423
2338
|
*/
|
|
2424
|
-
|
|
2339
|
+
protected abstract getNaviCache(formatedToken: string): INaviCache | null;
|
|
2425
2340
|
/**
|
|
2426
|
-
*
|
|
2341
|
+
* 获取缓存的导航信息
|
|
2342
|
+
* @param token
|
|
2427
2343
|
*/
|
|
2428
|
-
|
|
2344
|
+
getNaviInfoFromCache(token: string): INaviInfo | null;
|
|
2429
2345
|
/**
|
|
2430
|
-
*
|
|
2346
|
+
* RTC 配置变更,更新 navi 缓存
|
|
2347
|
+
* @param token
|
|
2348
|
+
* @param voipCallInfo
|
|
2431
2349
|
*/
|
|
2432
|
-
|
|
2350
|
+
updateVoipCallInfo(token: string, voipCallInfo: string): void;
|
|
2351
|
+
protected getNaviV2RequestOption(option: INaviRequestOption): IRequest;
|
|
2433
2352
|
/**
|
|
2434
|
-
*
|
|
2353
|
+
* 是否使用 v2 版本导航
|
|
2354
|
+
* 仅私有云 rcx 使用 v1 版本
|
|
2435
2355
|
*/
|
|
2436
|
-
|
|
2437
|
-
unreadMentionedCount?: number;
|
|
2356
|
+
useV2Navi(): boolean;
|
|
2438
2357
|
}
|
|
2358
|
+
|
|
2439
2359
|
/**
|
|
2440
|
-
*
|
|
2360
|
+
* Websocket 导航工具类
|
|
2441
2361
|
*/
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
}
|
|
2445
|
-
interface IUltraGroupConversation extends IReceivedConversation {
|
|
2446
|
-
channelType?: UltraGroupChannelType;
|
|
2447
|
-
/**
|
|
2448
|
-
* 第一条未读消息
|
|
2449
|
-
*/
|
|
2450
|
-
firstUnreadMessage?: IUltraUnreadMsg | null;
|
|
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;
|
|
2362
|
+
declare class WebSocketNavi extends BasicNavi {
|
|
2363
|
+
private runtime;
|
|
2489
2364
|
/**
|
|
2490
|
-
*
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
versionTime?: number;
|
|
2365
|
+
* 小程序平台服务地址,多个地址以 ',' 分割
|
|
2366
|
+
*/
|
|
2367
|
+
private readonly miniCmpUris;
|
|
2368
|
+
constructor(appkey: string, logger: BasicLogger, runtime: IRuntime,
|
|
2495
2369
|
/**
|
|
2496
|
-
*
|
|
2370
|
+
* 小程序平台服务地址,多个地址以 ',' 分割
|
|
2497
2371
|
*/
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
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;
|
|
2529
|
-
}
|
|
2530
|
-
/**
|
|
2531
|
-
* 超级群频道变更通知内容
|
|
2532
|
-
*/
|
|
2533
|
-
interface IUltraChannelChangeInfo {
|
|
2534
|
-
targetId: string;
|
|
2535
|
-
channelId: string;
|
|
2536
|
-
channelType: UltraGroupChannelType;
|
|
2537
|
-
changeType: UltraGroupChannelChangeType;
|
|
2538
|
-
}
|
|
2539
|
-
/**
|
|
2540
|
-
* 超级群私有频道用户被踢出白名单通知内容
|
|
2541
|
-
*/
|
|
2542
|
-
interface IUltraChannelUserKickedInfo {
|
|
2543
|
-
targetId: string;
|
|
2544
|
-
channelId: string;
|
|
2545
|
-
channelType: UltraGroupChannelType;
|
|
2546
|
-
userId: string;
|
|
2547
|
-
}
|
|
2548
|
-
/**
|
|
2549
|
-
* 超级群频道被删除通知内容
|
|
2550
|
-
*/
|
|
2551
|
-
interface IUltraChannelDeleteInfo {
|
|
2552
|
-
targetId: string;
|
|
2553
|
-
channelId: string;
|
|
2554
|
-
channelType: UltraGroupChannelType;
|
|
2555
|
-
deleteTime: number;
|
|
2556
|
-
}
|
|
2557
|
-
/**
|
|
2558
|
-
* 获取超级群获取指定会话未读 @ 消息列表
|
|
2559
|
-
*/
|
|
2560
|
-
interface IUltraUnreadConversation {
|
|
2561
|
-
targetId: string;
|
|
2562
|
-
channelId?: string;
|
|
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;
|
|
2563
2377
|
}
|
|
2564
2378
|
|
|
2565
2379
|
/**
|
|
2566
2380
|
* @category Interface
|
|
2567
2381
|
*/
|
|
2568
|
-
interface
|
|
2382
|
+
interface IUploadAuth {
|
|
2569
2383
|
/**
|
|
2570
|
-
*
|
|
2384
|
+
* 七牛 token 有效期
|
|
2571
2385
|
*/
|
|
2572
|
-
|
|
2386
|
+
deadline: number;
|
|
2573
2387
|
/**
|
|
2574
|
-
*
|
|
2388
|
+
* 七牛上传 token
|
|
2575
2389
|
*/
|
|
2576
|
-
|
|
2390
|
+
token: string;
|
|
2577
2391
|
/**
|
|
2578
|
-
*
|
|
2392
|
+
* 百度上传 token
|
|
2579
2393
|
*/
|
|
2580
|
-
|
|
2394
|
+
bosToken: string;
|
|
2581
2395
|
/**
|
|
2582
|
-
*
|
|
2396
|
+
* 百度上传 header Date
|
|
2583
2397
|
*/
|
|
2584
|
-
|
|
2398
|
+
bosDate: string;
|
|
2585
2399
|
/**
|
|
2586
|
-
*
|
|
2400
|
+
* 百度上传路径
|
|
2587
2401
|
*/
|
|
2588
|
-
|
|
2589
|
-
}
|
|
2590
|
-
/**
|
|
2591
|
-
* @category Interface
|
|
2592
|
-
*/
|
|
2593
|
-
interface IChatroomRejoinedFailed {
|
|
2402
|
+
path: string;
|
|
2594
2403
|
/**
|
|
2595
|
-
*
|
|
2596
|
-
|
|
2597
|
-
|
|
2404
|
+
* 上传文件名,阿里上传获取下载地址时,必须使用上传文件名,所以需抛出到业务端
|
|
2405
|
+
*/
|
|
2406
|
+
fileName: string;
|
|
2598
2407
|
/**
|
|
2599
|
-
*
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
}
|
|
2603
|
-
/**
|
|
2604
|
-
* @category Interface
|
|
2605
|
-
*/
|
|
2606
|
-
interface IChatroomRejoinedSuccessed {
|
|
2408
|
+
* 阿里云 oss 的 AccessKeyId
|
|
2409
|
+
*/
|
|
2410
|
+
osskeyId: string;
|
|
2607
2411
|
/**
|
|
2608
|
-
*
|
|
2609
|
-
|
|
2610
|
-
|
|
2412
|
+
* 阿里云 oss post 请求表单域中的字段 policy
|
|
2413
|
+
*/
|
|
2414
|
+
ossPolicy: string;
|
|
2611
2415
|
/**
|
|
2612
|
-
*
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
*/
|
|
2630
|
-
|
|
2416
|
+
* 阿里云 oss 根据 policy 计算的签名信息
|
|
2417
|
+
*/
|
|
2418
|
+
ossSign: string;
|
|
2419
|
+
/**
|
|
2420
|
+
* 阿里云 oss 存储空间名称
|
|
2421
|
+
*/
|
|
2422
|
+
ossBucketName: string;
|
|
2423
|
+
/**
|
|
2424
|
+
* s3 认证凭证,对应 post上传 x-amz-credential 字段
|
|
2425
|
+
*/
|
|
2426
|
+
s3Credential: string;
|
|
2427
|
+
/**
|
|
2428
|
+
* 加密算法,对应 post上传 x-amz-algorithm 字段
|
|
2429
|
+
*/
|
|
2430
|
+
s3Algorithm: string;
|
|
2431
|
+
/**
|
|
2432
|
+
* s3 日期,对应 post上传 x-amz-date 字段
|
|
2433
|
+
*/
|
|
2434
|
+
s3Date: string;
|
|
2631
2435
|
/**
|
|
2632
|
-
*
|
|
2633
|
-
|
|
2634
|
-
|
|
2436
|
+
* s3 policy,对应 post上传 policy 字段
|
|
2437
|
+
*/
|
|
2438
|
+
s3Policy: string;
|
|
2635
2439
|
/**
|
|
2636
|
-
*
|
|
2637
|
-
|
|
2638
|
-
|
|
2440
|
+
* s3 签名信息,对应 post上传 x-amz-signature 字段
|
|
2441
|
+
*/
|
|
2442
|
+
s3Signature: string;
|
|
2639
2443
|
/**
|
|
2640
|
-
*
|
|
2444
|
+
* s3 存储空间名称
|
|
2641
2445
|
*/
|
|
2642
|
-
|
|
2446
|
+
s3BucketName: string;
|
|
2643
2447
|
/**
|
|
2644
|
-
*
|
|
2448
|
+
* stc Authorization 头
|
|
2645
2449
|
*/
|
|
2646
|
-
|
|
2450
|
+
stcAuthorization: string;
|
|
2451
|
+
/**
|
|
2452
|
+
* stc xAmzContentSha256
|
|
2453
|
+
*/
|
|
2454
|
+
stcContentSha256: string;
|
|
2455
|
+
/**
|
|
2456
|
+
* stc date
|
|
2457
|
+
*/
|
|
2458
|
+
stcDate: string;
|
|
2459
|
+
/**
|
|
2460
|
+
* stc 存储空间名称
|
|
2461
|
+
*/
|
|
2462
|
+
stcBucketName: string;
|
|
2647
2463
|
}
|
|
2464
|
+
|
|
2648
2465
|
/**
|
|
2649
|
-
*
|
|
2466
|
+
* 当前运行时设备信息
|
|
2650
2467
|
*/
|
|
2651
|
-
interface
|
|
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
|
+
};
|
|
2515
|
+
}
|
|
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
|
+
};
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
/**
|
|
2556
|
+
* 代理信息
|
|
2557
|
+
*/
|
|
2558
|
+
interface IProxy {
|
|
2559
|
+
socksHost: string;
|
|
2560
|
+
socksPort: number;
|
|
2561
|
+
socksUsername?: string;
|
|
2562
|
+
socksPassword?: string;
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
declare enum HttpMethod {
|
|
2566
|
+
GET = "GET",
|
|
2567
|
+
POST = "POST"
|
|
2568
|
+
}
|
|
2569
|
+
interface IRequest {
|
|
2570
|
+
url: string;
|
|
2652
2571
|
/**
|
|
2653
|
-
*
|
|
2572
|
+
* @default `HttpMethod.GET`
|
|
2654
2573
|
*/
|
|
2655
|
-
|
|
2574
|
+
method?: HttpMethod | 'GET' | 'POST';
|
|
2656
2575
|
/**
|
|
2657
|
-
*
|
|
2576
|
+
* 查询数据
|
|
2658
2577
|
*/
|
|
2659
|
-
|
|
2578
|
+
query?: {
|
|
2579
|
+
[key: string]: string | number | null;
|
|
2580
|
+
};
|
|
2660
2581
|
/**
|
|
2661
|
-
*
|
|
2582
|
+
* Request Header 信息
|
|
2662
2583
|
*/
|
|
2663
|
-
|
|
2584
|
+
headers?: {
|
|
2585
|
+
[key: string]: string;
|
|
2586
|
+
};
|
|
2664
2587
|
/**
|
|
2665
|
-
*
|
|
2588
|
+
* Request Body 数据
|
|
2666
2589
|
*/
|
|
2667
|
-
|
|
2590
|
+
body?: Object | string;
|
|
2668
2591
|
/**
|
|
2669
|
-
*
|
|
2592
|
+
* 超时设置,默认 `60s`
|
|
2670
2593
|
*/
|
|
2671
|
-
|
|
2672
|
-
}
|
|
2673
|
-
/**
|
|
2674
|
-
* @category Interface
|
|
2675
|
-
*/
|
|
2676
|
-
interface IChatroomUser {
|
|
2594
|
+
timeout?: number;
|
|
2677
2595
|
/**
|
|
2678
|
-
*
|
|
2596
|
+
* 【Alipay-Only】
|
|
2597
|
+
* 期望返回的数据格式,如果为 json 则返回后会对返回的数据进行一次 JSON.parse
|
|
2679
2598
|
*/
|
|
2680
|
-
|
|
2599
|
+
dataType?: 'json' | 'text' | 'base64' | 'arraybuffer';
|
|
2681
2600
|
/**
|
|
2682
|
-
*
|
|
2601
|
+
* socks5 代理参数,仅 Electron 平台有效,web 平台默认为 null
|
|
2683
2602
|
*/
|
|
2684
|
-
|
|
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;
|
|
2685
2614
|
}
|
|
2686
2615
|
/**
|
|
2687
|
-
*
|
|
2616
|
+
* 网络状态枚举
|
|
2688
2617
|
*/
|
|
2689
|
-
|
|
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;
|
|
2690
2629
|
/**
|
|
2691
|
-
*
|
|
2692
|
-
* @
|
|
2630
|
+
* 监听连接建立事件,此时 WebSocket 实例已准备好收发数据
|
|
2631
|
+
* @param callback
|
|
2693
2632
|
*/
|
|
2694
|
-
|
|
2633
|
+
onOpen(callback: () => void): void;
|
|
2695
2634
|
/**
|
|
2696
|
-
*
|
|
2635
|
+
* 监听连接关闭事件
|
|
2636
|
+
* @param callback
|
|
2697
2637
|
*/
|
|
2698
|
-
|
|
2699
|
-
}
|
|
2700
|
-
/**
|
|
2701
|
-
* @category Interface
|
|
2702
|
-
*/
|
|
2703
|
-
interface IRemoveChatroomEntry {
|
|
2638
|
+
onClose(callback: (code?: number, reason?: string) => void): void;
|
|
2704
2639
|
/**
|
|
2705
|
-
*
|
|
2640
|
+
* 监听接收服务器消息事件
|
|
2641
|
+
* @param callback
|
|
2706
2642
|
*/
|
|
2707
|
-
|
|
2643
|
+
onMessage(callback: (data: string | ArrayBuffer) => void): void;
|
|
2708
2644
|
/**
|
|
2709
|
-
*
|
|
2645
|
+
* 监听链接错误事件
|
|
2646
|
+
* @param callback
|
|
2710
2647
|
*/
|
|
2711
|
-
|
|
2648
|
+
onError(callback: (error: unknown) => void): void;
|
|
2712
2649
|
/**
|
|
2713
|
-
*
|
|
2650
|
+
* 向服务器发送数据
|
|
2651
|
+
* @param data
|
|
2714
2652
|
*/
|
|
2715
|
-
|
|
2653
|
+
send(data: ArrayBuffer | string): void;
|
|
2654
|
+
/**
|
|
2655
|
+
* 关闭连接
|
|
2656
|
+
* @param code
|
|
2657
|
+
* @param reason
|
|
2658
|
+
*/
|
|
2659
|
+
close(code?: number, reason?: string): void;
|
|
2716
2660
|
}
|
|
2717
2661
|
/**
|
|
2718
|
-
*
|
|
2662
|
+
* 平台运行时抽象
|
|
2719
2663
|
*/
|
|
2720
|
-
interface
|
|
2664
|
+
interface IRuntime {
|
|
2721
2665
|
/**
|
|
2722
|
-
*
|
|
2666
|
+
* 平台标识
|
|
2723
2667
|
*/
|
|
2724
|
-
|
|
2725
|
-
key: string;
|
|
2726
|
-
}[];
|
|
2668
|
+
tag: string;
|
|
2727
2669
|
/**
|
|
2728
|
-
*
|
|
2670
|
+
* 发送 http 请求
|
|
2671
|
+
* @param options
|
|
2672
|
+
*/
|
|
2673
|
+
httpReq(options: IRequest): Promise<IResponse>;
|
|
2674
|
+
/**
|
|
2675
|
+
* 是否使用导航
|
|
2729
2676
|
*/
|
|
2677
|
+
useNavi: boolean;
|
|
2730
2678
|
/**
|
|
2731
|
-
*
|
|
2679
|
+
* websocket 地址上附加的平台字段
|
|
2732
2680
|
*/
|
|
2733
|
-
|
|
2734
|
-
}
|
|
2735
|
-
/**
|
|
2736
|
-
* @category Interface
|
|
2737
|
-
*/
|
|
2738
|
-
interface IChatroomEntries {
|
|
2681
|
+
connectPlatform: string;
|
|
2739
2682
|
/**
|
|
2740
|
-
*
|
|
2741
|
-
* key 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
2742
|
-
* value 属性对应的值, 最大长度 4096 字符
|
|
2683
|
+
* websocket 地址上 apiVer 字段,代表代码是否来源于 uniapp
|
|
2743
2684
|
*/
|
|
2744
|
-
|
|
2745
|
-
key: string;
|
|
2746
|
-
value: string;
|
|
2747
|
-
}[];
|
|
2685
|
+
isFromUniapp: boolean;
|
|
2748
2686
|
/**
|
|
2749
|
-
*
|
|
2687
|
+
* 创建长连接实例
|
|
2750
2688
|
*/
|
|
2689
|
+
createWebSocket(url: string, protocols?: string[]): IWebSocket;
|
|
2751
2690
|
/**
|
|
2752
|
-
*
|
|
2691
|
+
* 存储模块
|
|
2753
2692
|
*/
|
|
2754
|
-
|
|
2693
|
+
localStorage: IStorage;
|
|
2755
2694
|
/**
|
|
2756
|
-
*
|
|
2695
|
+
* 在某些非浏览器平台,其等同于 localStorage
|
|
2757
2696
|
*/
|
|
2758
|
-
|
|
2697
|
+
sessionStorage: IStorage;
|
|
2759
2698
|
/**
|
|
2760
|
-
*
|
|
2699
|
+
* 获取网络状态
|
|
2700
|
+
* 2g 3g 4g wifi unkown
|
|
2761
2701
|
*/
|
|
2762
|
-
|
|
2702
|
+
getNetworkType(): Promise<NetworkType>;
|
|
2763
2703
|
}
|
|
2764
2704
|
|
|
2765
2705
|
/**
|
|
2766
|
-
*
|
|
2706
|
+
* 连接状态定义枚举值
|
|
2767
2707
|
*/
|
|
2768
|
-
|
|
2769
|
-
/**
|
|
2770
|
-
* 七牛 token 有效期
|
|
2771
|
-
*/
|
|
2772
|
-
deadline: number;
|
|
2773
|
-
/**
|
|
2774
|
-
* 七牛上传 token
|
|
2775
|
-
*/
|
|
2776
|
-
token: string;
|
|
2777
|
-
/**
|
|
2778
|
-
* 百度上传 token
|
|
2779
|
-
*/
|
|
2780
|
-
bosToken: string;
|
|
2781
|
-
/**
|
|
2782
|
-
* 百度上传 header Date
|
|
2783
|
-
*/
|
|
2784
|
-
bosDate: string;
|
|
2785
|
-
/**
|
|
2786
|
-
* 百度上传路径
|
|
2787
|
-
*/
|
|
2788
|
-
path: string;
|
|
2708
|
+
declare enum RCConnectionStatus {
|
|
2789
2709
|
/**
|
|
2790
|
-
*
|
|
2710
|
+
* 已连接
|
|
2791
2711
|
*/
|
|
2792
|
-
|
|
2712
|
+
CONNECTED = 0,
|
|
2793
2713
|
/**
|
|
2794
|
-
*
|
|
2714
|
+
* 连接中
|
|
2795
2715
|
*/
|
|
2796
|
-
|
|
2716
|
+
CONNECTING = 1,
|
|
2797
2717
|
/**
|
|
2798
|
-
*
|
|
2718
|
+
* 无连接,或已断开
|
|
2799
2719
|
*/
|
|
2800
|
-
|
|
2720
|
+
DISCONNECTED = 2,
|
|
2801
2721
|
/**
|
|
2802
|
-
*
|
|
2722
|
+
* 连接暂停状态,SDK 内部 5s 后会自动尝试重连
|
|
2803
2723
|
*/
|
|
2804
|
-
|
|
2724
|
+
SUSPENDED = 3
|
|
2725
|
+
}
|
|
2726
|
+
interface IConnectionListener {
|
|
2805
2727
|
/**
|
|
2806
|
-
*
|
|
2728
|
+
* 连接成功
|
|
2807
2729
|
*/
|
|
2808
|
-
|
|
2730
|
+
onConnected(): void;
|
|
2809
2731
|
/**
|
|
2810
|
-
*
|
|
2732
|
+
* 连接中止,SDK 内部会进行重连
|
|
2733
|
+
* @param code 中止原因
|
|
2811
2734
|
*/
|
|
2812
|
-
|
|
2735
|
+
onSuspend(code: ErrorCode): void;
|
|
2813
2736
|
/**
|
|
2814
|
-
*
|
|
2737
|
+
* 连接中
|
|
2815
2738
|
*/
|
|
2816
|
-
|
|
2739
|
+
onConnecting(): void;
|
|
2817
2740
|
/**
|
|
2818
|
-
*
|
|
2741
|
+
* 连接已终止
|
|
2742
|
+
* @param code 连接终止原因
|
|
2819
2743
|
*/
|
|
2820
|
-
|
|
2744
|
+
onDisconnected(code: ErrorCode): void;
|
|
2745
|
+
}
|
|
2746
|
+
/**
|
|
2747
|
+
* 抽象连接管理器类,负责 engine 层的连接状态维持,和对外的连接状态通知
|
|
2748
|
+
*/
|
|
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);
|
|
2821
2755
|
/**
|
|
2822
|
-
*
|
|
2756
|
+
* 当前连接所用 token
|
|
2823
2757
|
*/
|
|
2824
|
-
|
|
2758
|
+
private token;
|
|
2825
2759
|
/**
|
|
2826
|
-
*
|
|
2760
|
+
* 获取当前连接中使用的 token
|
|
2761
|
+
* @returns
|
|
2827
2762
|
*/
|
|
2828
|
-
|
|
2763
|
+
getToken(): string;
|
|
2764
|
+
private reconnectKick;
|
|
2829
2765
|
/**
|
|
2830
|
-
*
|
|
2766
|
+
* 当前连接状态
|
|
2831
2767
|
*/
|
|
2832
|
-
|
|
2768
|
+
private _crtConnectionStatus;
|
|
2833
2769
|
/**
|
|
2834
|
-
*
|
|
2770
|
+
* 当前用户 ID
|
|
2835
2771
|
*/
|
|
2836
|
-
|
|
2772
|
+
protected _crtUserId: string;
|
|
2837
2773
|
/**
|
|
2838
|
-
*
|
|
2774
|
+
* 获取当前用户 ID
|
|
2775
|
+
* @returns
|
|
2839
2776
|
*/
|
|
2840
|
-
|
|
2777
|
+
getCurrentUserId(): string;
|
|
2841
2778
|
/**
|
|
2842
|
-
*
|
|
2779
|
+
* 缓存的 cmp 权重
|
|
2780
|
+
* disconnect 时重置
|
|
2843
2781
|
*/
|
|
2844
|
-
|
|
2782
|
+
private cmpWeightCache?;
|
|
2845
2783
|
/**
|
|
2846
|
-
*
|
|
2784
|
+
* 修改连接状态
|
|
2785
|
+
* @param status
|
|
2786
|
+
* @param code
|
|
2847
2787
|
*/
|
|
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> {
|
|
2788
|
+
private setConnectionStatus;
|
|
2898
2789
|
/**
|
|
2899
|
-
*
|
|
2790
|
+
* 获取当前连接状态
|
|
2791
|
+
* @returns
|
|
2900
2792
|
*/
|
|
2901
|
-
|
|
2793
|
+
getConnectionStatus(): RCConnectionStatus;
|
|
2902
2794
|
/**
|
|
2903
|
-
*
|
|
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 重连的时候发现此时已有别的设备连接成功,不再强行踢出已有设备,而是踢出重连设备。
|
|
2904
2805
|
*/
|
|
2905
|
-
|
|
2806
|
+
connect(token: string, reconnectKickEnable: boolean, traceId: string): IPromiseResult<string>;
|
|
2906
2807
|
/**
|
|
2907
|
-
*
|
|
2808
|
+
* 执行中的连接事务
|
|
2908
2809
|
*/
|
|
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 {
|
|
2810
|
+
private _crtConnectionTask;
|
|
2918
2811
|
/**
|
|
2919
|
-
*
|
|
2812
|
+
* 尝试建立连接
|
|
2813
|
+
* @param token
|
|
2814
|
+
* @param reconnectKickEnable
|
|
2815
|
+
* @param ignoreNaviCache
|
|
2816
|
+
* @param traceId
|
|
2817
|
+
* @description 函数会检测当前是否有进行中的连接任务,若存在,则直接返回当前连接任务
|
|
2920
2818
|
*/
|
|
2921
|
-
|
|
2819
|
+
private try2Connect;
|
|
2922
2820
|
/**
|
|
2923
|
-
*
|
|
2821
|
+
* 创建连接任务
|
|
2822
|
+
* @param token
|
|
2823
|
+
* @param reconnectKickEnable
|
|
2824
|
+
* @param ignoreNaviCache
|
|
2825
|
+
* @param traceId
|
|
2826
|
+
* @returns
|
|
2924
2827
|
*/
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
/**
|
|
2929
|
-
* 代理信息
|
|
2930
|
-
*/
|
|
2931
|
-
interface IProxy {
|
|
2932
|
-
socksHost: string;
|
|
2933
|
-
socksPort: number;
|
|
2934
|
-
socksUsername?: string;
|
|
2935
|
-
socksPassword?: string;
|
|
2936
|
-
}
|
|
2937
|
-
|
|
2938
|
-
declare enum HttpMethod {
|
|
2939
|
-
GET = "GET",
|
|
2940
|
-
POST = "POST"
|
|
2941
|
-
}
|
|
2942
|
-
interface IRequest {
|
|
2943
|
-
url: string;
|
|
2828
|
+
private createConnectionTask;
|
|
2829
|
+
private reconnectTimer;
|
|
2944
2830
|
/**
|
|
2945
|
-
*
|
|
2831
|
+
* 尝试重连
|
|
2832
|
+
* @param ignoreNaviCache 是否忽略 navi 缓存以重新请求 navi
|
|
2946
2833
|
*/
|
|
2947
|
-
|
|
2834
|
+
private try2Reconnect;
|
|
2948
2835
|
/**
|
|
2949
|
-
*
|
|
2836
|
+
* 服务器主动断开时由子类调用,函数将根据 reason 确定是否尝试重连
|
|
2837
|
+
* @param reason
|
|
2950
2838
|
*/
|
|
2951
|
-
|
|
2952
|
-
[key: string]: string | number | null;
|
|
2953
|
-
};
|
|
2839
|
+
protected onDisconnectByServer(code: ErrorCode): void;
|
|
2954
2840
|
/**
|
|
2955
|
-
*
|
|
2841
|
+
* Socket 异常中断时由子类调用,SDK 尝试恢复重连
|
|
2956
2842
|
*/
|
|
2957
|
-
|
|
2958
|
-
[key: string]: string;
|
|
2959
|
-
};
|
|
2843
|
+
protected onDisconenctUnusual(code: ErrorCode): void;
|
|
2960
2844
|
/**
|
|
2961
|
-
*
|
|
2845
|
+
* 建立 Socket 连接,由子类集成实现
|
|
2846
|
+
* @param token
|
|
2847
|
+
* @param naviInfo
|
|
2848
|
+
* @param reconnectKickEnable
|
|
2849
|
+
* @param traceId
|
|
2962
2850
|
*/
|
|
2963
|
-
|
|
2851
|
+
protected abstract connectWithToken(token: string, naviInfo: INaviInfo, reconnectKickEnable: boolean, traceId: string): IPromiseResult<string>;
|
|
2964
2852
|
/**
|
|
2965
|
-
*
|
|
2853
|
+
* 当前累计心跳超时次数
|
|
2966
2854
|
*/
|
|
2967
|
-
|
|
2855
|
+
private _failedCount;
|
|
2968
2856
|
/**
|
|
2969
|
-
*
|
|
2970
|
-
* 期望返回的数据格式,如果为 json 则返回后会对返回的数据进行一次 JSON.parse
|
|
2857
|
+
* 允许连续 PING 超时次数,超出指定次数后会主动关闭 socket 并重新连接
|
|
2971
2858
|
*/
|
|
2972
|
-
|
|
2859
|
+
private readonly ALLOW_FAILED_TIMES;
|
|
2973
2860
|
/**
|
|
2974
|
-
*
|
|
2861
|
+
* 启动心跳计时器
|
|
2975
2862
|
*/
|
|
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;
|
|
2863
|
+
private checkAlive;
|
|
3002
2864
|
/**
|
|
3003
|
-
*
|
|
3004
|
-
* @param
|
|
2865
|
+
* 关闭连接
|
|
2866
|
+
* @param inReconnect
|
|
3005
2867
|
*/
|
|
3006
|
-
|
|
2868
|
+
protected abstract close(inReconnect: boolean, closeDB?: boolean): void;
|
|
3007
2869
|
/**
|
|
3008
|
-
*
|
|
3009
|
-
* @param
|
|
2870
|
+
* 完成一次 ping 过程,并返回响应状态码
|
|
2871
|
+
* @param timeout 超时时间
|
|
3010
2872
|
*/
|
|
3011
|
-
|
|
2873
|
+
protected abstract sendPing(timeout: number): Promise<ErrorCode>;
|
|
3012
2874
|
/**
|
|
3013
|
-
*
|
|
3014
|
-
* @param callback
|
|
2875
|
+
* 业务层主动断开连接时调用
|
|
3015
2876
|
*/
|
|
3016
|
-
|
|
2877
|
+
disconnect(closeDB?: boolean): Promise<void>;
|
|
3017
2878
|
/**
|
|
3018
|
-
*
|
|
3019
|
-
* @param callback
|
|
2879
|
+
* 清理重连计时器
|
|
3020
2880
|
*/
|
|
3021
|
-
|
|
2881
|
+
private stopReconnectTimer;
|
|
3022
2882
|
/**
|
|
3023
|
-
*
|
|
3024
|
-
* @param data
|
|
2883
|
+
* 获取 CMP 列表
|
|
3025
2884
|
*/
|
|
3026
|
-
|
|
2885
|
+
protected getCmpList(navi: INaviInfo, isTcp?: boolean): ICmpData[];
|
|
3027
2886
|
/**
|
|
3028
|
-
*
|
|
3029
|
-
* @param code
|
|
3030
|
-
* @param reason
|
|
2887
|
+
* 修改 CMP 权重
|
|
3031
2888
|
*/
|
|
3032
|
-
|
|
2889
|
+
protected updateCmpWeight(cmpUrl: string, isRise?: boolean): void;
|
|
2890
|
+
private clearCmpWeightCache;
|
|
3033
2891
|
}
|
|
2892
|
+
|
|
3034
2893
|
/**
|
|
3035
|
-
*
|
|
2894
|
+
* 查询错误码是否为服务下发的 disconnect 通知 status 所转换
|
|
2895
|
+
* @param code
|
|
2896
|
+
* @description 排除重定向 31006,因 disconnect 和 connAck 都包含元素可被转换为 31006
|
|
3036
2897
|
*/
|
|
3037
|
-
|
|
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;
|
|
2905
|
+
|
|
2906
|
+
/**
|
|
2907
|
+
* 进程内缓存数据
|
|
2908
|
+
*/
|
|
2909
|
+
interface IProcessCache {
|
|
2910
|
+
crtUserId: string;
|
|
2911
|
+
connectedTime: number;
|
|
2912
|
+
naviInfo: INaviInfo | null;
|
|
2913
|
+
connectionStatus: RCConnectionStatus;
|
|
2914
|
+
deviceId: string;
|
|
2915
|
+
}
|
|
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 {
|
|
3038
2930
|
/**
|
|
3039
|
-
*
|
|
2931
|
+
* 注册本渲染进程至主进程,以接收主进程的消息通知,同时同步主进程的当前缓存数据
|
|
3040
2932
|
*/
|
|
3041
|
-
|
|
2933
|
+
getMainProcessCache(): IProcessCache;
|
|
3042
2934
|
/**
|
|
3043
|
-
*
|
|
3044
|
-
* @param
|
|
2935
|
+
* 建立连接
|
|
2936
|
+
* @param token
|
|
2937
|
+
* @param reconnectKickEnable
|
|
3045
2938
|
*/
|
|
3046
|
-
|
|
2939
|
+
connect(token: string, reconnectKickEnable: boolean, traceId: string): IPromiseResult<string>;
|
|
2940
|
+
getNaviInfoFromCache(): INaviInfo | null;
|
|
3047
2941
|
/**
|
|
3048
|
-
*
|
|
2942
|
+
* 上报版本信息
|
|
2943
|
+
* @param version
|
|
3049
2944
|
*/
|
|
3050
|
-
|
|
2945
|
+
reportSDKInfo(version: {
|
|
2946
|
+
[name: string]: string;
|
|
2947
|
+
}): void;
|
|
3051
2948
|
/**
|
|
3052
|
-
*
|
|
2949
|
+
* 连接时间
|
|
3053
2950
|
*/
|
|
3054
|
-
|
|
2951
|
+
getConnectedTime(): number;
|
|
3055
2952
|
/**
|
|
3056
|
-
*
|
|
2953
|
+
* 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
|
|
2954
|
+
* 对于未实现的方法,接口响应 Unsupport 错误码
|
|
2955
|
+
* @param method
|
|
2956
|
+
* @param args
|
|
3057
2957
|
*/
|
|
3058
|
-
|
|
2958
|
+
callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
|
|
3059
2959
|
/**
|
|
3060
|
-
*
|
|
2960
|
+
* 获取历史消息
|
|
2961
|
+
* @param conversationType
|
|
2962
|
+
* @param targetId
|
|
2963
|
+
* @param timestamp
|
|
2964
|
+
* @param count
|
|
2965
|
+
* @param order
|
|
3061
2966
|
*/
|
|
3062
|
-
|
|
2967
|
+
getHistoryMessage(conversationType: ConversationType, targetId: string,
|
|
3063
2968
|
/**
|
|
3064
|
-
*
|
|
2969
|
+
* 拉取时间戳,值为 `0` 表示从当前时间拉取
|
|
3065
2970
|
*/
|
|
3066
|
-
|
|
2971
|
+
timestamp: number,
|
|
3067
2972
|
/**
|
|
3068
|
-
*
|
|
2973
|
+
* 获取条数, 有效值 `1` - `20`
|
|
3069
2974
|
*/
|
|
3070
|
-
|
|
2975
|
+
count: number,
|
|
3071
2976
|
/**
|
|
3072
|
-
*
|
|
3073
|
-
*
|
|
2977
|
+
* @description
|
|
2978
|
+
* 1. `0` 表示升序,获取消息发送时间比传入 `sentTime` 小 的消息
|
|
2979
|
+
* 2. `1` 表示降序,获取消息发送时间比传入 `sentTime` 大 的消息
|
|
3074
2980
|
*/
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
2981
|
+
order: 0 | 1,
|
|
2982
|
+
/**
|
|
2983
|
+
* 会话的业务标识
|
|
2984
|
+
*/
|
|
2985
|
+
channelId: string,
|
|
2986
|
+
/**
|
|
2987
|
+
* 消息类型
|
|
2988
|
+
*/
|
|
2989
|
+
objectName: string): IPromiseResult<{
|
|
2990
|
+
list: IReceivedMessage[];
|
|
2991
|
+
hasMore: boolean;
|
|
2992
|
+
}>;
|
|
2993
|
+
/**
|
|
2994
|
+
* 获取指定消息类型的历史消息
|
|
2995
|
+
*/
|
|
2996
|
+
getHistoryMessagesByObjectNames(conversationType: ConversationType, targetId: string, timestamp: number, count: number, messageTypes: string[], order: number, channelId: string): Promise<IAsyncRes<{
|
|
3084
2997
|
list: IReceivedMessage[];
|
|
3085
2998
|
hasMore: boolean;
|
|
3086
2999
|
}>>;
|
|
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 {
|
|
3119
3000
|
/**
|
|
3120
|
-
*
|
|
3001
|
+
* 删除历史消息 通过 messageUId
|
|
3121
3002
|
*/
|
|
3122
|
-
|
|
3003
|
+
deleteRemoteMessage(conversationType: ConversationType, targetId: string,
|
|
3123
3004
|
/**
|
|
3124
|
-
*
|
|
3005
|
+
* @description
|
|
3006
|
+
* message 中 messageUId、setTime、messageDirection 为必须参数
|
|
3007
|
+
*/
|
|
3008
|
+
messages: {
|
|
3009
|
+
messageUId: string;
|
|
3010
|
+
sentTime: number;
|
|
3011
|
+
messageDirection: MessageDirection;
|
|
3012
|
+
}[],
|
|
3013
|
+
/**
|
|
3014
|
+
* 会话的业务标识
|
|
3015
|
+
*/
|
|
3016
|
+
channelId: string): Promise<ErrorCode>;
|
|
3017
|
+
recallMsg(conversationType: ConversationType, targetId: string, messageUId: string, sentTime: number, recallMsgOptions: IRecallMsgOptions): IPromiseResult<IReceivedMessage>;
|
|
3018
|
+
/**
|
|
3019
|
+
* 删除历史消息 通过 时间戳
|
|
3020
|
+
* @param timestamp 小于等于传入时间戳的消息均删除
|
|
3125
3021
|
*/
|
|
3126
|
-
|
|
3022
|
+
deleteRemoteMessageByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number,
|
|
3127
3023
|
/**
|
|
3128
|
-
*
|
|
3024
|
+
* 会话的业务标识
|
|
3129
3025
|
*/
|
|
3130
|
-
|
|
3026
|
+
channelId: string): Promise<ErrorCode>;
|
|
3131
3027
|
/**
|
|
3132
|
-
*
|
|
3133
|
-
* @
|
|
3028
|
+
* 获取会话列表
|
|
3029
|
+
* @param count 指定获取数量, 不传则获取全部会话列表,默认 `300`
|
|
3134
3030
|
*/
|
|
3135
|
-
|
|
3031
|
+
getConversationList(
|
|
3136
3032
|
/**
|
|
3137
|
-
*
|
|
3033
|
+
* 拉取数量, 有效值 0 - 1000, 默认 300
|
|
3138
3034
|
*/
|
|
3139
|
-
|
|
3035
|
+
count: number,
|
|
3140
3036
|
/**
|
|
3141
|
-
*
|
|
3142
|
-
* @
|
|
3143
|
-
* @note 在 V2 版本废弃
|
|
3037
|
+
* 会话类型
|
|
3038
|
+
* @todo 待确认是否生效
|
|
3144
3039
|
*/
|
|
3145
|
-
|
|
3040
|
+
conversationType?: ConversationType,
|
|
3146
3041
|
/**
|
|
3147
|
-
*
|
|
3148
|
-
* @example a.domain.com:443,b.domain.com:443
|
|
3149
|
-
* @note 在 V2 版本废弃
|
|
3042
|
+
* 起始时间
|
|
3150
3043
|
*/
|
|
3151
|
-
|
|
3044
|
+
startTime?: number,
|
|
3152
3045
|
/**
|
|
3153
|
-
*
|
|
3154
|
-
* @note 在 V2 版本废弃
|
|
3046
|
+
* 获取顺序
|
|
3155
3047
|
*/
|
|
3156
|
-
|
|
3048
|
+
order?: 0 | 1,
|
|
3157
3049
|
/**
|
|
3158
|
-
*
|
|
3159
|
-
* 1. 公有云未开通音视频时,值为 null
|
|
3160
|
-
* 2. 私有云无配置时为 `{ "strategy": 0 }`
|
|
3050
|
+
* 会话的业务标识
|
|
3161
3051
|
*/
|
|
3162
|
-
|
|
3052
|
+
channelId?: string): IPromiseResult<IReceivedConversation[]>;
|
|
3163
3053
|
/**
|
|
3164
|
-
*
|
|
3165
|
-
* @todo 需确认详细有效值
|
|
3166
|
-
* @description 公有云独有配置
|
|
3054
|
+
* 分页获取会话列表,仅 electron中使用
|
|
3167
3055
|
*/
|
|
3168
|
-
|
|
3056
|
+
getConversationsByPage(conversationTypes: ConversationType[], startTime: number, count: number, channelId: string): IPromiseResult<IReceivedConversation[]>;
|
|
3169
3057
|
/**
|
|
3170
|
-
*
|
|
3171
|
-
* @description 公有云独有配置
|
|
3058
|
+
* 获取指定会话
|
|
3172
3059
|
*/
|
|
3173
|
-
|
|
3060
|
+
getConversation(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IReceivedConversation | null>;
|
|
3174
3061
|
/**
|
|
3175
|
-
*
|
|
3176
|
-
* @description
|
|
3177
|
-
* 1. 公有云通过 `developer.rongcloud.cn` 管理后台 `单群聊消息云端存储` 功能开关进行配置
|
|
3178
|
-
* 2. 私有云默认为 `true`
|
|
3062
|
+
* 获取未读会话列表
|
|
3179
3063
|
*/
|
|
3180
|
-
|
|
3064
|
+
getUnreadConversationList(conversationTypes: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
3181
3065
|
/**
|
|
3182
|
-
*
|
|
3183
|
-
* @description
|
|
3184
|
-
*
|
|
3185
|
-
*
|
|
3066
|
+
* 删除会话
|
|
3067
|
+
* @description 该删除操作会删除服务器端存储的会话数据
|
|
3068
|
+
* @param conversationType
|
|
3069
|
+
* @param targetId
|
|
3186
3070
|
*/
|
|
3187
|
-
|
|
3071
|
+
removeConversation(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
|
|
3188
3072
|
/**
|
|
3189
|
-
*
|
|
3190
|
-
* @
|
|
3191
|
-
*
|
|
3192
|
-
*
|
|
3193
|
-
* @note 在 V2 版本废弃
|
|
3073
|
+
* 获取所有会话未读数
|
|
3074
|
+
* @param channelId 多组织 Id
|
|
3075
|
+
* @param conversationTypes
|
|
3076
|
+
* @param includeMuted 包含已设置免打扰的会话
|
|
3194
3077
|
*/
|
|
3195
|
-
|
|
3078
|
+
getAllConversationUnreadCount(channelId: string, conversationTypes: ConversationType[], includeMuted: boolean): IPromiseResult<number>;
|
|
3196
3079
|
/**
|
|
3197
|
-
*
|
|
3080
|
+
* 获取指定会话未读数
|
|
3198
3081
|
*/
|
|
3199
|
-
|
|
3082
|
+
getConversationUnreadCount(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<number>;
|
|
3200
3083
|
/**
|
|
3201
|
-
*
|
|
3202
|
-
* @todo 需确认有效值及作用
|
|
3084
|
+
* 清除指定会话未读数
|
|
3203
3085
|
*/
|
|
3204
|
-
|
|
3086
|
+
clearConversationUnreadCount(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
|
|
3205
3087
|
/**
|
|
3206
|
-
*
|
|
3088
|
+
* 获取第一个未读消息
|
|
3207
3089
|
*/
|
|
3208
|
-
|
|
3090
|
+
getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IReceivedMessage | null>;
|
|
3209
3091
|
/**
|
|
3210
|
-
*
|
|
3092
|
+
* 按msgUids打量获取消息
|
|
3211
3093
|
*/
|
|
3212
|
-
|
|
3094
|
+
getMessageByMsgUids(targetId: string, channelId: string, conversationType: ConversationType, msgUids: string[]): IReceivedMessage[];
|
|
3213
3095
|
/**
|
|
3214
|
-
*
|
|
3215
|
-
* @
|
|
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 需确认公有云与私有云区别
|
|
3096
|
+
* 设置/保存指定会话消息草稿
|
|
3097
|
+
* @draft 草稿内容
|
|
3226
3098
|
*/
|
|
3227
|
-
|
|
3099
|
+
saveConversationMessageDraft(conversationType: ConversationType, targetId: string, draft: string, channelId: string): Promise<ErrorCode>;
|
|
3228
3100
|
/**
|
|
3229
|
-
*
|
|
3101
|
+
* 获取指定会话消息草稿
|
|
3230
3102
|
*/
|
|
3231
|
-
|
|
3103
|
+
getConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<string>;
|
|
3232
3104
|
/**
|
|
3233
|
-
*
|
|
3234
|
-
* @description 公有云独有配合
|
|
3105
|
+
* 清除指定会话消息草稿
|
|
3235
3106
|
*/
|
|
3236
|
-
|
|
3107
|
+
clearConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
|
|
3237
3108
|
/**
|
|
3238
|
-
*
|
|
3239
|
-
* @todo
|
|
3240
|
-
* 1. 确定其控制的功能
|
|
3241
|
-
* 2. 确定 web 相关性
|
|
3242
|
-
* @note 在 V2 版本废弃
|
|
3109
|
+
* 从服务端拉取会话状态
|
|
3243
3110
|
*/
|
|
3244
|
-
|
|
3111
|
+
pullConversationStatus(timestamp: number): Promise<IAsyncRes<IServerConversationStatus[]>>;
|
|
3245
3112
|
/**
|
|
3246
|
-
*
|
|
3113
|
+
* 批量设置会话 置顶、免打扰
|
|
3247
3114
|
*/
|
|
3248
|
-
|
|
3115
|
+
batchSetConversationStatus(statusList: ISetConversationStatusOptions[]): Promise<ErrorCode>;
|
|
3116
|
+
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void, traceId?: string): IPromiseResult<IReceivedMessage>;
|
|
3249
3117
|
/**
|
|
3250
|
-
*
|
|
3251
|
-
* @description 公有云字段,即私有云配置中的 `uploadVideoTimeLimit`
|
|
3118
|
+
* 断开连接
|
|
3252
3119
|
*/
|
|
3253
|
-
|
|
3120
|
+
disconnect(closeDB?: boolean): void;
|
|
3254
3121
|
/**
|
|
3255
|
-
*
|
|
3256
|
-
* @description 私有云字段,即公有云配置中的 `videoTimes`
|
|
3122
|
+
* 拉取用户级配置数据
|
|
3257
3123
|
*/
|
|
3258
|
-
|
|
3124
|
+
pullUserSettings(version: number): IPromiseResult<IServerUserSetting>;
|
|
3259
3125
|
/**
|
|
3260
|
-
*
|
|
3126
|
+
* 消息注册
|
|
3127
|
+
* @description
|
|
3128
|
+
* 消息注册需在应用初始化完成前进行,否则在搭配 C++ 协议栈使用时,
|
|
3129
|
+
* 本端发出的消息将不默认作为未知消息处理,不存储、不计数
|
|
3130
|
+
* @param objectName 消息类型,如:RC:TxtMsg
|
|
3131
|
+
* @param isPersited 是否存储
|
|
3132
|
+
* @param isCounted 是否技术
|
|
3133
|
+
* @param searchProps 搜索字段,只在搭配协议栈使用时有效
|
|
3134
|
+
* @param isStatusMessage 是否是状态消息
|
|
3261
3135
|
*/
|
|
3262
|
-
|
|
3136
|
+
registerMessageType(objectName: string, isPersited: boolean, isCounted: boolean, searchProps: string[], isStatusMessage: boolean): void;
|
|
3263
3137
|
/**
|
|
3264
|
-
*
|
|
3265
|
-
* @
|
|
3266
|
-
* "url": "logcollection.ronghub.com", // 上传地址
|
|
3267
|
-
* "level": 1, // 日志等级
|
|
3268
|
-
* "itv": 6, // 上传频率,即时间间隔,单位 s
|
|
3269
|
-
* "times": 5 // 重试次数?
|
|
3270
|
-
* }'`
|
|
3138
|
+
* 加入聊天室
|
|
3139
|
+
* @param count 拉取消息数量
|
|
3271
3140
|
*/
|
|
3272
|
-
|
|
3141
|
+
joinChatroom(chatroomId: string, count: number): Promise<ErrorCode>;
|
|
3273
3142
|
/**
|
|
3274
|
-
*
|
|
3275
|
-
* @
|
|
3276
|
-
* @example `gz.bcebos.com`
|
|
3277
|
-
* @deprecated 已废弃
|
|
3143
|
+
* 加入已存在的聊天室
|
|
3144
|
+
* @param count 拉取消息数量
|
|
3278
3145
|
*/
|
|
3279
|
-
|
|
3146
|
+
joinExistChatroom(chatroomId: string, count: number): Promise<ErrorCode>;
|
|
3280
3147
|
/**
|
|
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
|
-
* ```
|
|
3148
|
+
* 退出聊天室
|
|
3288
3149
|
*/
|
|
3289
|
-
|
|
3150
|
+
quitChatroom(chatroomId: string): Promise<ErrorCode>;
|
|
3290
3151
|
/**
|
|
3291
|
-
*
|
|
3152
|
+
* 获取聊天室信息
|
|
3153
|
+
* @param count 获取人数, 范围 0 - 20
|
|
3154
|
+
* @param order 排序方式, 1 正序, 2 倒序
|
|
3292
3155
|
*/
|
|
3293
|
-
|
|
3156
|
+
getChatroomInfo(chatroomId: string, count: number, order: number): IPromiseResult<IChatroomInfo>;
|
|
3294
3157
|
/**
|
|
3295
|
-
*
|
|
3158
|
+
* 获取聊天室历史消息
|
|
3296
3159
|
*/
|
|
3297
|
-
|
|
3160
|
+
getChatroomHistoryMessages(chatroomId: string, timestamp: number, count: number, order: number): IPromiseResult<{
|
|
3161
|
+
list: IReceivedMessage[];
|
|
3162
|
+
hasMore: boolean;
|
|
3163
|
+
}>;
|
|
3298
3164
|
/**
|
|
3299
|
-
*
|
|
3165
|
+
* 设置聊天室属性
|
|
3300
3166
|
*/
|
|
3301
|
-
|
|
3167
|
+
setChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
|
|
3302
3168
|
/**
|
|
3303
|
-
*
|
|
3169
|
+
* 批量设置聊天室属性
|
|
3304
3170
|
*/
|
|
3305
|
-
|
|
3171
|
+
setChatroomEntries(chatroomId: string, entry: IChrmKVEntries): Promise<{
|
|
3172
|
+
code: ErrorCode;
|
|
3173
|
+
data?: any;
|
|
3174
|
+
}>;
|
|
3306
3175
|
/**
|
|
3307
|
-
*
|
|
3176
|
+
* 强制设置聊天室属性
|
|
3308
3177
|
*/
|
|
3309
|
-
|
|
3178
|
+
forceSetChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
|
|
3310
3179
|
/**
|
|
3311
|
-
*
|
|
3180
|
+
* 删除聊天室属性
|
|
3312
3181
|
*/
|
|
3313
|
-
|
|
3182
|
+
removeChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
|
|
3314
3183
|
/**
|
|
3315
|
-
*
|
|
3184
|
+
* 批量删除聊天室属性
|
|
3316
3185
|
*/
|
|
3317
|
-
|
|
3186
|
+
removeChatroomEntries(chatroomId: string, entries: IChrmKVEntries): Promise<{
|
|
3187
|
+
code: ErrorCode;
|
|
3188
|
+
data?: any;
|
|
3189
|
+
}>;
|
|
3318
3190
|
/**
|
|
3319
|
-
*
|
|
3191
|
+
* 强制删除聊天室属性
|
|
3320
3192
|
*/
|
|
3321
|
-
|
|
3193
|
+
forceRemoveChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
|
|
3322
3194
|
/**
|
|
3323
|
-
*
|
|
3324
|
-
* @deprecated 已废弃
|
|
3195
|
+
* 获取聊天室 key 对应 value
|
|
3325
3196
|
*/
|
|
3326
|
-
|
|
3197
|
+
getChatroomEntry(chatroomId: string, key: string): IPromiseResult<string | null>;
|
|
3327
3198
|
/**
|
|
3328
|
-
*
|
|
3329
|
-
* @deprecated 已废弃
|
|
3199
|
+
* 获取聊天室所有 key value
|
|
3330
3200
|
*/
|
|
3331
|
-
|
|
3201
|
+
getAllChatroomEntry(chatroomId: string): IPromiseResult<{
|
|
3202
|
+
[key: string]: string;
|
|
3203
|
+
}>;
|
|
3332
3204
|
/**
|
|
3333
|
-
*
|
|
3334
|
-
* @
|
|
3205
|
+
* 获取上传认证信息
|
|
3206
|
+
* @description
|
|
3207
|
+
* 若不传 fileName 百度上传认证字段(bosToken、bosDate、path)均返回 null
|
|
3335
3208
|
*/
|
|
3336
|
-
|
|
3209
|
+
getFileToken(fileType: FileType, fileName?: string, httpMethod?: string, queryUriString?: string): Promise<IAsyncRes<IUploadAuth>>;
|
|
3337
3210
|
/**
|
|
3338
|
-
*
|
|
3211
|
+
* 获取文件上传后下载地址
|
|
3339
3212
|
*/
|
|
3340
|
-
|
|
3213
|
+
getFileUrl(fileType: FileType, uploadMethod: UploadMethod, fileName?: string, originName?: string): IPromiseResult<{
|
|
3214
|
+
downloadUrl: string;
|
|
3215
|
+
}>;
|
|
3341
3216
|
/**
|
|
3342
|
-
*
|
|
3217
|
+
* 创建标签
|
|
3218
|
+
* @param tag 标签
|
|
3343
3219
|
*/
|
|
3344
|
-
|
|
3220
|
+
createTag(tag: ITagParam): IPromiseResult;
|
|
3345
3221
|
/**
|
|
3346
|
-
*
|
|
3222
|
+
* 删除标签
|
|
3223
|
+
* @param tagId 标签id
|
|
3347
3224
|
*/
|
|
3348
|
-
|
|
3225
|
+
removeTag(tagId: string): IPromiseResult;
|
|
3349
3226
|
/**
|
|
3350
|
-
*
|
|
3227
|
+
* 编辑标签
|
|
3228
|
+
* @param tag 标签
|
|
3351
3229
|
*/
|
|
3352
|
-
|
|
3230
|
+
updateTag(tag: ITagParam): IPromiseResult;
|
|
3353
3231
|
/**
|
|
3354
|
-
*
|
|
3232
|
+
* 获取标签列表
|
|
3355
3233
|
*/
|
|
3356
|
-
|
|
3234
|
+
getTagList(): IPromiseResult<Array<ITagInfo>>;
|
|
3357
3235
|
/**
|
|
3358
|
-
*
|
|
3359
|
-
*
|
|
3236
|
+
* 添加会话到标签(给多个会话增加标签)
|
|
3237
|
+
* @param tagId 标签id
|
|
3238
|
+
* @param conversations 要添加的会话列表
|
|
3360
3239
|
*/
|
|
3361
|
-
|
|
3240
|
+
addTagForConversations(tagId: string, conversations: IConversationOption[]): IPromiseResult;
|
|
3362
3241
|
/**
|
|
3363
|
-
*
|
|
3364
|
-
*
|
|
3242
|
+
* 删除标签中的会话(从多个会话中批量删除指定标签)
|
|
3243
|
+
* @param tagId 标签id
|
|
3244
|
+
* @param conversations 要删除的会话列表
|
|
3365
3245
|
*/
|
|
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;
|
|
3246
|
+
removeTagForConversations(tagId: string, conversations: IConversationOption[]): IPromiseResult;
|
|
3380
3247
|
/**
|
|
3381
|
-
*
|
|
3248
|
+
* 删除会话中的标签(从单一会话中批量删除标签)
|
|
3249
|
+
* @param conversationType 会话类型
|
|
3250
|
+
* @param targetId 会话id
|
|
3251
|
+
* @param tagIds 要删除的标签列表
|
|
3382
3252
|
*/
|
|
3383
|
-
|
|
3384
|
-
constructor(appkey: string, logger: BasicLogger,
|
|
3253
|
+
removeTagsForConversation(conversation: IConversationOption, tagIds: string[]): IPromiseResult;
|
|
3385
3254
|
/**
|
|
3386
|
-
*
|
|
3255
|
+
* 获取标签下的会话列表
|
|
3256
|
+
* @param tagId 标签id
|
|
3387
3257
|
*/
|
|
3388
|
-
|
|
3258
|
+
getConversationListByTag(tagId: string, startTime: number, count?: number, channelId?: string): IPromiseResult<IReceivedConversationByTag[]>;
|
|
3389
3259
|
/**
|
|
3390
|
-
*
|
|
3260
|
+
* 获取标签下的未读消息数
|
|
3261
|
+
* @param tagId 标签id
|
|
3262
|
+
* @param containMuted 是否包含免打扰会话
|
|
3391
3263
|
*/
|
|
3392
|
-
|
|
3264
|
+
getUnreadCountByTag(tagId: string, containMuted: boolean): IPromiseResult<number>;
|
|
3393
3265
|
/**
|
|
3394
|
-
*
|
|
3395
|
-
* @param
|
|
3396
|
-
* @param ignoreCache 是否忽略缓存,强制从服务器重新拉取。
|
|
3397
|
-
* @param ignoreExpire 是否忽略有效期检查。理论上只需要在建立连接时需要检测 navi 有效期,其他场景无需检测
|
|
3398
|
-
* @param traceId 事务日志跟踪 ID
|
|
3266
|
+
* 设置标签中会话置顶
|
|
3267
|
+
* @param conversation 会话
|
|
3399
3268
|
*/
|
|
3400
|
-
|
|
3401
|
-
private sendRequest;
|
|
3269
|
+
setConversationStatusInTag(tagId: string, conversation: IConversationOption, status: ITagStatus): IPromiseResult;
|
|
3402
3270
|
/**
|
|
3403
|
-
*
|
|
3404
|
-
* @param
|
|
3405
|
-
* @param token
|
|
3406
|
-
* @param traceId
|
|
3271
|
+
* 获取会话里的标签
|
|
3272
|
+
* @param config
|
|
3407
3273
|
*/
|
|
3408
|
-
|
|
3274
|
+
getTagsForConversation(conversation: IConversationOption): IPromiseResult<IConversationTag[]>;
|
|
3409
3275
|
/**
|
|
3410
|
-
*
|
|
3411
|
-
*
|
|
3412
|
-
* @param appkey
|
|
3413
|
-
* @param token
|
|
3414
|
-
* @param version
|
|
3415
|
-
* @param timeout 请求超时时间
|
|
3416
|
-
* @param traceId
|
|
3276
|
+
* 发送群组消息已读回执
|
|
3277
|
+
* 导航下发已读回执开关为 true 时调用
|
|
3417
3278
|
*/
|
|
3418
|
-
|
|
3279
|
+
sendReadReceiptMessage(targetId: string, messageUIds: string[], channelId?: string): Promise<IAsyncRes>;
|
|
3419
3280
|
/**
|
|
3420
|
-
*
|
|
3421
|
-
* @param uri 导航服务地址
|
|
3422
|
-
* @param appkey
|
|
3423
|
-
* @param token
|
|
3424
|
-
* @param version
|
|
3425
|
-
* @param timeout 请求超时时间
|
|
3426
|
-
* @param traceId
|
|
3281
|
+
* 获取群组消息已读列表
|
|
3427
3282
|
*/
|
|
3428
|
-
|
|
3283
|
+
getMessageReader(targetId: string, messageUId: string, channelId?: string): IPromiseResult<IMessageReaderResponse>;
|
|
3429
3284
|
/**
|
|
3430
|
-
*
|
|
3431
|
-
* @param code
|
|
3285
|
+
* 设置群组消息已读
|
|
3432
3286
|
*/
|
|
3433
|
-
|
|
3287
|
+
setReadMessages(targetId: string, channelId: string, beginMessageUId: string, endMessageUId: string): Promise<IAsyncRes>;
|
|
3434
3288
|
/**
|
|
3435
|
-
*
|
|
3436
|
-
* @param formatedToken
|
|
3437
|
-
* @param naviInfo
|
|
3438
|
-
* @description 设置缓存的同时会检测缓存中的既有数据,适当清理,避免无效数据长时间占用存储空间
|
|
3289
|
+
* 获取群组消息已读回执信息
|
|
3439
3290
|
*/
|
|
3440
|
-
|
|
3291
|
+
getMessageReceiptInfo(targetId: string, messageUId: string, channelId?: string): IPromiseResult<IMessageReaderResponse>;
|
|
3441
3292
|
/**
|
|
3442
|
-
*
|
|
3443
|
-
* @param formatedToken
|
|
3293
|
+
* 获取服务器时间
|
|
3444
3294
|
*/
|
|
3445
|
-
|
|
3295
|
+
getServerTime(): number;
|
|
3446
3296
|
/**
|
|
3447
|
-
*
|
|
3448
|
-
* @param token
|
|
3297
|
+
* 获取设备ID
|
|
3449
3298
|
*/
|
|
3450
|
-
|
|
3299
|
+
getDeviceId(): string;
|
|
3451
3300
|
/**
|
|
3452
|
-
*
|
|
3453
|
-
* @param token
|
|
3454
|
-
* @param voipCallInfo
|
|
3301
|
+
* 获取当前 userId
|
|
3455
3302
|
*/
|
|
3456
|
-
|
|
3457
|
-
|
|
3303
|
+
getCurrentUserId(): string;
|
|
3304
|
+
getConversationListWithAllChannel(): IPromiseResult<IReceivedConversation[]>;
|
|
3305
|
+
getConversationListWithAllChannelByPage(index: number, limit: number): IPromiseResult<IReceivedConversation[]>;
|
|
3458
3306
|
/**
|
|
3459
|
-
*
|
|
3460
|
-
* 仅私有云 rcx 使用 v1 版本
|
|
3307
|
+
* 设置用户在线状态监听器
|
|
3461
3308
|
*/
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
/**
|
|
3466
|
-
* Websocket 导航工具类
|
|
3467
|
-
*/
|
|
3468
|
-
declare class WebSocketNavi extends BasicNavi {
|
|
3469
|
-
private runtime;
|
|
3309
|
+
setUserStatusListener(config: {
|
|
3310
|
+
userIds: string[];
|
|
3311
|
+
}, listener: Function): void;
|
|
3470
3312
|
/**
|
|
3471
|
-
*
|
|
3313
|
+
* 设置当前用户在线状态
|
|
3472
3314
|
*/
|
|
3473
|
-
|
|
3474
|
-
constructor(appkey: string, logger: BasicLogger, runtime: IRuntime,
|
|
3315
|
+
setUserStatus(status: number): Promise<ErrorCode>;
|
|
3475
3316
|
/**
|
|
3476
|
-
*
|
|
3317
|
+
* 订阅用户在线状态
|
|
3477
3318
|
*/
|
|
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 {
|
|
3319
|
+
subscribeUserStatus(userIds: string[]): Promise<ErrorCode>;
|
|
3579
3320
|
/**
|
|
3580
|
-
*
|
|
3321
|
+
* 获取用户状态
|
|
3581
3322
|
*/
|
|
3582
|
-
|
|
3323
|
+
getUserStatus(userId: string): IPromiseResult<{
|
|
3324
|
+
status: string;
|
|
3325
|
+
}>;
|
|
3583
3326
|
/**
|
|
3584
|
-
*
|
|
3327
|
+
* 清空所有会话
|
|
3585
3328
|
*/
|
|
3586
|
-
|
|
3329
|
+
clearConversations(conversationTypes?: ConversationType[], channelId?: string): Promise<ErrorCode>;
|
|
3587
3330
|
/**
|
|
3588
|
-
*
|
|
3331
|
+
* 加入黑名单
|
|
3589
3332
|
*/
|
|
3590
|
-
|
|
3333
|
+
addToBlacklist(userId: string): Promise<ErrorCode>;
|
|
3591
3334
|
/**
|
|
3592
|
-
*
|
|
3335
|
+
* 将指定用户移除黑名单
|
|
3593
3336
|
*/
|
|
3594
|
-
|
|
3595
|
-
}
|
|
3596
|
-
interface IConnectionListener {
|
|
3337
|
+
removeFromBlacklist(userId: string): Promise<ErrorCode>;
|
|
3597
3338
|
/**
|
|
3598
|
-
*
|
|
3339
|
+
* 获取黑名单列表
|
|
3599
3340
|
*/
|
|
3600
|
-
|
|
3341
|
+
getBlacklist(): IPromiseResult<string[]>;
|
|
3601
3342
|
/**
|
|
3602
|
-
*
|
|
3603
|
-
* @param code 中止原因
|
|
3343
|
+
* 获取指定人员在黑名单中的状态
|
|
3604
3344
|
*/
|
|
3605
|
-
|
|
3345
|
+
getBlacklistStatus(userId: string): IPromiseResult<number>;
|
|
3606
3346
|
/**
|
|
3607
|
-
*
|
|
3347
|
+
* 向本地插入一条消息,不发送到服务器
|
|
3608
3348
|
*/
|
|
3609
|
-
|
|
3349
|
+
insertMessage(conversationType: ConversationType, targetId: string, insertOptions: IInsertMsgOptions): IPromiseResult<IReceivedMessage>;
|
|
3610
3350
|
/**
|
|
3611
|
-
*
|
|
3612
|
-
* @param code 连接终止原因
|
|
3351
|
+
* 删除本地消息
|
|
3613
3352
|
*/
|
|
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);
|
|
3353
|
+
deleteMessages(messageIds: number[]): Promise<ErrorCode>;
|
|
3625
3354
|
/**
|
|
3626
|
-
*
|
|
3355
|
+
* 通过时间戳删除本地消息
|
|
3627
3356
|
*/
|
|
3628
|
-
|
|
3357
|
+
deleteMessagesByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, cleanSpace: boolean, channelId: string): Promise<ErrorCode>;
|
|
3629
3358
|
/**
|
|
3630
|
-
*
|
|
3631
|
-
* @returns
|
|
3359
|
+
* 清空会话下历史消息
|
|
3632
3360
|
*/
|
|
3633
|
-
|
|
3634
|
-
private reconnectKick;
|
|
3361
|
+
clearMessages(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
|
|
3635
3362
|
/**
|
|
3636
|
-
*
|
|
3363
|
+
* 获取消息
|
|
3637
3364
|
*/
|
|
3638
|
-
|
|
3365
|
+
getMessage(messageId: number | string): IPromiseResult<IReceivedMessage>;
|
|
3639
3366
|
/**
|
|
3640
|
-
*
|
|
3367
|
+
* 设置消息附加信息
|
|
3641
3368
|
*/
|
|
3642
|
-
|
|
3369
|
+
setTextMessageExtra(messageId: number, content: any): Promise<ErrorCode>;
|
|
3643
3370
|
/**
|
|
3644
|
-
*
|
|
3645
|
-
* @returns
|
|
3371
|
+
* 设置消息内容
|
|
3646
3372
|
*/
|
|
3647
|
-
|
|
3373
|
+
setMessageContent(messageId: number, content: any, messageType: string): Promise<ErrorCode>;
|
|
3648
3374
|
/**
|
|
3649
|
-
*
|
|
3650
|
-
* disconnect 时重置
|
|
3375
|
+
* 设置消息搜索字段
|
|
3651
3376
|
*/
|
|
3652
|
-
|
|
3377
|
+
setMessageSearchField(messageId: number, content: any, searchFiles: string): Promise<ErrorCode>;
|
|
3653
3378
|
/**
|
|
3654
|
-
|
|
3655
|
-
* @param status
|
|
3656
|
-
* @param code
|
|
3379
|
+
* 通过关键字与 channelId 搜索所有会话
|
|
3657
3380
|
*/
|
|
3658
|
-
|
|
3381
|
+
searchConversationByContent(keyword: string, customMessageTypes: string[], channelId: string, conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
3382
|
+
searchConversationByContentWithAllChannel(keyword: string, customMessageTypes: string[], conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
3659
3383
|
/**
|
|
3660
|
-
*
|
|
3661
|
-
* @returns
|
|
3384
|
+
* 按内容搜索会话内的消息
|
|
3662
3385
|
*/
|
|
3663
|
-
|
|
3386
|
+
searchMessageByContent(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number, total: number, channelId: string): IPromiseResult<{
|
|
3387
|
+
messages: IReceivedMessage[];
|
|
3388
|
+
count: number;
|
|
3389
|
+
}>;
|
|
3664
3390
|
/**
|
|
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 重连的时候发现此时已有别的设备连接成功,不再强行踢出已有设备,而是踢出重连设备。
|
|
3391
|
+
* 按内容搜索指定会话(不区分 channelId)的消息
|
|
3675
3392
|
*/
|
|
3676
|
-
|
|
3393
|
+
searchMessageByContentWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number): IPromiseResult<{
|
|
3394
|
+
messages: IReceivedMessage[];
|
|
3395
|
+
count: number;
|
|
3396
|
+
}>;
|
|
3677
3397
|
/**
|
|
3678
|
-
|
|
3398
|
+
* 按内容搜索时间范围内指定会话(不区分 channelId)的消息
|
|
3399
|
+
*/
|
|
3400
|
+
searchMessageByContentInTimeRangeWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, startTime: number, endTime: number, offset: number, limit: number): IPromiseResult<{
|
|
3401
|
+
messages: IReceivedMessage[];
|
|
3402
|
+
}>;
|
|
3403
|
+
/**
|
|
3404
|
+
* 获取会话下所有未读的 @ 消息
|
|
3679
3405
|
*/
|
|
3680
|
-
|
|
3406
|
+
getUnreadMentionedMessages(conversationType: ConversationType, targetId: string, channelId: string): IReceivedMessage[];
|
|
3681
3407
|
/**
|
|
3682
|
-
*
|
|
3683
|
-
* @param token
|
|
3684
|
-
* @param reconnectKickEnable
|
|
3685
|
-
* @param ignoreNaviCache
|
|
3686
|
-
* @param traceId
|
|
3687
|
-
* @description 函数会检测当前是否有进行中的连接任务,若存在,则直接返回当前连接任务
|
|
3408
|
+
* 设置消息发送状态
|
|
3688
3409
|
*/
|
|
3689
|
-
|
|
3410
|
+
setMessageSentStatus(messageId: number, sentStatus: number): Promise<ErrorCode>;
|
|
3690
3411
|
/**
|
|
3691
|
-
*
|
|
3692
|
-
* @param token
|
|
3693
|
-
* @param reconnectKickEnable
|
|
3694
|
-
* @param ignoreNaviCache
|
|
3695
|
-
* @param traceId
|
|
3696
|
-
* @returns
|
|
3412
|
+
* 设置消息接收状态
|
|
3697
3413
|
*/
|
|
3698
|
-
|
|
3699
|
-
private reconnectTimer;
|
|
3414
|
+
setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<ErrorCode>;
|
|
3700
3415
|
/**
|
|
3701
|
-
*
|
|
3702
|
-
* @param ignoreNaviCache 是否忽略 navi 缓存以重新请求 navi
|
|
3416
|
+
* 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
|
|
3703
3417
|
*/
|
|
3704
|
-
|
|
3418
|
+
updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): IPromiseResult<boolean>;
|
|
3705
3419
|
/**
|
|
3706
|
-
*
|
|
3707
|
-
* @param reason
|
|
3420
|
+
* 删除时间戳前的未读数
|
|
3708
3421
|
*/
|
|
3709
|
-
|
|
3422
|
+
clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId: string): Promise<ErrorCode>;
|
|
3710
3423
|
/**
|
|
3711
|
-
*
|
|
3424
|
+
* 获取会话免打扰状态
|
|
3712
3425
|
*/
|
|
3713
|
-
|
|
3426
|
+
getConversationNotificationStatus(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<NotificationStatus>;
|
|
3714
3427
|
/**
|
|
3715
|
-
*
|
|
3716
|
-
* @param token
|
|
3717
|
-
* @param naviInfo
|
|
3718
|
-
* @param reconnectKickEnable
|
|
3719
|
-
* @param traceId
|
|
3428
|
+
* 协议栈获取远端历史消息
|
|
3720
3429
|
*/
|
|
3721
|
-
|
|
3430
|
+
getRemoteHistoryMessages(conversationType: ConversationType, targetId: string, timestamp: number, count: number, order: 0 | 1, channelId: string): IPromiseResult<{
|
|
3431
|
+
list: IReceivedMessage[];
|
|
3432
|
+
hasMore: boolean;
|
|
3433
|
+
}>;
|
|
3722
3434
|
/**
|
|
3723
|
-
*
|
|
3435
|
+
* 无差别获取本地免打扰列表
|
|
3724
3436
|
*/
|
|
3725
|
-
|
|
3437
|
+
getBlockConversationList(): Promise<IAsyncRes<IBaseConversationInfo[]>>;
|
|
3726
3438
|
/**
|
|
3727
|
-
*
|
|
3439
|
+
* 无差别获取本地置顶列表
|
|
3728
3440
|
*/
|
|
3729
|
-
|
|
3441
|
+
getTopConversationList(conversationTypes?: ConversationType[], channelId?: string): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
3730
3442
|
/**
|
|
3731
|
-
*
|
|
3443
|
+
* 获取单个群聊会话 @ 消息未读数
|
|
3732
3444
|
*/
|
|
3733
|
-
|
|
3445
|
+
getUnreadMentionedCount(conversation: IConversationOption): Promise<IAsyncRes<number>>;
|
|
3734
3446
|
/**
|
|
3735
|
-
*
|
|
3736
|
-
* @param inReconnect
|
|
3447
|
+
* 获取所有群聊会话 @ 消息未读数
|
|
3737
3448
|
*/
|
|
3738
|
-
|
|
3449
|
+
getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
|
|
3450
|
+
clearData(): Promise<IAsyncRes<boolean>>;
|
|
3739
3451
|
/**
|
|
3740
|
-
*
|
|
3741
|
-
* @param timeout 超时时间
|
|
3452
|
+
* 获取运行时的系统信息,仅限 Electron 平台可用
|
|
3742
3453
|
*/
|
|
3743
|
-
|
|
3454
|
+
getOSInfo(): IPromiseResult<IOSInfo>;
|
|
3744
3455
|
/**
|
|
3745
|
-
*
|
|
3456
|
+
* 获取应用主进程信息,仅限 Electron 平台可用
|
|
3457
|
+
*/
|
|
3458
|
+
getMainProcessInfo(): IPromiseResult<IProcessInfo>;
|
|
3459
|
+
/**
|
|
3460
|
+
* 设置代理
|
|
3461
|
+
*/
|
|
3462
|
+
setProxy(proxy: IProxy | null): IPromiseResult<IProxy>;
|
|
3463
|
+
/**
|
|
3464
|
+
* 获取代理
|
|
3465
|
+
*/
|
|
3466
|
+
getProxy(): IPromiseResult<IProxy>;
|
|
3467
|
+
/**
|
|
3468
|
+
* 测试代理
|
|
3469
|
+
*/
|
|
3470
|
+
testProxy(proxy: IProxy, testHost: string): Promise<IResponse>;
|
|
3471
|
+
rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<IAsyncRes<any>>;
|
|
3472
|
+
rtcSignaling(roomId: string, method: string, isQuery: boolean, sourceData: any): Promise<{
|
|
3473
|
+
code: ErrorCode;
|
|
3474
|
+
buffer?: any;
|
|
3475
|
+
}>;
|
|
3476
|
+
}
|
|
3477
|
+
|
|
3478
|
+
declare enum StoreKeys {
|
|
3479
|
+
/**
|
|
3480
|
+
* Navi 数据缓存,暂未使用
|
|
3481
|
+
*/
|
|
3482
|
+
NAVI = "rc-navi",
|
|
3483
|
+
/**
|
|
3484
|
+
* 实时日志已上报的时间戳
|
|
3485
|
+
*/
|
|
3486
|
+
REALTIME_LOG_TIMESTAMP = "rc-realtime-log-timestamp"
|
|
3487
|
+
}
|
|
3488
|
+
|
|
3489
|
+
/**
|
|
3490
|
+
* 音视频模式
|
|
3491
|
+
*/
|
|
3492
|
+
declare enum RTCMode {
|
|
3493
|
+
/**
|
|
3494
|
+
* 普通音视频模式
|
|
3495
|
+
*/
|
|
3496
|
+
RTC = 0,
|
|
3497
|
+
/**
|
|
3498
|
+
* 直播模式
|
|
3499
|
+
*/
|
|
3500
|
+
LIVE = 2,
|
|
3501
|
+
/**
|
|
3502
|
+
*sip呼叫
|
|
3503
|
+
*/
|
|
3504
|
+
SIP = 4,
|
|
3505
|
+
/**
|
|
3506
|
+
* 呼叫模式.包括单呼和群呼
|
|
3507
|
+
*/
|
|
3508
|
+
CALL = 5,
|
|
3509
|
+
/**
|
|
3510
|
+
* 会议
|
|
3511
|
+
*/
|
|
3512
|
+
MEETING = 6,
|
|
3513
|
+
/**
|
|
3514
|
+
* 跨应用多人房间
|
|
3515
|
+
*/
|
|
3516
|
+
CROSS_MUTI = 7,
|
|
3517
|
+
/**
|
|
3518
|
+
* 跨应用直播
|
|
3519
|
+
*/
|
|
3520
|
+
CROSS_LIVE = 8
|
|
3521
|
+
}
|
|
3522
|
+
/**
|
|
3523
|
+
* 直播类型
|
|
3524
|
+
*/
|
|
3525
|
+
declare enum LiveType {
|
|
3526
|
+
/**
|
|
3527
|
+
* 音视频直播
|
|
3746
3528
|
*/
|
|
3747
|
-
|
|
3529
|
+
AUDIO_AND_VIDEO = 0,
|
|
3748
3530
|
/**
|
|
3749
|
-
*
|
|
3531
|
+
* 音频直播
|
|
3750
3532
|
*/
|
|
3751
|
-
|
|
3533
|
+
AUDIO = 1
|
|
3534
|
+
}
|
|
3535
|
+
declare enum LiveRole {
|
|
3752
3536
|
/**
|
|
3753
|
-
*
|
|
3537
|
+
* 主播身份
|
|
3754
3538
|
*/
|
|
3755
|
-
|
|
3539
|
+
ANCHOR = 1,
|
|
3756
3540
|
/**
|
|
3757
|
-
*
|
|
3541
|
+
* 观众身份
|
|
3758
3542
|
*/
|
|
3759
|
-
|
|
3760
|
-
private clearCmpWeightCache;
|
|
3543
|
+
AUDIENCE = 2
|
|
3761
3544
|
}
|
|
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
3545
|
/**
|
|
3777
|
-
*
|
|
3546
|
+
* CallLib 流程消息
|
|
3778
3547
|
*/
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3548
|
+
declare const CallLibMsgType: {
|
|
3549
|
+
'RC:VCAccept': string;
|
|
3550
|
+
'RC:VCRinging': string;
|
|
3551
|
+
'RC:VCSummary': string;
|
|
3552
|
+
'RC:VCHangup': string;
|
|
3553
|
+
'RC:VCInvite': string;
|
|
3554
|
+
'RC:VCModifyMedia': string;
|
|
3555
|
+
'RC:VCModifyMem': string;
|
|
3556
|
+
};
|
|
3557
|
+
declare enum RTCApiType {
|
|
3558
|
+
ROOM = 1,
|
|
3559
|
+
PERSON = 2
|
|
3560
|
+
}
|
|
3561
|
+
declare enum RTCIdentityChangeType {
|
|
3562
|
+
AnchorToViewer = 1,
|
|
3563
|
+
ViewerToAnchor = 2
|
|
3785
3564
|
}
|
|
3786
3565
|
/**
|
|
3787
|
-
*
|
|
3566
|
+
* RTC 房间加入类型
|
|
3788
3567
|
*/
|
|
3789
|
-
|
|
3568
|
+
declare enum RTCJoinType {
|
|
3790
3569
|
/**
|
|
3791
|
-
*
|
|
3570
|
+
* 踢前一个设备
|
|
3792
3571
|
*/
|
|
3793
|
-
|
|
3572
|
+
KICK = 0,
|
|
3794
3573
|
/**
|
|
3795
|
-
*
|
|
3796
|
-
* @param token
|
|
3797
|
-
* @param reconnectKickEnable
|
|
3574
|
+
* 当前加入拒绝
|
|
3798
3575
|
*/
|
|
3799
|
-
|
|
3800
|
-
getNaviInfoFromCache(): INaviInfo | null;
|
|
3576
|
+
REFUSE = 1,
|
|
3801
3577
|
/**
|
|
3802
|
-
*
|
|
3803
|
-
* @param version
|
|
3578
|
+
* 两个设备共存
|
|
3804
3579
|
*/
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3580
|
+
COEXIST = 2
|
|
3581
|
+
}
|
|
3582
|
+
|
|
3583
|
+
/**
|
|
3584
|
+
* @category Interface
|
|
3585
|
+
*/
|
|
3586
|
+
interface IGooglePushConfig {
|
|
3808
3587
|
/**
|
|
3809
|
-
*
|
|
3588
|
+
* 分组ID
|
|
3810
3589
|
*/
|
|
3811
|
-
|
|
3590
|
+
collapseKey?: string;
|
|
3812
3591
|
/**
|
|
3813
|
-
*
|
|
3814
|
-
* 对于未实现的方法,接口响应 Unsupport 错误码
|
|
3815
|
-
* @param method
|
|
3816
|
-
* @param args
|
|
3592
|
+
*
|
|
3817
3593
|
*/
|
|
3818
|
-
|
|
3594
|
+
imageUrl?: string;
|
|
3819
3595
|
/**
|
|
3820
|
-
|
|
3821
|
-
* @param conversationType
|
|
3822
|
-
* @param targetId
|
|
3823
|
-
* @param timestamp
|
|
3824
|
-
* @param count
|
|
3825
|
-
* @param order
|
|
3596
|
+
*优先级
|
|
3826
3597
|
*/
|
|
3827
|
-
|
|
3598
|
+
priority?: 'high' | 'normal';
|
|
3599
|
+
}
|
|
3600
|
+
/**
|
|
3601
|
+
* @category Interface
|
|
3602
|
+
*/
|
|
3603
|
+
interface IiOSPushConfig {
|
|
3828
3604
|
/**
|
|
3829
|
-
*
|
|
3605
|
+
* iOS 用于通知分组的 id
|
|
3830
3606
|
*/
|
|
3831
|
-
|
|
3607
|
+
threadId?: string;
|
|
3832
3608
|
/**
|
|
3833
|
-
*
|
|
3609
|
+
* iOS 用于通知覆盖的 id
|
|
3834
3610
|
*/
|
|
3835
|
-
|
|
3611
|
+
apnsCollapseId?: string;
|
|
3836
3612
|
/**
|
|
3837
|
-
*
|
|
3838
|
-
* 1. `0` 表示升序,获取消息发送时间比传入 `sentTime` 小 的消息
|
|
3839
|
-
* 2. `1` 表示降序,获取消息发送时间比传入 `sentTime` 大 的消息
|
|
3613
|
+
* iOS 分类,如果不设置后台默认取消息类型字符串,如RC:TxtMsg
|
|
3840
3614
|
*/
|
|
3841
|
-
|
|
3615
|
+
category?: string;
|
|
3842
3616
|
/**
|
|
3843
|
-
*
|
|
3617
|
+
* 和 category 对应
|
|
3844
3618
|
*/
|
|
3845
|
-
|
|
3619
|
+
richMediaUri?: string;
|
|
3620
|
+
}
|
|
3621
|
+
/**
|
|
3622
|
+
* @category Interface
|
|
3623
|
+
*/
|
|
3624
|
+
interface IAndroidPushConfig {
|
|
3846
3625
|
/**
|
|
3847
|
-
*
|
|
3626
|
+
* Android 的通知 id
|
|
3848
3627
|
*/
|
|
3849
|
-
|
|
3850
|
-
list: IReceivedMessage[];
|
|
3851
|
-
hasMore: boolean;
|
|
3852
|
-
}>;
|
|
3628
|
+
notificationId?: string;
|
|
3853
3629
|
/**
|
|
3854
|
-
*
|
|
3630
|
+
* 小米的 channelId
|
|
3855
3631
|
*/
|
|
3856
|
-
|
|
3857
|
-
list: IReceivedMessage[];
|
|
3858
|
-
hasMore: boolean;
|
|
3859
|
-
}>>;
|
|
3632
|
+
channelIdMi?: string;
|
|
3860
3633
|
/**
|
|
3861
|
-
*
|
|
3634
|
+
* 小米 Large icon 链接
|
|
3635
|
+
* Large icon 可以出现在大图版和多字版消息中,显示在右边。
|
|
3636
|
+
* 国内版仅 MIUI12 以上版本支持,以下版本均不支持;国际版支持。
|
|
3637
|
+
* 图片要求:大小 120 * 120px,格式为 png 或者 jpg 格式。
|
|
3862
3638
|
*/
|
|
3863
|
-
|
|
3639
|
+
miLargeIconUrl?: string;
|
|
3864
3640
|
/**
|
|
3865
|
-
*
|
|
3866
|
-
* message 中 messageUId、setTime、messageDirection 为必须参数
|
|
3641
|
+
* 华为的 channelId
|
|
3867
3642
|
*/
|
|
3868
|
-
|
|
3869
|
-
messageUId: string;
|
|
3870
|
-
sentTime: number;
|
|
3871
|
-
messageDirection: MessageDirection;
|
|
3872
|
-
}[],
|
|
3643
|
+
channelIdHW?: string;
|
|
3873
3644
|
/**
|
|
3874
|
-
*
|
|
3645
|
+
* 华为推送消息分类
|
|
3646
|
+
* 更多信息请参考华为消息分类标准文档: https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/message-classification-0000001149358835
|
|
3647
|
+
* 5.7.3 版本开始支持
|
|
3648
|
+
*/
|
|
3649
|
+
categoryHW?: string;
|
|
3650
|
+
/**
|
|
3651
|
+
* 华为推送消息级别
|
|
3652
|
+
* LOW: 表示消息为资讯营销
|
|
3653
|
+
* NORMAL: 消息为服务与通讯
|
|
3875
3654
|
*/
|
|
3876
|
-
|
|
3877
|
-
recallMsg(conversationType: ConversationType, targetId: string, messageUId: string, sentTime: number, recallMsgOptions: IRecallMsgOptions): IPromiseResult<IReceivedMessage>;
|
|
3655
|
+
importanceHW?: 'NORMAL' | 'LOW';
|
|
3878
3656
|
/**
|
|
3879
|
-
*
|
|
3880
|
-
|
|
3657
|
+
* 华为通知类型的推送所使用的通知图片 url
|
|
3658
|
+
*/
|
|
3659
|
+
imageUrlHW?: string;
|
|
3660
|
+
/**
|
|
3661
|
+
* OPPO 的 channelId
|
|
3881
3662
|
*/
|
|
3882
|
-
|
|
3663
|
+
channelIdOPPO?: string;
|
|
3883
3664
|
/**
|
|
3884
|
-
*
|
|
3665
|
+
* vivo 的类型
|
|
3885
3666
|
*/
|
|
3886
|
-
|
|
3667
|
+
typeVivo?: string;
|
|
3887
3668
|
/**
|
|
3888
|
-
|
|
3889
|
-
|
|
3669
|
+
* google FCM 的推送配置
|
|
3670
|
+
*/
|
|
3671
|
+
googleConfig?: IGooglePushConfig;
|
|
3672
|
+
}
|
|
3673
|
+
/**
|
|
3674
|
+
* 推送配置
|
|
3675
|
+
* @category Interface
|
|
3676
|
+
*/
|
|
3677
|
+
interface IPushConfig {
|
|
3678
|
+
/**
|
|
3679
|
+
* 推送标题
|
|
3680
|
+
* 如果没有设置,会使用下面的默认标题显示规则
|
|
3681
|
+
* 默认标题显示规则:
|
|
3682
|
+
* 内置消息:单聊通知标题显示为发送者名称,群聊通知标题显示为群名称。
|
|
3683
|
+
* 自定义消息:默认不显示标题。
|
|
3890
3684
|
*/
|
|
3891
|
-
|
|
3685
|
+
pushTitle: string;
|
|
3892
3686
|
/**
|
|
3893
|
-
*
|
|
3687
|
+
* 推送内容
|
|
3688
|
+
* 优先使用 IPushConfig.pushContent, 如果没有,则使用发送消息的 pushContent 参数
|
|
3894
3689
|
*/
|
|
3895
|
-
|
|
3690
|
+
pushContent: string;
|
|
3896
3691
|
/**
|
|
3897
|
-
*
|
|
3898
|
-
*
|
|
3692
|
+
* 远程推送附加信息
|
|
3693
|
+
* 优先使用 IPushConfig.pushData, 如果没有,则使用发送消息的 pushContent 参数
|
|
3899
3694
|
*/
|
|
3900
|
-
|
|
3695
|
+
pushData: string;
|
|
3901
3696
|
/**
|
|
3902
|
-
*
|
|
3697
|
+
* iOSConfig
|
|
3903
3698
|
*/
|
|
3904
|
-
|
|
3699
|
+
iOSConfig?: IiOSPushConfig;
|
|
3905
3700
|
/**
|
|
3906
|
-
*
|
|
3701
|
+
* androidConfig
|
|
3907
3702
|
*/
|
|
3908
|
-
|
|
3703
|
+
androidConfig?: IAndroidPushConfig;
|
|
3909
3704
|
/**
|
|
3910
|
-
*
|
|
3705
|
+
* 是否显示推送标题. 仅针对 iOS 平台有效
|
|
3911
3706
|
*/
|
|
3912
|
-
|
|
3707
|
+
disablePushTitle: boolean;
|
|
3708
|
+
/**
|
|
3709
|
+
* 是否强制推送
|
|
3710
|
+
*/
|
|
3711
|
+
forceShowDetailContent: boolean;
|
|
3712
|
+
/**
|
|
3713
|
+
* 推送模板id
|
|
3714
|
+
*/
|
|
3715
|
+
templateId: string;
|
|
3716
|
+
}
|
|
3717
|
+
|
|
3718
|
+
/**
|
|
3719
|
+
* 已读回执数据结构
|
|
3720
|
+
* @category Interface
|
|
3721
|
+
*/
|
|
3722
|
+
interface IMessageReader {
|
|
3723
|
+
readTime: number;
|
|
3724
|
+
userId: string;
|
|
3725
|
+
}
|
|
3726
|
+
/**
|
|
3727
|
+
* @category Interface
|
|
3728
|
+
*/
|
|
3729
|
+
interface IMessageReaderResponse {
|
|
3730
|
+
totalMemberCount: number;
|
|
3731
|
+
list: IMessageReader[];
|
|
3732
|
+
}
|
|
3733
|
+
interface ILocalReadReceiptInfo {
|
|
3734
|
+
hasRespond?: boolean;
|
|
3735
|
+
readerInfo?: {
|
|
3736
|
+
[userId: string]: number;
|
|
3737
|
+
};
|
|
3738
|
+
readCount?: number;
|
|
3739
|
+
totalCount?: number;
|
|
3740
|
+
}
|
|
3741
|
+
/**
|
|
3742
|
+
* @category Interface
|
|
3743
|
+
*/
|
|
3744
|
+
interface IReadReceiptInfo {
|
|
3913
3745
|
/**
|
|
3914
|
-
*
|
|
3746
|
+
* 是否已经发送已读回执
|
|
3915
3747
|
*/
|
|
3916
|
-
|
|
3748
|
+
hasRespond?: boolean;
|
|
3917
3749
|
/**
|
|
3918
|
-
*
|
|
3750
|
+
* 已阅读用户列表(不准确)
|
|
3919
3751
|
*/
|
|
3920
|
-
|
|
3752
|
+
readerList?: IMessageReader[];
|
|
3921
3753
|
/**
|
|
3922
|
-
*
|
|
3754
|
+
* 阅读人数(不准确)
|
|
3923
3755
|
*/
|
|
3924
|
-
|
|
3756
|
+
readCount?: number;
|
|
3925
3757
|
/**
|
|
3926
|
-
*
|
|
3927
|
-
* @description 该删除操作会删除服务器端存储的会话数据
|
|
3928
|
-
* @param conversationType
|
|
3929
|
-
* @param targetId
|
|
3758
|
+
* 群组总人数(不准确)
|
|
3930
3759
|
*/
|
|
3931
|
-
|
|
3760
|
+
totalCount?: number;
|
|
3761
|
+
}
|
|
3762
|
+
/**
|
|
3763
|
+
* 从服务端接收到的消息数据
|
|
3764
|
+
* @category Interface
|
|
3765
|
+
*/
|
|
3766
|
+
interface IReceivedMessage {
|
|
3932
3767
|
/**
|
|
3933
|
-
*
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
* @param includeMuted 包含已设置免打扰的会话
|
|
3937
|
-
*/
|
|
3938
|
-
getAllConversationUnreadCount(channelId: string, conversationTypes: ConversationType[], includeMuted: boolean): IPromiseResult<number>;
|
|
3768
|
+
* 会话的业务标识
|
|
3769
|
+
*/
|
|
3770
|
+
channelId?: string;
|
|
3939
3771
|
/**
|
|
3940
|
-
*
|
|
3772
|
+
* 会话类型
|
|
3773
|
+
* * 1: 单聊
|
|
3774
|
+
* * 3: 群聊
|
|
3775
|
+
* * 4: 聊天室
|
|
3776
|
+
* * 5: 客服会话
|
|
3777
|
+
* * 6: 系统消息
|
|
3778
|
+
* * 7: 默认关注的公众号
|
|
3779
|
+
* * 8: 手动关注的公众号
|
|
3780
|
+
* * 9: RTCLib 房间
|
|
3941
3781
|
*/
|
|
3942
|
-
|
|
3782
|
+
conversationType: ConversationType;
|
|
3943
3783
|
/**
|
|
3944
|
-
*
|
|
3784
|
+
* 会话 targetId
|
|
3945
3785
|
*/
|
|
3946
|
-
|
|
3786
|
+
targetId: string;
|
|
3947
3787
|
/**
|
|
3948
|
-
*
|
|
3788
|
+
* 消息发送者的用户 Id
|
|
3949
3789
|
*/
|
|
3950
|
-
|
|
3790
|
+
senderUserId: string;
|
|
3951
3791
|
/**
|
|
3952
|
-
*
|
|
3953
|
-
* @param msgUids
|
|
3792
|
+
* 消息内容
|
|
3954
3793
|
*/
|
|
3955
|
-
|
|
3794
|
+
content: any;
|
|
3956
3795
|
/**
|
|
3957
|
-
*
|
|
3796
|
+
* 消息结构名称,即消息类型
|
|
3797
|
+
* @example RC:TxtMsg
|
|
3958
3798
|
*/
|
|
3959
|
-
|
|
3799
|
+
messageType: string;
|
|
3960
3800
|
/**
|
|
3961
|
-
*
|
|
3962
|
-
* @draft 草稿内容
|
|
3801
|
+
* 服务端存储的消息 Id
|
|
3963
3802
|
*/
|
|
3964
|
-
|
|
3803
|
+
messageUId: string;
|
|
3965
3804
|
/**
|
|
3966
|
-
*
|
|
3805
|
+
* 消息方向是发出 or 收取
|
|
3967
3806
|
*/
|
|
3968
|
-
|
|
3807
|
+
messageDirection: MessageDirection;
|
|
3969
3808
|
/**
|
|
3970
|
-
*
|
|
3809
|
+
* 是否为离线消息
|
|
3971
3810
|
*/
|
|
3972
|
-
|
|
3811
|
+
isOffLineMessage: boolean;
|
|
3973
3812
|
/**
|
|
3974
|
-
*
|
|
3813
|
+
* 消息在服务器端的发送时间
|
|
3975
3814
|
*/
|
|
3976
|
-
|
|
3815
|
+
sentTime: number;
|
|
3977
3816
|
/**
|
|
3978
|
-
*
|
|
3817
|
+
* 消息接收时间,该时间通过消息的 `sentTime` 值在本地进行计算得出,不推荐使用
|
|
3818
|
+
* @description 当 isOffLineMessage 为 true 时,该值无效
|
|
3979
3819
|
*/
|
|
3980
|
-
|
|
3981
|
-
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void, traceId?: string): IPromiseResult<IReceivedMessage>;
|
|
3820
|
+
receivedTime: number;
|
|
3982
3821
|
/**
|
|
3983
|
-
*
|
|
3822
|
+
* 是否存储
|
|
3823
|
+
* @default true
|
|
3984
3824
|
*/
|
|
3985
|
-
|
|
3825
|
+
isPersited: boolean;
|
|
3986
3826
|
/**
|
|
3987
|
-
*
|
|
3827
|
+
* 是否计数
|
|
3828
|
+
* @default true
|
|
3988
3829
|
*/
|
|
3989
|
-
|
|
3830
|
+
isCounted: boolean;
|
|
3990
3831
|
/**
|
|
3991
|
-
*
|
|
3992
|
-
* @description
|
|
3993
|
-
* 消息注册需在应用初始化完成前进行,否则在搭配 C++ 协议栈使用时,
|
|
3994
|
-
* 本端发出的消息将不默认作为未知消息处理,不存储、不计数
|
|
3995
|
-
* @param objectName 消息类型,如:RC:TxtMsg
|
|
3996
|
-
* @param isPersited 是否存储
|
|
3997
|
-
* @param isCounted 是否技术
|
|
3998
|
-
* @param searchProps 搜索字段,只在搭配协议栈使用时有效
|
|
3999
|
-
* @param isStatusMessage 是否是状态消息
|
|
3832
|
+
* 是否为 @ 消息
|
|
4000
3833
|
*/
|
|
4001
|
-
|
|
3834
|
+
isMentioned: boolean;
|
|
4002
3835
|
/**
|
|
4003
|
-
*
|
|
4004
|
-
* @
|
|
3836
|
+
* 消息是否静默
|
|
3837
|
+
* @description 静默消息不会发送 Push 信息和本地通知提醒
|
|
4005
3838
|
*/
|
|
4006
|
-
|
|
3839
|
+
disableNotification: boolean;
|
|
4007
3840
|
/**
|
|
4008
|
-
*
|
|
4009
|
-
* @param count 拉取消息数量
|
|
3841
|
+
* 是否是状态消息
|
|
4010
3842
|
*/
|
|
4011
|
-
|
|
3843
|
+
isStatusMessage: boolean;
|
|
4012
3844
|
/**
|
|
4013
|
-
*
|
|
4014
|
-
|
|
4015
|
-
|
|
3845
|
+
* 是否支持消息扩展存储
|
|
3846
|
+
*/
|
|
3847
|
+
canIncludeExpansion: boolean;
|
|
4016
3848
|
/**
|
|
4017
|
-
*
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
3849
|
+
* 消息携带的扩展存储
|
|
3850
|
+
*/
|
|
3851
|
+
expansion: {
|
|
3852
|
+
[key: string]: any;
|
|
3853
|
+
} | null;
|
|
4022
3854
|
/**
|
|
4023
|
-
*
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
list: IReceivedMessage[];
|
|
4027
|
-
hasMore: boolean;
|
|
4028
|
-
}>;
|
|
3855
|
+
* 消息接收状态
|
|
3856
|
+
*/
|
|
3857
|
+
receivedStatus: number;
|
|
4029
3858
|
/**
|
|
4030
|
-
*
|
|
4031
|
-
|
|
4032
|
-
|
|
3859
|
+
* 消息本地 ID, web 端由 lib 内生成, PC 端由协议栈数据库生成自增ID
|
|
3860
|
+
*/
|
|
3861
|
+
messageId?: number;
|
|
4033
3862
|
/**
|
|
4034
|
-
*
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
code: ErrorCode;
|
|
4038
|
-
data?: any;
|
|
4039
|
-
}>;
|
|
3863
|
+
* 消息发送状态, web 端由 lib 内根据消息状态设置值为 发送中、已发送和发送失败 ,PC 端由协议栈自动维护或用户自己设置
|
|
3864
|
+
*/
|
|
3865
|
+
sentStatus?: SentStatus;
|
|
4040
3866
|
/**
|
|
4041
|
-
*
|
|
3867
|
+
* 已读回执信息(导航配置grpRRVer=1时群组类型消息内存在, 其他情况为undefined)
|
|
4042
3868
|
*/
|
|
4043
|
-
|
|
3869
|
+
readReceiptInfo?: IReadReceiptInfo;
|
|
4044
3870
|
/**
|
|
4045
|
-
*
|
|
3871
|
+
* 推送扩展
|
|
4046
3872
|
*/
|
|
4047
|
-
|
|
3873
|
+
pushConfig?: IPushConfig;
|
|
4048
3874
|
/**
|
|
4049
|
-
*
|
|
3875
|
+
* 超级群专有字段,是否断档,服务端收到大量消息可能会断档,所以消息存在此标志位,断档需要客户手动拉取历史消息
|
|
4050
3876
|
*/
|
|
4051
|
-
|
|
4052
|
-
code: ErrorCode;
|
|
4053
|
-
data?: any;
|
|
4054
|
-
}>;
|
|
3877
|
+
isInterrupt?: boolean;
|
|
4055
3878
|
/**
|
|
4056
|
-
*
|
|
3879
|
+
* 拉取历史消息时表示该消息是否修改过(仅超级群有效)
|
|
4057
3880
|
*/
|
|
4058
|
-
|
|
3881
|
+
isModifyMessage?: boolean;
|
|
4059
3882
|
/**
|
|
4060
|
-
*
|
|
3883
|
+
* 拉取历史消息时表示该消息是否为超级群频道类型(仅超级群有效)
|
|
4061
3884
|
*/
|
|
4062
|
-
|
|
3885
|
+
channelType?: UltraGroupChannelType;
|
|
4063
3886
|
/**
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
3887
|
+
* 扩展内容
|
|
3888
|
+
*/
|
|
3889
|
+
extraContent?: string;
|
|
3890
|
+
}
|
|
3891
|
+
/**
|
|
3892
|
+
* @category Interface
|
|
3893
|
+
*/
|
|
3894
|
+
interface IUserProfile {
|
|
4069
3895
|
/**
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
*/
|
|
4074
|
-
getFileToken(fileType: FileType, fileName?: string, httpMethod?: string, queryUriString?: string): Promise<IAsyncRes<IUploadAuth>>;
|
|
3896
|
+
* 用户 ID
|
|
3897
|
+
*/
|
|
3898
|
+
id?: string;
|
|
4075
3899
|
/**
|
|
4076
|
-
*
|
|
3900
|
+
* 用户名
|
|
4077
3901
|
*/
|
|
4078
|
-
|
|
4079
|
-
downloadUrl: string;
|
|
4080
|
-
}>;
|
|
3902
|
+
name?: string;
|
|
4081
3903
|
/**
|
|
4082
|
-
*
|
|
4083
|
-
* @
|
|
3904
|
+
* 用户头像地址
|
|
3905
|
+
* @deprecated
|
|
4084
3906
|
*/
|
|
4085
|
-
|
|
3907
|
+
portraitUri?: string;
|
|
4086
3908
|
/**
|
|
4087
|
-
*
|
|
4088
|
-
* @param tagId 标签id
|
|
3909
|
+
* user info 中附加信息
|
|
4089
3910
|
*/
|
|
4090
|
-
|
|
3911
|
+
extra?: string;
|
|
4091
3912
|
/**
|
|
4092
|
-
*
|
|
4093
|
-
* @param tag 标签
|
|
3913
|
+
* 用户头像地址(向移动端兼容)
|
|
4094
3914
|
*/
|
|
4095
|
-
|
|
3915
|
+
portrait?: string;
|
|
3916
|
+
}
|
|
3917
|
+
interface IOperateInfo {
|
|
3918
|
+
targetId: string;
|
|
3919
|
+
channelId?: string;
|
|
3920
|
+
userId: string;
|
|
3921
|
+
operationType: OperateStatus;
|
|
3922
|
+
operationTime?: number;
|
|
3923
|
+
}
|
|
3924
|
+
interface IOperateSummary {
|
|
3925
|
+
targetId: string;
|
|
3926
|
+
channelId?: string;
|
|
3927
|
+
count: number;
|
|
3928
|
+
operationType: OperateStatus;
|
|
3929
|
+
}
|
|
3930
|
+
interface IOperateStatusNotify {
|
|
3931
|
+
conversationType: ConversationType;
|
|
3932
|
+
hasInfo: boolean;
|
|
3933
|
+
hasSummary: boolean;
|
|
3934
|
+
info: IOperateInfo[];
|
|
3935
|
+
summary: IOperateSummary[];
|
|
3936
|
+
}
|
|
3937
|
+
interface IRecallMsgOptions {
|
|
4096
3938
|
/**
|
|
4097
|
-
*
|
|
4098
|
-
|
|
4099
|
-
|
|
3939
|
+
* 会话组织机构标识
|
|
3940
|
+
* 默认值未 空字符串
|
|
3941
|
+
*/
|
|
3942
|
+
channelId: string;
|
|
4100
3943
|
/**
|
|
4101
|
-
*
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
*/
|
|
4105
|
-
addTagForConversations(tagId: string, conversations: IConversationOption[]): IPromiseResult;
|
|
3944
|
+
* 发送消息携带的用户信息
|
|
3945
|
+
*/
|
|
3946
|
+
user?: IUserProfile;
|
|
4106
3947
|
/**
|
|
4107
|
-
*
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
*/
|
|
4111
|
-
removeTagForConversations(tagId: string, conversations: IConversationOption[]): IPromiseResult;
|
|
3948
|
+
* Push 信息
|
|
3949
|
+
*/
|
|
3950
|
+
pushContent?: string;
|
|
4112
3951
|
/**
|
|
4113
|
-
*
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
* @param tagIds 要删除的标签列表
|
|
4117
|
-
*/
|
|
4118
|
-
removeTagsForConversation(conversation: IConversationOption, tagIds: string[]): IPromiseResult;
|
|
3952
|
+
* 原消息体
|
|
3953
|
+
*/
|
|
3954
|
+
oriContent?: any;
|
|
4119
3955
|
/**
|
|
4120
|
-
*
|
|
4121
|
-
* @
|
|
4122
|
-
|
|
4123
|
-
|
|
3956
|
+
* 是否发送静默消息
|
|
3957
|
+
* @description
|
|
3958
|
+
* 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
|
|
3959
|
+
*/
|
|
3960
|
+
disableNotification?: boolean;
|
|
4124
3961
|
/**
|
|
4125
|
-
*
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
*/
|
|
4129
|
-
getUnreadCountByTag(tagId: string, containMuted: boolean): IPromiseResult<number>;
|
|
3962
|
+
* 移动端推送配置
|
|
3963
|
+
*/
|
|
3964
|
+
pushConfig?: IPushConfig;
|
|
4130
3965
|
/**
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
setConversationStatusInTag(tagId: string, conversation: IConversationOption, status: ITagStatus): IPromiseResult;
|
|
3966
|
+
* 其他拓展信息
|
|
3967
|
+
*/
|
|
3968
|
+
extra?: string;
|
|
4135
3969
|
/**
|
|
4136
|
-
*
|
|
4137
|
-
* @param config
|
|
3970
|
+
* 是否删除原始消息(在移动端会使用到),为 true 时移动端会不显示小灰条提示
|
|
4138
3971
|
*/
|
|
4139
|
-
|
|
3972
|
+
isDelete?: boolean;
|
|
3973
|
+
}
|
|
3974
|
+
interface IRecallMsgContent {
|
|
3975
|
+
conversationType: number;
|
|
3976
|
+
targetId: string;
|
|
3977
|
+
sentTime: number;
|
|
3978
|
+
messageUId: string;
|
|
4140
3979
|
/**
|
|
4141
|
-
*
|
|
4142
|
-
*
|
|
4143
|
-
|
|
4144
|
-
|
|
3980
|
+
* 会话组织机构标识
|
|
3981
|
+
* 默认值未 空字符串
|
|
3982
|
+
*/
|
|
3983
|
+
channelId: string;
|
|
4145
3984
|
/**
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
3985
|
+
* 其他拓展信息
|
|
3986
|
+
*/
|
|
3987
|
+
extra?: string;
|
|
4149
3988
|
/**
|
|
4150
|
-
*
|
|
4151
|
-
|
|
4152
|
-
|
|
3989
|
+
* 发送消息携带的用户信息
|
|
3990
|
+
*/
|
|
3991
|
+
user?: IUserProfile;
|
|
4153
3992
|
/**
|
|
4154
|
-
*
|
|
3993
|
+
* 是否删除原始消息(在移动端会使用到),为 true 时移动端会不显示小灰条提示
|
|
4155
3994
|
*/
|
|
4156
|
-
|
|
3995
|
+
isDelete?: boolean;
|
|
3996
|
+
}
|
|
3997
|
+
/**
|
|
3998
|
+
* 发送消息时的可选项信息
|
|
3999
|
+
*/
|
|
4000
|
+
interface ISendMsgOptions {
|
|
4157
4001
|
/**
|
|
4158
|
-
*
|
|
4002
|
+
* 消息类型,即消息结构的 ObjectName
|
|
4159
4003
|
*/
|
|
4160
|
-
|
|
4004
|
+
messageType: string;
|
|
4161
4005
|
/**
|
|
4162
|
-
*
|
|
4006
|
+
* 消息内容
|
|
4163
4007
|
*/
|
|
4164
|
-
|
|
4008
|
+
content: {
|
|
4009
|
+
/**
|
|
4010
|
+
* 消息内容 key-value,最终会进行 JSON 序列化后发送
|
|
4011
|
+
*/
|
|
4012
|
+
[key: string]: any;
|
|
4013
|
+
/**
|
|
4014
|
+
* 消息可携带的用户数据
|
|
4015
|
+
*/
|
|
4016
|
+
user?: IUserProfile;
|
|
4017
|
+
/**
|
|
4018
|
+
* 其他拓展信息
|
|
4019
|
+
*/
|
|
4020
|
+
extra?: string;
|
|
4021
|
+
};
|
|
4165
4022
|
/**
|
|
4166
|
-
*
|
|
4023
|
+
* 是否存储
|
|
4024
|
+
* @description 只在发送未注册过的自定义消息时有效,否则使用注册时的配置
|
|
4167
4025
|
*/
|
|
4168
|
-
|
|
4169
|
-
getConversationListWithAllChannel(): IPromiseResult<IReceivedConversation[]>;
|
|
4170
|
-
getConversationListWithAllChannelByPage(index: number, limit: number): IPromiseResult<IReceivedConversation[]>;
|
|
4026
|
+
isPersited?: boolean;
|
|
4171
4027
|
/**
|
|
4172
|
-
*
|
|
4028
|
+
* 是否计数
|
|
4029
|
+
* @description 只在发送未注册过的自定义消息时有效,否则使用注册时的配置
|
|
4173
4030
|
*/
|
|
4174
|
-
|
|
4175
|
-
userIds: string[];
|
|
4176
|
-
}, listener: Function): void;
|
|
4031
|
+
isCounted?: boolean;
|
|
4177
4032
|
/**
|
|
4178
|
-
*
|
|
4033
|
+
* 是否是状态消息,一般为无需注册的自定义消息
|
|
4034
|
+
* @description
|
|
4035
|
+
* 1. 状态消息只有 pub,没有 ack 应答
|
|
4036
|
+
* 2. 状态消息默认不存储,不计数,`isPersited` 与 `isCounted` 配置将失效
|
|
4179
4037
|
*/
|
|
4180
|
-
|
|
4038
|
+
isStatusMessage?: boolean;
|
|
4181
4039
|
/**
|
|
4182
|
-
*
|
|
4040
|
+
* 是否发送静默消息
|
|
4041
|
+
* @description
|
|
4042
|
+
* 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
|
|
4183
4043
|
*/
|
|
4184
|
-
|
|
4044
|
+
disableNotification?: boolean;
|
|
4185
4045
|
/**
|
|
4186
|
-
*
|
|
4046
|
+
* Push 信息
|
|
4187
4047
|
*/
|
|
4188
|
-
|
|
4189
|
-
status: string;
|
|
4190
|
-
}>;
|
|
4048
|
+
pushContent?: string;
|
|
4191
4049
|
/**
|
|
4192
|
-
*
|
|
4050
|
+
* Push 通知携带的附加信息
|
|
4193
4051
|
*/
|
|
4194
|
-
|
|
4052
|
+
pushData?: string;
|
|
4195
4053
|
/**
|
|
4196
|
-
*
|
|
4054
|
+
* 是否为 @ 消息,只当 conversationType 值为 `ConversationType.GROUP` 时有效
|
|
4197
4055
|
*/
|
|
4198
|
-
|
|
4056
|
+
isMentioned?: boolean;
|
|
4199
4057
|
/**
|
|
4200
|
-
*
|
|
4058
|
+
* `@` 消息类型
|
|
4059
|
+
* @description `1: @ 所有人 2: @ 指定用户`
|
|
4201
4060
|
*/
|
|
4202
|
-
|
|
4061
|
+
mentionedType?: 1 | 2;
|
|
4203
4062
|
/**
|
|
4204
|
-
*
|
|
4063
|
+
* 被 @ 的用户 Id 列表,当 `mentionedType` 值为 `1` 时,该值可为空
|
|
4205
4064
|
*/
|
|
4206
|
-
|
|
4065
|
+
mentionedUserIdList?: string[];
|
|
4207
4066
|
/**
|
|
4208
|
-
*
|
|
4067
|
+
* 用于发送群定向消息,只当 conversationType 值为 `ConversationType.GROUP` 时有效
|
|
4209
4068
|
*/
|
|
4210
|
-
|
|
4069
|
+
directionalUserIdList?: string[];
|
|
4211
4070
|
/**
|
|
4212
|
-
*
|
|
4071
|
+
* 当对方为 iOS 设备且未在线时,其将收到 Voip Push. 此配置对 Android 无影响
|
|
4213
4072
|
*/
|
|
4214
|
-
|
|
4073
|
+
isVoipPush?: boolean;
|
|
4215
4074
|
/**
|
|
4216
|
-
*
|
|
4075
|
+
* 消息是否支持拓展内容
|
|
4217
4076
|
*/
|
|
4218
|
-
|
|
4077
|
+
canIncludeExpansion?: boolean;
|
|
4219
4078
|
/**
|
|
4220
|
-
*
|
|
4079
|
+
* 消息拓展内容数据
|
|
4221
4080
|
*/
|
|
4222
|
-
|
|
4081
|
+
expansion?: {
|
|
4082
|
+
[key: string]: string;
|
|
4083
|
+
};
|
|
4223
4084
|
/**
|
|
4224
|
-
*
|
|
4085
|
+
* 黑/白名单
|
|
4086
|
+
* @todo 功能未知,需确认
|
|
4225
4087
|
*/
|
|
4226
|
-
|
|
4088
|
+
isFilerWhiteBlacklist?: boolean;
|
|
4227
4089
|
/**
|
|
4228
|
-
*
|
|
4229
|
-
|
|
4230
|
-
|
|
4090
|
+
* 移动端推送配置
|
|
4091
|
+
*/
|
|
4092
|
+
pushConfig?: IPushConfig;
|
|
4231
4093
|
/**
|
|
4232
|
-
*
|
|
4233
|
-
|
|
4234
|
-
|
|
4094
|
+
* 会话业务标识
|
|
4095
|
+
* @description
|
|
4096
|
+
* 20 个字符长度限制
|
|
4097
|
+
*/
|
|
4098
|
+
channelId?: string;
|
|
4235
4099
|
/**
|
|
4236
|
-
*
|
|
4100
|
+
* 客户端的消息标识
|
|
4101
|
+
* 重发消息时用到,重发消息的消息 ID
|
|
4237
4102
|
*/
|
|
4238
|
-
|
|
4103
|
+
messageId?: number;
|
|
4239
4104
|
/**
|
|
4240
|
-
*
|
|
4105
|
+
* 超级群专有字段,是否断档,若断档需要客户判断是否拉取
|
|
4241
4106
|
*/
|
|
4242
|
-
|
|
4107
|
+
isInterrupt?: boolean;
|
|
4243
4108
|
/**
|
|
4244
|
-
|
|
4109
|
+
* 标识该消息是否为重发消息,仅 electron 中有效。
|
|
4110
|
+
*/
|
|
4111
|
+
isResend?: boolean;
|
|
4112
|
+
}
|
|
4113
|
+
interface IInsertMsgOptions {
|
|
4114
|
+
senderUserId: string;
|
|
4115
|
+
messageType: string;
|
|
4116
|
+
content: any;
|
|
4117
|
+
messageDirection: number;
|
|
4118
|
+
readStatus?: number;
|
|
4119
|
+
sentStatus?: number;
|
|
4120
|
+
sentTime?: number;
|
|
4121
|
+
searchContent?: string;
|
|
4122
|
+
isUnread?: boolean;
|
|
4123
|
+
messageUId?: string;
|
|
4124
|
+
disableNotification?: boolean;
|
|
4125
|
+
canIncludeExpansion?: boolean;
|
|
4126
|
+
expansionMsg?: string;
|
|
4127
|
+
channelId: string;
|
|
4128
|
+
}
|
|
4129
|
+
interface IInsertMessage {
|
|
4130
|
+
conversationType: number;
|
|
4131
|
+
targetId: string;
|
|
4132
|
+
channelId: string;
|
|
4133
|
+
messageDirection: number;
|
|
4134
|
+
messageType: string;
|
|
4135
|
+
content: any;
|
|
4136
|
+
messageUId: string;
|
|
4137
|
+
senderUserId: string;
|
|
4138
|
+
sentStatus?: number;
|
|
4139
|
+
sentTime?: number;
|
|
4140
|
+
disableNotification?: boolean;
|
|
4141
|
+
canIncludeExpansion?: boolean;
|
|
4142
|
+
expansion?: {
|
|
4143
|
+
[key: string]: any;
|
|
4144
|
+
} | null;
|
|
4145
|
+
receivedStatus?: number;
|
|
4146
|
+
/**
|
|
4147
|
+
* 插入消息是否计入未读数: true 计数 false 不计数, 默认不计数
|
|
4245
4148
|
*/
|
|
4246
|
-
|
|
4247
|
-
searchConversationByContentWithAllChannel(keyword: string, customMessageTypes: string[], conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
4149
|
+
isUnread?: boolean;
|
|
4248
4150
|
/**
|
|
4249
|
-
*
|
|
4151
|
+
* 消息搜索关键字
|
|
4250
4152
|
*/
|
|
4251
|
-
|
|
4252
|
-
messages: IReceivedMessage[];
|
|
4253
|
-
count: number;
|
|
4254
|
-
}>;
|
|
4153
|
+
searchContent?: string;
|
|
4255
4154
|
/**
|
|
4256
|
-
*
|
|
4155
|
+
* 来源
|
|
4257
4156
|
*/
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4157
|
+
source?: string;
|
|
4158
|
+
isMentioned?: boolean;
|
|
4159
|
+
}
|
|
4160
|
+
interface ISendExMsgOptions {
|
|
4161
|
+
channelId: string;
|
|
4162
|
+
conversationType: ConversationType;
|
|
4163
|
+
targetId: string;
|
|
4262
4164
|
/**
|
|
4263
|
-
|
|
4165
|
+
* 消息 ID
|
|
4264
4166
|
*/
|
|
4265
|
-
|
|
4266
|
-
messages: IReceivedMessage[];
|
|
4267
|
-
}>;
|
|
4167
|
+
messageUId: string;
|
|
4268
4168
|
/**
|
|
4269
|
-
*
|
|
4270
|
-
|
|
4271
|
-
|
|
4169
|
+
* 原始消息是否支持扩展的字段
|
|
4170
|
+
*/
|
|
4171
|
+
canIncludeExpansion: boolean;
|
|
4272
4172
|
/**
|
|
4273
|
-
*
|
|
4274
|
-
|
|
4275
|
-
|
|
4173
|
+
* 删除的 keys
|
|
4174
|
+
*/
|
|
4175
|
+
keys?: string[];
|
|
4276
4176
|
/**
|
|
4277
|
-
*
|
|
4278
|
-
|
|
4279
|
-
|
|
4177
|
+
* 扩展对象
|
|
4178
|
+
*/
|
|
4179
|
+
expansion?: {
|
|
4180
|
+
[key: string]: string;
|
|
4181
|
+
};
|
|
4280
4182
|
/**
|
|
4281
|
-
*
|
|
4282
|
-
|
|
4283
|
-
|
|
4183
|
+
* 是否删除所有扩展
|
|
4184
|
+
*/
|
|
4185
|
+
removeAll?: boolean;
|
|
4284
4186
|
/**
|
|
4285
|
-
*
|
|
4286
|
-
|
|
4287
|
-
|
|
4187
|
+
* 原始消息的扩展
|
|
4188
|
+
*/
|
|
4189
|
+
originExpansion?: {
|
|
4190
|
+
[key: string]: string;
|
|
4191
|
+
} | null;
|
|
4192
|
+
}
|
|
4193
|
+
interface IUltraExMsgOptions {
|
|
4194
|
+
canIncludeExpansion: boolean;
|
|
4195
|
+
channelId: string;
|
|
4196
|
+
conversationType: ConversationType;
|
|
4197
|
+
targetId: string;
|
|
4198
|
+
messageUId: string;
|
|
4199
|
+
sendTime: number;
|
|
4288
4200
|
/**
|
|
4289
|
-
*
|
|
4290
|
-
|
|
4291
|
-
|
|
4201
|
+
* 删除的 keys
|
|
4202
|
+
*/
|
|
4203
|
+
keys?: string[];
|
|
4292
4204
|
/**
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
}>;
|
|
4205
|
+
* 扩展对象
|
|
4206
|
+
*/
|
|
4207
|
+
expansion?: {
|
|
4208
|
+
[key: string]: string;
|
|
4209
|
+
};
|
|
4299
4210
|
/**
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4211
|
+
* 是否删除所有扩展
|
|
4212
|
+
*/
|
|
4213
|
+
removeAll?: boolean;
|
|
4214
|
+
}
|
|
4215
|
+
interface IUltraModifyMsgOptions {
|
|
4216
|
+
canIncludeExpansion?: boolean;
|
|
4217
|
+
channelId: string;
|
|
4218
|
+
conversationType: ConversationType;
|
|
4219
|
+
targetId: string;
|
|
4220
|
+
messageUId: string;
|
|
4221
|
+
sendTime: number;
|
|
4303
4222
|
/**
|
|
4304
|
-
*
|
|
4223
|
+
* 消息内容
|
|
4305
4224
|
*/
|
|
4306
|
-
|
|
4225
|
+
content: {
|
|
4226
|
+
/**
|
|
4227
|
+
* 消息内容 key-value,最终会进行 JSON 序列化后发送
|
|
4228
|
+
*/
|
|
4229
|
+
[key: string]: any;
|
|
4230
|
+
/**
|
|
4231
|
+
* 消息可携带的用户数据
|
|
4232
|
+
*/
|
|
4233
|
+
user?: IUserProfile;
|
|
4234
|
+
/**
|
|
4235
|
+
* 其他拓展信息
|
|
4236
|
+
*/
|
|
4237
|
+
extra?: string;
|
|
4238
|
+
};
|
|
4239
|
+
}
|
|
4240
|
+
interface IUltraMsgQueryInfo {
|
|
4241
|
+
sendTime: number;
|
|
4242
|
+
messageUId: string;
|
|
4243
|
+
channelId?: string;
|
|
4244
|
+
}
|
|
4245
|
+
interface IUltraMsgQueryOptions {
|
|
4246
|
+
conversationType: ConversationType;
|
|
4247
|
+
targetId: string;
|
|
4248
|
+
messages: IUltraMsgQueryInfo[];
|
|
4249
|
+
}
|
|
4250
|
+
/**
|
|
4251
|
+
* 被拦截的消息信息
|
|
4252
|
+
* @category Interface
|
|
4253
|
+
*/
|
|
4254
|
+
interface IBlockedMessageInfo {
|
|
4255
|
+
blockedMessageUId: string;
|
|
4256
|
+
conversationType: number;
|
|
4257
|
+
targetId: string;
|
|
4258
|
+
channelId: string;
|
|
4259
|
+
blockType: MessageBlockType;
|
|
4260
|
+
extra: any;
|
|
4261
|
+
sourceType?: MessageBlockSourceType;
|
|
4262
|
+
sourceContent?: {
|
|
4263
|
+
[key: string]: any;
|
|
4264
|
+
};
|
|
4265
|
+
}
|
|
4266
|
+
/**
|
|
4267
|
+
* 超级群获取指定会话未读 @ 消息列表参数
|
|
4268
|
+
*/
|
|
4269
|
+
interface IUltraGroupUnreadMentionedOption {
|
|
4307
4270
|
/**
|
|
4308
|
-
*
|
|
4309
|
-
|
|
4310
|
-
|
|
4271
|
+
* 会话 ID
|
|
4272
|
+
*/
|
|
4273
|
+
targetId: string;
|
|
4311
4274
|
/**
|
|
4312
|
-
*
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
clearData(): Promise<IAsyncRes<boolean>>;
|
|
4275
|
+
* 频道 ID
|
|
4276
|
+
*/
|
|
4277
|
+
channelId?: string;
|
|
4316
4278
|
/**
|
|
4317
|
-
*
|
|
4318
|
-
|
|
4319
|
-
|
|
4279
|
+
* 消息的时间戳,首次获取传 0, 后续查询传未读 @ 列表中的消息时间戳
|
|
4280
|
+
*/
|
|
4281
|
+
sentTime: number;
|
|
4320
4282
|
/**
|
|
4321
|
-
*
|
|
4322
|
-
|
|
4323
|
-
|
|
4283
|
+
* 数据个数,最大50
|
|
4284
|
+
*/
|
|
4285
|
+
count: number;
|
|
4286
|
+
}
|
|
4287
|
+
/**
|
|
4288
|
+
* 超级群获取指定会话 @ 未读消息列表结果
|
|
4289
|
+
*/
|
|
4290
|
+
interface IUltraUnreadMsg {
|
|
4324
4291
|
/**
|
|
4325
|
-
*
|
|
4326
|
-
|
|
4327
|
-
|
|
4292
|
+
* 消息 ID
|
|
4293
|
+
*/
|
|
4294
|
+
messageUId?: string;
|
|
4328
4295
|
/**
|
|
4329
|
-
*
|
|
4330
|
-
|
|
4331
|
-
|
|
4296
|
+
* 消息时间戳
|
|
4297
|
+
*/
|
|
4298
|
+
sentTime: number;
|
|
4332
4299
|
/**
|
|
4333
|
-
*
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4300
|
+
* @ 类型: 1 所有人;2: 部分人
|
|
4301
|
+
*/
|
|
4302
|
+
mentionedType?: number;
|
|
4303
|
+
}
|
|
4304
|
+
|
|
4305
|
+
interface IRTCRoomInfo {
|
|
4306
|
+
roomId: string;
|
|
4307
|
+
roomData: unknown[];
|
|
4308
|
+
userCount: number;
|
|
4309
|
+
list: unknown[];
|
|
4310
|
+
}
|
|
4311
|
+
interface IRtcTokenData {
|
|
4312
|
+
rtcToken: string;
|
|
4313
|
+
}
|
|
4314
|
+
interface IRTCUsers {
|
|
4315
|
+
users: {
|
|
4316
|
+
[userId: string]: {
|
|
4317
|
+
/**
|
|
4318
|
+
* 发布的资源数据,是一个 JSON 字符串,解析后为发布的资源列表
|
|
4319
|
+
*/
|
|
4320
|
+
uris?: string;
|
|
4321
|
+
/**
|
|
4322
|
+
* 加房间的身份标识,保存主房间 roomId
|
|
4323
|
+
*/
|
|
4324
|
+
extra?: string;
|
|
4325
|
+
};
|
|
4326
|
+
};
|
|
4327
|
+
}
|
|
4328
|
+
interface IJoinRTCRoomData extends IRTCUsers {
|
|
4329
|
+
token: string;
|
|
4330
|
+
sessionId: string;
|
|
4331
|
+
roomInfo: {
|
|
4332
|
+
key: string;
|
|
4333
|
+
value: string;
|
|
4334
|
+
}[];
|
|
4335
|
+
kvEntries: IServerRTCRoomEntry[];
|
|
4336
|
+
offlineKickTime: number;
|
|
4337
|
+
}
|
|
4338
|
+
interface KVString {
|
|
4339
|
+
[key: string]: string;
|
|
4340
|
+
}
|
|
4341
|
+
/**
|
|
4342
|
+
* 设置 RTC 人员 inner、outer 数据
|
|
4343
|
+
*/
|
|
4344
|
+
interface IRTCUserData {
|
|
4345
|
+
[key: string]: string;
|
|
4341
4346
|
}
|
|
4342
4347
|
|
|
4343
4348
|
interface IExpansionMsgContent {
|
|
@@ -5197,6 +5202,7 @@ declare class APIContext {
|
|
|
5197
5202
|
* rtc 数据变更通知 pluginContext
|
|
5198
5203
|
*/
|
|
5199
5204
|
private _rtcDataChange;
|
|
5205
|
+
private _meetingEvent;
|
|
5200
5206
|
/**
|
|
5201
5207
|
* 导航数据变更通知
|
|
5202
5208
|
*/
|
|
@@ -5267,6 +5273,10 @@ declare class APIContext {
|
|
|
5267
5273
|
* @param listener
|
|
5268
5274
|
*/
|
|
5269
5275
|
registerRTCSignalingListener(listener?: (buffer: Uint8Array) => void): void;
|
|
5276
|
+
/**
|
|
5277
|
+
* 监听 RTC Meeting 下行信令通知
|
|
5278
|
+
*/
|
|
5279
|
+
registerMeetingEventListener(listener?: (eventType: MeetingEventType, buffer: Uint8Array) => void): void;
|
|
5270
5280
|
checkSearchPropsMsg(messageType: string, msgContent: any): IAsyncRes;
|
|
5271
5281
|
/**
|
|
5272
5282
|
* 发送消息
|
|
@@ -5386,13 +5396,7 @@ declare class APIContext {
|
|
|
5386
5396
|
*/
|
|
5387
5397
|
getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<IReceivedMessage | null>>;
|
|
5388
5398
|
/**
|
|
5389
|
-
* 按
|
|
5390
|
-
* @param msgUids
|
|
5391
|
-
* @returns
|
|
5392
|
-
*/
|
|
5393
|
-
getMessageByUids(msgUids: string[]): IReceivedMessage[];
|
|
5394
|
-
/**
|
|
5395
|
-
* 会话内按msgUids批量获取消息
|
|
5399
|
+
* 按msgUids批量获取消息
|
|
5396
5400
|
*/
|
|
5397
5401
|
getMessageByMsgUids(targetId: string, channelId: string, conversationType: ConversationType, msgUids: string[]): IReceivedMessage[];
|
|
5398
5402
|
/**
|
|
@@ -6164,6 +6168,10 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
6164
6168
|
* @param listener
|
|
6165
6169
|
*/
|
|
6166
6170
|
registerRTCSignalListener(listener?: (buffer: Uint8Array) => void): void;
|
|
6171
|
+
/**
|
|
6172
|
+
* 监听 RTC Meeting 下行信令通知
|
|
6173
|
+
*/
|
|
6174
|
+
registerMeetingEventListener(listener?: (eventType: MeetingEventType, buffer: Uint8Array) => void): void;
|
|
6167
6175
|
/**
|
|
6168
6176
|
* RTC 调用 signal 服务的通用接口
|
|
6169
6177
|
* @param roomId 房间 ID
|
|
@@ -6214,6 +6222,7 @@ interface IEngineWatcher extends IConnectionListener {
|
|
|
6214
6222
|
* RTC 数据变更
|
|
6215
6223
|
*/
|
|
6216
6224
|
onRTCDataChange: (data: IServerRTCRoomEntry[], roomId?: string) => void;
|
|
6225
|
+
onMeetingEvent: (eventType: number, buffer?: Uint8Array) => void;
|
|
6217
6226
|
pullFinished: () => void;
|
|
6218
6227
|
messageDelivered: (data: IMessageDeliver[]) => void;
|
|
6219
6228
|
groupMessageDeliveredStatus: (data: IGroupMessageDeliverStatus) => void;
|
|
@@ -6242,11 +6251,16 @@ declare abstract class AEngine {
|
|
|
6242
6251
|
*/
|
|
6243
6252
|
constructor(runtime: IRuntime, rtcCodec: Codec<RTCKeyMaps>, _watcher: IEngineWatcher, _options: IAPIContextOption, logger: BasicLogger);
|
|
6244
6253
|
protected _rtcSignalingListener?: (buffer: Uint8Array) => void;
|
|
6254
|
+
protected _meetingEventListener?: (eventType: MeetingEventType, buffer: Uint8Array) => void;
|
|
6245
6255
|
/**
|
|
6246
6256
|
* 注册 RTC KV 变更监听器
|
|
6247
6257
|
* @param listener
|
|
6248
6258
|
*/
|
|
6249
6259
|
registerRTCSignalingListener(listener: ((buffer: Uint8Array) => void) | undefined): void;
|
|
6260
|
+
/**
|
|
6261
|
+
* 注册Meeting事件监听器
|
|
6262
|
+
*/
|
|
6263
|
+
registerMeetingEventListener(listener: ((eventType: MeetingEventType, buffer: Uint8Array) => void) | undefined): void;
|
|
6250
6264
|
/**
|
|
6251
6265
|
* 忽视缓存,重新请求导航数据
|
|
6252
6266
|
*/
|
|
@@ -6424,11 +6438,6 @@ declare abstract class AEngine {
|
|
|
6424
6438
|
* 获取第一个未读消息
|
|
6425
6439
|
*/
|
|
6426
6440
|
abstract getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IReceivedMessage | null>;
|
|
6427
|
-
/**
|
|
6428
|
-
* 按msgUids批量获取消息
|
|
6429
|
-
* @param msgUids
|
|
6430
|
-
*/
|
|
6431
|
-
abstract getMessageByUids(msgUids: string[]): IReceivedMessage[];
|
|
6432
6441
|
/**
|
|
6433
6442
|
* 按msgUids批量获取消息
|
|
6434
6443
|
*/
|
|
@@ -6987,6 +6996,7 @@ declare abstract class AEngine {
|
|
|
6987
6996
|
* 接收 rtc 资源变更
|
|
6988
6997
|
*/
|
|
6989
6998
|
protected _receiveRtcKv(buffer: Uint8Array): void;
|
|
6999
|
+
protected _receiveMeetingEvent(eventType: MeetingEventType, buffer: Uint8Array): void;
|
|
6990
7000
|
/**
|
|
6991
7001
|
* Engine 反初始化
|
|
6992
7002
|
*/
|
|
@@ -7560,4 +7570,4 @@ declare type AbsCodec<T> = Codec<T>;
|
|
|
7560
7570
|
*/
|
|
7561
7571
|
declare const version: string;
|
|
7562
7572
|
|
|
7563
|
-
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 };
|
|
7573
|
+
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 };
|