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

+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