Repository navigation
feat: invites resource — create, list, link, preview, claim - #43
Merged
Merged
Conversation
…/SaaS#1398) Worker-to-friend invites over /v1/invites (Scaffald/SaaS#1393, #1395). Email invites are sent by Scaffald; phone invites come back with an sms: link and share text for the inviter's own phone. InviteListStatus is named apart from the organization InviteStatus already exported. Co-Authored-By: Claude Opus 5.5 <[email protected]>
thinkclay
added a commit
to Scaffald/SaaS
that referenced
this pull request
Nov 24, 2026
…sheet row (#1398) - packages/sdk: main moved the SDK pointer to 147f790 (Scaffald/sdk#41, #42). Merged that into the invites branch (Scaffald/sdk#43) and point at the merge commit ab3eed0, so this keeps both. - The 'Invite your crew' row in MobileAccountSheet used fontSize: 14 like its neighbours, which pushed the drawer over the literal-styling ratchet ceiling. It uses fontSize.md (14) from @scaffald/ui/tokens. Co-Authored-By: Claude Opus 5.5 <[email protected]>
thinkclay
added a commit
to Scaffald/SaaS
that referenced
this pull request
Nov 24, 2026
…rged (#1398) Co-Authored-By: Claude Opus 5.5 <[email protected]>
thinkclay
added a commit
to Scaffald/SaaS
that referenced
this pull request
Nov 24, 2026
…awer and home entry points (#1398) (#1430) * feat(growth): "Invite your crew" — invite screen, onboarding step, drawer and home entry points (#1398) /dashboard/invite (ROUTES.DASHBOARD.INVITE): - Your personal link with Share (OS share sheet on native, navigator.share or copy on web) and Copy. - "Invite people": type or paste emails and phone numbers, one per line or comma/semicolon separated, names allowed ("Sam <sam@…>", "Pat 555-…"). Shows how many it can read before sending; what it can't read stays in the box. Sends through the SDK's new invites resource; each result says what happened: emailed, a "Text invite" button for phones (opens the inviter's own messaging app — Scaffald never texts them), or why it was skipped / not sent, including "email invites aren't switched on yet". - "Your invites": who you invited and whether they joined or set up a profile, with the joined count. - ?from=onboarding retitles it "One last thing" with "Skip for now". Entry points: onboarding now ends on it for people who ticked "Worker" (everyone else still goes to the dashboard); an "Invite your crew" footer row in the desktop drawer and in the phone account sheet; an "Invite your crew" block on the worker home's second column. SDK: `client.invites` (Scaffald/sdk#43); the submodule points at that branch until it merges. scf-core hooks in utils/invites-sdk-hooks.ts. .radium/scaffald-sdk.md: its examples imported useScaffaldJobsClient from @scaffald/sdk/react, which doesn't export it (typecheck fails); the 54 existing hook files use ./jobs-sdk-context. Fixed the doc. Not here: a device contacts picker (expo-contacts needs a native build and a permission string; its own issue), and the newsletter checkbox (#1396). Tests: 25 scf-core unit tests for the invites feature (contact parsing, the screen's states and requests), drawer and dashboard suites green, SDK msw tests. Browser-checked headless against an api from this branch with a NevarMail stub: drawer row, home block, link card, a mixed list (emailed, text button, member skipped, unreadable kept), status list, onboarding Skip, phone layout. Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(deps): point the SDK submodule at main after Scaffald/sdk#43 merged (#1398) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Adds
client.invitesfor Scaffald/SaaS#1398 ("Invite your crew" in the app), over the/v1/invitesroutes from Scaffald/SaaS#1393 and #1395.create({ contacts, message?, source? }): up to 50 contacts. Email contacts are sent by Scaffald (through NevarMail, with an unsubscribe link). Phone contacts come backready, with ansmsUrlandshareTextfor the inviter to send from their own phone; Scaffald never texts them.list(): the caller's invites, withinvited/joined/onboardedcounts.link(): the caller's personal/i/<code>link and share text.preview(code): public; the inviter's first name and avatar only.claim({ code? }): credits a new account to an invite. Without a code, the server matches an email invite sent to the caller's own address.All responses are bare bodies, as the api returns them. The status type is
InviteListStatus, because the organizations resource already exports anInviteStatus.Tests:
src/__tests__/invites.test.ts(msw) covers request shapes and paths.pnpm buildpasses, and the new types are indist.🤖 Generated with Claude Code