129 lines
18 KiB
TypeScript
129 lines
18 KiB
TypeScript
/**
|
|
* Generated by orval 🍺
|
|
* Do not edit manually.
|
|
* Lincodex API
|
|
* OpenAPI spec version: 0.1.0
|
|
*/
|
|
import * as zod from 'zod';
|
|
|
|
|
|
export const assessmentRealResultCommonVersionsBankVersionMax = 64;
|
|
|
|
|
|
export const assessmentRealResultCommonVersionsBankVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
|
export const assessmentRealResultCommonVersionsAlgorithmVersionMax = 64;
|
|
|
|
|
|
export const assessmentRealResultCommonVersionsAlgorithmVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
|
export const assessmentRealResultCommonLimitationsMax = 10;
|
|
|
|
export const assessmentRealResultCommonUncertaintyOneStandardErrorMin = 0;
|
|
|
|
export const assessmentRealResultCommonUncertaintyOnePGradeMin = 0;
|
|
export const assessmentRealResultCommonUncertaintyOnePGradeMax = 1;
|
|
|
|
export const assessmentRealResultCommonBasicScoreOnePointsMin = 0;
|
|
|
|
|
|
|
|
export const assessmentRealResultCommonPracticesItemVerdictScoreMin = 0;
|
|
export const assessmentRealResultCommonPracticesItemVerdictScoreMax = 3;
|
|
|
|
export const assessmentRealResultCommonPracticesItemVerdictMaxScoreMin = 3;
|
|
export const assessmentRealResultCommonPracticesItemVerdictMaxScoreMax = 3;
|
|
|
|
export const assessmentRealResultCommonPracticesItemVerdictGroupsItemGroupMax = 3;
|
|
|
|
export const assessmentRealResultCommonPracticesItemVerdictGroupsMin = 3;
|
|
export const assessmentRealResultCommonPracticesItemVerdictGroupsMax = 3;
|
|
|
|
export const assessmentRealResultCommonPracticesMax = 5;
|
|
|
|
export const assessmentRealResultCommonGapsItemDomainMax = 64;
|
|
|
|
|
|
export const assessmentRealResultCommonGapsItemDomainRegExp = new RegExp('^[a-z0-9_]+$');
|
|
export const assessmentRealResultCommonGapsItemTitleMax = 200;
|
|
|
|
export const assessmentRealResultCommonGapsMax = 20;
|
|
|
|
export const assessmentRealResultCommonDurationsItemsSecondsMin = 0;
|
|
|
|
export const assessmentRealResultCommonDurationsPracticeSecondsMin = 0;
|
|
|
|
export const assessmentRealResultCommonNextStepsMax = 5;
|
|
|
|
|
|
export const AssessmentRealResultCommon = zod.object({
|
|
"attempt_id": zod.uuid(),
|
|
"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.'),
|
|
"target_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.'),
|
|
"root_attempt_id": zod.union([zod.uuid(),zod.null()]).exactOptional().describe('Root attempt of a corrective check, or null when this is not a corrective result. The corrective attempt keeps this link.'),
|
|
"chain_deadline": 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()]).exactOptional().describe('Immutable deadline shared by a corrective chain, or null when this result is not from a corrective check.'),
|
|
"task_language": zod.union([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.'),zod.null()]),
|
|
"kind": zod.enum(['root', 'corrective']),
|
|
"mode": zod.enum(['demo_basic', 'adaptive']),
|
|
"versions": zod.object({
|
|
"policy_version": zod.int().min(1).describe('Number of the `product` policy version whose assessment rules apply: thresholds, stop rules, item limits, time and session limits, and retry intervals.'),
|
|
"bank_version": zod.string().min(1).max(assessmentRealResultCommonVersionsBankVersionMax).regex(assessmentRealResultCommonVersionsBankVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.'),
|
|
"algorithm_version": zod.string().min(1).max(assessmentRealResultCommonVersionsAlgorithmVersionMax).regex(assessmentRealResultCommonVersionsAlgorithmVersionRegExp).describe('Opaque identifier of a published version, for example `backend-demo.2026-10.1`. Clients show it as text and never parse it.')
|
|
}).describe('Versions fixed when the attempt was created. They never change during the attempt, and a result is always reproduced from the stored answers with these versions; a later policy, bank, or algorithm version does not rewrite it.'),
|
|
"outcome": zod.enum(['confirmed', 'not_confirmed', 'not_determined']).describe('Grade decision of the attempt.\n\n- confirmed: the target grade is confirmed by the rule of the recorded policy version.\n- not_confirmed: the evidence is below the rule, including an adaptive attempt whose probability stayed below confirmation after the additional practice, or whose additional practice was declined or not submitted in time. The previously confirmed grade, if any, stays in force.\n- not_determined: the attempt gives no decision; `not_determined_reason` says why. The previously confirmed grade stays in force.\n\nA failed, expired, or flagged attempt never lowers a confirmed grade.'),
|
|
"not_determined_reason": zod.union([zod.enum(['expired', 'practice_incomplete', 'insufficient_bank', 'sandbox_unavailable']).describe('Why an attempt gives no decision. One root quota slot is reserved when a real root attempt starts; corrective checks in its chain do not reserve another slot.\n\n- expired: the time or session limit passed before the candidate finished the item part. Retry timing follows the recorded policy; a correction uses the existing root slot and does not reset the chain deadline or 30/90-day timers.\n- practice_incomplete: the item part was done, but the candidate did not submit the main practice before the limit. Retry timing follows the recorded policy; a correction uses the existing root slot and does not reset the chain deadline or 30/90-day timers.\n- insufficient_bank: the bank could not supply required coverage. A preflight refusal creates no attempt or root slot; a bank failure in an existing chain does not create a free new chain or another root slot.\n- sandbox_unavailable: the latest submission of a required or additional practice ended `failed` because of the sandbox infrastructure, and the limit passed before a verdict. It is a platform fault and does not create a new root slot or a free chain.'),zod.null()]).describe('The reason when `outcome` is `not_determined`, otherwise null.'),
|
|
"confirmed_grade": zod.union([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.'),zod.null()]).describe('Grade that this attempt confirmed, the target grade, or null when it confirmed none. Together with the specialization it forms the category.'),
|
|
"previous_confirmed_grade": zod.union([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.'),zod.null()]).describe('Confirmed grade of the specialization before this attempt, or null. When the attempt confirmed nothing, this grade stays in force.'),
|
|
"category_decision": zod.object({
|
|
"status": zod.enum(['not_eligible', 'not_confirmed', 'assigned', 'unchanged']),
|
|
"previous_confirmed_grade": zod.union([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.'),zod.null()]),
|
|
"current_confirmed_grade": zod.union([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.'),zod.null()]),
|
|
"method": zod.union([zod.enum(['demo_basic_pass_mark']),zod.null()]),
|
|
"source": zod.union([zod.enum(['synthetic_demo']),zod.null()]),
|
|
"calibration_status": zod.union([zod.enum(['uncalibrated', 'calibrated']).describe('Whether the thresholds of the recorded policy version are empirically calibrated. `uncalibrated` results are provisional: their thresholds come from expert judgement, and their probabilities are not claimed to be calibrated.'),zod.null()])
|
|
}).exactOptional().describe('Category decision captured when this result was stored. It is absent from legacy v1 results because their current grade cannot be inferred later. It never exposes review identifiers, private answers, or the candidate\'s current category after this decision.'),
|
|
"strength": zod.union([zod.enum(['high', 'medium']).describe('Strength of an adaptive confirmation: `high` or `medium`, by the probability bands of the recorded policy version.'),zod.null()]).describe('Strength of an adaptive confirmation, otherwise null.'),
|
|
"calibration_status": zod.enum(['uncalibrated', 'calibrated']).describe('Whether the thresholds of the recorded policy version are empirically calibrated. `uncalibrated` results are provisional: their thresholds come from expert judgement, and their probabilities are not claimed to be calibrated.'),
|
|
"limitations": zod.array(zod.enum(['uncalibrated_thresholds', 'demo_bank', 'practice_not_included', 'unproctored']).describe('Known limitation of the method behind a real-assessment result, shown with the result.\n\n- uncalibrated_thresholds: the thresholds are not yet validated on a pilot.\n- demo_bank: the result comes from the small reviewed demo bank.\n- practice_not_included: the attempt had no code practice because the sandbox was not enabled.\n- unproctored: the attempt was taken online without supervision.\nAdding a value is a contract change.')).max(assessmentRealResultCommonLimitationsMax),
|
|
"uncertainty": zod.union([zod.object({
|
|
"theta": zod.number(),
|
|
"standard_error": zod.number().min(assessmentRealResultCommonUncertaintyOneStandardErrorMin),
|
|
"interval_95": zod.object({
|
|
"low": zod.number(),
|
|
"high": zod.number()
|
|
}).describe('Interval on the ability scale.'),
|
|
"p_grade": zod.number().min(assessmentRealResultCommonUncertaintyOnePGradeMin).max(assessmentRealResultCommonUncertaintyOnePGradeMax).describe('Probability of reaching the threshold of the target grade.')
|
|
}).describe('Ability estimate of an adaptive attempt and its uncertainty: the EAP estimate on the specialization scale, its standard error, the 95% interval, and the probability of reaching the target grade threshold. The interval is reported but is not a separate stop condition.'),zod.null()]).describe('Ability estimate and uncertainty of an adaptive attempt with a decision; null for demo_basic, which computes none, and for an attempt without a decision.'),
|
|
"basic_score": zod.union([zod.object({
|
|
"points": zod.int().min(assessmentRealResultCommonBasicScoreOnePointsMin),
|
|
"max_points": zod.int().min(1),
|
|
"pass_points": zod.int().min(1)
|
|
}).describe('Raw score of a demo_basic attempt and the pass mark of the recorded basic grading policy. The pass mark comes from that policy version and never from the handler.'),zod.null()]).describe('Raw score of a demo_basic attempt with a decision, otherwise null.'),
|
|
"practices": zod.array(zod.object({
|
|
"kind": zod.enum(['main', 'additional']).describe('Role of a practice in the attempt.\n\n- main: the practice that every attempt with practice requires before a decision.\n- additional: adaptive only; offered by finalize when the probability of reaching the grade is in the band below confirmation. It continues the same attempt and spends no new attempt.\n\nAdding a value is a contract change.'),
|
|
"verdict": zod.object({
|
|
"score": zod.int().min(assessmentRealResultCommonPracticesItemVerdictScoreMin).max(assessmentRealResultCommonPracticesItemVerdictScoreMax),
|
|
"max_score": zod.int().min(assessmentRealResultCommonPracticesItemVerdictMaxScoreMin).max(assessmentRealResultCommonPracticesItemVerdictMaxScoreMax),
|
|
"groups": zod.array(zod.object({
|
|
"group": zod.int().min(1).max(assessmentRealResultCommonPracticesItemVerdictGroupsItemGroupMax),
|
|
"passed": zod.boolean()
|
|
}).describe('Outcome of one hidden check group. It never contains the checks themselves.')).min(assessmentRealResultCommonPracticesItemVerdictGroupsMin).max(assessmentRealResultCommonPracticesItemVerdictGroupsMax)
|
|
}).describe('Verdict of a practice solution on the hidden checks: the score 0-3, one point for each passed group. The hidden checks, their inputs and outputs, error output, and seeds are never returned.')
|
|
}).describe('Verdict of one practice of the attempt.')).max(assessmentRealResultCommonPracticesMax).describe('Verdicts of the practices that have one, main first.'),
|
|
"gaps": zod.array(zod.object({
|
|
"domain": zod.string().min(1).max(assessmentRealResultCommonGapsItemDomainMax).regex(assessmentRealResultCommonGapsItemDomainRegExp).describe('Stable domain code of the bank blueprint.'),
|
|
"title": zod.string().min(1).max(assessmentRealResultCommonGapsItemTitleMax).describe('Display name in Russian. Plain text.')
|
|
}).describe('Domain of the specialization where the evidence was weak.')).max(assessmentRealResultCommonGapsMax).describe('Domains with weak evidence; empty when none were found or the method finds none.'),
|
|
"durations": zod.object({
|
|
"items_seconds": zod.int().min(assessmentRealResultCommonDurationsItemsSecondsMin),
|
|
"practice_seconds": zod.int().min(assessmentRealResultCommonDurationsPracticeSecondsMin).nullable().describe('Time on all practices with a verdict, or null when no practice has one.')
|
|
}).describe('Working time recorded by the server. It is a separate label: it never enters the ability estimate or the grade decision.'),
|
|
"next_steps": zod.array(zod.object({
|
|
"action": zod.enum(['retake_same_grade', 'take_lower_grade', 'accept_lower_grade', 'take_higher_grade']).describe('Step that the candidate may take next.\n\n- retake_same_grade: test the same grade again from `available_at`.\n- take_lower_grade: test the lower `grade`. After a failure, including the first test, it is allowed at once, outside the same-grade retry interval.\n- accept_lower_grade: accept the lower `grade` on the evidence of this attempt, when the data are sufficient (the command is planned).\n- take_higher_grade: test the higher `grade` from `available_at`. A first confirmation is not a promotion, so after it `available_at` is null; after a promotion the next one waits for the promotion interval of the policy.'),
|
|
"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.'),
|
|
"available_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('First time the step is allowed, or null when it is allowed now.')
|
|
}).describe('Step that the server allows after this result, computed when it was decided.')).max(assessmentRealResultCommonNextStepsMax),
|
|
"decided_at": 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.')
|
|
}).describe('Immutable result of a real assessment, visible only to its candidate. It records the method, versions, decision, uncertainty, and limitations. A corrective result also carries root_attempt_id and chain_deadline from the same chain. Later policy, bank, or algorithm versions never change it. It never contains answers, per-item correctness, keys, seeds, hidden checks, or anti-cheat signals. Fields the method does not compute are null, never zero.')
|
|
|
|
export type AssessmentRealResultCommon = zod.input<typeof AssessmentRealResultCommon>;
|
|
export type AssessmentRealResultCommonOutput = zod.output<typeof AssessmentRealResultCommon>;
|