{"_id":"@corelay/mesh-channels-whatsapp","_rev":"3-29bbc1bf5c0dc52a99f2d687b680bc56","name":"@corelay/mesh-channels-whatsapp","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"@corelay/mesh-channels-whatsapp","version":"0.0.1","author":{"name":"Corelay Ltd"},"license":"MIT","_id":"@corelay/mesh-channels-whatsapp@0.0.1","maintainers":[{"name":"deejaycodes","email":"deji@corelay.dev"}],"homepage":"https://github.com/corelay-dev/mesh#readme","bugs":{"url":"https://github.com/corelay-dev/mesh/issues"},"dist":{"shasum":"63d4260694965c58af75154e4e0298c25b890f50","tarball":"https://registry.npmjs.org/@corelay/mesh-channels-whatsapp/-/mesh-channels-whatsapp-0.0.1.tgz","fileCount":18,"integrity":"sha512-hkul/dOp7cz9aJtD+jn5LINvuXdh7xx+mDgJN2Xf75fviTauFHSz/+g7Yku4wZ0p6V19H6KP1WCN2fIEYo0j2Q==","signatures":[{"sig":"MEUCICpn7r/72dnPFlFZ8zyoj/6sqSR03Di16TY4VIvPKX9uAiEA67i3/eG6domW6RVNMfwZjej1e9P7RaFg6P/5/+wzTnE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26856},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"b69568389adef29c80aa52e4be07c994581e7aae","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","clean":"rm -rf dist *.tsbuildinfo"},"_npmUser":{"name":"deejaycodes","email":"deji@corelay.dev"},"repository":{"url":"git+https://github.com/corelay-dev/mesh.git","type":"git","directory":"packages/mesh-channels-whatsapp"},"_npmVersion":"10.8.2","description":"WhatsApp Cloud API channel adapter for Corelay Mesh.","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@corelay/mesh-core":"0.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/mesh-channels-whatsapp_0.0.1_1777018161759_0.22974968364339654","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@corelay/mesh-channels-whatsapp","version":"0.1.0","author":{"name":"Corelay Ltd"},"license":"MIT","_id":"@corelay/mesh-channels-whatsapp@0.1.0","maintainers":[{"name":"deejaycodes","email":"deji@corelay.dev"}],"homepage":"https://github.com/corelay-dev/mesh#readme","bugs":{"url":"https://github.com/corelay-dev/mesh/issues"},"dist":{"shasum":"5357366349c263b79b3272d3e613b7619add031e","tarball":"https://registry.npmjs.org/@corelay/mesh-channels-whatsapp/-/mesh-channels-whatsapp-0.1.0.tgz","fileCount":18,"integrity":"sha512-MtlW2oVWAaosWjLkn94UUMCyohFmEWHvmzQX0VI+wpEVfwYcrTY3nveFW6YVI8g3woPkAbgY7+mqjP71YZAP3g==","signatures":[{"sig":"MEYCIQDC9ml28POCLQXykgMzsMhkPZ245MhLfnQrjMw0+Va9ZwIhAKPgEpHXlgelOoVWofMPXOuRsBy8o+GZsozm1guOm2+H","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26856},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"518998ab17221b7edf5f95b53b85a478788923b4","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","clean":"rm -rf dist *.tsbuildinfo"},"_npmUser":{"name":"deejaycodes","email":"deji@corelay.dev"},"repository":{"url":"git+https://github.com/corelay-dev/mesh.git","type":"git","directory":"packages/mesh-channels-whatsapp"},"_npmVersion":"10.8.2","description":"WhatsApp Cloud API channel adapter for Corelay Mesh.","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@corelay/mesh-core":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/mesh-channels-whatsapp_0.1.0_1777019215695_0.024410428400962525","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@corelay/mesh-channels-whatsapp","version":"0.2.0","description":"WhatsApp Cloud API channel adapter for Corelay Mesh.","license":"MIT","author":{"name":"Corelay Ltd"},"homepage":"https://github.com/corelay-dev/mesh#readme","repository":{"type":"git","url":"git+https://github.com/corelay-dev/mesh.git","directory":"packages/mesh-channels-whatsapp"},"bugs":{"url":"https://github.com/corelay-dev/mesh/issues"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.json","test":"vitest run","clean":"rm -rf dist *.tsbuildinfo"},"dependencies":{"@corelay/mesh-core":"0.3.0"},"devDependencies":{"typescript":"^5.7.0","vitest":"^2.1.8"},"publishConfig":{"access":"public"},"_id":"@corelay/mesh-channels-whatsapp@0.2.0","gitHead":"4004f9d41e0d4496f9a72f7e2a4d82cf4df59dc1","_nodeVersion":"22.18.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-2iVngMTuzfWYkUHF+fXv8blXcVEh2ryZatAA+QhL9IYe/yf1sY7tp+f7TGAzWAPQmnK8pbPfmtPkXU5q83boOw==","shasum":"0f6dede2ed25a731a6be5578c8a3e65738e63b29","tarball":"https://registry.npmjs.org/@corelay/mesh-channels-whatsapp/-/mesh-channels-whatsapp-0.2.0.tgz","fileCount":18,"unpackedSize":28806,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCdVqFWny3wxRN9cQ8/gv2bsD6MGjMIvifch8Ql11FxywIgGbrYky2z20l6KR8MV3o/QZkqd0hpIb50CqQDBseOZAA="}]},"_npmUser":{"name":"deejaycodes","email":"deji@corelay.dev"},"directories":{},"maintainers":[{"name":"deejaycodes","email":"deji@corelay.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mesh-channels-whatsapp_0.2.0_1778467748377_0.3005323608739032"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-24T08:09:21.653Z","modified":"2026-05-11T02:49:08.660Z","0.0.1":"2026-04-24T08:09:21.925Z","0.1.0":"2026-04-24T08:26:55.869Z","0.2.0":"2026-05-11T02:49:08.515Z"},"bugs":{"url":"https://github.com/corelay-dev/mesh/issues"},"author":{"name":"Corelay Ltd"},"license":"MIT","homepage":"https://github.com/corelay-dev/mesh#readme","repository":{"type":"git","url":"git+https://github.com/corelay-dev/mesh.git","directory":"packages/mesh-channels-whatsapp"},"description":"WhatsApp Cloud API channel adapter for Corelay Mesh.","maintainers":[{"name":"deejaycodes","email":"deji@corelay.dev"}],"readme":"# @corelay/mesh-channels-whatsapp\n\nWhatsApp Cloud API channel adapter for [Corelay Mesh](https://github.com/corelay-dev/mesh).\n\nTurns inbound WhatsApp webhooks into Mesh `Message`s and sends outbound messages via the Cloud API. Framework-agnostic — wire it into Express, Fastify, or a raw Node HTTP server.\n\n## Install\n\n```sh\nnpm install @corelay/mesh-channels-whatsapp\n```\n\n## API\n\n### `parseWebhookBody(body: unknown): ParsedInbound[]`\n\nParses the raw Meta webhook JSON payload into structured inbound entries.\n\n### `toMessage(parsed: ParsedInbound): Message`\n\nConverts a parsed inbound entry into a Mesh `Message`.\n\n### `handleWebhook(config: HandleWebhookConfig, req: WebhookRequest): WebhookResponse`\n\nFull webhook handler. Accepts a config object and a framework-agnostic request, returns a `WebhookResponse`. Always responds with `200` on POST requests to prevent Meta from retrying delivery.\n\n### `WhatsAppClient`\n\nSends outbound messages through the Cloud API. Configured with `accessToken` and `defaultPhoneNumberId`.\n\n```ts\nimport { WhatsAppClient } from \"@corelay/mesh-channels-whatsapp\";\n\nconst client = new WhatsAppClient({ accessToken: \"...\", defaultPhoneNumberId: \"...\" });\n```\n\n### `userPeer(config: UserPeerConfig): Peer`\n\nCreates a `Peer` representing a WhatsApp user. Users are addressed as `whatsapp/<phoneNumberE164>` (no `+` prefix).\n\n## Setup\n\n1. Create a WhatsApp Business app in the Meta Developer Portal.\n2. Point the webhook URL at your deployment.\n3. Provide `WHATSAPP_VERIFY_TOKEN`, `WHATSAPP_ACCESS_TOKEN`, and `WHATSAPP_PHONE_NUMBER_ID`.\n4. Pass requests through to `handleWebhook`.\n\n## License\n\nMIT © [Corelay Ltd](https://github.com/corelay-dev)\n","readmeFilename":"README.md"}