fix(assessment): return confirmed categories with their basis and label demonstration categories

This commit is contained in:
shira committed 2026-10-09 21:24:24 +03:00
1 parent 623d41b969
commit d4903a3796
77 files changed
+1441 -288

No files matched your search

@@ -5395,6 +5395,10 @@ type AssessmentSpecializationAvailability struct {
Specialization SpecializationCode `json:"specialization"`
// Currently confirmed grade of the specialization, or null.
ConfirmedGrade NilGradeCode `json:"confirmed_grade"`
// What the confirmed grade rests on, or null exactly when `confirmed_grade` is null. `synthetic_demo`
// marks a demonstration category, which is not a validated measurement and must not be shown as a real
// confirmation.
ConfirmedBasis NilEvidenceBasis `json:"confirmed_basis"`
// Identifier of the active attempt of the specialization, or null.
ActiveAttemptID NilUUID `json:"active_attempt_id"`
// Every grade of the scale in ascending order.
@@ -5411,6 +5415,11 @@ func (s *AssessmentSpecializationAvailability) GetConfirmedGrade() NilGradeCode
return s.ConfirmedGrade
}
// GetConfirmedBasis returns the value of ConfirmedBasis.
func (s *AssessmentSpecializationAvailability) GetConfirmedBasis() NilEvidenceBasis {
return s.ConfirmedBasis
}
// GetActiveAttemptID returns the value of ActiveAttemptID.
func (s *AssessmentSpecializationAvailability) GetActiveAttemptID() NilUUID {
return s.ActiveAttemptID
@@ -5431,6 +5440,11 @@ func (s *AssessmentSpecializationAvailability) SetConfirmedGrade(val NilGradeCod
s.ConfirmedGrade = val
}
// SetConfirmedBasis sets the value of ConfirmedBasis.
func (s *AssessmentSpecializationAvailability) SetConfirmedBasis(val NilEvidenceBasis) {
s.ConfirmedBasis = val
}
// SetActiveAttemptID sets the value of ActiveAttemptID.
func (s *AssessmentSpecializationAvailability) SetActiveAttemptID(val NilUUID) {
s.ActiveAttemptID = val
@@ -7030,13 +7044,15 @@ func (s *CardAccessListHeaders) SetResponse(val CardAccessList) {
func (*CardAccessListHeaders) listMyCardAccessHistoryRes() {}
// A category confirmed by assessment results, as the card shows it.
// A category confirmed by assessment results, as the card shows it. `basis` says what the grade rests
// on; `synthetic_demo` marks a demonstration category, which is never a standard confirmation.
// Ref: #/components/schemas/CardCategory
type CardCategory struct {
Specialization SpecializationCode `json:"specialization"`
Grade GradeCode `json:"grade"`
// Coarse strength of the authoritative confirmation.
Strength CardCategoryStrength `json:"strength"`
Basis EvidenceBasis `json:"basis"`
}
// GetSpecialization returns the value of Specialization.
@@ -7054,6 +7070,11 @@ func (s *CardCategory) GetStrength() CardCategoryStrength {
return s.Strength
}
// GetBasis returns the value of Basis.
func (s *CardCategory) GetBasis() EvidenceBasis {
return s.Basis
}
// SetSpecialization sets the value of Specialization.
func (s *CardCategory) SetSpecialization(val SpecializationCode) {
s.Specialization = val
@@ -7069,6 +7090,11 @@ func (s *CardCategory) SetStrength(val CardCategoryStrength) {
s.Strength = val
}
// SetBasis sets the value of Basis.
func (s *CardCategory) SetBasis(val EvidenceBasis) {
s.Basis = val
}
// Coarse strength of the authoritative confirmation.
type CardCategoryStrength string
@@ -12918,10 +12944,13 @@ func (s *MatchAppliedFilters) SetConditions(val NilMatchAppliedConditions) {
}
// A confirmed category. Its specialization must equal the enclosing match entry's specialization.
// `basis` says what the grade rests on; `synthetic_demo` marks a demonstration category, which an
// organization must read as one and never as a standard confirmation.
// Ref: #/components/schemas/MatchCategory
type MatchCategory struct {
Specialization SpecializationCode `json:"specialization"`
Grade GradeCode `json:"grade"`
Basis EvidenceBasis `json:"basis"`
}
// GetSpecialization returns the value of Specialization.
@@ -12934,6 +12963,11 @@ func (s *MatchCategory) GetGrade() GradeCode {
return s.Grade
}
// GetBasis returns the value of Basis.
func (s *MatchCategory) GetBasis() EvidenceBasis {
return s.Basis
}
// SetSpecialization sets the value of Specialization.
func (s *MatchCategory) SetSpecialization(val SpecializationCode) {
s.Specialization = val
@@ -12944,6 +12978,11 @@ func (s *MatchCategory) SetGrade(val GradeCode) {
s.Grade = val
}
// SetBasis sets the value of Basis.
func (s *MatchCategory) SetBasis(val EvidenceBasis) {
s.Basis = val
}
// Confirmation state for this specialization only. A result for one specialization never changes the
// state of another specialization.
// Ref: #/components/schemas/MatchConfirmationStatus
@@ -18060,6 +18099,51 @@ func (o NilEmailAddress) Or(d EmailAddress) EmailAddress {
return d
}
// NewNilEvidenceBasis returns new NilEvidenceBasis with value set to v.
func NewNilEvidenceBasis(v EvidenceBasis) NilEvidenceBasis {
return NilEvidenceBasis{
Value: v,
}
}
// NilEvidenceBasis is nullable EvidenceBasis.
type NilEvidenceBasis struct {
Value EvidenceBasis
Null bool
}
// SetTo sets value to v.
func (o *NilEvidenceBasis) SetTo(v EvidenceBasis) {
o.Null = false
o.Value = v
}
// IsNull returns true if value is Null.
func (o NilEvidenceBasis) IsNull() bool { return o.Null }
// SetToNull sets value to null.
func (o *NilEvidenceBasis) SetToNull() {
o.Null = true
var v EvidenceBasis
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o NilEvidenceBasis) Get() (v EvidenceBasis, ok bool) {
if o.Null {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o NilEvidenceBasis) Or(d EvidenceBasis) EvidenceBasis {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewNilFloat64 returns new NilFloat64 with value set to v.
func NewNilFloat64(v float64) NilFloat64 {
return NilFloat64{
@@ -26050,11 +26134,13 @@ type ProfileClaimTrustLevel int32
// read-only and derived by the server from the assessment results of the candidate; no request carries
// it and the profile storage holds no such column, so neither a form nor an import can write a
// confirmed grade. It is separate from the claims of the profile and from the self-assessed grades in
// `roles`.
// `roles`. `basis` says what the grade rests on; `synthetic_demo` marks a demonstration category that
// is not a validated measurement.
// Ref: #/components/schemas/ProfileConfirmedCategory
type ProfileConfirmedCategory struct {
Specialization SpecializationCode `json:"specialization"`
Grade GradeCode `json:"grade"`
Basis EvidenceBasis `json:"basis"`
ConfirmedAt Timestamp `json:"confirmed_at"`
// Assessment attempt whose result confirmed the grade. The attempt belongs to the candidate.
AttemptID uuid.UUID `json:"attempt_id"`
@@ -26070,6 +26156,11 @@ func (s *ProfileConfirmedCategory) GetGrade() GradeCode {
return s.Grade
}
// GetBasis returns the value of Basis.
func (s *ProfileConfirmedCategory) GetBasis() EvidenceBasis {
return s.Basis
}
// GetConfirmedAt returns the value of ConfirmedAt.
func (s *ProfileConfirmedCategory) GetConfirmedAt() Timestamp {
return s.ConfirmedAt
@@ -26090,6 +26181,11 @@ func (s *ProfileConfirmedCategory) SetGrade(val GradeCode) {
s.Grade = val
}
// SetBasis sets the value of Basis.
func (s *ProfileConfirmedCategory) SetBasis(val EvidenceBasis) {
s.Basis = val
}
// SetConfirmedAt sets the value of ConfirmedAt.
func (s *ProfileConfirmedCategory) SetConfirmedAt(val Timestamp) {
s.ConfirmedAt = val