feat(api): add support case and manual assessment request contract
This commit is contained in:
1 parent
2db585fbff
commit
ad4bb94426
65 files changed
+14629
-23
No files matched your search
@@ -2015,3 +2015,278 @@ NeedStaleVersion:
|
||||
code: version_conflict
|
||||
detail: The resource changed after it was read. Read it again before retrying.
|
||||
trace_id: 0f1a2b3c-4d5e-4f6a-8b7c-8d9e0f1a2b3d
|
||||
SupportCaseCreateManualAssessment:
|
||||
summary: A manual assessment of a category instead of the automated one
|
||||
value:
|
||||
type: manual_assessment
|
||||
description: Прошу провести ручную оценку по рубрике Backend Middle вместо автоматической категоризации.
|
||||
assessment_target:
|
||||
specialization: backend
|
||||
grade: middle
|
||||
SupportCaseCreateGradeAppeal:
|
||||
summary: An appeal of the result of an own attempt
|
||||
value:
|
||||
type: grade_appeal
|
||||
description: Практика не засчитана, хотя решение проходит публичные примеры. Прошу пересмотреть результат.
|
||||
object:
|
||||
type: assessment_attempt
|
||||
id: 01928f7a-3c4d-7e5f-8a9b-0c1d2e3f4a5b
|
||||
SupportCaseCreateCategoryAppeal:
|
||||
summary: An appeal of a category that a manual assessment assigned
|
||||
description: The category came from an expert without an attempt, so the appeal references the resolved manual assessment case.
|
||||
value:
|
||||
type: grade_appeal
|
||||
description: Эксперт подтвердил Junior, но в рубрике Middle я выполнил все обязательные пункты. Прошу пересмотреть.
|
||||
object:
|
||||
type: support_case
|
||||
id: 01928f7a-6e7f-7a8b-9c0d-1e2f3a4b5c6d
|
||||
SupportCaseCreateTestUnavailable:
|
||||
summary: A support case about a test that is not available
|
||||
value:
|
||||
type: support
|
||||
description: Тест на Senior пока недоступен, хотя я сдал Middle полгода назад.
|
||||
assessment_target:
|
||||
specialization: backend
|
||||
grade: senior
|
||||
SupportCaseCreateComplaint:
|
||||
summary: A complaint about the salary terms of an offer
|
||||
value:
|
||||
type: complaint
|
||||
description: После принятия приглашения компания предложила сумму ниже указанной вилки.
|
||||
complaint_reason: salary_terms_violation
|
||||
object:
|
||||
type: invitation
|
||||
id: 01928f7a-7f8a-7b9c-8d0e-1f2a3b4c5d6e
|
||||
SupportCaseManualAssessmentCreated:
|
||||
summary: A new manual assessment request with its rubric and response target
|
||||
description: The server moves the case to waiting_expert in the same transaction as the creation, so the 201 already shows both events.
|
||||
value:
|
||||
id: 01928f7a-6e7f-7a8b-9c0d-1e2f3a4b5c6d
|
||||
number: SC-2026-000123
|
||||
type: manual_assessment
|
||||
status: waiting_expert
|
||||
description: Прошу провести ручную оценку по рубрике Backend Middle вместо автоматической категоризации.
|
||||
object: null
|
||||
assessment_target:
|
||||
specialization: backend
|
||||
grade: middle
|
||||
complaint_reason: null
|
||||
rubric_version: 3
|
||||
response_target:
|
||||
kind: operational_goal
|
||||
business_days: 5
|
||||
due_at: "2026-10-13T09:00:00Z"
|
||||
answered_at: null
|
||||
late: false
|
||||
policy_version: 1
|
||||
decision: null
|
||||
history:
|
||||
- sequence: 1
|
||||
kind: created
|
||||
actor: user
|
||||
occurred_at: "2026-10-06T09:00:00Z"
|
||||
status: submitted
|
||||
message: null
|
||||
- sequence: 2
|
||||
kind: status_changed
|
||||
actor: system
|
||||
occurred_at: "2026-10-06T09:00:00Z"
|
||||
status: waiting_expert
|
||||
message: null
|
||||
created_at: "2026-10-06T09:00:00Z"
|
||||
updated_at: "2026-10-06T09:00:00Z"
|
||||
SupportCaseGradeAppealResolved:
|
||||
summary: An own grade appeal with a public decision
|
||||
value:
|
||||
id: 01928f7a-5d6e-7f8a-9b0c-1d2e3f4a5b6c
|
||||
number: SC-2026-000097
|
||||
type: grade_appeal
|
||||
status: resolved
|
||||
description: Практика не засчитана, хотя решение проходит публичные примеры. Прошу пересмотреть результат.
|
||||
object:
|
||||
type: assessment_attempt
|
||||
id: 01928f7a-3c4d-7e5f-8a9b-0c1d2e3f4a5b
|
||||
assessment_target: null
|
||||
complaint_reason: null
|
||||
rubric_version: null
|
||||
response_target:
|
||||
kind: operational_goal
|
||||
business_days: 10
|
||||
due_at: "2026-10-15T10:00:00Z"
|
||||
answered_at: "2026-10-09T14:30:00Z"
|
||||
late: false
|
||||
policy_version: 1
|
||||
decision:
|
||||
outcome: not_upheld
|
||||
reason: Решение не проходит вторую группу скрытых проверок на пустом входе. Исходный результат остается в силе; повторная попытка на тот же грейд откроется по обычным правилам.
|
||||
decided_at: "2026-10-09T14:30:00Z"
|
||||
history:
|
||||
- sequence: 1
|
||||
kind: created
|
||||
actor: user
|
||||
occurred_at: "2026-10-01T10:00:00Z"
|
||||
status: submitted
|
||||
message: null
|
||||
- sequence: 2
|
||||
kind: status_changed
|
||||
actor: system
|
||||
occurred_at: "2026-10-01T10:00:00Z"
|
||||
status: waiting_expert
|
||||
message: null
|
||||
- sequence: 3
|
||||
kind: status_changed
|
||||
actor: support
|
||||
occurred_at: "2026-10-07T08:15:00Z"
|
||||
status: in_review
|
||||
message: null
|
||||
- sequence: 4
|
||||
kind: decision
|
||||
actor: support
|
||||
occurred_at: "2026-10-09T14:30:00Z"
|
||||
status: resolved
|
||||
message: Решение не проходит вторую группу скрытых проверок на пустом входе. Исходный результат остается в силе; повторная попытка на тот же грейд откроется по обычным правилам.
|
||||
created_at: "2026-10-01T10:00:00Z"
|
||||
updated_at: "2026-10-09T14:30:00Z"
|
||||
SupportCaseListPage:
|
||||
summary: The last page of the case summaries of the current account
|
||||
value:
|
||||
items:
|
||||
- id: 01928f7a-6e7f-7a8b-9c0d-1e2f3a4b5c6d
|
||||
number: SC-2026-000123
|
||||
type: manual_assessment
|
||||
status: waiting_expert
|
||||
object: null
|
||||
assessment_target:
|
||||
specialization: backend
|
||||
grade: middle
|
||||
response_target:
|
||||
kind: operational_goal
|
||||
business_days: 5
|
||||
due_at: "2026-10-13T09:00:00Z"
|
||||
answered_at: null
|
||||
late: false
|
||||
policy_version: 1
|
||||
decision_outcome: null
|
||||
created_at: "2026-10-06T09:00:00Z"
|
||||
updated_at: "2026-10-06T09:00:00Z"
|
||||
- id: 01928f7a-5d6e-7f8a-9b0c-1d2e3f4a5b6c
|
||||
number: SC-2026-000097
|
||||
type: grade_appeal
|
||||
status: resolved
|
||||
object:
|
||||
type: assessment_attempt
|
||||
id: 01928f7a-3c4d-7e5f-8a9b-0c1d2e3f4a5b
|
||||
assessment_target: null
|
||||
response_target:
|
||||
kind: operational_goal
|
||||
business_days: 10
|
||||
due_at: "2026-10-15T10:00:00Z"
|
||||
answered_at: "2026-10-09T14:30:00Z"
|
||||
late: false
|
||||
policy_version: 1
|
||||
decision_outcome: not_upheld
|
||||
created_at: "2026-10-01T10:00:00Z"
|
||||
updated_at: "2026-10-09T14:30:00Z"
|
||||
- id: 01928f7a-4c5d-7e6f-8a9b-0c1d2e3f4a5b
|
||||
number: SC-2026-000088
|
||||
type: support
|
||||
status: in_review
|
||||
object: null
|
||||
assessment_target:
|
||||
specialization: backend
|
||||
grade: senior
|
||||
response_target:
|
||||
kind: operational_goal
|
||||
business_days: 3
|
||||
due_at: "2026-10-02T12:00:00Z"
|
||||
answered_at: "2026-10-01T09:20:00Z"
|
||||
late: false
|
||||
policy_version: 1
|
||||
decision_outcome: null
|
||||
created_at: "2026-09-29T12:00:00Z"
|
||||
updated_at: "2026-10-01T09:20:00Z"
|
||||
page:
|
||||
has_more: false
|
||||
next_cursor: null
|
||||
SupportCaseBlankDescription:
|
||||
summary: The description is empty or contains only whitespace
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d
|
||||
errors:
|
||||
- in: body
|
||||
pointer: /description
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
SupportCaseUnknownType:
|
||||
summary: The case type is not one of the five types
|
||||
description: The variant is selected by `type` before a field path is recorded, so the pointer is the whole body.
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 6b7c8d9e-0f1a-4b2c-9d3e-4f5a6b7c8d9e
|
||||
errors:
|
||||
- in: body
|
||||
pointer: ""
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
SupportCaseUnknownField:
|
||||
summary: The client sent its own status or decision
|
||||
description: Status, decision, moderator, priority, and response target are never request fields; any unknown field fails validation.
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f
|
||||
errors:
|
||||
- in: body
|
||||
pointer: ""
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
SupportCaseMalformedReference:
|
||||
summary: The object identifier is not a UUID
|
||||
description: The decoder rejects the identifier inside the selected variant without recording its path, so the pointer is the whole body.
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 0f1a2b3c-4d5e-4f6a-9b7c-8d9e0f1a2b3c
|
||||
errors:
|
||||
- in: body
|
||||
pointer: ""
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
SupportCaseComplaintNeedsInvitation:
|
||||
summary: The complaint reason requires an invitation reference
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 8d9e0f1a-2b3c-4d4e-9f5a-6b7c8d9e0f1a
|
||||
errors:
|
||||
- in: body
|
||||
pointer: /object/type
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
SupportCaseAppealExists:
|
||||
summary: The attempt or the manual assessment already has an appeal of this type
|
||||
value:
|
||||
type: urn:lincodex:problem:state_conflict
|
||||
title: Resource state conflict
|
||||
status: 409
|
||||
code: state_conflict
|
||||
detail: The resource is in a state that does not allow this operation.
|
||||
trace_id: 9e0f1a2b-3c4d-4e5f-8a6b-7c8d9e0f1a2b
|
||||
@@ -93,3 +93,15 @@ NeedId:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 01928f7a-2b3c-7d4e-9f5a-6b7c8d9e0f12
|
||||
SupportCaseId:
|
||||
name: case_id
|
||||
in: path
|
||||
required: true
|
||||
description: >-
|
||||
Identifier of a case of the current account. A case of another account
|
||||
and an unknown identifier both answer 404 not_found, so identifiers
|
||||
cannot be enumerated.
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
example: 01928f7a-6e7f-7a8b-9c0d-1e2f3a4b5c6d
|
||||
@@ -419,3 +419,50 @@ NeedVersionConflict:
|
||||
examples:
|
||||
version_conflict:
|
||||
$ref: ./examples.yml#/NeedStaleVersion
|
||||
SupportCaseValidationFailed:
|
||||
description: >-
|
||||
The body does not match the contract or violates a case rule: an empty
|
||||
or blank description, including one made only of Unicode spaces, an
|
||||
unknown case type, an object identifier that is not a UUID, an object
|
||||
type that the
|
||||
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
|
||||
created, and the outcome is not stored under the Idempotency-Key.
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: ./schemas.yml#/Problem
|
||||
examples:
|
||||
blank_description:
|
||||
$ref: ./examples.yml#/SupportCaseBlankDescription
|
||||
unknown_type:
|
||||
$ref: ./examples.yml#/SupportCaseUnknownType
|
||||
decision_sent_by_client:
|
||||
$ref: ./examples.yml#/SupportCaseUnknownField
|
||||
malformed_object_id:
|
||||
$ref: ./examples.yml#/SupportCaseMalformedReference
|
||||
complaint_reason_needs_invitation:
|
||||
$ref: ./examples.yml#/SupportCaseComplaintNeedsInvitation
|
||||
SupportCaseCreateConflict:
|
||||
description: >-
|
||||
The referenced object does not allow this case now, code
|
||||
state_conflict: the attempt of a grade appeal has no result yet, the
|
||||
case referenced by a grade appeal is not a manual assessment resolved
|
||||
with the outcome assessed, the attempt of an anti-cheat appeal has no
|
||||
anti-cheat review decision, the attempt or the manual assessment
|
||||
already has an appeal of the same type, or an open case of the same
|
||||
type already exists for the category or the object. Or a request
|
||||
with the same Idempotency-Key is still running, code
|
||||
idempotency_in_progress. Nothing was created in either case.
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: ./schemas.yml#/Problem
|
||||
examples:
|
||||
state_conflict:
|
||||
$ref: ./examples.yml#/SupportCaseAppealExists
|
||||
idempotency_in_progress:
|
||||
$ref: ./examples.yml#/IdempotencyInProgress
|
||||
@@ -2824,3 +2824,552 @@ CandidateQuestionnaireUpdate:
|
||||
$ref: '#/QuestionnaireSpecialization'
|
||||
work_context:
|
||||
$ref: '#/WorkContext'
|
||||
SupportCaseNumber:
|
||||
type: string
|
||||
minLength: 14
|
||||
maxLength: 18
|
||||
pattern: ^SC-[0-9]{4}-[0-9]{6,10}$
|
||||
description: 'Human-readable case number that the server assigns on creation, for example `SC-2026-000123`: the prefix `SC`, the UTC year of creation, and a sequence number of at least six digits with leading zeros. The sequence is global and never reused, so the number is unique across every case and year and never changes. The user quotes it in letters and calls; the API addresses a case only by its `id`. Clients show the number as text and never parse it.'
|
||||
examples:
|
||||
- SC-2026-000123
|
||||
SupportCaseType:
|
||||
type: string
|
||||
description: 'Kind of the case. It fixes the allowed object reference, the type-specific fields, the response target, and the queue that handles the case.
|
||||
|
||||
|
||||
- support: a question or a problem, for example an assessment that is not available or a failed sandbox run. Candidate and employer accounts.
|
||||
|
||||
- complaint: a complaint about an organization or an offer, including a breach of the salary terms or a disclosure of personal data (PRD FR18). Candidate accounts.
|
||||
|
||||
- grade_appeal: an appeal of a category the caller received: the result of one own assessment attempt, or the outcome of one own resolved manual assessment case. An expert reviews it, and the original result stays in the history. Candidate accounts.
|
||||
|
||||
- anticheat_appeal: an appeal of an anti-cheat review decision on one own assessment attempt. Candidate accounts.
|
||||
|
||||
- manual_assessment: a request for a manual assessment of a category by a subject expert with the same rubric, the alternative to automated categorization (consent C3). Candidate accounts.'
|
||||
enum:
|
||||
- support
|
||||
- complaint
|
||||
- grade_appeal
|
||||
- anticheat_appeal
|
||||
- manual_assessment
|
||||
SupportCaseStatus:
|
||||
type: string
|
||||
description: 'Processing status of a case. Only the server changes it; no request field sets it. Adding a value is a contract change: generated clients reject an unknown value.
|
||||
|
||||
|
||||
- submitted: the case was accepted and waits in its queue.
|
||||
|
||||
- in_review: support or a moderator works on it.
|
||||
|
||||
- waiting_for_user: support asked the author for more detail. Not set yet: it starts with the planned operation that lets the author reply, and until then no case has this status.
|
||||
|
||||
- waiting_expert: a grade appeal, an anti-cheat appeal, or a manual assessment waits for a subject expert. The server sets it in the same transaction as the creation of such a case. The case stays here until a person decides; it is never resolved by the passing of time.
|
||||
|
||||
- resolved: terminal; a decision was made and `decision` holds its outcome and public reason.
|
||||
|
||||
- closed: terminal; the case ended without a decision on the merits, for example as a duplicate of another case. The last history event says why.'
|
||||
enum:
|
||||
- submitted
|
||||
- in_review
|
||||
- waiting_for_user
|
||||
- waiting_expert
|
||||
- resolved
|
||||
- closed
|
||||
SupportCaseObjectType:
|
||||
type: string
|
||||
description: 'Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.
|
||||
|
||||
|
||||
- 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.
|
||||
|
||||
- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'
|
||||
enum:
|
||||
- assessment_attempt
|
||||
- organization
|
||||
- invitation
|
||||
- support_case
|
||||
SupportCaseObjectReference:
|
||||
type: object
|
||||
description: Typed reference to an object that the case is about. The server checks on creation that the caller may see the object; an unknown object and an object of someone else both answer 404 not_found, so a reference never reveals whether another person's object exists. The case keeps only the type and the identifier, never a copy of the object.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- id
|
||||
properties:
|
||||
type:
|
||||
$ref: '#/SupportCaseObjectType'
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of the object.
|
||||
SupportCaseAttemptReference:
|
||||
type: object
|
||||
description: Reference to an assessment attempt of the caller. Any other object type fails validation.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- id
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- assessment_attempt
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of an assessment attempt of the caller.
|
||||
SupportCaseGradeAppealReference:
|
||||
type: object
|
||||
description: 'Reference to the category that a grade appeal disputes: an assessment attempt of the caller in a terminal state, or a `manual_assessment` case of the caller that is `resolved` with the outcome `assessed`, for a category that an expert assigned without an attempt. Any other object type fails validation.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- id
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- assessment_attempt
|
||||
- support_case
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of the attempt or the case.
|
||||
SupportCaseComplaintReference:
|
||||
type: object
|
||||
description: 'Reference to the object of a complaint: an organization that the caller can see or an invitation addressed to the caller. Any other object type fails validation.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- id
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- organization
|
||||
- invitation
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of the organization or the invitation.
|
||||
SupportCaseAssessmentTarget:
|
||||
type: object
|
||||
description: 'Category that the case is about: a specialization and a grade of the MVP scale. For a manual assessment it is the category to assess; for a support case it is optional context, for example the category whose test is not available.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- specialization
|
||||
- grade
|
||||
properties:
|
||||
specialization:
|
||||
$ref: '#/SpecializationCode'
|
||||
grade:
|
||||
$ref: '#/GradeCode'
|
||||
SupportCaseComplaintReason:
|
||||
type: string
|
||||
description: 'Ground of a complaint (PRD FR18).
|
||||
|
||||
|
||||
- organization_conduct: conduct of the organization, for example fraudulent or abusive messages.
|
||||
|
||||
- offer_content: misleading or discriminatory content of an offer. Requires an invitation reference.
|
||||
|
||||
- salary_terms_violation: a breach of the salary terms of an offer. Requires an invitation reference.
|
||||
|
||||
- data_disclosure: a disclosure of the caller''s personal data beyond what the caller granted.
|
||||
|
||||
- other: another ground, explained in the description.'
|
||||
enum:
|
||||
- organization_conduct
|
||||
- offer_content
|
||||
- salary_terms_violation
|
||||
- data_disclosure
|
||||
- other
|
||||
SupportCaseDescription:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 4000
|
||||
pattern: \S
|
||||
description: 'What the user asks or reports, as the user wrote it. It must contain at least one character that is not whitespace, so an empty or blank text fails validation with the pointer `/description`; it may contain line breaks. The pattern `\S` uses the ECMAScript white space set in both generated validators: ogen converts it to that set for Go, so a text made only of spaces such as U+00A0, U+2003, or U+3000 fails in the server schema and in Zod alike. ECMAScript white space omits U+0085 (NEL), which Go `unicode.IsSpace` includes; the server therefore also rejects a text whose every character is `unicode.IsSpace` or U+FEFF, with the same 400 and the pointer `/description`, while generated Zod accepts a text of NEL. Plain text; clients show it as text, never as HTML. The server stores it as written, shows it only to the author and to the staff of the queue, and never writes it to logs or notifications. Users should not put passwords or other people''s contact data into it. Generated
|
||||
Zod validators count UTF-16 code units, so the server stays authoritative for the length.'
|
||||
examples:
|
||||
- Тест на Senior пока недоступен, хотя я сдал Middle полгода назад.
|
||||
SupportCasePublicText:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 4000
|
||||
description: 'Text that support or a moderator wrote for the user: a public reply or the public reason of a decision. Plain text; clients show it as text, never as HTML. Internal notes of the staff are never public texts.'
|
||||
SupportCaseCreateSupport:
|
||||
type: object
|
||||
description: New support case. Both the object reference and the assessment target are optional context; omit what does not apply.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- description
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- support
|
||||
description:
|
||||
$ref: '#/SupportCaseDescription'
|
||||
object:
|
||||
$ref: '#/SupportCaseObjectReference'
|
||||
assessment_target:
|
||||
$ref: '#/SupportCaseAssessmentTarget'
|
||||
SupportCaseCreateComplaint:
|
||||
type: object
|
||||
description: New complaint about an organization or an offer.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- description
|
||||
- complaint_reason
|
||||
- object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- complaint
|
||||
description:
|
||||
$ref: '#/SupportCaseDescription'
|
||||
complaint_reason:
|
||||
$ref: '#/SupportCaseComplaintReason'
|
||||
object:
|
||||
$ref: '#/SupportCaseComplaintReference'
|
||||
SupportCaseCreateGradeAppeal:
|
||||
type: object
|
||||
description: 'New appeal of a category the caller received: the result of an own assessment attempt, or the outcome of an own resolved manual assessment.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- description
|
||||
- object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- grade_appeal
|
||||
description:
|
||||
$ref: '#/SupportCaseDescription'
|
||||
object:
|
||||
$ref: '#/SupportCaseGradeAppealReference'
|
||||
SupportCaseCreateAnticheatAppeal:
|
||||
type: object
|
||||
description: New appeal of an anti-cheat review decision on an own assessment attempt.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- description
|
||||
- object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- anticheat_appeal
|
||||
description:
|
||||
$ref: '#/SupportCaseDescription'
|
||||
object:
|
||||
$ref: '#/SupportCaseAttemptReference'
|
||||
SupportCaseCreateManualAssessment:
|
||||
type: object
|
||||
description: 'New request for a manual assessment of a category by a subject expert. A prior attempt of the same category is optional context: a failed first test or no attempt at all never blocks the request.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- description
|
||||
- assessment_target
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- manual_assessment
|
||||
description:
|
||||
$ref: '#/SupportCaseDescription'
|
||||
assessment_target:
|
||||
$ref: '#/SupportCaseAssessmentTarget'
|
||||
object:
|
||||
$ref: '#/SupportCaseAttemptReference'
|
||||
SupportCaseCreate:
|
||||
description: 'New case, selected by `type`. Each type fixes its required fields and the object types it accepts. The body carries only what the user states: the request has no status, decision, outcome, priority, response target, assignee, moderator, rubric, or contact field, and every variant rejects unknown fields, so a client cannot set any of them. The user and the account come only from the session.'
|
||||
oneOf:
|
||||
- $ref: '#/SupportCaseCreateSupport'
|
||||
- $ref: '#/SupportCaseCreateComplaint'
|
||||
- $ref: '#/SupportCaseCreateGradeAppeal'
|
||||
- $ref: '#/SupportCaseCreateAnticheatAppeal'
|
||||
- $ref: '#/SupportCaseCreateManualAssessment'
|
||||
SupportResponseTarget:
|
||||
type: object
|
||||
description: 'Operational target for the answer to the case (PRD FR18: a case gets a number, a status, and a response deadline). The server fixes it on creation from the product policy version and the configured business calendar; it is a goal of the team, not a deadline set by law. The target is met by the first public reply, a decision, or a closure for `support` and `complaint`, and only by a decision or a closure for the appeals and `manual_assessment`. Missing the target never closes the case, never decides it, and never changes a grade.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- kind
|
||||
- business_days
|
||||
- due_at
|
||||
- answered_at
|
||||
- late
|
||||
- policy_version
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- operational_goal
|
||||
description: Nature of the target. `operational_goal` is a goal of the team that clients label as such, never as a legal deadline.
|
||||
business_days:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 1
|
||||
maximum: 60
|
||||
description: Length of the target in business days of the policy version, for example 5 for a manual assessment and 10 for an appeal.
|
||||
due_at:
|
||||
$ref: '#/Timestamp'
|
||||
answered_at:
|
||||
description: Time the target was met, or null while it is not.
|
||||
oneOf:
|
||||
- $ref: '#/Timestamp'
|
||||
- type: 'null'
|
||||
late:
|
||||
type: boolean
|
||||
description: 'Whether the target was missed: it was met after `due_at`, or it is not met and `due_at` has passed at the time of the response.'
|
||||
policy_version:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 1
|
||||
description: Number of the `product` policy version that fixed the target.
|
||||
SupportCaseDecisionOutcome:
|
||||
type: string
|
||||
description: 'Outcome of a decision as the user sees it. The allowed outcomes depend on the case type.
|
||||
|
||||
|
||||
- upheld: the appeal or the complaint is upheld in full.
|
||||
|
||||
- partially_upheld: the appeal or the complaint is upheld in part.
|
||||
|
||||
- not_upheld: the appeal or the complaint is not upheld.
|
||||
|
||||
- answered: a support case was answered.
|
||||
|
||||
- assessed: the expert finished a manual assessment. The resulting category is part of the assessment results, not of the case.'
|
||||
enum:
|
||||
- upheld
|
||||
- partially_upheld
|
||||
- not_upheld
|
||||
- answered
|
||||
- assessed
|
||||
SupportCaseDecision:
|
||||
type: object
|
||||
description: 'Decision visible to the user. It exists only once the case is `resolved`. It holds the outcome and the public reason; it never names the moderator or the expert and never contains internal notes, evidence, sanctions against another party, or risk signals. An upheld grade appeal never rewrites the original result: the corrected result is a separate decision of the assessment, and both stay in the history of that attempt.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- outcome
|
||||
- reason
|
||||
- decided_at
|
||||
properties:
|
||||
outcome:
|
||||
$ref: '#/SupportCaseDecisionOutcome'
|
||||
reason:
|
||||
$ref: '#/SupportCasePublicText'
|
||||
decided_at:
|
||||
$ref: '#/Timestamp'
|
||||
SupportCaseActorKind:
|
||||
type: string
|
||||
description: 'Who caused an event, by kind only. A case never names or identifies a moderator, an expert, or a support agent; experts and moderators of TASK-316 and TASK-323 are `support` too. Adding a value is a contract change.
|
||||
|
||||
|
||||
- user: the author of the case.
|
||||
|
||||
- support: a person of the support, moderation, or expert staff.
|
||||
|
||||
- system: the server, for example on creation or when it routes the case.'
|
||||
enum:
|
||||
- user
|
||||
- support
|
||||
- system
|
||||
SupportCaseEventKind:
|
||||
type: string
|
||||
description: 'Kind of a public history event. Adding a value is a contract change. A reply of the author, planned with `waiting_for_user`, is a `reply` with the actor `user`, and a later revision of a decision (TASK-317) is another `decision` event, so neither needs a new value.
|
||||
|
||||
|
||||
- created: the case was created; `status` is `submitted`. For an appeal or a manual assessment, a `status_changed` event of the actor `system` to `waiting_expert` follows in the same transaction.
|
||||
|
||||
- status_changed: the status changed; `status` is the new status, and `message` may explain a closure.
|
||||
|
||||
- reply: support replied; `message` holds the reply and `status` is null.
|
||||
|
||||
- decision: a decision was made; `status` is `resolved` and `message` holds the public reason.'
|
||||
enum:
|
||||
- created
|
||||
- status_changed
|
||||
- reply
|
||||
- decision
|
||||
SupportCaseEvent:
|
||||
type: object
|
||||
description: One public event of the case history. Internal notes, assignments, evidence requests, and risk signals are never history events.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- sequence
|
||||
- kind
|
||||
- actor
|
||||
- occurred_at
|
||||
- status
|
||||
- message
|
||||
properties:
|
||||
sequence:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 1
|
||||
description: Position of the event in the history, starting at 1 and increasing by one.
|
||||
kind:
|
||||
$ref: '#/SupportCaseEventKind'
|
||||
actor:
|
||||
$ref: '#/SupportCaseActorKind'
|
||||
occurred_at:
|
||||
$ref: '#/Timestamp'
|
||||
status:
|
||||
description: Status of the case after the event, or null for a reply.
|
||||
oneOf:
|
||||
- $ref: '#/SupportCaseStatus'
|
||||
- type: 'null'
|
||||
message:
|
||||
description: Public text of the event, or null.
|
||||
oneOf:
|
||||
- $ref: '#/SupportCasePublicText'
|
||||
- type: 'null'
|
||||
SupportCase:
|
||||
type: object
|
||||
description: Case of the current account. It contains what the author sent, the public processing state, and the public history. It never contains the identity of a moderator, an expert, or a support agent, internal notes, evidence, assessment answers or anti-cheat signals, risk signals, or contact data of another person. Fields that do not apply to the type are null.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- number
|
||||
- type
|
||||
- status
|
||||
- description
|
||||
- object
|
||||
- assessment_target
|
||||
- complaint_reason
|
||||
- rubric_version
|
||||
- response_target
|
||||
- decision
|
||||
- history
|
||||
- created_at
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Case identifier.
|
||||
number:
|
||||
$ref: '#/SupportCaseNumber'
|
||||
type:
|
||||
$ref: '#/SupportCaseType'
|
||||
status:
|
||||
$ref: '#/SupportCaseStatus'
|
||||
description:
|
||||
$ref: '#/SupportCaseDescription'
|
||||
object:
|
||||
description: Object that the case is about, as sent on creation, or null when the case has none.
|
||||
oneOf:
|
||||
- $ref: '#/SupportCaseObjectReference'
|
||||
- type: 'null'
|
||||
assessment_target:
|
||||
description: Category of a manual assessment, the optional category of a support case, or null.
|
||||
oneOf:
|
||||
- $ref: '#/SupportCaseAssessmentTarget'
|
||||
- type: 'null'
|
||||
complaint_reason:
|
||||
description: Ground of a complaint, or null for other types.
|
||||
oneOf:
|
||||
- $ref: '#/SupportCaseComplaintReason'
|
||||
- type: 'null'
|
||||
rubric_version:
|
||||
type:
|
||||
- integer
|
||||
- 'null'
|
||||
format: int32
|
||||
minimum: 1
|
||||
description: 'For a manual assessment, the version of the published rubric of the category that the server fixed on creation; the expert assesses with it, the same rubric as the automated assessment. Null for other types, and null for a manual assessment whose category has no published rubric yet: the case then waits in `waiting_expert` and the client says so instead of promising a date.'
|
||||
response_target:
|
||||
$ref: '#/SupportResponseTarget'
|
||||
decision:
|
||||
description: Decision once the case is `resolved`, otherwise null.
|
||||
oneOf:
|
||||
- $ref: '#/SupportCaseDecision'
|
||||
- type: 'null'
|
||||
history:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 200
|
||||
description: 'Every public event in the order it happened, starting with `created`; the list is never truncated. The server keeps a case within 200 events: it rejects a staff reply or status change that would leave no room for the terminal event, so a case always fits and can always be resolved or closed. Further correspondence goes into a new case that references this one as `support_case`.'
|
||||
items:
|
||||
$ref: '#/SupportCaseEvent'
|
||||
created_at:
|
||||
$ref: '#/Timestamp'
|
||||
updated_at:
|
||||
$ref: '#/Timestamp'
|
||||
SupportCaseSummary:
|
||||
type: object
|
||||
description: 'Case in a list: the fields that a list of cases shows, without the description and the history. GetMySupportCase returns the full case.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- number
|
||||
- type
|
||||
- status
|
||||
- object
|
||||
- assessment_target
|
||||
- response_target
|
||||
- decision_outcome
|
||||
- created_at
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Case identifier.
|
||||
number:
|
||||
$ref: '#/SupportCaseNumber'
|
||||
type:
|
||||
$ref: '#/SupportCaseType'
|
||||
status:
|
||||
$ref: '#/SupportCaseStatus'
|
||||
object:
|
||||
description: Object that the case is about, or null.
|
||||
oneOf:
|
||||
- $ref: '#/SupportCaseObjectReference'
|
||||
- type: 'null'
|
||||
assessment_target:
|
||||
description: Category of the case, or null.
|
||||
oneOf:
|
||||
- $ref: '#/SupportCaseAssessmentTarget'
|
||||
- type: 'null'
|
||||
response_target:
|
||||
$ref: '#/SupportResponseTarget'
|
||||
decision_outcome:
|
||||
description: Outcome of the decision once the case is `resolved`, otherwise null.
|
||||
oneOf:
|
||||
- $ref: '#/SupportCaseDecisionOutcome'
|
||||
- type: 'null'
|
||||
created_at:
|
||||
$ref: '#/Timestamp'
|
||||
updated_at:
|
||||
$ref: '#/Timestamp'
|
||||
SupportCaseList:
|
||||
type: object
|
||||
description: One page of the cases of the current account, newest first by creation time.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- items
|
||||
- page
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
maxItems: 100
|
||||
description: Case summaries of the page.
|
||||
items:
|
||||
$ref: '#/SupportCaseSummary'
|
||||
page:
|
||||
$ref: '#/PageInfo'
|
||||
@@ -0,0 +1,630 @@
|
||||
schemas:
|
||||
SupportCaseNumber:
|
||||
type: string
|
||||
minLength: 14
|
||||
maxLength: 18
|
||||
pattern: "^SC-[0-9]{4}-[0-9]{6,10}$"
|
||||
description: >-
|
||||
Human-readable case number that the server assigns on creation, for
|
||||
example `SC-2026-000123`: the prefix `SC`, the UTC year of creation,
|
||||
and a sequence number of at least six digits with leading zeros. The
|
||||
sequence is global and never reused, so the number is unique across
|
||||
every case and year and never changes. The user quotes it in letters
|
||||
and calls; the API addresses a case only by its `id`. Clients show the
|
||||
number as text and never parse it.
|
||||
examples:
|
||||
- SC-2026-000123
|
||||
SupportCaseType:
|
||||
type: string
|
||||
description: |-
|
||||
Kind of the case. It fixes the allowed object reference, the type-specific fields, the response target, and the queue that handles the case.
|
||||
|
||||
- support: a question or a problem, for example an assessment that is not available or a failed sandbox run. Candidate and employer accounts.
|
||||
- complaint: a complaint about an organization or an offer, including a breach of the salary terms or a disclosure of personal data (PRD FR18). Candidate accounts.
|
||||
- grade_appeal: an appeal of a category the caller received: the result of one own assessment attempt, or the outcome of one own resolved manual assessment case. An expert reviews it, and the original result stays in the history. Candidate accounts.
|
||||
- anticheat_appeal: an appeal of an anti-cheat review decision on one own assessment attempt. Candidate accounts.
|
||||
- manual_assessment: a request for a manual assessment of a category by a subject expert with the same rubric, the alternative to automated categorization (consent C3). Candidate accounts.
|
||||
enum:
|
||||
- support
|
||||
- complaint
|
||||
- grade_appeal
|
||||
- anticheat_appeal
|
||||
- manual_assessment
|
||||
SupportCaseStatus:
|
||||
type: string
|
||||
description: |-
|
||||
Processing status of a case. Only the server changes it; no request field sets it. Adding a value is a contract change: generated clients reject an unknown value.
|
||||
|
||||
- submitted: the case was accepted and waits in its queue.
|
||||
- in_review: support or a moderator works on it.
|
||||
- waiting_for_user: support asked the author for more detail. Not set yet: it starts with the planned operation that lets the author reply, and until then no case has this status.
|
||||
- waiting_expert: a grade appeal, an anti-cheat appeal, or a manual assessment waits for a subject expert. The server sets it in the same transaction as the creation of such a case. The case stays here until a person decides; it is never resolved by the passing of time.
|
||||
- resolved: terminal; a decision was made and `decision` holds its outcome and public reason.
|
||||
- closed: terminal; the case ended without a decision on the merits, for example as a duplicate of another case. The last history event says why.
|
||||
enum:
|
||||
- submitted
|
||||
- in_review
|
||||
- waiting_for_user
|
||||
- waiting_expert
|
||||
- resolved
|
||||
- closed
|
||||
SupportCaseObjectType:
|
||||
type: string
|
||||
description: |-
|
||||
Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.
|
||||
|
||||
- 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.
|
||||
- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.
|
||||
enum:
|
||||
- assessment_attempt
|
||||
- organization
|
||||
- invitation
|
||||
- support_case
|
||||
SupportCaseObjectReference:
|
||||
type: object
|
||||
description: >-
|
||||
Typed reference to an object that the case is about. The server checks
|
||||
on creation that the caller may see the object; an unknown object and
|
||||
an object of someone else both answer 404 not_found, so a reference
|
||||
never reveals whether another person's object exists. The case keeps
|
||||
only the type and the identifier, never a copy of the object.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- id
|
||||
properties:
|
||||
type:
|
||||
$ref: "#/schemas/SupportCaseObjectType"
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of the object.
|
||||
SupportCaseAttemptReference:
|
||||
type: object
|
||||
description: >-
|
||||
Reference to an assessment attempt of the caller. Any other object
|
||||
type fails validation.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- id
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- assessment_attempt
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of an assessment attempt of the caller.
|
||||
SupportCaseGradeAppealReference:
|
||||
type: object
|
||||
description: >-
|
||||
Reference to the category that a grade appeal disputes: an assessment
|
||||
attempt of the caller in a terminal state, or a `manual_assessment`
|
||||
case of the caller that is `resolved` with the outcome `assessed`, for
|
||||
a category that an expert assigned without an attempt. Any other object
|
||||
type fails validation.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- id
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- assessment_attempt
|
||||
- support_case
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of the attempt or the case.
|
||||
SupportCaseComplaintReference:
|
||||
type: object
|
||||
description: >-
|
||||
Reference to the object of a complaint: an organization that the caller
|
||||
can see or an invitation addressed to the caller. Any other object type
|
||||
fails validation.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- id
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- organization
|
||||
- invitation
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of the organization or the invitation.
|
||||
SupportCaseAssessmentTarget:
|
||||
type: object
|
||||
description: >-
|
||||
Category that the case is about: a specialization and a grade of the
|
||||
MVP scale. For a manual assessment it is the category to assess; for a
|
||||
support case it is optional context, for example the category whose
|
||||
test is not available.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- specialization
|
||||
- grade
|
||||
properties:
|
||||
specialization:
|
||||
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
|
||||
grade:
|
||||
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
|
||||
SupportCaseComplaintReason:
|
||||
type: string
|
||||
description: |-
|
||||
Ground of a complaint (PRD FR18).
|
||||
|
||||
- organization_conduct: conduct of the organization, for example fraudulent or abusive messages.
|
||||
- offer_content: misleading or discriminatory content of an offer. Requires an invitation reference.
|
||||
- salary_terms_violation: a breach of the salary terms of an offer. Requires an invitation reference.
|
||||
- data_disclosure: a disclosure of the caller's personal data beyond what the caller granted.
|
||||
- other: another ground, explained in the description.
|
||||
enum:
|
||||
- organization_conduct
|
||||
- offer_content
|
||||
- salary_terms_violation
|
||||
- data_disclosure
|
||||
- other
|
||||
SupportCaseDescription:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 4000
|
||||
pattern: \S
|
||||
description: >-
|
||||
What the user asks or reports, as the user wrote it. It must contain at
|
||||
least one character that is not whitespace, so an empty or blank text
|
||||
fails validation with the pointer `/description`; it may contain line
|
||||
breaks. The pattern `\S` uses the ECMAScript white space set in both
|
||||
generated validators: ogen converts it to that set for Go, so a text
|
||||
made only of spaces such as U+00A0, U+2003, or U+3000 fails in the
|
||||
server schema and in Zod alike. ECMAScript white space omits U+0085
|
||||
(NEL), which Go `unicode.IsSpace` includes; the server therefore also
|
||||
rejects a text whose every character is `unicode.IsSpace` or U+FEFF,
|
||||
with the same 400 and the pointer `/description`, while generated Zod
|
||||
accepts a text of NEL. Plain text; clients show it as text, never as HTML. The server
|
||||
stores it as written, shows it only to the author and to the staff of
|
||||
the queue, and never writes it to logs or notifications. Users should
|
||||
not put passwords or other people's contact data into it. Generated
|
||||
Zod validators count UTF-16 code units, so the server stays
|
||||
authoritative for the length.
|
||||
examples:
|
||||
- Тест на Senior пока недоступен, хотя я сдал Middle полгода назад.
|
||||
SupportCasePublicText:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 4000
|
||||
description: >-
|
||||
Text that support or a moderator wrote for the user: a public reply or
|
||||
the public reason of a decision. Plain text; clients show it as text,
|
||||
never as HTML. Internal notes of the staff are never public texts.
|
||||
SupportCaseCreateSupport:
|
||||
type: object
|
||||
description: >-
|
||||
New support case. Both the object reference and the assessment target
|
||||
are optional context; omit what does not apply.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- description
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- support
|
||||
description:
|
||||
$ref: "#/schemas/SupportCaseDescription"
|
||||
object:
|
||||
$ref: "#/schemas/SupportCaseObjectReference"
|
||||
assessment_target:
|
||||
$ref: "#/schemas/SupportCaseAssessmentTarget"
|
||||
SupportCaseCreateComplaint:
|
||||
type: object
|
||||
description: New complaint about an organization or an offer.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- description
|
||||
- complaint_reason
|
||||
- object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- complaint
|
||||
description:
|
||||
$ref: "#/schemas/SupportCaseDescription"
|
||||
complaint_reason:
|
||||
$ref: "#/schemas/SupportCaseComplaintReason"
|
||||
object:
|
||||
$ref: "#/schemas/SupportCaseComplaintReference"
|
||||
SupportCaseCreateGradeAppeal:
|
||||
type: object
|
||||
description: >-
|
||||
New appeal of a category the caller received: the result of an own
|
||||
assessment attempt, or the outcome of an own resolved manual
|
||||
assessment.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- description
|
||||
- object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- grade_appeal
|
||||
description:
|
||||
$ref: "#/schemas/SupportCaseDescription"
|
||||
object:
|
||||
$ref: "#/schemas/SupportCaseGradeAppealReference"
|
||||
SupportCaseCreateAnticheatAppeal:
|
||||
type: object
|
||||
description: New appeal of an anti-cheat review decision on an own assessment attempt.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- description
|
||||
- object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- anticheat_appeal
|
||||
description:
|
||||
$ref: "#/schemas/SupportCaseDescription"
|
||||
object:
|
||||
$ref: "#/schemas/SupportCaseAttemptReference"
|
||||
SupportCaseCreateManualAssessment:
|
||||
type: object
|
||||
description: >-
|
||||
New request for a manual assessment of a category by a subject expert.
|
||||
A prior attempt of the same category is optional context: a failed
|
||||
first test or no attempt at all never blocks the request.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- type
|
||||
- description
|
||||
- assessment_target
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- manual_assessment
|
||||
description:
|
||||
$ref: "#/schemas/SupportCaseDescription"
|
||||
assessment_target:
|
||||
$ref: "#/schemas/SupportCaseAssessmentTarget"
|
||||
object:
|
||||
$ref: "#/schemas/SupportCaseAttemptReference"
|
||||
SupportCaseCreate:
|
||||
description: >-
|
||||
New case, selected by `type`. Each type fixes its required fields and
|
||||
the object types it accepts. The body carries only what the user
|
||||
states: the request has no status, decision, outcome, priority,
|
||||
response target, assignee, moderator, rubric, or contact field, and
|
||||
every variant rejects unknown fields, so a client cannot set any of
|
||||
them. The user and the account come only from the session.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/SupportCaseCreateSupport"
|
||||
- $ref: "#/schemas/SupportCaseCreateComplaint"
|
||||
- $ref: "#/schemas/SupportCaseCreateGradeAppeal"
|
||||
- $ref: "#/schemas/SupportCaseCreateAnticheatAppeal"
|
||||
- $ref: "#/schemas/SupportCaseCreateManualAssessment"
|
||||
SupportResponseTarget:
|
||||
type: object
|
||||
description: >-
|
||||
Operational target for the answer to the case (PRD FR18: a case gets a
|
||||
number, a status, and a response deadline). The server fixes it on
|
||||
creation from the product policy version and the configured business
|
||||
calendar; it is a goal of the team, not a deadline set by law. The
|
||||
target is met by the first public reply, a decision, or a closure for
|
||||
`support` and `complaint`, and only by a decision or a closure for the
|
||||
appeals and `manual_assessment`. Missing the target never closes the
|
||||
case, never decides it, and never changes a grade.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- kind
|
||||
- business_days
|
||||
- due_at
|
||||
- answered_at
|
||||
- late
|
||||
- policy_version
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
enum:
|
||||
- operational_goal
|
||||
description: >-
|
||||
Nature of the target. `operational_goal` is a goal of the team
|
||||
that clients label as such, never as a legal deadline.
|
||||
business_days:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 1
|
||||
maximum: 60
|
||||
description: >-
|
||||
Length of the target in business days of the policy version, for
|
||||
example 5 for a manual assessment and 10 for an appeal.
|
||||
due_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
answered_at:
|
||||
description: Time the target was met, or null while it is not.
|
||||
oneOf:
|
||||
- $ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
- type: "null"
|
||||
late:
|
||||
type: boolean
|
||||
description: >-
|
||||
Whether the target was missed: it was met after `due_at`, or it is
|
||||
not met and `due_at` has passed at the time of the response.
|
||||
policy_version:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 1
|
||||
description: Number of the `product` policy version that fixed the target.
|
||||
SupportCaseDecisionOutcome:
|
||||
type: string
|
||||
description: |-
|
||||
Outcome of a decision as the user sees it. The allowed outcomes depend on the case type.
|
||||
|
||||
- upheld: the appeal or the complaint is upheld in full.
|
||||
- partially_upheld: the appeal or the complaint is upheld in part.
|
||||
- not_upheld: the appeal or the complaint is not upheld.
|
||||
- answered: a support case was answered.
|
||||
- assessed: the expert finished a manual assessment. The resulting category is part of the assessment results, not of the case.
|
||||
enum:
|
||||
- upheld
|
||||
- partially_upheld
|
||||
- not_upheld
|
||||
- answered
|
||||
- assessed
|
||||
SupportCaseDecision:
|
||||
type: object
|
||||
description: >-
|
||||
Decision visible to the user. It exists only once the case is
|
||||
`resolved`. It holds the outcome and the public reason; it never names
|
||||
the moderator or the expert and never contains internal notes,
|
||||
evidence, sanctions against another party, or risk signals. An upheld
|
||||
grade appeal never rewrites the original result: the corrected result
|
||||
is a separate decision of the assessment, and both stay in the history
|
||||
of that attempt.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- outcome
|
||||
- reason
|
||||
- decided_at
|
||||
properties:
|
||||
outcome:
|
||||
$ref: "#/schemas/SupportCaseDecisionOutcome"
|
||||
reason:
|
||||
$ref: "#/schemas/SupportCasePublicText"
|
||||
decided_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
SupportCaseActorKind:
|
||||
type: string
|
||||
description: |-
|
||||
Who caused an event, by kind only. A case never names or identifies a moderator, an expert, or a support agent; experts and moderators of TASK-316 and TASK-323 are `support` too. Adding a value is a contract change.
|
||||
|
||||
- user: the author of the case.
|
||||
- support: a person of the support, moderation, or expert staff.
|
||||
- system: the server, for example on creation or when it routes the case.
|
||||
enum:
|
||||
- user
|
||||
- support
|
||||
- system
|
||||
SupportCaseEventKind:
|
||||
type: string
|
||||
description: |-
|
||||
Kind of a public history event. Adding a value is a contract change. A reply of the author, planned with `waiting_for_user`, is a `reply` with the actor `user`, and a later revision of a decision (TASK-317) is another `decision` event, so neither needs a new value.
|
||||
|
||||
- created: the case was created; `status` is `submitted`. For an appeal or a manual assessment, a `status_changed` event of the actor `system` to `waiting_expert` follows in the same transaction.
|
||||
- status_changed: the status changed; `status` is the new status, and `message` may explain a closure.
|
||||
- reply: support replied; `message` holds the reply and `status` is null.
|
||||
- decision: a decision was made; `status` is `resolved` and `message` holds the public reason.
|
||||
enum:
|
||||
- created
|
||||
- status_changed
|
||||
- reply
|
||||
- decision
|
||||
SupportCaseEvent:
|
||||
type: object
|
||||
description: >-
|
||||
One public event of the case history. Internal notes, assignments,
|
||||
evidence requests, and risk signals are never history events.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- sequence
|
||||
- kind
|
||||
- actor
|
||||
- occurred_at
|
||||
- status
|
||||
- message
|
||||
properties:
|
||||
sequence:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 1
|
||||
description: Position of the event in the history, starting at 1 and increasing by one.
|
||||
kind:
|
||||
$ref: "#/schemas/SupportCaseEventKind"
|
||||
actor:
|
||||
$ref: "#/schemas/SupportCaseActorKind"
|
||||
occurred_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
status:
|
||||
description: Status of the case after the event, or null for a reply.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/SupportCaseStatus"
|
||||
- type: "null"
|
||||
message:
|
||||
description: Public text of the event, or null.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/SupportCasePublicText"
|
||||
- type: "null"
|
||||
SupportCase:
|
||||
type: object
|
||||
description: >-
|
||||
Case of the current account. It contains what the author sent, the
|
||||
public processing state, and the public history. It never contains
|
||||
the identity of a moderator, an expert, or a support agent, internal
|
||||
notes, evidence, assessment answers or anti-cheat signals, risk
|
||||
signals, or contact data of another person. Fields that do not apply
|
||||
to the type are null.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- number
|
||||
- type
|
||||
- status
|
||||
- description
|
||||
- object
|
||||
- assessment_target
|
||||
- complaint_reason
|
||||
- rubric_version
|
||||
- response_target
|
||||
- decision
|
||||
- history
|
||||
- created_at
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Case identifier.
|
||||
number:
|
||||
$ref: "#/schemas/SupportCaseNumber"
|
||||
type:
|
||||
$ref: "#/schemas/SupportCaseType"
|
||||
status:
|
||||
$ref: "#/schemas/SupportCaseStatus"
|
||||
description:
|
||||
$ref: "#/schemas/SupportCaseDescription"
|
||||
object:
|
||||
description: >-
|
||||
Object that the case is about, as sent on creation, or null when
|
||||
the case has none.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/SupportCaseObjectReference"
|
||||
- type: "null"
|
||||
assessment_target:
|
||||
description: >-
|
||||
Category of a manual assessment, the optional category of a
|
||||
support case, or null.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/SupportCaseAssessmentTarget"
|
||||
- type: "null"
|
||||
complaint_reason:
|
||||
description: Ground of a complaint, or null for other types.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/SupportCaseComplaintReason"
|
||||
- type: "null"
|
||||
rubric_version:
|
||||
type:
|
||||
- integer
|
||||
- "null"
|
||||
format: int32
|
||||
minimum: 1
|
||||
description: >-
|
||||
For a manual assessment, the version of the published rubric of the
|
||||
category that the server fixed on creation; the expert assesses with
|
||||
it, the same rubric as the automated assessment. Null for other
|
||||
types, and null for a manual assessment whose category has no
|
||||
published rubric yet: the case then waits in `waiting_expert` and
|
||||
the client says so instead of promising a date.
|
||||
response_target:
|
||||
$ref: "#/schemas/SupportResponseTarget"
|
||||
decision:
|
||||
description: Decision once the case is `resolved`, otherwise null.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/SupportCaseDecision"
|
||||
- type: "null"
|
||||
history:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 200
|
||||
description: >-
|
||||
Every public event in the order it happened, starting with
|
||||
`created`; the list is never truncated. The server keeps a case
|
||||
within 200 events: it rejects a staff reply or status change that
|
||||
would leave no room for the terminal event, so a case always fits
|
||||
and can always be resolved or closed. Further correspondence goes
|
||||
into a new case that references this one as `support_case`.
|
||||
items:
|
||||
$ref: "#/schemas/SupportCaseEvent"
|
||||
created_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
updated_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
SupportCaseSummary:
|
||||
type: object
|
||||
description: >-
|
||||
Case in a list: the fields that a list of cases shows, without the
|
||||
description and the history. GetMySupportCase returns the full case.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- number
|
||||
- type
|
||||
- status
|
||||
- object
|
||||
- assessment_target
|
||||
- response_target
|
||||
- decision_outcome
|
||||
- created_at
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Case identifier.
|
||||
number:
|
||||
$ref: "#/schemas/SupportCaseNumber"
|
||||
type:
|
||||
$ref: "#/schemas/SupportCaseType"
|
||||
status:
|
||||
$ref: "#/schemas/SupportCaseStatus"
|
||||
object:
|
||||
description: Object that the case is about, or null.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/SupportCaseObjectReference"
|
||||
- type: "null"
|
||||
assessment_target:
|
||||
description: Category of the case, or null.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/SupportCaseAssessmentTarget"
|
||||
- type: "null"
|
||||
response_target:
|
||||
$ref: "#/schemas/SupportResponseTarget"
|
||||
decision_outcome:
|
||||
description: Outcome of the decision once the case is `resolved`, otherwise null.
|
||||
oneOf:
|
||||
- $ref: "#/schemas/SupportCaseDecisionOutcome"
|
||||
- type: "null"
|
||||
created_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
updated_at:
|
||||
$ref: "./common_schemas.yml#/schemas/Timestamp"
|
||||
SupportCaseList:
|
||||
type: object
|
||||
description: One page of the cases of the current account, newest first by creation time.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- items
|
||||
- page
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
maxItems: 100
|
||||
description: Case summaries of the page.
|
||||
items:
|
||||
$ref: "#/schemas/SupportCaseSummary"
|
||||
page:
|
||||
$ref: "./common_schemas.yml#/schemas/PageInfo"
|
||||
File diff suppressed because it is too large.
Load diff
@@ -32,6 +32,13 @@ 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: support
|
||||
description: >-
|
||||
Support cases of the current account: questions, complaints, appeals
|
||||
of a grade or an anti-cheat decision, and manual assessment requests.
|
||||
The author sees the number, the status, the response target, the
|
||||
decision, and the public history; moderators and internal notes stay
|
||||
hidden.
|
||||
# Operations require a session unless they declare `security: []`, so a new
|
||||
# operation that omits security is protected by default.
|
||||
security:
|
||||
@@ -73,6 +80,10 @@ paths:
|
||||
$ref: ./routes/organization_needs.yml
|
||||
/api/v1/organizations/{org_id}/needs/{need_id}:
|
||||
$ref: ./routes/organization_need.yml
|
||||
/api/v1/me/support-cases:
|
||||
$ref: ./routes/support_cases.yml
|
||||
/api/v1/me/support-cases/{case_id}:
|
||||
$ref: ./routes/support_case.yml
|
||||
components:
|
||||
schemas:
|
||||
Problem:
|
||||
@@ -381,6 +392,60 @@ components:
|
||||
$ref: ./components/schemas.yml#/NeedCreate
|
||||
NeedUpdate:
|
||||
$ref: ./components/schemas.yml#/NeedUpdate
|
||||
SupportCaseNumber:
|
||||
$ref: ./components/schemas.yml#/SupportCaseNumber
|
||||
SupportCaseType:
|
||||
$ref: ./components/schemas.yml#/SupportCaseType
|
||||
SupportCaseStatus:
|
||||
$ref: ./components/schemas.yml#/SupportCaseStatus
|
||||
SupportCaseObjectType:
|
||||
$ref: ./components/schemas.yml#/SupportCaseObjectType
|
||||
SupportCaseObjectReference:
|
||||
$ref: ./components/schemas.yml#/SupportCaseObjectReference
|
||||
SupportCaseAttemptReference:
|
||||
$ref: ./components/schemas.yml#/SupportCaseAttemptReference
|
||||
SupportCaseGradeAppealReference:
|
||||
$ref: ./components/schemas.yml#/SupportCaseGradeAppealReference
|
||||
SupportCaseComplaintReference:
|
||||
$ref: ./components/schemas.yml#/SupportCaseComplaintReference
|
||||
SupportCaseAssessmentTarget:
|
||||
$ref: ./components/schemas.yml#/SupportCaseAssessmentTarget
|
||||
SupportCaseComplaintReason:
|
||||
$ref: ./components/schemas.yml#/SupportCaseComplaintReason
|
||||
SupportCaseDescription:
|
||||
$ref: ./components/schemas.yml#/SupportCaseDescription
|
||||
SupportCasePublicText:
|
||||
$ref: ./components/schemas.yml#/SupportCasePublicText
|
||||
SupportCaseCreateSupport:
|
||||
$ref: ./components/schemas.yml#/SupportCaseCreateSupport
|
||||
SupportCaseCreateComplaint:
|
||||
$ref: ./components/schemas.yml#/SupportCaseCreateComplaint
|
||||
SupportCaseCreateGradeAppeal:
|
||||
$ref: ./components/schemas.yml#/SupportCaseCreateGradeAppeal
|
||||
SupportCaseCreateAnticheatAppeal:
|
||||
$ref: ./components/schemas.yml#/SupportCaseCreateAnticheatAppeal
|
||||
SupportCaseCreateManualAssessment:
|
||||
$ref: ./components/schemas.yml#/SupportCaseCreateManualAssessment
|
||||
SupportCaseCreate:
|
||||
$ref: ./components/schemas.yml#/SupportCaseCreate
|
||||
SupportResponseTarget:
|
||||
$ref: ./components/schemas.yml#/SupportResponseTarget
|
||||
SupportCaseDecisionOutcome:
|
||||
$ref: ./components/schemas.yml#/SupportCaseDecisionOutcome
|
||||
SupportCaseDecision:
|
||||
$ref: ./components/schemas.yml#/SupportCaseDecision
|
||||
SupportCaseActorKind:
|
||||
$ref: ./components/schemas.yml#/SupportCaseActorKind
|
||||
SupportCaseEventKind:
|
||||
$ref: ./components/schemas.yml#/SupportCaseEventKind
|
||||
SupportCaseEvent:
|
||||
$ref: ./components/schemas.yml#/SupportCaseEvent
|
||||
SupportCase:
|
||||
$ref: ./components/schemas.yml#/SupportCase
|
||||
SupportCaseSummary:
|
||||
$ref: ./components/schemas.yml#/SupportCaseSummary
|
||||
SupportCaseList:
|
||||
$ref: ./components/schemas.yml#/SupportCaseList
|
||||
parameters:
|
||||
IdempotencyKey:
|
||||
$ref: ./components/parameters.yml#/IdempotencyKey
|
||||
@@ -396,6 +461,8 @@ components:
|
||||
$ref: ./components/parameters.yml#/OrganizationId
|
||||
NeedId:
|
||||
$ref: ./components/parameters.yml#/NeedId
|
||||
SupportCaseId:
|
||||
$ref: ./components/parameters.yml#/SupportCaseId
|
||||
headers:
|
||||
ETag:
|
||||
$ref: ./components/headers.yml#/ETag
|
||||
@@ -468,6 +535,10 @@ components:
|
||||
$ref: ./components/responses.yml#/NeedValidationFailed
|
||||
NeedVersionConflict:
|
||||
$ref: ./components/responses.yml#/NeedVersionConflict
|
||||
SupportCaseValidationFailed:
|
||||
$ref: ./components/responses.yml#/SupportCaseValidationFailed
|
||||
SupportCaseCreateConflict:
|
||||
$ref: ./components/responses.yml#/SupportCaseCreateConflict
|
||||
securitySchemes:
|
||||
sessionCookie:
|
||||
type: apiKey
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
get:
|
||||
operationId: GetMySupportCase
|
||||
summary: Read a support case of the current account.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate or an employer account. Returns the case with its number, type, object reference, status, response target, decision, and public history. The owner reads the case whatever happened to the object since then: a revoked access, a closed invitation, or a refused test never hides the case from its author.
|
||||
|
||||
The case never contains the identity of a moderator, an expert, or a support agent, internal notes, evidence, assessment answers, anti-cheat or risk signals, or contact data of another person. `decision` is null until the case is `resolved`.
|
||||
|
||||
The history lists every public event and is never truncated: the server keeps a case within 200 events by rejecting a staff event that would leave no room for the terminal one.
|
||||
|
||||
The case must belong to the account of the session: a case of another account, including another member of the same organization, answers 404 not_found, the same as an unknown identifier, so identifiers cannot be probed. TASK-314 says forbidden for a foreign case URL; the contract answers 404 instead, so the client shows the same "not found" state for a foreign and an unknown case. A malformed `case_id` answers 400 validation_failed with the path pointer.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
tags:
|
||||
- support
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/SupportCaseId
|
||||
responses:
|
||||
"200":
|
||||
description: The case.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/SupportCase
|
||||
examples:
|
||||
manual_assessment_created:
|
||||
$ref: ../components/examples.yml#/SupportCaseManualAssessmentCreated
|
||||
grade_appeal_resolved:
|
||||
$ref: ../components/examples.yml#/SupportCaseGradeAppealResolved
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/ValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
@@ -0,0 +1,122 @@
|
||||
get:
|
||||
operationId: ListMySupportCases
|
||||
summary: List the support cases of the current account.
|
||||
description: |-
|
||||
Requires the session cookie of a candidate or an employer account. Returns a page of the cases that this account created, newest first by creation time with the identifier as the tie-breaker, with cursor pagination. Each item is a summary with the number, type, status, object reference, category, response target, and decision outcome; it has no description and no history, which GetMySupportCase returns with the full case. Cases of other accounts are never listed, including cases of other members of the same organization.
|
||||
|
||||
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated. A malformed `limit` or `cursor` answers 400 validation_failed. Filters by status and type are planned and add optional parameters.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
tags:
|
||||
- support
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/PageLimit
|
||||
- $ref: ../components/parameters.yml#/PageCursor
|
||||
responses:
|
||||
"200":
|
||||
description: A page of the cases of the current account.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/SupportCaseList
|
||||
examples:
|
||||
last_page:
|
||||
$ref: ../components/examples.yml#/SupportCaseListPage
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/ValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
post:
|
||||
operationId: CreateMySupportCase
|
||||
summary: Open a support case, a complaint, an appeal, or a manual assessment request.
|
||||
description: |-
|
||||
Requires the session cookie, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The author is the account of the session; the body has no user, account, or organization field. A case is reachable from any screen, including a screen that denies access to an assessment: being refused an action never removes the path to a case about it.
|
||||
|
||||
The client sends only what the user states: `type`, a non-blank `description`, and the fields of the type. It never sets the status, the decision, the outcome, the priority, the response target, the rubric, the assignee, or the moderator: every variant has `additionalProperties: false`, so such fields answer 400. Attachments are not part of the MVP; they are planned as an optional field and change no existing one.
|
||||
|
||||
Types, accounts, and allowed references:
|
||||
|
||||
| Type | Accounts | Object reference | Other fields |
|
||||
| --- | --- | --- | --- |
|
||||
| `support` | candidate, employer | optional; `assessment_attempt` of the caller, an `organization` that the caller can see, an `invitation` addressed to the caller, or another `support_case` of the caller | optional `assessment_target` |
|
||||
| `complaint` | candidate | required; an `organization` that the caller can see or an `invitation` addressed to the caller | required `complaint_reason`; `offer_content` and `salary_terms_violation` require an invitation |
|
||||
| `grade_appeal` | candidate | required; `assessment_attempt` of the caller in a terminal state, so it has a result, or a `support_case` of the caller of type `manual_assessment` that is `resolved` with the outcome `assessed`, for a category that an expert assigned without an attempt | none |
|
||||
| `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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Description check: the schema pattern `\S` uses the ECMAScript white space set in both generated validators (ogen converts it for Go), so a description of spaces such as U+00A0 or U+3000 already fails validation with the pointer `/description`. ECMAScript white space omits U+0085 (NEL), which Go `unicode.IsSpace` includes, so the server also applies a domain check: a description whose every character is `unicode.IsSpace` or U+FEFF answers 400 validation_failed with the pointer `/description`. This check comes with the implementation; generated Zod accepts a description of NEL, and the server stays authoritative.
|
||||
|
||||
The new case gets a number and the status `submitted`. A grade appeal, an anti-cheat appeal, and a manual assessment are moved to `waiting_expert` by a `system` event in the same transaction, so the 201 already shows that status with both events; a support case and a complaint stay `submitted`. Each case gets a response target from the product policy version and the configured business calendar: 5 business days for a manual assessment and 10 for an appeal (PRD FR18 and C3), and a policy value for support and complaints. The target is an operational goal, not a deadline set by law. A manual assessment fixes the published rubric version of the category, or null when the category has none yet; the expert assesses with the same rubric as the automated assessment, and the request assigns no category by itself. Creating a case never grants, revokes, or changes a consent, a grade, or an attempt.
|
||||
|
||||
Replies: the case itself is the channel. Support replies and decisions appear in the public `history` and `decision`. The server may also notify the verified email address of the account that the case changed, with the case number and a link, never with the description, the reply, or assessment details. No request field names another address or contact, so the operation cannot send mail to an address that the user typed.
|
||||
|
||||
Idempotency: a retry with the same key and body within 24 hours replays the stored 201 with the same number and creates nothing, so a lost response never opens a second case. The replay is the snapshot stored at creation, following the repository convention; the client reads the current status and history with GetMySupportCase. 404 and 409 state_conflict are stored and replayed as well. A different body with the same key answers 422 idempotency_key_reused. 400, 403, 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 an employer account with a type other than `support`), the per-account case limit (429), the Idempotency-Key (422, 409 idempotency_in_progress, replay), domain rules (400 with the pointer `/description` for a text of only Unicode spaces or `/object/type` for a complaint reason that requires an invitation), the object reference (404 not_found), then the state of the object and the limits (409 state_conflict). The general rate limit can answer 429 with Retry-After before any check.
|
||||
security:
|
||||
- sessionCookie: []
|
||||
sessionCsrf: []
|
||||
tags:
|
||||
- support
|
||||
parameters:
|
||||
- $ref: ../components/parameters.yml#/IdempotencyKey
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/SupportCaseCreate
|
||||
examples:
|
||||
manual_assessment:
|
||||
$ref: ../components/examples.yml#/SupportCaseCreateManualAssessment
|
||||
own_grade_appeal:
|
||||
$ref: ../components/examples.yml#/SupportCaseCreateGradeAppeal
|
||||
appeal_of_manual_assessment:
|
||||
$ref: ../components/examples.yml#/SupportCaseCreateCategoryAppeal
|
||||
test_unavailable:
|
||||
$ref: ../components/examples.yml#/SupportCaseCreateTestUnavailable
|
||||
salary_terms_complaint:
|
||||
$ref: ../components/examples.yml#/SupportCaseCreateComplaint
|
||||
responses:
|
||||
"201":
|
||||
description: >-
|
||||
The case was created, with the status `submitted` or, for an appeal
|
||||
or a manual assessment, `waiting_expert`; or a retry with the same
|
||||
Idempotency-Key replayed the stored creation response.
|
||||
headers:
|
||||
Cache-Control:
|
||||
$ref: ../components/headers.yml#/CacheControlNoStore
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas.yml#/SupportCase
|
||||
examples:
|
||||
manual_assessment:
|
||||
$ref: ../components/examples.yml#/SupportCaseManualAssessmentCreated
|
||||
"400":
|
||||
$ref: ../components/responses.yml#/SupportCaseValidationFailed
|
||||
"401":
|
||||
$ref: ../components/responses.yml#/Unauthenticated
|
||||
"403":
|
||||
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
|
||||
"404":
|
||||
$ref: ../components/responses.yml#/NotFound
|
||||
"409":
|
||||
$ref: ../components/responses.yml#/SupportCaseCreateConflict
|
||||
"422":
|
||||
$ref: ../components/responses.yml#/UnprocessableContent
|
||||
"429":
|
||||
$ref: ../components/responses.yml#/TooManyRequests
|
||||
default:
|
||||
$ref: ../components/responses.yml#/Problem
|
||||
Reference in new issue
Block a user