feat(api): add invitation, terms version, acceptance, and contact grant contract

This commit is contained in:
shira committed 2026-10-06 13:48:35 +03:00
1 parent b856d4ff54
commit d2c6f1375a
140 files changed
+39767 -303

No files matched your search

+97 -9
View File
@@ -235,9 +235,7 @@ QuestionnaireValidationFailed:
more than two specializations, an unknown specialization, grade, or task
language, an unknown field such as confirmed_grade, a repeated
specialization, or a task language that the specialization's published
bank does not offer; code validation_failed with body pointers. When the
decoder does not record the path of a nested field, the pointer is the
whole body. Nothing was changed.
bank does not offer; 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.
content:
application/problem+json:
schema:
@@ -284,8 +282,7 @@ AssessmentAnswerValidationFailed:
element, more selections than the item allows, a text longer than the
item allows, a language that the practice does not offer, or an unknown
field such as score or duration; code validation_failed with body
pointers. When the decoder does not record the path of a nested field,
the pointer is the whole body. Nothing was stored, and the outcome is
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 stored, and the outcome is
not stored under the Idempotency-Key.
content:
application/problem+json:
@@ -385,8 +382,7 @@ NeedValidationFailed:
a repeated skill or task, status `extracted` with a value that is not the
stored suggestion, a vacancy that is not a vacancy of the organization,
or a missing or invalid expected_version; code validation_failed with
body pointers. When the decoder does not record the path of a nested
field, the pointer is the whole body. Nothing was changed, and the
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, and the
outcome is not stored under an Idempotency-Key.
content:
application/problem+json:
@@ -428,8 +424,7 @@ SupportCaseValidationFailed:
case type does not accept, a missing required field of the type, an
unknown field such as status, decision, moderator, or priority, or a
complaint reason that requires an invitation reference; code
validation_failed with body pointers. When the decoder does not record
the path of a nested field, the pointer is the whole body. Nothing was
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
created, and the outcome is not stored under the Idempotency-Key.
content:
application/problem+json:
@@ -466,3 +461,96 @@ SupportCaseCreateConflict:
$ref: ./examples.yml#/SupportCaseAppealExists
idempotency_in_progress:
$ref: ./examples.yml#/IdempotencyInProgress
InvitationValidationFailed:
description: >-
The body does not match the contract or violates an invitation rule: a
missing term or package condition, a package condition left out instead
of `not_provided`, a salary range without its tax basis, a salary bound
that is not a positive multiple of 1000, a lower bound that is not below
the upper one, a range width outside 10-40% of its midpoint, the
`office` or `hybrid` format without a place of work, a repeated
technology, a candidate handle that the organization cannot use, a need
or requirements version that the organization does not have, a response
period other than 3, 7, or 14 days, an unknown field such as a
candidate's email address or salary minimum, 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, and the outcome is not stored under an
Idempotency-Key.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
without_tax_basis:
$ref: ./examples.yml#/InvitationWithoutTaxBasis
without_communication_method:
$ref: ./examples.yml#/InvitationWithoutCommunicationMethod
package_condition_left_out:
$ref: ./examples.yml#/InvitationPackageItemMissing
salary_range_too_wide:
$ref: ./examples.yml#/InvitationSalaryRangeTooWide
location_required:
$ref: ./examples.yml#/InvitationLocationRequired
unknown_candidate:
$ref: ./examples.yml#/InvitationUnknownCandidate
candidate_data_in_body:
$ref: ./examples.yml#/InvitationCandidateDataInBody
InvitationAcceptValidationFailed:
description: >-
The body does not match the contract or violates a rule of the consent
C4: a missing `terms_version` or `expected_version`, `accepted` other
than true, an empty or repeated choice of contact fields, an unknown
field kind, a field that the candidate's profile does not hold, a
consent text version that is not the published one, or an unknown field
such as a contact value; code validation_failed with body pointers.
Nothing was changed, no consent or grant was recorded, and the outcome
is not stored under the Idempotency-Key.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
empty_field_choice:
$ref: ./examples.yml#/InvitationConsentWithoutFields
outdated_consent_text:
$ref: ./examples.yml#/InvitationConsentTextOutdated
missing_terms_version:
$ref: ./examples.yml#/InvitationMissingTermsVersion
InvitationVersionConflict:
description: >-
`expected_version` is not the current invitation version, or, for an
acceptance, `terms_version` is not the current terms version; code
version_conflict. Nothing was changed, no consent or grant was
recorded, and the outcome is not stored under an Idempotency-Key; read
the invitation again before retrying.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
stale_terms:
$ref: ./examples.yml#/InvitationStaleTerms
stale_version:
$ref: ./examples.yml#/InvitationStaleVersion
InvitationCommandConflict:
description: >-
The state of the invitation does not allow the command, code
state_conflict: for example an acceptance of a withdrawn or expired
invitation or one past its deadline, a send of an invitation that is no
longer a draft, a send blocked by the pending limit of the need or by
the pause after a decline, or a second raise of the upper salary bound.
The invitation tells the client its state. Or a request with the same
Idempotency-Key is still running, code idempotency_in_progress. Nothing
was changed in either case.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
not_answerable:
$ref: ./examples.yml#/InvitationNotAnswerable
salary_raise_used:
$ref: ./examples.yml#/InvitationSalaryRaiseUsed
send_blocked:
$ref: ./examples.yml#/InvitationSendBlocked
idempotency_in_progress:
$ref: ./examples.yml#/IdempotencyInProgress