feat(profile): persist candidate edits and enforce company access

This commit is contained in:
TakuyaYagam1 committed 2026-10-07 14:15:16 +03:00
1 parent 3ab6bd91a3
commit 73c7caa225
67 files changed
+5286 -229

No files matched your search

+2
View File
@@ -3993,6 +3993,7 @@ NewCandidateProfile:
stack: []
roles: []
experience: []
experience_overlaps: []
soft_skills: []
terms:
location:
@@ -4093,6 +4094,7 @@ BackendCandidateProfile:
quote: null
extraction_version: null
confirmed_at: "2026-10-05T09:30:00Z"
experience_overlaps: []
soft_skills:
- skill: Mentoring
status: confirmed
+2 -1
View File
@@ -599,7 +599,8 @@ ProfileValidationFailed:
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
value that is not a stored suggestion, an overlapping experience period
without an explicit date-pair acknowledgement, 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:
+75
View File
@@ -1988,6 +1988,68 @@ ProfileExperienceItem:
$ref: '#/ProfileItemStatus'
source:
$ref: '#/ProfileClaimSource'
ProfileExperienceOverlapStatus:
type: string
description: Whether the candidate confirmed that two overlapping periods are genuine parallel work.
enum:
- needs_confirmation
- confirmed
ProfileExperienceOverlap:
type: object
description: One pair of work history entries whose inclusive month ranges overlap. The indices refer to the experience array in this profile version. `confirmed` records an explicit acknowledgement for this pair of dates; otherwise the pair needs confirmation before a changed profile can be saved.
additionalProperties: false
required:
- first_index
- second_index
- status
properties:
first_index:
type: integer
minimum: 0
maximum: 19
second_index:
type: integer
minimum: 1
maximum: 19
status:
$ref: '#/ProfileExperienceOverlapStatus'
ProfileExperiencePeriod:
type: object
description: The exact month range of an experience entry, copied into a confirmation.
additionalProperties: false
required:
- started_on
- ended_on
properties:
started_on:
$ref: '#/ProfileYearMonth'
ended_on:
description: Last month of work, or null when the period is open-ended.
oneOf:
- $ref: '#/ProfileYearMonth'
- type: 'null'
ProfileParallelPeriodConfirmation:
type: object
description: Explicit acknowledgement that the two indexed experience periods are genuine parallel work. The indices and exact ranges must match the submitted experience array; expected_version binds the acknowledgement to the profile version the candidate read.
additionalProperties: false
required:
- first_index
- second_index
- first_period
- second_period
properties:
first_index:
type: integer
minimum: 0
maximum: 19
second_index:
type: integer
minimum: 1
maximum: 19
first_period:
$ref: '#/ProfileExperiencePeriod'
second_period:
$ref: '#/ProfileExperiencePeriod'
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`.'
@@ -2023,6 +2085,7 @@ CandidateProfile:
- stack
- roles
- experience
- experience_overlaps
- soft_skills
- terms
- confirmed_categories
@@ -2052,6 +2115,12 @@ CandidateProfile:
description: Work history entries in the order the candidate gave them.
items:
$ref: '#/ProfileExperienceItem'
experience_overlaps:
type: array
maxItems: 190
description: Every pair of overlapping experience periods, with its confirmation status. The indices refer to this version's experience array.
items:
$ref: '#/ProfileExperienceOverlap'
soft_skills:
type: array
maxItems: 10
@@ -2311,6 +2380,12 @@ CandidateProfileUpdate:
description: Work history entries.
items:
$ref: '#/ProfileExperienceItemInput'
confirmed_parallel_periods:
type: array
maxItems: 190
description: Explicit acknowledgements for overlapping periods. Each pair must use distinct in-range indices and repeat the exact normalized started_on and ended_on values of those entries in this body. A changed or reordered period needs a new acknowledgement. The server retains a previous acknowledgement only for the same indices and dates. Duplicate pairs and pairs that do not overlap are rejected.
items:
$ref: '#/ProfileParallelPeriodConfirmation'
soft_skills:
type: array
maxItems: 10
@@ -515,6 +515,76 @@ schemas:
$ref: "#/schemas/ProfileItemStatus"
source:
$ref: "#/schemas/ProfileClaimSource"
ProfileExperienceOverlapStatus:
type: string
description: Whether the candidate confirmed that two overlapping periods are genuine parallel work.
enum:
- needs_confirmation
- confirmed
ProfileExperienceOverlap:
type: object
description: >-
One pair of work history entries whose inclusive month ranges overlap.
The indices refer to the experience array in this profile version.
`confirmed` records an explicit acknowledgement for this pair of dates;
otherwise the pair needs confirmation before a changed profile can be saved.
additionalProperties: false
required:
- first_index
- second_index
- status
properties:
first_index:
type: integer
minimum: 0
maximum: 19
second_index:
type: integer
minimum: 1
maximum: 19
status:
$ref: "#/schemas/ProfileExperienceOverlapStatus"
ProfileExperiencePeriod:
type: object
description: The exact month range of an experience entry, copied into a confirmation.
additionalProperties: false
required:
- started_on
- ended_on
properties:
started_on:
$ref: "#/schemas/ProfileYearMonth"
ended_on:
description: Last month of work, or null when the period is open-ended.
oneOf:
- $ref: "#/schemas/ProfileYearMonth"
- type: "null"
ProfileParallelPeriodConfirmation:
type: object
description: >-
Explicit acknowledgement that the two indexed experience periods are
genuine parallel work. The indices and exact ranges must match the
submitted experience array; expected_version binds the acknowledgement
to the profile version the candidate read.
additionalProperties: false
required:
- first_index
- second_index
- first_period
- second_period
properties:
first_index:
type: integer
minimum: 0
maximum: 19
second_index:
type: integer
minimum: 1
maximum: 19
first_period:
$ref: "#/schemas/ProfileExperiencePeriod"
second_period:
$ref: "#/schemas/ProfileExperiencePeriod"
ProfileConfirmedCategory:
type: object
description: >-
@@ -573,6 +643,7 @@ schemas:
- stack
- roles
- experience
- experience_overlaps
- soft_skills
- terms
- confirmed_categories
@@ -606,6 +677,14 @@ schemas:
description: Work history entries in the order the candidate gave them.
items:
$ref: "#/schemas/ProfileExperienceItem"
experience_overlaps:
type: array
maxItems: 190
description: >-
Every pair of overlapping experience periods, with its confirmation
status. The indices refer to this version's experience array.
items:
$ref: "#/schemas/ProfileExperienceOverlap"
soft_skills:
type: array
maxItems: 10
@@ -921,6 +1000,18 @@ schemas:
description: Work history entries.
items:
$ref: "#/schemas/ProfileExperienceItemInput"
confirmed_parallel_periods:
type: array
maxItems: 190
description: >-
Explicit acknowledgements for overlapping periods. Each pair must
use distinct in-range indices and repeat the exact normalized
started_on and ended_on values of those entries in this body. A
changed or reordered period needs a new acknowledgement. The server
retains a previous acknowledgement only for the same indices and
dates. Duplicate pairs and pairs that do not overlap are rejected.
items:
$ref: "#/schemas/ProfileParallelPeriodConfirmation"
soft_skills:
type: array
maxItems: 10