Summary
Implement the backend/data model and booking integration for THP-managed invitation links with atomic FIFO allocation and automatic consumption on click.
Technical scope
- DB table for invitation links (URL, status, added_by, created_at, consumed_at, consumed_by/session marker)
- Admin API endpoints to add/list/update links (global admin permissions)
- Atomic FIFO allocation endpoint:
- pick oldest
available
- mark as
used in the same transaction
- return link for redirect
- Booking onboarding integration:
- CTA requests invite link via endpoint
- redirect to returned link
- if no available links => fallback redirect to standard Gnosis onboarding
- Runtime invalid-link handling:
- mark invalid and retry next available (bounded retries)
Constraints
- Prevent double assignment under concurrent clicks
- Keep full traceability of
added_by
- Preserve compatibility with existing booking flow
Validation checklist
- Concurrent allocation test demonstrates no duplicate assignment
- FIFO order verified across multiple links
- Empty pool path redirects to standard Gnosis onboarding
- Admin can inspect who added links and current statuses
Depends on
Summary
Implement the backend/data model and booking integration for THP-managed invitation links with atomic FIFO allocation and automatic consumption on click.
Technical scope
availableusedin the same transactionConstraints
added_byValidation checklist
Depends on