feat(profile): add the manual candidate profile contract and storage

This commit is contained in:
shira committed 2026-10-06 21:10:04 +03:00
1 parent d21fd49a42
commit e52ffe7bcb
97 files changed
+20442 -63

No files matched your search

+58
View File
@@ -176,6 +176,64 @@ Questionnaire:
- PUT replaces the whole questionnaire and needs no Idempotency-Key. A body equal to the stored state changes nothing, keeps the version, and answers 200 even with an older `expected_version`, so a retry after a lost response does not fail with 412.
- Order of checks for a save: session (401), CSRF and Origin (403), request validation (400), account scenario (403 `forbidden`), domain rules (400), version (412). `TestQuestionnaireSchemaValidationPrecedesImplementation` checks the schema rejections through the generated server.
### Candidate profile
The `candidate` tag also describes the private candidate profile that the candidate fills in by hand (FR02 in the PRD, TASK-066). The operations are in the contract and the business logic is not implemented yet, so each answers 401 `unauthenticated` while there are no sessions (`v1.DenyAllSecurity`), and 501 `not_implemented` once a session is accepted and the schema is valid.
| Method and path | operationId | Protection | Success | Specific errors |
| --- | --- | --- | --- | --- |
| `GET /api/v1/me/profile` | `GetMyProfile` | session | 200 `CandidateProfile`, `Cache-Control: no-store` | 401 `unauthenticated`, 403 `forbidden` |
| `PUT /api/v1/me/profile` | `SaveMyProfile` | session and CSRF | 200 `CandidateProfile`, `Cache-Control: no-store` | 400 `validation_failed`, 401, 403 `csrf_check_failed` or `forbidden`, 412 `version_conflict` |
Each operation also declares the default problem response. No new problem code is added: the contract uses `validation_failed`, `unauthenticated`, `forbidden`, `csrf_check_failed`, and `version_conflict`.
What the profile holds:
- The full name and contacts (`full_name`, `contacts.email`, `contacts.phone`, `contacts.telegram`), the stack (`stack`, `StackTag` tags), roles (`roles`: a catalog specialization and a self-assessed grade), work experience (`experience`: entries with a month-precision period `YYYY-MM`, a specialization, and a description of the tasks rather than a job title), soft skills (`soft_skills`, free text), and terms (`terms`: place, readiness to relocate, and the lowest salary with its currency, period, and tax basis). This is personal data of the candidate; the description of each such schema says so, and the values never reach logs, metrics, URLs, or events.
- Contacts are exactly the four kinds that the consent C4 can disclose (`ContactFieldKind`), with the same formats (E.164, the leading `@` of a Telegram name, a single line of up to 200 characters for the name), so a disclosure never converts or drops a stored value. The contact email of the profile is not the login of the account: the server sends no mail to it and does not verify it.
- Acceptable work formats are not repeated in the profile: they stay only in the `WorkContext` of the questionnaire.
- The profile is private: only its owner reads it, and no organization, invitation, or need schema refers to it (`$ref`). An organization sees a candidate only through the anonymous card and, after an accepted invitation, through the contact grant. The lowest salary is never disclosed to an organization; an invitation shows only a compatibility indicator that the server computes.
Self-assessment and confirmed category:
- The grade of a role (`roles[].self_assessed_grade`) is a claim of the candidate, the same one that the questionnaire calls `self_assessed_grade`; it adds nothing and never becomes a confirmed grade. The confirmed category is a separate list, `confirmed_categories` (specialization, grade, time, and the assessment attempt that confirmed it). It is read-only, the server derives it from assessment results, no request carries it, and the profile storage has no column for it. A request with `confirmed_grade`, `category`, or `confirmed_categories` is rejected as an unknown field.
Source and confirmation:
- Every value carries `status` and `source`. For a single field `status` is `confirmed`, `extracted`, or `unknown`; for `unknown` the value and the source are null, and the server fills in no default. For a list item `status` is `confirmed` or `extracted`. `source` holds `origin` (`manual`; `extracted_from_resume` and `imported` are planned and no MVP operation produces them), `trust_level`, `quote`, `extraction_version`, and `confirmed_at`.
- Every claim of the profile has `trust_level` 0, whatever its source: a schema limit (`minimum` and `maximum` are 0), a CHECK in the database, and a type in the domain. Confirming a suggestion changes its status, not its level; higher levels belong to evidence (an assessment result, a confirmation by a third party), which is stored separately and never written into a claim.
- A request carries a decision for each value (`value` and `status`): `confirmed` sets a manual value or confirms a stored suggestion with the same value (the source and the quote are kept), and `extracted` keeps a stored suggestion unconfirmed and is accepted only with exactly the same value. Any other use of `extracted` answers 400 with the pointer of that status, for example `/stack/1/status`, so a form submitted unchanged confirms nothing by accident, as for needs. The client never sends the source, the trust level, or the confirmation time.
Version and retries:
- The version starts at 0 for a candidate without a saved profile; such a candidate gets 200 with every field `unknown` and empty lists, not 404. `PUT` replaces the whole profile and a list replaces the list; a field sent as null becomes unknown and is removed.
- Concurrent edits are controlled by `expected_version` in the body, as in the questionnaire: the generated client cannot read `ETag` yet. A stale value answers 412 `version_conflict` and changes nothing, and the client reads the profile again, so an edit from another tab is never lost silently. A body that changes nothing keeps the version and answers 200 even with an older version, so no Idempotency-Key is needed. Every saved change advances the version by one.
- Order of checks: session (401), CSRF and Origin (403 `csrf_check_failed`), request validation (400), account scenario (403 `forbidden` for an employer), a version above the current one (412), domain rules that depend on the body alone (400), then the rules that depend on the stored claims, with the version: a decision `extracted` for something that is not a stored suggestion answers 412 on a stale version (another tab may have confirmed the value) and 400 on the current one; an unchanged body is 200; any other change over a stale version is 412. A version above the current one never existed and answers 412 even for an unchanged body. The domain rules that the schema cannot express are: a repeated tag, skill, or role specialization (without regard to letter case for tags and skills), a period that ends before it starts or lies in the future, and a decision `extracted` for something that is not a stored suggestion. The 400 response never repeats a submitted value.
No file, ML, or FSP:
- The profile is filled in entirely by hand. No field requires a resume, ML extraction, or an FSP account, and the migration and queries create no mandatory link to a file, ML, or FSP. Resume upload and linking an FSP ID are planned additive features; they will add their own fields and sources without changing these.
Relation to the questionnaire (TASK-150):
- The questionnaire (`/me/questionnaire`) names at most two specializations for assessment; the profile is what the candidate presents about themselves. Same-named concepts are not duplicated under different meanings: the self-assessed grade and the stack are the same claim in two places (in the questionnaire for the start of the assessment and per specialization, in the profile for display), saved separately, and the server never copies one into the other; the total months of experience in the questionnaire and the experience entries of the profile are different claims; work formats live only in the questionnaire, while place, relocation, and salary live only in the profile. The schema descriptions of both sides refer to each other.
Storage (migration 00013, TASK-066): `candidate_profiles` (the profile row: `user_id`, `version`, times) and `candidate_profile_claims` (one row per stored claim: `kind`, `ordinal`, `value` jsonb, `status`, `origin`, `trust_level`, `quote`, `extraction_version`, `confirmed_at`). A missing row means `unknown`. Each kind of value has a CHECK for the format and bounds of the contract; `trust_level` is always 0; the tables have no file column, no FSP column, and no confirmed grade. Details are in [ARCHITECTURE.md](../docs/en/ARCHITECTURE.md#candidate-profile).
Open questions for the product owner and legal:
- Contact kinds: only the four C4 kinds are allowed. Whether links to GitHub, social networks, or a website are needed (the PRD hides them until an invitation is accepted); that would be a contract change in `ContactFieldKind` too.
- The 152-FZ basis: which consent covers storing the profile (C1 at registration or a separate one), whether the name and the contacts need separate consents, the retention periods, and the deletion procedure. Today deleting an account cascades to its profile, and there are no retention rules.
- The order of the version and the domain rules: the version is checked before the rules that depend on stored claims (a stale tab gets 412, not 400); the product owner should confirm.
- Full replacement: `PUT` drops stored import suggestions that the client did not render and send back with the status `extracted`; whether that is acceptable or the server should keep suggestions that were never shown.
- The minimum for the onboarding step `candidate_profile`: the contract requires no field; which fields complete the step is the product owner's decision.
- One source between the questionnaire and the profile: keep the self-assessment and the stack independent, or store one claim and show it in both places.
- Soft skills: there is no taxonomy, only free text, up to 10 items of 50 characters; whether a dictionary is needed.
- Experience: employer names and descriptions are personal data; how the anonymous card generalizes them (PRD: industry and size) is for the card contract (TASK-185), not this one.
- Contact verification (confirming the phone or the email of the profile) is not provided: contacts are claims of level 0.
`TestCandidateProfileOperationsFollowTheConventions`, `TestCandidateProfileSeparatesSelfAssessedGradeFromConfirmedCategory`, `TestCandidateProfileClaimsCarrySourceAndTrustLevelZero`, `TestPrivateProfileSchemasAreNotMixedWithOrganizationVisibleDTOs`, `TestGeneratedProfileDTOsCarryNoConfirmedGradeInRequests`, `TestProfileSchemaValidationPrecedesImplementation`, and `TestProfileAccessBeforeImplementation` pin the generated server and the bundle, and `frontend/src/shared/api/profile-contract.test.ts` pins the generated Zod rules, the request types without a confirmed grade, and the absence of profile fields from the organization, invitation, and need schemas.
### Assessment
The `assessment` tag covers the assessment attempts of the current candidate (PRD FR04 and FR05): availability, start and resume, answers including the code practice, finalization, and the result. The operations are in the contract; their business logic is not implemented yet, so every one answers 401 `unauthenticated` until sessions exist (`v1.DenyAllSecurity`).
+58
View File
@@ -176,6 +176,64 @@ ML-сервис отвечает на ошибки той же схемой `Pro
- PUT заменяет анкету целиком, и Idempotency-Key ему не нужен. Тело, равное сохраненному состоянию, ничего не меняет, сохраняет версию и дает 200 даже со старым `expected_version`, поэтому повтор после потерянного ответа не падает с 412.
- Порядок проверок при сохранении: сессия (401), CSRF и Origin (403), валидация запроса (400), сценарий аккаунта (403 `forbidden`), доменные правила (400), версия (412). `TestQuestionnaireSchemaValidationPrecedesImplementation` проверяет отказы схемы через сгенерированный сервер.
### Профиль кандидата
Тег `candidate` описывает и приватный профиль кандидата, который кандидат заполняет вручную (FR02 в PRD, TASK-066). Операции есть в контракте, бизнес-логика еще не реализована, поэтому каждая отвечает 401 `unauthenticated`, пока сессий нет (`v1.DenyAllSecurity`), а после принятой сессии и валидной схемы - 501 `not_implemented`.
| Метод и путь | operationId | Защита | Успех | Конкретные ошибки |
| --- | --- | --- | --- | --- |
| `GET /api/v1/me/profile` | `GetMyProfile` | сессия | 200 `CandidateProfile`, `Cache-Control: no-store` | 401 `unauthenticated`, 403 `forbidden` |
| `PUT /api/v1/me/profile` | `SaveMyProfile` | сессия и CSRF | 200 `CandidateProfile`, `Cache-Control: no-store` | 400 `validation_failed`, 401, 403 `csrf_check_failed` или `forbidden`, 412 `version_conflict` |
Каждая операция также объявляет problem-ответ `default`. Новый код problem не добавляется: контракт использует `validation_failed`, `unauthenticated`, `forbidden`, `csrf_check_failed` и `version_conflict`.
Состав профиля:
- Полное имя и контакты (`full_name`, `contacts.email`, `contacts.phone`, `contacts.telegram`), стек (`stack`, теги `StackTag`), роли (`roles`: специализация каталога и самооценка грейда), опыт работы (`experience`: записи с периодом по месяцам `YYYY-MM`, специализацией и описанием задач, а не названием должности), софт-скиллы (`soft_skills`, свободный текст) и условия (`terms`: место, готовность к переезду и минимальная зарплата с валютой, периодом и налоговой базой). Это ПДн кандидата; каждое такое поле в описании схемы помечено как персональные данные, а значения не попадают в логи, метрики, URL и события.
- Контакты - ровно те четыре вида, которые может раскрыть согласие C4 (`ContactFieldKind`), с теми же форматами (E.164, `@` у Telegram, одна строка до 200 символов для имени), поэтому раскрытие никогда не преобразует и не отбрасывает сохраненное значение. Контактный email профиля - не логин аккаунта: сервер не отправляет на него почту и не проверяет его.
- Допустимые форматы работы в профиле не повторяются: они остаются только в `WorkContext` анкеты.
- Профиль закрыт: его читает только владелец, а ни одна схема организации, приглашения или потребности его не ссылает (`$ref`). Организация видит кандидата только через анонимную карточку и, после принятого приглашения, через контактное разрешение. Минимальная зарплата не раскрывается организации никогда; приглашение показывает только индикатор совместимости, который считает сервер.
Самооценка и подтвержденная категория:
- Грейд роли (`roles[].self_assessed_grade`) - заявление кандидата, то же, что анкета называет `self_assessed_grade`; он ничего не добавляет и никогда не становится подтвержденным грейдом. Подтвержденная категория - отдельный список `confirmed_categories` (специализация, грейд, время и попытка оценки, которая его подтвердила). Он только для чтения, сервер выводит его из результатов оценки, ни один запрос его не несет, а в хранилище профиля для него нет столбца. Запрос с полем `confirmed_grade`, `category` или `confirmed_categories` отклоняется как неизвестное поле.
Источник и подтверждение:
- Каждое значение несет `status` и `source`. У одиночного поля `status` равен `confirmed`, `extracted` или `unknown`; при `unknown` значение и источник равны null, а сервер ничего не подставляет по умолчанию. У элемента списка `status` равен `confirmed` или `extracted`. `source` - `origin` (`manual`; запланированы `extracted_from_resume` и `imported`, ни одна операция MVP их не создает), `trust_level`, `quote`, `extraction_version` и `confirmed_at`.
- Каждое заявление профиля имеет `trust_level` 0, какой бы ни был источник: ограничение схемы (`minimum` и `maximum` равны 0), CHECK в базе и тип в домене. Подтверждение предложения меняет статус, а не уровень; более высокие уровни относятся к доказательствам (результату оценки, подтверждению третьей стороной), которые хранятся отдельно и не записываются в заявление.
- Запрос несет решение по каждому значению (`value` и `status`): `confirmed` задает ручное значение или подтверждает сохраненное предложение с тем же значением (тогда источник и цитата сохраняются), `extracted` оставляет сохраненное предложение неподтвержденным и допустим только с точно тем же значением. Любое другое использование `extracted` дает 400 с pointer на этот статус, например `/stack/1/status`, поэтому форма без изменений ничего не подтверждает случайно, как и в потребностях. Источник, уровень доверия и время подтверждения клиент не отправляет.
Версия и повторы:
- Версия начинается с 0 для кандидата без сохраненного профиля; такой кандидат получает 200 со всеми полями `unknown` и пустыми списками, а не 404. `PUT` заменяет профиль целиком, а список заменяет список; поле, посланное как null, становится неизвестным и удаляется.
- Конкурентные изменения контролирует `expected_version` в теле, как в анкете: сгенерированный клиент пока не читает `ETag`. Устаревшее значение дает 412 `version_conflict` без изменений, и клиент читает профиль заново; правка из другой вкладки не теряется молча. Тело без изменений сохраняет версию и дает 200 даже со старой версией, поэтому Idempotency-Key не нужен. Каждое сохраненное изменение увеличивает версию на единицу.
- Порядок проверок: сессия (401), CSRF и Origin (403 `csrf_check_failed`), валидация запроса (400), сценарий аккаунта (403 `forbidden` для работодателя), версия выше текущей (412), доменные правила, зависящие только от тела (400), затем правила, зависящие от сохраненных заявлений, и версия: решение `extracted` не для сохраненного предложения при устаревшей версии дает 412 (другая вкладка могла подтвердить значение), при текущей - 400; тело без изменений - 200; любое другое изменение по устаревшей версии - 412. Версия выше текущей никогда не существовала и дает 412 даже для тела без изменений. Доменные правила, которые схема не выражает: повтор тега, навыка или специализации роли (без учета регистра для тегов и навыков), период, который кончается раньше начала или лежит в будущем, и решение `extracted` не для сохраненного предложения. Ответ 400 не повторяет присланное значение.
Без файла, ML и ФСП:
- Профиль полностью заполняется вручную. Ни одно поле не требует резюме, извлечения ML или аккаунта ФСП, а миграция и запросы не создают обязательной связи с файлом, ML или ФСП. Загрузка резюме и привязка ФСП ID - запланированные аддитивные возможности; они добавят свои поля и источники, не меняя этих.
Связь с анкетой (TASK-150):
- Анкета (`/me/questionnaire`) задает не более двух специализаций для оценки; профиль - то, что кандидат показывает о себе. Одноименные понятия не дублируются под разным смыслом: самооценка грейда и стек - одно и то же заявление в двух местах (в анкете для старта оценки и по специализации, в профиле для показа), сохраняются раздельно, и сервер не копирует одно в другое; общий опыт в месяцах в анкете и записи опыта в профиле - разные заявления; форматы работы живут только в анкете, а место, переезд и зарплата - только в профиле. Описания схем обеих сторон ссылаются друг на друга.
Хранение (миграция 00013, TASK-066): `candidate_profiles` (строка профиля: `user_id`, `version`, времена) и `candidate_profile_claims` (по строке на сохраненное заявление: `kind`, `ordinal`, `value` jsonb, `status`, `origin`, `trust_level`, `quote`, `extraction_version`, `confirmed_at`). Отсутствие строки значит `unknown`. Для каждого вида значения есть CHECK формата и границ контракта; `trust_level` всегда 0; в таблицах нет ни столбца файла, ни столбца ФСП, ни подтвержденного грейда. Подробности - в [ARCHITECTURE.md](../docs/ru/ARCHITECTURE.md#профиль-кандидата).
Открытые вопросы к владельцу продукта и юристу:
- Виды контактов: допустимы только четыре вида C4. Нужны ли ссылки на GitHub, соцсети или сайт (PRD прячет их до принятия приглашения), и тогда это изменение контракта и в `ContactFieldKind`.
- Основание по 152-ФЗ: какое согласие покрывает хранение профиля (C1 при регистрации или отдельное), нужны ли отдельные согласия для имени и контактов, сроки хранения и порядок удаления. Сейчас удаление аккаунта каскадно удаляет профиль, а правил хранения нет.
- Порядок версии и доменных правил: выбрано проверять версию раньше правил, зависящих от сохраненных заявлений (устаревшая вкладка получает 412, а не 400); нужно подтверждение владельца продукта.
- Полная замена: `PUT` удаляет сохраненные предложения импорта, которых клиент не показал и не вернул со статусом `extracted`; допустимо ли это или сервер должен сохранять непоказанные предложения.
- Минимум для шага онбординга `candidate_profile`: контракт не требует ни одного поля; какие поля нужны, чтобы шаг считался пройденным, решает владелец продукта.
- Единый источник между анкетой и профилем: оставить самооценку и стек независимыми или хранить одно заявление и показывать в обоих местах.
- Софт-скиллы: таксономии нет, свободный текст до 10 штук по 50 символов; нужен ли справочник.
- Опыт: названия работодателей и описания - ПДн; как анонимная карточка их обобщает (PRD: отрасль и размер), решает контракт карточки (TASK-185), а не этот.
- Проверка контактов (подтверждение телефона или email профиля) не предусмотрена: контакты - заявления уровня 0.
`TestCandidateProfileOperationsFollowTheConventions`, `TestCandidateProfileSeparatesSelfAssessedGradeFromConfirmedCategory`, `TestCandidateProfileClaimsCarrySourceAndTrustLevelZero`, `TestPrivateProfileSchemasAreNotMixedWithOrganizationVisibleDTOs`, `TestGeneratedProfileDTOsCarryNoConfirmedGradeInRequests`, `TestProfileSchemaValidationPrecedesImplementation` и `TestProfileAccessBeforeImplementation` закрепляют сгенерированный сервер и бандл, а `frontend/src/shared/api/profile-contract.test.ts` - сгенерированные правила Zod, типы запросов без подтвержденного грейда и отсутствие полей профиля в схемах организации, приглашения и потребности.
### Оценка
Тег `assessment` описывает попытки оценки текущего кандидата (FR04 и FR05 в PRD): доступность, старт и возобновление, ответы вместе с кодовой практикой, завершение и результат. Операции есть в контракте, бизнес-логика еще не реализована, поэтому каждая отвечает 401 `unauthenticated`, пока сессий нет (`v1.DenyAllSecurity`).
+277
View File
@@ -3779,3 +3779,280 @@ OrganizationStaleVersion:
code: version_conflict
detail: The resource changed after it was read. Read it again before retrying.
trace_id: 5c6d7e8f-9a0b-4c1d-8e3f-4a5b6c7d8e90
NewCandidateProfile:
summary: A candidate who has not saved the profile yet
value:
version: 0
full_name:
status: unknown
value: null
source: null
contacts:
email:
status: unknown
value: null
source: null
phone:
status: unknown
value: null
source: null
telegram:
status: unknown
value: null
source: null
stack: []
roles: []
experience: []
soft_skills: []
terms:
location:
status: unknown
value: null
source: null
relocation:
status: unknown
value: null
source: null
salary_minimum:
status: unknown
value: null
source: null
confirmed_categories: []
updated_at: null
BackendCandidateProfile:
summary: A manual Backend profile with one unconfirmed suggestion
description: >-
The candidate typed most values, so they are `manual`. The phone number
and the Kafka tag are suggestions that an imported document produced
(planned): they are `extracted`, unconfirmed, and, like every claim,
trust level 0. The candidate claims Middle in `roles`, while the only
confirmed category is Backend Junior from an assessment result; the two
are separate fields and the profile never merges them. The example
values are fictional.
value:
version: 3
full_name:
status: confirmed
value: Anna Sokolova
source:
origin: manual
trust_level: 0
quote: null
extraction_version: null
confirmed_at: "2026-10-05T09:30:00Z"
contacts:
email:
status: confirmed
value: anna.sokolova@example.com
source:
origin: manual
trust_level: 0
quote: null
extraction_version: null
confirmed_at: "2026-10-05T09:30:00Z"
phone:
status: extracted
value: "+79000000000"
source:
origin: extracted_from_resume
trust_level: 0
quote: "Tel.: +7 900 000-00-00"
extraction_version: resume-rules.2026-10.1
confirmed_at: null
telegram:
status: unknown
value: null
source: null
stack:
- tag: PostgreSQL
status: confirmed
source:
origin: manual
trust_level: 0
quote: null
extraction_version: null
confirmed_at: "2026-10-05T09:30:00Z"
- tag: Kafka
status: extracted
source:
origin: extracted_from_resume
trust_level: 0
quote: "Event streaming with Kafka"
extraction_version: resume-rules.2026-10.1
confirmed_at: null
roles:
- specialization: backend
self_assessed_grade: middle
status: confirmed
source:
origin: manual
trust_level: 0
quote: null
extraction_version: null
confirmed_at: "2026-10-05T09:30:00Z"
experience:
- employer_name: Example Payments
specialization: backend
started_on: "2022-03"
ended_on: null
summary: Moved the payout service to an event model and owned its on-call rotation.
status: confirmed
source:
origin: manual
trust_level: 0
quote: null
extraction_version: null
confirmed_at: "2026-10-05T09:30:00Z"
soft_skills:
- skill: Mentoring
status: confirmed
source:
origin: manual
trust_level: 0
quote: null
extraction_version: null
confirmed_at: "2026-10-05T09:30:00Z"
terms:
location:
status: confirmed
value: Kazan
source:
origin: manual
trust_level: 0
quote: null
extraction_version: null
confirmed_at: "2026-10-05T09:30:00Z"
relocation:
status: confirmed
value: false
source:
origin: manual
trust_level: 0
quote: null
extraction_version: null
confirmed_at: "2026-10-05T09:30:00Z"
salary_minimum:
status: confirmed
value:
amount: 180000
currency: RUB
period: month
tax_basis: net
source:
origin: manual
trust_level: 0
quote: null
extraction_version: null
confirmed_at: "2026-10-05T09:30:00Z"
confirmed_categories:
- specialization: backend
grade: junior
confirmed_at: "2026-10-04T18:10:00Z"
attempt_id: 0192b3c4-d5e6-7f80-9a1b-2c3d4e5f6a7b
updated_at: "2026-10-05T09:30:00Z"
BackendCandidateProfileUpdate:
summary: Save the Backend profile over version 2
description: >-
The candidate keeps the phone number and the Kafka tag as unconfirmed
suggestions by sending `extracted` with exactly their stored values, and
confirms or sets everything else. The values are fictional.
value:
expected_version: 2
full_name:
value: Anna Sokolova
status: confirmed
contacts:
email:
value: anna.sokolova@example.com
status: confirmed
phone:
value: "+79000000000"
status: extracted
telegram: null
stack:
- tag: PostgreSQL
status: confirmed
- tag: Kafka
status: extracted
roles:
- specialization: backend
self_assessed_grade: middle
status: confirmed
experience:
- employer_name: Example Payments
specialization: backend
started_on: "2022-03"
ended_on: null
summary: Moved the payout service to an event model and owned its on-call rotation.
status: confirmed
soft_skills:
- skill: Mentoring
status: confirmed
terms:
location:
value: Kazan
status: confirmed
relocation:
value: false
status: confirmed
salary_minimum:
value:
amount: 180000
currency: RUB
period: month
tax_basis: net
status: confirmed
ProfilePhoneNotE164:
summary: The phone number is not in the E.164 format
description: A rule of the schema. The pointer names the value inside the decision, and the body never repeats the submitted number.
value:
type: urn:lincodex:problem:validation_failed
title: Request validation failed
status: 400
code: validation_failed
detail: One or more request fields are invalid.
trace_id: 6d7e8f9a-0b1c-4d2e-8f4a-5b6c7d8e9f01
errors:
- in: body
pointer: /contacts/phone/value
code: invalid
message: The value does not match the contract.
ProfileExtractedValueChanged:
summary: A decision extracted for a tag that is not a stored suggestion
description: A domain rule of the server, checked after the schema. A suggestion can stay unconfirmed only with exactly its stored value; send confirmed to set a manual value.
value:
type: urn:lincodex:problem:validation_failed
title: Request validation failed
status: 400
code: validation_failed
detail: One or more request fields are invalid.
trace_id: 7e8f9a0b-1c2d-4e3f-9a5b-6c7d8e9f0a12
errors:
- in: body
pointer: /stack/1/status
code: invalid
message: The value does not match the contract.
ProfileRepeatedRole:
summary: The same specialization appears in two roles
value:
type: urn:lincodex:problem:validation_failed
title: Request validation failed
status: 400
code: validation_failed
detail: One or more request fields are invalid.
trace_id: 8f9a0b1c-2d3e-4f4a-8b6c-7d8e9f0a1b23
errors:
- in: body
pointer: /roles/1/specialization
code: invalid
message: The value does not match the contract.
ProfileStaleVersion:
summary: The save carried a stale expected_version
description: The profile changed, for example in another tab, after the client read it. Nothing was changed; the client reads the profile again and reapplies its edits.
value:
type: urn:lincodex:problem:version_conflict
title: Resource version conflict
status: 412
code: version_conflict
detail: The resource changed after it was read. Read it again before retrying.
trace_id: 9a0b1c2d-3e4f-4a5b-9c7d-8e9f0a1b2c34
+34
View File
@@ -590,3 +590,37 @@ OrganizationVersionConflict:
examples:
version_conflict:
$ref: ./examples.yml#/OrganizationStaleVersion
ProfileValidationFailed:
description: >-
The body does not match the contract or violates a profile rule: an
unknown field such as confirmed_grade, category, trust_level, or source,
a phone number outside E.164, a Telegram username without the leading @,
an email that is not an address, a month outside the YYYY-MM format, a
salary that is not a positive multiple of 1000, more items than a list
allows, a repeated tag, skill, or role specialization, a period that
ends before it starts or lies in the future, a decision extracted for a
value that is not a stored suggestion, or a missing or invalid
expected_version; code validation_failed with body pointers. A missing nested field has its own pointer with the code required; an unknown field points at the object that contains it, a failure inside an array element points at the array, and only a malformed document, an unknown top-level field, or an unknown top-level variant points at the whole body. Nothing was changed. The problem never repeats a submitted value, because the body is personal data.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
phone_not_e164:
$ref: ./examples.yml#/ProfilePhoneNotE164
extracted_value_changed:
$ref: ./examples.yml#/ProfileExtractedValueChanged
repeated_role:
$ref: ./examples.yml#/ProfileRepeatedRole
ProfileVersionConflict:
description: >-
`expected_version` is not the current profile version; code
version_conflict. Nothing was changed; read the profile again before
retrying.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
version_conflict:
$ref: ./examples.yml#/ProfileStaleVersion
+728 -3
View File
@@ -1206,6 +1206,731 @@ AssessmentAvailability:
description: Questionnaire specializations in questionnaire order.
items:
$ref: '#/AssessmentSpecializationAvailability'
ProfileVersion:
type: integer
format: int64
minimum: 0
description: Version of the candidate profile. A candidate who has not saved the profile has version 0; every save that changes the profile advances it by one. The client sends the version it read as `expected_version`.
examples:
- 4
ProfileItemStatus:
type: string
description: 'Confirmation state of a profile list item, and the decision that a request sends for a field or an item.
- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.
- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.
A request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.'
enum:
- confirmed
- extracted
ProfileClaimStatus:
type: string
description: 'Confirmation state of a single profile field.
- confirmed: the candidate typed the value or confirmed a suggestion.
- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.
- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'
enum:
- confirmed
- extracted
- unknown
ProfileClaimOrigin:
type: string
description: 'Where the value of a profile field or item came from. The server sets it; a request never sends it.
- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.
- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.
- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.
Confirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'
enum:
- manual
- extracted_from_resume
- imported
ProfileClaimTrustLevel:
type: integer
format: int32
minimum: 0
maximum: 0
description: 'Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'
examples:
- 0
ProfileClaimQuote:
type: string
minLength: 1
maxLength: 300
description: Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.
ProfileClaimSource:
type: object
description: 'Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'
additionalProperties: false
required:
- origin
- trust_level
- quote
- extraction_version
- confirmed_at
properties:
origin:
$ref: '#/ProfileClaimOrigin'
trust_level:
$ref: '#/ProfileClaimTrustLevel'
quote:
description: Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.
oneOf:
- $ref: '#/ProfileClaimQuote'
- type: 'null'
extraction_version:
description: Extractor version for an extracted or imported value, or null for a manual value.
oneOf:
- $ref: '#/NeedVersionLabel'
- type: 'null'
confirmed_at:
description: Time the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.
oneOf:
- $ref: '#/Timestamp'
- type: 'null'
ProfileLocationName:
type: string
minLength: 1
maxLength: 100
pattern: ^\S(?:.*\S)?$
description: City or region where the candidate lives or wants to work, as free text. It is personal data of the candidate and never a street address. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.
ProfileSalaryMinimum:
type: object
description: 'The lowest salary that the candidate accepts, in whole rubles with its base: the currency, the pay period, and the tax basis. It is private to the candidate: no organization reads it, and the invitation only shows a compatibility indicator that the server derives from it. It is personal data. The amount is a positive multiple of 1000.'
additionalProperties: false
required:
- amount
- currency
- period
- tax_basis
properties:
amount:
$ref: '#/RubAmount'
currency:
$ref: '#/CurrencyCode'
period:
$ref: '#/SalaryPeriod'
tax_basis:
$ref: '#/SalaryTaxBasis'
ProfileSoftSkill:
type: string
minLength: 1
maxLength: 50
pattern: ^\S(?:.*\S)?$
description: Soft skill as the candidate wrote it, for example "Mentoring" or "Negotiation". The platform has no soft skill taxonomy, so the text is free; it never changes a category or a grade. It has no leading or trailing whitespace and no line breaks. The server compares skills without regard to letter case. Plain text; clients show it as text, never as HTML.
ProfileEmployerName:
type: string
minLength: 1
maxLength: 200
pattern: ^\S(?:.*\S)?$
description: Name of the employer in one experience entry, as the candidate wrote it. It is personal data of the candidate's career. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.
ProfileExperienceSummary:
type: string
minLength: 1
maxLength: 1000
description: Tasks and results of the candidate in one experience entry. It describes the work rather than a job title. It may contain line breaks and personal data of the candidate; it must not contain personal data of other people. Plain text; clients show it as text, never as HTML.
ProfileYearMonth:
type: string
minLength: 7
maxLength: 7
pattern: ^[0-9]{4}-(0[1-9]|1[0-2])$
description: Calendar month in the `YYYY-MM` format, for example 2024-03. An experience period has month precision only, so the contract holds no exact date of employment. The server rejects a month that lies in the future.
examples:
- 2024-03
ProfileFullNameClaim:
type: object
description: Full name of the candidate with its confirmation state and provenance. The value is personal data. It is disclosed to one organization only through the contact grant of the consent C4 and never appears in an organization-visible schema. `value` and `source` are null exactly when `status` is `unknown`.
additionalProperties: false
required:
- status
- value
- source
properties:
status:
$ref: '#/ProfileClaimStatus'
value:
oneOf:
- $ref: '#/ContactFullName'
- type: 'null'
source:
oneOf:
- $ref: '#/ProfileClaimSource'
- type: 'null'
ProfileEmailClaim:
type: object
description: 'Contact email of the candidate with its confirmation state and provenance. It is personal data. It is a contact channel that the candidate gives, not the login of the account: the two may differ, the server never sends mail to it and never verifies it. `value` and `source` are null exactly when `status` is `unknown`.'
additionalProperties: false
required:
- status
- value
- source
properties:
status:
$ref: '#/ProfileClaimStatus'
value:
oneOf:
- $ref: '#/EmailAddress'
- type: 'null'
source:
oneOf:
- $ref: '#/ProfileClaimSource'
- type: 'null'
ProfilePhoneClaim:
type: object
description: Contact phone number of the candidate with its confirmation state and provenance. It is personal data, stored in the E.164 format of the contact disclosure. `value` and `source` are null exactly when `status` is `unknown`.
additionalProperties: false
required:
- status
- value
- source
properties:
status:
$ref: '#/ProfileClaimStatus'
value:
oneOf:
- $ref: '#/ContactPhoneNumber'
- type: 'null'
source:
oneOf:
- $ref: '#/ProfileClaimSource'
- type: 'null'
ProfileTelegramClaim:
type: object
description: Telegram username of the candidate with its confirmation state and provenance. It is personal data, stored with the leading @ of the contact disclosure. `value` and `source` are null exactly when `status` is `unknown`.
additionalProperties: false
required:
- status
- value
- source
properties:
status:
$ref: '#/ProfileClaimStatus'
value:
oneOf:
- $ref: '#/ContactTelegramUsername'
- type: 'null'
source:
oneOf:
- $ref: '#/ProfileClaimSource'
- type: 'null'
ProfileLocationClaim:
type: object
description: Place of the candidate with its confirmation state and provenance. It is personal data. `value` and `source` are null exactly when `status` is `unknown`.
additionalProperties: false
required:
- status
- value
- source
properties:
status:
$ref: '#/ProfileClaimStatus'
value:
oneOf:
- $ref: '#/ProfileLocationName'
- type: 'null'
source:
oneOf:
- $ref: '#/ProfileClaimSource'
- type: 'null'
ProfileRelocationClaim:
type: object
description: Whether the candidate is ready to relocate, with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`; the server never assumes an answer.
additionalProperties: false
required:
- status
- value
- source
properties:
status:
$ref: '#/ProfileClaimStatus'
value:
type:
- boolean
- 'null'
source:
oneOf:
- $ref: '#/ProfileClaimSource'
- type: 'null'
ProfileSalaryMinimumClaim:
type: object
description: Lowest acceptable salary with its confirmation state and provenance. It is personal data that no organization reads. `value` and `source` are null exactly when `status` is `unknown`; the server never substitutes zero or a market estimate.
additionalProperties: false
required:
- status
- value
- source
properties:
status:
$ref: '#/ProfileClaimStatus'
value:
oneOf:
- $ref: '#/ProfileSalaryMinimum'
- type: 'null'
source:
oneOf:
- $ref: '#/ProfileClaimSource'
- type: 'null'
ProfileContacts:
type: object
description: Contact channels of the candidate. Each channel is a claim of its own, and the candidate fills in any subset. The kinds are the ones that the contact disclosure (consent C4) can pass on, with the same value formats, so a disclosure never has to convert or drop a stored value; adding a kind, such as a link to a code repository, is a contract change in both places. Contacts leave the profile only through a contact grant, never in a card or a search result. All values are personal data.
additionalProperties: false
required:
- email
- phone
- telegram
properties:
email:
$ref: '#/ProfileEmailClaim'
phone:
$ref: '#/ProfilePhoneClaim'
telegram:
$ref: '#/ProfileTelegramClaim'
ProfileTerms:
type: object
description: 'Conditions that the candidate wants: the place, readiness to relocate, and the lowest salary. Acceptable work formats are not repeated here; they are the `work_formats` of the questionnaire `WorkContext`, the only place that holds them. These are the candidate''s wishes, never the terms of an invitation, which an organization offers and which the invitation contract describes.'
additionalProperties: false
required:
- location
- relocation
- salary_minimum
properties:
location:
$ref: '#/ProfileLocationClaim'
relocation:
$ref: '#/ProfileRelocationClaim'
salary_minimum:
$ref: '#/ProfileSalaryMinimumClaim'
ProfileStackItem:
type: object
description: 'One technology tag of the candidate''s stack with its confirmation state and provenance. The profile stack is one list for the whole profile; the questionnaire holds the tags of each chosen specialization with the same `StackTag` meaning, and the two lists are independent: the server never copies one into the other. A tag is a descriptive attribute and never forms a category.'
additionalProperties: false
required:
- tag
- status
- source
properties:
tag:
$ref: '#/StackTag'
status:
$ref: '#/ProfileItemStatus'
source:
$ref: '#/ProfileClaimSource'
ProfileSoftSkillItem:
type: object
description: One soft skill of the candidate with its confirmation state and provenance. It is a claim; no assessment checks it.
additionalProperties: false
required:
- skill
- status
- source
properties:
skill:
$ref: '#/ProfileSoftSkill'
status:
$ref: '#/ProfileItemStatus'
source:
$ref: '#/ProfileClaimSource'
ProfileRoleItem:
type: object
description: 'One role of the candidate: a specialization of the catalog with the grade that the candidate claims for it. `self_assessed_grade` is a claim, the same one that the questionnaire calls `self_assessed_grade` for its at most two chosen specializations: it influences nothing but the display and never becomes a confirmed grade or a category. The questionnaire value starts the assessment and the profile value is what the profile shows; the two are saved separately and the server never copies one into the other. A confirmed grade comes only from an assessment result and appears in `confirmed_categories` of the profile, never in a role; unknown fields such as `confirmed_grade` or `category` are rejected.'
additionalProperties: false
required:
- specialization
- self_assessed_grade
- status
- source
properties:
specialization:
$ref: '#/SpecializationCode'
self_assessed_grade:
description: Grade that the candidate claims in the specialization, or null when the candidate names none.
oneOf:
- $ref: '#/GradeCode'
- type: 'null'
status:
$ref: '#/ProfileItemStatus'
source:
$ref: '#/ProfileClaimSource'
ProfileExperienceItem:
type: object
description: 'One entry of the candidate''s work history with its confirmation state and provenance. An entry describes the work by its specialization and tasks rather than by a job title, and it is a claim of trust level 0. It is different from the `CandidateExperience` of the questionnaire, which holds only the total months of commercial and academic experience of a chosen specialization as a hint for the assessment: the two are saved separately, and the server neither adds the entries up for the questionnaire nor fills the entries from it. An entry is personal data.'
additionalProperties: false
required:
- employer_name
- specialization
- started_on
- ended_on
- summary
- status
- source
properties:
employer_name:
description: Employer of the entry, or null when the candidate gives none.
oneOf:
- $ref: '#/ProfileEmployerName'
- type: 'null'
specialization:
$ref: '#/SpecializationCode'
started_on:
$ref: '#/ProfileYearMonth'
ended_on:
description: Last month of the work, or null when the candidate still works there. It is not earlier than `started_on`.
oneOf:
- $ref: '#/ProfileYearMonth'
- type: 'null'
summary:
description: Tasks and results of the entry, or null when the candidate gives none.
oneOf:
- $ref: '#/ProfileExperienceSummary'
- type: 'null'
status:
$ref: '#/ProfileItemStatus'
source:
$ref: '#/ProfileClaimSource'
ProfileConfirmedCategory:
type: object
description: 'A category that an assessment result confirmed: the specialization with the confirmed grade. It is read-only and derived by the server from the assessment results of the candidate; no request carries it and the profile storage holds no such column, so neither a form nor an import can write a confirmed grade. It is separate from the claims of the profile and from the self-assessed grades in `roles`.'
additionalProperties: false
required:
- specialization
- grade
- confirmed_at
- attempt_id
properties:
specialization:
$ref: '#/SpecializationCode'
grade:
$ref: '#/GradeCode'
confirmed_at:
$ref: '#/Timestamp'
attempt_id:
type: string
format: uuid
description: Assessment attempt whose result confirmed the grade. The attempt belongs to the candidate.
CandidateProfile:
type: object
description: 'The private profile of the current candidate: full name and contacts, stack, roles, work experience, soft skills, and desired terms, each value with its confirmation state and provenance. It is personal data that only the candidate reads. It is never an organization-visible schema: an organization sees a candidate only through the anonymous card and, after an accepted invitation, through the contact grant, and no organization schema refers to this one.
Every value is a claim of trust level 0. The `self_assessed_grade` of a role is what the candidate says; the `confirmed_categories` list is what assessment results established, and the two are never mixed. A candidate who has not saved the profile gets version 0, every single field `unknown`, empty lists, and null `updated_at`.
The profile is manual by nature and complete without a file: no field requires a resume, the ML service, or an FSP account, and a candidate with none of them has the same fields. Work formats live in the questionnaire; a candidate''s assessment starts from the questionnaire, not from this profile.'
additionalProperties: false
required:
- version
- full_name
- contacts
- stack
- roles
- experience
- soft_skills
- terms
- confirmed_categories
- updated_at
properties:
version:
$ref: '#/ProfileVersion'
full_name:
$ref: '#/ProfileFullNameClaim'
contacts:
$ref: '#/ProfileContacts'
stack:
type: array
maxItems: 30
description: Technology tags in the order the candidate gave them, each tag at most once without regard to letter case.
items:
$ref: '#/ProfileStackItem'
roles:
type: array
maxItems: 9
description: Roles in the order the candidate gave them, each specialization at most once.
items:
$ref: '#/ProfileRoleItem'
experience:
type: array
maxItems: 20
description: Work history entries in the order the candidate gave them.
items:
$ref: '#/ProfileExperienceItem'
soft_skills:
type: array
maxItems: 10
description: Soft skills in the order the candidate gave them, each skill at most once without regard to letter case.
items:
$ref: '#/ProfileSoftSkillItem'
terms:
$ref: '#/ProfileTerms'
confirmed_categories:
type: array
maxItems: 9
description: Categories that assessment results confirmed, at most one per specialization, in catalog order. Read-only and empty until an assessment confirms a grade.
items:
$ref: '#/ProfileConfirmedCategory'
updated_at:
description: Time of the last change, or null before the first save.
oneOf:
- $ref: '#/Timestamp'
- type: 'null'
ProfileFullNameInput:
type: object
description: Decision about the full name in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.
additionalProperties: false
required:
- value
- status
properties:
value:
$ref: '#/ContactFullName'
status:
$ref: '#/ProfileItemStatus'
ProfileEmailInput:
type: object
description: Decision about the contact email in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.
additionalProperties: false
required:
- value
- status
properties:
value:
$ref: '#/EmailAddress'
status:
$ref: '#/ProfileItemStatus'
ProfilePhoneInput:
type: object
description: Decision about the contact phone number in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.
additionalProperties: false
required:
- value
- status
properties:
value:
$ref: '#/ContactPhoneNumber'
status:
$ref: '#/ProfileItemStatus'
ProfileTelegramInput:
type: object
description: Decision about the Telegram username in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.
additionalProperties: false
required:
- value
- status
properties:
value:
$ref: '#/ContactTelegramUsername'
status:
$ref: '#/ProfileItemStatus'
ProfileLocationInput:
type: object
description: Decision about the place in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.
additionalProperties: false
required:
- value
- status
properties:
value:
$ref: '#/ProfileLocationName'
status:
$ref: '#/ProfileItemStatus'
ProfileRelocationInput:
type: object
description: Decision about readiness to relocate in a request; see CandidateProfileUpdate for the rules of `status`.
additionalProperties: false
required:
- value
- status
properties:
value:
type: boolean
status:
$ref: '#/ProfileItemStatus'
ProfileSalaryMinimumInput:
type: object
description: Decision about the lowest salary in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.
additionalProperties: false
required:
- value
- status
properties:
value:
$ref: '#/ProfileSalaryMinimum'
status:
$ref: '#/ProfileItemStatus'
ProfileContactsInput:
type: object
description: 'Decisions about the contact channels in a request. A channel sent as null is unknown: it is removed if it was set.'
additionalProperties: false
required:
- email
- phone
- telegram
properties:
email:
oneOf:
- $ref: '#/ProfileEmailInput'
- type: 'null'
phone:
oneOf:
- $ref: '#/ProfilePhoneInput'
- type: 'null'
telegram:
oneOf:
- $ref: '#/ProfileTelegramInput'
- type: 'null'
ProfileTermsInput:
type: object
description: 'Decisions about the desired terms in a request. A field sent as null is unknown: it is removed if it was set.'
additionalProperties: false
required:
- location
- relocation
- salary_minimum
properties:
location:
oneOf:
- $ref: '#/ProfileLocationInput'
- type: 'null'
relocation:
oneOf:
- $ref: '#/ProfileRelocationInput'
- type: 'null'
salary_minimum:
oneOf:
- $ref: '#/ProfileSalaryMinimumInput'
- type: 'null'
ProfileStackItemInput:
type: object
description: Decision about one stack tag in a request; see CandidateProfileUpdate for the rules of `status`.
additionalProperties: false
required:
- tag
- status
properties:
tag:
$ref: '#/StackTag'
status:
$ref: '#/ProfileItemStatus'
ProfileSoftSkillItemInput:
type: object
description: Decision about one soft skill in a request; see CandidateProfileUpdate for the rules of `status`.
additionalProperties: false
required:
- skill
- status
properties:
skill:
$ref: '#/ProfileSoftSkill'
status:
$ref: '#/ProfileItemStatus'
ProfileRoleItemInput:
type: object
description: 'Decision about one role in a request; see CandidateProfileUpdate for the rules of `status`. The object has no confirmed grade and no category: unknown fields are rejected.'
additionalProperties: false
required:
- specialization
- self_assessed_grade
- status
properties:
specialization:
$ref: '#/SpecializationCode'
self_assessed_grade:
description: Grade that the candidate claims, or null when the candidate names none.
oneOf:
- $ref: '#/GradeCode'
- type: 'null'
status:
$ref: '#/ProfileItemStatus'
ProfileExperienceItemInput:
type: object
description: Decision about one work history entry in a request; see CandidateProfileUpdate for the rules of `status`. The server also requires `ended_on` not to precede `started_on` and no month to lie in the future, and answers 400 with the pointer of the month.
additionalProperties: false
required:
- employer_name
- specialization
- started_on
- ended_on
- summary
- status
properties:
employer_name:
oneOf:
- $ref: '#/ProfileEmployerName'
- type: 'null'
specialization:
$ref: '#/SpecializationCode'
started_on:
$ref: '#/ProfileYearMonth'
ended_on:
oneOf:
- $ref: '#/ProfileYearMonth'
- type: 'null'
summary:
oneOf:
- $ref: '#/ProfileExperienceSummary'
- type: 'null'
status:
$ref: '#/ProfileItemStatus'
CandidateProfileUpdate:
type: object
description: 'Complete new state of the candidate profile. It replaces every stored value as a whole: a single field sent as null is unknown and is removed, and a list replaces the stored list. The body is personal data.
Each value carries a decision `status`. `confirmed` sets a manual value or confirms a stored suggestion; confirming a suggestion with exactly its stored value keeps its origin and quote, and any other value makes the claim manual. `extracted` keeps a stored suggestion unconfirmed and is accepted only with exactly the stored value; any other use answers 400 with the pointer of that status, for example `/stack/1/status`. The provenance, the trust level, and the confirmed categories are not part of the request, and unknown fields are rejected, so a request can neither mark a claim as verified nor write a confirmed grade or a category.'
additionalProperties: false
required:
- expected_version
- full_name
- contacts
- stack
- roles
- experience
- soft_skills
- terms
properties:
expected_version:
$ref: '#/ProfileVersion'
full_name:
oneOf:
- $ref: '#/ProfileFullNameInput'
- type: 'null'
contacts:
$ref: '#/ProfileContactsInput'
stack:
type: array
maxItems: 30
description: Technology tags. The schema limits the count; the server also answers 400 with the pointer of a tag that repeats an earlier one without regard to letter case, for example `/stack/2/tag`.
items:
$ref: '#/ProfileStackItemInput'
roles:
type: array
maxItems: 9
description: Roles. The server answers 400 with the pointer of a role whose specialization repeats an earlier one, for example `/roles/1/specialization`.
items:
$ref: '#/ProfileRoleItemInput'
experience:
type: array
maxItems: 20
description: Work history entries.
items:
$ref: '#/ProfileExperienceItemInput'
soft_skills:
type: array
maxItems: 10
description: Soft skills. The server answers 400 with the pointer of a skill that repeats an earlier one without regard to letter case.
items:
$ref: '#/ProfileSoftSkillItemInput'
terms:
$ref: '#/ProfileTermsInput'
DirectionCode:
type: string
description: 'Stable code of a professional direction, the group that a specialization belongs to.
@@ -4322,7 +5047,7 @@ WorkFormat:
- hybrid
WorkContext:
type: object
description: Working context of the candidate's search. It holds no personal data such as an address or a city; location, relocation, and salary expectations belong to the candidate profile.
description: 'Working context of the candidate''s search. It holds no personal data such as an address or a city; location, relocation, and salary expectations belong to the candidate profile (`ProfileTerms`). The acceptable work formats live only here: the profile does not repeat them.'
additionalProperties: false
required:
- work_formats
@@ -4337,7 +5062,7 @@ WorkContext:
$ref: '#/WorkFormat'
CandidateExperience:
type: object
description: 'Experience that the candidate states for one specialization, in whole months. It is self-reported context: it never adds assessment points and never confirms a grade.'
description: 'Experience that the candidate states for one specialization, in whole months. It is self-reported context: it never adds assessment points and never confirms a grade. The work history entries of the candidate profile (`ProfileExperienceItem`) are a different, detailed claim: the two are saved separately and the server neither adds the entries up nor fills them from these totals.'
additionalProperties: false
required:
- commercial_months
@@ -4357,7 +5082,7 @@ CandidateExperience:
description: Months of study, internships, or academic projects in the specialization.
QuestionnaireSpecialization:
type: object
description: 'One specialization chosen by the candidate with the candidate''s self-assessment. `self_assessed_grade` is a claim: it influences where the assessment starts and which grade the assessment step offers first, but it adds no points and never becomes a confirmed grade. A confirmed grade, and with it a category, comes only from an assessment result and is never part of the questionnaire; unknown fields such as `confirmed_grade` or `category` are rejected. Task languages and the stack are attributes of the chosen specialization, not categories.'
description: 'One specialization chosen by the candidate with the candidate''s self-assessment. `self_assessed_grade` is a claim: it influences where the assessment starts and which grade the assessment step offers first, but it adds no points and never becomes a confirmed grade. A confirmed grade, and with it a category, comes only from an assessment result and is never part of the questionnaire; unknown fields such as `confirmed_grade` or `category` are rejected. Task languages and the stack are attributes of the chosen specialization, not categories. The candidate profile states the same kind of claim in the `roles` of `CandidateProfile` (`ProfileRoleItem.self_assessed_grade`): the questionnaire value starts the assessment and the profile value is what the profile shows, the two are saved separately, and neither is ever a confirmed grade.'
additionalProperties: false
required:
- specialization
@@ -0,0 +1,933 @@
schemas:
ProfileVersion:
type: integer
format: int64
minimum: 0
description: >-
Version of the candidate profile. A candidate who has not saved the
profile has version 0; every save that changes the profile advances it
by one. The client sends the version it read as `expected_version`.
examples:
- 4
ProfileItemStatus:
type: string
description: |-
Confirmation state of a profile list item, and the decision that a request sends for a field or an item.
- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.
- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.
A request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.
enum:
- confirmed
- extracted
ProfileClaimStatus:
type: string
description: |-
Confirmation state of a single profile field.
- confirmed: the candidate typed the value or confirmed a suggestion.
- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.
- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.
enum:
- confirmed
- extracted
- unknown
ProfileClaimOrigin:
type: string
description: |-
Where the value of a profile field or item came from. The server sets it; a request never sends it.
- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.
- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.
- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.
Confirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.
enum:
- manual
- extracted_from_resume
- imported
ProfileClaimTrustLevel:
type: integer
format: int32
minimum: 0
maximum: 0
description: >-
Trust level of a profile claim. Every claim of the profile has trust
level 0, whatever its origin: a manual value, an imported value, and
a value that the candidate confirmed are all unverified statements.
Confirming a suggestion changes its status, never its trust level.
Higher levels belong to evidence, such as an assessment result or a
confirmation by a third party, which are separate resources and never
write a level into a profile claim.
examples:
- 0
ProfileClaimQuote:
type: string
minLength: 1
maxLength: 300
description: >-
Exact excerpt of the imported document that the value was extracted
from, so the candidate can check it. It may contain personal data of
the candidate. It may contain line breaks. Plain text; clients show it
as text, never as HTML.
ProfileClaimSource:
type: object
description: >-
Provenance and confirmation of one profile value: its origin, the
trust level, the excerpt it was extracted from, the extractor version,
and the time the candidate confirmed it. Read-only; the server derives
it and a request cannot set it. The imported document or source itself
is not referenced: the profile never requires a file, the ML service,
or an FSP account, and a later link to them is an additive field.
additionalProperties: false
required:
- origin
- trust_level
- quote
- extraction_version
- confirmed_at
properties:
origin:
$ref: "#/schemas/ProfileClaimOrigin"
trust_level:
$ref: "#/schemas/ProfileClaimTrustLevel"
quote:
description: >-
Excerpt of the imported document that supports the value, or null
for a manual value and for an extracted value that the extractor
did not tie to one excerpt.
oneOf:
- $ref: "#/schemas/ProfileClaimQuote"
- type: "null"
extraction_version:
description: >-
Extractor version for an extracted or imported value, or null for
a manual value.
oneOf:
- $ref: "./need_schemas.yml#/schemas/NeedVersionLabel"
- type: "null"
confirmed_at:
description: >-
Time the candidate typed or confirmed the value, or null while the
value is an unconfirmed suggestion.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
ProfileLocationName:
type: string
minLength: 1
maxLength: 100
pattern: '^\S(?:.*\S)?$'
description: >-
City or region where the candidate lives or wants to work, as free
text. It is personal data of the candidate and never a street
address. It has no leading or trailing whitespace and no line breaks.
Plain text; clients show it as text, never as HTML.
ProfileSalaryMinimum:
type: object
description: >-
The lowest salary that the candidate accepts, in whole rubles with its
base: the currency, the pay period, and the tax basis. It is private
to the candidate: no organization reads it, and the invitation only
shows a compatibility indicator that the server derives from it. It
is personal data. The amount is a positive multiple of 1000.
additionalProperties: false
required:
- amount
- currency
- period
- tax_basis
properties:
amount:
$ref: "./need_schemas.yml#/schemas/RubAmount"
currency:
$ref: "./need_schemas.yml#/schemas/CurrencyCode"
period:
$ref: "./need_schemas.yml#/schemas/SalaryPeriod"
tax_basis:
$ref: "./need_schemas.yml#/schemas/SalaryTaxBasis"
ProfileSoftSkill:
type: string
minLength: 1
maxLength: 50
pattern: '^\S(?:.*\S)?$'
description: >-
Soft skill as the candidate wrote it, for example "Mentoring" or
"Negotiation". The platform has no soft skill taxonomy, so the text is
free; it never changes a category or a grade. It has no leading or
trailing whitespace and no line breaks. The server compares skills
without regard to letter case. Plain text; clients show it as text,
never as HTML.
ProfileEmployerName:
type: string
minLength: 1
maxLength: 200
pattern: '^\S(?:.*\S)?$'
description: >-
Name of the employer in one experience entry, as the candidate wrote
it. It is personal data of the candidate's career. It has no leading
or trailing whitespace and no line breaks. Plain text; clients show
it as text, never as HTML.
ProfileExperienceSummary:
type: string
minLength: 1
maxLength: 1000
description: >-
Tasks and results of the candidate in one experience entry. It
describes the work rather than a job title. It may contain line
breaks and personal data of the candidate; it must not contain
personal data of other people. Plain text; clients show it as text,
never as HTML.
ProfileYearMonth:
type: string
minLength: 7
maxLength: 7
pattern: "^[0-9]{4}-(0[1-9]|1[0-2])$"
description: >-
Calendar month in the `YYYY-MM` format, for example 2024-03. An
experience period has month precision only, so the contract holds no
exact date of employment. The server rejects a month that lies in the
future.
examples:
- "2024-03"
ProfileFullNameClaim:
type: object
description: >-
Full name of the candidate with its confirmation state and provenance.
The value is personal data. It is disclosed to one organization only
through the contact grant of the consent C4 and never appears in an
organization-visible schema. `value` and `source` are null exactly
when `status` is `unknown`.
additionalProperties: false
required:
- status
- value
- source
properties:
status:
$ref: "#/schemas/ProfileClaimStatus"
value:
oneOf:
- $ref: "./contact_grant_schemas.yml#/schemas/ContactFullName"
- type: "null"
source:
oneOf:
- $ref: "#/schemas/ProfileClaimSource"
- type: "null"
ProfileEmailClaim:
type: object
description: >-
Contact email of the candidate with its confirmation state and
provenance. It is personal data. It is a contact channel that the
candidate gives, not the login of the account: the two may differ, the
server never sends mail to it and never verifies it. `value` and
`source` are null exactly when `status` is `unknown`.
additionalProperties: false
required:
- status
- value
- source
properties:
status:
$ref: "#/schemas/ProfileClaimStatus"
value:
oneOf:
- $ref: "./identity_schemas.yml#/schemas/EmailAddress"
- type: "null"
source:
oneOf:
- $ref: "#/schemas/ProfileClaimSource"
- type: "null"
ProfilePhoneClaim:
type: object
description: >-
Contact phone number of the candidate with its confirmation state and
provenance. It is personal data, stored in the E.164 format of the
contact disclosure. `value` and `source` are null exactly when
`status` is `unknown`.
additionalProperties: false
required:
- status
- value
- source
properties:
status:
$ref: "#/schemas/ProfileClaimStatus"
value:
oneOf:
- $ref: "./contact_grant_schemas.yml#/schemas/ContactPhoneNumber"
- type: "null"
source:
oneOf:
- $ref: "#/schemas/ProfileClaimSource"
- type: "null"
ProfileTelegramClaim:
type: object
description: >-
Telegram username of the candidate with its confirmation state and
provenance. It is personal data, stored with the leading @ of the
contact disclosure. `value` and `source` are null exactly when
`status` is `unknown`.
additionalProperties: false
required:
- status
- value
- source
properties:
status:
$ref: "#/schemas/ProfileClaimStatus"
value:
oneOf:
- $ref: "./contact_grant_schemas.yml#/schemas/ContactTelegramUsername"
- type: "null"
source:
oneOf:
- $ref: "#/schemas/ProfileClaimSource"
- type: "null"
ProfileLocationClaim:
type: object
description: >-
Place of the candidate with its confirmation state and provenance. It
is personal data. `value` and `source` are null exactly when `status`
is `unknown`.
additionalProperties: false
required:
- status
- value
- source
properties:
status:
$ref: "#/schemas/ProfileClaimStatus"
value:
oneOf:
- $ref: "#/schemas/ProfileLocationName"
- type: "null"
source:
oneOf:
- $ref: "#/schemas/ProfileClaimSource"
- type: "null"
ProfileRelocationClaim:
type: object
description: >-
Whether the candidate is ready to relocate, with its confirmation
state and provenance. `value` and `source` are null exactly when
`status` is `unknown`; the server never assumes an answer.
additionalProperties: false
required:
- status
- value
- source
properties:
status:
$ref: "#/schemas/ProfileClaimStatus"
value:
type:
- boolean
- "null"
source:
oneOf:
- $ref: "#/schemas/ProfileClaimSource"
- type: "null"
ProfileSalaryMinimumClaim:
type: object
description: >-
Lowest acceptable salary with its confirmation state and provenance.
It is personal data that no organization reads. `value` and `source`
are null exactly when `status` is `unknown`; the server never
substitutes zero or a market estimate.
additionalProperties: false
required:
- status
- value
- source
properties:
status:
$ref: "#/schemas/ProfileClaimStatus"
value:
oneOf:
- $ref: "#/schemas/ProfileSalaryMinimum"
- type: "null"
source:
oneOf:
- $ref: "#/schemas/ProfileClaimSource"
- type: "null"
ProfileContacts:
type: object
description: >-
Contact channels of the candidate. Each channel is a claim of its own,
and the candidate fills in any subset. The kinds are the ones that
the contact disclosure (consent C4) can pass on, with the same value
formats, so a disclosure never has to convert or drop a stored value;
adding a kind, such as a link to a code repository, is a contract
change in both places. Contacts leave the profile only through a
contact grant, never in a card or a search result. All values are
personal data.
additionalProperties: false
required:
- email
- phone
- telegram
properties:
email:
$ref: "#/schemas/ProfileEmailClaim"
phone:
$ref: "#/schemas/ProfilePhoneClaim"
telegram:
$ref: "#/schemas/ProfileTelegramClaim"
ProfileTerms:
type: object
description: >-
Conditions that the candidate wants: the place, readiness to relocate,
and the lowest salary. Acceptable work formats are not repeated here;
they are the `work_formats` of the questionnaire `WorkContext`, the
only place that holds them. These are the candidate's wishes, never
the terms of an invitation, which an organization offers and which
the invitation contract describes.
additionalProperties: false
required:
- location
- relocation
- salary_minimum
properties:
location:
$ref: "#/schemas/ProfileLocationClaim"
relocation:
$ref: "#/schemas/ProfileRelocationClaim"
salary_minimum:
$ref: "#/schemas/ProfileSalaryMinimumClaim"
ProfileStackItem:
type: object
description: >-
One technology tag of the candidate's stack with its confirmation state
and provenance. The profile stack is one list for the whole profile;
the questionnaire holds the tags of each chosen specialization with the
same `StackTag` meaning, and the two lists are independent: the server
never copies one into the other. A tag is a descriptive attribute and
never forms a category.
additionalProperties: false
required:
- tag
- status
- source
properties:
tag:
$ref: "./questionnaire_schemas.yml#/schemas/StackTag"
status:
$ref: "#/schemas/ProfileItemStatus"
source:
$ref: "#/schemas/ProfileClaimSource"
ProfileSoftSkillItem:
type: object
description: >-
One soft skill of the candidate with its confirmation state and
provenance. It is a claim; no assessment checks it.
additionalProperties: false
required:
- skill
- status
- source
properties:
skill:
$ref: "#/schemas/ProfileSoftSkill"
status:
$ref: "#/schemas/ProfileItemStatus"
source:
$ref: "#/schemas/ProfileClaimSource"
ProfileRoleItem:
type: object
description: >-
One role of the candidate: a specialization of the catalog with the
grade that the candidate claims for it. `self_assessed_grade` is a
claim, the same one that the questionnaire calls `self_assessed_grade`
for its at most two chosen specializations: it influences nothing but
the display and never becomes a confirmed grade or a category. The
questionnaire value starts the assessment and the profile value is what
the profile shows; the two are saved separately and the server never
copies one into the other. A confirmed grade comes only from an
assessment result and appears in `confirmed_categories` of the profile,
never in a role; unknown fields such as `confirmed_grade` or `category`
are rejected.
additionalProperties: false
required:
- specialization
- self_assessed_grade
- status
- source
properties:
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
self_assessed_grade:
description: >-
Grade that the candidate claims in the specialization, or null when
the candidate names none.
oneOf:
- $ref: "./catalog_schemas.yml#/schemas/GradeCode"
- type: "null"
status:
$ref: "#/schemas/ProfileItemStatus"
source:
$ref: "#/schemas/ProfileClaimSource"
ProfileExperienceItem:
type: object
description: >-
One entry of the candidate's work history with its confirmation state
and provenance. An entry describes the work by its specialization and
tasks rather than by a job title, and it is a claim of trust level 0.
It is different from the `CandidateExperience` of the questionnaire,
which holds only the total months of commercial and academic
experience of a chosen specialization as a hint for the assessment:
the two are saved separately, and the server neither adds the entries
up for the questionnaire nor fills the entries from it. An entry is
personal data.
additionalProperties: false
required:
- employer_name
- specialization
- started_on
- ended_on
- summary
- status
- source
properties:
employer_name:
description: Employer of the entry, or null when the candidate gives none.
oneOf:
- $ref: "#/schemas/ProfileEmployerName"
- type: "null"
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
started_on:
$ref: "#/schemas/ProfileYearMonth"
ended_on:
description: >-
Last month of the work, or null when the candidate still works
there. It is not earlier than `started_on`.
oneOf:
- $ref: "#/schemas/ProfileYearMonth"
- type: "null"
summary:
description: Tasks and results of the entry, or null when the candidate gives none.
oneOf:
- $ref: "#/schemas/ProfileExperienceSummary"
- type: "null"
status:
$ref: "#/schemas/ProfileItemStatus"
source:
$ref: "#/schemas/ProfileClaimSource"
ProfileConfirmedCategory:
type: object
description: >-
A category that an assessment result confirmed: the specialization
with the confirmed grade. It is read-only and derived by the server
from the assessment results of the candidate; no request carries it
and the profile storage holds no such column, so neither a form nor an
import can write a confirmed grade. It is separate from the claims of
the profile and from the self-assessed grades in `roles`.
additionalProperties: false
required:
- specialization
- grade
- confirmed_at
- attempt_id
properties:
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
grade:
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
confirmed_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
attempt_id:
type: string
format: uuid
description: >-
Assessment attempt whose result confirmed the grade. The attempt
belongs to the candidate.
CandidateProfile:
type: object
description: >-
The private profile of the current candidate: full name and contacts,
stack, roles, work experience, soft skills, and desired terms, each
value with its confirmation state and provenance. It is personal data
that only the candidate reads. It is never an organization-visible
schema: an organization sees a candidate only through the anonymous
card and, after an accepted invitation, through the contact grant, and
no organization schema refers to this one.
Every value is a claim of trust level 0. The `self_assessed_grade` of a
role is what the candidate says; the `confirmed_categories` list is
what assessment results established, and the two are never mixed. A
candidate who has not saved the profile gets version 0, every single
field `unknown`, empty lists, and null `updated_at`.
The profile is manual by nature and complete without a file: no field
requires a resume, the ML service, or an FSP account, and a candidate
with none of them has the same fields. Work formats live in the
questionnaire; a candidate's assessment starts from the questionnaire,
not from this profile.
additionalProperties: false
required:
- version
- full_name
- contacts
- stack
- roles
- experience
- soft_skills
- terms
- confirmed_categories
- updated_at
properties:
version:
$ref: "#/schemas/ProfileVersion"
full_name:
$ref: "#/schemas/ProfileFullNameClaim"
contacts:
$ref: "#/schemas/ProfileContacts"
stack:
type: array
maxItems: 30
description: >-
Technology tags in the order the candidate gave them, each tag at
most once without regard to letter case.
items:
$ref: "#/schemas/ProfileStackItem"
roles:
type: array
maxItems: 9
description: >-
Roles in the order the candidate gave them, each specialization at
most once.
items:
$ref: "#/schemas/ProfileRoleItem"
experience:
type: array
maxItems: 20
description: Work history entries in the order the candidate gave them.
items:
$ref: "#/schemas/ProfileExperienceItem"
soft_skills:
type: array
maxItems: 10
description: >-
Soft skills in the order the candidate gave them, each skill at
most once without regard to letter case.
items:
$ref: "#/schemas/ProfileSoftSkillItem"
terms:
$ref: "#/schemas/ProfileTerms"
confirmed_categories:
type: array
maxItems: 9
description: >-
Categories that assessment results confirmed, at most one per
specialization, in catalog order. Read-only and empty until an
assessment confirms a grade.
items:
$ref: "#/schemas/ProfileConfirmedCategory"
updated_at:
description: Time of the last change, or null before the first save.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
ProfileFullNameInput:
type: object
description: >-
Decision about the full name in a request; see CandidateProfileUpdate
for the rules of `status`. The value is personal data.
additionalProperties: false
required:
- value
- status
properties:
value:
$ref: "./contact_grant_schemas.yml#/schemas/ContactFullName"
status:
$ref: "#/schemas/ProfileItemStatus"
ProfileEmailInput:
type: object
description: >-
Decision about the contact email in a request; see
CandidateProfileUpdate for the rules of `status`. The value is
personal data.
additionalProperties: false
required:
- value
- status
properties:
value:
$ref: "./identity_schemas.yml#/schemas/EmailAddress"
status:
$ref: "#/schemas/ProfileItemStatus"
ProfilePhoneInput:
type: object
description: >-
Decision about the contact phone number in a request; see
CandidateProfileUpdate for the rules of `status`. The value is
personal data.
additionalProperties: false
required:
- value
- status
properties:
value:
$ref: "./contact_grant_schemas.yml#/schemas/ContactPhoneNumber"
status:
$ref: "#/schemas/ProfileItemStatus"
ProfileTelegramInput:
type: object
description: >-
Decision about the Telegram username in a request; see
CandidateProfileUpdate for the rules of `status`. The value is
personal data.
additionalProperties: false
required:
- value
- status
properties:
value:
$ref: "./contact_grant_schemas.yml#/schemas/ContactTelegramUsername"
status:
$ref: "#/schemas/ProfileItemStatus"
ProfileLocationInput:
type: object
description: >-
Decision about the place in a request; see CandidateProfileUpdate for
the rules of `status`. The value is personal data.
additionalProperties: false
required:
- value
- status
properties:
value:
$ref: "#/schemas/ProfileLocationName"
status:
$ref: "#/schemas/ProfileItemStatus"
ProfileRelocationInput:
type: object
description: >-
Decision about readiness to relocate in a request; see
CandidateProfileUpdate for the rules of `status`.
additionalProperties: false
required:
- value
- status
properties:
value:
type: boolean
status:
$ref: "#/schemas/ProfileItemStatus"
ProfileSalaryMinimumInput:
type: object
description: >-
Decision about the lowest salary in a request; see
CandidateProfileUpdate for the rules of `status`. The value is
personal data.
additionalProperties: false
required:
- value
- status
properties:
value:
$ref: "#/schemas/ProfileSalaryMinimum"
status:
$ref: "#/schemas/ProfileItemStatus"
ProfileContactsInput:
type: object
description: >-
Decisions about the contact channels in a request. A channel sent as
null is unknown: it is removed if it was set.
additionalProperties: false
required:
- email
- phone
- telegram
properties:
email:
oneOf:
- $ref: "#/schemas/ProfileEmailInput"
- type: "null"
phone:
oneOf:
- $ref: "#/schemas/ProfilePhoneInput"
- type: "null"
telegram:
oneOf:
- $ref: "#/schemas/ProfileTelegramInput"
- type: "null"
ProfileTermsInput:
type: object
description: >-
Decisions about the desired terms in a request. A field sent as null
is unknown: it is removed if it was set.
additionalProperties: false
required:
- location
- relocation
- salary_minimum
properties:
location:
oneOf:
- $ref: "#/schemas/ProfileLocationInput"
- type: "null"
relocation:
oneOf:
- $ref: "#/schemas/ProfileRelocationInput"
- type: "null"
salary_minimum:
oneOf:
- $ref: "#/schemas/ProfileSalaryMinimumInput"
- type: "null"
ProfileStackItemInput:
type: object
description: >-
Decision about one stack tag in a request; see CandidateProfileUpdate
for the rules of `status`.
additionalProperties: false
required:
- tag
- status
properties:
tag:
$ref: "./questionnaire_schemas.yml#/schemas/StackTag"
status:
$ref: "#/schemas/ProfileItemStatus"
ProfileSoftSkillItemInput:
type: object
description: >-
Decision about one soft skill in a request; see
CandidateProfileUpdate for the rules of `status`.
additionalProperties: false
required:
- skill
- status
properties:
skill:
$ref: "#/schemas/ProfileSoftSkill"
status:
$ref: "#/schemas/ProfileItemStatus"
ProfileRoleItemInput:
type: object
description: >-
Decision about one role in a request; see CandidateProfileUpdate for
the rules of `status`. The object has no confirmed grade and no
category: unknown fields are rejected.
additionalProperties: false
required:
- specialization
- self_assessed_grade
- status
properties:
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
self_assessed_grade:
description: Grade that the candidate claims, or null when the candidate names none.
oneOf:
- $ref: "./catalog_schemas.yml#/schemas/GradeCode"
- type: "null"
status:
$ref: "#/schemas/ProfileItemStatus"
ProfileExperienceItemInput:
type: object
description: >-
Decision about one work history entry in a request; see
CandidateProfileUpdate for the rules of `status`. The server also
requires `ended_on` not to precede `started_on` and no month to lie in
the future, and answers 400 with the pointer of the month.
additionalProperties: false
required:
- employer_name
- specialization
- started_on
- ended_on
- summary
- status
properties:
employer_name:
oneOf:
- $ref: "#/schemas/ProfileEmployerName"
- type: "null"
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
started_on:
$ref: "#/schemas/ProfileYearMonth"
ended_on:
oneOf:
- $ref: "#/schemas/ProfileYearMonth"
- type: "null"
summary:
oneOf:
- $ref: "#/schemas/ProfileExperienceSummary"
- type: "null"
status:
$ref: "#/schemas/ProfileItemStatus"
CandidateProfileUpdate:
type: object
description: >-
Complete new state of the candidate profile. It replaces every stored
value as a whole: a single field sent as null is unknown and is removed,
and a list replaces the stored list. The body is personal data.
Each value carries a decision `status`. `confirmed` sets a manual value
or confirms a stored suggestion; confirming a suggestion with exactly
its stored value keeps its origin and quote, and any other value makes
the claim manual. `extracted` keeps a stored suggestion unconfirmed and
is accepted only with exactly the stored value; any other use answers
400 with the pointer of that status, for example `/stack/1/status`. The
provenance, the trust level, and the confirmed categories are not part
of the request, and unknown fields are rejected, so a request can
neither mark a claim as verified nor write a confirmed grade or a
category.
additionalProperties: false
required:
- expected_version
- full_name
- contacts
- stack
- roles
- experience
- soft_skills
- terms
properties:
expected_version:
$ref: "#/schemas/ProfileVersion"
full_name:
oneOf:
- $ref: "#/schemas/ProfileFullNameInput"
- type: "null"
contacts:
$ref: "#/schemas/ProfileContactsInput"
stack:
type: array
maxItems: 30
description: >-
Technology tags. The schema limits the count; the server also
answers 400 with the pointer of a tag that repeats an earlier one
without regard to letter case, for example `/stack/2/tag`.
items:
$ref: "#/schemas/ProfileStackItemInput"
roles:
type: array
maxItems: 9
description: >-
Roles. The server answers 400 with the pointer of a role whose
specialization repeats an earlier one, for example
`/roles/1/specialization`.
items:
$ref: "#/schemas/ProfileRoleItemInput"
experience:
type: array
maxItems: 20
description: Work history entries.
items:
$ref: "#/schemas/ProfileExperienceItemInput"
soft_skills:
type: array
maxItems: 10
description: >-
Soft skills. The server answers 400 with the pointer of a skill
that repeats an earlier one without regard to letter case.
items:
$ref: "#/schemas/ProfileSoftSkillItemInput"
terms:
$ref: "#/schemas/ProfileTermsInput"
@@ -34,7 +34,9 @@ schemas:
description: >-
Working context of the candidate's search. It holds no personal data
such as an address or a city; location, relocation, and salary
expectations belong to the candidate profile.
expectations belong to the candidate profile (`ProfileTerms`). The
acceptable work formats live only here: the profile does not repeat
them.
additionalProperties: false
required:
- work_formats
@@ -52,7 +54,10 @@ schemas:
description: >-
Experience that the candidate states for one specialization, in whole
months. It is self-reported context: it never adds assessment points
and never confirms a grade.
and never confirms a grade. The work history entries of the candidate
profile (`ProfileExperienceItem`) are a different, detailed claim: the
two are saved separately and the server neither adds the entries up
nor fills them from these totals.
additionalProperties: false
required:
- commercial_months
@@ -82,7 +87,12 @@ schemas:
confirmed grade, and with it a category, comes only from an assessment
result and is never part of the questionnaire; unknown fields such as
`confirmed_grade` or `category` are rejected. Task languages and the
stack are attributes of the chosen specialization, not categories.
stack are attributes of the chosen specialization, not categories. The
candidate profile states the same kind of claim in the `roles` of
`CandidateProfile` (`ProfileRoleItem.self_assessed_grade`): the
questionnaire value starts the assessment and the profile value is what
the profile shows, the two are saved separately, and neither is ever a
confirmed grade.
additionalProperties: false
required:
- specialization
File diff suppressed because it is too large. Load diff
+95 -3
View File
@@ -18,9 +18,11 @@ tags:
assessment availability, and the grade scale.
- name: candidate
description: >-
Data of the current candidate, such as the questionnaire with the
chosen specializations and self-assessed grades. Confirmed grades and
categories come only from assessment results.
Data of the current candidate: the questionnaire with the chosen
specializations and self-assessed grades, and the private profile
with full name, contacts, stack, roles, experience, soft skills, and
desired terms. Confirmed grades and categories come only from
assessment results.
- name: assessment
description: >-
Assessment attempts of the current candidate: availability, start and
@@ -85,6 +87,8 @@ paths:
$ref: ./routes/catalog_specializations.yml
/api/v1/me/questionnaire:
$ref: ./routes/candidate_questionnaire.yml
/api/v1/me/profile:
$ref: ./routes/candidate_profile.yml
/api/v1/me/assessment-availability:
$ref: ./routes/candidate_assessment_availability.yml
/api/v1/me/assessment-attempts:
@@ -225,6 +229,90 @@ components:
$ref: ./components/schemas.yml#/CandidateQuestionnaire
CandidateQuestionnaireUpdate:
$ref: ./components/schemas.yml#/CandidateQuestionnaireUpdate
ProfileVersion:
$ref: ./components/schemas.yml#/ProfileVersion
ProfileItemStatus:
$ref: ./components/schemas.yml#/ProfileItemStatus
ProfileClaimStatus:
$ref: ./components/schemas.yml#/ProfileClaimStatus
ProfileClaimOrigin:
$ref: ./components/schemas.yml#/ProfileClaimOrigin
ProfileClaimTrustLevel:
$ref: ./components/schemas.yml#/ProfileClaimTrustLevel
ProfileClaimQuote:
$ref: ./components/schemas.yml#/ProfileClaimQuote
ProfileClaimSource:
$ref: ./components/schemas.yml#/ProfileClaimSource
ProfileLocationName:
$ref: ./components/schemas.yml#/ProfileLocationName
ProfileSalaryMinimum:
$ref: ./components/schemas.yml#/ProfileSalaryMinimum
ProfileSoftSkill:
$ref: ./components/schemas.yml#/ProfileSoftSkill
ProfileEmployerName:
$ref: ./components/schemas.yml#/ProfileEmployerName
ProfileExperienceSummary:
$ref: ./components/schemas.yml#/ProfileExperienceSummary
ProfileYearMonth:
$ref: ./components/schemas.yml#/ProfileYearMonth
ProfileFullNameClaim:
$ref: ./components/schemas.yml#/ProfileFullNameClaim
ProfileEmailClaim:
$ref: ./components/schemas.yml#/ProfileEmailClaim
ProfilePhoneClaim:
$ref: ./components/schemas.yml#/ProfilePhoneClaim
ProfileTelegramClaim:
$ref: ./components/schemas.yml#/ProfileTelegramClaim
ProfileLocationClaim:
$ref: ./components/schemas.yml#/ProfileLocationClaim
ProfileRelocationClaim:
$ref: ./components/schemas.yml#/ProfileRelocationClaim
ProfileSalaryMinimumClaim:
$ref: ./components/schemas.yml#/ProfileSalaryMinimumClaim
ProfileContacts:
$ref: ./components/schemas.yml#/ProfileContacts
ProfileTerms:
$ref: ./components/schemas.yml#/ProfileTerms
ProfileStackItem:
$ref: ./components/schemas.yml#/ProfileStackItem
ProfileSoftSkillItem:
$ref: ./components/schemas.yml#/ProfileSoftSkillItem
ProfileRoleItem:
$ref: ./components/schemas.yml#/ProfileRoleItem
ProfileExperienceItem:
$ref: ./components/schemas.yml#/ProfileExperienceItem
ProfileConfirmedCategory:
$ref: ./components/schemas.yml#/ProfileConfirmedCategory
CandidateProfile:
$ref: ./components/schemas.yml#/CandidateProfile
ProfileFullNameInput:
$ref: ./components/schemas.yml#/ProfileFullNameInput
ProfileEmailInput:
$ref: ./components/schemas.yml#/ProfileEmailInput
ProfilePhoneInput:
$ref: ./components/schemas.yml#/ProfilePhoneInput
ProfileTelegramInput:
$ref: ./components/schemas.yml#/ProfileTelegramInput
ProfileLocationInput:
$ref: ./components/schemas.yml#/ProfileLocationInput
ProfileRelocationInput:
$ref: ./components/schemas.yml#/ProfileRelocationInput
ProfileSalaryMinimumInput:
$ref: ./components/schemas.yml#/ProfileSalaryMinimumInput
ProfileContactsInput:
$ref: ./components/schemas.yml#/ProfileContactsInput
ProfileTermsInput:
$ref: ./components/schemas.yml#/ProfileTermsInput
ProfileStackItemInput:
$ref: ./components/schemas.yml#/ProfileStackItemInput
ProfileSoftSkillItemInput:
$ref: ./components/schemas.yml#/ProfileSoftSkillItemInput
ProfileRoleItemInput:
$ref: ./components/schemas.yml#/ProfileRoleItemInput
ProfileExperienceItemInput:
$ref: ./components/schemas.yml#/ProfileExperienceItemInput
CandidateProfileUpdate:
$ref: ./components/schemas.yml#/CandidateProfileUpdate
AssessmentMode:
$ref: ./components/schemas.yml#/AssessmentMode
AssessmentAttemptVersion:
@@ -728,6 +816,10 @@ components:
$ref: ./components/responses.yml#/QuestionnaireValidationFailed
QuestionnaireVersionConflict:
$ref: ./components/responses.yml#/QuestionnaireVersionConflict
ProfileValidationFailed:
$ref: ./components/responses.yml#/ProfileValidationFailed
ProfileVersionConflict:
$ref: ./components/responses.yml#/ProfileVersionConflict
AssessmentAttemptCreateValidationFailed:
$ref: ./components/responses.yml#/AssessmentAttemptCreateValidationFailed
AssessmentAnswerValidationFailed:
+92
View File
@@ -0,0 +1,92 @@
get:
operationId: GetMyProfile
summary: Read the private profile of the current candidate.
description: |-
Requires the session cookie of a candidate account. The candidate comes from the session, never from a request parameter. A candidate who has not saved the profile yet gets 200 with version 0, every single field `unknown`, and empty lists rather than 404, so the client reads the version for the first save in the same way as for later ones and a missing profile is not an error state.
The profile is personal data that only its owner reads: full name, contacts, work history, and the lowest salary. It is a private resource and never an organization-visible one; organizations see a candidate through the anonymous card and, after an accepted invitation, through the contact grant, and no organization contract refers to this schema. The response is `Cache-Control: no-store`, and the server never writes its values to logs, metrics, URLs, or events.
Every value carries its confirmation state and provenance, and every claim has trust level 0. The self-assessed grade of a role is separate from `confirmed_categories`, which only assessment results establish and which no request writes. The profile needs no file, no ML extraction, and no FSP account.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden.
security:
- sessionCookie: []
tags:
- candidate
responses:
"200":
description: The private profile of the current candidate.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateProfile
examples:
new_candidate:
$ref: ../components/examples.yml#/NewCandidateProfile
backend_manual_with_suggestion:
$ref: ../components/examples.yml#/BackendCandidateProfile
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
put:
operationId: SaveMyProfile
summary: Replace the private profile of the current candidate.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The body is the complete new state of every field and list; see CandidateProfileUpdate for the decisions that it carries. It replaces the stored profile as a whole.
Every field is optional in substance: a profile can be saved with any subset filled and the rest null or empty, so no value requires a resume, the ML service, an FSP account, or any other file or link. Which fields are needed to leave the onboarding step candidate_profile is an open product question that this contract does not decide; a save on that step advancing the account to candidate_questionnaire is planned.
Provenance is the server's: a value typed in the form is `manual`, confirming a stored suggestion keeps its origin, and every claim keeps trust level 0. The body has no origin, trust level, confirmation time, confirmed grade, or category, and unknown fields are rejected. A self-assessed grade never becomes a confirmed grade or a category.
Optimistic concurrency uses `expected_version` in the body: the client sends the `version` it read, 0 for the first save. If it is not the current version, the server answers 412 version_conflict and changes nothing, and the client reads the profile again and reapplies its edits, so a concurrent edit from another tab or device is never lost silently. The version travels in the body rather than in If-Match because the generated client cannot read the ETag response header yet, as for the questionnaire; the status and code are the same as for a failed If-Match.
The operation needs no Idempotency-Key: it replaces the whole state and is idempotent. A body whose values equal the stored ones, with the same decisions, changes nothing, keeps the version, and answers 200 with the current profile even when `expected_version` is older, so a retry after a lost response of a successful save succeeds instead of failing with 412. A version above the current one never existed and always answers 412 version_conflict, even for an unchanged body.
The save replaces the stored claims as a whole. A suggestion that an import stored and that the client did not render and send back with the decision `extracted` is dropped by the save; a client therefore sends every suggestion that it received, and a client that read an older version gets 412 instead of silently dropping a suggestion it never saw.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), a version above the current one (412), domain rules that depend on the body alone (400), then the rules that depend on the stored claims against the version: a decision `extracted` for a value that is not a stored suggestion answers 412 when `expected_version` is stale, because another save may have confirmed that value, and 400 when it is current; an unchanged body (200); any other change over a stale version (412). The schema rejects an unknown field, an unknown specialization or grade, a phone number outside E.164, a Telegram username without the leading @, an email that is not an address, a month outside `YYYY-MM`, a salary that is not a positive multiple of 1000, and more items than a list allows. The server also rejects a repeated tag, skill, or role specialization, a period that ends before it starts or lies in the future, and a decision `extracted` for a value that is not a stored suggestion, with 400 validation_failed and pointers to the items, for example `/roles/1/specialization` or `/stack/1/status`. Error bodies never repeat a submitted value.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- candidate
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateProfileUpdate
examples:
backend_manual:
$ref: ../components/examples.yml#/BackendCandidateProfileUpdate
responses:
"200":
description: >-
The saved profile with its new version, or the current profile when
the body changes nothing.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateProfile
examples:
backend_manual_with_suggestion:
$ref: ../components/examples.yml#/BackendCandidateProfile
"400":
$ref: ../components/responses.yml#/ProfileValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"412":
$ref: ../components/responses.yml#/ProfileVersionConflict
default:
$ref: ../components/responses.yml#/Problem