import { ChatMessageItem, TChatItem, TTagOrStatusItem, UserItem } from '../store/type';
export declare function getCachedChats(): Promise<TChatItem[]>;
export declare function persistChats(chats: TChatItem[]): Promise<void>;
export declare function persistChat(chat: TChatItem): Promise<void>;
export declare function isChatCacheStale(): Promise<boolean>;
export declare function updateChatSyncState(): Promise<void>;
export declare function getCachedMessages(chatId: string): Promise<ChatMessageItem[]>;
export declare function persistMessages(chatId: string, messages: ChatMessageItem[]): Promise<void>;
export declare function persistMessage(chatId: string, message: ChatMessageItem): Promise<void>;
export declare function updateMessageSyncState(chatId: string): Promise<void>;
export declare function getMessageSyncState(chatId: string): Promise<{
    last_sync_at: number;
    business_id: string;
    shop_id: string;
    older_next?: string | null;
    older_prev?: string | null;
    newer_next?: string | null;
    newer_prev?: string | null;
}>;
export declare function invalidateMessageSyncState(chatId: string): Promise<void>;
export declare function isMessageCacheStale(chatId: string): Promise<boolean>;
export declare function getCachedUser(channel: string, userId: string): Promise<UserItem | null>;
export declare function persistUser(channel: string, userId: string, user: UserItem): Promise<void>;
export declare function invalidateCachedUser(channel: string, userId: string): Promise<void>;
export declare function getCachedMetadata<T>(type: string): Promise<T | null>;
export declare function persistMetadata(type: string, data: TTagOrStatusItem[] | unknown): Promise<void>;
export declare function invalidateMetadata(type: string): Promise<void>;
export declare function getCachedMedia(channel: string, sessionId: string, messageId: string): Promise<{
    arrayBuffer: ArrayBuffer;
    contentType: string;
} | null>;
export declare function persistMedia(channel: string, sessionId: string, messageId: string, arrayBuffer: ArrayBuffer, contentType: string): Promise<void>;
export declare function clearAllCache(): Promise<void>;
