import type { ConnectionState } from '@whiskeysockets/baileys'; import type { MongoStorage } from '../index.js'; import CRUD from './CRUD.js'; import type { Logger } from '../../../types/index.js'; import type { WASocket } from '@whiskeysockets/baileys'; import type { Db } from './CRUD.js'; type ConnectionStateDoc = ConnectionState; declare class State extends CRUD { protected readonly storage: MongoStorage; protected readonly sock: WASocket | null; static collectionName: string; constructor(storage: MongoStorage, mongodb: Db, sock: WASocket | null, logger: Logger | null); /** * Getter to expose the raw MongoDB collection. */ getCollection(): import("mongodb").Collection; /** * Get current connection state * * @returns Connection state on success or null on error */ get(): Promise | null>; /** * Update connection state */ update(data: Partial): Promise; } export default State;