import type { VerifyResult } from "./core/types.js"; import type { WhatsAppHooks, WhatsAppOptions, WhatsAppPlugin, WhatsAppSendResult, WhatsAppTransport } from "./core/whatsapp-types.js"; /** Configuration for {@link createWhatsAppSender}. */ export interface WhatsAppSenderConfig { /** WhatsApp delivery transport. */ transport: WhatsAppTransport; /** Optional plugins run before each send. */ plugins?: WhatsAppPlugin[]; /** Optional lifecycle hooks for metrics and tracing. */ hooks?: WhatsAppHooks; } /** WhatsApp sender returned by {@link createWhatsAppSender}. */ export interface WhatsAppSender { /** Send a WhatsApp message through the configured transport. */ send(options: WhatsAppOptions): Promise; /** Test connectivity and credentials without sending. */ verify(): Promise; /** Release resources held by the transport. */ close(): Promise; } /** * Create a WhatsApp sender that wraps a {@link WhatsAppTransport}. * * Pipeline: plugins → onSend → transport.send → onSuccess / onError. * `onRetry` / `onFallback` wire when the transport is a retry or fallback decorator. */ export declare function createWhatsAppSender(config: WhatsAppSenderConfig): WhatsAppSender;