/** * Canonical → Baileys event dispatcher. * * `adaptBridgeEvent` (Bridge/schema.ts) yields a `CanonicalEvent` * discriminated union; `DISPATCHERS` is a `{ [K in CanonicalEvent['type']]: … }` * mapped type so TS forces a handler per variant — a missing handler * is a compile error. */ import type { WhatsAppEvent } from 'whatsapp-rust-bridge'; import type { SocketContext } from './types.js'; interface EventCallbacks { onPairSuccess?: (data: { platform?: string; businessName?: string; }) => void | Promise; } /** * Create the event handler that translates canonical events into Baileys * events on `ctx.ev`. The handler does NO bridge-shape inspection — that's * the schema's job. Field-access here references canonical types * exclusively, so a downstream rename surfaces as a `tsc` failure. */ export declare const makeEventHandler: (ctx: SocketContext, callbacks?: EventCallbacks) => (event: WhatsAppEvent) => void; export {}; //# sourceMappingURL=events.d.ts.map