50 lines
7.0 KiB
TypeScript
50 lines
7.0 KiB
TypeScript
/**
|
|
* Generated by orval 🍺
|
|
* Do not edit manually.
|
|
* Lincodex API
|
|
* OpenAPI spec version: 0.1.0
|
|
*/
|
|
import * as zod from 'zod';
|
|
|
|
export const candidateQuestionnaireVersionMin = 0;
|
|
|
|
export const candidateQuestionnaireSpecializationsItemTaskLanguagesMax = 2;
|
|
|
|
export const candidateQuestionnaireSpecializationsItemStackItemMax = 50;
|
|
|
|
|
|
export const candidateQuestionnaireSpecializationsItemStackItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
|
export const candidateQuestionnaireSpecializationsItemStackMax = 20;
|
|
|
|
export const candidateQuestionnaireSpecializationsItemExperienceOneCommercialMonthsMin = 0;
|
|
export const candidateQuestionnaireSpecializationsItemExperienceOneCommercialMonthsMax = 600;
|
|
|
|
export const candidateQuestionnaireSpecializationsItemExperienceOneAcademicMonthsMin = 0;
|
|
export const candidateQuestionnaireSpecializationsItemExperienceOneAcademicMonthsMax = 600;
|
|
|
|
export const candidateQuestionnaireSpecializationsMax = 2;
|
|
|
|
export const candidateQuestionnaireWorkContextOneWorkFormatsMax = 3;
|
|
|
|
|
|
export const CandidateQuestionnaire = zod.object({
|
|
"version": zod.int().min(candidateQuestionnaireVersionMin).describe('Version of the candidate questionnaire. A candidate without a saved questionnaire has version 0; every save that changes the questionnaire advances it by one.'),
|
|
"specializations": zod.array(zod.object({
|
|
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
|
|
"self_assessed_grade": zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),
|
|
"task_languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(candidateQuestionnaireSpecializationsItemTaskLanguagesMax).describe('Task languages in which the candidate wants to solve assessment tasks of this specialization. Each value must be one of `test_availability.task_languages` of the specialization in the current catalog; any other value answers 400 validation_failed with a pointer to it. Empty when the bank offers no choice of language.'),
|
|
"stack": zod.array(zod.string().min(1).max(candidateQuestionnaireSpecializationsItemStackItemMax).regex(candidateQuestionnaireSpecializationsItemStackItemRegExp).describe('Free technology tag of the candidate\'s stack, for example PostgreSQL, Kubernetes, or Django. A tag is a descriptive attribute: it never forms a category, never selects the task language, and never changes a grade, so a tag such as "Senior" has no effect on any category. It has no leading or trailing whitespace and no line breaks. The server compares tags without regard to letter case. Clients show tags as text, never as HTML.')).max(candidateQuestionnaireSpecializationsItemStackMax).describe('Technology tags of the candidate in this specialization.'),
|
|
"experience": zod.union([zod.object({
|
|
"commercial_months": zod.int().min(candidateQuestionnaireSpecializationsItemExperienceOneCommercialMonthsMin).max(candidateQuestionnaireSpecializationsItemExperienceOneCommercialMonthsMax).describe('Months of commercial work in the specialization.'),
|
|
"academic_months": zod.int().min(candidateQuestionnaireSpecializationsItemExperienceOneAcademicMonthsMin).max(candidateQuestionnaireSpecializationsItemExperienceOneAcademicMonthsMax).describe('Months of study, internships, or academic projects in the specialization.')
|
|
}).describe('Experience that the candidate states for one specialization, in whole months. It is self-reported context: it never adds assessment points and never confirms a grade.'),zod.null()]).describe('Stated experience, or null when the candidate did not state it.')
|
|
}).describe('One specialization chosen by the candidate with the candidate\'s self-assessment. `self_assessed_grade` is a claim: it influences where the assessment starts and which grade the assessment step offers first, but it adds no points and never becomes a confirmed grade. A confirmed grade, and with it a category, comes only from an assessment result and is never part of the questionnaire; unknown fields such as `confirmed_grade` or `category` are rejected. Task languages and the stack are attributes of the chosen specialization, not categories.')).max(candidateQuestionnaireSpecializationsMax).describe('Chosen specializations in the order the candidate gave them, each specialization at most once. Each one is assessed independently.'),
|
|
"work_context": zod.union([zod.object({
|
|
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(candidateQuestionnaireWorkContextOneWorkFormatsMax).describe('Acceptable work formats.')
|
|
}).describe('Working context of the candidate\'s search. It holds no personal data such as an address or a city; location, relocation, and salary expectations belong to the candidate profile.'),zod.null()]).describe('Working context, or null before the first save.'),
|
|
"updated_at": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Time of the last change, or null before the first save.')
|
|
}).describe('Questionnaire of the current candidate: the chosen specializations with self-assessed grades and the working context. It never contains a confirmed grade or a category; those come only from assessment results. A candidate who has not saved the questionnaire yet gets version 0, no specializations, and null `work_context` and `updated_at`.')
|
|
|
|
export type CandidateQuestionnaire = zod.input<typeof CandidateQuestionnaire>;
|
|
export type CandidateQuestionnaireOutput = zod.output<typeof CandidateQuestionnaire>;
|