import type * as PUPPET from "wechaty-puppet"; import type PadLocal from "padlocal-client-ts/dist/proto/padlocal_pb.js"; export type RoomMemberMap = { [contactId: string]: PadLocal.ChatRoomMember.AsObject; }; export declare class CacheManager { private readonly _userName; private _messageCache?; private _messageRevokeCache?; private _contactCache?; private _contactSearchCache?; private _contactStrangerAliasCache?; private _roomCache?; private _roomMemberCache?; private _roomInvitationCache?; private _friendshipCache?; private _labelList?; constructor(userName: string); init(): Promise; close(): Promise; /** * ------------------------------- * Message Section * -------------------------------- */ getMessage(messageId: string): Promise; setMessage(messageId: string, payload: PadLocal.Message.AsObject): Promise; hasMessage(messageId: string): Promise; getMessageRevokeInfo(messageId: string): Promise; setMessageRevokeInfo(messageId: string, messageSendResult: PadLocal.MessageRevokeInfo.AsObject): Promise; /** * ------------------------------- * Contact Section * -------------------------------- */ getContact(contactId: string): Promise; setContact(contactId: string, payload: PadLocal.Contact.AsObject): Promise; deleteContact(contactId: string): Promise; getContactIds(): Promise; getAllContacts(): Promise; hasContact(contactId: string): Promise; getContactCount(): Promise; /** * contact search */ getContactSearch(id: string): Promise; setContactSearch(id: string, payload: PadLocal.SearchContactResponse.AsObject): Promise; hasContactSearch(id: string): Promise; getContactStrangerAlias(encryptedUserName: string): Promise; setContactStrangerAlias(encryptedUserName: string, alias: string): Promise; deleteContactStrangerAlias(encryptedUserName: string): Promise; /** * ------------------------------- * Room Section * -------------------------------- */ getRoom(roomId: string): Promise; setRoom(roomId: string, payload: PadLocal.Contact.AsObject): Promise; deleteRoom(roomId: string): Promise; getRoomIds(): Promise; getRoomCount(): Promise; hasRoom(roomId: string): Promise; /** * ------------------------------- * Room Member Section * -------------------------------- */ getRoomMember(roomId: string): Promise; setRoomMember(roomId: string, payload: RoomMemberMap): Promise; deleteRoomMember(roomId: string): Promise; /** * ------------------------------- * Room Invitation Section * ------------------------------- */ getRoomInvitation(messageId: string): Promise; setRoomInvitation(messageId: string, payload: PUPPET.payloads.RoomInvitation): Promise; deleteRoomInvitation(messageId: string): Promise; /** * ------------------------------- * Friendship Cache Section * -------------------------------- */ getFriendshipRawPayload(id: string): Promise; setFriendshipRawPayload(id: string, payload: PUPPET.payloads.Friendship): Promise; getLabelList(): PadLocal.Label[] | undefined; setLabelList(labelList: PadLocal.Label[]): void; } //# sourceMappingURL=cache-manager.d.ts.map