import { default as Fuse } from 'fuse.js';
export type ReqType = {
    url: URL;
    query: Record<string, any>;
    method: string;
};
export type OnlineStatus = "online" | "offline";
export interface MessagePaginationMeta {
    per_page: number;
    affix: "prepend" | "append";
    id?: string;
    sent_at?: number;
}
export interface ConversationPaginationMeta {
    per_page: number;
    page: number;
}
export interface Message {
    id: string;
    conversationId: string;
    receiver: string;
    receiverType: string;
    sentAt: number;
    type: string;
    parentId?: string;
    data?: any;
}
export interface Conversation {
    conversationId: string;
    conversationWith: Group;
    updatedAt: number;
}
export interface Group {
    guid: string;
    name: string;
    hasJoined: boolean | undefined;
}
export interface PaginatedResponse<T> {
    data: T[];
    total: number;
}
export interface OfflineStore {
    fuseConversations: Fuse<Conversation>;
    fuseMessages: Fuse<Message>;
    getGroupMessages(groupId: string, pagination: MessagePaginationMeta): PaginatedResponse<Message>;
    getThreadMessages(parentId: string, pagination: MessagePaginationMeta): PaginatedResponse<Message>;
    getMessage(messageId: string): {
        data: Message;
    };
    saveMessages(messages: Message[]): void;
    purgeMessages(keepByConversationIds: string[]): void;
    getConversations(pagination: ConversationPaginationMeta): PaginatedResponse<Conversation>;
    saveConversations(conversations: Conversation[]): void;
    purgeConversations(keepConversationIds: string[]): void;
    getGroup(groupId: string): Group | null;
    saveGroup(group: Group): void;
    purgeGroups(keepGroupIds: string[]): void;
}
