feat(invitations): accept invitations with C4 consent and contact grants; share the E0 quota across holdings

This commit is contained in:
shira committed 2026-10-09 18:03:35 +03:00
1 parent a5990d3fc6
commit 676b3c6e24
59 files changed
+4926 -194

No files matched your search

@@ -43,8 +43,9 @@ func NewService(clock func() time.Time) *Service {
}
// ReserveInvitation atomically records a new invitation against the policy
// effective at the operation's clock snapshot. Repeating invitationID is
// idempotent even when the caller uses a different request key.
// effective at the operation's clock snapshot. The limit applies to the usage
// scope of the organization: its own usage, or the holding pool at E0. Repeating
// invitationID is idempotent even when the caller uses a different request key.
func (service *Service) ReserveInvitation(
ctx context.Context,
repositories Repositories,
@@ -72,9 +73,10 @@ func (service *Service) ReserveInvitation(
return decision, nil
}
// ReserveCardView atomically counts a distinct candidate in the organization's
// rolling view window. A repeat within the window refreshes the stored time
// without charging another distinct view.
// ReserveCardView atomically counts a distinct candidate in the rolling view
// window of the organization's usage scope. A repeat within the window by the
// same organization refreshes the stored time without charging another distinct
// view.
func (service *Service) ReserveCardView(
ctx context.Context,
repositories Repositories,