Repository navigation
Partner sharing: reading an athlete's fueling profile, profile_sharing and the two sharing webhooks - #67
Open
DrAlexHarrison wants to merge 1 commit into
Open
Partner sharing: reading an athlete's fueling profile, profile_sharing and the two sharing webhooks#67DrAlexHarrison wants to merge 1 commit into
DrAlexHarrison wants to merge 1 commit into
Conversation
…wo sharing webhooks
New page guides/fueling-profile.mdx ("Reading an athlete's fueling profile"):
the sharing states and what partner code does in each, what the athlete
sees in the app and on the hosted finish screen, then the reference for
GET /v1/athletes/{id}/fueling-profile in its three states, every field,
calculations_use and errors. Webhooks, MCP, Athletes, both onboarding
pages, Freemium Model and llms.txt follow fuel-backend #1759: the
per-partner switch, the emailed confirmation, under 18 never shares, no
expiry, and an email match the athlete confirms. The page's code samples
run in test-response-examples.py against the response examples it shows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ci-From: linux
Ci-Session: 471be256-9404-4bc6-ac88-33ecda856c32
This branch has not been deployed
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.
Depends-On: SaturdayInc/fuel-backend#1759
What changes for a partner reading the docs
Before. The onboarding guide and the onboarding journey said an athlete's Saturday app answers are "never exposed through the API" and that the athlete can share "from app settings", with no route, field or webhook behind it. The freemium page said email matches link automatically.
After.
guides/fueling-profile, Core Guides, after Onboarding Journey). LLM-first: the three sharing states (not_linked,off,on), every move between them with the webhook it sends, what the athlete sees (a switch per connected partner app in Preferences; the hosted finish-screen choice confirmed from an email; nothing under 18; no expiry), a narrated journey with "your code" at each beat, then the reference forGET /v1/athletes/{athlete_id}/fueling-profile: Python and TypeScript samples, full JSON for on, off and not_linked, every field,calculations_use, errors.profile_sharingonGET /v1/athletes/{id}(Athletes page, and its own section on the new page).athlete.profile_sharing_changedandathlete.fueling_profile_updatedin the events table, the data table, and a payload section. Both carry the athlete record as GET returns it (profile_sharingincluded); the second addschanged_fields, names only. Event ids for these two areevt_+ 32 hex, stable across a redelivery.get_fueling_profilein the tool catalog, partner connections only; the Claude connector page notes it is absent there.llms.txt: both GET routes, a short Athlete Profile Sharing section, the guide link.Fixed along the way
athlete.deletedfor a deleted Saturday account isathlete_deleted_{athlete_id}(since Webhooks: athlete.deleted on an account deletion, and on the coach lane #63), and the sharing events areevt_…; the page now says to treat ids as opaque.athlete.created/updated/profile_completedcarry the record "as GET returns it"; they lack the two fields computed on read (subscription_status,profile_sharing). Now stated.Verified against fuel-backend #1759 head cbc1bcea
Every claim checked against the diff:
pkg/api/fueling_profile.go(states, messages, ownership 404, consumer 404,calculations_usefrom the calculation's manifest precedence),pkg/partner/sharing.go(per-partner key only,allignored, the aiage under-18 rule reading as off),pkg/partner/appprofile.go(value formats and ranges),pkg/partner/sharing_watch.go(when each webhook fires, one per linked athlete record, the record read at send time),pkg/partner/sharing_confirmation.go(verified address, 7-day link, 10-minute resend gap, three sends),pkg/mcp(partnerOnlyTools),pkg/gateway(athlete_scopefor a delegated token naming another athlete).Checks
scripts/check-docs-drift.py --backend <fuel-backend at #1759 head>: clean (128 operations, 18 events). Against fuel-backend main it fails until #1759 lands, which is why this waits on it: the hourly Docs Drift run would go red.test-response-examples.py: the new page's Python and TypeScript samples run against the page's three response examples (and fail when the sample is broken).check-engine-constants.py,check-app-claims.py,mint validate,mint broken-links --check-anchors: clean./home/claude-tmp/claude-1000/psharing-docs/renders/.Landing order
After fuel-backend #1759 lands. The page also describes saturday #3691 (the app switch) and sweb #664 (the hosted finish screen); both are open.
🤖 Generated with Claude Code