Skip to content

SMS Phase 2: self-serve Messaging tab + provisioning + consent#32

Open
evangauer wants to merge 3 commits into
mainfrom
feat/sms-provider-abstraction
Open

SMS Phase 2: self-serve Messaging tab + provisioning + consent#32
evangauer wants to merge 3 commits into
mainfrom
feat/sms-provider-abstraction

Conversation

@evangauer

Copy link
Copy Markdown
Owner

Builds on #30 (SMS foundation, merged). Adds the self-serve experience.

What's new

  • Settings → Messaging tab (components/settings/messaging-tab.tsx): per-location setup wizard — check hosted-SMS eligibility and text-enable the clinic's existing number, or search/buy a new local number; enable/disable sending; send a test; usage + consent summary. Honest "registration pending" states.
  • messaging tRPC router: getStatus, searchNumbers, checkEligibility, provisionNumber (create messaging profile + host/buy number + save config), setEnabled, testSend (admin-only).
  • Telnyx provisioning service (lib/messaging/telnyx-provisioning.ts): authed v2 client + number search, hosted-SMS eligibility, profile create, buy/host orders.
  • Client SMS consent: a consent checkbox (with STOP disclosure) on client create/edit, wired through clients.create/update (stamps consent timestamp + source). Adds a Checkbox primitive.

Deferred (intentionally)

A2P brand/campaign registration — gated on Telnyx L2 verification; not shipping untested API calls or storing EIN. Provisioning sets a clear "registration pending" state.

Safety / tests

🤖 Generated with Claude Code

evangauer and others added 3 commits June 26, 2026 17:27
… router

Adds lib/messaging/telnyx-provisioning.ts (authed Telnyx v2 client + read-only
number search and hosted-SMS eligibility) and the admin-only `messaging` tRPC
router: getStatus (per-location config + this month's SMS usage + consent/opt-out
counts), searchNumbers, and checkEligibility. Backbone for the Settings →
Messaging self-serve tab. Mutating ops (buy/host number, A2P registration,
test send) follow with the UI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Provisioning service gains createMessagingProfile / buyNumber / createHostedOrder.
messaging router gains provisionNumber (create profile + host/buy number + save
config, leaving registration pending), setEnabled, and testSend. clients
create/update accept smsConsent and stamp consentAt + source on opt-in.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New Settings → Messaging tab: usage + consent summary, and per-location setup —
check eligibility and text-enable the clinic's existing number, or search/buy a
new local number, then enable sending and send a test. Honest registration-
pending states throughout. Adds a Checkbox primitive and an SMS-consent checkbox
(with STOP disclosure) to the client create/edit forms, wired to clients.create/
update.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openvpm Ready Ready Preview, Comment Jun 26, 2026 9:30pm
openvpm-app Ready Ready Preview, Comment Jun 26, 2026 9:30pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant