/** * Mensagem recebida do webhook do WhatsApp Business API */ export interface WhatsAppWebhookMessage { from: string; id: string; timestamp: string; text?: { body: string; }; type?: 'text' | 'image' | 'audio' | 'video' | 'document'; } /** * Payload completo do webhook do WhatsApp Business API */ export interface WhatsAppWebhookPayload { entry: Array<{ id: string; changes: Array<{ value: { messaging_product: 'whatsapp'; metadata: { display_phone_number: string; phone_number_id: string; }; contacts?: Array<{ profile: { name: string; }; wa_id: string; }>; messages?: WhatsAppWebhookMessage[]; statuses?: Array<{ id: string; status: 'sent' | 'delivered' | 'read' | 'failed'; timestamp: string; recipient_id: string; }>; }; field: string; }>; }>; }