Repository navigation
v0.1.0
First release of the WhatsApp Cloud API TypeScript SDK.
Highlights
- Typed client on native
fetch(zero runtime dependencies), pinned to Graph API v23.0, with per-attempt timeout and retries (429/5xx/network, honoringRetry-After). - Outbound messages via
client.messages: text, media (image/video/audio/document/sticker), location, full contacts, templates, interactive (buttons, lists with rich headers, CTA URL, flow, location-request, product, product-list), reactions, mark-as-read. Reply to any message withreplyToMessageId. Documented limits validated client-side. - Typed errors:
WhatsAppApiErrorand subclasses includingWhatsAppRateLimitError(withretryAfterMs),WhatsAppReEngagementError,WhatsAppAuthenticationError,WhatsAppValidationError,WhatsAppWebhookError. - Webhooks: GET verification handshake, constant-time
X-Hub-Signature-256validation over raw bytes, and typed parsing of incoming messages and status updates. Framework-agnosticWebhookHandler.
Dual ESM + CJS build with full TypeScript declarations. Requires Node.js 20+.
See the README for usage and the CHANGELOG for details.
Not yet implemented: media upload/download, template management, phone number/WABA management.