SMS Phase 2: self-serve Messaging tab + provisioning + consent#32
Open
evangauer wants to merge 3 commits into
Open
SMS Phase 2: self-serve Messaging tab + provisioning + consent#32evangauer wants to merge 3 commits into
evangauer wants to merge 3 commits into
Conversation
… 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #30 (SMS foundation, merged). Adds the self-serve experience.
What's new
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.getStatus,searchNumbers,checkEligibility,provisionNumber(create messaging profile + host/buy number + save config),setEnabled,testSend(admin-only).lib/messaging/telnyx-provisioning.ts): authed v2 client + number search, hosted-SMS eligibility, profile create, buy/host orders.clients.create/update(stamps consent timestamp + source). Adds aCheckboxprimitive.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