import type { WhatsAppContactPayload, InviteV4Data, WhatsAppMessagePayload } from '../schema/whatsapp-type.js';
import { Friendship } from '@juzi/wechaty-puppet/payloads';
export declare class CacheManager {
    /**
     * ************************************************************************
     *                Static Methods
     * ************************************************************************
     */
    private static _instance?;
    static get Instance(): CacheManager;
    static init(userId: string): Promise<void>;
    static release(): Promise<void>;
    /**
     * ************************************************************************
     *                Instance Methods
     * ************************************************************************
     */
    private cacheMessageRawPayload?;
    private cacheContactOrRoomRawPayload?;
    private cacheRoomMemberIdList?;
    private cacheRoomInvitationRawPayload?;
    private cacheLatestMessageTimestampForChat?;
    private cacheFriendshipRawPayload?;
    /**
     * -------------------------------
     * Message Cache Section
     * --------------------------------
     */
    getMessageRawPayload(id: string): Promise<{
        mentionedIds: string[];
        location?: import("@juzi/whatsapp-web.js").Location | undefined;
        orderId?: string | undefined;
        id: import("../schema/whatsapp-type.js").MessageId;
        _data?: any;
        description?: string | undefined;
        type: import("@juzi/whatsapp-web.js").MessageTypes;
        ack: import("@juzi/whatsapp-web.js").MessageAck;
        author?: string | undefined;
        deviceType: string;
        body: string;
        broadcast: boolean;
        isStatus: boolean;
        isGif: boolean;
        isEphemeral: boolean;
        from: string;
        fromMe: boolean;
        hasMedia: boolean;
        hasQuotedMsg: boolean;
        isForwarded: boolean;
        forwardingScore: number;
        isStarred: boolean;
        vCards: string[];
        inviteV4?: InviteV4Data | undefined;
        mediaKey?: string | undefined;
        groupMentions: {
            groupSubject: string;
            groupJid: string;
        }[];
        timestamp: number;
        to: string;
        links: {
            link: string;
            isSuspicious: boolean;
        }[];
        title?: string | undefined;
        businessOwnerJid?: string | undefined;
        productId?: string | undefined;
        latestEditSenderTimestampMs?: number | undefined;
        latestEditMsgKey?: import("@juzi/whatsapp-web.js").MessageId | undefined;
        dynamicReplyButtons?: object | undefined;
        selectedButtonId?: string | undefined;
        selectedRowId?: string | undefined;
        pollName: string;
        pollOptions: string[];
        allowMultipleAnswers: boolean;
        urlLink?: import("@juzi/whatsapp-web.js").UrlLink | undefined;
        productMessage?: import("@juzi/whatsapp-web.js").ProductMessage | undefined;
    } | undefined>;
    setMessageRawPayload(id: string, payload: WhatsAppMessagePayload): Promise<void>;
    deleteMessage(id: string): Promise<boolean>;
    private getMessageCache;
    /**
     * -------------------------------
     * Contact And Room Cache Section
     * --------------------------------
     */
    getContactOrRoomRawPayload(id: string): Promise<WhatsAppContactPayload | undefined>;
    setContactOrRoomRawPayload(id: string, payload: WhatsAppContactPayload): Promise<void>;
    deleteContactOrRoom(id: string): Promise<boolean>;
    private getContactOrRoomCache;
    getContactIdList(): Promise<string[]>;
    getRoomIdList(): Promise<string[]>;
    /**
     * -------------------------------
     * Room Member Cache Section
     * --------------------------------
     */
    getRoomMemberIdList(roomId: string): Promise<string[]>;
    setRoomMemberIdList(roomId: string, list: string[]): Promise<void>;
    addRoomMemberToList(roomId: string, memberIds: string | string[]): Promise<void>;
    removeRoomMemberFromList(roomId: string, memberIds: string | string[]): Promise<void>;
    deleteRoomMemberIdList(roomId: string): Promise<void>;
    private getRoomMemberCache;
    /**
     * -------------------------------
     * Room Invitation Cache Section
     * --------------------------------
     */
    getRoomInvitationRawPayload(id: string): Promise<Partial<InviteV4Data> | undefined>;
    setRoomInvitationRawPayload(id: string, payload: Partial<InviteV4Data>): Promise<void>;
    deleteRoomInvitation(id: string): Promise<boolean>;
    private getRoomInvitationCache;
    /**
     * -------------------------------
     * Message Cache Section
     * --------------------------------
     */
    /**
     * get timestamp of the latest message for contact or room, if timestamp is not in cache, return Number.MAX_SAFE_INTEGER
     * @param {string} id message id
     * @returns {number} timestamp or Number.MAX_SAFE_INTEGER
     */
    getLatestMessageTimestampForChat(id: string): Promise<number>;
    setLatestMessageTimestampForChat(id: string, num: number): Promise<void>;
    private getLatestMessageTimestampForChatCache;
    /**
     * -------------------------------
     * Friendship Cache Section
     * --------------------------------
     */
    getFriendshipRawPayload(id: string): Promise<Friendship | undefined>;
    setFriendshipRawPayload(id: string, payload: Friendship): Promise<void>;
    deleteFriendship(id: string): Promise<boolean>;
    private getFriendshipCache;
    /**
     * -------------------------------
     * Private Method Section
     * --------------------------------
     */
    private initCache;
    private releaseCache;
}
//# sourceMappingURL=cache-manager.d.ts.map