@rongcloud/imlib-next 5.9.2 → 5.9.3

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,5 +1,5 @@
1
- import { FileType, APIContext, LogLevel, EnableLogL, IRuntime, AreaCode, ConversationType, MessageDirection, ReceivedStatus, SentStatus, IReadReceiptInfo, IPushConfig, UltraGroupChannelType, RCConnectionStatus, IPluginGenerator, IAsyncRes, NotificationStatus, NotificationLevel, IUltraUnreadMsg, IUserProfile, IConversationOption, ITypingMessage, IUpdateItem, ErrorCode, IChatroomListenerData, IExpansionListenerData, IBlockedMessageInfo, IOperateStatusNotify, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUserGroupStatusInfo, IMessageDeliver, IGroupMessageDeliverStatus, IReadReceiptData, ISyncReadStatusData, IBaseConversationInfo, IConversationState as IConversationState$1, IGetUltraGroupListOption, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadMentionedOption, IUltraGroupUnreadInfo, IChatroomJoinResponse, IChatroomInfo, IChatRoomEntry, IChatroomEntries, IRemoveChatRoomEntry, IRemoveChatRoomEntries, IRTCRoomBindOption, MentionedInfoBody, ICombineV2MessageContent, IMessageReadReceiptV4Response, IGroupReadReceiptData, IClearMessageOption, IMessageReaderResponse, IFirstUnreadMessageInfo, IReceivedMessage, IReceivedConversation, ITagParam, ITagInfo, IConversationTag, IUploadAuth, IDownloadAuth, UploadMethod, IInsertMessage, IGroupMessageDeliverInfo, IProxy, IPromiseResult, IResponse } from '@rongcloud/engine';
2
- export { AreaCode, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, ConnectionStatus, ConversationType, EnableLogL, ErrorCode, FileType, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListenerData, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IClearMessageOption, ICombineV2MessageContent, ICombinedMessage, IConversationIdentifier, IConversationOption, IConversationTag, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEventListener, IExpansionListenerData, IFirstUnreadMessageInfo, IGetUltraGroupListOption, IGooglePushConfig, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IGroupReadReceiptData, IInsertMessage, IMessageDeliver, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPrivateReadReceiptData, IPromiseResult, IProxy, IPushConfig, IRTCRoomBindOption, IReadReceiptData, IReadReceiptInfo, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IResponse, ISyncReadStatusData, ITagInfo, ITagParam, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraUnreadMsg, IUpdateItem, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IiOSPushConfig, InterruptionLevel, LogL, LogLevel, MentionedInfoBody, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, NotificationLevel, NotificationStatus, OperateStatus, PushImportanceHonor, RCConnectionStatus, ReceivedStatus, SentStatus, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod } from '@rongcloud/engine';
1
+ import { FileType, APIContext, LogLevel, EnableLogL, IRuntime, AreaCode, ConversationType, MessageDirection, ReceivedStatus, IReceivedStatusInfo, SentStatus, IReadReceiptInfo, IPushConfig, UltraGroupChannelType, RCConnectionStatus, IPluginGenerator, IAsyncRes, NotificationStatus, NotificationLevel, IUltraUnreadMsg, IUserProfile, IConversationOption, ITypingMessage, IUpdateItem, ErrorCode, IChatroomListenerData, IExpansionListenerData, IBlockedMessageInfo, IOperateStatusNotify, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUserGroupStatusInfo, IMessageDeliver, IGroupMessageDeliverStatus, IReadReceiptData, ISyncReadStatusData, IBaseConversationInfo, IConversationState as IConversationState$1, IGetUltraGroupListOption, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadMentionedOption, IUltraGroupUnreadInfo, IChatroomJoinResponse, IChatroomInfo, IChatRoomEntry, IChatroomEntries, IRemoveChatRoomEntry, IRTCRoomBindOption, MentionedInfoBody, ICombineV2MessageContent, IMessageReadReceiptV4Response, IGroupReadReceiptData, IClearMessageOption, IMessageReaderResponse, IFirstUnreadMessageInfo, IReceivedMessage, IReceivedConversation, ITagParam, ITagInfo, IConversationTag, IUploadAuth, IDownloadAuth, UploadMethod, IInsertMessage, IGroupMessageDeliverInfo, IProxy, IPromiseResult, IResponse } from '@rongcloud/engine';
2
+ export { AreaCode, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, ConnectionStatus, ConversationType, EnableLogL, ErrorCode, FileType, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListenerData, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IClearMessageOption, ICombineV2MessageContent, ICombinedMessage, IConversationIdentifier, IConversationOption, IConversationTag, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEventListener, IExpansionListenerData, IFirstUnreadMessageInfo, IGetUltraGroupListOption, IGooglePushConfig, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IGroupReadReceiptData, IInsertMessage, IMessageDeliver, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPrivateReadReceiptData, IPromiseResult, IProxy, IPushConfig, IRTCRoomBindOption, IReadReceiptData, IReadReceiptInfo, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IResponse, ISyncReadStatusData, ITagInfo, ITagParam, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraUnreadMsg, IUpdateItem, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IiOSPushConfig, InterruptionLevel, LogL, LogLevel, MentionedInfoBody, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, NotificationLevel, NotificationStatus, OperateStatus, PushImportanceHonor, RCConnectionStatus, ReceivedStatus, SentStatus, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod } from '@rongcloud/engine';
3
3
 
4
4
  interface IThumbnailConfig {
5
5
  maxHeight?: number;
@@ -228,8 +228,15 @@ interface IAReceivedMessage {
228
228
  } | null;
229
229
  /**
230
230
  * 消息接收状态
231
+ * 只能表示单一状态,推荐使用 receivedStatusInfo 来判断接收消息状态
232
+ * @deprecated
231
233
  */
232
234
  receivedStatus: ReceivedStatus;
235
+ /**
236
+ * 消息接收状态详情
237
+ * 推荐使用, receivedStatusInfo 值更详细,能同时表示多个接收状态
238
+ */
239
+ receivedStatusInfo: IReceivedStatusInfo;
233
240
  /**
234
241
  * 消息的发送状态,Electron 平台可由 SDK 内自动更新和用户设置,
235
242
  * web 端仅支持 SDK 内更新为 发送中、已发送和发送失败
@@ -483,6 +490,14 @@ declare enum Events {
483
490
  */
484
491
  USER_GROUP_STATUS = "USER_GROUP_STATUS"
485
492
  }
493
+ /**
494
+ * 消息审核状态
495
+ * @category Enum
496
+ */
497
+ declare enum MessageAuditType {
498
+ DISALLOW = 0,
499
+ ALLOW = 1
500
+ }
486
501
 
487
502
  /**
488
503
  * 上传任务
@@ -724,6 +739,10 @@ interface ISendMessageOptions {
724
739
  * 正常发消息时无需传该参数。
725
740
  */
726
741
  messageId?: number;
742
+ /**
743
+ * 消息审核配置
744
+ */
745
+ auditInfo?: IAuditInfo;
727
746
  }
728
747
  /**
729
748
  * 文件消息配置
@@ -799,6 +818,26 @@ interface IExtraData {
799
818
  */
800
819
  extra?: string;
801
820
  }
821
+ /**
822
+ * @category Interface
823
+ * 消息审核配置
824
+ */
825
+ interface IAuditInfo {
826
+ audit?: {
827
+ /**
828
+ * 发送方指定是否送审, 1:送审(默认值),0:不送审
829
+ */
830
+ auditType?: MessageAuditType;
831
+ /**
832
+ * 项目名称, 默认为空字符串
833
+ */
834
+ project?: string;
835
+ /**
836
+ * 策略映射字段
837
+ */
838
+ strategy?: string;
839
+ };
840
+ }
802
841
  /**
803
842
  * @category Interface
804
843
  */
@@ -888,6 +927,10 @@ interface IReadReceiptReceivedEvent {
888
927
  * 消息发送时间
889
928
  */
890
929
  sentTime: number;
930
+ /**
931
+ * 发送者ID
932
+ */
933
+ sendUserId: string;
891
934
  }
892
935
  interface IMessageReceiptRequestEvent {
893
936
  /**
@@ -1454,7 +1497,10 @@ declare function removeChatRoomEntry(targetId: string, options: IRemoveChatRoomE
1454
1497
  * @param entries[] 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
1455
1498
  * @param notificationExtra? RC:chrmKVNotiMsg 通知消息中携带的附加信息
1456
1499
  */
1457
- declare function removeChatRoomEntries(targetId: string, options: IRemoveChatRoomEntries): Promise<IAsyncRes<void>>;
1500
+ declare function removeChatRoomEntries(targetId: string, options: {
1501
+ entries: string[];
1502
+ notificationExtra?: string;
1503
+ }): Promise<IAsyncRes<void>>;
1458
1504
  /**
1459
1505
  * 强制删除聊天室内的任意属性
1460
1506
  * @category 聊天室
@@ -1523,7 +1569,7 @@ interface IMentionedInfo {
1523
1569
  * 图片消息
1524
1570
  * @category Interface
1525
1571
  */
1526
- interface IImageMessageBody extends IExtraData, IMentionedInfo, IUserInfo {
1572
+ interface IImageMessageBody extends IExtraData, IMentionedInfo, IUserInfo, IAuditInfo {
1527
1573
  /**
1528
1574
  * 图片的略缩图
1529
1575
  * @description
@@ -1543,7 +1589,7 @@ declare const _default$e: MessageConstructor<IImageMessageBody>;
1543
1589
  * 图片消息
1544
1590
  * @category Interface
1545
1591
  */
1546
- interface IHQVoiceMessageBody extends IUserInfo, IExtraData, IMentionedInfo {
1592
+ interface IHQVoiceMessageBody extends IUserInfo, IExtraData, IMentionedInfo, IAuditInfo {
1547
1593
  /**
1548
1594
  * 远程媒体资源地址
1549
1595
  */
@@ -1563,7 +1609,7 @@ declare const _default$d: MessageConstructor<IHQVoiceMessageBody>;
1563
1609
  * 短视频消息
1564
1610
  * @category Interface
1565
1611
  */
1566
- interface ISightMessageBody extends IExtraData, IMentionedInfo, IUserInfo {
1612
+ interface ISightMessageBody extends IExtraData, IMentionedInfo, IUserInfo, IAuditInfo {
1567
1613
  /**
1568
1614
  * 远程视频资源 url 地址
1569
1615
  */
@@ -1592,7 +1638,7 @@ declare const _default$c: MessageConstructor<ISightMessageBody>;
1592
1638
  * 文本消息
1593
1639
  * @category Interface
1594
1640
  */
1595
- interface ITextMessageBody extends IUserInfo, IExtraData, IMentionedInfo {
1641
+ interface ITextMessageBody extends IUserInfo, IExtraData, IMentionedInfo, IAuditInfo {
1596
1642
  /**
1597
1643
  * 文本消息内容
1598
1644
  */
@@ -1654,7 +1700,7 @@ declare const _default$8: MessageConstructor<IFileMessageBody>;
1654
1700
  /**
1655
1701
  * @category Interface
1656
1702
  */
1657
- interface IGIFMessageBody extends IExtraData, IUserInfo, IMentionedInfo {
1703
+ interface IGIFMessageBody extends IExtraData, IUserInfo, IMentionedInfo, IAuditInfo {
1658
1704
  /**
1659
1705
  * GIF 图片文件大小,单位为 Byte
1660
1706
  */
@@ -1677,7 +1723,7 @@ declare const _default$7: MessageConstructor<IGIFMessageBody>;
1677
1723
  /**
1678
1724
  * @category Interface
1679
1725
  */
1680
- interface IVoiceMessageBody extends IExtraData, IMentionedInfo, IUserInfo {
1726
+ interface IVoiceMessageBody extends IExtraData, IMentionedInfo, IUserInfo, IAuditInfo {
1681
1727
  content: string;
1682
1728
  duration: number;
1683
1729
  extra: string;
@@ -1710,7 +1756,7 @@ declare const _default$5: MessageConstructor<ILocationMessageBody>;
1710
1756
  /**
1711
1757
  * @category Interface
1712
1758
  */
1713
- interface IReferenceMessageBody extends IExtraData, IMentionedInfo, IUserInfo {
1759
+ interface IReferenceMessageBody extends IExtraData, IMentionedInfo, IUserInfo, IAuditInfo {
1714
1760
  /**
1715
1761
  * 被引用消息的发送用户 Id
1716
1762
  */
@@ -1816,7 +1862,7 @@ declare function sendMessage(conversation: IConversationOption, message: BaseMes
1816
1862
  declare function sendTextMessage(conversation: IConversationOption, messageBody: ITextMessageBody, options?: ISendMessageOptions): Promise<IAsyncRes<IAReceivedMessage>>;
1817
1863
  declare type ISendBody = IUserInfo & IExtraData & {
1818
1864
  file: File;
1819
- } & IMentionedInfo;
1865
+ } & IMentionedInfo & IAuditInfo;
1820
1866
  declare type ISendFileMessageOptions = ISendBody;
1821
1867
  /**
1822
1868
  * 发送文件消息
@@ -2412,8 +2458,15 @@ declare function setMessageStatusToRead(conversation: IConversationOption, times
2412
2458
  * 设置对方发送的消息 自己的接受状态
2413
2459
  * @param messageId 消息 ID
2414
2460
  * @param receivedStatus 接受状态
2461
+ * @deprecated 建议使用 setMessageReceivedStatusInfo, 支持设置多种状态
2415
2462
  */
2416
2463
  declare function setMessageReceivedStatus(messageId: number, receivedStatus: ReceivedStatus): Promise<IAsyncRes<void>>;
2464
+ /**
2465
+ * 设置对方发送的消息 自己的接受状态信息
2466
+ * @param messageId
2467
+ * @param receivedStatusInfo
2468
+ */
2469
+ declare function setMessageReceivedStatusInfo(messageId: number, receivedStatusInfo: IReceivedStatusInfo): Promise<IAsyncRes<void>>;
2417
2470
  /**
2418
2471
  * 设置自己发送的消息的发送状态
2419
2472
  * @param messageId 消息ID
@@ -2522,7 +2575,7 @@ declare function getGroupMessageDeliverList(targetId: string, messageUId: string
2522
2575
  * @returns data => true: 成功,false: 失败
2523
2576
  *
2524
2577
  */
2525
- declare function setCheckDuplicateMessage(enableCheck: boolean): Promise<IAsyncRes<boolean>>;
2578
+ declare function setCheckDuplicateMessage(enableCheck?: boolean): Promise<IAsyncRes<boolean>>;
2526
2579
 
2527
2580
  /**
2528
2581
  * 清除本地数据, 包括消息列表、会话列表、拉取消息的时间戳
@@ -2544,6 +2597,7 @@ declare const index_searchMessagesByUser: typeof searchMessagesByUser;
2544
2597
  declare const index_getHistoryMessagesByMessageTypes: typeof getHistoryMessagesByMessageTypes;
2545
2598
  declare const index_setMessageStatusToRead: typeof setMessageStatusToRead;
2546
2599
  declare const index_setMessageReceivedStatus: typeof setMessageReceivedStatus;
2600
+ declare const index_setMessageReceivedStatusInfo: typeof setMessageReceivedStatusInfo;
2547
2601
  declare const index_setMessageSentStatus: typeof setMessageSentStatus;
2548
2602
  declare const index_setMessageContent: typeof setMessageContent;
2549
2603
  declare const index_deleteMessages: typeof deleteMessages;
@@ -2569,6 +2623,7 @@ declare namespace index {
2569
2623
  index_getHistoryMessagesByMessageTypes as getHistoryMessagesByMessageTypes,
2570
2624
  index_setMessageStatusToRead as setMessageStatusToRead,
2571
2625
  index_setMessageReceivedStatus as setMessageReceivedStatus,
2626
+ index_setMessageReceivedStatusInfo as setMessageReceivedStatusInfo,
2572
2627
  index_setMessageSentStatus as setMessageSentStatus,
2573
2628
  index_setMessageContent as setMessageContent,
2574
2629
  index_deleteMessages as deleteMessages,