import type KeyedDB from '@adiwajshing/keyed-db'; import type { Comparable } from '@adiwajshing/keyed-db/lib/Types'; import type { BaileysEventEmitter, Chat, ConnectionState, Contact, GroupMetadata, PresenceData, WAMessage, WAMessageCursor, WAMessageKey } from 'baileys'; import { proto } from 'baileys'; import type makeMDSocket from 'baileys/lib/Socket'; import { Label } from 'baileys/lib/Types/Label'; import { LabelAssociation } from 'baileys/lib/Types/LabelAssociation'; import { ILogger } from 'baileys/lib/Utils/logger'; import { ObjectRepository } from './object-repository'; type WASocket = ReturnType; export declare const waChatKey: (pin: boolean) => { key: (c: Chat) => string; compare: (k1: string, k2: string) => number; }; export declare const waMessageID: (m: WAMessage) => string; export declare const waLabelAssociationKey: Comparable; export type BaileysInMemoryStoreConfig = { chatKey?: Comparable; labelAssociationKey?: Comparable; logger?: ILogger; socket?: WASocket; }; declare const _default: (config: BaileysInMemoryStoreConfig) => { chats: KeyedDB; contacts: { [_: string]: Contact; }; messages: { [_: string]: { array: proto.IWebMessageInfo[]; get: (id: string) => proto.IWebMessageInfo | undefined; upsert: (item: proto.IWebMessageInfo, mode: "append" | "prepend") => void; update: (item: proto.IWebMessageInfo) => boolean; remove: (item: proto.IWebMessageInfo) => boolean; updateAssign: (id: string, update: Partial) => boolean; clear: () => void; filter: (contain: (item: proto.IWebMessageInfo) => boolean) => void; toJSON: () => proto.IWebMessageInfo[]; fromJSON: (newItems: proto.IWebMessageInfo[]) => void; }; }; groupMetadata: { [_: string]: GroupMetadata; }; state: ConnectionState; presences: { [id: string]: { [participant: string]: PresenceData; }; }; labels: ObjectRepository