feat(api): add invitation, terms version, acceptance, and contact grant contract
This commit is contained in:
1 parent
b856d4ff54
commit
d2c6f1375a
140 files changed
+39767
-303
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -105,3 +105,27 @@ SupportCaseId:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 01928f7a-6e7f-7a8b-9c0d-1e2f3a4b5c6d
|
||||
InvitationId:
|
||||
name: invitation_id
|
||||
in: path
|
||||
required: true
|
||||
description: >-
|
||||
Identifier of an invitation of the organization in the path. An
|
||||
invitation of another organization and an unknown identifier both answer
|
||||
404 not_found.
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f
|
||||
MyInvitationId:
|
||||
name: invitation_id
|
||||
in: path
|
||||
required: true
|
||||
description: >-
|
||||
Identifier of an invitation addressed to the current candidate. A draft,
|
||||
an invitation addressed to another candidate, and an unknown identifier
|
||||
all answer 404 not_found, so identifiers cannot be enumerated.
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f
|
||||
@@ -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
|
||||
+1051
-1
File diff suppressed because it is too large.
Load diff
@@ -32,3 +32,18 @@ schemas:
|
||||
description: >-
|
||||
Opaque cursor of the next page, or null on the last page. Clients
|
||||
must not parse, build, or store it beyond the current listing.
|
||||
CandidateHandle:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 128
|
||||
pattern: "^[A-Za-z0-9_-]+$"
|
||||
description: >-
|
||||
Opaque reference to a candidate as one organization sees it, taken
|
||||
from a search result card of that organization. It is not the
|
||||
candidate's account or profile identifier, it never contains an email
|
||||
address or a phone number, and it means nothing to another
|
||||
organization. The server resolves it only for the organization in the
|
||||
path. Clients never parse it. It is shared by the invitations of
|
||||
FR12 and the search results of FR11 (TASK-185), which issue it.
|
||||
examples:
|
||||
- cand_7Qm2xVb9Lr4Kp0Zt
|
||||
@@ -0,0 +1,279 @@
|
||||
schemas:
|
||||
ContactFieldKind:
|
||||
type: string
|
||||
description: |-
|
||||
Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.
|
||||
|
||||
- full_name: the full name from the profile.
|
||||
- email: the contact email address from the profile.
|
||||
- phone: the contact phone number from the profile.
|
||||
- telegram: the Telegram username from the profile.
|
||||
|
||||
The value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.
|
||||
enum:
|
||||
- full_name
|
||||
- email
|
||||
- phone
|
||||
- telegram
|
||||
ContactConsentText:
|
||||
type: object
|
||||
description: >-
|
||||
Currently published text of the consent C4 for this invitation. The
|
||||
server stores an acceptance with `text_version` and the hash of
|
||||
exactly this text, together with the organization, the selected
|
||||
fields, the invitation, and its terms version (the ledger of TASK-062).
|
||||
additionalProperties: false
|
||||
required:
|
||||
- text_version
|
||||
- text
|
||||
properties:
|
||||
text_version:
|
||||
$ref: "./identity_schemas.yml#/schemas/ConsentTextVersion"
|
||||
text:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 100000
|
||||
description: >-
|
||||
Full consent text in plain UTF-8 with the name of the
|
||||
organization; paragraphs are separated by an empty line. The
|
||||
client shows it as text, never as HTML, next to the field choice.
|
||||
ContactConsentOffer:
|
||||
type: object
|
||||
description: >-
|
||||
What the candidate can consent to in an acceptance: the consent text
|
||||
and the kinds of contact that the candidate's profile holds now. It
|
||||
holds kinds only, never contact values, and nothing is preselected.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- text
|
||||
- available_fields
|
||||
properties:
|
||||
text:
|
||||
$ref: "#/schemas/ContactConsentText"
|
||||
available_fields:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
uniqueItems: true
|
||||
description: >-
|
||||
Kinds of contact that the profile holds and that an acceptance may
|
||||
select. A kind outside this list answers 400 in an acceptance.
|
||||
items:
|
||||
$ref: "#/schemas/ContactFieldKind"
|
||||
ContactConsentAcceptance:
|
||||
type: object
|
||||
description: >-
|
||||
Consent C4 given in an acceptance: the text version the candidate saw,
|
||||
an explicit `accepted`, and the contact fields the candidate selected.
|
||||
At least one field is required, so a hidden default or an empty choice
|
||||
never creates a grant. A text version that is not the currently
|
||||
published one answers 400 validation_failed with the pointer
|
||||
`/consent_c4/text_version`, and a field that the profile does not hold
|
||||
answers 400 with the pointer of that item, such as
|
||||
`/consent_c4/fields/1`. C4 is given only here, never at registration.
|
||||
The permission to pass the selected data on to the organization's ATS
|
||||
(PRD C4 and FR19) is planned as an additive optional flag that
|
||||
defaults to no transfer.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- text_version
|
||||
- accepted
|
||||
- fields
|
||||
properties:
|
||||
text_version:
|
||||
$ref: "./identity_schemas.yml#/schemas/ConsentTextVersion"
|
||||
accepted:
|
||||
type: boolean
|
||||
enum:
|
||||
- true
|
||||
description: Explicit consent. Only true is valid.
|
||||
fields:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
uniqueItems: true
|
||||
description: >-
|
||||
Contact fields the organization may read after the acceptance.
|
||||
The grant covers exactly these fields and no other.
|
||||
items:
|
||||
$ref: "#/schemas/ContactFieldKind"
|
||||
ContactGrantState:
|
||||
type: string
|
||||
description: |-
|
||||
State of a contact grant.
|
||||
|
||||
- active: the grant exists. Each read by the organization still checks the consent C4, the grant, and the current visibility of the profile.
|
||||
- revoked: the grant is closed for good; the organization reads no contact through it. A later publication of the profile or a new acceptance never reopens it; only a new explicit C4 creates a new grant.
|
||||
enum:
|
||||
- active
|
||||
- revoked
|
||||
ContactRevocationReason:
|
||||
type: string
|
||||
description: |-
|
||||
Why a contact grant was revoked, shown only to the candidate.
|
||||
|
||||
- consent_revoked: the candidate revoked the consent C4 for the organization; every grant under it is closed.
|
||||
- participation_cancelled: the candidate cancelled the participation in this invitation; only the grant of this invitation is closed.
|
||||
- visibility_closed: the candidate revoked the publication C2 or hid the profile from the organization after the grant existed. A grant created while the visibility already did not allow a read stays active with `blocked_by` `visibility` instead.
|
||||
|
||||
The withdrawal of an invitation by the organization, a no deal, and a negotiation timeout never revoke a grant.
|
||||
enum:
|
||||
- consent_revoked
|
||||
- participation_cancelled
|
||||
- visibility_closed
|
||||
ContactAccessBlock:
|
||||
type: string
|
||||
description: |-
|
||||
Why an active grant does not allow a read now, shown only to the candidate.
|
||||
|
||||
- visibility: the profile was not published (C2) or was hidden from the organization when the candidate accepted, and it still is. The acceptance never publishes the profile or lifts the hiding by itself (PRD FR12); the grant becomes readable once the candidate publishes the profile or unhides it for the organization.
|
||||
enum:
|
||||
- visibility
|
||||
ContactGrant:
|
||||
type: object
|
||||
description: >-
|
||||
Contact grant as the candidate reads it: which fields one organization
|
||||
may read, from which invitation and terms version, and whether it is
|
||||
still active. It holds kinds only, never contact values. A grant is
|
||||
stored apart from the invitation state, so a later change of the
|
||||
state does not change it unless the state is a cancellation by the
|
||||
candidate.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- fields
|
||||
- status
|
||||
- readable
|
||||
- blocked_by
|
||||
- terms_version
|
||||
- consent_text_version
|
||||
- granted_at
|
||||
- revoked_at
|
||||
- revocation_reason
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of the grant.
|
||||
fields:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
uniqueItems: true
|
||||
description: Contact fields that the grant covers.
|
||||
items:
|
||||
$ref: "#/schemas/ContactFieldKind"
|
||||
status:
|
||||
$ref: "#/schemas/ContactGrantState"
|
||||
readable:
|
||||
type: boolean
|
||||
description: >-
|
||||
Whether the organization can read the covered fields now: true
|
||||
only for an active grant whose current consent and visibility
|
||||
allow the read. The organization sees the same fact as
|
||||
`contact_access.status` `available`, without the reason.
|
||||
blocked_by:
|
||||
description: >-
|
||||
Why an active grant is not readable now, or null when it is
|
||||
readable or revoked; a revoked grant has `revocation_reason`
|
||||
instead.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/ContactAccessBlock"
|
||||
- type: "null"
|
||||
terms_version:
|
||||
description: Terms version of the invitation that the acceptance accepted.
|
||||
allOf:
|
||||
- $ref: "./invitation_schemas.yml#/schemas/InvitationTermsVersion"
|
||||
consent_text_version:
|
||||
description: Version of the consent C4 text that the candidate accepted.
|
||||
allOf:
|
||||
- $ref: "./identity_schemas.yml#/schemas/ConsentTextVersion"
|
||||
granted_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
revoked_at:
|
||||
description: Moment of the revocation, or null while the grant is active.
|
||||
oneOf:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
revocation_reason:
|
||||
description: Reason of the revocation, or null while the grant is active.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/ContactRevocationReason"
|
||||
- type: "null"
|
||||
ContactPhoneNumber:
|
||||
type: string
|
||||
minLength: 8
|
||||
maxLength: 16
|
||||
pattern: '^\+[1-9][0-9]{6,14}$'
|
||||
description: Phone number in the E.164 format, for example +70000000000.
|
||||
ContactTelegramUsername:
|
||||
type: string
|
||||
minLength: 6
|
||||
maxLength: 33
|
||||
pattern: "^@[A-Za-z0-9_]{5,32}$"
|
||||
description: Telegram username with the leading @.
|
||||
ContactFullName:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 200
|
||||
pattern: '^\S(?:.*\S)?$'
|
||||
description: >-
|
||||
Full name as the candidate wrote it in the profile. Plain text without
|
||||
line breaks; clients show it as text, never as HTML.
|
||||
ContactDisclosure:
|
||||
type: object
|
||||
description: >-
|
||||
Contacts of the candidate that the organization may read through an
|
||||
active grant of this invitation. This is the only response that
|
||||
carries contact values, and it is separate from the terms and from
|
||||
the invitation. Each field the grant does not cover is null, and so
|
||||
is a covered field that the profile no longer holds. The response is
|
||||
never cached or stored by the server for later reads, so a
|
||||
revocation closes the next read at once. The value formats depend on
|
||||
the profile contract (FR02, TASK-066), which must store the same
|
||||
formats; see ContactFieldKind.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- invitation_id
|
||||
- grant_id
|
||||
- fields
|
||||
- granted_at
|
||||
- full_name
|
||||
- email
|
||||
- phone
|
||||
- telegram
|
||||
properties:
|
||||
invitation_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Invitation whose acceptance created the grant.
|
||||
grant_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Grant that allows the read.
|
||||
fields:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
uniqueItems: true
|
||||
description: Contact fields that the grant covers.
|
||||
items:
|
||||
$ref: "#/schemas/ContactFieldKind"
|
||||
granted_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
full_name:
|
||||
oneOf:
|
||||
- $ref: "#/schemas/ContactFullName"
|
||||
- type: "null"
|
||||
email:
|
||||
oneOf:
|
||||
- $ref: "./identity_schemas.yml#/schemas/EmailAddress"
|
||||
- type: "null"
|
||||
phone:
|
||||
oneOf:
|
||||
- $ref: "#/schemas/ContactPhoneNumber"
|
||||
- type: "null"
|
||||
telegram:
|
||||
oneOf:
|
||||
- $ref: "#/schemas/ContactTelegramUsername"
|
||||
- type: "null"
|
||||
@@ -0,0 +1,944 @@
|
||||
schemas:
|
||||
InvitationVersion:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
description: >-
|
||||
Version of an invitation. Creation makes version 1, and every committed
|
||||
change advances it by exactly one: a change of the draft, a send, the
|
||||
first view, an answer, a salary raise, a withdrawal, a cancellation,
|
||||
and an expiry made by the server. Every command carries the version
|
||||
the client read as `expected_version`; a stale value answers 412
|
||||
version_conflict and changes nothing.
|
||||
examples:
|
||||
- 3
|
||||
InvitationTermsVersion:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
description: >-
|
||||
Version of the terms of an invitation. The terms of a version are an
|
||||
immutable snapshot: every committed change of the terms, in the draft
|
||||
or by the one raise of the upper salary bound after sending, creates
|
||||
the next terms version, and a change of anything else keeps it. An
|
||||
acceptance names the terms version it accepts, and the consent C4 and
|
||||
the contact grant record it.
|
||||
examples:
|
||||
- 2
|
||||
InvitationState:
|
||||
type: string
|
||||
description: |-
|
||||
State of an invitation (PRD FR12). The internal sending step is never visible: a successful send already answers with `delivered`.
|
||||
|
||||
- draft: the organization prepares the terms. The candidate does not see the invitation.
|
||||
- delivered: the invitation is in the candidate's inbox and the response deadline runs.
|
||||
- viewed: the candidate opened the terms; ViewMyInvitation records it. The deadline is unchanged.
|
||||
- counter: planned; the candidate sent the one counter offer. No MVP operation produces it.
|
||||
- accepted: the candidate accepted the current terms version and gave the consent C4; the contact grant exists.
|
||||
- interview_scheduled, interviewed, negotiation, terms_agreed, no_deal: planned stages after an acceptance (interview and the sealed final of FR13). No MVP operation produces them.
|
||||
- declined: terminal; the candidate declined with a structured reason. No access arises.
|
||||
- expired: terminal; a server deadline passed, see `expiry_reason`. No access arises.
|
||||
- withdrawn: terminal; the organization withdrew the invitation. A grant that already exists is not revoked by it.
|
||||
- cancelled_by_candidate: terminal; the candidate cancelled the participation. The grant of this invitation is revoked.
|
||||
|
||||
Planned states are listed now so that generated clients accept them when their operations arrive. Adding another value is a contract change.
|
||||
enum:
|
||||
- draft
|
||||
- delivered
|
||||
- viewed
|
||||
- counter
|
||||
- accepted
|
||||
- interview_scheduled
|
||||
- interviewed
|
||||
- negotiation
|
||||
- terms_agreed
|
||||
- no_deal
|
||||
- declined
|
||||
- expired
|
||||
- withdrawn
|
||||
- cancelled_by_candidate
|
||||
InvitationExpiryReason:
|
||||
type: string
|
||||
description: |-
|
||||
Why an invitation expired. Set exactly when the state is `expired`, null otherwise.
|
||||
|
||||
- invitation_timeout: the candidate did not answer by `response_deadline_at`. No grant is created.
|
||||
- negotiation_timeout: planned; the sealed final of FR13 closed without both bids. No MVP operation produces it.
|
||||
enum:
|
||||
- invitation_timeout
|
||||
- negotiation_timeout
|
||||
InvitationResponsePeriod:
|
||||
type: integer
|
||||
format: int32
|
||||
enum:
|
||||
- 3
|
||||
- 7
|
||||
- 14
|
||||
description: >-
|
||||
Days the candidate has to answer, chosen by the organization in the
|
||||
draft from the product policy: 3, 7, or 14. The deadline starts at the
|
||||
first delivery and is never reset by an email, a view, or a counter
|
||||
offer.
|
||||
examples:
|
||||
- 7
|
||||
InvitationRoleTitle:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 200
|
||||
pattern: '^\S(?:.*\S)?$'
|
||||
description: >-
|
||||
Name of the offered role, for example "Middle Go developer in the
|
||||
payments team". It has no leading or trailing whitespace and no line
|
||||
breaks. Plain text; clients show it as text, never as HTML.
|
||||
InvitationTeamDescription:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 1000
|
||||
pattern: '\S'
|
||||
description: >-
|
||||
Description of the team the candidate would join, such as its size,
|
||||
roles, and way of working. It may contain line breaks and has at least
|
||||
one character that is not white space. Plain text; clients show it as
|
||||
text, never as HTML. It describes the job and must not contain
|
||||
personal data of employees or candidates.
|
||||
InvitationOfferType:
|
||||
type: string
|
||||
description: |-
|
||||
Type of the offer.
|
||||
|
||||
- full_time: employment with a full working week.
|
||||
- part_time: employment with a part-time working week.
|
||||
- contract: a fixed-term or project contract outside employment.
|
||||
- internship: an internship.
|
||||
|
||||
Adding a value is a contract change.
|
||||
enum:
|
||||
- full_time
|
||||
- part_time
|
||||
- contract
|
||||
- internship
|
||||
InvitationCommunicationChannel:
|
||||
type: string
|
||||
description: |-
|
||||
Channel through which the organization will contact the candidate after an acceptance.
|
||||
|
||||
- email: a letter to the email address the candidate disclosed.
|
||||
- phone: a call or a text to the phone number the candidate disclosed.
|
||||
- telegram: a message to the Telegram username the candidate disclosed.
|
||||
- video_call: an invitation to a video call, sent through one of the disclosed contacts.
|
||||
|
||||
The channel describes the organization's plan; the candidate decides which contacts to disclose, and the server never requires that the disclosed fields include the channel.
|
||||
enum:
|
||||
- email
|
||||
- phone
|
||||
- telegram
|
||||
- video_call
|
||||
InvitationCommunicationMethod:
|
||||
type: object
|
||||
description: >-
|
||||
How the organization will contact the candidate after an acceptance.
|
||||
It is part of the terms, so the candidate sees it before choosing
|
||||
which contacts to disclose. An invitation without it cannot exist,
|
||||
because the terms require it.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- channel
|
||||
- details
|
||||
properties:
|
||||
channel:
|
||||
$ref: "#/schemas/InvitationCommunicationChannel"
|
||||
details:
|
||||
description: >-
|
||||
Optional short note, for example the first step or the expected
|
||||
time of the first contact, or null. Plain text without line
|
||||
breaks; it never contains a link or a contact of an employee.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/InvitationCommunicationNote"
|
||||
- type: "null"
|
||||
InvitationCommunicationNote:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 300
|
||||
pattern: '^\S(?:.*\S)?$'
|
||||
description: >-
|
||||
Short note on the communication method, for example "A 30-minute call
|
||||
with the team lead within three working days". It has no leading or
|
||||
trailing whitespace and no line breaks. Plain text; clients show it as
|
||||
text, never as HTML.
|
||||
InvitationPackageItemText:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 300
|
||||
pattern: '^\S(?:.*\S)?$'
|
||||
description: >-
|
||||
Short description of a condition, for example "Quarterly bonus up to
|
||||
20% of the salary". It has no leading or trailing whitespace and no
|
||||
line breaks. Plain text; clients show it as text, never as HTML.
|
||||
InvitationPackageItemProvided:
|
||||
type: object
|
||||
description: The condition is part of the offer, with its description.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
- description
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum:
|
||||
- provided
|
||||
description:
|
||||
$ref: "#/schemas/InvitationPackageItemText"
|
||||
InvitationPackageItemNotProvided:
|
||||
type: object
|
||||
description: >-
|
||||
The organization states explicitly that the offer does not include the
|
||||
condition ("Не предусмотрено" in the interface). It has no
|
||||
description.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum:
|
||||
- not_provided
|
||||
InvitationPackageItem:
|
||||
description: >-
|
||||
One required condition of the package, selected by `status`:
|
||||
`provided` with a description, or `not_provided` without one. Not
|
||||
providing a condition is an explicit choice: the field is required in
|
||||
the package, so an absent field fails validation instead of meaning
|
||||
"not provided": it answers 400 `required` with its pointer, such as
|
||||
`/terms/package/training`. A `provided` item without a description
|
||||
answers `required` with the pointer of the description, and a
|
||||
`not_provided` item with a description answers `invalid` with the
|
||||
pointer of the item. ogen selects the variant by the value of
|
||||
`status`.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/InvitationPackageItemProvided"
|
||||
- $ref: "#/schemas/InvitationPackageItemNotProvided"
|
||||
InvitationPackage:
|
||||
type: object
|
||||
description: >-
|
||||
Required section of the package (PRD FR12): the bonus, the equipment,
|
||||
the training, and the voluntary health insurance (ДМС). Every field is
|
||||
required and is either provided with a description or explicitly not
|
||||
provided. The work format of the package is the required
|
||||
`work_formats` term, which has no "not provided" variant. Adding a
|
||||
required condition is a breaking change; an optional one is additive.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- bonus
|
||||
- equipment
|
||||
- training
|
||||
- health_insurance
|
||||
properties:
|
||||
bonus:
|
||||
$ref: "#/schemas/InvitationPackageItem"
|
||||
equipment:
|
||||
$ref: "#/schemas/InvitationPackageItem"
|
||||
training:
|
||||
$ref: "#/schemas/InvitationPackageItem"
|
||||
health_insurance:
|
||||
$ref: "#/schemas/InvitationPackageItem"
|
||||
InvitationTerms:
|
||||
type: object
|
||||
description: >-
|
||||
Terms of an invitation: everything the candidate sees before deciding
|
||||
and before any contact is disclosed. The same schema is the request
|
||||
field of a draft and the stored snapshot of a terms version, so a
|
||||
response can be sent back unchanged. Every field is required; a field
|
||||
that may have no value says so with an explicit variant (`location`
|
||||
null for a remote role, a package item `not_provided`). The terms never
|
||||
contain data of the candidate: no contact, no salary minimum, and no
|
||||
indicator derived from it. The server checks the cross-field rules
|
||||
after the schema and answers 400 validation_failed with the pointer of
|
||||
the field: the salary rules of SalaryRange with `/terms/salary/salary_to`,
|
||||
a missing place of work for the `office` or `hybrid` format with
|
||||
`/terms/location`, and a repeated technology in `tech_stack` with the
|
||||
pointer of the later item.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- role_title
|
||||
- specialization
|
||||
- grade
|
||||
- offer_type
|
||||
- tasks
|
||||
- team
|
||||
- tech_stack
|
||||
- work_formats
|
||||
- location
|
||||
- communication_method
|
||||
- salary
|
||||
- package
|
||||
properties:
|
||||
role_title:
|
||||
$ref: "#/schemas/InvitationRoleTitle"
|
||||
specialization:
|
||||
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
|
||||
grade:
|
||||
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
|
||||
offer_type:
|
||||
$ref: "#/schemas/InvitationOfferType"
|
||||
tasks:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 20
|
||||
description: Work tasks of the role in the order given.
|
||||
items:
|
||||
$ref: "./need_schemas.yml#/schemas/NeedTaskText"
|
||||
team:
|
||||
$ref: "#/schemas/InvitationTeamDescription"
|
||||
tech_stack:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 30
|
||||
uniqueItems: true
|
||||
description: >-
|
||||
Technologies of the role. The server compares names without regard
|
||||
to letter case.
|
||||
items:
|
||||
$ref: "./need_schemas.yml#/schemas/SkillName"
|
||||
work_formats:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
uniqueItems: true
|
||||
description: >-
|
||||
Work formats the organization offers; the candidate may choose any
|
||||
of them.
|
||||
items:
|
||||
$ref: "./questionnaire_schemas.yml#/schemas/WorkFormat"
|
||||
location:
|
||||
description: >-
|
||||
Place of work for the `office` or `hybrid` format, or null when
|
||||
the only format is `remote`. It is required with either of those
|
||||
formats.
|
||||
oneOf:
|
||||
- $ref: "./need_schemas.yml#/schemas/NeedLocationName"
|
||||
- type: "null"
|
||||
communication_method:
|
||||
$ref: "#/schemas/InvitationCommunicationMethod"
|
||||
salary:
|
||||
$ref: "./need_schemas.yml#/schemas/SalaryRange"
|
||||
package:
|
||||
$ref: "#/schemas/InvitationPackage"
|
||||
InvitationNeedReference:
|
||||
type: object
|
||||
description: >-
|
||||
Need of the same organization that the invitation was built from, with
|
||||
the requirements version used. A direct invitation has no need. The
|
||||
link is informational: the invitation keeps its own terms, which may
|
||||
differ from the need, and a later change of the need never changes
|
||||
them.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- need_id
|
||||
- requirements_version
|
||||
properties:
|
||||
need_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of a need of the organization in the path.
|
||||
requirements_version:
|
||||
description: >-
|
||||
`requirements_version` of the need that the invitation refers to;
|
||||
it must be a version that the need has had.
|
||||
allOf:
|
||||
- $ref: "./need_schemas.yml#/schemas/NeedVersion"
|
||||
InvitationSalaryFit:
|
||||
type: string
|
||||
description: |-
|
||||
Coarse indicator for the organization of how the salary range relates to the candidate's hidden minimum (PRD FR13). It is the only information about the minimum that the organization receives; the exact minimum never appears in any response, log, or problem. The server compares the upper bound `B` with the lowest minimum the candidate set for the offered work formats, in integer arithmetic and only in the same tax basis.
|
||||
|
||||
- within_range: the minimum is not above `B`.
|
||||
- up_to_10_percent_above: the minimum is above `B` by at most 10%, that is `10 * minimum <= 11 * B`.
|
||||
- above: the minimum is more than 10% above `B`.
|
||||
- withheld: the organization made five indicator-relevant settings within seven days, so the indicator is off for seven days from the fifth (the limit of TASK-211). The response to the fifth setting already carries `withheld`, and so does every draft and invitation of the organization, existing ones included, until the period ends.
|
||||
- not_available: the candidate set no minimum for the offered formats, or set it in the other tax basis.
|
||||
|
||||
Every change that can move this indicator is an indicator-relevant setting: the range set on creation, and in a draft a change of either bound, of the tax basis, or of `work_formats`, since the minimum depends on the format. Each counts against the organization-wide limit of three settings a day (429) and against the withheld counter of five settings within seven days, together with the ranges of needs. The one raise of the upper bound of a sent invitation counts against the withheld counter but not against the daily limit, because FR13 gives it its own once-only rule. Switching the tax basis turns `not_available` into a band or back and so tells the organization the basis of the minimum; this is accepted, and the switch counts against the limit like any other setting.
|
||||
|
||||
The server never rejects or changes a range because of the minimum: a rejection would itself reveal it.
|
||||
enum:
|
||||
- within_range
|
||||
- up_to_10_percent_above
|
||||
- above
|
||||
- withheld
|
||||
- not_available
|
||||
InvitationContactAccessState:
|
||||
type: string
|
||||
description: |-
|
||||
Whether the organization may read the candidate's contacts through GetOrganizationInvitationContacts now.
|
||||
|
||||
- not_granted: the candidate has not accepted this invitation, so no grant exists.
|
||||
- available: a grant from this invitation is active and the current consent and visibility allow the read.
|
||||
- closed: a grant from this invitation exists but does not allow the read now: it was revoked (the candidate revoked C4, cancelled the participation, or revoked the publication C2 or hid the profile after the acceptance), or it was created while the visibility already did not allow the read. The organization is not told which. A revoked grant never becomes `available` again; a grant blocked from the start becomes `available` once the candidate's visibility allows the read, which only follows the candidate's own choice to publish the profile or unhide it for the organization. Since every visibility change after a grant exists revokes the grant, a later toggle is never visible to the organization.
|
||||
enum:
|
||||
- not_granted
|
||||
- available
|
||||
- closed
|
||||
InvitationContactAccess:
|
||||
type: object
|
||||
description: >-
|
||||
Contact access of the organization through this invitation, without
|
||||
any contact value. The values come only from
|
||||
GetOrganizationInvitationContacts.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
- fields
|
||||
properties:
|
||||
status:
|
||||
$ref: "#/schemas/InvitationContactAccessState"
|
||||
fields:
|
||||
type: array
|
||||
maxItems: 4
|
||||
uniqueItems: true
|
||||
description: >-
|
||||
Kinds of contact that the read returns while `status` is
|
||||
`available`; empty otherwise.
|
||||
items:
|
||||
$ref: "./contact_grant_schemas.yml#/schemas/ContactFieldKind"
|
||||
InvitationOrganization:
|
||||
type: object
|
||||
description: >-
|
||||
Organization that sent the invitation, as the candidate sees it before
|
||||
deciding. The organization contract (TASK-077) adds the public card;
|
||||
this object only names it.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of the organization.
|
||||
name:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 200
|
||||
description: >-
|
||||
Public name of the organization. Plain text; clients show it as
|
||||
text, never as HTML.
|
||||
InvitationDeclineReason:
|
||||
type: string
|
||||
description: |-
|
||||
Structured reason of a decline. Every reason is neutral and none requires a comment.
|
||||
|
||||
- salary: the salary range does not fit.
|
||||
- tasks: the role or the tasks do not fit.
|
||||
- stack: the technologies do not fit.
|
||||
- work_format: the work format or the place of work does not fit.
|
||||
- package: the package does not fit.
|
||||
- company: the company or its domain does not fit.
|
||||
- not_looking: the candidate is not looking for a job now.
|
||||
- other_offer: the candidate accepted another offer.
|
||||
- other: another reason ("Другое"); a comment stays optional.
|
||||
|
||||
The organization never sees the reason of an individual decline: a reason such as `salary` would tell it that the hidden minimum is above the range. Reasons feed only the aggregates of FR12 with a minimum group size (planned). Adding a value is a contract change.
|
||||
enum:
|
||||
- salary
|
||||
- tasks
|
||||
- stack
|
||||
- work_format
|
||||
- package
|
||||
- company
|
||||
- not_looking
|
||||
- other_offer
|
||||
- other
|
||||
InvitationDeclineComment:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 500
|
||||
pattern: '\S'
|
||||
description: >-
|
||||
Optional comment of the candidate on the offer. It may contain line
|
||||
breaks and has at least one character that is not white space. It is
|
||||
never shown to the organization, never published, and never written to
|
||||
logs or notifications; only the candidate reads it back. Plain text;
|
||||
clients show it as text, never as HTML.
|
||||
InvitationDeclineRecord:
|
||||
type: object
|
||||
description: The candidate's own decline, as the candidate reads it back.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- reason
|
||||
- comment
|
||||
- declined_at
|
||||
properties:
|
||||
reason:
|
||||
$ref: "#/schemas/InvitationDeclineReason"
|
||||
comment:
|
||||
oneOf:
|
||||
- $ref: "#/schemas/InvitationDeclineComment"
|
||||
- type: "null"
|
||||
declined_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
OrganizationInvitation:
|
||||
type: object
|
||||
description: >-
|
||||
Invitation as the organization reads it: the candidate handle, the
|
||||
current terms version, the state, the coarse salary indicator, and the
|
||||
contact access without contact values. It never contains the
|
||||
candidate's name, email address, phone number, or other contact, the
|
||||
exact salary minimum, or the reason and comment of a decline.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- organization_id
|
||||
- candidate_handle
|
||||
- need
|
||||
- state
|
||||
- expiry_reason
|
||||
- version
|
||||
- terms_version
|
||||
- terms
|
||||
- response_period_days
|
||||
- response_deadline_at
|
||||
- salary_raise_used
|
||||
- salary_fit
|
||||
- contact_access
|
||||
- created_at
|
||||
- updated_at
|
||||
- delivered_at
|
||||
- viewed_at
|
||||
- responded_at
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of the invitation.
|
||||
organization_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: >-
|
||||
Organization that owns the invitation, equal to `org_id` of the
|
||||
path. It never changes.
|
||||
candidate_handle:
|
||||
$ref: "./common_schemas.yml#/schemas/CandidateHandle"
|
||||
need:
|
||||
description: Need the invitation was built from, or null for a direct invitation.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/InvitationNeedReference"
|
||||
- type: "null"
|
||||
state:
|
||||
$ref: "#/schemas/InvitationState"
|
||||
expiry_reason:
|
||||
description: Reason of an expiry, or null unless `state` is `expired`.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/InvitationExpiryReason"
|
||||
- type: "null"
|
||||
version:
|
||||
$ref: "#/schemas/InvitationVersion"
|
||||
terms_version:
|
||||
$ref: "#/schemas/InvitationTermsVersion"
|
||||
terms:
|
||||
$ref: "#/schemas/InvitationTerms"
|
||||
response_period_days:
|
||||
$ref: "#/schemas/InvitationResponsePeriod"
|
||||
response_deadline_at:
|
||||
description: >-
|
||||
Moment when the candidate's time to answer ends, set at the first
|
||||
delivery to `delivered_at` plus `response_period_days`, or null for
|
||||
a draft. A command received at this moment or later is late. After
|
||||
an acceptance the deadline no longer applies.
|
||||
oneOf:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
salary_raise_used:
|
||||
type: boolean
|
||||
description: >-
|
||||
Whether the one raise of the upper salary bound after sending
|
||||
(PRD FR13) has been used. It counts the whole history of the
|
||||
invitation.
|
||||
salary_fit:
|
||||
$ref: "#/schemas/InvitationSalaryFit"
|
||||
contact_access:
|
||||
$ref: "#/schemas/InvitationContactAccess"
|
||||
created_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
updated_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
delivered_at:
|
||||
description: Moment of delivery to the candidate's inbox, or null for a draft.
|
||||
oneOf:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
viewed_at:
|
||||
description: Moment when the candidate first opened the terms, or null.
|
||||
oneOf:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
responded_at:
|
||||
description: Moment of the candidate's acceptance or decline, or null.
|
||||
oneOf:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
OrganizationInvitationSummary:
|
||||
type: object
|
||||
description: >-
|
||||
Invitation in the organization's list: its identity, state, versions,
|
||||
role, salary range, deadline, and contact access. Read the invitation
|
||||
for the full terms and the salary indicator.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- candidate_handle
|
||||
- need
|
||||
- state
|
||||
- expiry_reason
|
||||
- version
|
||||
- terms_version
|
||||
- role_title
|
||||
- salary
|
||||
- response_deadline_at
|
||||
- contact_access
|
||||
- created_at
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of the invitation.
|
||||
candidate_handle:
|
||||
$ref: "./common_schemas.yml#/schemas/CandidateHandle"
|
||||
need:
|
||||
oneOf:
|
||||
- $ref: "#/schemas/InvitationNeedReference"
|
||||
- type: "null"
|
||||
state:
|
||||
$ref: "#/schemas/InvitationState"
|
||||
expiry_reason:
|
||||
oneOf:
|
||||
- $ref: "#/schemas/InvitationExpiryReason"
|
||||
- type: "null"
|
||||
version:
|
||||
$ref: "#/schemas/InvitationVersion"
|
||||
terms_version:
|
||||
$ref: "#/schemas/InvitationTermsVersion"
|
||||
role_title:
|
||||
$ref: "#/schemas/InvitationRoleTitle"
|
||||
salary:
|
||||
$ref: "./need_schemas.yml#/schemas/SalaryRange"
|
||||
response_deadline_at:
|
||||
oneOf:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
contact_access:
|
||||
$ref: "#/schemas/InvitationContactAccess"
|
||||
created_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
updated_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
OrganizationInvitationList:
|
||||
type: object
|
||||
description: >-
|
||||
One page of the invitations of an organization, newest first by
|
||||
creation time.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- items
|
||||
- page
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
maxItems: 100
|
||||
description: Invitations of the page.
|
||||
items:
|
||||
$ref: "#/schemas/OrganizationInvitationSummary"
|
||||
page:
|
||||
$ref: "./common_schemas.yml#/schemas/PageInfo"
|
||||
OrganizationInvitationCreate:
|
||||
type: object
|
||||
description: >-
|
||||
New draft for one candidate. The candidate is named only by the
|
||||
handle from a search result of this organization, never by an email
|
||||
address, a phone number, or an account identifier. The terms are
|
||||
complete from the start, so a draft without the tax basis or the
|
||||
communication method cannot exist. Unknown fields are rejected, so a
|
||||
request cannot set the state, a version, a deadline, the salary
|
||||
indicator, contact access, or a candidate's minimum or contact.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- candidate_handle
|
||||
- terms
|
||||
properties:
|
||||
candidate_handle:
|
||||
$ref: "./common_schemas.yml#/schemas/CandidateHandle"
|
||||
need:
|
||||
description: >-
|
||||
Need of the organization the invitation is built from, or null or
|
||||
absent for a direct invitation.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/InvitationNeedReference"
|
||||
- type: "null"
|
||||
response_period_days:
|
||||
description: Days to answer; absent means 7, the default of the product policy.
|
||||
allOf:
|
||||
- $ref: "#/schemas/InvitationResponsePeriod"
|
||||
terms:
|
||||
$ref: "#/schemas/InvitationTerms"
|
||||
OrganizationInvitationUpdate:
|
||||
type: object
|
||||
description: >-
|
||||
Change of a draft over the version the client read. Each field present
|
||||
replaces that field as a whole and an absent field stays unchanged;
|
||||
`terms` is always replaced completely, never merged, and a change of
|
||||
the terms creates the next terms version. `need` sent as null unlinks
|
||||
the need. The candidate cannot change: a draft for another candidate
|
||||
is a new draft. Unknown fields are rejected.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- expected_version
|
||||
properties:
|
||||
expected_version:
|
||||
$ref: "#/schemas/InvitationVersion"
|
||||
need:
|
||||
oneOf:
|
||||
- $ref: "#/schemas/InvitationNeedReference"
|
||||
- type: "null"
|
||||
response_period_days:
|
||||
$ref: "#/schemas/InvitationResponsePeriod"
|
||||
terms:
|
||||
$ref: "#/schemas/InvitationTerms"
|
||||
InvitationCommand:
|
||||
type: object
|
||||
description: >-
|
||||
Command without parameters over the invitation version the client
|
||||
read: send, withdraw, or cancel. Unknown fields are rejected.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- expected_version
|
||||
properties:
|
||||
expected_version:
|
||||
$ref: "#/schemas/InvitationVersion"
|
||||
InvitationSalaryRaise:
|
||||
type: object
|
||||
description: >-
|
||||
The one raise of the upper salary bound of a sent invitation (PRD
|
||||
FR13). Only `salary_to` changes; the lower bound, the currency, the
|
||||
period, and the tax basis stay fixed. Unknown fields are rejected, so
|
||||
the request cannot lower the lower bound or change the basis.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- expected_version
|
||||
- salary_to
|
||||
properties:
|
||||
expected_version:
|
||||
$ref: "#/schemas/InvitationVersion"
|
||||
salary_to:
|
||||
description: >-
|
||||
New upper bound, above the current one, with a width of the range
|
||||
from 10% to 40% of its midpoint.
|
||||
allOf:
|
||||
- $ref: "./need_schemas.yml#/schemas/RubAmount"
|
||||
CandidateInvitation:
|
||||
type: object
|
||||
description: >-
|
||||
Invitation as the addressed candidate reads it: the organization, the
|
||||
current terms with their version, the state and the deadline, the
|
||||
text and the choice of the consent C4 while an acceptance is
|
||||
possible, the candidate's own decline, and the contact grant that the
|
||||
acceptance created. It has no candidate handle, no need, no salary
|
||||
indicator, and no contact value: the candidate's own contacts and
|
||||
salary minimum stay in the profile.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- organization
|
||||
- state
|
||||
- expiry_reason
|
||||
- version
|
||||
- terms_version
|
||||
- terms
|
||||
- response_deadline_at
|
||||
- delivered_at
|
||||
- viewed_at
|
||||
- responded_at
|
||||
- updated_at
|
||||
- contact_consent
|
||||
- decline
|
||||
- contact_grant
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of the invitation.
|
||||
organization:
|
||||
$ref: "#/schemas/InvitationOrganization"
|
||||
state:
|
||||
$ref: "#/schemas/InvitationState"
|
||||
expiry_reason:
|
||||
oneOf:
|
||||
- $ref: "#/schemas/InvitationExpiryReason"
|
||||
- type: "null"
|
||||
version:
|
||||
$ref: "#/schemas/InvitationVersion"
|
||||
terms_version:
|
||||
$ref: "#/schemas/InvitationTermsVersion"
|
||||
terms:
|
||||
$ref: "#/schemas/InvitationTerms"
|
||||
response_deadline_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
delivered_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
viewed_at:
|
||||
description: >-
|
||||
Moment of the first view recorded by ViewMyInvitation, or null
|
||||
when the candidate has not opened the terms.
|
||||
oneOf:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
responded_at:
|
||||
oneOf:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
updated_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
contact_consent:
|
||||
description: >-
|
||||
Text and choice of the consent C4 for an acceptance, or null when
|
||||
an acceptance is impossible now: the state does not allow it, the
|
||||
deadline has passed, or the profile holds no contact to disclose.
|
||||
In the last case the client tells the candidate to add a contact
|
||||
to the profile first, because a grant must cover at least one
|
||||
field.
|
||||
oneOf:
|
||||
- $ref: "./contact_grant_schemas.yml#/schemas/ContactConsentOffer"
|
||||
- type: "null"
|
||||
decline:
|
||||
description: The candidate's decline, or null unless `state` is `declined`.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/InvitationDeclineRecord"
|
||||
- type: "null"
|
||||
contact_grant:
|
||||
description: >-
|
||||
Contact grant that the acceptance of this invitation created, or
|
||||
null when the invitation was never accepted. It stays after a
|
||||
revocation, with its status and reason.
|
||||
oneOf:
|
||||
- $ref: "./contact_grant_schemas.yml#/schemas/ContactGrant"
|
||||
- type: "null"
|
||||
CandidateInvitationSummary:
|
||||
type: object
|
||||
description: >-
|
||||
Invitation in the candidate's inbox: the organization, the state, the
|
||||
versions, the role, the salary range, and the deadline. Listing never
|
||||
records a view; GetMyInvitation returns the full terms, and
|
||||
ViewMyInvitation records the view.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- organization
|
||||
- state
|
||||
- expiry_reason
|
||||
- version
|
||||
- terms_version
|
||||
- role_title
|
||||
- salary
|
||||
- work_formats
|
||||
- response_deadline_at
|
||||
- delivered_at
|
||||
- viewed_at
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of the invitation.
|
||||
organization:
|
||||
$ref: "#/schemas/InvitationOrganization"
|
||||
state:
|
||||
$ref: "#/schemas/InvitationState"
|
||||
expiry_reason:
|
||||
oneOf:
|
||||
- $ref: "#/schemas/InvitationExpiryReason"
|
||||
- type: "null"
|
||||
version:
|
||||
$ref: "#/schemas/InvitationVersion"
|
||||
terms_version:
|
||||
$ref: "#/schemas/InvitationTermsVersion"
|
||||
role_title:
|
||||
$ref: "#/schemas/InvitationRoleTitle"
|
||||
salary:
|
||||
$ref: "./need_schemas.yml#/schemas/SalaryRange"
|
||||
work_formats:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
uniqueItems: true
|
||||
items:
|
||||
$ref: "./questionnaire_schemas.yml#/schemas/WorkFormat"
|
||||
response_deadline_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
delivered_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
viewed_at:
|
||||
oneOf:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
updated_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
CandidateInvitationList:
|
||||
type: object
|
||||
description: >-
|
||||
One page of the candidate's invitations, newest first by delivery
|
||||
time.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- items
|
||||
- page
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
maxItems: 100
|
||||
description: Invitations of the page.
|
||||
items:
|
||||
$ref: "#/schemas/CandidateInvitationSummary"
|
||||
page:
|
||||
$ref: "./common_schemas.yml#/schemas/PageInfo"
|
||||
InvitationAcceptance:
|
||||
type: object
|
||||
description: >-
|
||||
Acceptance of the current terms with the consent C4. The client sends
|
||||
the `version` and the `terms_version` it read and the contact fields
|
||||
the candidate selected; nothing is preselected or defaulted. Unknown
|
||||
fields are rejected, so a request cannot carry contact values, a
|
||||
grant, or another consent.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- expected_version
|
||||
- terms_version
|
||||
- consent_c4
|
||||
properties:
|
||||
expected_version:
|
||||
$ref: "#/schemas/InvitationVersion"
|
||||
terms_version:
|
||||
description: >-
|
||||
Terms version that the candidate read and accepts. A version that
|
||||
is not the current one answers 412 version_conflict.
|
||||
allOf:
|
||||
- $ref: "#/schemas/InvitationTermsVersion"
|
||||
consent_c4:
|
||||
$ref: "./contact_grant_schemas.yml#/schemas/ContactConsentAcceptance"
|
||||
InvitationDeclineRequest:
|
||||
type: object
|
||||
description: >-
|
||||
Structured decline: a reason and an optional comment. Unknown fields
|
||||
are rejected.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- expected_version
|
||||
- reason
|
||||
properties:
|
||||
expected_version:
|
||||
$ref: "#/schemas/InvitationVersion"
|
||||
reason:
|
||||
$ref: "#/schemas/InvitationDeclineReason"
|
||||
comment:
|
||||
description: Optional comment for any reason, including `other`; absent or null means none.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/InvitationDeclineComment"
|
||||
- type: "null"
|
||||
@@ -55,7 +55,7 @@ schemas:
|
||||
|
||||
- assessment_attempt: an assessment attempt of the caller.
|
||||
- organization: an organization that the caller can see.
|
||||
- invitation: an invitation addressed to the caller. Invitations are not in the contract yet; until they are, every invitation reference answers 404 not_found.
|
||||
- invitation: an invitation addressed to the caller. Invitations are in the contract (TASK-196) but not implemented yet; until they are, every invitation reference answers 404 not_found.
|
||||
- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.
|
||||
enum:
|
||||
- assessment_attempt
|
||||
|
||||
+3107
-25
File diff suppressed because it is too large.
Load diff
@@ -32,6 +32,14 @@ tags:
|
||||
state and provenance, immutable versions, readiness, and category
|
||||
recommendations. Access comes only from an active membership in the
|
||||
organization; a need never requires a vacancy.
|
||||
- name: invitation
|
||||
description: >-
|
||||
Invitations from an organization to one candidate: drafts with
|
||||
complete terms, immutable terms versions, sending, the candidate's
|
||||
inbox, acceptance with the consent C4, structured declines,
|
||||
withdrawal and cancellation, and the contact grant. Contacts are
|
||||
readable only through an active grant, in a response separate from
|
||||
the terms.
|
||||
- name: support
|
||||
description: >-
|
||||
Support cases of the current account: questions, complaints, appeals
|
||||
@@ -80,6 +88,30 @@ paths:
|
||||
$ref: ./routes/organization_needs.yml
|
||||
/api/v1/organizations/{org_id}/needs/{need_id}:
|
||||
$ref: ./routes/organization_need.yml
|
||||
/api/v1/organizations/{org_id}/invitations:
|
||||
$ref: ./routes/organization_invitations.yml
|
||||
/api/v1/organizations/{org_id}/invitations/{invitation_id}:
|
||||
$ref: ./routes/organization_invitation.yml
|
||||
/api/v1/organizations/{org_id}/invitations/{invitation_id}/send:
|
||||
$ref: ./routes/organization_invitation_send.yml
|
||||
/api/v1/organizations/{org_id}/invitations/{invitation_id}/salary-raise:
|
||||
$ref: ./routes/organization_invitation_salary_raise.yml
|
||||
/api/v1/organizations/{org_id}/invitations/{invitation_id}/withdraw:
|
||||
$ref: ./routes/organization_invitation_withdraw.yml
|
||||
/api/v1/organizations/{org_id}/invitations/{invitation_id}/contacts:
|
||||
$ref: ./routes/organization_invitation_contacts.yml
|
||||
/api/v1/me/invitations:
|
||||
$ref: ./routes/candidate_invitations.yml
|
||||
/api/v1/me/invitations/{invitation_id}:
|
||||
$ref: ./routes/candidate_invitation.yml
|
||||
/api/v1/me/invitations/{invitation_id}/view:
|
||||
$ref: ./routes/candidate_invitation_view.yml
|
||||
/api/v1/me/invitations/{invitation_id}/accept:
|
||||
$ref: ./routes/candidate_invitation_accept.yml
|
||||
/api/v1/me/invitations/{invitation_id}/decline:
|
||||
$ref: ./routes/candidate_invitation_decline.yml
|
||||
/api/v1/me/invitations/{invitation_id}/cancel:
|
||||
$ref: ./routes/candidate_invitation_cancel.yml
|
||||
/api/v1/me/support-cases:
|
||||
$ref: ./routes/support_cases.yml
|
||||
/api/v1/me/support-cases/{case_id}:
|
||||
@@ -446,6 +478,106 @@ components:
|
||||
$ref: ./components/schemas.yml#/SupportCaseSummary
|
||||
SupportCaseList:
|
||||
$ref: ./components/schemas.yml#/SupportCaseList
|
||||
InvitationVersion:
|
||||
$ref: ./components/schemas.yml#/InvitationVersion
|
||||
InvitationTermsVersion:
|
||||
$ref: ./components/schemas.yml#/InvitationTermsVersion
|
||||
InvitationState:
|
||||
$ref: ./components/schemas.yml#/InvitationState
|
||||
InvitationExpiryReason:
|
||||
$ref: ./components/schemas.yml#/InvitationExpiryReason
|
||||
InvitationResponsePeriod:
|
||||
$ref: ./components/schemas.yml#/InvitationResponsePeriod
|
||||
CandidateHandle:
|
||||
$ref: ./components/schemas.yml#/CandidateHandle
|
||||
InvitationRoleTitle:
|
||||
$ref: ./components/schemas.yml#/InvitationRoleTitle
|
||||
InvitationTeamDescription:
|
||||
$ref: ./components/schemas.yml#/InvitationTeamDescription
|
||||
InvitationOfferType:
|
||||
$ref: ./components/schemas.yml#/InvitationOfferType
|
||||
InvitationCommunicationChannel:
|
||||
$ref: ./components/schemas.yml#/InvitationCommunicationChannel
|
||||
InvitationCommunicationMethod:
|
||||
$ref: ./components/schemas.yml#/InvitationCommunicationMethod
|
||||
InvitationCommunicationNote:
|
||||
$ref: ./components/schemas.yml#/InvitationCommunicationNote
|
||||
InvitationPackageItemText:
|
||||
$ref: ./components/schemas.yml#/InvitationPackageItemText
|
||||
InvitationPackageItemProvided:
|
||||
$ref: ./components/schemas.yml#/InvitationPackageItemProvided
|
||||
InvitationPackageItemNotProvided:
|
||||
$ref: ./components/schemas.yml#/InvitationPackageItemNotProvided
|
||||
InvitationPackageItem:
|
||||
$ref: ./components/schemas.yml#/InvitationPackageItem
|
||||
InvitationPackage:
|
||||
$ref: ./components/schemas.yml#/InvitationPackage
|
||||
InvitationTerms:
|
||||
$ref: ./components/schemas.yml#/InvitationTerms
|
||||
InvitationNeedReference:
|
||||
$ref: ./components/schemas.yml#/InvitationNeedReference
|
||||
InvitationSalaryFit:
|
||||
$ref: ./components/schemas.yml#/InvitationSalaryFit
|
||||
InvitationContactAccessState:
|
||||
$ref: ./components/schemas.yml#/InvitationContactAccessState
|
||||
InvitationContactAccess:
|
||||
$ref: ./components/schemas.yml#/InvitationContactAccess
|
||||
InvitationOrganization:
|
||||
$ref: ./components/schemas.yml#/InvitationOrganization
|
||||
InvitationDeclineReason:
|
||||
$ref: ./components/schemas.yml#/InvitationDeclineReason
|
||||
InvitationDeclineComment:
|
||||
$ref: ./components/schemas.yml#/InvitationDeclineComment
|
||||
InvitationDeclineRecord:
|
||||
$ref: ./components/schemas.yml#/InvitationDeclineRecord
|
||||
OrganizationInvitation:
|
||||
$ref: ./components/schemas.yml#/OrganizationInvitation
|
||||
OrganizationInvitationSummary:
|
||||
$ref: ./components/schemas.yml#/OrganizationInvitationSummary
|
||||
OrganizationInvitationList:
|
||||
$ref: ./components/schemas.yml#/OrganizationInvitationList
|
||||
OrganizationInvitationCreate:
|
||||
$ref: ./components/schemas.yml#/OrganizationInvitationCreate
|
||||
OrganizationInvitationUpdate:
|
||||
$ref: ./components/schemas.yml#/OrganizationInvitationUpdate
|
||||
InvitationCommand:
|
||||
$ref: ./components/schemas.yml#/InvitationCommand
|
||||
InvitationSalaryRaise:
|
||||
$ref: ./components/schemas.yml#/InvitationSalaryRaise
|
||||
CandidateInvitation:
|
||||
$ref: ./components/schemas.yml#/CandidateInvitation
|
||||
CandidateInvitationSummary:
|
||||
$ref: ./components/schemas.yml#/CandidateInvitationSummary
|
||||
CandidateInvitationList:
|
||||
$ref: ./components/schemas.yml#/CandidateInvitationList
|
||||
InvitationAcceptance:
|
||||
$ref: ./components/schemas.yml#/InvitationAcceptance
|
||||
InvitationDeclineRequest:
|
||||
$ref: ./components/schemas.yml#/InvitationDeclineRequest
|
||||
ContactFieldKind:
|
||||
$ref: ./components/schemas.yml#/ContactFieldKind
|
||||
ContactConsentText:
|
||||
$ref: ./components/schemas.yml#/ContactConsentText
|
||||
ContactConsentOffer:
|
||||
$ref: ./components/schemas.yml#/ContactConsentOffer
|
||||
ContactConsentAcceptance:
|
||||
$ref: ./components/schemas.yml#/ContactConsentAcceptance
|
||||
ContactGrantState:
|
||||
$ref: ./components/schemas.yml#/ContactGrantState
|
||||
ContactAccessBlock:
|
||||
$ref: ./components/schemas.yml#/ContactAccessBlock
|
||||
ContactRevocationReason:
|
||||
$ref: ./components/schemas.yml#/ContactRevocationReason
|
||||
ContactGrant:
|
||||
$ref: ./components/schemas.yml#/ContactGrant
|
||||
ContactPhoneNumber:
|
||||
$ref: ./components/schemas.yml#/ContactPhoneNumber
|
||||
ContactTelegramUsername:
|
||||
$ref: ./components/schemas.yml#/ContactTelegramUsername
|
||||
ContactFullName:
|
||||
$ref: ./components/schemas.yml#/ContactFullName
|
||||
ContactDisclosure:
|
||||
$ref: ./components/schemas.yml#/ContactDisclosure
|
||||
parameters:
|
||||
IdempotencyKey:
|
||||
$ref: ./components/parameters.yml#/IdempotencyKey
|
||||
@@ -463,6 +595,10 @@ components:
|
||||
$ref: ./components/parameters.yml#/NeedId
|
||||
SupportCaseId:
|
||||
$ref: ./components/parameters.yml#/SupportCaseId
|
||||
InvitationId:
|
||||
$ref: ./components/parameters.yml#/InvitationId
|
||||
MyInvitationId:
|
||||
$ref: ./components/parameters.yml#/MyInvitationId
|
||||
headers:
|
||||
ETag:
|
||||
$ref: ./components/headers.yml#/ETag
|
||||
@@ -539,6 +675,14 @@ components:
|
||||
$ref: ./components/responses.yml#/SupportCaseValidationFailed
|
||||
SupportCaseCreateConflict:
|
||||
$ref: ./components/responses.yml#/SupportCaseCreateConflict
|
||||
InvitationValidationFailed:
|
||||
$ref: ./components/responses.yml#/InvitationValidationFailed
|
||||
InvitationAcceptValidationFailed:
|
||||
$ref: ./components/responses.yml#/InvitationAcceptValidationFailed
|
||||
InvitationVersionConflict:
|
||||
$ref: ./components/responses.yml#/InvitationVersionConflict
|
||||
InvitationCommandConflict:
|
||||
$ref: ./components/responses.yml#/InvitationCommandConflict
|
||||
securitySchemes:
|
||||
sessionCookie:
|
||||
type: apiKey
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
get:
|
||||
operationId: GetMyInvitation
|
||||
summary: Open the terms of an invitation addressed to the current candidate.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate account. The candidate comes from the session; the invitation must be addressed to this candidate.
|
||||
|
||||
Returns the organization, the current terms version with the full terms, the state, and the deadline. While an acceptance is possible (`delivered` or `viewed` before the deadline), `contact_consent` holds the published text of the consent C4 for this organization and the kinds of contact that the profile holds, with nothing preselected; otherwise it is null. It is null as well when the profile holds no contact: a grant must cover at least one field, so the client asks the candidate to add a contact to the profile before accepting. After an answer the response holds the candidate's own decline or the contact grant that the acceptance created, with the selected kinds, its status, and whether the organization can read it now (`readable`, with `blocked_by` `visibility` when the profile is not published or is hidden from the organization), never contact values. The response never carries the candidate's handle, the need of the organization, the salary indicator of the organization, or any contact or salary minimum of the candidate.
|
||||
|
||||
Reading has no side effect on the invitation: it never records a view. The client records that the candidate opened the terms with ViewMyInvitation, an explicit command, so a prefetch, a retry, or a cache refresh never changes the state that the organization sees. The only change a read can cause is the due expiry: a read at the deadline or later first applies the server transition to `expired` with `invitation_timeout`, which would happen without the read as well, and the response shows it. Reading earlier terms versions is planned as a separate operation.
|
||||
|
||||
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden; a draft, an invitation addressed to another candidate, and an unknown identifier all answer 404 not_found, so identifiers cannot be enumerated. An `invitation_id` that is not a UUID answers 400 validation_failed with the path pointer.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
tags:
|
||||
- invitation
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/MyInvitationId
|
||||
responses:
|
||||
"200":
|
||||
description: The invitation in its current state.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/CandidateInvitation
|
||||
examples:
|
||||
delivered:
|
||||
$ref: ../components/examples.yml#/CandidateInvitationDelivered
|
||||
viewed:
|
||||
$ref: ../components/examples.yml#/CandidateInvitationViewed
|
||||
accepted:
|
||||
$ref: ../components/examples.yml#/CandidateInvitationAccepted
|
||||
declined:
|
||||
$ref: ../components/examples.yml#/CandidateInvitationDeclined
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/ValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/Forbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -0,0 +1,69 @@
|
||||
post:
|
||||
operationId: AcceptMyInvitation
|
||||
summary: Accept the current terms and disclose the selected contacts.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The candidate comes from the session.
|
||||
|
||||
Only an acceptance of the current terms version with the consent C4 creates access to contacts (PRD FR12). The body names the `terms_version` the candidate read and accepts, the `expected_version` of the invitation, and `consent_c4`: the C4 text version that the candidate saw, `accepted: true`, and the contact fields the candidate selected. At least one field is required and nothing is preselected or defaulted, so a grant never covers a field the candidate did not choose. The fields come only from the candidate's profile; the request never carries contact values.
|
||||
|
||||
Allowed in `delivered` and `viewed` before `response_deadline_at`; accepting directly from `delivered` is allowed, as in the PRD FR12 transition table. In one transaction the server moves the invitation to `accepted`, records the consent C4 in the consent ledger with the organization, the fields, the invitation, the terms version, and the text version and its hash (TASK-062), creates the contact grant for exactly those fields, and writes the audit event (TASK-201). The response is the invitation with `contact_grant`. The acceptance never publishes the profile (C2) and never bypasses a profile hidden from the organization: the grant alone does not guarantee a read, and the organization reads only while the visibility allows it.
|
||||
|
||||
412 or 409: a `terms_version` or `expected_version` that is not current answers 412 version_conflict, the repository status for a stale version, and records nothing; this is the stale terms case, for example after the organization raised the salary, and the client reads the invitation again and shows the new terms for a new decision. A state that does not allow an acceptance answers 409 state_conflict: `withdrawn`, `expired`, `declined`, `cancelled_by_candidate`, the planned `counter`, or a command received at the deadline or later, which is late. A terminal state and a passed deadline are checked before the versions: the server first applies the due expiry, and the client then gets 409 for a withdrawn, expired, or late invitation even when its versions are stale, so it shows the final state instead of rereading and retrying. TASK-197, TASK-201, and TASK-204 say 409 for stale terms; the repository rule keeps 412 for any stale version, so clients branch on `version_conflict` to reread and on `state_conflict` to show the final state.
|
||||
|
||||
Repeats return the same result: a retry with the same Idempotency-Key replays the stored response, and an acceptance of an invitation that is already `accepted` whose `terms_version` and set of fields equal those of its `contact_grant`, the terms version and fields that the candidate accepted, answers 200 with it even with a new key, an older `expected_version`, or a current `terms_version` that a later raise advanced; no second consent, grant, or audit event is created. A different terms version or field set on an accepted invitation answers 409 state_conflict; changing the disclosed fields is a matter of the consent operations (TASK-064). Of two concurrent acceptances only one makes the transition.
|
||||
|
||||
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), the Idempotency-Key (422, 409 idempotency_in_progress, replay), the invitation (404 not_found, after any due expiry), the repeat on an accepted invitation (200), a terminal state or a passed deadline (409 state_conflict, whatever the versions), the versions (412), any other state that does not allow an acceptance (409 state_conflict), then the consent rules (400 with the pointer `/consent_c4/text_version` for a text version that is not the published one, or `/consent_c4/fields/0` for a field that the profile does not hold). The schema rejects a missing `terms_version`, an empty or repeated field list, an unknown field kind, `accepted` other than true, and unknown fields such as `email` or `phone`. The general rate limit can answer 429 with Retry-After before any check. 404 and 409 state_conflict are stored under the key; 400, 412, and 429 are not.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
tags:
|
||||
- invitation
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/MyInvitationId
|
||||
- $ref: ../components/parameters.yml#/IdempotencyKey
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/InvitationAcceptance
|
||||
examples:
|
||||
email_only:
|
||||
$ref: ../components/examples.yml#/InvitationAcceptEmailOnly
|
||||
stale_terms:
|
||||
$ref: ../components/examples.yml#/InvitationAcceptStaleTerms
|
||||
responses:
|
||||
"200":
|
||||
description: >-
|
||||
The accepted invitation with the contact grant, or the same
|
||||
invitation when this acceptance was already made.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/CandidateInvitation
|
||||
examples:
|
||||
accepted:
|
||||
$ref: ../components/examples.yml#/CandidateInvitationAccepted
|
||||
visibility_blocked:
|
||||
$ref: ../components/examples.yml#/CandidateInvitationAcceptedVisibilityBlocked
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/InvitationAcceptValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
"409":
|
||||
$ref: ../components/responses.yml#/InvitationCommandConflict
|
||||
"412":
|
||||
$ref: ../components/responses.yml#/InvitationVersionConflict
|
||||
"422":
|
||||
$ref: ../components/responses.yml#/UnprocessableContent
|
||||
"429":
|
||||
$ref: ../components/responses.yml#/TooManyRequests
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -0,0 +1,63 @@
|
||||
post:
|
||||
operationId: CancelMyInvitation
|
||||
summary: Cancel the participation in an invitation and revoke its contact grant.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The candidate comes from the session.
|
||||
|
||||
Moves an unfinished invitation to the terminal state `cancelled_by_candidate` (PRD FR12): `delivered`, `viewed`, `accepted`, and the planned stages up to `negotiation`. The process closes. In the same transaction the server revokes the contact grant that the acceptance of this invitation created, with the reason `participation_cancelled`, so the next contact read of the organization answers 404. Grants of other invitations or applications stay; revoking the consent C4 for the organization as a whole, which closes all of them, belongs to the consent operations (TASK-064).
|
||||
|
||||
Cancel differs from decline and withdraw: a decline is the structured answer before an acceptance and counts as a response; a cancellation leaves the process at any unfinished stage, mostly after an acceptance, and carries no reason; a withdrawal is the organization's command and keeps the grant. Before an answer the client offers the decline.
|
||||
|
||||
Repeats return the same result: a retry with the same Idempotency-Key replays the stored response, and a cancellation of an invitation that is already `cancelled_by_candidate` answers 200 with it even with a new key or an older `expected_version`. A terminal state other than `cancelled_by_candidate` answers 409 state_conflict even with a stale `expected_version`; otherwise a stale `expected_version` answers 412 version_conflict. The deadline does not limit a cancellation.
|
||||
|
||||
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), the Idempotency-Key (422, 409 idempotency_in_progress, replay), the invitation (404 not_found, after any due expiry), the repeat on a cancelled invitation (200), a terminal state (409 state_conflict, whatever the version), then the version (412). The general rate limit can answer 429 with Retry-After before any check. 404 and 409 state_conflict are stored under the key; 400, 412, and 429 are not.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
tags:
|
||||
- invitation
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/MyInvitationId
|
||||
- $ref: ../components/parameters.yml#/IdempotencyKey
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/InvitationCommand
|
||||
examples:
|
||||
cancel:
|
||||
$ref: ../components/examples.yml#/InvitationCancelCommand
|
||||
responses:
|
||||
"200":
|
||||
description: >-
|
||||
The invitation in the state `cancelled_by_candidate` with its grant
|
||||
revoked.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/CandidateInvitation
|
||||
examples:
|
||||
cancelled:
|
||||
$ref: ../components/examples.yml#/CandidateInvitationCancelled
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/ValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
"409":
|
||||
$ref: ../components/responses.yml#/InvitationCommandConflict
|
||||
"412":
|
||||
$ref: ../components/responses.yml#/InvitationVersionConflict
|
||||
"422":
|
||||
$ref: ../components/responses.yml#/UnprocessableContent
|
||||
"429":
|
||||
$ref: ../components/responses.yml#/TooManyRequests
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -0,0 +1,65 @@
|
||||
post:
|
||||
operationId: DeclineMyInvitation
|
||||
summary: Decline an invitation with a structured reason.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The candidate comes from the session.
|
||||
|
||||
Allowed in `delivered`, `viewed`, and the planned `counter`, before `response_deadline_at`. Moves the invitation to the terminal state `declined` with the reason and the optional comment; no consent and no access arise (PRD FR12). A timely decline counts as an answer for the responsiveness metrics, not as a consent or a hire. The reason is one of InvitationDeclineReason, including the neutral `other`; no reason requires a comment.
|
||||
|
||||
Visibility: the organization sees only the state `declined` and `responded_at`. It never sees the reason or the comment of an individual decline, because a reason such as `salary` would tell it that the hidden minimum is above the range. Reasons feed only aggregates with a minimum group size (planned); the comment is never shown to the organization, published, logged, or sent in a notification. The candidate reads both back in `decline`. A new invitation of the same organization to this candidate is possible only after the 30-day pause.
|
||||
|
||||
Repeats return the same result: a retry with the same Idempotency-Key replays the stored response, and a decline of an invitation that is already `declined` with the same reason and comment answers 200 with it even with a new key or an older `expected_version`. A terminal state, another reason or comment on a declined invitation, and a command at the deadline or later answer 409 state_conflict even with a stale `expected_version`; otherwise a stale `expected_version` answers 412 version_conflict.
|
||||
|
||||
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), the Idempotency-Key (422, 409 idempotency_in_progress, replay), the invitation (404 not_found, after any due expiry), the repeat on a declined invitation (200), a terminal state or a passed deadline (409 state_conflict, whatever the version), the version (412), then any other state that does not allow a decline (409 state_conflict). The schema rejects an unknown reason, an empty comment or one of only white space, a comment over 500 characters, and unknown fields. The general rate limit can answer 429 with Retry-After before any check. 404 and 409 state_conflict are stored under the key; 400, 412, and 429 are not.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
tags:
|
||||
- invitation
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/MyInvitationId
|
||||
- $ref: ../components/parameters.yml#/IdempotencyKey
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/InvitationDeclineRequest
|
||||
examples:
|
||||
other_without_comment:
|
||||
$ref: ../components/examples.yml#/InvitationDeclineOther
|
||||
with_comment:
|
||||
$ref: ../components/examples.yml#/InvitationDeclineWithComment
|
||||
responses:
|
||||
"200":
|
||||
description: >-
|
||||
The declined invitation with the candidate's own reason, or the same
|
||||
invitation when this decline was already made.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/CandidateInvitation
|
||||
examples:
|
||||
declined:
|
||||
$ref: ../components/examples.yml#/CandidateInvitationDeclined
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/ValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
"409":
|
||||
$ref: ../components/responses.yml#/InvitationCommandConflict
|
||||
"412":
|
||||
$ref: ../components/responses.yml#/InvitationVersionConflict
|
||||
"422":
|
||||
$ref: ../components/responses.yml#/UnprocessableContent
|
||||
"429":
|
||||
$ref: ../components/responses.yml#/TooManyRequests
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -0,0 +1,47 @@
|
||||
post:
|
||||
operationId: ViewMyInvitation
|
||||
summary: Record that the current candidate opened the terms of an invitation.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The candidate comes from the session. The request has no body.
|
||||
|
||||
The view transition of PRD FR12 (TASK-200) is an explicit command, so reading the invitation with GetMyInvitation stays free of side effects. The client sends it when the candidate opens the terms screen. For a `delivered` invitation the server moves it to `viewed`, sets `viewed_at`, advances `version`, and keeps the deadline. In any other state, including `viewed`, `accepted`, and the terminal states, it changes nothing and answers 200 with the current invitation. A view never reopens, extends, or answers an invitation, and the organization sees only the state `viewed` and `viewed_at`.
|
||||
|
||||
The command is idempotent by its effect: the first view wins and every repeat returns the current invitation. It therefore needs no Idempotency-Key and no `expected_version`: a view must never fail because the invitation changed after the client read it, for example after a salary raise. A view at the deadline or later first applies the due expiry and answers 200 with `expired`.
|
||||
|
||||
The general rate limit can answer 429 with Retry-After before any check.
|
||||
|
||||
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a missing or wrong CSRF token or a disallowed Origin answers 403 csrf_check_failed; an employer account answers 403 forbidden; a draft, an invitation addressed to another candidate, and an unknown identifier all answer 404 not_found. An `invitation_id` that is not a UUID answers 400 validation_failed with the path pointer.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
tags:
|
||||
- invitation
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/MyInvitationId
|
||||
responses:
|
||||
"200":
|
||||
description: >-
|
||||
The invitation, now `viewed` when it was `delivered`, otherwise in
|
||||
its current state.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/CandidateInvitation
|
||||
examples:
|
||||
viewed:
|
||||
$ref: ../components/examples.yml#/CandidateInvitationViewed
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/ValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
"429":
|
||||
$ref: ../components/responses.yml#/TooManyRequests
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -0,0 +1,37 @@
|
||||
get:
|
||||
operationId: ListMyInvitations
|
||||
summary: List the invitations addressed to the current candidate.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate account. The candidate comes from the session, never from a request parameter. Returns a page of the candidate's inbox, newest first by delivery time with the identifier as the tie-breaker, with cursor pagination: every invitation that was delivered to this candidate, in any later state, including withdrawn and expired ones. Drafts and invitations addressed to other candidates are never listed.
|
||||
|
||||
A summary has the organization, the state, the versions, the role, the salary range, the work formats, and the deadline. Listing never records a view: the state `delivered` stays until ViewMyInvitation records that the candidate opened the terms. Responsiveness metrics of the organization and filters by state are planned and add fields or optional parameters.
|
||||
|
||||
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden. A malformed `limit` or `cursor` answers 400 validation_failed.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
tags:
|
||||
- invitation
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/PageLimit
|
||||
- $ref: ../components/parameters.yml#/PageCursor
|
||||
responses:
|
||||
"200":
|
||||
description: A page of the invitations of the current candidate.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/CandidateInvitationList
|
||||
examples:
|
||||
last_page:
|
||||
$ref: ../components/examples.yml#/CandidateInvitationListPage
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/ValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/Forbidden
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -0,0 +1,106 @@
|
||||
get:
|
||||
operationId: GetOrganizationInvitation
|
||||
summary: Read an invitation of an organization.
|
||||
description: |-
|
||||
Requires the session cookie of an employer account with an active membership in `org_id`. The organization and the role come from the server-side membership, never from the request. In the MVP only the owner of the organization reads invitations.
|
||||
|
||||
Returns the invitation with the current terms version, the state, the deadline, the coarse salary indicator `salary_fit`, and `contact_access`. The candidate appears only as the opaque `candidate_handle`: before and after an acceptance this response never carries the candidate's name, email address, phone number, or other contact, the exact salary minimum, or the reason and comment of a decline. Contact values come only from GetOrganizationInvitationContacts while `contact_access.status` is `available`. Reading earlier terms versions is planned as a separate operation.
|
||||
|
||||
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate account answers 403 forbidden; an account without an active membership in the organization, an unknown organization, an unknown invitation, and an invitation of another organization all answer 404 not_found, so identifiers cannot be probed; a member whose role does not allow reading the invitation answers 403 forbidden. An `org_id` or `invitation_id` that is not a UUID answers 400 validation_failed with the path pointer.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
tags:
|
||||
- invitation
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/OrganizationId
|
||||
- $ref: ../components/parameters.yml#/InvitationId
|
||||
responses:
|
||||
"200":
|
||||
description: The invitation in its current state.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/OrganizationInvitation
|
||||
examples:
|
||||
draft:
|
||||
$ref: ../components/examples.yml#/OrganizationInvitationDraft
|
||||
delivered:
|
||||
$ref: ../components/examples.yml#/OrganizationInvitationDelivered
|
||||
accepted:
|
||||
$ref: ../components/examples.yml#/OrganizationInvitationAccepted
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/ValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/Forbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
patch:
|
||||
operationId: UpdateOrganizationInvitation
|
||||
summary: Change the terms, the need link, or the response period of a draft.
|
||||
description: |-
|
||||
Requires the session cookie of an employer account with an active membership in `org_id`, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The body has no organization, membership, or role field. In the MVP only the owner of the organization changes drafts.
|
||||
|
||||
Only a `draft` can change; any other state answers 409 state_conflict. After sending, the only change of the terms is the one raise of the upper salary bound through RaiseOrganizationInvitationSalary. The candidate of a draft cannot change: a draft for another candidate is a new draft.
|
||||
|
||||
Merge rules: the body is `application/json` with explicit field replacement, not JSON Merge Patch. Each field present replaces that field as a whole and an absent field stays unchanged. `terms` is always sent complete and replaces the terms as a whole, with the same validation as on creation, so a package condition is never dropped by omission. `need` sent as null unlinks the need.
|
||||
|
||||
Versions: every committed change creates version `expected_version + 1`; a change of the terms also creates the next terms version, an immutable snapshot, and a change of anything else keeps the terms version. `expected_version` is the `version` the client read; when it is not current, the server answers 412 version_conflict and changes nothing, and the client reads the invitation again. The version travels in the body because the generated client cannot read the ETag response header yet. The operation needs no Idempotency-Key: a body that changes nothing when applied to the current version, such as a retry of a change that already succeeded, keeps the version and answers 200 with the current invitation even when `expected_version` is older.
|
||||
|
||||
Salary limit: every change that can move `salary_fit` is an indicator-relevant setting: a change of either salary bound, of the tax basis, or of `work_formats`, because the indicator compares with the candidate's minimum for the offered formats, and switching formats or the basis would otherwise probe the minimum for free. Such a change counts against the limit shared by the organization with needs and other drafts, at most three settings a day, and against the withheld counter, which withholds `salary_fit` for seven days from the fifth setting within seven days (PRD FR13, planned in TASK-211; see InvitationSalaryFit). Over the limit the server answers 429 with Retry-After and changes nothing. A change that keeps the range, the basis, and the formats does not count. The operation follows the convention of UpdateOrganizationNeed: no Idempotency-Key, and a body that changes nothing answers 200.
|
||||
|
||||
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for a candidate), membership (404 not_found) and role (403 forbidden), the invitation (404 not_found), a body that changes nothing (200), the version (412), the state (409 state_conflict), domain rules (400 with the pointers of CreateOrganizationInvitation), then the salary limit (429).
|
||||
security:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
tags:
|
||||
- invitation
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/OrganizationId
|
||||
- $ref: ../components/parameters.yml#/InvitationId
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/OrganizationInvitationUpdate
|
||||
examples:
|
||||
change_terms:
|
||||
$ref: ../components/examples.yml#/InvitationUpdateTerms
|
||||
responses:
|
||||
"200":
|
||||
description: >-
|
||||
The draft after the change, or the current draft when the body
|
||||
changes nothing.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/OrganizationInvitation
|
||||
examples:
|
||||
updated:
|
||||
$ref: ../components/examples.yml#/OrganizationInvitationDraftUpdated
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/InvitationValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
"409":
|
||||
$ref: ../components/responses.yml#/StateConflict
|
||||
"412":
|
||||
$ref: ../components/responses.yml#/InvitationVersionConflict
|
||||
"429":
|
||||
$ref: ../components/responses.yml#/TooManyRequests
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -0,0 +1,43 @@
|
||||
get:
|
||||
operationId: GetOrganizationInvitationContacts
|
||||
summary: Read the contacts that the candidate disclosed to the organization.
|
||||
description: |-
|
||||
Requires the session cookie of an employer account with an active membership in `org_id`. In the MVP only the owner of the organization reads contacts (TASK-202); the other roles of PRD FR07 are planned.
|
||||
|
||||
This is the only operation that returns contact values, and its response is separate from the terms and from the invitation. It answers only while a grant created by the acceptance of this invitation is active and the read is allowed now: on every request the server checks the membership, the consent C4 for this organization, the grant and its fields, and the current visibility of the profile (C2 and the organizations the candidate hid the profile from), with no cache in between, so a revocation closes the next read at once. The response holds exactly the fields that the grant covers; every other field is null. A grant of organization A never answers for organization B.
|
||||
|
||||
Without such a grant the contacts do not exist for the caller, and the operation answers 404 not_found, the same as for an unknown invitation: before an acceptance, after a decline or an expiry, after the candidate revoked C4 or cancelled the participation, after the candidate closed the visibility, and while a grant created when the profile was not published or was hidden from the organization stays blocked. The answer does not tell which applies; `contact_access` of GetOrganizationInvitation tells the organization whether access is `not_granted`, `available`, or `closed`, without the reason, and the candidate sees `readable` and `blocked_by` on the grant. Withdrawing the invitation keeps an existing grant. A later publication of the profile never reopens a closed grant; only a new explicit C4 creates a new one.
|
||||
|
||||
Every successful read is recorded in the access audit (planned in TASK-090 and TASK-202), and the response has `Cache-Control: no-store`.
|
||||
|
||||
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate account answers 403 forbidden; an account without an active membership in the organization, an unknown organization, an unknown invitation, an invitation of another organization, and an invitation without an active readable grant all answer 404 not_found; a member whose role does not allow reading contacts answers 403 forbidden. An `org_id` or `invitation_id` that is not a UUID answers 400 validation_failed with the path pointer.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
tags:
|
||||
- invitation
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/OrganizationId
|
||||
- $ref: ../components/parameters.yml#/InvitationId
|
||||
responses:
|
||||
"200":
|
||||
description: The contacts that the active grant of this invitation covers.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/ContactDisclosure
|
||||
examples:
|
||||
email_only:
|
||||
$ref: ../components/examples.yml#/InvitationContactsEmailOnly
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/ValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/Forbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -0,0 +1,65 @@
|
||||
post:
|
||||
operationId: RaiseOrganizationInvitationSalary
|
||||
summary: Raise the upper salary bound of a sent invitation once.
|
||||
description: |-
|
||||
Requires the session cookie of an employer account with an active membership in `org_id`, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. In the MVP only the owner of the organization changes invitations.
|
||||
|
||||
After sending, the salary base is fixed and the lower bound never decreases; the upper bound may be raised exactly once in the whole history of the invitation (PRD FR13). The body carries only the new `salary_to`, so the request cannot change the lower bound, the currency, the period, or the tax basis. The new bound must be above the current one and keep the width of the range from 10% to 40% of its midpoint, otherwise 400 validation_failed with the pointer `/salary_to`. The raise creates the next terms version with every other term unchanged and the next invitation version; the candidate sees the new terms, and an acceptance that names the previous terms version answers 412 version_conflict. The deadline does not change. The raise follows its own once-only rule and does not count against the organization-wide daily limit of three range settings, but it counts against the withheld counter of `salary_fit` (five settings within seven days), because it moves the upper bound that the indicator compares.
|
||||
|
||||
Allowed in `delivered`, `viewed`, and `accepted`, and in the planned states `counter`, `interview_scheduled`, `interviewed`, and `no_deal`, where FR13 lets a raise open an early repeated final. During `negotiation`, after `terms_agreed`, in a terminal state, in a `draft` (change the draft instead), and after the raise was used, the server answers 409 state_conflict. A raise after an acceptance changes neither the accepted terms version of the grant nor the grant.
|
||||
|
||||
Repeats return the same result: a retry with the same Idempotency-Key replays the stored response, and a raise to the same `salary_to` that was already applied answers 200 with the current invitation even with a new key or an older `expected_version`.
|
||||
|
||||
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for a candidate), membership (404 not_found) and role (403 forbidden), the Idempotency-Key (422, 409 idempotency_in_progress, replay), the invitation (404 not_found, after any due expiry), the repeat of an applied raise (200), a terminal state (409 state_conflict, whatever the version), the version (412), any other state that does not allow a raise and the used raise (409 state_conflict), then the bound and the width (400). The general rate limit can answer 429 with Retry-After before any check. 404 and 409 state_conflict are stored under the key; 400, 412, and 429 are not.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
tags:
|
||||
- invitation
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/OrganizationId
|
||||
- $ref: ../components/parameters.yml#/InvitationId
|
||||
- $ref: ../components/parameters.yml#/IdempotencyKey
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/InvitationSalaryRaise
|
||||
examples:
|
||||
raise:
|
||||
$ref: ../components/examples.yml#/InvitationSalaryRaiseCommand
|
||||
responses:
|
||||
"200":
|
||||
description: >-
|
||||
The invitation with the raised upper bound and the next terms
|
||||
version, or the current invitation when the same raise was already
|
||||
applied.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/OrganizationInvitation
|
||||
examples:
|
||||
raised:
|
||||
$ref: ../components/examples.yml#/OrganizationInvitationSalaryRaised
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/ValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
"409":
|
||||
$ref: ../components/responses.yml#/InvitationCommandConflict
|
||||
"412":
|
||||
$ref: ../components/responses.yml#/InvitationVersionConflict
|
||||
"422":
|
||||
$ref: ../components/responses.yml#/UnprocessableContent
|
||||
"429":
|
||||
$ref: ../components/responses.yml#/TooManyRequests
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -0,0 +1,65 @@
|
||||
post:
|
||||
operationId: SendOrganizationInvitation
|
||||
summary: Send a draft to the candidate's inbox.
|
||||
description: |-
|
||||
Requires the session cookie of an employer account with an active membership in `org_id`, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. In the MVP only the owner of the organization sends invitations.
|
||||
|
||||
Sends the current terms version of a `draft`. Sending is internal and never visible as a state: in one transaction the server records the delivery, creates the candidate's inbox entry, starts the deadline `response_deadline_at = delivered_at + response_period_days`, spends one invitation of the weekly organization quota, and writes the outbox event for the notification (TASK-199), then answers 200 with the state `delivered`. A successful answer therefore means the candidate can already read the invitation; an email is a separate notification that never blocks or delays it, and its retries never move the deadline. No contact of the candidate is disclosed by sending.
|
||||
|
||||
The server checks again that the candidate is still visible to the organization: a revoked publication C2 or a profile hidden from the organization answers 409 state_conflict without telling which. It also enforces the limits of the product policy: at most 20 invitations waiting for an answer per need (`delivered`, `viewed`, `counter`) and the 30-day pause for the pair of the organization and the candidate after a decline or a no deal, regardless of the member or the need, both with 409 state_conflict; and the rolling weekly quota of the organization (TASK-087), with 429 and Retry-After. The pending limit and the quota are planned in TASK-205 and TASK-087.
|
||||
|
||||
Repeats return the same result: a retry with the same Idempotency-Key replays the stored response, and a send of an invitation that was already sent answers 200 with the invitation in its current state even with a new key or an older `expected_version`; the quota is spent once. A stale `expected_version` on a draft answers 412 version_conflict, so the organization never sends terms it did not read.
|
||||
|
||||
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for a candidate), membership (404 not_found) and role (403 forbidden), the Idempotency-Key (422, 409 idempotency_in_progress, replay), the invitation (404 not_found), the repeat of a completed send (200), the version (412), the state, the visibility of the candidate, the pending limit and the pause (409 state_conflict), then the quota (429). 404 and 409 state_conflict are stored under the key; 400, 412, and 429 are not.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
tags:
|
||||
- invitation
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/OrganizationId
|
||||
- $ref: ../components/parameters.yml#/InvitationId
|
||||
- $ref: ../components/parameters.yml#/IdempotencyKey
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/InvitationCommand
|
||||
examples:
|
||||
send:
|
||||
$ref: ../components/examples.yml#/InvitationSendCommand
|
||||
responses:
|
||||
"200":
|
||||
description: >-
|
||||
The invitation in the candidate's inbox with the state `delivered`
|
||||
and its deadline, or the invitation in its current state when it was
|
||||
already sent.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/OrganizationInvitation
|
||||
examples:
|
||||
delivered:
|
||||
$ref: ../components/examples.yml#/OrganizationInvitationDelivered
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/ValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
"409":
|
||||
$ref: ../components/responses.yml#/InvitationCommandConflict
|
||||
"412":
|
||||
$ref: ../components/responses.yml#/InvitationVersionConflict
|
||||
"422":
|
||||
$ref: ../components/responses.yml#/UnprocessableContent
|
||||
"429":
|
||||
$ref: ../components/responses.yml#/TooManyRequests
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -0,0 +1,62 @@
|
||||
post:
|
||||
operationId: WithdrawOrganizationInvitation
|
||||
summary: Withdraw an invitation.
|
||||
description: |-
|
||||
Requires the session cookie of an employer account with an active membership in `org_id`, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. In the MVP only the owner of the organization withdraws invitations.
|
||||
|
||||
Moves an unfinished invitation to the terminal state `withdrawn` (PRD FR12): a `draft`, which the candidate never sees, a `delivered` or `viewed` invitation before the answer, an `accepted` one, and the planned stages up to `negotiation`. The process closes and no further transition happens in it. Withdrawing a delivered invitation frees its place in the pending limit of the need but never returns the weekly quota. Withdrawing never revokes the consent C4 or a grant that already exists: an accepted invitation keeps its `contact_access`, because only the candidate closes the access, by revoking C4, cancelling the participation, or closing the visibility.
|
||||
|
||||
`withdrawn` differs from `cancelled_by_candidate`: the organization withdraws, and the grant stays; the candidate cancels through CancelMyInvitation, and the grant of this invitation is revoked. A terminal invitation (`declined`, `expired`, `cancelled_by_candidate`) answers 409 state_conflict, even with a stale `expected_version`, so the organization sees the final state at once.
|
||||
|
||||
Repeats return the same result: a retry with the same Idempotency-Key replays the stored response, and a withdrawal of an invitation that is already `withdrawn` answers 200 with it even with a new key or an older `expected_version`.
|
||||
|
||||
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for a candidate), membership (404 not_found) and role (403 forbidden), the Idempotency-Key (422, 409 idempotency_in_progress, replay), the invitation (404 not_found, after any due expiry), the repeat on a withdrawn invitation (200), a terminal state (409 state_conflict, whatever the version), then the version (412). The general rate limit can answer 429 with Retry-After before any check. 404 and 409 state_conflict are stored under the key; 400, 412, and 429 are not.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
tags:
|
||||
- invitation
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/OrganizationId
|
||||
- $ref: ../components/parameters.yml#/InvitationId
|
||||
- $ref: ../components/parameters.yml#/IdempotencyKey
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/InvitationCommand
|
||||
examples:
|
||||
withdraw:
|
||||
$ref: ../components/examples.yml#/InvitationWithdrawCommand
|
||||
responses:
|
||||
"200":
|
||||
description: The invitation in the state `withdrawn`.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/OrganizationInvitation
|
||||
examples:
|
||||
withdrawn:
|
||||
$ref: ../components/examples.yml#/OrganizationInvitationWithdrawn
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/ValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
"409":
|
||||
$ref: ../components/responses.yml#/InvitationCommandConflict
|
||||
"412":
|
||||
$ref: ../components/responses.yml#/InvitationVersionConflict
|
||||
"422":
|
||||
$ref: ../components/responses.yml#/UnprocessableContent
|
||||
"429":
|
||||
$ref: ../components/responses.yml#/TooManyRequests
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -0,0 +1,103 @@
|
||||
get:
|
||||
operationId: ListOrganizationInvitations
|
||||
summary: List the invitations of an organization.
|
||||
description: |-
|
||||
Requires the session cookie of an employer account with an active membership in `org_id`. The organization and the role come from the membership that the server holds for the session account, never from the request. In the MVP only the owner of the organization works with invitations, as with needs; the other roles of the PRD FR07 matrix are planned and change no field of this contract.
|
||||
|
||||
Returns a page of invitation summaries in every state, drafts included, newest first by creation time with the identifier as the tie-breaker, with cursor pagination. A summary names the candidate only by the opaque `candidate_handle` and has the state, the versions, the role, the salary range, the deadline, and the contact access without any contact value. A declined invitation shows the state `declined` without the reason or the comment. Filters by state and need are planned and add optional parameters.
|
||||
|
||||
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate account answers 403 forbidden; an account without an active membership in the organization and an unknown organization both answer 404 not_found, so organizations cannot be enumerated; a member whose role does not allow reading invitations answers 403 forbidden. A malformed `org_id`, `limit`, or `cursor` answers 400 validation_failed.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
tags:
|
||||
- invitation
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/OrganizationId
|
||||
- $ref: ../components/parameters.yml#/PageLimit
|
||||
- $ref: ../components/parameters.yml#/PageCursor
|
||||
responses:
|
||||
"200":
|
||||
description: A page of the invitations of the organization.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/OrganizationInvitationList
|
||||
examples:
|
||||
last_page:
|
||||
$ref: ../components/examples.yml#/OrganizationInvitationListPage
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/ValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/Forbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
post:
|
||||
operationId: CreateOrganizationInvitation
|
||||
summary: Create an invitation draft for one candidate.
|
||||
description: |-
|
||||
Requires the session cookie of an employer account with an active membership in `org_id`, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The organization comes from the path and the server-side membership; the body has no organization, membership, or role field. In the MVP only the owner of the organization may create an invitation.
|
||||
|
||||
The draft is addressed to one person from a search result of this organization: `candidate_handle` is the opaque handle of that card, never an email address, a phone number, or an account identifier. The server resolves the handle for this organization only. An unknown handle, a handle of another organization, and a profile that the organization may no longer see, because the candidate revoked the publication C2 or hid the profile from it, all answer 400 with the pointer `/candidate_handle`, so a handle never reveals which case applies. `need` is optional: a direct invitation has none, and a need given must be a need of the organization with a `requirements_version` that it has had, otherwise 400 with the pointer `/need`. `response_period_days` is 3, 7, or 14 and defaults to 7.
|
||||
|
||||
The terms are complete from the start (PRD FR12): the role, the specialization and the grade, the offer type, the tasks, the team, the technology stack, the work formats and the place of work, the communication method, the salary range in RUB with its tax basis, and the package. Each package condition is either `provided` with a description or explicitly `not_provided`; leaving one out fails validation. A draft without the tax basis or the communication method therefore cannot exist. The draft is created as version 1 with terms version 1, and the candidate does not see it until SendOrganizationInvitation.
|
||||
|
||||
Salary: SalaryRange applies the same rules as for a need: whole rubles, positive multiples of 1000, `salary_from < salary_to`, and a width from 10% to 40% of the midpoint, checked by the server in integer arithmetic. The response carries `salary_fit`, the coarse indicator of PRD FR13 against the candidate's hidden minimum; the exact minimum appears in no response. The server never rejects a range because of the minimum, since a rejection would reveal it. Creating a draft is an indicator-relevant setting: it counts against the limit shared by the whole organization with the ranges of needs, at most three settings a day, and against the withheld counter, after five settings within seven days the indicator is `withheld` for seven days from the fifth, on every draft and invitation of the organization (PRD FR13, planned in TASK-211; see InvitationSalaryFit). Over the limit the server answers 429 with Retry-After and creates nothing.
|
||||
|
||||
Idempotency: a retry with the same key and body within 24 hours replays the stored 201 and creates nothing, so a lost response never creates a second draft. A different body with the same key answers 422 idempotency_key_reused. 400 and 429 are never stored.
|
||||
|
||||
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for a candidate), membership (404 not_found) and role (403 forbidden), the Idempotency-Key (422, 409 idempotency_in_progress, replay), domain rules (400 with a pointer: `/candidate_handle`, `/need`, `/terms/salary/salary_to` for a reversed range or a width outside 10-40%, `/terms/location` for the `office` or `hybrid` format without a place of work, or `/terms/tech_stack/1` for a repeated technology), then the salary limit (429). The schema already rejects a missing term or package condition, a salary bound that is not a positive multiple of 1000, an unknown currency, period, or tax basis, and unknown fields such as `state`, `version`, `salary_fit`, `candidate_email`, or `salary_minimum`. The general rate limit can answer 429 with Retry-After before any check.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
tags:
|
||||
- invitation
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/OrganizationId
|
||||
- $ref: ../components/parameters.yml#/IdempotencyKey
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/OrganizationInvitationCreate
|
||||
examples:
|
||||
valid_invitation:
|
||||
$ref: ../components/examples.yml#/InvitationCreateFromNeed
|
||||
responses:
|
||||
"201":
|
||||
description: >-
|
||||
The draft was created as version 1 with terms version 1, or a retry
|
||||
with the same Idempotency-Key replayed its creation.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/OrganizationInvitation
|
||||
examples:
|
||||
draft:
|
||||
$ref: ../components/examples.yml#/OrganizationInvitationDraft
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/InvitationValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
"409":
|
||||
$ref: ../components/responses.yml#/IdempotencyInProgress
|
||||
"422":
|
||||
$ref: ../components/responses.yml#/UnprocessableContent
|
||||
"429":
|
||||
$ref: ../components/responses.yml#/TooManyRequests
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -49,9 +49,9 @@ post:
|
||||
| `anticheat_appeal` | candidate | required; `assessment_attempt` of the caller with an anti-cheat review decision | none |
|
||||
| `manual_assessment` | candidate | optional; a prior `assessment_attempt` of the caller in the same specialization | required `assessment_target` |
|
||||
|
||||
An organization is visible to a candidate when it sent the candidate an invitation or when the organization contract (TASK-077) shows the candidate its profile, and to an employer account when the account has an active membership in it. Invitations are not in the contract yet, so until they are, every `invitation` reference answers 404 not_found; anti-cheat review decisions are not either, so until TASK-173 every anti-cheat appeal answers 409 state_conflict. The schema rejects an object type that the case type does not accept, for example an organization in a grade appeal.
|
||||
An organization is visible to a candidate when it sent the candidate an invitation or when the organization contract (TASK-077) shows the candidate its profile, and to an employer account when the account has an active membership in it. Invitations are in the contract (TASK-196) but not implemented yet, so until they are, every `invitation` reference answers 404 not_found; anti-cheat review decisions are not either, so until TASK-173 every anti-cheat appeal answers 409 state_conflict. The schema rejects an object type that the case type does not accept, for example an organization in a grade appeal.
|
||||
|
||||
Ownership of the reference: the server checks the object against the session account on every create. An unknown object and an object of someone else, such as another candidate's attempt, another account's case, or an invitation addressed to another person, both answer 404 not_found, so a reference never reveals whether a foreign object exists. An own case that a grade appeal cannot dispute, because it is not a manual assessment, is not resolved yet, or was resolved with another outcome, answers 409 state_conflict. An identifier that is not a UUID fails validation with the whole-body pointer, because the decoder does not record the path inside the selected variant. The case stores only the type and the identifier of the object.
|
||||
Ownership of the reference: the server checks the object against the session account on every create. An unknown object and an object of someone else, such as another candidate's attempt, another account's case, or an invitation addressed to another person, both answer 404 not_found, so a reference never reveals whether a foreign object exists. An own case that a grade appeal cannot dispute, because it is not a manual assessment, is not resolved yet, or was resolved with another outcome, answers 409 state_conflict. An identifier that is not a UUID fails validation with the pointer `/object/id`. The case stores only the type and the identifier of the object.
|
||||
|
||||
Limits: an attempt and a resolved manual assessment each accept at most one grade appeal, and an attempt at most one anti-cheat appeal, in any status; a disagreement with the decision goes into a support case that references the appeal as `support_case`. A specialization accepts one open manual assessment, and an object accepts one open complaint; open means not `resolved` or `closed`. A second one answers 409 state_conflict. A grade appeal of an attempt that is still active also answers 409. Every create that passed authentication, validation, and the account scenario counts against a per-account limit from the product policy, including replays, 404, and 409, so the limit also bounds probing of references; over the limit the server answers 429 with Retry-After and creates nothing.
|
||||
|
||||
|
||||
Reference in new issue
Block a user