feat(platform): add the notification inbox and deterministic match search

This commit is contained in:
shira committed 2026-10-09 13:14:46 +03:00
1 parent 5edff21d2d
commit 0b11021b16
169 files changed
+17083 -443

No files matched your search

+41
View File
@@ -718,6 +718,47 @@ Each operation also declares the problem response `default`. No new problem code
Open questions: whether the C2 consent text needs a new version now that publishing `categories` also sends one supporting assessment fact (skill, grade, trust level, year) to an organization - a decision for the owner and the lawyer, and the consent texts are not changed here; whether the evidence needs its own card field instead of the `categories` field; whether the year is the right precision for an employer; an operation for the candidate to hide or show a fact (the stored visibility exists, no operation changes it); and when claims of the profile and facts from other sources join the list.
### Match search
The tag `organization` has one search operation for the organization-visible candidate bank (PRD FR09). It is implemented as a deterministic search without ML; the model, the groups, and the data it reads are described in [architecture](../docs/en/ARCHITECTURE.md#matching-and-explanations).
| Method and path | operationId | Protection | Success | Specific errors |
| --- | --- | --- | --- | --- |
| `POST /api/v1/organizations/{org_id}/matches` | `SearchOrganizationMatches` | session, CSRF, `Origin`, active owner | 200 `MatchSearchResponse`, `Cache-Control: no-store` | 400, 401, 403, 404 `not_found` |
The operation changes nothing and needs no Idempotency-Key; `POST` carries the body. The 200 response also declares no 429.
- Access. The organization comes from the path and the active owner membership of the session account. A missing session answers 401, a candidate account, a member who is not the owner, a missing CSRF token, and a foreign `Origin` answer 403, and an unknown organization, an organization without an active membership, a need of another organization, an unknown need, or a `requirements_version` that no change of the confirmed requirements created answer 404. Hidden profiles, a revoked or missing C2 publication, the organization's own hiding, and the minimum cohort of the card are applied before any entry exists: a handle in the result is a handle that `GetOrganizationCandidateCard` opens at that moment.
- Basis. `MatchSearchByNeed` searches the immutable `requirements_version` snapshot (not the general `version`), and its optional `filters` narrow it; `MatchSearchByBank` searches all organization-visible entries with explicit filters. The response `source` repeats the basis: the need reference, or the bank filters with every key present and null for a filter that was not sent (the stack is sorted).
- Entries. Every entry is one candidate specialization under the organization-scoped `candidate_handle`. `main` and `near` hold confirmed categories (`near` when a required skill of the request earns less than 0.25), `unconfirmed` holds the declared specializations, sorted by Fit, then Coverage, then an internal identifier that is never returned. An unconfirmed entry has `category: null`, `strength: null`, and only `fit` and `coverage`. The groups are not one scale, and one handle can be confirmed in one specialization and unconfirmed in another.
- Neutral and unknown values. The semantics component is 0.5 for every entry with `ml_unavailable`; `percentile` is null with `cohort_below_30` and T is 0.5 (no comparable real cohort exists, and demonstration results never form one); domain, freshness, and responsiveness are 0.5 with their flags; competition is 0 and is neither a penalty nor an unknown; a card value that is not published is `null` in `public_context` with `not_in_public_card`.
- A search is charged like card reads, because an entry carries card content. The whole visible bank is ranked, and each group returns at most `max_results_per_group` entries of the policy version (demo 10, so at most 30 reveals for one search, below the 50 views per day of tier E0); no total is returned. In the order `main`, `near`, `unconfirmed`, each newly revealed candidate counts as one distinct card view of the organization (the same reservation as `GetOrganizationCandidateCard`, so a candidate already viewed inside the window costs nothing again, and repeating the search or opening the card afterwards does not charge twice) and gets one `card_viewed` entry in the access history per search with the fields actually returned. When the allowance ends, the entries already paid for are returned with `truncated: true`, nothing is written for the rest, and no error and no new problem code is returned. `truncated` is also true when a group exceeded its limit and never carries a count. The response `truncated` is required.
- No contact, candidate location, salary amount or minimum, raw answer, failed attempt, or reason for withheld data is in any entry; the explanation uses the bounded `MatchEvidenceCode` and `MatchEvidenceState` values only. A deployment whose effective policy has no `matching` section answers an internal error and never ranks with defaults.
Accepted residual risks: `truncated` is one bit about the size of the visible bank, and the response time grows with it; both are bounded by the group limit and carry no count. When the real comparable cohort of a category reaches the policy minimum, the percentile is still null with the reason `percentile_not_computed` and the search does not fail. A change of the visible cohort during a search repeats it up to three times; two simultaneous searches of one organization are serialized by its quota lock.
Open questions: the demo value 10 of `max_results_per_group` and whether the output needs paging beyond it; whether a search should charge a candidate for a summary entry at the price of a full card view; whether the grade of a need should be an implicit filter or only an explanation; whether the PRD values should keep an online Backend result (trust 0.6 times the broad relation 0.4 gives 0.24) below the near threshold 0.25 while a stated tag (0.25) reaches it, so that a candidate whose only evidence for a required technology is an assessment of the specialization is always in `near` for it; whether the `stack` filter should require every tag (as implemented) or any; and whether the demonstration relation between specializations and technologies (Backend over Go, PostgreSQL, Kafka, and Docker; DevOps over Docker) is the taxonomy the owner wants.
### Notifications
The tag `notification` describes the in-platform inbox of the current account, in the candidate cabinet and in the cabinet of one organization. It has four operations; the logic behind them is implemented, and no product module produces a real notification yet (see [architecture](../docs/en/ARCHITECTURE.md#internal-notifications)).
| Method and path | operationId | Protection | Success | Specific errors |
| --- | --- | --- | --- | --- |
| `GET /api/v1/me/notifications` | `ListMyNotifications` | session | 200 `NotificationList`, `Cache-Control: no-store` | 400, 401, 403 `forbidden` (an employer account) |
| `POST /api/v1/me/notifications/{notification_id}/read` | `MarkMyNotificationRead` | session and CSRF | 200 `NotificationReadReceipt`, `Cache-Control: no-store` | 400, 401, 403, 404 `not_found`, 429 |
| `GET /api/v1/organizations/{org_id}/notifications` | `ListOrganizationNotifications` | session | 200 `NotificationList`, `Cache-Control: no-store` | 400, 401, 403 `forbidden` (a candidate account) or `email_not_verified`, 404 `not_found` |
| `POST /api/v1/organizations/{org_id}/notifications/{notification_id}/read` | `MarkOrganizationNotificationRead` | session and CSRF | 200 `NotificationReadReceipt`, `Cache-Control: no-store` | 400, 401, 403, 404 `not_found`, 429 |
Each operation also declares the problem response `default`. No new problem code is added.
- The inbox is the delivery state inside the platform. An item exists once the event reached the platform, whether or not an email was sent, and a failed or missing email never blocks it. A repeated delivery of the same event is the same item (`id` is the event identifier).
- The inbox stores references, not text. `content` is resolved from the current source for the recipient on every read and is `null` when the source is gone or the recipient may not see it now (for example the candidate hid the organization); the item stays in the list, can be marked, and a client shows a generic line, never an earlier copy. `content.link_path` is a same-origin absolute path (`^/[A-Za-z0-9/_-]{0,255}$`) or `null`.
- The recipient is the session account. The organization route also needs an active membership of any role in `org_id` and lists only the caller's items of that organization. A candidate on the organization route and an employer on the candidate route get 403 `forbidden`, and an employer with an unconfirmed email gets 403 `email_not_verified` on the organization route. A missing membership, an unknown organization, an item of another account or of another organization, and an unknown identifier get the same 404 `not_found`, so identifiers cannot be enumerated.
- Pagination follows the shared `limit` (1-100, default 20) and `cursor`, newest delivery first with the identifier as the tie-breaker. The cursor is bound to the account and the cabinet; a cursor of another account or cabinet gets 400.
- A mark is idempotent by its effect and needs no Idempotency-Key: the first read time is stored and every repeat returns it. It reads no source and returns no content. `kind` is `invitation_delivered` (no module produces it yet) or `synthetic` (a notice with no product meaning that exercises the path).
- Closed schemas and checks. Every notification object has `additionalProperties: false` and all properties required. `TestNotificationOperationsFollowTheConventions` and `TestNotificationSchemasAreClosedAndKeepTextInTheContent` (Go) check the tag, the security of reads and marks, the statuses, no-store, the parameters, and that an item carries no text, name, or contact outside `content`.
### Generator checks
`testdata/openapi-3.2.0.yml` contains test operations that use the components above: pagination, Idempotency-Key, If-Match, ETag, and problem responses. ogen does not resolve external references, so the fixture keeps copies of the api/core components; `scripts/test_contract_copies.py` (part of `make -C api check`) checks that they, the fixture responses, and the ML `Problem` copy match api/core.
+41
View File
@@ -718,6 +718,47 @@ ML-сервис отвечает на ошибки той же схемой `Pro
Открытые вопросы: нужна ли новая версия текста согласия C2, раз публикация `categories` теперь отправляет организации еще один подтверждающий факт оценки (навык, грейд, уровень доверия, год) - решение владельца продукта и юриста, тексты согласий здесь не меняются; нужно ли доказательствам собственное поле карточки вместо поля `categories`; подходит ли работодателю точность в один год; операция скрыть или показать факт для кандидата (сохраненная видимость есть, операции для ее изменения нет); когда в список добавятся заявления профиля и факты из других источников.
### Подбор
В теге `organization` одна операция поиска по банку кандидатов, видимому организации (PRD FR09). Она реализована как детерминированный поиск без ML; модель, группы и читаемые данные описаны в [архитектуре](../docs/ru/ARCHITECTURE.md#подбор-и-объяснение).
| Метод и путь | operationId | Защита | Успех | Специфичные ошибки |
| --- | --- | --- | --- | --- |
| `POST /api/v1/organizations/{org_id}/matches` | `SearchOrganizationMatches` | сессия, CSRF, `Origin`, действующий владелец | 200 `MatchSearchResponse`, `Cache-Control: no-store` | 400, 401, 403, 404 `not_found` |
Операция ничего не меняет и не требует Idempotency-Key; `POST` нужен для тела. Ответ 200 также не объявляет 429.
- Доступ. Организация берется из пути и действующего членства владельца аккаунта сессии. Отсутствие сессии дает 401; аккаунт кандидата, участник не владелец, отсутствие CSRF-токена и чужой `Origin` дают 403; неизвестная организация, организация без действующего членства, потребность другой организации, неизвестная потребность и `requirements_version`, которую не создавало изменение подтвержденных требований, дают 404. Скрытые профили, отозванная или отсутствующая публикация C2, скрытие именно этой организации и минимальная когорта карточки применяются до появления любой записи: handle в результате - это handle, который `GetOrganizationCandidateCard` открывает в тот же момент.
- Основание. `MatchSearchByNeed` ищет по неизменяемому снимку `requirements_version` (не по общей `version`), необязательные `filters` сужают его; `MatchSearchByBank` ищет по всем записям, видимым организации, с явными фильтрами. `source` в ответе повторяет основание: ссылку на потребность либо фильтры банка, где присутствует каждый ключ, а неотправленный фильтр равен null (стек отсортирован).
- Записи. Каждая запись - одна специализация кандидата под организационным `candidate_handle`. В `main` и `near` лежат подтвержденные категории (`near`, если обязательный навык запроса дает меньше 0.25), в `unconfirmed` - заявленные специализации, отсортированные по Fit, затем Coverage, затем по внутреннему идентификатору, который не возвращается. У неподтвержденной записи `category: null`, `strength: null` и только `fit` и `coverage`. Группы - не одна шкала, и один handle может быть подтвержден по одной специализации и не подтвержден по другой.
- Нейтральные и неизвестные значения. Семантика равна 0.5 для каждой записи с `ml_unavailable`; `percentile` равен null с `cohort_below_30`, а T равен 0.5 (сопоставимой реальной когорты нет, демонстрационные результаты ее не образуют); домен, свежесть и своевременность равны 0.5 со своими признаками; соревновательный вклад равен 0 и не является ни штрафом, ни неизвестностью; неопубликованное значение карточки - `null` в `public_context` с `not_in_public_card`.
- Поиск оплачивается как чтение карточек, потому что запись несет содержимое карточки. Ранжируется весь видимый банк, а каждая группа возвращает не более `max_results_per_group` записей версии политики (демо 10, то есть не более 30 показов за один поиск, меньше 50 просмотров в сутки для уровня E0); итог не возвращается. В порядке `main`, `near`, `unconfirmed` каждый впервые показанный кандидат считается одним уникальным просмотром карточки организации (то же резервирование, что у `GetOrganizationCandidateCard`: кандидат, уже просмотренный в окне, второй раз ничего не стоит, и повтор поиска или последующее открытие карточки не списывает дважды) и получает по одной записи `card_viewed` в истории доступа за поиск с фактически возвращенными полями. Когда лимит заканчивается, возвращаются уже оплаченные записи с `truncated: true`, для остальных ничего не пишется, ошибка и новый код проблемы не возвращаются. `truncated` также истинно, когда группа превысила предел, и никогда не несет число. В ответе `truncated` обязателен.
- Ни в одной записи нет контакта, локации кандидата, суммы или минимума зарплаты, сырого ответа, проваленной попытки и причины скрытых данных; объяснение использует только ограниченные значения `MatchEvidenceCode` и `MatchEvidenceState`. Развертывание, действующая политика которого не содержит раздела `matching`, отвечает внутренней ошибкой и не ранжирует по умолчаниям.
Принятые остаточные риски: `truncated` - один бит о размере видимого банка, и время ответа растет вместе с ним; оба ограничены пределом группы и не несут числа. Когда реальная сопоставимая когорта категории достигает минимума политики, перцентиль все равно null с причиной `percentile_not_computed`, и поиск не падает. Изменение видимой когорты во время поиска повторяет его до трех раз; два одновременных поиска одной организации сериализуются ее блокировкой квоты.
Открытые вопросы: демонстрационное значение 10 для `max_results_per_group` и нужна ли постраничная выдача сверх него; должен ли поиск списывать кандидата за краткую запись по цене полного просмотра карточки; должен ли грейд потребности быть неявным фильтром или только объяснением; должны ли значения PRD оставлять онлайн-результат Backend (доверие 0.6 на широкую связь 0.4 дает 0.24) ниже порога близости 0.25, тогда как заявленный тег (0.25) его достигает, так что кандидат, у которого единственное доказательство нужной технологии - оценка специализации, всегда попадает для нее в `near`; должен ли фильтр `stack` требовать каждый тег (как реализовано) или любой; и является ли демонстрационная связь специализаций с технологиями (Backend над Go, PostgreSQL, Kafka и Docker; DevOps над Docker) таксономией, которую хочет владелец продукта.
### Уведомления
Тег `notification` описывает внутренний inbox текущего аккаунта в кабинете кандидата и в кабинете одной организации. В нем четыре операции; логика за ними реализована, но настоящие уведомления пока не создает ни один продуктовый модуль (см. [архитектуру](../docs/ru/ARCHITECTURE.md#внутренние-уведомления)).
| Метод и путь | operationId | Защита | Успех | Специфичные ошибки |
| --- | --- | --- | --- | --- |
| `GET /api/v1/me/notifications` | `ListMyNotifications` | сессия | 200 `NotificationList`, `Cache-Control: no-store` | 400, 401, 403 `forbidden` (аккаунт работодателя) |
| `POST /api/v1/me/notifications/{notification_id}/read` | `MarkMyNotificationRead` | сессия и CSRF | 200 `NotificationReadReceipt`, `Cache-Control: no-store` | 400, 401, 403, 404 `not_found`, 429 |
| `GET /api/v1/organizations/{org_id}/notifications` | `ListOrganizationNotifications` | сессия | 200 `NotificationList`, `Cache-Control: no-store` | 400, 401, 403 `forbidden` (аккаунт кандидата) или `email_not_verified`, 404 `not_found` |
| `POST /api/v1/organizations/{org_id}/notifications/{notification_id}/read` | `MarkOrganizationNotificationRead` | сессия и CSRF | 200 `NotificationReadReceipt`, `Cache-Control: no-store` | 400, 401, 403, 404 `not_found`, 429 |
Каждая операция также объявляет проблемный ответ `default`. Новый код problem не добавляется.
- Inbox - состояние доставки внутри платформы. Элемент существует, как только событие дошло до платформы, независимо от того, отправлено ли письмо, и неудачное или отсутствующее письмо его не блокирует. Повторная доставка того же события - тот же элемент (`id` - идентификатор события).
- Inbox хранит ссылки, а не текст. `content` вычисляется из текущего источника для получателя при каждом чтении и равен `null`, когда источника нет или получатель сейчас не вправе его видеть (например, кандидат скрыл организацию); элемент остается в списке, его можно отметить, а клиент показывает общую строку и никогда не показывает прежнюю копию. `content.link_path` - абсолютный путь того же origin (`^/[A-Za-z0-9/_-]{0,255}$`) или `null`.
- Получатель - аккаунт сессии. Маршрут организации дополнительно требует активное членство любой роли в `org_id` и показывает только элементы вызывающего в этой организации. Кандидат на маршруте организации и работодатель на маршруте кандидата получают 403 `forbidden`, а работодатель с неподтвержденной почтой на маршруте организации - 403 `email_not_verified`. Нет членства, неизвестная организация, элемент другого аккаунта или другой организации и неизвестный идентификатор дают один и тот же 404 `not_found`, поэтому идентификаторы нельзя перебирать.
- Пагинация использует общие `limit` (1-100, по умолчанию 20) и `cursor`, новые доставки первыми, идентификатор разрешает равенство. Курсор привязан к аккаунту и кабинету; курсор другого аккаунта или кабинета дает 400.
- Отметка идемпотентна по эффекту и не требует Idempotency-Key: первое время прочтения сохраняется, и каждый повтор возвращает его. Она не читает источник и не возвращает содержимое. `kind` равен `invitation_delivered` (пока его не создает ни один модуль) или `synthetic` (уведомление без продуктового смысла, которое проверяет путь).
- Закрытые схемы и проверки. У каждого объекта уведомлений `additionalProperties: false`, и все свойства обязательны. `TestNotificationOperationsFollowTheConventions` и `TestNotificationSchemasAreClosedAndKeepTextInTheContent` (Go) проверяют тег, защиту чтений и отметок, статусы, no-store, параметры и то, что у элемента нет текста, названия и контакта вне `content`.
### Проверки генераторов
`testdata/openapi-3.2.0.yml` содержит тестовые операции с перечисленными компонентами: пагинацией, Idempotency-Key, If-Match, ETag и problem-ответами. ogen не разрешает внешние ссылки, поэтому фикстура хранит копии компонентов api/core; `scripts/test_contract_copies.py` (входит в `make -C api check`) проверяет, что они, ответы фикстуры и ML-копия `Problem` совпадают с api/core.
+27
View File
@@ -4536,3 +4536,30 @@ HiddenOrganizationLimitReached:
pointer: /org_id
code: limit_reached
message: The candidate already hides the maximum number of organizations.
NotificationListPage:
summary: An unread notice and a read one whose source is no longer visible
value:
items:
- id: 01928f7a-8b9c-7d0e-9f1a-2b3c4d5e6f70
kind: synthetic
organization_id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
delivered_at: "2026-10-09T08:30:00Z"
read_at: null
content:
title: Тестовое уведомление
summary: Организация «Север» отправила проверочное уведомление платформы. Оно создано для проверки доставки и не требует действий.
link_path: null
- id: 01928f7a-8b9c-7d0e-9f1a-2b3c4d5e6f6f
kind: synthetic
organization_id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
delivered_at: "2026-10-08T17:05:00Z"
read_at: "2026-10-08T17:10:00Z"
content: null
page:
has_more: false
next_cursor: null
NotificationReadReceipt:
summary: The first read time of an item
value:
id: 01928f7a-8b9c-7d0e-9f1a-2b3c4d5e6f70
read_at: "2026-10-09T08:45:00Z"
+57
View File
@@ -139,6 +139,7 @@ ThreeGroups:
unknown_flags:
- component: assessment
reason: no_confirmation_for_specialization
truncated: false
Empty:
summary: A valid search with no eligible visible candidates.
@@ -157,6 +158,7 @@ Empty:
main: []
near: []
unconfirmed: []
truncated: false
MLUnavailable:
summary: Semantic similarity uses the documented neutral value while ML is unavailable.
@@ -207,6 +209,7 @@ MLUnavailable:
reason: ml_unavailable
near: []
unconfirmed: []
truncated: false
CohortBelow30:
summary: A small comparison cohort has no published percentile.
@@ -257,3 +260,57 @@ CohortBelow30:
reason: cohort_below_30
near: []
unconfirmed: []
truncated: false
Truncated:
summary: The group limit or the card-view allowance cut the output.
description: >-
Synthetic example. The entries returned are in rank order and already
counted as card views; the flag carries no total.
value:
source:
kind: bank
filters:
specialization: backend
confirmed_grade: null
confirmed_category: null
confirmation_status: null
declared_grade: null
stack: null
conditions: null
groups:
main:
- candidate_handle: cv1_EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
specialization: backend
confirmation_status: confirmed
declared_grade: null
category:
specialization: backend
grade: junior
strength: standard
public_context:
stack: null
experience_band: null
work_formats: null
salary_compatibility: null
evidence_summary:
- code: confirmed_category
state: supports
components:
fit: 0.5
coverage: 0.5
domain: 0.5
semantics: 0.5
percentile: null
competition: 0.0
freshness: 0.5
responsiveness: 0.5
rank_score: 0.45125
unknown_flags:
- component: semantics
reason: ml_unavailable
- component: percentile
reason: cohort_below_30
near: []
unconfirmed: []
truncated: true
+13
View File
@@ -158,3 +158,16 @@ HiddenOrganizationId:
type: string
format: uuid
example: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
NotificationId:
name: notification_id
in: path
required: true
description: >-
Identifier of an item of the inbox of the current account in the cabinet
that the path names. An item of another account, an item of another
organization context, and an unknown identifier all answer 404 not_found,
so identifiers cannot be enumerated.
schema:
type: string
format: uuid
example: 01928f7a-8b9c-7d0e-9f1a-2b3c4d5e6f70
+112 -1
View File
@@ -4847,7 +4847,7 @@ MatchUnknownComponent:
- domain
MatchUnknownReason:
type: string
description: Bounded explanation for an unknown component, not a hiding reason.
description: 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.
enum:
- ml_unavailable
- cohort_below_30
@@ -4856,6 +4856,7 @@ MatchUnknownReason:
- need_field_unconfirmed
- no_freshness_history
- no_response_history
- percentile_not_computed
MatchUnknownFlag:
type: object
description: A safe, bounded explanation for one unavailable component.
@@ -5110,11 +5111,15 @@ MatchSearchResponse:
required:
- source
- groups
- truncated
properties:
source:
$ref: '#/MatchSearchSource'
groups:
$ref: '#/MatchSearchGroups'
truncated:
type: boolean
description: '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.'
NeedVersion:
type: integer
format: int64
@@ -6027,6 +6032,112 @@ NeedUpdate:
oneOf:
- $ref: '#/NeedSalaryInput'
- type: 'null'
NotificationKind:
type: string
description: '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.'
enum:
- invitation_delivered
- synthetic
NotificationContent:
type: object
description: 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.
additionalProperties: false
required:
- title
- summary
- link_path
properties:
title:
type: string
minLength: 1
maxLength: 120
description: Short heading in Russian.
summary:
type: string
minLength: 1
maxLength: 500
description: One or two sentences in Russian. Plain text, never markup.
link_path:
type:
- string
- 'null'
maxLength: 256
pattern: ^/[A-Za-z0-9/_-]{0,255}$
description: 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.
examples:
- /candidate/invitations
Notification:
type: object
description: 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.
additionalProperties: false
required:
- id
- kind
- organization_id
- delivered_at
- read_at
- content
properties:
id:
type: string
format: uuid
description: 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.
kind:
$ref: '#/NotificationKind'
organization_id:
type: string
format: uuid
description: '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.'
delivered_at:
$ref: '#/Timestamp'
read_at:
description: When the recipient first marked the item read, or null while it is unread. A repeated mark keeps the first time.
oneOf:
- $ref: '#/Timestamp'
- type: 'null'
content:
description: 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.
oneOf:
- $ref: '#/NotificationContent'
- type: 'null'
NotificationList:
type: object
description: One page of the inbox, newest delivery first.
additionalProperties: false
required:
- items
- page
properties:
items:
type: array
maxItems: 100
description: Items of the page.
items:
$ref: '#/Notification'
page:
$ref: '#/PageInfo'
NotificationReadReceipt:
type: object
description: The read state of one item after a mark. It carries no content, so marking never reads the source.
additionalProperties: false
required:
- id
- read_at
properties:
id:
type: string
format: uuid
description: Identifier of the marked item.
read_at:
$ref: '#/Timestamp'
OrganizationVersion:
type: integer
format: int64
+16 -1
View File
@@ -278,7 +278,12 @@ schemas:
- domain
MatchUnknownReason:
type: string
description: Bounded explanation for an unknown component, not a hiding reason.
description: >-
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.
enum:
- ml_unavailable
- cohort_below_30
@@ -287,6 +292,7 @@ schemas:
- need_field_unconfirmed
- no_freshness_history
- no_response_history
- percentile_not_computed
MatchUnknownFlag:
type: object
description: A safe, bounded explanation for one unavailable component.
@@ -567,8 +573,17 @@ schemas:
required:
- source
- groups
- truncated
properties:
source:
$ref: "#/schemas/MatchSearchSource"
groups:
$ref: "#/schemas/MatchSearchGroups"
truncated:
type: boolean
description: >-
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.
@@ -0,0 +1,131 @@
schemas:
NotificationKind:
type: string
description: |-
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.
enum:
- invitation_delivered
- synthetic
NotificationContent:
type: object
description: >-
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.
additionalProperties: false
required:
- title
- summary
- link_path
properties:
title:
type: string
minLength: 1
maxLength: 120
description: Short heading in Russian.
summary:
type: string
minLength: 1
maxLength: 500
description: One or two sentences in Russian. Plain text, never markup.
link_path:
type:
- string
- "null"
maxLength: 256
pattern: "^/[A-Za-z0-9/_-]{0,255}$"
description: >-
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.
examples:
- /candidate/invitations
Notification:
type: object
description: >-
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.
additionalProperties: false
required:
- id
- kind
- organization_id
- delivered_at
- read_at
- content
properties:
id:
type: string
format: uuid
description: >-
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.
kind:
$ref: "#/schemas/NotificationKind"
organization_id:
type: string
format: uuid
description: >-
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.
delivered_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
read_at:
description: >-
When the recipient first marked the item read, or null while it is
unread. A repeated mark keeps the first time.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
content:
description: >-
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.
oneOf:
- $ref: "#/schemas/NotificationContent"
- type: "null"
NotificationList:
type: object
description: One page of the inbox, newest delivery first.
additionalProperties: false
required:
- items
- page
properties:
items:
type: array
maxItems: 100
description: Items of the page.
items:
$ref: "#/schemas/Notification"
page:
$ref: "./common_schemas.yml#/schemas/PageInfo"
NotificationReadReceipt:
type: object
description: >-
The read state of one item after a mark. It carries no content, so
marking never reads the source.
additionalProperties: false
required:
- id
- read_at
properties:
id:
type: string
format: uuid
description: Identifier of the marked item.
read_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
+375 -2
View File
@@ -27,6 +27,8 @@ tags:
description: 'Visibility of the current candidate: the publication of the anonymous card (a setting that refers to the C2 consent of the ledger and never replaces it), the search status that is not a consent, the organizations that the candidate hides the profile from, the preview of the card, and the history of the settings and of the accesses. Everything is closed by default, and no change makes a candidate more visible than they chose. No schema here reaches a contact, a name, or the lowest salary.'
- name: evidence
description: 'Skill evidence derived from confirmed assessment results: one fact per source event with its skills, trust level, attribution, date, and visibility. The candidate reads their own facts; an organization reads only the permitted projection of a currently visible card. Raw answers, failures, and anti-cheat data are never part of it.'
- name: notification
description: 'The in-platform inbox of the current account: references to delivered events with a read state, in the candidate cabinet and in the cabinet of one organization. The inbox is the source of the delivery state inside the platform and never depends on email. It stores no text: the content of every item is resolved from the current source for the recipient on each read, and an item whose source is gone or no longer visible stays in the list without content.'
- name: consent
description: 'The consent ledger of the current account: the independent consents C1-C5 with their text versions, sources, states, and revocations. The ledger is append-only and returns only the caller''s own records.'
- name: support
@@ -1647,9 +1649,11 @@ paths:
The body selects either a Need's `requirements_version` snapshot or the current organization-visible bank with explicit filters. A need reference uses `Need.requirements_version`, not the general `Need.version`; title or suggestion-only edits do not change the confirmed-requirements snapshot. An empty bank filter searches all otherwise eligible specializations, returning each specialization separately.
A search reveals card content, so it is charged like card reads. The whole visible bank is ranked, but each group returns at most the versioned per-group limit and no total is returned. In the order `main`, `near`, `unconfirmed`, each newly revealed candidate is counted as a distinct card view of the organization (a candidate it already viewed inside the window costs nothing again, so repeating the search or opening the card afterwards does not charge twice) and appears in the candidate's access history with the fields actually returned. When the allowance ends, the entries already counted are returned and `truncated` is true; the flag is also true when a group exceeded its limit, and it carries no count. No new error is returned for an exhausted allowance.
Every entry is one candidate specialization. A confirmed result in Backend never confirms Networks for the same candidate. The `main`, `near`, and `unconfirmed` arrays are separate groups. A confirmed category with required-skill coverage below 0.25 belongs to `near`; other confirmed entries belong to `main` (FR09). Entries in `unconfirmed` are ordered by Fit, then coverage, then a stable internal tie-breaker that is never returned. Their category and strength remain null, and they have no theta, T, P, or test percentile. The search result uses the organization-scoped opaque `candidate_handle` as its display pseudonym and invitation reference, never a candidate account or profile identifier.
The card context is limited to safe public fields: recognized stack tags, coarse experience, accepted work formats, and coarse salary compatibility. It contains no contact, candidate location, salary amount or minimum, raw answer, arbitrary profile text, or reason for withheld FSP data. Evidence explanations use bounded codes, not free text. When ML is unavailable, semantic similarity uses the neutral 0.5 specified by FR09 and `unknown_flags` names `ml_unavailable`. For fewer than 30 comparable real candidates, the search uses neutral T = 0.5, returns no percentile value, and names `cohort_below_30`.
The card context is limited to safe public fields: recognized stack tags, coarse experience, accepted work formats, and coarse salary compatibility. It contains no contact, candidate location, salary amount or minimum, raw answer, arbitrary profile text, or reason for withheld FSP data. Evidence explanations use bounded codes, not free text. When ML is unavailable, semantic similarity uses the neutral 0.5 specified by FR09 and `unknown_flags` names `ml_unavailable`. For fewer than 30 comparable real candidates, the search uses neutral T = 0.5, returns no percentile value, and names `cohort_below_30`. When the comparable real cohort of a category reaches the minimum, the percentile is still not computed (the organization-safe projection carries no theta), T stays the neutral 0.5, the percentile stays null, and `unknown_flags` names `percentile_not_computed`; the search does not fail.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate account answers 403 forbidden; an unknown organization or account without active membership answers 404 not_found. The response is `Cache-Control: no-store`.
security:
@@ -1689,6 +1693,8 @@ paths:
$ref: '#/components/examples/MLUnavailable'
cohort_below_30:
$ref: '#/components/examples/CohortBelow30'
truncated:
$ref: '#/components/examples/Truncated'
'400':
$ref: '#/components/responses/ValidationFailed'
'401':
@@ -2556,6 +2562,174 @@ paths:
$ref: '#/components/responses/TooManyRequests'
default:
$ref: '#/components/responses/Problem'
/api/v1/me/notifications:
get:
operationId: ListMyNotifications
summary: List the inbox of the current candidate.
description: |-
Requires the session cookie of a candidate account with a confirmed email. The recipient comes from the session, never from a request parameter, so the response holds only the caller's own items. Returns a page, newest delivery first with the identifier as the tie-breaker, with cursor pagination. The response is `Cache-Control: no-store`.
The inbox is the in-platform delivery state of a notification. An item exists as soon as the event reached the platform, whether or not any email was sent, and an email that failed or was never sent does not block it. The inbox stores a reference to the event, not its text: the `content` of every item is resolved from the current source for this recipient on this read. When the source is gone or the recipient may not see it now (for example the candidate hid the organization), the item stays in the list with `content` null, and no earlier text is shown. An event that is delivered twice is one item.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden. A malformed `limit` or `cursor`, or a cursor of another account, answers 400 validation_failed.
security:
- sessionCookie: []
tags:
- notification
parameters:
- $ref: '#/components/parameters/PageLimit'
- $ref: '#/components/parameters/PageCursor'
responses:
'200':
description: A page of the inbox of the current candidate.
headers:
Cache-Control:
$ref: '#/components/headers/CacheControlNoStore'
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationList'
examples:
page:
$ref: '#/components/examples/NotificationListPage'
'400':
$ref: '#/components/responses/ValidationFailed'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/Forbidden'
default:
$ref: '#/components/responses/Problem'
/api/v1/me/notifications/{notification_id}/read:
post:
operationId: MarkMyNotificationRead
summary: Mark an item of the inbox of the current candidate as read.
description: |-
Requires the session cookie of a candidate account with a confirmed email, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The recipient comes from the session. The request has no body.
The command is idempotent by its effect: the first mark stores the read time and every repeat returns that first time, so it needs no Idempotency-Key. It never reads the source and returns no content, so marking an item whose content is no longer available still works. It changes no other item.
The general rate limit can answer 429 with Retry-After before any check.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a missing or wrong CSRF token or a disallowed Origin answers 403 csrf_check_failed; an employer account answers 403 forbidden; an item of another account and an unknown identifier both answer 404 not_found, so identifiers cannot be enumerated. A `notification_id` that is not a UUID answers 400 validation_failed with the path pointer.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- notification
parameters:
- $ref: '#/components/parameters/NotificationId'
responses:
'200':
description: The read state of the item, newly set or repeated.
headers:
Cache-Control:
$ref: '#/components/headers/CacheControlNoStore'
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationReadReceipt'
examples:
read:
$ref: '#/components/examples/NotificationReadReceipt'
'400':
$ref: '#/components/responses/ValidationFailed'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/CsrfCheckFailedOrForbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
default:
$ref: '#/components/responses/Problem'
/api/v1/organizations/{org_id}/notifications:
get:
operationId: ListOrganizationNotifications
summary: List the inbox of the current employer in one organization.
description: |-
Requires the session cookie of an employer account with a confirmed email and an active membership in `org_id`, whatever its role. The recipient comes from the session and the organization from the path and the membership that the server holds, never from the request. Returns only the items addressed to the caller in this organization, newest delivery first with the identifier as the tie-breaker, with cursor pagination. An item of the same account in another organization, and an item of another member, are never listed. The response is `Cache-Control: no-store`.
Items follow the rules of ListMyNotifications: the inbox stores a reference to the event, an email never blocks an item, and the `content` of every item is resolved from the current source for this recipient on this read. An employer sees content only while the membership is active.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate account answers 403 forbidden, and an employer account with an unconfirmed email answers 403 email_not_verified; an account without an active membership in the organization and an unknown organization both answer 404 not_found, so organizations cannot be enumerated. A malformed `org_id`, `limit`, or `cursor`, or a cursor of another account or organization, answers 400 validation_failed.
security:
- sessionCookie: []
tags:
- notification
parameters:
- $ref: '#/components/parameters/OrganizationId'
- $ref: '#/components/parameters/PageLimit'
- $ref: '#/components/parameters/PageCursor'
responses:
'200':
description: A page of the inbox of the current employer in the organization.
headers:
Cache-Control:
$ref: '#/components/headers/CacheControlNoStore'
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationList'
examples:
page:
$ref: '#/components/examples/NotificationListPage'
'400':
$ref: '#/components/responses/ValidationFailed'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
default:
$ref: '#/components/responses/Problem'
/api/v1/organizations/{org_id}/notifications/{notification_id}/read:
post:
operationId: MarkOrganizationNotificationRead
summary: Mark an item of the inbox of the current employer in one organization as read.
description: |-
Requires the session cookie of an employer account with a confirmed email and an active membership in `org_id`, whatever its role, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The recipient comes from the session and the organization from the path and the server-side membership. The request has no body.
The command is idempotent by its effect and returns no content, like MarkMyNotificationRead. The item must belong to the caller in this organization.
The general rate limit can answer 429 with Retry-After before any check.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a missing or wrong CSRF token or a disallowed Origin answers 403 csrf_check_failed; a candidate account answers 403 forbidden, and an employer account with an unconfirmed email answers 403 email_not_verified; an account without an active membership in the organization, an unknown organization, an item of another account, an item of another organization, and an unknown identifier all answer 404 not_found. A malformed `org_id` or `notification_id` answers 400 validation_failed with the path pointer.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- notification
parameters:
- $ref: '#/components/parameters/OrganizationId'
- $ref: '#/components/parameters/NotificationId'
responses:
'200':
description: The read state of the item, newly set or repeated.
headers:
Cache-Control:
$ref: '#/components/headers/CacheControlNoStore'
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationReadReceipt'
examples:
read:
$ref: '#/components/examples/NotificationReadReceipt'
'400':
$ref: '#/components/responses/ValidationFailed'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/CsrfCheckFailedOrForbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
default:
$ref: '#/components/responses/Problem'
/api/v1/me/consents:
get:
operationId: ListMyConsents
@@ -9719,6 +9893,110 @@ components:
description: Permitted facts, one for each supported category.
items:
$ref: '#/components/schemas/OrganizationEvidenceFact'
NotificationKind:
type: string
description: |-
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.
enum:
- invitation_delivered
- synthetic
NotificationContent:
type: object
description: 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.
additionalProperties: false
required:
- title
- summary
- link_path
properties:
title:
type: string
minLength: 1
maxLength: 120
description: Short heading in Russian.
summary:
type: string
minLength: 1
maxLength: 500
description: One or two sentences in Russian. Plain text, never markup.
link_path:
type:
- string
- 'null'
maxLength: 256
pattern: ^/[A-Za-z0-9/_-]{0,255}$
description: 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.
examples:
- /candidate/invitations
Notification:
type: object
description: 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.
additionalProperties: false
required:
- id
- kind
- organization_id
- delivered_at
- read_at
- content
properties:
id:
type: string
format: uuid
description: 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.
kind:
$ref: '#/components/schemas/NotificationKind'
organization_id:
type: string
format: uuid
description: '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.'
delivered_at:
$ref: '#/components/schemas/Timestamp'
read_at:
description: When the recipient first marked the item read, or null while it is unread. A repeated mark keeps the first time.
oneOf:
- $ref: '#/components/schemas/Timestamp'
- type: 'null'
content:
description: 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.
oneOf:
- $ref: '#/components/schemas/NotificationContent'
- type: 'null'
NotificationList:
type: object
description: One page of the inbox, newest delivery first.
additionalProperties: false
required:
- items
- page
properties:
items:
type: array
maxItems: 100
description: Items of the page.
items:
$ref: '#/components/schemas/Notification'
page:
$ref: '#/components/schemas/PageInfo'
NotificationReadReceipt:
type: object
description: The read state of one item after a mark. It carries no content, so marking never reads the source.
additionalProperties: false
required:
- id
- read_at
properties:
id:
type: string
format: uuid
description: Identifier of the marked item.
read_at:
$ref: '#/components/schemas/Timestamp'
HealthResponse:
type: object
additionalProperties: false
@@ -10717,7 +10995,7 @@ components:
- domain
MatchUnknownReason:
type: string
description: Bounded explanation for an unknown component, not a hiding reason.
description: 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.
enum:
- ml_unavailable
- cohort_below_30
@@ -10726,6 +11004,7 @@ components:
- need_field_unconfirmed
- no_freshness_history
- no_response_history
- percentile_not_computed
MatchUnknownFlag:
type: object
description: A safe, bounded explanation for one unavailable component.
@@ -10875,11 +11154,15 @@ components:
required:
- source
- groups
- truncated
properties:
source:
$ref: '#/components/schemas/MatchSearchSource'
groups:
$ref: '#/components/schemas/MatchSearchGroups'
truncated:
type: boolean
description: '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.'
CardSelfAssessment:
type: object
description: Candidate-declared specialization and optional grade. This is never an assessment result.
@@ -11022,6 +11305,15 @@ components:
type: string
format: uuid
example: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
NotificationId:
name: notification_id
in: path
required: true
description: Identifier of an item of the inbox of the current account in the cabinet that the path names. An item of another account, an item of another organization context, and an unknown identifier all answer 404 not_found, so identifiers cannot be enumerated.
schema:
type: string
format: uuid
example: 01928f7a-8b9c-7d0e-9f1a-2b3c4d5e6f70
CandidateHandle:
name: candidate_handle
in: path
@@ -14347,6 +14639,7 @@ components:
unknown_flags:
- component: assessment
reason: no_confirmation_for_specialization
truncated: false
Empty:
summary: A valid search with no eligible visible candidates.
value:
@@ -14364,6 +14657,7 @@ components:
main: []
near: []
unconfirmed: []
truncated: false
MLUnavailable:
summary: Semantic similarity uses the documented neutral value while ML is unavailable.
description: Synthetic example; 0.5 is the FR09 neutral value, not an inference.
@@ -14413,6 +14707,7 @@ components:
reason: ml_unavailable
near: []
unconfirmed: []
truncated: false
CohortBelow30:
summary: A small comparison cohort has no published percentile.
description: Synthetic example; the exact cohort size is not disclosed.
@@ -14462,6 +14757,57 @@ components:
reason: cohort_below_30
near: []
unconfirmed: []
truncated: false
Truncated:
summary: The group limit or the card-view allowance cut the output.
description: Synthetic example. The entries returned are in rank order and already counted as card views; the flag carries no total.
value:
source:
kind: bank
filters:
specialization: backend
confirmed_grade: null
confirmed_category: null
confirmation_status: null
declared_grade: null
stack: null
conditions: null
groups:
main:
- candidate_handle: cv1_EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
specialization: backend
confirmation_status: confirmed
declared_grade: null
category:
specialization: backend
grade: junior
strength: standard
public_context:
stack: null
experience_band: null
work_formats: null
salary_compatibility: null
evidence_summary:
- code: confirmed_category
state: supports
components:
fit: 0.5
coverage: 0.5
domain: 0.5
semantics: 0.5
percentile: null
competition: 0
freshness: 0.5
responsiveness: 0.5
rank_score: 0.45125
unknown_flags:
- component: semantics
reason: ml_unavailable
- component: percentile
reason: cohort_below_30
near: []
unconfirmed: []
truncated: true
OrganizationAnonymousCandidateCard:
summary: An anonymous card currently visible to one organization
description: The alias is scoped to the reading organization; no contact values are included.
@@ -15719,6 +16065,33 @@ components:
granted_at: '2026-10-06T15:00:00Z'
revoked_at: '2026-10-07T10:00:00Z'
revocation_reason: participation_cancelled
NotificationListPage:
summary: An unread notice and a read one whose source is no longer visible
value:
items:
- id: 01928f7a-8b9c-7d0e-9f1a-2b3c4d5e6f70
kind: synthetic
organization_id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
delivered_at: '2026-10-09T08:30:00Z'
read_at: null
content:
title: Тестовое уведомление
summary: Организация «Север» отправила проверочное уведомление платформы. Оно создано для проверки доставки и не требует действий.
link_path: null
- id: 01928f7a-8b9c-7d0e-9f1a-2b3c4d5e6f6f
kind: synthetic
organization_id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
delivered_at: '2026-10-08T17:05:00Z'
read_at: '2026-10-08T17:10:00Z'
content: null
page:
has_more: false
next_cursor: null
NotificationReadReceipt:
summary: The first read time of an item
value:
id: 01928f7a-8b9c-7d0e-9f1a-2b3c4d5e6f70
read_at: '2026-10-09T08:45:00Z'
ConsentRecordListPage:
summary: The whole consent history of a candidate on one page
description: C1 was accepted at registration and again for a newer text version, so the first record is superseded; the version c1-2026-10-05 is an illustration, since the migration publishes only c1-2026-10-01 so far. C2 was granted and revoked. C4 was given in the acceptance of one invitation with the email only; the organization name is the one the consent text showed.
+29
View File
@@ -67,6 +67,15 @@ tags:
visibility. The candidate reads their own facts; an organization reads
only the permitted projection of a currently visible card. Raw
answers, failures, and anti-cheat data are never part of it.
- name: notification
description: >-
The in-platform inbox of the current account: references to delivered
events with a read state, in the candidate cabinet and in the cabinet of
one organization. The inbox is the source of the delivery state inside
the platform and never depends on email. It stores no text: the content
of every item is resolved from the current source for the recipient on
each read, and an item whose source is gone or no longer visible stays
in the list without content.
- name: consent
description: >-
The consent ledger of the current account: the independent consents
@@ -168,6 +177,14 @@ paths:
$ref: ./routes/candidate_invitation_decline.yml
/api/v1/me/invitations/{invitation_id}/cancel:
$ref: ./routes/candidate_invitation_cancel.yml
/api/v1/me/notifications:
$ref: ./routes/candidate_notifications.yml
/api/v1/me/notifications/{notification_id}/read:
$ref: ./routes/candidate_notification_read.yml
/api/v1/organizations/{org_id}/notifications:
$ref: ./routes/organization_notifications.yml
/api/v1/organizations/{org_id}/notifications/{notification_id}/read:
$ref: ./routes/organization_notification_read.yml
/api/v1/me/consents:
$ref: ./routes/consents.yml
/api/v1/me/consents/{purpose}:
@@ -910,6 +927,16 @@ components:
$ref: ./components/schemas.yml#/OrganizationEvidenceFact
OrganizationEvidence:
$ref: ./components/schemas.yml#/OrganizationEvidence
NotificationKind:
$ref: ./components/schemas.yml#/NotificationKind
NotificationContent:
$ref: ./components/schemas.yml#/NotificationContent
Notification:
$ref: ./components/schemas.yml#/Notification
NotificationList:
$ref: ./components/schemas.yml#/NotificationList
NotificationReadReceipt:
$ref: ./components/schemas.yml#/NotificationReadReceipt
parameters:
IdempotencyKey:
$ref: ./components/parameters.yml#/IdempotencyKey
@@ -933,6 +960,8 @@ components:
$ref: ./components/parameters.yml#/MyInvitationId
HiddenOrganizationId:
$ref: ./components/parameters.yml#/HiddenOrganizationId
NotificationId:
$ref: ./components/parameters.yml#/NotificationId
headers:
ETag:
$ref: ./components/headers.yml#/ETag
@@ -0,0 +1,43 @@
post:
operationId: MarkMyNotificationRead
summary: Mark an item of the inbox of the current candidate as read.
description: |-
Requires the session cookie of a candidate account with a confirmed email, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The recipient comes from the session. The request has no body.
The command is idempotent by its effect: the first mark stores the read time and every repeat returns that first time, so it needs no Idempotency-Key. It never reads the source and returns no content, so marking an item whose content is no longer available still works. It changes no other item.
The general rate limit can answer 429 with Retry-After before any check.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a missing or wrong CSRF token or a disallowed Origin answers 403 csrf_check_failed; an employer account answers 403 forbidden; an item of another account and an unknown identifier both answer 404 not_found, so identifiers cannot be enumerated. A `notification_id` that is not a UUID answers 400 validation_failed with the path pointer.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- notification
parameters:
- $ref: ../components/parameters.yml#/NotificationId
responses:
"200":
description: The read state of the item, newly set or repeated.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/NotificationReadReceipt
examples:
read:
$ref: ../components/examples.yml#/NotificationReadReceipt
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,37 @@
get:
operationId: ListMyNotifications
summary: List the inbox of the current candidate.
description: |-
Requires the session cookie of a candidate account with a confirmed email. The recipient comes from the session, never from a request parameter, so the response holds only the caller's own items. Returns a page, newest delivery first with the identifier as the tie-breaker, with cursor pagination. The response is `Cache-Control: no-store`.
The inbox is the in-platform delivery state of a notification. An item exists as soon as the event reached the platform, whether or not any email was sent, and an email that failed or was never sent does not block it. The inbox stores a reference to the event, not its text: the `content` of every item is resolved from the current source for this recipient on this read. When the source is gone or the recipient may not see it now (for example the candidate hid the organization), the item stays in the list with `content` null, and no earlier text is shown. An event that is delivered twice is one item.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden. A malformed `limit` or `cursor`, or a cursor of another account, answers 400 validation_failed.
security:
- sessionCookie: []
tags:
- notification
parameters:
- $ref: ../components/parameters.yml#/PageLimit
- $ref: ../components/parameters.yml#/PageCursor
responses:
"200":
description: A page of the inbox of the current candidate.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/NotificationList
examples:
page:
$ref: ../components/examples.yml#/NotificationListPage
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
+5 -1
View File
@@ -6,9 +6,11 @@ post:
The body selects either a Need's `requirements_version` snapshot or the current organization-visible bank with explicit filters. A need reference uses `Need.requirements_version`, not the general `Need.version`; title or suggestion-only edits do not change the confirmed-requirements snapshot. An empty bank filter searches all otherwise eligible specializations, returning each specialization separately.
A search reveals card content, so it is charged like card reads. The whole visible bank is ranked, but each group returns at most the versioned per-group limit and no total is returned. In the order `main`, `near`, `unconfirmed`, each newly revealed candidate is counted as a distinct card view of the organization (a candidate it already viewed inside the window costs nothing again, so repeating the search or opening the card afterwards does not charge twice) and appears in the candidate's access history with the fields actually returned. When the allowance ends, the entries already counted are returned and `truncated` is true; the flag is also true when a group exceeded its limit, and it carries no count. No new error is returned for an exhausted allowance.
Every entry is one candidate specialization. A confirmed result in Backend never confirms Networks for the same candidate. The `main`, `near`, and `unconfirmed` arrays are separate groups. A confirmed category with required-skill coverage below 0.25 belongs to `near`; other confirmed entries belong to `main` (FR09). Entries in `unconfirmed` are ordered by Fit, then coverage, then a stable internal tie-breaker that is never returned. Their category and strength remain null, and they have no theta, T, P, or test percentile. The search result uses the organization-scoped opaque `candidate_handle` as its display pseudonym and invitation reference, never a candidate account or profile identifier.
The card context is limited to safe public fields: recognized stack tags, coarse experience, accepted work formats, and coarse salary compatibility. It contains no contact, candidate location, salary amount or minimum, raw answer, arbitrary profile text, or reason for withheld FSP data. Evidence explanations use bounded codes, not free text. When ML is unavailable, semantic similarity uses the neutral 0.5 specified by FR09 and `unknown_flags` names `ml_unavailable`. For fewer than 30 comparable real candidates, the search uses neutral T = 0.5, returns no percentile value, and names `cohort_below_30`.
The card context is limited to safe public fields: recognized stack tags, coarse experience, accepted work formats, and coarse salary compatibility. It contains no contact, candidate location, salary amount or minimum, raw answer, arbitrary profile text, or reason for withheld FSP data. Evidence explanations use bounded codes, not free text. When ML is unavailable, semantic similarity uses the neutral 0.5 specified by FR09 and `unknown_flags` names `ml_unavailable`. For fewer than 30 comparable real candidates, the search uses neutral T = 0.5, returns no percentile value, and names `cohort_below_30`. When the comparable real cohort of a category reaches the minimum, the percentile is still not computed (the organization-safe projection carries no theta), T stays the neutral 0.5, the percentile stays null, and `unknown_flags` names `percentile_not_computed`; the search does not fail.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate account answers 403 forbidden; an unknown organization or account without active membership answers 404 not_found. The response is `Cache-Control: no-store`.
security:
@@ -48,6 +50,8 @@ post:
$ref: ../components/examples/matches.yml#/MLUnavailable
cohort_below_30:
$ref: ../components/examples/matches.yml#/CohortBelow30
truncated:
$ref: ../components/examples/matches.yml#/Truncated
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
@@ -0,0 +1,44 @@
post:
operationId: MarkOrganizationNotificationRead
summary: Mark an item of the inbox of the current employer in one organization as read.
description: |-
Requires the session cookie of an employer account with a confirmed email and an active membership in `org_id`, whatever its role, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The recipient comes from the session and the organization from the path and the server-side membership. The request has no body.
The command is idempotent by its effect and returns no content, like MarkMyNotificationRead. The item must belong to the caller in this organization.
The general rate limit can answer 429 with Retry-After before any check.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a missing or wrong CSRF token or a disallowed Origin answers 403 csrf_check_failed; a candidate account answers 403 forbidden, and an employer account with an unconfirmed email answers 403 email_not_verified; an account without an active membership in the organization, an unknown organization, an item of another account, an item of another organization, and an unknown identifier all answer 404 not_found. A malformed `org_id` or `notification_id` answers 400 validation_failed with the path pointer.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- notification
parameters:
- $ref: ../components/parameters.yml#/OrganizationId
- $ref: ../components/parameters.yml#/NotificationId
responses:
"200":
description: The read state of the item, newly set or repeated.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/NotificationReadReceipt
examples:
read:
$ref: ../components/examples.yml#/NotificationReadReceipt
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,40 @@
get:
operationId: ListOrganizationNotifications
summary: List the inbox of the current employer in one organization.
description: |-
Requires the session cookie of an employer account with a confirmed email and an active membership in `org_id`, whatever its role. The recipient comes from the session and the organization from the path and the membership that the server holds, never from the request. Returns only the items addressed to the caller in this organization, newest delivery first with the identifier as the tie-breaker, with cursor pagination. An item of the same account in another organization, and an item of another member, are never listed. The response is `Cache-Control: no-store`.
Items follow the rules of ListMyNotifications: the inbox stores a reference to the event, an email never blocks an item, and the `content` of every item is resolved from the current source for this recipient on this read. An employer sees content only while the membership is active.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate account answers 403 forbidden, and an employer account with an unconfirmed email answers 403 email_not_verified; an account without an active membership in the organization and an unknown organization both answer 404 not_found, so organizations cannot be enumerated. A malformed `org_id`, `limit`, or `cursor`, or a cursor of another account or organization, answers 400 validation_failed.
security:
- sessionCookie: []
tags:
- notification
parameters:
- $ref: ../components/parameters.yml#/OrganizationId
- $ref: ../components/parameters.yml#/PageLimit
- $ref: ../components/parameters.yml#/PageCursor
responses:
"200":
description: A page of the inbox of the current employer in the organization.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/NotificationList
examples:
page:
$ref: ../components/examples.yml#/NotificationListPage
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
"404":
$ref: ../components/responses.yml#/NotFound
default:
$ref: ../components/responses.yml#/Problem