When a compliance manager wants to share a site's data with a client, they create a ClientInvitation specifying the client's email, the siteId they should see, and the role (a SiteRole enum) that determines their permissions in the portal. The invitation has an expiresAt deadline. When the client accepts via the invitation link, status (an InvitationStatus enum) moves to accepted, and acceptedAt and acceptedByUserId are recorded. createdBy tracks which staff member sent the invitation, supporting accountability for portal access decisions.
Technical section
Data model, API, and internals — visible to developers.
