UNPKG

@codebucket/whatsapp

Version:

A reusable WhatsApp Business API client with template and non-template support, webhook handling, pluggable storage, and text sanitization

10 lines (9 loc) 509 B
import type { Pool } from 'mysql2/promise'; import { MessageStore, SendMessageOptions, WebhookMessage, WebhookStatus } from './types'; export declare class MySQLMessageStore implements MessageStore { private pool; constructor(pool: Pool); saveIncomingMessage(accountId: string, msg: WebhookMessage): Promise<void>; saveOutgoingMessage(accountId: string, opts: SendMessageOptions, response: any): Promise<void>; saveMessageStatus(accountId: string, status: WebhookStatus): Promise<void>; }