feat(platform): add the notification inbox and deterministic match search
This commit is contained in:
1 parent
5edff21d2d
commit
0b11021b16
169 files changed
+17083
-443
No files matched your search
@@ -12625,6 +12625,18 @@ type ListMyInvitationsUnauthorized Problem
|
||||
|
||||
func (*ListMyInvitationsUnauthorized) listMyInvitationsRes() {}
|
||||
|
||||
type ListMyNotificationsBadRequest Problem
|
||||
|
||||
func (*ListMyNotificationsBadRequest) listMyNotificationsRes() {}
|
||||
|
||||
type ListMyNotificationsForbidden Problem
|
||||
|
||||
func (*ListMyNotificationsForbidden) listMyNotificationsRes() {}
|
||||
|
||||
type ListMyNotificationsUnauthorized Problem
|
||||
|
||||
func (*ListMyNotificationsUnauthorized) listMyNotificationsRes() {}
|
||||
|
||||
type ListMyOrganizationsBadRequest Problem
|
||||
|
||||
func (*ListMyOrganizationsBadRequest) listMyOrganizationsRes() {}
|
||||
@@ -12689,6 +12701,22 @@ type ListOrganizationNeedsUnauthorized Problem
|
||||
|
||||
func (*ListOrganizationNeedsUnauthorized) listOrganizationNeedsRes() {}
|
||||
|
||||
type ListOrganizationNotificationsBadRequest Problem
|
||||
|
||||
func (*ListOrganizationNotificationsBadRequest) listOrganizationNotificationsRes() {}
|
||||
|
||||
type ListOrganizationNotificationsForbidden Problem
|
||||
|
||||
func (*ListOrganizationNotificationsForbidden) listOrganizationNotificationsRes() {}
|
||||
|
||||
type ListOrganizationNotificationsNotFound Problem
|
||||
|
||||
func (*ListOrganizationNotificationsNotFound) listOrganizationNotificationsRes() {}
|
||||
|
||||
type ListOrganizationNotificationsUnauthorized Problem
|
||||
|
||||
func (*ListOrganizationNotificationsUnauthorized) listOrganizationNotificationsRes() {}
|
||||
|
||||
type LoginBadRequest Problem
|
||||
|
||||
func (*LoginBadRequest) loginRes() {}
|
||||
@@ -12747,6 +12775,38 @@ func (s *LogoutNoContent) SetSetCookie(val string) {
|
||||
|
||||
func (*LogoutNoContent) logoutRes() {}
|
||||
|
||||
type MarkMyNotificationReadBadRequest Problem
|
||||
|
||||
func (*MarkMyNotificationReadBadRequest) markMyNotificationReadRes() {}
|
||||
|
||||
type MarkMyNotificationReadForbidden Problem
|
||||
|
||||
func (*MarkMyNotificationReadForbidden) markMyNotificationReadRes() {}
|
||||
|
||||
type MarkMyNotificationReadNotFound Problem
|
||||
|
||||
func (*MarkMyNotificationReadNotFound) markMyNotificationReadRes() {}
|
||||
|
||||
type MarkMyNotificationReadUnauthorized Problem
|
||||
|
||||
func (*MarkMyNotificationReadUnauthorized) markMyNotificationReadRes() {}
|
||||
|
||||
type MarkOrganizationNotificationReadBadRequest Problem
|
||||
|
||||
func (*MarkOrganizationNotificationReadBadRequest) markOrganizationNotificationReadRes() {}
|
||||
|
||||
type MarkOrganizationNotificationReadForbidden Problem
|
||||
|
||||
func (*MarkOrganizationNotificationReadForbidden) markOrganizationNotificationReadRes() {}
|
||||
|
||||
type MarkOrganizationNotificationReadNotFound Problem
|
||||
|
||||
func (*MarkOrganizationNotificationReadNotFound) markOrganizationNotificationReadRes() {}
|
||||
|
||||
type MarkOrganizationNotificationReadUnauthorized Problem
|
||||
|
||||
func (*MarkOrganizationNotificationReadUnauthorized) markOrganizationNotificationReadRes() {}
|
||||
|
||||
// Conditions echoed as a complete snapshot; null means no filter.
|
||||
// Ref: #/components/schemas/MatchAppliedConditions
|
||||
type MatchAppliedConditions struct {
|
||||
@@ -13864,6 +13924,11 @@ func NewMatchSearchByBankMatchSearchRequest(v MatchSearchByBank) MatchSearchRequ
|
||||
type MatchSearchResponse struct {
|
||||
Source MatchSearchSource `json:"source"`
|
||||
Groups MatchSearchGroups `json:"groups"`
|
||||
// True when the groups are not the whole ranked result: a group exceeded the versioned per-group
|
||||
// limit, or the organization's card-view allowance ended while the entries were being revealed. The
|
||||
// entries returned are in rank order and already counted as card views. It carries no total, so it
|
||||
// does not reveal how many candidates match.
|
||||
Truncated bool `json:"truncated"`
|
||||
}
|
||||
|
||||
// GetSource returns the value of Source.
|
||||
@@ -13876,6 +13941,11 @@ func (s *MatchSearchResponse) GetGroups() MatchSearchGroups {
|
||||
return s.Groups
|
||||
}
|
||||
|
||||
// GetTruncated returns the value of Truncated.
|
||||
func (s *MatchSearchResponse) GetTruncated() bool {
|
||||
return s.Truncated
|
||||
}
|
||||
|
||||
// SetSource sets the value of Source.
|
||||
func (s *MatchSearchResponse) SetSource(val MatchSearchSource) {
|
||||
s.Source = val
|
||||
@@ -13886,6 +13956,11 @@ func (s *MatchSearchResponse) SetGroups(val MatchSearchGroups) {
|
||||
s.Groups = val
|
||||
}
|
||||
|
||||
// SetTruncated sets the value of Truncated.
|
||||
func (s *MatchSearchResponse) SetTruncated(val bool) {
|
||||
s.Truncated = val
|
||||
}
|
||||
|
||||
// MatchSearchResponseHeaders wraps MatchSearchResponse with response headers.
|
||||
type MatchSearchResponseHeaders struct {
|
||||
CacheControl CacheControlNoStore
|
||||
@@ -14392,7 +14467,10 @@ func (s *MatchUnknownFlag) SetReason(val MatchUnknownReason) {
|
||||
|
||||
type MatchUnknownFlags []MatchUnknownFlag
|
||||
|
||||
// Bounded explanation for an unknown component, not a hiding reason.
|
||||
// Bounded explanation for an unknown component, not a hiding reason. `cohort_below_30` is reported
|
||||
// only while the comparable real cohort of the category is smaller than the versioned minimum; once
|
||||
// the cohort reaches the minimum but the percentile is still not computed, the reason is
|
||||
// `percentile_not_computed`. In both cases T is the neutral 0.5.
|
||||
// Ref: #/components/schemas/MatchUnknownReason
|
||||
type MatchUnknownReason string
|
||||
|
||||
@@ -14404,6 +14482,7 @@ const (
|
||||
MatchUnknownReasonNeedFieldUnconfirmed MatchUnknownReason = "need_field_unconfirmed"
|
||||
MatchUnknownReasonNoFreshnessHistory MatchUnknownReason = "no_freshness_history"
|
||||
MatchUnknownReasonNoResponseHistory MatchUnknownReason = "no_response_history"
|
||||
MatchUnknownReasonPercentileNotComputed MatchUnknownReason = "percentile_not_computed"
|
||||
)
|
||||
|
||||
// AllValues returns all MatchUnknownReason values.
|
||||
@@ -14416,6 +14495,7 @@ func (MatchUnknownReason) AllValues() []MatchUnknownReason {
|
||||
MatchUnknownReasonNeedFieldUnconfirmed,
|
||||
MatchUnknownReasonNoFreshnessHistory,
|
||||
MatchUnknownReasonNoResponseHistory,
|
||||
MatchUnknownReasonPercentileNotComputed,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14436,6 +14516,8 @@ func (s MatchUnknownReason) MarshalText() ([]byte, error) {
|
||||
return []byte(s), nil
|
||||
case MatchUnknownReasonNoResponseHistory:
|
||||
return []byte(s), nil
|
||||
case MatchUnknownReasonPercentileNotComputed:
|
||||
return []byte(s), nil
|
||||
default:
|
||||
return nil, errors.Errorf("invalid value: %q", s)
|
||||
}
|
||||
@@ -14465,6 +14547,9 @@ func (s *MatchUnknownReason) UnmarshalText(data []byte) error {
|
||||
case MatchUnknownReasonNoResponseHistory:
|
||||
*s = MatchUnknownReasonNoResponseHistory
|
||||
return nil
|
||||
case MatchUnknownReasonPercentileNotComputed:
|
||||
*s = MatchUnknownReasonPercentileNotComputed
|
||||
return nil
|
||||
default:
|
||||
return errors.Errorf("invalid value: %q", data)
|
||||
}
|
||||
@@ -18830,6 +18915,51 @@ func (o NilNeedVersionLabel) Or(d NeedVersionLabel) NeedVersionLabel {
|
||||
return d
|
||||
}
|
||||
|
||||
// NewNilNotificationContent returns new NilNotificationContent with value set to v.
|
||||
func NewNilNotificationContent(v NotificationContent) NilNotificationContent {
|
||||
return NilNotificationContent{
|
||||
Value: v,
|
||||
}
|
||||
}
|
||||
|
||||
// NilNotificationContent is nullable NotificationContent.
|
||||
type NilNotificationContent struct {
|
||||
Value NotificationContent
|
||||
Null bool
|
||||
}
|
||||
|
||||
// SetTo sets value to v.
|
||||
func (o *NilNotificationContent) SetTo(v NotificationContent) {
|
||||
o.Null = false
|
||||
o.Value = v
|
||||
}
|
||||
|
||||
// IsNull returns true if value is Null.
|
||||
func (o NilNotificationContent) IsNull() bool { return o.Null }
|
||||
|
||||
// SetToNull sets value to null.
|
||||
func (o *NilNotificationContent) SetToNull() {
|
||||
o.Null = true
|
||||
var v NotificationContent
|
||||
o.Value = v
|
||||
}
|
||||
|
||||
// Get returns value and boolean that denotes whether value was set.
|
||||
func (o NilNotificationContent) Get() (v NotificationContent, 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 NilNotificationContent) Or(d NotificationContent) NotificationContent {
|
||||
if v, ok := o.Get(); ok {
|
||||
return v
|
||||
}
|
||||
return d
|
||||
}
|
||||
|
||||
// NewNilOrganizationDescription returns new NilOrganizationDescription with value set to v.
|
||||
func NewNilOrganizationDescription(v OrganizationDescription) NilOrganizationDescription {
|
||||
return NilOrganizationDescription{
|
||||
@@ -20495,6 +20625,301 @@ func (o NilWorkContext) Or(d WorkContext) WorkContext {
|
||||
return d
|
||||
}
|
||||
|
||||
// One item of the inbox of the current account. Its identity, kind, organization, delivery time, and
|
||||
// read state are stored; its content is resolved from the current source on every read.
|
||||
// Ref: #/components/schemas/Notification
|
||||
type Notification struct {
|
||||
// Identifier of the item. It equals the identifier of the event that produced it, so a repeated
|
||||
// delivery of the same event is the same item.
|
||||
ID uuid.UUID `json:"id"`
|
||||
Kind NotificationKind `json:"kind"`
|
||||
// The organization context of the item: the organization that sent it to a candidate, or the
|
||||
// organization whose cabinet holds it for an employer. The identifier is not a right to read the
|
||||
// organization.
|
||||
OrganizationID uuid.UUID `json:"organization_id"`
|
||||
DeliveredAt Timestamp `json:"delivered_at"`
|
||||
// When the recipient first marked the item read, or null while it is unread. A repeated mark keeps the
|
||||
// first time.
|
||||
ReadAt NilTimestamp `json:"read_at"`
|
||||
// The current content, or null when the source is gone or the recipient may not see it now. A client
|
||||
// then shows a generic line such as "The content is no longer available" and never an old copy. The
|
||||
// item stays in the list and can be marked read.
|
||||
Content NilNotificationContent `json:"content"`
|
||||
}
|
||||
|
||||
// GetID returns the value of ID.
|
||||
func (s *Notification) GetID() uuid.UUID {
|
||||
return s.ID
|
||||
}
|
||||
|
||||
// GetKind returns the value of Kind.
|
||||
func (s *Notification) GetKind() NotificationKind {
|
||||
return s.Kind
|
||||
}
|
||||
|
||||
// GetOrganizationID returns the value of OrganizationID.
|
||||
func (s *Notification) GetOrganizationID() uuid.UUID {
|
||||
return s.OrganizationID
|
||||
}
|
||||
|
||||
// GetDeliveredAt returns the value of DeliveredAt.
|
||||
func (s *Notification) GetDeliveredAt() Timestamp {
|
||||
return s.DeliveredAt
|
||||
}
|
||||
|
||||
// GetReadAt returns the value of ReadAt.
|
||||
func (s *Notification) GetReadAt() NilTimestamp {
|
||||
return s.ReadAt
|
||||
}
|
||||
|
||||
// GetContent returns the value of Content.
|
||||
func (s *Notification) GetContent() NilNotificationContent {
|
||||
return s.Content
|
||||
}
|
||||
|
||||
// SetID sets the value of ID.
|
||||
func (s *Notification) SetID(val uuid.UUID) {
|
||||
s.ID = val
|
||||
}
|
||||
|
||||
// SetKind sets the value of Kind.
|
||||
func (s *Notification) SetKind(val NotificationKind) {
|
||||
s.Kind = val
|
||||
}
|
||||
|
||||
// SetOrganizationID sets the value of OrganizationID.
|
||||
func (s *Notification) SetOrganizationID(val uuid.UUID) {
|
||||
s.OrganizationID = val
|
||||
}
|
||||
|
||||
// SetDeliveredAt sets the value of DeliveredAt.
|
||||
func (s *Notification) SetDeliveredAt(val Timestamp) {
|
||||
s.DeliveredAt = val
|
||||
}
|
||||
|
||||
// SetReadAt sets the value of ReadAt.
|
||||
func (s *Notification) SetReadAt(val NilTimestamp) {
|
||||
s.ReadAt = val
|
||||
}
|
||||
|
||||
// SetContent sets the value of Content.
|
||||
func (s *Notification) SetContent(val NilNotificationContent) {
|
||||
s.Content = val
|
||||
}
|
||||
|
||||
// The text of a notification as the current source shows it to the recipient now. It is computed on
|
||||
// every read and never stored, so a hiding, a revoked membership, or a withdrawn source removes it
|
||||
// from the next read. It holds no contact, no score, and no result of an assessment.
|
||||
// Ref: #/components/schemas/NotificationContent
|
||||
type NotificationContent struct {
|
||||
// Short heading in Russian.
|
||||
Title string `json:"title"`
|
||||
// One or two sentences in Russian. Plain text, never markup.
|
||||
Summary string `json:"summary"`
|
||||
// Same-origin absolute path of the screen that the notification opens, or null when there is none. It
|
||||
// has no origin, query, fragment, or escape; a client opens it only as a path of its own router.
|
||||
LinkPath NilString `json:"link_path"`
|
||||
}
|
||||
|
||||
// GetTitle returns the value of Title.
|
||||
func (s *NotificationContent) GetTitle() string {
|
||||
return s.Title
|
||||
}
|
||||
|
||||
// GetSummary returns the value of Summary.
|
||||
func (s *NotificationContent) GetSummary() string {
|
||||
return s.Summary
|
||||
}
|
||||
|
||||
// GetLinkPath returns the value of LinkPath.
|
||||
func (s *NotificationContent) GetLinkPath() NilString {
|
||||
return s.LinkPath
|
||||
}
|
||||
|
||||
// SetTitle sets the value of Title.
|
||||
func (s *NotificationContent) SetTitle(val string) {
|
||||
s.Title = val
|
||||
}
|
||||
|
||||
// SetSummary sets the value of Summary.
|
||||
func (s *NotificationContent) SetSummary(val string) {
|
||||
s.Summary = val
|
||||
}
|
||||
|
||||
// SetLinkPath sets the value of LinkPath.
|
||||
func (s *NotificationContent) SetLinkPath(val NilString) {
|
||||
s.LinkPath = val
|
||||
}
|
||||
|
||||
// Which event put the notification into the inbox. The inbox stores a reference to the event, never
|
||||
// its text.
|
||||
//
|
||||
// - invitation_delivered: an invitation reached the candidate's inbox. This is the in-platform
|
||||
// delivery state of the invitation: it does not depend on any email, and a failed or missing email
|
||||
// never blocks it. The invitation operations are planned; no invitation produces a notification
|
||||
// yet.
|
||||
// - synthetic: a synthetic notice that exercises the inbox path (the event, the read-time visibility
|
||||
// check, the list, and the read state). It has no product meaning, needs no action, and is never
|
||||
// produced by a user action.
|
||||
//
|
||||
// Adding a value is a contract change; a client shows an unknown kind with the generic text of an item
|
||||
// without content.
|
||||
// Ref: #/components/schemas/NotificationKind
|
||||
type NotificationKind string
|
||||
|
||||
const (
|
||||
NotificationKindInvitationDelivered NotificationKind = "invitation_delivered"
|
||||
NotificationKindSynthetic NotificationKind = "synthetic"
|
||||
)
|
||||
|
||||
// AllValues returns all NotificationKind values.
|
||||
func (NotificationKind) AllValues() []NotificationKind {
|
||||
return []NotificationKind{
|
||||
NotificationKindInvitationDelivered,
|
||||
NotificationKindSynthetic,
|
||||
}
|
||||
}
|
||||
|
||||
// MarshalText implements encoding.TextMarshaler.
|
||||
func (s NotificationKind) MarshalText() ([]byte, error) {
|
||||
switch s {
|
||||
case NotificationKindInvitationDelivered:
|
||||
return []byte(s), nil
|
||||
case NotificationKindSynthetic:
|
||||
return []byte(s), nil
|
||||
default:
|
||||
return nil, errors.Errorf("invalid value: %q", s)
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalText implements encoding.TextUnmarshaler.
|
||||
func (s *NotificationKind) UnmarshalText(data []byte) error {
|
||||
switch NotificationKind(data) {
|
||||
case NotificationKindInvitationDelivered:
|
||||
*s = NotificationKindInvitationDelivered
|
||||
return nil
|
||||
case NotificationKindSynthetic:
|
||||
*s = NotificationKindSynthetic
|
||||
return nil
|
||||
default:
|
||||
return errors.Errorf("invalid value: %q", data)
|
||||
}
|
||||
}
|
||||
|
||||
// One page of the inbox, newest delivery first.
|
||||
// Ref: #/components/schemas/NotificationList
|
||||
type NotificationList struct {
|
||||
// Items of the page.
|
||||
Items []Notification `json:"items"`
|
||||
Page PageInfo `json:"page"`
|
||||
}
|
||||
|
||||
// GetItems returns the value of Items.
|
||||
func (s *NotificationList) GetItems() []Notification {
|
||||
return s.Items
|
||||
}
|
||||
|
||||
// GetPage returns the value of Page.
|
||||
func (s *NotificationList) GetPage() PageInfo {
|
||||
return s.Page
|
||||
}
|
||||
|
||||
// SetItems sets the value of Items.
|
||||
func (s *NotificationList) SetItems(val []Notification) {
|
||||
s.Items = val
|
||||
}
|
||||
|
||||
// SetPage sets the value of Page.
|
||||
func (s *NotificationList) SetPage(val PageInfo) {
|
||||
s.Page = val
|
||||
}
|
||||
|
||||
// NotificationListHeaders wraps NotificationList with response headers.
|
||||
type NotificationListHeaders struct {
|
||||
CacheControl CacheControlNoStore
|
||||
Response NotificationList
|
||||
}
|
||||
|
||||
// GetCacheControl returns the value of CacheControl.
|
||||
func (s *NotificationListHeaders) GetCacheControl() CacheControlNoStore {
|
||||
return s.CacheControl
|
||||
}
|
||||
|
||||
// GetResponse returns the value of Response.
|
||||
func (s *NotificationListHeaders) GetResponse() NotificationList {
|
||||
return s.Response
|
||||
}
|
||||
|
||||
// SetCacheControl sets the value of CacheControl.
|
||||
func (s *NotificationListHeaders) SetCacheControl(val CacheControlNoStore) {
|
||||
s.CacheControl = val
|
||||
}
|
||||
|
||||
// SetResponse sets the value of Response.
|
||||
func (s *NotificationListHeaders) SetResponse(val NotificationList) {
|
||||
s.Response = val
|
||||
}
|
||||
|
||||
func (*NotificationListHeaders) listMyNotificationsRes() {}
|
||||
func (*NotificationListHeaders) listOrganizationNotificationsRes() {}
|
||||
|
||||
// The read state of one item after a mark. It carries no content, so marking never reads the source.
|
||||
// Ref: #/components/schemas/NotificationReadReceipt
|
||||
type NotificationReadReceipt struct {
|
||||
// Identifier of the marked item.
|
||||
ID uuid.UUID `json:"id"`
|
||||
ReadAt Timestamp `json:"read_at"`
|
||||
}
|
||||
|
||||
// GetID returns the value of ID.
|
||||
func (s *NotificationReadReceipt) GetID() uuid.UUID {
|
||||
return s.ID
|
||||
}
|
||||
|
||||
// GetReadAt returns the value of ReadAt.
|
||||
func (s *NotificationReadReceipt) GetReadAt() Timestamp {
|
||||
return s.ReadAt
|
||||
}
|
||||
|
||||
// SetID sets the value of ID.
|
||||
func (s *NotificationReadReceipt) SetID(val uuid.UUID) {
|
||||
s.ID = val
|
||||
}
|
||||
|
||||
// SetReadAt sets the value of ReadAt.
|
||||
func (s *NotificationReadReceipt) SetReadAt(val Timestamp) {
|
||||
s.ReadAt = val
|
||||
}
|
||||
|
||||
// NotificationReadReceiptHeaders wraps NotificationReadReceipt with response headers.
|
||||
type NotificationReadReceiptHeaders struct {
|
||||
CacheControl CacheControlNoStore
|
||||
Response NotificationReadReceipt
|
||||
}
|
||||
|
||||
// GetCacheControl returns the value of CacheControl.
|
||||
func (s *NotificationReadReceiptHeaders) GetCacheControl() CacheControlNoStore {
|
||||
return s.CacheControl
|
||||
}
|
||||
|
||||
// GetResponse returns the value of Response.
|
||||
func (s *NotificationReadReceiptHeaders) GetResponse() NotificationReadReceipt {
|
||||
return s.Response
|
||||
}
|
||||
|
||||
// SetCacheControl sets the value of CacheControl.
|
||||
func (s *NotificationReadReceiptHeaders) SetCacheControl(val CacheControlNoStore) {
|
||||
s.CacheControl = val
|
||||
}
|
||||
|
||||
// SetResponse sets the value of Response.
|
||||
func (s *NotificationReadReceiptHeaders) SetResponse(val NotificationReadReceipt) {
|
||||
s.Response = val
|
||||
}
|
||||
|
||||
func (*NotificationReadReceiptHeaders) markMyNotificationReadRes() {}
|
||||
func (*NotificationReadReceiptHeaders) markOrganizationNotificationReadRes() {}
|
||||
|
||||
// Numeric answer in the unit of the item. Two answers are equal when their decoded values are
|
||||
// numerically equal, so 254 and 254.0 are the same answer.
|
||||
// Ref: #/components/schemas/NumberAnswer
|
||||
@@ -30507,6 +30932,8 @@ func (*TooManyRequestsHeaders) getOrganizationCandidateCardRes() {}
|
||||
func (*TooManyRequestsHeaders) getOrganizationCandidateEvidenceRes() {}
|
||||
func (*TooManyRequestsHeaders) hideOrganizationRes() {}
|
||||
func (*TooManyRequestsHeaders) loginRes() {}
|
||||
func (*TooManyRequestsHeaders) markMyNotificationReadRes() {}
|
||||
func (*TooManyRequestsHeaders) markOrganizationNotificationReadRes() {}
|
||||
func (*TooManyRequestsHeaders) raiseOrganizationInvitationSalaryRes() {}
|
||||
func (*TooManyRequestsHeaders) recordMyAssessmentAttemptSignalsRes() {}
|
||||
func (*TooManyRequestsHeaders) registerAccountRes() {}
|
||||
|
||||
Reference in new issue
Block a user