/** * Wraps any upstream Baileys AuthenticationState as bridge-compatible * JsStoreCallbacks. Users keep their existing custom stores (MySQL, * MongoDB, Redis, etc.) — zero migration needed. * * ```typescript * const { state, saveCreds } = await useMongoAuthState(db) * const sock = makeWASocket({ * auth: { store: await wrapLegacyStore(state, saveCreds) } * }) * ``` */ import type { JsStoreCallbacks } from 'whatsapp-rust-bridge'; import type { AuthenticationState } from '../Types/index.js'; export interface WrappedLegacyStore extends JsStoreCallbacks { flush(): Promise; dispose(): void; } export declare function wrapLegacyStore(state: AuthenticationState, saveCreds: () => Promise, logger?: { warn: (obj: unknown, msg?: string) => void; }): Promise; /** * Loads an upstream Baileys session (creds.json + key .json files) and returns * the standard `{ state, saveCreds }` tuple that `wrapLegacyStore` expects. * * ```typescript * const { state, saveCreds } = await useLegacyMultiFileAuthState('/path/to/baileys_auth_info') * const store = await wrapLegacyStore(state, saveCreds) * const sock = makeWASocket({ auth: { store } }) * ``` */ export declare function useLegacyMultiFileAuthState(folder: string): Promise<{ state: AuthenticationState; saveCreds: () => Promise; }>; //# sourceMappingURL=wrap-legacy-store.d.ts.map