@rongcloud/imlib-v2-adapter 5.7.2 → 5.7.3-beem.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IPushConfig, IUserProfile, ConversationType, MessageDirection, ReceivedStatus, IReadReceiptInfo, IConversationTag, LogLevel, EnableLogL, IRuntime, RCConnectionStatus, ErrorCode, ITypingMessage, IBlockedMessageInfo, IChatroomListenerData, IMessageDeliver, IGroupMessageDeliverStatus, ILogger, APIContext, AppStorage, IMessageReaderResponse, IInsertMessage, NotificationStatus, IGroupMessageDeliverInfo, IRemoveChatroomEntry, RTCMode, IPluginGenerator, INaviInfo, IChatroomEntry, IChatroomEntries, FileType, IUploadAuth, UploadMethod, ITagParam, ITagInfo, IExtraMethod, IRTCUsers, IRTCRoomInfo, IJoinRTCRoomData, RTCApiType, KVString, IRtcTokenData, ConnectionStatus, MentionedType as MentionedType$1 } from '@rongcloud/engine';
1
+ import { IPushConfig, IUserProfile, ConversationType, MessageDirection, ReceivedStatus, IReadReceiptInfo, IConversationTag, LogLevel, EnableLogL, IRuntime, RCConnectionStatus, ErrorCode, ITypingMessage, IBlockedMessageInfo, IChatroomListenerData, IMessageDeliver, IGroupMessageDeliverStatus, ILogger, APIContext, AppStorage, IReceivedMessage, ISetConversationStatusOptions, IMessageReaderResponse, IInsertMessage, NotificationStatus, IGroupMessageDeliverInfo, IRemoveChatroomEntry, RTCMode, IPluginGenerator, INaviInfo, IChatroomEntry, IChatroomEntries, FileType, IUploadAuth, UploadMethod, ITagParam, ITagInfo, IExtraMethod, MentionedType as MentionedType$1 } from '@rongcloud/engine';
2
2
  export { ChatroomEntryType, ChatroomUserChangeType, ConnectionStatus, ConversationType, EnableLogL, ErrorCode, FileType, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomListenerData, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IConversationTag, IDeletedExpansion, IEventListener, IExpansionListenerData, IGooglePushConfig, IInsertMessage, IJoinRTCRoomData, IMessageReader, IMessageReaderResponse, IPushConfig, IRTCRoomInfo, IRTCUsers, IReadReceiptInfo, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatroomEntry, IRtcTokenData, ITagInfo, ITagParam, ITypingMessage, ITypingUser, IUpdatedExpansion, IUploadAuth, IUserProfile, IiOSPushConfig, KVString, LogL, LogLevel, LogSource, LogTagId, MessageBlockType, MessageDirection, NotificationStatus, RCConnectionStatus, RTCApiType, RTCMode, ReceivedStatus, UploadMethod, logger } from '@rongcloud/engine';
3
3
 
4
4
  declare enum SentStatus {
@@ -84,6 +84,10 @@ interface ISendOptionsV2 {
84
84
  * 仅 electron 中有效。
85
85
  */
86
86
  resendMessageId?: number;
87
+ /**
88
+ * 标识该消息是否为重发消息,仅 electron 中有效。
89
+ */
90
+ isResend?: boolean;
87
91
  }
88
92
  interface IRecallOptionsV2 {
89
93
  /**
@@ -118,6 +122,7 @@ interface IReceivedMessageV2 {
118
122
  targetId: string;
119
123
  senderUserId: string;
120
124
  content: any;
125
+ extraContent?: string;
121
126
  objectName: string;
122
127
  messageType: string;
123
128
  messageId: number;
@@ -700,6 +705,15 @@ declare class ChannelClient {
700
705
  * @returns
701
706
  */
702
707
  getFirstUnreadMessage(conversationType: ConversationType, targetId: string, callback: ICallback<IReceivedMessageV2 | null>): void;
708
+ getMessageByUids(msgUids: string[]): IReceivedMessage[];
709
+ /**
710
+ * 按msgUids批量获取会话内消息
711
+ * @param targetId
712
+ * @param conversationType
713
+ * @param msgUids
714
+ * @returns
715
+ */
716
+ getMessageByMsgUids(targetId: string, conversationType: ConversationType, msgUids: string[]): IReceivedMessage[];
703
717
  /**
704
718
  * 设置会话状态:是否置顶、是否免打扰
705
719
  * @param conversationType
@@ -708,6 +722,8 @@ declare class ChannelClient {
708
722
  * @param callback
709
723
  */
710
724
  setConversationStatus(conversationType: ConversationType, targetId: string, status: IConversationStatus, callback: ICallback): void;
725
+ setConversationsMuteStatus(status: ISetConversationStatusOptions[]): void;
726
+ setConversationsTopStatus(status: ISetConversationStatusOptions[]): void;
711
727
  /**
712
728
  * 发送消息
713
729
  * @param conversationType 会话类型
@@ -758,6 +774,35 @@ declare class ChannelClient {
758
774
  * @param callback
759
775
  */
760
776
  getMessageReader(messageUId: string, targetId: string, callback: ICallback<IMessageReaderResponse>): void;
777
+ /**
778
+ * 设置群语音消息已听状态
779
+ * @param targetId
780
+ * @param channelId
781
+ * @param messageUId
782
+ */
783
+ setGroupVoiceMessagePlayed(targetId: string, messageUId: string, callback: ICallback): void;
784
+ /**
785
+ * 获取群语音消息已听列表
786
+ * @param targetId
787
+ * @param channelId
788
+ * @param messageUId
789
+ */
790
+ getGroupVoiceMessageReader(targetId: string, messageUId: string, callback: ICallback<IMessageReaderResponse>): void;
791
+ /**
792
+ * 设置消息已读
793
+ * @param targetId
794
+ * @param beginMessageUId
795
+ * @param endMessageUId
796
+ * @param callback
797
+ */
798
+ setReadMessages(targetId: string, beginMessageUId: string, endMessageUId: string, callback: ICallback): void;
799
+ /**
800
+ * 获取群已读回执
801
+ * @param messageUId
802
+ * @param targetId
803
+ * @param callback
804
+ */
805
+ getMessageReceiptInfo(messageUId: string, targetId: string, callback: ICallback<IMessageReaderResponse>): void;
761
806
  /**
762
807
  * 更新消息扩展
763
808
  * @param expansionDic 要更新的消息扩展信息键值对
@@ -1099,6 +1144,18 @@ declare class IMClient {
1099
1144
  * @param callback
1100
1145
  */
1101
1146
  setConversationStatus(conversationType: ConversationType, targetId: string, status: IConversationStatus, callback: ICallback): void;
1147
+ /**
1148
+ * 批量设置会话勿扰状态
1149
+ * @param status
1150
+ * @returns
1151
+ */
1152
+ setConversationsMuteStatus(status: ISetConversationStatusOptions[]): void;
1153
+ /**
1154
+ * 批量设置会话置顶状态
1155
+ * @param status
1156
+ * @returns
1157
+ */
1158
+ setConversationsTopStatus(status: ISetConversationStatusOptions[]): void;
1102
1159
  /**
1103
1160
  * 发送消息
1104
1161
  * @param conversationType 会话类型
@@ -1149,6 +1206,36 @@ declare class IMClient {
1149
1206
  * @param callback
1150
1207
  */
1151
1208
  getMessageReader(messageUId: string, targetId: string, callback: ICallback<IMessageReaderResponse>): void;
1209
+ /**
1210
+ * 设置群语音消息已听状态
1211
+ * @param targetId
1212
+ * @param channelId
1213
+ * @param messageUId
1214
+ */
1215
+ setGroupVoiceMessagePlayed(targetId: string, messageUId: string, callback: ICallback): void;
1216
+ /**
1217
+ * 获取群语音消息已听列表
1218
+ * @param targetId
1219
+ * @param channelId
1220
+ * @param messageUId
1221
+ */
1222
+ getGroupVoiceMessageReader(targetId: string, messageUId: string, callback: ICallback<IMessageReaderResponse>): void;
1223
+ /**
1224
+ * 获取群已读列表
1225
+ * @param messageUId
1226
+ * @param targetId
1227
+ * @param callback
1228
+ */
1229
+ getMessageReceiptInfo(messageUId: string, targetId: string, callback: ICallback<IMessageReaderResponse>): void;
1230
+ /**
1231
+ * 设置消息已读
1232
+ * @param targetId
1233
+ * @param channelId
1234
+ * @param beginMessageUId
1235
+ * @param endMessageUId
1236
+ * @param callback
1237
+ */
1238
+ setReadMessages(targetId: string, beginMessageUId: string, endMessageUId: string, callback: ICallback): void;
1152
1239
  /**
1153
1240
  * 更新消息扩展
1154
1241
  * @param expansionDic 要更新的消息扩展信息键值对
@@ -1508,6 +1595,12 @@ declare class IMClient {
1508
1595
  * @param messageId 本地消息 ID 或 messageUId
1509
1596
  */
1510
1597
  getMessage(messageId: number | string, callback: ICallback<IReceivedMessageV2>): void;
1598
+ /**
1599
+ * 设置消息附加信息
1600
+ * @param messageId 本地消息 ID
1601
+ * @param content 内容
1602
+ */
1603
+ setTextMessageExtra(messageId: number, value: string, callback: ICallback<boolean>): void;
1511
1604
  /**
1512
1605
  * 设置消息发送状态
1513
1606
  */
@@ -1596,6 +1689,21 @@ declare class IMClient {
1596
1689
  * @returns
1597
1690
  */
1598
1691
  getFirstUnreadMessage(conversationType: ConversationType, targetId: string, callback: ICallback<IReceivedMessageV2 | null>): void;
1692
+ /**
1693
+ * 按msgUids批量获取消息
1694
+ * @param msgUids
1695
+ * @returns
1696
+ */
1697
+ getMessageByUids(msgUids: string[]): IReceivedMessage[];
1698
+ /**
1699
+ * 按msgUids批量获取会话内消息
1700
+ * @param targetId
1701
+ * @param conversationType
1702
+ * @param msgUids
1703
+ * @returns
1704
+ */
1705
+ getMessageByMsgUids(targetId: string, conversationType: ConversationType, msgUids: string[]): IReceivedMessage[];
1706
+ setMessageSearchContent(messageId: number, content: string): Promise<ErrorCode>;
1599
1707
  /**
1600
1708
  * 获取会话免打扰状态
1601
1709
  * @param conversationType 会话类型
@@ -1620,59 +1728,6 @@ declare class IMClient {
1620
1728
  * @param callback
1621
1729
  */
1622
1730
  getPrivateMessageDeliverTime(messageUId: string, callback: ICallback<number>): void;
1623
- getRTCUserInfoList(room: RTCRoomOption, callback: ICallback<{
1624
- [userId: string]: {
1625
- uris?: string;
1626
- };
1627
- }>): void;
1628
- getRTCUserList(room: RTCRoomOption, callback: ICallback<IRTCUsers>): void;
1629
- setRTCUserInfo(room: RTCRoomOption, info: {
1630
- key: string;
1631
- value: string;
1632
- }, callback: ICallback<boolean>): void;
1633
- removeRTCUserInfo(room: RTCRoomOption, info: {
1634
- keys: string[];
1635
- }, callback: ICallback<boolean>): void;
1636
- getRTCRoomInfo(room: RTCRoomOption, callback: ICallback<IRTCRoomInfo>): void;
1637
- setRTCRoomInfo(room: RTCRoomOption, info: any, callback: ICallback<boolean>): void;
1638
- removeRTCRoomInfo(room: RTCRoomOption, info: any, callback: ICallback<boolean>): void;
1639
- joinRTCRoom(room: RTCRoomOption, callback: ICallback<IJoinRTCRoomData>): void;
1640
- quitRTCRoom(room: RTCRoomOption, callback: ICallback<boolean>): void;
1641
- RTCPing(room: RTCRoomOption, callback: ICallback<boolean>): void;
1642
- setRTCData(roomId: string, key: string, value: string, isInner: boolean, apiType: RTCApiType, callback: ICallback<boolean>, message?: {
1643
- name: string;
1644
- content: string;
1645
- }): void;
1646
- getRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType, callback: ICallback<KVString>): void;
1647
- removeRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType, callback: ICallback<boolean>, message?: {
1648
- name: string;
1649
- content: string;
1650
- }): void;
1651
- setRTCUserData(roomId: string, key: string, value: string, isInner: boolean, callback: ICallback<boolean>, message?: {
1652
- name: string;
1653
- content: string;
1654
- }): void;
1655
- setRTCUserTotalRes(roomId: string, message: {
1656
- name: string;
1657
- content: string;
1658
- }, valueInfo: string, objectName: string, callback: ICallback<boolean>): void;
1659
- getRTCUserData(roomId: string, keys: string[], isInner: boolean, callback: ICallback<KVString>): void;
1660
- removeRTCUserData(roomId: string, keys: string[], isInner: boolean, callback: ICallback<boolean>, message?: {
1661
- name: string;
1662
- content: string;
1663
- }): void;
1664
- setRTCRoomData(roomId: string, key: string, value: string, isInner: boolean, callback: ICallback<boolean>, message?: {
1665
- name: string;
1666
- content: string;
1667
- }): void;
1668
- getRTCRoomData(roomId: string, keys: string[], isInner: boolean, callback: ICallback<KVString>): void;
1669
- removeRTCRoomData(roomId: string, keys: string[], isInner: boolean, callback: ICallback<boolean>, message?: any): void;
1670
- setRTCOutData(roomId: string, data: any, type: number, callback: ICallback<boolean>, message?: any): void;
1671
- getRTCOutData(roomId: string, userIds: string[], callback: ICallback): void;
1672
- getRTCToken(room: RTCRoomOption, callback: ICallback<IRtcTokenData>): void;
1673
- setRTCState(room: RTCRoomOption, content: {
1674
- report: string;
1675
- }, callback: ICallback<boolean>): void;
1676
1731
  }
1677
1732
 
1678
1733
  declare class MessageTag {
@@ -1695,8 +1750,6 @@ declare class MessageTag {
1695
1750
  isPersited: boolean);
1696
1751
  }
1697
1752
 
1698
- declare type IRTCConnectionStatusListener = (status: ErrorCode | ConnectionStatus | RCConnectionStatus) => void;
1699
- declare type IRTCMsgListener = (msg: IReceivedMessageV2) => void;
1700
1753
  declare type ICallLibReceivedMsgListener = {
1701
1754
  onReceived?: (msg: IReceivedMessageV2) => void;
1702
1755
  };
@@ -1806,74 +1859,6 @@ declare const _default$i: {
1806
1859
  * @param searchProps 消息属性名称列表
1807
1860
  */
1808
1861
  registerMessageType(messageType: string, objectName: string, mesasgeTag: MessageTag, searchProps: string[]): void;
1809
- /**
1810
- * RTC Lib 内部使用消息监听器
1811
- */
1812
- messageWatch(watcher: IRTCMsgListener): void;
1813
- /**
1814
- * 为兼容 RTCLib v3 与 CallLib v3,该函数予以保留,用于 RTC Lib 内部监听 IM 连接状态
1815
- * @deprecated
1816
- */
1817
- statusWatch(watcher: IRTCConnectionStatusListener): void;
1818
- /**
1819
- * 兼容 RTC Lib
1820
- */
1821
- MessageType: {
1822
- TextMessage: string;
1823
- ImageMessage: string;
1824
- ReferenceMessage: string;
1825
- DiscussionNotificationMessage: string;
1826
- VoiceMessage: string;
1827
- RichContentMessage: string;
1828
- HandshakeMessage: string;
1829
- UnknownMessage: string;
1830
- LocationMessage: string;
1831
- InformationNotificationMessage: string;
1832
- ContactNotificationMessage: string;
1833
- ProfileNotificationMessage: string;
1834
- CommandNotificationMessage: string;
1835
- CommandMessage: string;
1836
- TypingStatusMessage: string;
1837
- ChangeModeResponseMessage: string;
1838
- ChangeModeMessage: string;
1839
- EvaluateMessage: string;
1840
- HandShakeMessage: string;
1841
- HandShakeResponseMessage: string;
1842
- SuspendMessage: string;
1843
- TerminateMessage: string;
1844
- CustomerContact: string;
1845
- CustomerStatusUpdateMessage: string;
1846
- SyncReadStatusMessage: string;
1847
- ReadReceiptRequestMessage: string;
1848
- ReadReceiptResponseMessage: string;
1849
- FileMessage: string;
1850
- HQVoiceMessage: string;
1851
- GIFMessage: string;
1852
- SightMessage: string;
1853
- AcceptMessage: string;
1854
- RingingMessage: string;
1855
- SummaryMessage: string;
1856
- HungupMessage: string;
1857
- InviteMessage: string;
1858
- MediaModifyMessage: string;
1859
- MemberModifyMessage: string;
1860
- JrmfRedPacketMessage: string;
1861
- JrmfRedPacketOpenedMessage: string;
1862
- GroupNotificationMessage: string;
1863
- PublicServiceRichContentMessage: string;
1864
- PublicServiceMultiRichContentMessage: string;
1865
- PublicServiceCommandMessage: string;
1866
- RecallCommandMessage: string;
1867
- ReadReceiptMessage: string;
1868
- RCCombineMessage: string;
1869
- ChrmKVNotificationMessage: string;
1870
- LogCommandMessage: string;
1871
- };
1872
- /**
1873
- * 兼容 CallLib v3.0 消息监听
1874
- * @deprecated
1875
- */
1876
- _voipProvider: ICallLibReceivedMsgListener;
1877
1862
  };
1878
1863
 
1879
1864
  /**