import { makeInMemoryStore, WASocket, BaileysEventMap, BaileysEventEmitter, SocketConfig, WAMessage } from '@whiskeysockets/baileys'; import { MongoClient, Document } from 'mongodb'; import { ConnMessage } from '../message/connMessage'; type VoteAggregation = { pollTitle: string | null; optionName: string; voter: string[] | null; pollCreationMessage: WAMessage; }; interface ExtendedBaileysEventMap extends BaileysEventMap { 'poll.vote.update': VoteAggregation; } type ExtendedBaileysEventEmitter = BaileysEventEmitter & { emit: (event: T, arg: ExtendedBaileysEventMap[T]) => boolean; on: (event: T, listener: (arg: ExtendedBaileysEventMap[T]) => void) => void; process(handler: (events: Partial) => void | Promise): () => void; buffer(): void; createBufferedFunction(work: (...args: A) => Promise): (...args: A) => Promise; flush(force?: boolean | undefined): boolean; isBuffering(): boolean; }; interface ExtendedWASocket extends WASocket, ConnMessage { ev: ExtendedBaileysEventEmitter; store: ReturnType; } interface CustomOptions extends Partial { browser?: [string, string, string]; keepAliveIntervalMs?: number; downloadHistory?: boolean; syncFullHistory?: boolean; markOnlineOnConnect?: boolean; printQRInTerminal?: boolean; } interface MySQLConfig { host: string; user: string; password: string; database: string; port: number; session: string; } interface AuthDocument extends Document { _id: string; creds?: any; } declare class WhatsAppClient { private logger; private customOptions; private state; private saveCreds; private sock; private msgOption; constructor(customOptions?: Partial); connectToMongoDB(pathAuthFile: string, collectionName: string): Promise<{ client: MongoClient; collection: import("mongodb").Collection; }>; initMongoAuth(pathAuthFile: string, collectionName: string): Promise; initMultiFileAuth(pathAuthFile: string): Promise; initMySQLAuth(mysqlConfig: MySQLConfig): Promise; private initSocket; private handleConnectionUpdate; private handleMessagesUpdate; getSocket(): Promise; getPairingCode(jid: string): Promise; static create(authType: 'mongo' | 'multi' | 'mysql', config: string | MySQLConfig, customOptions?: CustomOptions): Promise; } export default WhatsAppClient; //# sourceMappingURL=sock.d.ts.map