Repository navigation
feat(subscriptions): lock hosted subscribe page to a team (teamId) - #25
Merged
Merged
Conversation
- CheckoutInput subscription teamId (24-hex, validated) sent to subscribe-sessions
- useAppSubscription(appId, { teamId }) scopes subscriptions list + subscribe()
- SubscribeButton teamId prop; AppSubscription.team
- docs + tests (hyperyai/hypery#194)
spacedevin
force-pushed
the
feat/subscribe-team-lock
branch
from
September 15, 2026 21:36
407dea7 to
c5bbe07
Compare
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.
Follow-up to #24 for server PR hyperyai/hypery#194 (subscribe sessions accept optional
teamId; confirming another team returns 403TEAM_LOCKED).checkout({ kind: 'subscription', planId, interval?, teamId? }):teamIdvalidated as 24-hex (throws a clear error otherwise), sent in the session body, persisted through the redirect path with the pending input.useAppSubscription(appId, { teamId? }): subscriptions fetched with&teamId=soactiveSubscriptionis that team's;subscribe()passes it (per-callopts.teamIdoverrides).<SubscribeButton teamId>prop.AppSubscription.team: { id, name, slug } | null; new exportedUseAppSubscriptionOptions.Checks:
npx tsc --noEmit,npm run build,bun test src(60 pass).