import { NormalizedMessage, InteractiveButton, ListSection } from '../types'; export abstract class MessagingProvider { /** Parse raw webhook payload into normalized message */ abstract parseInbound(body: any): NormalizedMessage | null; /** Send a plain text message */ abstract sendText(to: string, text: string): Promise; /** Send interactive buttons (max 3 for WhatsApp) */ abstract sendButtons(to: string, body: string, buttons: InteractiveButton[]): Promise; /** Send interactive list (max 10 rows total across sections) */ abstract sendList(to: string, body: string, buttonText: string, sections: ListSection[]): Promise; /** Send an image with optional caption */ abstract sendImage(to: string, imageUrl: string, caption?: string): Promise; /** Validate that inbound webhook is authentic */ abstract validateWebhook(body: any): boolean; }