{"_id":"@absolutejs/dispatch-sinch","_rev":"3-494e1a8348fc6b1b4f25c67a11ed0791","name":"@absolutejs/dispatch-sinch","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@absolutejs/dispatch-sinch","version":"0.1.0","keywords":["absolutejs","dispatch","sinch","conversation-api","sms","mms","rcs","whatsapp"],"author":{"name":"Alex Kahn"},"license":"Apache-2.0","_id":"@absolutejs/dispatch-sinch@0.1.0","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/dispatch-adapters/tree/main/sinch","bugs":{"url":"https://github.com/absolutejs/dispatch-adapters/issues"},"dist":{"shasum":"3f4f654e53d1fd161f1decd8572048bd15e5a1f2","tarball":"https://registry.npmjs.org/@absolutejs/dispatch-sinch/-/dispatch-sinch-0.1.0.tgz","fileCount":20,"integrity":"sha512-Ywgntun2zUgmVV9Wiv3z+BFoqMXjSBomUqdwMmOcJ4xQFZnzMVR/3Enw4gB9jhqR37/M8wyUH0cvi4Wzq7XqrQ==","signatures":[{"sig":"MEYCIQDS+Dy5HXh7HmoeZlln1kwakWTAnEiff2kpm+Wf+lh9AgIhAJKyN6PRX5R31lLp+GmSJNcGGREs7rh0Jm7crezswec9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":162283},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"846f72521592a898813a5504e8ff2f3c61e612e1","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/compliance --external @absolutejs/dispatch --external '@absolutejs/dispatch/*' --external @absolutejs/reliability --external '@absolutejs/reliability/*' --external @absolutejs/manifest --external @sinclair/typebox --external @sinch/sdk-core --external '@sinch/*' && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run check:package && npm publish --access public","typecheck":"tsc --noEmit","check:package":"bun run format && bun run typecheck && bun run test && bun run verify-package && bun run build && bun run verify-package --artifacts","verify-package":"absolute-manifest verify-package"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"runtimePeers":{"@sinch/sdk-core":{"range":">=1.5.0 <2","tested":"1.5.0","optional":false,"buildExternals":["@sinch/sdk-core","@sinch/*"],"artifactImports":[]},"@absolutejs/dispatch":{"range":">=0.6.0 <0.7","tested":"0.6.1","optional":false,"buildExternals":["@absolutejs/dispatch","@absolutejs/dispatch/*"],"artifactImports":[]},"@absolutejs/compliance":{"range":">=0.6.0 <0.7","tested":"0.6.0","optional":true,"buildExternals":["@absolutejs/compliance"],"artifactImports":[]}},"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/dispatch-adapters.git","type":"git","directory":"sinch"},"_npmVersion":"10.9.2","description":"Production Sinch Conversation API adapter for AbsoluteJS with multichannel fallback, signed durable webhooks, consent, readiness, and 10DLC workflows.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"0.7.2","@absolutejs/reliability":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"pg":"8.22.0","prettier":"3.8.1","@types/pg":"8.20.3","@types/bun":"1.3.14","typescript":"5.9.3","@sinch/sdk-core":"1.5.0","@absolutejs/dispatch":"0.6.1","@absolutejs/compliance":"0.6.0"},"peerDependencies":{"@sinch/sdk-core":">=1.5.0 <2","@absolutejs/dispatch":">=0.6.0 <0.7","@absolutejs/compliance":">=0.6.0 <0.7"},"peerDependenciesMeta":{"@absolutejs/compliance":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/dispatch-sinch_0.1.0_1785613917164_0.8192770751833895","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@absolutejs/dispatch-sinch","version":"0.2.0","keywords":["absolutejs","dispatch","sinch","conversation-api","sms","mms","rcs","whatsapp"],"author":{"name":"Alex Kahn"},"license":"Apache-2.0","_id":"@absolutejs/dispatch-sinch@0.2.0","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/dispatch-adapters/tree/main/sinch","bugs":{"url":"https://github.com/absolutejs/dispatch-adapters/issues"},"dist":{"shasum":"30f5273e02aa788b3096aca09bc95366532b207a","tarball":"https://registry.npmjs.org/@absolutejs/dispatch-sinch/-/dispatch-sinch-0.2.0.tgz","fileCount":22,"integrity":"sha512-Uf6kAtvw2vq9i/OdxqSIATEOrxbnFBDEbnsNNKFJRBTfm//VPjosAARMyOkg65X0ok4sfdtMMX4CVm+jJ29PkA==","signatures":[{"sig":"MEQCIFa59r+dqCAtw5TlUOtU2KWXDThrGwHKIEeWSFM2XDdnAiBA+9cBEeaymld1rnrn1yY01AjWENIsPSFCuw4xgHpJCA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":202755},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"c7ced4f2c36deff0db92b72ef5bf86ca98aa004d","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/compliance --external @absolutejs/dispatch --external '@absolutejs/dispatch/*' --external @absolutejs/reliability --external '@absolutejs/reliability/*' --external @absolutejs/manifest --external @sinclair/typebox --external @sinch/sdk-core --external '@sinch/*' && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run check:package && npm publish --access public","typecheck":"tsc --noEmit","check:package":"bun run format && bun run typecheck && bun run test && bun run verify-package && bun run build && bun run verify-package --artifacts","verify-package":"absolute-manifest verify-package"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"runtimePeers":{"@sinch/sdk-core":{"range":">=1.5.0 <2","tested":"1.5.0","optional":false,"buildExternals":["@sinch/sdk-core","@sinch/*"],"artifactImports":[]},"@absolutejs/dispatch":{"range":">=0.6.0 <0.7","tested":"0.6.2","optional":false,"buildExternals":["@absolutejs/dispatch","@absolutejs/dispatch/*"],"artifactImports":[]},"@absolutejs/compliance":{"range":">=0.6.0 <0.7","tested":"0.6.0","optional":true,"buildExternals":["@absolutejs/compliance"],"artifactImports":[]}},"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/dispatch-adapters.git","type":"git","directory":"sinch"},"_npmVersion":"10.9.2","description":"Production Sinch Conversation API adapter for AbsoluteJS with multichannel fallback, signed durable webhooks, consent, readiness, and 10DLC workflows.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"0.7.2","@absolutejs/reliability":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"pg":"8.22.0","prettier":"3.8.1","@types/pg":"8.20.3","@types/bun":"1.3.14","typescript":"5.9.3","@sinch/sdk-core":"1.5.0","@absolutejs/dispatch":"0.6.2","@absolutejs/compliance":"0.6.0"},"peerDependencies":{"@sinch/sdk-core":">=1.5.0 <2","@absolutejs/dispatch":">=0.6.0 <0.7","@absolutejs/compliance":">=0.6.0 <0.7"},"peerDependenciesMeta":{"@absolutejs/compliance":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/dispatch-sinch_0.2.0_1785615958490_0.8979163301019621","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@absolutejs/dispatch-sinch","version":"0.3.0","description":"Production Sinch Conversation API adapter for AbsoluteJS with multichannel fallback, signed durable webhooks, consent, readiness, and 10DLC workflows.","repository":{"type":"git","url":"git+https://github.com/absolutejs/dispatch-adapters.git","directory":"sinch"},"homepage":"https://github.com/absolutejs/dispatch-adapters/tree/main/sinch","bugs":{"url":"https://github.com/absolutejs/dispatch-adapters/issues"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","license":"Apache-2.0","author":{"name":"Alex Kahn"},"publishConfig":{"access":"public"},"keywords":["absolutejs","dispatch","sinch","conversation-api","sms","mms","rcs","whatsapp"],"scripts":{"build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/compliance --external @absolutejs/dispatch --external '@absolutejs/dispatch/*' --external @absolutejs/reliability --external '@absolutejs/reliability/*' --external @absolutejs/manifest --external @sinclair/typebox --external @sinch/sdk-core --external '@sinch/*' && tsc --project tsconfig.build.json && absolute-manifest emit","test":"bun test","typecheck":"tsc --noEmit","format":"prettier --write \"./**/*.{ts,json,md}\"","verify-package":"absolute-manifest verify-package","check:package":"bun run format && bun run typecheck && bun run test && bun run verify-package && bun run build && bun run verify-package --artifacts","release":"bun run check:package && npm publish --access public"},"peerDependencies":{"@absolutejs/compliance":">=0.7.0 <0.8","@absolutejs/dispatch":">=0.7.0 <0.8","@sinch/sdk-core":">=1.5.0 <2"},"peerDependenciesMeta":{"@absolutejs/compliance":{"optional":true}},"dependencies":{"@absolutejs/manifest":"0.7.2","@absolutejs/reliability":"0.1.0","@sinclair/typebox":"^0.34.0"},"devDependencies":{"@absolutejs/compliance":"0.7.0","@absolutejs/dispatch":"0.7.1","@sinch/sdk-core":"1.5.0","@types/bun":"1.3.14","@types/pg":"8.20.3","pg":"8.22.0","prettier":"3.8.1","typescript":"5.9.3"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"absolutejs":{"manifestContract":2,"runtimePeers":{"@absolutejs/compliance":{"artifactImports":[],"buildExternals":["@absolutejs/compliance"],"optional":true,"range":">=0.7.0 <0.8","tested":"0.7.0"},"@absolutejs/dispatch":{"artifactImports":[],"buildExternals":["@absolutejs/dispatch","@absolutejs/dispatch/*"],"optional":false,"range":">=0.7.0 <0.8","tested":"0.7.1"},"@sinch/sdk-core":{"artifactImports":[],"buildExternals":["@sinch/sdk-core","@sinch/*"],"optional":false,"range":">=1.5.0 <2","tested":"1.5.0"}}},"_id":"@absolutejs/dispatch-sinch@0.3.0","gitHead":"c7ced4f2c36deff0db92b72ef5bf86ca98aa004d","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-f3qUsR6iX8jDImTSDO2Hy9P6P19bUBF0wjdULD6RNwA0yBOzG55XSF+Q8U+zFYKJqEO5u6jmNe0F6lDzvIHWaw==","shasum":"5367700ca13857ff4e3a8053c11c0b3b53fc0cf9","tarball":"https://registry.npmjs.org/@absolutejs/dispatch-sinch/-/dispatch-sinch-0.3.0.tgz","fileCount":22,"unpackedSize":202755,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBicXG2AsF1ivbXpgjQIGYgREuhZaIXGeGA3NqSrmHUMAiAalwH4bUkm2+NE8my5ar+10u5S4KuxHo1+ob0A8FwhEA=="}]},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"directories":{},"maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dispatch-sinch_0.3.0_1785618464924_0.3434862165823809"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-01T19:51:56.974Z","modified":"2026-08-01T21:07:45.255Z","0.1.0":"2026-08-01T19:51:57.306Z","0.2.0":"2026-08-01T20:25:58.642Z","0.3.0":"2026-08-01T21:07:45.079Z"},"bugs":{"url":"https://github.com/absolutejs/dispatch-adapters/issues"},"author":{"name":"Alex Kahn"},"license":"Apache-2.0","homepage":"https://github.com/absolutejs/dispatch-adapters/tree/main/sinch","keywords":["absolutejs","dispatch","sinch","conversation-api","sms","mms","rcs","whatsapp"],"repository":{"type":"git","url":"git+https://github.com/absolutejs/dispatch-adapters.git","directory":"sinch"},"description":"Production Sinch Conversation API adapter for AbsoluteJS with multichannel fallback, signed durable webhooks, consent, readiness, and 10DLC workflows.","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"readme":"# @absolutejs/dispatch-sinch\n\nProduction Sinch Conversation API messaging for `@absolutejs/dispatch`.\n\n## Install\n\n```sh\nbun add @absolutejs/dispatch-sinch @sinch/sdk-core\n```\n\nThis package uses real npm releases and has no install-time lifecycle hooks,\nlocal file dependencies, or overrides.\n\n## What it covers\n\n- SMS, MMS, RCS, WhatsApp, Viber Business, Messenger, Instagram, Telegram,\n  KakaoTalk, LINE, and WeChat through the recommended Conversation API\n- Ordered `channel_priority_order` fallback with one generic message safely\n  transcoded by Sinch\n- Text, one-media, omnichannel template, portable card/action, and guarded\n  `extensions.sinch` content\n- Atomic provider/project/tenant-scoped idempotency and indeterminate-outcome\n  handling through `@absolutejs/reliability`\n- HmacSHA256 verification over the exact raw callback body, nonce, and\n  timestamp, with replay bounds and one-secret rotation\n- Fast durable webhook intake followed by an out-of-band recovery drain,\n  stable provider-retry deduplication, delivery/inbound/choice event\n  normalization, provider opt events, WhatsApp marketing preferences, and\n  explicit SMS STOP/START/HELP parsing\n- Live app/channel/webhook readiness, asynchronous channel capability lookup,\n  multi-project tenant routing, E.164 and WhatsApp business-scoped recipient\n  identities, a concrete OAuth registration client, 10DLC\n  brand/campaign/number workflows, and toll-free verification\n\nThe standalone Sinch SMS API is intentionally not used because Sinch marks it\nend-of-sale for new integrations.\n\n## Minimal sending\n\n```ts\nimport { createDispatcher } from \"@absolutejs/dispatch\";\nimport { createSinchAdapter } from \"@absolutejs/dispatch-sinch\";\nimport { SinchClient } from \"@sinch/sdk-core\";\n\nconst client = new SinchClient({\n  conversationRegion: \"us\",\n  keyId: process.env.SINCH_KEY_ID!,\n  keySecret: process.env.SINCH_KEY_SECRET!,\n  projectId: process.env.SINCH_PROJECT_ID!,\n});\n\nconst messaging = createSinchAdapter({\n  appId: process.env.SINCH_APP_ID!,\n  client,\n  projectId: process.env.SINCH_PROJECT_ID!,\n});\n\nconst dispatch = createDispatcher({ messaging });\nawait dispatch.messaging({\n  content: { kind: \"text\", text: \"Production latency is elevated.\" },\n  fallbacks: [{ transport: \"sms\" }],\n  idempotencyKey: \"incident-42:recipient-7\",\n  to: { address: \"+12025550100\", transport: \"rcs\" },\n});\n```\n\nUse a durable idempotency store for every retryable production send and a\ndurable webhook inbox for callbacks. `createSinchWebhookHandler` requires a\ntrusted route-to-account resolver so the correct secret is selected before\nthe raw body is parsed. Configure that URL as a registered Conversation API\nwebhook in Sinch; the adapter intentionally does not emit a per-message\n`callback_url`, because override callbacks use a separate signing-secret\ncontract.\n\nThe HTTP handler authenticates and durably stores each callback, then returns\n`202` without waiting for application code. Run `drainSinchWebhookInbox()` in a\nworker with the same durable inbox, consent ledger, scope resolver, and event\nhandler. Consent writes and application effects share the same retry path, so\na temporary ledger failure cannot complete a STOP event prematurely.\n\n## Compliance boundary\n\n`createSinchRegistrationClient()` uses short-lived OAuth credentials against\nSinch's US Registration API and Numbers API. Pass it to\n`createSinchRegistrationManager()` to submit and inspect 10DLC brands and\ncampaigns, qualify use cases, preserve the number's SMS service plan while\nlinking an approved campaign, and submit toll-free verification evidence.\n\n```ts\nimport {\n  createSinchRegistrationClient,\n  createSinchRegistrationManager,\n} from \"@absolutejs/dispatch-sinch\";\n\nconst registrations = createSinchRegistrationManager(\n  createSinchRegistrationClient({\n    keyId: process.env.SINCH_KEY_ID!,\n    keySecret: process.env.SINCH_KEY_SECRET!,\n  }),\n  process.env.SINCH_PROJECT_ID!,\n);\n```\n\nThese are operational workflows, not legal certification. Your application\nremains responsible for consent evidence, privacy/terms, quiet hours, opt-out\ntesting, and carrier-specific program rules.\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}