Home > borogove > persistence > IDB

persistence.IDB() function

Signature:

declare function _default(dbname: any, media: any, tokenize: any, stemmer: any): Promise<{
    syncPoint: (account: any, chatId: any) => Promise<import markdown="1"("./borogove.js").borogove_ChatMessage>;
    storeChats: (account: any, chats: any) => void;
    getChats: (account: any) => Promise<any markdown="1"[]>;
    storeMembers(account: any, chatId: any, members: any): Promise<boolean markdown="1">;
    storeMemberUpdates(account: any, chat: any, updates: any, isFullList: any): Promise<any markdown="1"[]>;
    clearMemberPresence(account: any, chatId: any): Promise<boolean markdown="1">;
    getMembers(account: any, chat: any, forModerator: any): Promise<any markdown="1"[]>;
    getMemberDetails(account: any, chat: any, ids: any): Promise<any markdown="1"[]>;
    getChatUnreadDetails: (account: any, chat: any) => Promise<{
        message: import("./borogove.js").borogove_ChatMessage;
        unreadCount: number;
    }>;
    getChatsUnreadDetails: (account: any, chatsArray: any) => Promise<any markdown="1"[]>;
    getMessage: (account: any, chatId: any, serverId: any, localId: any) => Promise<import markdown="1"("./borogove.js").borogove_ChatMessage>;
    storeReaction: (account: any, update: any) => Promise<import markdown="1"("./borogove.js").borogove_ChatMessage>;
    storeMessages(account: any, messages: any): Promise<any markdown="1"[]>;
    storeMessage: (account: any, message: any, callback: any) => void;
    updateMessage: (account: any, message: any) => void;
    updateMessageStatus: (account: any, localId: any, status: any, statusText: any) => Promise<import markdown="1"("./borogove.js").borogove_ChatMessage>;
    getMessagesBefore: (account: any, chatId: any, before: any) => Promise<import markdown="1"("./borogove.js").borogove_ChatMessage[]>;
    getMessagesAfter: (account: any, chatId: any, after: any) => Promise<import markdown="1"("./borogove.js").borogove_ChatMessage[]>;
    getMessagesAround: (account: any, around: any) => Promise<import markdown="1"("./borogove.js").borogove_ChatMessage[]>;
    getMessagesFromCursor: (cursor: any, notIncluding: any, filter: any) => Promise<import markdown="1"("./borogove.js").borogove_ChatMessage[]>;
    searchMessages: (account: any, chatId: any, q: any) => Promise<import markdown="1"("./borogove.js").borogove_ChatMessage[]>;
    hasMedia: (hashAlgorithm: any, hash: any) => any;
    removeMedia: (hashAlgorithm: any, hash: any) => any;
    storeMedia: (mime: any, buffer: any) => any;
    storeCaps: (caps: any) => void;
    getCaps: (ver: any) => Promise<borogove markdown="1"_Caps>;
    storeLogin(login: any, clientId: any, displayName: any, token: any): Promise<boolean markdown="1">;
    storeOmemoId: (account: any, omemoId: any) => void;
    storeOmemoIdentityKey: (account: any, keypair: any) => void;
    storeOmemoDeviceList: (chatId: any, deviceIds: any) => void;
    getOmemoDeviceList: (chatId: any, callback: any) => void;
    storeOmemoPreKey: (account: any, keyId: any, keyPair: any) => void;
    removeOmemoPreKey: (account: any, keyId: any) => void;
    getOmemoPreKey: (account: any, keyId: any, callback: any) => void;
    getOmemoPreKeys: (account: any, callback: any) => void;
    storeStreamManagement(account: any, sm: any, sortId: any): Promise<boolean markdown="1">;
    getStreamManagement(account: any): Promise<{
        sm: any;
        sortId: any;
    }>;
    getLogin: (login: any) => Promise<{
        clientId: any;
        token: any;
        fastCount: any;
        displayName: any;
    }>;
    getOmemoId: (account: any, callback: any) => void;
    getOmemoIdentityKey: (account: any, callback: any) => void;
    getOmemoSignedPreKey: (account: any, keyId: any, callback: any) => void;
    storeOmemoSignedPreKey: (account: any, signedKey: any) => void;
    removeAccount(account: any, completely: any): Promise<boolean markdown="1">;
    listAccounts(): Promise<any markdown="1">;
    storeService(account: any, serviceId: any, name: any, node: any, caps: any): void;
    findServicesWithFeature(account: any, feature: any): Promise<any markdown="1"[]>;
    getOmemoContactIdentityKey: (account: any, address: any, callback: any) => void;
    storeOmemoContactIdentityKey: (account: any, address: any, identityKey: any) => void;
    getOmemoSession: (account: any, address: any, callback: any) => void;
    storeOmemoSession: (account: any, address: any, session: any) => void;
    storeOmemoMetadata: (account: any, address: any, metadata: any) => void;
    getOmemoMetadata: (account: any, address: any, callback: any) => void;
    removeOmemoSession: (account: any, address: any) => void;
    get(k: any): Promise<any markdown="1">;
    set(k: any, v: any): Promise<any markdown="1">;
}>;

Parameters

Parameter Type Description
dbname any
media any
tokenize any
stemmer any

Returns:

Promise<{ syncPoint: (account: any, chatId: any) => Promise<import("./borogove.js").borogove_ChatMessage>; storeChats: (account: any, chats: any) => void; getChats: (account: any) => Promise<any[]>; storeMembers(account: any, chatId: any, members: any): Promise<boolean>; storeMemberUpdates(account: any, chat: any, updates: any, isFullList: any): Promise<any[]>; clearMemberPresence(account: any, chatId: any): Promise<boolean>; getMembers(account: any, chat: any, forModerator: any): Promise<any[]>; getMemberDetails(account: any, chat: any, ids: any): Promise<any[]>; getChatUnreadDetails: (account: any, chat: any) => Promise<{ message: import("./borogove.js").borogove_ChatMessage; unreadCount: number; }>; getChatsUnreadDetails: (account: any, chatsArray: any) => Promise<any[]>; getMessage: (account: any, chatId: any, serverId: any, localId: any) => Promise<import("./borogove.js").borogove_ChatMessage>; storeReaction: (account: any, update: any) => Promise<import("./borogove.js").borogove_ChatMessage>; storeMessages(account: any, messages: any): Promise<any[]>; storeMessage: (account: any, message: any, callback: any) => void; updateMessage: (account: any, message: any) => void; updateMessageStatus: (account: any, localId: any, status: any, statusText: any) => Promise<import("./borogove.js").borogove_ChatMessage>; getMessagesBefore: (account: any, chatId: any, before: any) => Promise<import("./borogove.js").borogove_ChatMessage[]>; getMessagesAfter: (account: any, chatId: any, after: any) => Promise<import("./borogove.js").borogove_ChatMessage[]>; getMessagesAround: (account: any, around: any) => Promise<import("./borogove.js").borogove_ChatMessage[]>; getMessagesFromCursor: (cursor: any, notIncluding: any, filter: any) => Promise<import("./borogove.js").borogove_ChatMessage[]>; searchMessages: (account: any, chatId: any, q: any) => Promise<import("./borogove.js").borogove_ChatMessage[]>; hasMedia: (hashAlgorithm: any, hash: any) => any; removeMedia: (hashAlgorithm: any, hash: any) => any; storeMedia: (mime: any, buffer: any) => any; storeCaps: (caps: any) => void; getCaps: (ver: any) => Promise<borogove_Caps>; storeLogin(login: any, clientId: any, displayName: any, token: any): Promise<boolean>; storeOmemoId: (account: any, omemoId: any) => void; storeOmemoIdentityKey: (account: any, keypair: any) => void; storeOmemoDeviceList: (chatId: any, deviceIds: any) => void; getOmemoDeviceList: (chatId: any, callback: any) => void; storeOmemoPreKey: (account: any, keyId: any, keyPair: any) => void; removeOmemoPreKey: (account: any, keyId: any) => void; getOmemoPreKey: (account: any, keyId: any, callback: any) => void; getOmemoPreKeys: (account: any, callback: any) => void; storeStreamManagement(account: any, sm: any, sortId: any): Promise<boolean>; getStreamManagement(account: any): Promise<{ sm: any; sortId: any; }>; getLogin: (login: any) => Promise<{ clientId: any; token: any; fastCount: any; displayName: any; }>; getOmemoId: (account: any, callback: any) => void; getOmemoIdentityKey: (account: any, callback: any) => void; getOmemoSignedPreKey: (account: any, keyId: any, callback: any) => void; storeOmemoSignedPreKey: (account: any, signedKey: any) => void; removeAccount(account: any, completely: any): Promise<boolean>; listAccounts(): Promise<any>; storeService(account: any, serviceId: any, name: any, node: any, caps: any): void; findServicesWithFeature(account: any, feature: any): Promise<any[]>; getOmemoContactIdentityKey: (account: any, address: any, callback: any) => void; storeOmemoContactIdentityKey: (account: any, address: any, identityKey: any) => void; getOmemoSession: (account: any, address: any, callback: any) => void; storeOmemoSession: (account: any, address: any, session: any) => void; storeOmemoMetadata: (account: any, address: any, metadata: any) => void; getOmemoMetadata: (account: any, address: any, callback: any) => void; removeOmemoSession: (account: any, address: any) => void; get(k: any): Promise<any>; set(k: any, v: any): Promise<any>; }>