import { MsgProto } from '@openim/protocol'; import { MixinApiService } from '../..'; import { SDKMessage, ConversationItem, MessageItem, ReadUser } from '../../../types/entity'; declare class MessageCache { private instance; private totalUnreadCount; private cachedNotNotifyConversationIDs; private cachedConversations; private cachedMessages; private cachedFilterMessageSeqs; private cachedGroupMessageReadInfo; private cachedGroupMessageClientMsgIDs; private cachedGroupMessageReadUser; cachedHasReadAndMaxSeqs: Record; constructor(instance: MixinApiService); clear: () => void; getActiveConversationsFromServer: (operationID: string) => Promise; getTotalUnreadCount: () => number; setTotalUnreadCount: (count: number, operationID: string) => void; decreaseTotalUnreadCount: (count: number, operationID: string) => void; getMaxReadSeqs: (operationID: string, conversationIDs?: never[]) => Promise; getSortedConversationIDs: (offset: number, count: number) => string[]; getCachedMaxReadSeq: (conversationID: string) => MsgProto.Seqs | undefined; addCachedMaxReadSeq: (conversationID: string, seqs: MsgProto.Seqs) => void; updateCachedMaxReadSeq: (convesationID: string, seqs: Partial) => void; removeCachedMaxReadSeq: (conversationID: string) => void; getNotNotifyConversationIDs: (operationID: string) => Promise; isNotNotifyConversation: (conversationID: string) => boolean; addNotNotifyConversationID: (conversationID: string) => void; deleteNotNotifyConversationID: (conversationID: string) => void; getCachedConversation: (conversationID: string) => ConversationItem | undefined; getAllCachedConversations: () => ConversationItem[]; setCachedConversations: (conversations: ConversationItem[]) => void; getCachedMessagesBySeqs: (conversationID: string, seqs: number[]) => { cachedMessages: SDKMessage[]; unCachedSeqs: number[]; }; getCachedMessageByClientMsgIDs: (conversationID: string, clientMsgIDs: string[]) => SDKMessage[]; addMessagesToCache: (conversationID: string, messages: SDKMessage[]) => void; deleteMessageFromCache: (conversationID: string, seq: number) => void; clearCachedConversationMessages: (conversationID: string) => void; markCachedMessagesAsRead: (conversationID: string, seqs?: number[]) => void; tryUpdateCachedMessages: (conversationID: string, message: Partial) => SDKMessage | undefined; tryUpdateQuotedMessage: (conversationID: string, clientMsgID: string) => void; addFilterSeqsToCache: (conversationID: string, seqs: number[]) => void; checkIsFilterSeq: (conversationID: string, seq: number) => boolean | undefined; getGroupMessageHasReadInfo: ({ conversationID, messages, operationID, }: { conversationID: string; messages: MessageItem[]; operationID: string; }) => Promise; chearGroupMessageClientMsgIDs: () => void; addGroupMessageReadUser: (clientMsgID: string, readUsers: ReadUser[]) => void; getGroupMessageReadUser: (clientMsgID: string) => ReadUser[]; } export default MessageCache;