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