@codebucket/whatsapp
Version:
A reusable WhatsApp Business API client with template and non-template support, webhook handling, pluggable storage, and text sanitization
12 lines (11 loc) • 565 B
TypeScript
import { MessageStore, SendMessageOptions, WebhookMessage, WebhookStatus } from '../types';
/**
* A MessageStore that writes to multiple underlying stores in parallel.
*/
export declare class CompositeMessageStore implements MessageStore {
private stores;
constructor(stores: MessageStore[]);
saveIncomingMessage(accountId: string, msg: WebhookMessage): Promise<void>;
saveOutgoingMessage(accountId: string, opts: SendMessageOptions, response: any): Promise<void>;
saveMessageStatus(accountId: string, status: WebhookStatus): Promise<void>;
}