feat: add Guest RSVP URLs tab for managing guest RSVP links - #218
Merged
Conversation
Adds a 4th tab to the Attendee Dashboard (alongside Registrations, Campaigns, Sessions) so Event Marketers can generate, list, extend the expiration of, and revoke one-time-use guest RSVP links — links that let a guest register for an event without Adobe ID login (companion event-libs PR handles the guest-facing redemption flow). Adds four new authenticated API methods (generate/list/PATCH-extend/ revoke) on the existing eventScopeCheck-protected route family, and widens the API client's method support to include PATCH end-to-end (including the non-invasive-test-mode safety guard, which previously only covered PUT/POST/DELETE). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The backend renamed the resource guestRsvpLinks -> guestRsvpTokens, changed
the list endpoint to return a bare array instead of a wrapper object, and
stopped returning a composed URL (ESP now returns only the raw token, so
EMC composes the shareable link client-side as
`${event.detailPagePath}?guestToken=${token}`, mirroring the existing
EventForm/EventsDashboard preview-URL pattern). Status values are now
unused/used/revoked plus a separate isExpired flag (an unused-but-expired
token still needs to stay extendable/revocable), and extending a token now
takes a relative expiresInDays instead of an absolute epoch.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The backend dropped the "guest" prefix from the RSVP token contract: the marketer-facing path moved from .../guestRsvpTokens to .../rsvpTokens and the shareable link's query param from ?guestToken= to ?rsvpToken=. Renames api.ts's methods, the guestRsvp.ts type file (now rsvpToken.ts), and Registrations.tsx's state/handlers to match. Visible "Guest RSVP" product copy and the GuestRsvpUrlsTab component name are intentionally kept; no behavior changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…from tokens Verified against the now-merged BE contract (events-service-platform PR #1132) and made two corrections: - RsvpToken's field names didn't match the real schema (an earlier simplified draft of the integration guide used createdAt/ usedByAttendeeId; the actual API uses creationTime/modificationTime/ usedByAttendee, plus revokedAt/revokedBy). Renamed to match, and updated the two table columns that read them. - Per a product decision to stop binding campaignId to a token at generation time (the BE coupling is being refactored separately), removed campaignId entirely from RsvpToken/RsvpTokenCreatePayload. Campaign attribution is now opted into per-copy: clicking Copy on a token shows a dialog (only when the event has active campaigns) to optionally track the share with one, composing the copied URL from that campaign's own shareable URL plus an appended rsvpToken param — two independent query params, not a bound relationship. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Summary
apiServicemethods on thersvpTokensresource:getRsvpTokens,generateRsvpToken,updateRsvpToken(PATCH, extends expiry by a relative day count),revokeRsvpToken— all on the existingesphost/eventScopeCheck-protected route family.getRsvpTokensreturns a bare array (no wrapper object).${event.detailPagePath}?rsvpToken=${token}, mirroring the existing preview-URL composition pattern already used inEventForm.tsx/EventsDashboard.tsx.unused | used | revokedplus a separateisExpiredboolean (an unused-but-past-expiry token still reportsstatus: 'unused'— it stays extendable/revocable, and the UI shows it as "Expired" via a display-only computed status so it doesn't look like a healthy link).expiresInDaysinstead of an absolute epoch; the server recomputes and replacesexpiresAtasnow + expiresInDays.event:write; Revoke (irreversible) is gated onevent:delete, matching the precedent set byEventsDashboard/SpeakersDashboardfor destructive actions.RsvpTokenno longer modelscampaignIdat all, and tokens are always generated with no bound campaign. Instead, clicking "Copy" on a token's link shows a dialog (only when the event has active campaigns) asking whether to track that particular share with one; picking a campaign composes the copied URL from that campaign's own shareable URL with an additionalrsvpToken=<token>param appended — two fully independent query params, not a relationship stored on the token record. Picking "No campaign" (the default) copies the plain token link unchanged.Update (BE contract now finalized and merged): this PR most recently targeted a
guestRsvpTokensresource with a?guestToken=query param, then a pure rename torsvpTokens/?rsvpToken=vocabulary. The backend's RSVP-token feature has now merged todevelopfor real (events-service-platform PR #1132). Verifying this implementation directly against the shipped OpenAPI schema surfaced a real field-name bug:RsvpTokenusedcreatedAt/usedByAttendeeId(from an earlier, simplified draft of the integration guide), but the actual schema usescreationTime/modificationTime/usedByAttendeeplusrevokedAt/revokedBy— fixed to match, along with the two table columns that read them. Separately, per a team decision to stop coupling campaign attribution to the token record (a backend refactor is planned separately), added the share-time campaign-tracking dialog described above and removedcampaignIdfrom the token types entirely.Test plan
npm run type-check(tsc --noEmit) cleannpm run check(lint + type-check) clean — note: this repo'slintscript currently excludesweb-srcentirely and has no working TS/React ESLint config for it either way (pre-existing, not introduced here — confirmed again this round)npm run test:unit— 73/73 passing (no test coverage exists yet for this tab specifically; matches this repo's existing test conventions for other Registrations tabs)event:write, nowevent:delete) plus itsuseMemodependency array.guestRsvpTokenscontract (including a cross-repo pass checking theguestTokenquery param and URL composition against the sibling event-libs repo); no additional issues found on the EMC side.rsvpToken/rsvpTokensvocabulary, including a whole-repo grep for every old identifier/string and a check that the file rename (guestRsvp.ts→rsvpToken.ts) left no stale importers; no issues found.rsvpTokensendpoints.🤖 Generated with Claude Code