import { PuppetCacheStoreOptions } from 'wechaty-puppet-cache'; import { PadplusContactPayload, PadplusRoomPayload, PadplusRoomInvitationPayload, PadplusRoomMemberMap, PadplusMessagePayload } from '../schemas'; import { FriendshipPayload } from 'wechaty-puppet'; export declare class CacheManager { /** * ************************************************************************ * Static Methods * ************************************************************************ */ private static _instance?; static get Instance(): CacheManager; static init(userId: string, cacheOption?: PuppetCacheStoreOptions): Promise; static release(): Promise; /** * ************************************************************************ * Instance Methods * ************************************************************************ */ private cacheImageMessageRawPayload?; private cacheContactRawPayload?; private cacheRoomMemberRawPayload?; private cacheRoomRawPayload?; private cacheRoomInvitationRawPayload?; private cacheFriendshipRawPayload?; private compactCacheTimer?; /** * ------------------------------- * Message Section * -------------------------------- */ getMessage(messageId: string): Promise; setMessage(contactId: string, payload: PadplusMessagePayload): Promise; /** * ------------------------------- * Contact Section * -------------------------------- */ getContact(contactId: string): Promise; setContact(contactId: string, payload: PadplusContactPayload): Promise; deleteContact(contactId: string): Promise; getContactIds(): Promise; getAllContacts(): Promise; hasContact(contactId: string): Promise; getContactCount(): Promise; /** * ------------------------------- * Room Section * -------------------------------- */ getRoom(roomId: string): Promise; setRoom(roomId: string, payload: PadplusRoomPayload): Promise; deleteRoom(roomId: string): Promise; getRoomIds(): Promise; getRoomCount(): Promise; hasRoom(roomId: string): Promise; /** * ------------------------------- * Room Member Section * -------------------------------- */ getRoomMember(roomId: string): Promise; setRoomMember(roomId: string, payload: PadplusRoomMemberMap): Promise; deleteRoomMember(roomId: string): Promise; /** * ------------------------------- * Room Invitation Section * ------------------------------- */ getRoomInvitation(messageId: string): Promise; setRoomInvitation(messageId: string, payload: PadplusRoomInvitationPayload): Promise; deleteRoomInvitation(messageId: string): Promise; /** * ------------------------------- * Friendship Cache Section * -------------------------------- */ getFriendshipRawPayload(id: string): Promise; setFriendshipRawPayload(id: string, payload: FriendshipPayload): Promise; /** * ------------------------------- * Private Method Section * -------------------------------- */ private initCache; private releaseCache; } //# sourceMappingURL=cache-manager.d.ts.map