feat(assessment): add the review band of attempt signals and the disclosed collector

This commit is contained in:
shira committed 2026-10-08 23:04:57 +03:00
1 parent 68286af8b7
commit b3c6dc870b
124 files changed
+13522 -633

No files matched your search

@@ -0,0 +1,29 @@
package outbound
import (
"context"
"errors"
"time"
"github.com/google/uuid"
)
// ErrAssessmentSignalNoticeNotAcknowledged reports that the account has no
// acknowledgement for the requested notice version.
var ErrAssessmentSignalNoticeNotAcknowledged = errors.New("assessment signal notice is not acknowledged")
type AssessmentSignalNoticeRepositories interface {
AssessmentSignalNotices() AssessmentSignalNoticeRepository
}
// AssessmentSignalNoticeRepository stores the record that a candidate was shown
// the notice about collected assessment signals. The record is not a consent
// and no storage rule reads it.
type AssessmentSignalNoticeRepository interface {
// Get returns the time of the first acknowledgement of the version, or
// ErrAssessmentSignalNoticeNotAcknowledged.
Get(ctx context.Context, userID uuid.UUID, version int32) (time.Time, error)
// Acknowledge stores the acknowledgement when none exists for the version
// and keeps the earlier time otherwise. It returns the stored time.
Acknowledge(ctx context.Context, userID uuid.UUID, version int32, at time.Time) (time.Time, error)
}