feat(assessment): assign the demonstration category and keep result history

This commit is contained in:
shira committed 2026-10-09 00:35:13 +03:00
1 parent b3c6dc870b
commit 8277133712
61 files changed
+4338 -268

No files matched your search

@@ -31,6 +31,7 @@ import type {
AssessmentQualifiedAttempt,
AssessmentQualifiedResult,
AssessmentResult,
AssessmentResultHistoryPage,
AssessmentSessions,
AssessmentSignalNotice,
AssessmentSignalReceipt,
@@ -49,6 +50,16 @@ import type {
export const getGetMyAssessmentAvailabilityResponseMock = (overrideResponse: Partial<Extract<AssessmentAvailability, object>> = {}): AssessmentAvailability => ({specializations: Array.from({ length: faker.number.int({min: 1, max: 2}) }, (_, i) => i + 1).map(() => ({specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), active_attempt_id: faker.helpers.arrayElement([faker.string.uuid(), null]), grades: Array.from({ length: faker.number.int({min: 1, max: 10}) }, (_, i) => i + 1).map(() => ({grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), status: faker.helpers.arrayElement(['available','active_attempt','cooldown','insufficient_bank'] as const), mode: faker.helpers.arrayElement([faker.helpers.arrayElement(['demo_basic','adaptive'] as const),null,]), available_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), time_limit_seconds: faker.helpers.arrayElement([faker.number.int({min: 1}), null]), max_sessions: faker.helpers.arrayElement([faker.number.int({min: 1, max: 10}), null]), max_items: faker.helpers.arrayElement([faker.number.int({min: 1, max: 100}), null]), practice_required: faker.helpers.arrayElement([faker.datatype.boolean(), null])}))})), ...overrideResponse})
export const getListMyAssessmentResultsResponseAssessmentUncertaintyMock = (overrideResponse: Partial<AssessmentUncertainty> = {}): AssessmentUncertainty => ({...{theta: faker.number.float({fractionDigits: 2}), standard_error: faker.number.float({min: 0, fractionDigits: 2}), interval_95: {low: faker.number.float({fractionDigits: 2}), high: faker.number.float({fractionDigits: 2})}, p_grade: faker.number.float({min: 0, max: 1, fractionDigits: 2})}, ...overrideResponse});
export const getListMyAssessmentResultsResponseBasicScoreMock = (overrideResponse: Partial<BasicScore> = {}): BasicScore => ({...{points: faker.number.int({min: 0}), max_points: faker.number.int({min: 1}), pass_points: faker.number.int({min: 1})}, ...overrideResponse});
export const getListMyAssessmentResultsResponseAssessmentQualifiedResultMock = (overrideResponse: Partial<AssessmentQualifiedResult> = {}): AssessmentQualifiedResult => ({...{...{...{attempt_id: faker.string.uuid(), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), target_grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), root_attempt_id: faker.helpers.arrayElement([faker.string.uuid(),null,]), chain_deadline: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), task_language: faker.helpers.arrayElement([faker.helpers.arrayElement(['python','go'] as const),null,]), kind: faker.helpers.arrayElement(['root','corrective'] as const), mode: faker.helpers.arrayElement(['demo_basic','adaptive'] as const), versions: {policy_version: faker.number.int({min: 1}), bank_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), algorithm_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64})}, outcome: faker.helpers.arrayElement(['confirmed','not_confirmed','not_determined'] as const), not_determined_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['expired','practice_incomplete','insufficient_bank','sandbox_unavailable'] as const),null,]), confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), previous_confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), ...(faker.datatype.boolean() ? {category_decision: {status: faker.helpers.arrayElement(['not_eligible','not_confirmed','assigned','unchanged'] as const), previous_confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), current_confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), method: faker.helpers.arrayElement([faker.helpers.arrayElement(['demo_basic_pass_mark'] as const),null,]), source: faker.helpers.arrayElement([faker.helpers.arrayElement(['synthetic_demo'] as const),null,]), calibration_status: faker.helpers.arrayElement([faker.helpers.arrayElement(['uncalibrated','calibrated'] as const),null,])}} : {}), strength: faker.helpers.arrayElement([faker.helpers.arrayElement(['high','medium'] as const),null,]), calibration_status: faker.helpers.arrayElement(['uncalibrated','calibrated'] as const), limitations: faker.helpers.arrayElements(['uncalibrated_thresholds','demo_bank','practice_not_included','unproctored'] as const), uncertainty: faker.helpers.arrayElement([{...getListMyAssessmentResultsResponseAssessmentUncertaintyMock()},null,]), basic_score: faker.helpers.arrayElement([{...getListMyAssessmentResultsResponseBasicScoreMock()},null,]), practices: Array.from({ length: faker.number.int({min: 1, max: 5}) }, (_, i) => i + 1).map(() => ({kind: faker.helpers.arrayElement(['main','additional'] as const), verdict: {score: faker.number.int({min: 0, max: 3}), max_score: faker.number.int({min: 3, max: 3}), groups: Array.from({ length: faker.number.int({min: 3, max: 3}) }, (_, i) => i + 1).map(() => ({group: faker.number.int({min: 1, max: 3}), passed: faker.datatype.boolean()}))}})), gaps: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => ({domain: fakeFromPattern("^[a-z0-9_]+$", {minLength: 1, maxLength: 64}), title: faker.string.alpha({length: {min: 1, max: 200}})})), durations: {items_seconds: faker.number.int({min: 0}), practice_seconds: faker.helpers.arrayElement([faker.number.int({min: 0}), null])}, next_steps: Array.from({ length: faker.number.int({min: 1, max: 5}) }, (_, i) => i + 1).map(() => ({action: faker.helpers.arrayElement(['retake_same_grade','take_lower_grade','accept_lower_grade','take_higher_grade'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), available_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])})), decided_at: faker.date.past().toISOString().slice(0, 19) + 'Z'},...{kind: faker.helpers.arrayElement(['root'] as const), root_attempt_id: null, chain_deadline: null},}, kind: faker.helpers.arrayElement(['root'] as const)}, ...overrideResponse});
export const getListMyAssessmentResultsResponseAssessmentCorrectiveResultMock = (overrideResponse: Partial<AssessmentCorrectiveResult> = {}): AssessmentCorrectiveResult => ({...{...{...{attempt_id: faker.string.uuid(), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), target_grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), root_attempt_id: faker.helpers.arrayElement([faker.string.uuid(),null,]), chain_deadline: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), task_language: faker.helpers.arrayElement([faker.helpers.arrayElement(['python','go'] as const),null,]), kind: faker.helpers.arrayElement(['root','corrective'] as const), mode: faker.helpers.arrayElement(['demo_basic','adaptive'] as const), versions: {policy_version: faker.number.int({min: 1}), bank_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), algorithm_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64})}, outcome: faker.helpers.arrayElement(['confirmed','not_confirmed','not_determined'] as const), not_determined_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['expired','practice_incomplete','insufficient_bank','sandbox_unavailable'] as const),null,]), confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), previous_confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), ...(faker.datatype.boolean() ? {category_decision: {status: faker.helpers.arrayElement(['not_eligible','not_confirmed','assigned','unchanged'] as const), previous_confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), current_confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), method: faker.helpers.arrayElement([faker.helpers.arrayElement(['demo_basic_pass_mark'] as const),null,]), source: faker.helpers.arrayElement([faker.helpers.arrayElement(['synthetic_demo'] as const),null,]), calibration_status: faker.helpers.arrayElement([faker.helpers.arrayElement(['uncalibrated','calibrated'] as const),null,])}} : {}), strength: faker.helpers.arrayElement([faker.helpers.arrayElement(['high','medium'] as const),null,]), calibration_status: faker.helpers.arrayElement(['uncalibrated','calibrated'] as const), limitations: faker.helpers.arrayElements(['uncalibrated_thresholds','demo_bank','practice_not_included','unproctored'] as const), uncertainty: faker.helpers.arrayElement([{...getListMyAssessmentResultsResponseAssessmentUncertaintyMock()},null,]), basic_score: faker.helpers.arrayElement([{...getListMyAssessmentResultsResponseBasicScoreMock()},null,]), practices: Array.from({ length: faker.number.int({min: 1, max: 5}) }, (_, i) => i + 1).map(() => ({kind: faker.helpers.arrayElement(['main','additional'] as const), verdict: {score: faker.number.int({min: 0, max: 3}), max_score: faker.number.int({min: 3, max: 3}), groups: Array.from({ length: faker.number.int({min: 3, max: 3}) }, (_, i) => i + 1).map(() => ({group: faker.number.int({min: 1, max: 3}), passed: faker.datatype.boolean()}))}})), gaps: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => ({domain: fakeFromPattern("^[a-z0-9_]+$", {minLength: 1, maxLength: 64}), title: faker.string.alpha({length: {min: 1, max: 200}})})), durations: {items_seconds: faker.number.int({min: 0}), practice_seconds: faker.helpers.arrayElement([faker.number.int({min: 0}), null])}, next_steps: Array.from({ length: faker.number.int({min: 1, max: 5}) }, (_, i) => i + 1).map(() => ({action: faker.helpers.arrayElement(['retake_same_grade','take_lower_grade','accept_lower_grade','take_higher_grade'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), available_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])})), decided_at: faker.date.past().toISOString().slice(0, 19) + 'Z'},...{kind: faker.helpers.arrayElement(['corrective'] as const), root_attempt_id: faker.string.uuid(), chain_deadline: faker.date.past().toISOString().slice(0, 19) + 'Z'},}, kind: faker.helpers.arrayElement(['corrective'] as const)}, ...overrideResponse});
export const getListMyAssessmentResultsResponseMock = (overrideResponse: Partial<Extract<AssessmentResultHistoryPage, object>> = {}): AssessmentResultHistoryPage => ({items: Array.from({ length: faker.number.int({min: 1, max: 50}) }, (_, i) => i + 1).map(() => (faker.helpers.arrayElement([{...getListMyAssessmentResultsResponseAssessmentQualifiedResultMock()},{...getListMyAssessmentResultsResponseAssessmentCorrectiveResultMock()},]))), page: {has_more: faker.datatype.boolean(), next_cursor: faker.helpers.arrayElement([fakeFromPattern("^[A-Za-z0-9_-]+$", {minLength: 1, maxLength: 512}), null])}, ...overrideResponse})
export const getGetMyAssessmentSignalNoticeResponseMock = (overrideResponse: Partial<Extract<AssessmentSignalNotice, object>> = {}): AssessmentSignalNotice => ({notice_version: faker.number.int({min: 1, max: 2147483647}), acknowledged: faker.datatype.boolean(), acknowledged_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), ...overrideResponse})
export const getAcknowledgeMyAssessmentSignalNoticeResponseMock = (overrideResponse: Partial<Extract<AssessmentSignalNotice, object>> = {}): AssessmentSignalNotice => ({notice_version: faker.number.int({min: 1, max: 2147483647}), acknowledged: faker.datatype.boolean(), acknowledged_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), ...overrideResponse})
@@ -199,9 +210,9 @@ export const getGetMyAssessmentResultResponseAssessmentUncertaintyMock = (overri
export const getGetMyAssessmentResultResponseBasicScoreMock = (overrideResponse: Partial<BasicScore> = {}): BasicScore => ({...{points: faker.number.int({min: 0}), max_points: faker.number.int({min: 1}), pass_points: faker.number.int({min: 1})}, ...overrideResponse});
export const getGetMyAssessmentResultResponseAssessmentQualifiedResultMock = (overrideResponse: Partial<AssessmentQualifiedResult> = {}): AssessmentQualifiedResult => ({...{...{...{attempt_id: faker.string.uuid(), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), target_grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), root_attempt_id: faker.helpers.arrayElement([faker.string.uuid(),null,]), chain_deadline: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), task_language: faker.helpers.arrayElement([faker.helpers.arrayElement(['python','go'] as const),null,]), kind: faker.helpers.arrayElement(['root','corrective'] as const), mode: faker.helpers.arrayElement(['demo_basic','adaptive'] as const), versions: {policy_version: faker.number.int({min: 1}), bank_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), algorithm_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64})}, outcome: faker.helpers.arrayElement(['confirmed','not_confirmed','not_determined'] as const), not_determined_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['expired','practice_incomplete','insufficient_bank','sandbox_unavailable'] as const),null,]), confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), previous_confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), strength: faker.helpers.arrayElement([faker.helpers.arrayElement(['high','medium'] as const),null,]), calibration_status: faker.helpers.arrayElement(['uncalibrated','calibrated'] as const), limitations: faker.helpers.arrayElements(['uncalibrated_thresholds','demo_bank','practice_not_included','unproctored'] as const), uncertainty: faker.helpers.arrayElement([{...getGetMyAssessmentResultResponseAssessmentUncertaintyMock()},null,]), basic_score: faker.helpers.arrayElement([{...getGetMyAssessmentResultResponseBasicScoreMock()},null,]), practices: Array.from({ length: faker.number.int({min: 1, max: 5}) }, (_, i) => i + 1).map(() => ({kind: faker.helpers.arrayElement(['main','additional'] as const), verdict: {score: faker.number.int({min: 0, max: 3}), max_score: faker.number.int({min: 3, max: 3}), groups: Array.from({ length: faker.number.int({min: 3, max: 3}) }, (_, i) => i + 1).map(() => ({group: faker.number.int({min: 1, max: 3}), passed: faker.datatype.boolean()}))}})), gaps: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => ({domain: fakeFromPattern("^[a-z0-9_]+$", {minLength: 1, maxLength: 64}), title: faker.string.alpha({length: {min: 1, max: 200}})})), durations: {items_seconds: faker.number.int({min: 0}), practice_seconds: faker.helpers.arrayElement([faker.number.int({min: 0}), null])}, next_steps: Array.from({ length: faker.number.int({min: 1, max: 5}) }, (_, i) => i + 1).map(() => ({action: faker.helpers.arrayElement(['retake_same_grade','take_lower_grade','accept_lower_grade','take_higher_grade'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), available_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])})), decided_at: faker.date.past().toISOString().slice(0, 19) + 'Z'},...{kind: faker.helpers.arrayElement(['root'] as const), root_attempt_id: null, chain_deadline: null},}, kind: faker.helpers.arrayElement(['root'] as const)}, ...overrideResponse});
export const getGetMyAssessmentResultResponseAssessmentQualifiedResultMock = (overrideResponse: Partial<AssessmentQualifiedResult> = {}): AssessmentQualifiedResult => ({...{...{...{attempt_id: faker.string.uuid(), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), target_grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), root_attempt_id: faker.helpers.arrayElement([faker.string.uuid(),null,]), chain_deadline: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), task_language: faker.helpers.arrayElement([faker.helpers.arrayElement(['python','go'] as const),null,]), kind: faker.helpers.arrayElement(['root','corrective'] as const), mode: faker.helpers.arrayElement(['demo_basic','adaptive'] as const), versions: {policy_version: faker.number.int({min: 1}), bank_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), algorithm_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64})}, outcome: faker.helpers.arrayElement(['confirmed','not_confirmed','not_determined'] as const), not_determined_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['expired','practice_incomplete','insufficient_bank','sandbox_unavailable'] as const),null,]), confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), previous_confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), ...(faker.datatype.boolean() ? {category_decision: {status: faker.helpers.arrayElement(['not_eligible','not_confirmed','assigned','unchanged'] as const), previous_confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), current_confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), method: faker.helpers.arrayElement([faker.helpers.arrayElement(['demo_basic_pass_mark'] as const),null,]), source: faker.helpers.arrayElement([faker.helpers.arrayElement(['synthetic_demo'] as const),null,]), calibration_status: faker.helpers.arrayElement([faker.helpers.arrayElement(['uncalibrated','calibrated'] as const),null,])}} : {}), strength: faker.helpers.arrayElement([faker.helpers.arrayElement(['high','medium'] as const),null,]), calibration_status: faker.helpers.arrayElement(['uncalibrated','calibrated'] as const), limitations: faker.helpers.arrayElements(['uncalibrated_thresholds','demo_bank','practice_not_included','unproctored'] as const), uncertainty: faker.helpers.arrayElement([{...getGetMyAssessmentResultResponseAssessmentUncertaintyMock()},null,]), basic_score: faker.helpers.arrayElement([{...getGetMyAssessmentResultResponseBasicScoreMock()},null,]), practices: Array.from({ length: faker.number.int({min: 1, max: 5}) }, (_, i) => i + 1).map(() => ({kind: faker.helpers.arrayElement(['main','additional'] as const), verdict: {score: faker.number.int({min: 0, max: 3}), max_score: faker.number.int({min: 3, max: 3}), groups: Array.from({ length: faker.number.int({min: 3, max: 3}) }, (_, i) => i + 1).map(() => ({group: faker.number.int({min: 1, max: 3}), passed: faker.datatype.boolean()}))}})), gaps: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => ({domain: fakeFromPattern("^[a-z0-9_]+$", {minLength: 1, maxLength: 64}), title: faker.string.alpha({length: {min: 1, max: 200}})})), durations: {items_seconds: faker.number.int({min: 0}), practice_seconds: faker.helpers.arrayElement([faker.number.int({min: 0}), null])}, next_steps: Array.from({ length: faker.number.int({min: 1, max: 5}) }, (_, i) => i + 1).map(() => ({action: faker.helpers.arrayElement(['retake_same_grade','take_lower_grade','accept_lower_grade','take_higher_grade'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), available_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])})), decided_at: faker.date.past().toISOString().slice(0, 19) + 'Z'},...{kind: faker.helpers.arrayElement(['root'] as const), root_attempt_id: null, chain_deadline: null},}, kind: faker.helpers.arrayElement(['root'] as const)}, ...overrideResponse});
export const getGetMyAssessmentResultResponseAssessmentCorrectiveResultMock = (overrideResponse: Partial<AssessmentCorrectiveResult> = {}): AssessmentCorrectiveResult => ({...{...{...{attempt_id: faker.string.uuid(), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), target_grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), root_attempt_id: faker.helpers.arrayElement([faker.string.uuid(),null,]), chain_deadline: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), task_language: faker.helpers.arrayElement([faker.helpers.arrayElement(['python','go'] as const),null,]), kind: faker.helpers.arrayElement(['root','corrective'] as const), mode: faker.helpers.arrayElement(['demo_basic','adaptive'] as const), versions: {policy_version: faker.number.int({min: 1}), bank_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), algorithm_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64})}, outcome: faker.helpers.arrayElement(['confirmed','not_confirmed','not_determined'] as const), not_determined_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['expired','practice_incomplete','insufficient_bank','sandbox_unavailable'] as const),null,]), confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), previous_confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), strength: faker.helpers.arrayElement([faker.helpers.arrayElement(['high','medium'] as const),null,]), calibration_status: faker.helpers.arrayElement(['uncalibrated','calibrated'] as const), limitations: faker.helpers.arrayElements(['uncalibrated_thresholds','demo_bank','practice_not_included','unproctored'] as const), uncertainty: faker.helpers.arrayElement([{...getGetMyAssessmentResultResponseAssessmentUncertaintyMock()},null,]), basic_score: faker.helpers.arrayElement([{...getGetMyAssessmentResultResponseBasicScoreMock()},null,]), practices: Array.from({ length: faker.number.int({min: 1, max: 5}) }, (_, i) => i + 1).map(() => ({kind: faker.helpers.arrayElement(['main','additional'] as const), verdict: {score: faker.number.int({min: 0, max: 3}), max_score: faker.number.int({min: 3, max: 3}), groups: Array.from({ length: faker.number.int({min: 3, max: 3}) }, (_, i) => i + 1).map(() => ({group: faker.number.int({min: 1, max: 3}), passed: faker.datatype.boolean()}))}})), gaps: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => ({domain: fakeFromPattern("^[a-z0-9_]+$", {minLength: 1, maxLength: 64}), title: faker.string.alpha({length: {min: 1, max: 200}})})), durations: {items_seconds: faker.number.int({min: 0}), practice_seconds: faker.helpers.arrayElement([faker.number.int({min: 0}), null])}, next_steps: Array.from({ length: faker.number.int({min: 1, max: 5}) }, (_, i) => i + 1).map(() => ({action: faker.helpers.arrayElement(['retake_same_grade','take_lower_grade','accept_lower_grade','take_higher_grade'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), available_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])})), decided_at: faker.date.past().toISOString().slice(0, 19) + 'Z'},...{kind: faker.helpers.arrayElement(['corrective'] as const), root_attempt_id: faker.string.uuid(), chain_deadline: faker.date.past().toISOString().slice(0, 19) + 'Z'},}, kind: faker.helpers.arrayElement(['corrective'] as const)}, ...overrideResponse});
export const getGetMyAssessmentResultResponseAssessmentCorrectiveResultMock = (overrideResponse: Partial<AssessmentCorrectiveResult> = {}): AssessmentCorrectiveResult => ({...{...{...{attempt_id: faker.string.uuid(), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), target_grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), root_attempt_id: faker.helpers.arrayElement([faker.string.uuid(),null,]), chain_deadline: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), task_language: faker.helpers.arrayElement([faker.helpers.arrayElement(['python','go'] as const),null,]), kind: faker.helpers.arrayElement(['root','corrective'] as const), mode: faker.helpers.arrayElement(['demo_basic','adaptive'] as const), versions: {policy_version: faker.number.int({min: 1}), bank_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), algorithm_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64})}, outcome: faker.helpers.arrayElement(['confirmed','not_confirmed','not_determined'] as const), not_determined_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['expired','practice_incomplete','insufficient_bank','sandbox_unavailable'] as const),null,]), confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), previous_confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), ...(faker.datatype.boolean() ? {category_decision: {status: faker.helpers.arrayElement(['not_eligible','not_confirmed','assigned','unchanged'] as const), previous_confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), current_confirmed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), method: faker.helpers.arrayElement([faker.helpers.arrayElement(['demo_basic_pass_mark'] as const),null,]), source: faker.helpers.arrayElement([faker.helpers.arrayElement(['synthetic_demo'] as const),null,]), calibration_status: faker.helpers.arrayElement([faker.helpers.arrayElement(['uncalibrated','calibrated'] as const),null,])}} : {}), strength: faker.helpers.arrayElement([faker.helpers.arrayElement(['high','medium'] as const),null,]), calibration_status: faker.helpers.arrayElement(['uncalibrated','calibrated'] as const), limitations: faker.helpers.arrayElements(['uncalibrated_thresholds','demo_bank','practice_not_included','unproctored'] as const), uncertainty: faker.helpers.arrayElement([{...getGetMyAssessmentResultResponseAssessmentUncertaintyMock()},null,]), basic_score: faker.helpers.arrayElement([{...getGetMyAssessmentResultResponseBasicScoreMock()},null,]), practices: Array.from({ length: faker.number.int({min: 1, max: 5}) }, (_, i) => i + 1).map(() => ({kind: faker.helpers.arrayElement(['main','additional'] as const), verdict: {score: faker.number.int({min: 0, max: 3}), max_score: faker.number.int({min: 3, max: 3}), groups: Array.from({ length: faker.number.int({min: 3, max: 3}) }, (_, i) => i + 1).map(() => ({group: faker.number.int({min: 1, max: 3}), passed: faker.datatype.boolean()}))}})), gaps: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => ({domain: fakeFromPattern("^[a-z0-9_]+$", {minLength: 1, maxLength: 64}), title: faker.string.alpha({length: {min: 1, max: 200}})})), durations: {items_seconds: faker.number.int({min: 0}), practice_seconds: faker.helpers.arrayElement([faker.number.int({min: 0}), null])}, next_steps: Array.from({ length: faker.number.int({min: 1, max: 5}) }, (_, i) => i + 1).map(() => ({action: faker.helpers.arrayElement(['retake_same_grade','take_lower_grade','accept_lower_grade','take_higher_grade'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), available_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])})), decided_at: faker.date.past().toISOString().slice(0, 19) + 'Z'},...{kind: faker.helpers.arrayElement(['corrective'] as const), root_attempt_id: faker.string.uuid(), chain_deadline: faker.date.past().toISOString().slice(0, 19) + 'Z'},}, kind: faker.helpers.arrayElement(['corrective'] as const)}, ...overrideResponse});
export const getGetMyAssessmentResultResponseAssessmentExpressResultMock = (overrideResponse: Partial<AssessmentExpressResult> = {}): AssessmentExpressResult => ({...{attempt_id: faker.string.uuid(), specialization: null, target_grade: null, task_language: null, kind: faker.helpers.arrayElement(['demo_express'] as const), mode: faker.helpers.arrayElement(['demo_express'] as const), versions: {policy_version: faker.number.int({min: 1}), bank_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), algorithm_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64})}, outcome: faker.helpers.arrayElement(['demonstration'] as const), not_determined_reason: null, confirmed_grade: null, previous_confirmed_grade: null, strength: null, calibration_status: faker.helpers.arrayElement(['uncalibrated'] as const), limitations: faker.helpers.arrayElements(['demonstration_only'] as const), uncertainty: null, basic_score: null, practices: Array.from({ length: faker.number.int({min: 0, max: 0}) }, (_, i) => i + 1).map(() => ({kind: faker.helpers.arrayElement(['main','additional'] as const), verdict: {score: faker.number.int({min: 0, max: 3}), max_score: faker.number.int({min: 3, max: 3}), groups: Array.from({ length: faker.number.int({min: 3, max: 3}) }, (_, i) => i + 1).map(() => ({group: faker.number.int({min: 1, max: 3}), passed: faker.datatype.boolean()}))}})), gaps: Array.from({ length: faker.number.int({min: 0, max: 0}) }, (_, i) => i + 1).map(() => ({domain: fakeFromPattern("^[a-z0-9_]+$", {minLength: 1, maxLength: 64}), title: faker.string.alpha({length: {min: 1, max: 200}})})), durations: {items_seconds: faker.number.int({min: 0}), practice_seconds: faker.helpers.arrayElement([faker.number.int({min: 0}), null])}, next_steps: Array.from({ length: faker.number.int({min: 0, max: 0}) }, (_, i) => i + 1).map(() => ({action: faker.helpers.arrayElement(['retake_same_grade','take_lower_grade','accept_lower_grade','take_higher_grade'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), available_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])})), summary: faker.string.alpha({length: {min: 1, max: 2000}}), decided_at: faker.date.past().toISOString().slice(0, 19) + 'Z'}, ...overrideResponse});
@@ -220,6 +231,18 @@ export const getGetMyAssessmentAvailabilityMockHandler = (overrideResponse?: Ass
}, options)
}
export const getListMyAssessmentResultsMockHandler = (overrideResponse?: AssessmentResultHistoryPage | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<AssessmentResultHistoryPage> | AssessmentResultHistoryPage), options?: RequestHandlerOptions) => {
return http.get('*/api/v1/me/assessment-results', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {
return HttpResponse.json(overrideResponse !== undefined
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
: getListMyAssessmentResultsResponseMock(),
{ status: 200
})
}, options)
}
export const getGetMyAssessmentSignalNoticeMockHandler = (overrideResponse?: AssessmentSignalNotice | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<AssessmentSignalNotice> | AssessmentSignalNotice), options?: RequestHandlerOptions) => {
return http.get('*/api/v1/me/assessment-signal-notice', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {
@@ -329,6 +352,7 @@ export const getGetMyAssessmentResultMockHandler = (overrideResponse?: Assessmen
}
export const getAssessmentMock = () => [
getGetMyAssessmentAvailabilityMockHandler(),
getListMyAssessmentResultsMockHandler(),
getGetMyAssessmentSignalNoticeMockHandler(),
getAcknowledgeMyAssessmentSignalNoticeMockHandler(),
getCreateMyAssessmentAttemptMockHandler(),
@@ -32,12 +32,14 @@ import type {
AssessmentFinalization,
AssessmentFinalizeConflictProblem,
AssessmentResult,
AssessmentResultHistoryPage,
AssessmentSignalBatch,
AssessmentSignalNotice,
AssessmentSignalNoticeAcknowledgement,
AssessmentSignalReceipt,
CreateMyAssessmentAttemptHeaders,
FinalizeMyAssessmentAttemptHeaders,
ListMyAssessmentResultsParams,
Problem,
RecordMyAssessmentAttemptSignalsHeaders,
StartMyAssessmentAttemptSessionHeaders,
@@ -172,6 +174,116 @@ export function useGetMyAssessmentAvailability<TData = Awaited<ReturnType<typeof
export const getListMyAssessmentResultsUrl = (params?: ListMyAssessmentResultsParams,) => {
const normalizedParams = new URLSearchParams();
Object.entries(params || {}).forEach(([key, value]) => {
if (value !== undefined) {
normalizedParams.append(key, value === null ? 'null' : String(value))
}
});
const stringifiedParams = normalizedParams.toString();
return stringifiedParams.length > 0 ? `/api/v1/me/assessment-results?${stringifiedParams}` : `/api/v1/me/assessment-results`
}
/**
* Requires a candidate session. Returns only completed root and corrective results owned by this candidate, newest first by decided_at and attempt_id. demo_express training results never appear. The cursor is opaque and bound to this candidate and listing; a malformed or foreign cursor returns 400 validation_failed.
*
* A v2 result includes the category decision captured when that attempt ended, including the confirmed grade then in force. Legacy v1 results omit category_decision because a later category must not be projected backward. Later policy, bank, review, or category changes do not alter either result. Employers cannot read this history; their separate projection contains only the current permitted category and no answers.
* @summary List immutable real assessment results of the current candidate.
*/
export const listMyAssessmentResults = async (params?: ListMyAssessmentResultsParams, options?: Parameters<typeof apiRequest>[1]): Promise<AssessmentResultHistoryPage> => {
return apiRequest<AssessmentResultHistoryPage>(getListMyAssessmentResultsUrl(params),
{
...options,
method: 'GET'
}
);}
export const getListMyAssessmentResultsQueryKey = (params?: ListMyAssessmentResultsParams,) => {
return [
`/api/v1/me/assessment-results`, ...(params ? [params] : [])
] as const;
}
export const getListMyAssessmentResultsQueryOptions = <TData = Awaited<ReturnType<typeof listMyAssessmentResults>>, TError = ErrorType<Problem>>(params?: ListMyAssessmentResultsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMyAssessmentResults>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
) => {
const {query: queryOptions, request: requestOptions} = options ?? {};
const queryKey = queryOptions?.queryKey ?? getListMyAssessmentResultsQueryKey(params);
const queryFn: QueryFunction<Awaited<ReturnType<typeof listMyAssessmentResults>>> = ({ signal }) => listMyAssessmentResults(params, { signal, ...requestOptions });
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listMyAssessmentResults>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}
export type ListMyAssessmentResultsQueryResult = NonNullable<Awaited<ReturnType<typeof listMyAssessmentResults>>>
export type ListMyAssessmentResultsQueryError = ErrorType<Problem>
export function useListMyAssessmentResults<TData = Awaited<ReturnType<typeof listMyAssessmentResults>>, TError = ErrorType<Problem>>(
params: undefined | ListMyAssessmentResultsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMyAssessmentResults>>, TError, TData>> & Pick<
DefinedInitialDataOptions<
Awaited<ReturnType<typeof listMyAssessmentResults>>,
TError,
Awaited<ReturnType<typeof listMyAssessmentResults>>
> , 'initialData'
>, request?: SecondParameter<typeof apiRequest>}
, queryClient?: QueryClient
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useListMyAssessmentResults<TData = Awaited<ReturnType<typeof listMyAssessmentResults>>, TError = ErrorType<Problem>>(
params?: ListMyAssessmentResultsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMyAssessmentResults>>, TError, TData>> & Pick<
UndefinedInitialDataOptions<
Awaited<ReturnType<typeof listMyAssessmentResults>>,
TError,
Awaited<ReturnType<typeof listMyAssessmentResults>>
> , 'initialData'
>, request?: SecondParameter<typeof apiRequest>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useListMyAssessmentResults<TData = Awaited<ReturnType<typeof listMyAssessmentResults>>, TError = ErrorType<Problem>>(
params?: ListMyAssessmentResultsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMyAssessmentResults>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
/**
* @summary List immutable real assessment results of the current candidate.
*/
export function useListMyAssessmentResults<TData = Awaited<ReturnType<typeof listMyAssessmentResults>>, TError = ErrorType<Problem>>(
params?: ListMyAssessmentResultsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMyAssessmentResults>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
const queryOptions = getListMyAssessmentResultsQueryOptions(params,options)
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
return withQueryKey(query, queryOptions.queryKey);
}
export const getGetMyAssessmentSignalNoticeUrl = () => {
@@ -0,0 +1,19 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const AssessmentCategoryDecisionView = 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()])
}).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.')
export type AssessmentCategoryDecisionView = zod.input<typeof AssessmentCategoryDecisionView>;
export type AssessmentCategoryDecisionViewOutput = zod.output<typeof AssessmentCategoryDecisionView>;
@@ -72,6 +72,14 @@ export const AssessmentCorrectiveResult = zod.object({
"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(assessmentCorrectiveResultOneLimitationsMax),
@@ -72,6 +72,14 @@ export const AssessmentQualifiedResult = zod.object({
"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(assessmentQualifiedResultOneLimitationsMax),
@@ -0,0 +1,255 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const assessmentRealResultOneOneVersionsBankVersionMax = 64;
export const assessmentRealResultOneOneVersionsBankVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const assessmentRealResultOneOneVersionsAlgorithmVersionMax = 64;
export const assessmentRealResultOneOneVersionsAlgorithmVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const assessmentRealResultOneOneLimitationsMax = 10;
export const assessmentRealResultOneOneUncertaintyOneStandardErrorMin = 0;
export const assessmentRealResultOneOneUncertaintyOnePGradeMin = 0;
export const assessmentRealResultOneOneUncertaintyOnePGradeMax = 1;
export const assessmentRealResultOneOneBasicScoreOnePointsMin = 0;
export const assessmentRealResultOneOnePracticesItemVerdictScoreMin = 0;
export const assessmentRealResultOneOnePracticesItemVerdictScoreMax = 3;
export const assessmentRealResultOneOnePracticesItemVerdictMaxScoreMin = 3;
export const assessmentRealResultOneOnePracticesItemVerdictMaxScoreMax = 3;
export const assessmentRealResultOneOnePracticesItemVerdictGroupsItemGroupMax = 3;
export const assessmentRealResultOneOnePracticesItemVerdictGroupsMin = 3;
export const assessmentRealResultOneOnePracticesItemVerdictGroupsMax = 3;
export const assessmentRealResultOneOnePracticesMax = 5;
export const assessmentRealResultOneOneGapsItemDomainMax = 64;
export const assessmentRealResultOneOneGapsItemDomainRegExp = new RegExp('^[a-z0-9_]+$');
export const assessmentRealResultOneOneGapsItemTitleMax = 200;
export const assessmentRealResultOneOneGapsMax = 20;
export const assessmentRealResultOneOneDurationsItemsSecondsMin = 0;
export const assessmentRealResultOneOneDurationsPracticeSecondsMin = 0;
export const assessmentRealResultOneOneNextStepsMax = 5;
export const assessmentRealResultTwoOneVersionsBankVersionMax = 64;
export const assessmentRealResultTwoOneVersionsBankVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const assessmentRealResultTwoOneVersionsAlgorithmVersionMax = 64;
export const assessmentRealResultTwoOneVersionsAlgorithmVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const assessmentRealResultTwoOneLimitationsMax = 10;
export const assessmentRealResultTwoOneUncertaintyOneStandardErrorMin = 0;
export const assessmentRealResultTwoOneUncertaintyOnePGradeMin = 0;
export const assessmentRealResultTwoOneUncertaintyOnePGradeMax = 1;
export const assessmentRealResultTwoOneBasicScoreOnePointsMin = 0;
export const assessmentRealResultTwoOnePracticesItemVerdictScoreMin = 0;
export const assessmentRealResultTwoOnePracticesItemVerdictScoreMax = 3;
export const assessmentRealResultTwoOnePracticesItemVerdictMaxScoreMin = 3;
export const assessmentRealResultTwoOnePracticesItemVerdictMaxScoreMax = 3;
export const assessmentRealResultTwoOnePracticesItemVerdictGroupsItemGroupMax = 3;
export const assessmentRealResultTwoOnePracticesItemVerdictGroupsMin = 3;
export const assessmentRealResultTwoOnePracticesItemVerdictGroupsMax = 3;
export const assessmentRealResultTwoOnePracticesMax = 5;
export const assessmentRealResultTwoOneGapsItemDomainMax = 64;
export const assessmentRealResultTwoOneGapsItemDomainRegExp = new RegExp('^[a-z0-9_]+$');
export const assessmentRealResultTwoOneGapsItemTitleMax = 200;
export const assessmentRealResultTwoOneGapsMax = 20;
export const assessmentRealResultTwoOneDurationsItemsSecondsMin = 0;
export const assessmentRealResultTwoOneDurationsPracticeSecondsMin = 0;
export const assessmentRealResultTwoOneNextStepsMax = 5;
export const AssessmentRealResult = zod.union([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()]).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()]).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(assessmentRealResultOneOneVersionsBankVersionMax).regex(assessmentRealResultOneOneVersionsBankVersionRegExp).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(assessmentRealResultOneOneVersionsAlgorithmVersionMax).regex(assessmentRealResultOneOneVersionsAlgorithmVersionRegExp).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(assessmentRealResultOneOneLimitationsMax),
"uncertainty": zod.union([zod.object({
"theta": zod.number(),
"standard_error": zod.number().min(assessmentRealResultOneOneUncertaintyOneStandardErrorMin),
"interval_95": zod.object({
"low": zod.number(),
"high": zod.number()
}).describe('Interval on the ability scale.'),
"p_grade": zod.number().min(assessmentRealResultOneOneUncertaintyOnePGradeMin).max(assessmentRealResultOneOneUncertaintyOnePGradeMax).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(assessmentRealResultOneOneBasicScoreOnePointsMin),
"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(assessmentRealResultOneOnePracticesItemVerdictScoreMin).max(assessmentRealResultOneOnePracticesItemVerdictScoreMax),
"max_score": zod.int().min(assessmentRealResultOneOnePracticesItemVerdictMaxScoreMin).max(assessmentRealResultOneOnePracticesItemVerdictMaxScoreMax),
"groups": zod.array(zod.object({
"group": zod.int().min(1).max(assessmentRealResultOneOnePracticesItemVerdictGroupsItemGroupMax),
"passed": zod.boolean()
}).describe('Outcome of one hidden check group. It never contains the checks themselves.')).min(assessmentRealResultOneOnePracticesItemVerdictGroupsMin).max(assessmentRealResultOneOnePracticesItemVerdictGroupsMax)
}).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(assessmentRealResultOneOnePracticesMax).describe('Verdicts of the practices that have one, main first.'),
"gaps": zod.array(zod.object({
"domain": zod.string().min(1).max(assessmentRealResultOneOneGapsItemDomainMax).regex(assessmentRealResultOneOneGapsItemDomainRegExp).describe('Stable domain code of the bank blueprint.'),
"title": zod.string().min(1).max(assessmentRealResultOneOneGapsItemTitleMax).describe('Display name in Russian. Plain text.')
}).describe('Domain of the specialization where the evidence was weak.')).max(assessmentRealResultOneOneGapsMax).describe('Domains with weak evidence; empty when none were found or the method finds none.'),
"durations": zod.object({
"items_seconds": zod.int().min(assessmentRealResultOneOneDurationsItemsSecondsMin),
"practice_seconds": zod.int().min(assessmentRealResultOneOneDurationsPracticeSecondsMin).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(assessmentRealResultOneOneNextStepsMax),
"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.').and(zod.object({
"kind": zod.enum(['root']),
"root_attempt_id": zod.null(),
"chain_deadline": zod.null()
})).and(zod.object({
"kind": zod.enum(['root'])
})).describe('Result of a real assessment that is not a corrective attempt. The correction-chain fields are explicitly null.'),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()]).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()]).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(assessmentRealResultTwoOneVersionsBankVersionMax).regex(assessmentRealResultTwoOneVersionsBankVersionRegExp).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(assessmentRealResultTwoOneVersionsAlgorithmVersionMax).regex(assessmentRealResultTwoOneVersionsAlgorithmVersionRegExp).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(assessmentRealResultTwoOneLimitationsMax),
"uncertainty": zod.union([zod.object({
"theta": zod.number(),
"standard_error": zod.number().min(assessmentRealResultTwoOneUncertaintyOneStandardErrorMin),
"interval_95": zod.object({
"low": zod.number(),
"high": zod.number()
}).describe('Interval on the ability scale.'),
"p_grade": zod.number().min(assessmentRealResultTwoOneUncertaintyOnePGradeMin).max(assessmentRealResultTwoOneUncertaintyOnePGradeMax).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(assessmentRealResultTwoOneBasicScoreOnePointsMin),
"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(assessmentRealResultTwoOnePracticesItemVerdictScoreMin).max(assessmentRealResultTwoOnePracticesItemVerdictScoreMax),
"max_score": zod.int().min(assessmentRealResultTwoOnePracticesItemVerdictMaxScoreMin).max(assessmentRealResultTwoOnePracticesItemVerdictMaxScoreMax),
"groups": zod.array(zod.object({
"group": zod.int().min(1).max(assessmentRealResultTwoOnePracticesItemVerdictGroupsItemGroupMax),
"passed": zod.boolean()
}).describe('Outcome of one hidden check group. It never contains the checks themselves.')).min(assessmentRealResultTwoOnePracticesItemVerdictGroupsMin).max(assessmentRealResultTwoOnePracticesItemVerdictGroupsMax)
}).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(assessmentRealResultTwoOnePracticesMax).describe('Verdicts of the practices that have one, main first.'),
"gaps": zod.array(zod.object({
"domain": zod.string().min(1).max(assessmentRealResultTwoOneGapsItemDomainMax).regex(assessmentRealResultTwoOneGapsItemDomainRegExp).describe('Stable domain code of the bank blueprint.'),
"title": zod.string().min(1).max(assessmentRealResultTwoOneGapsItemTitleMax).describe('Display name in Russian. Plain text.')
}).describe('Domain of the specialization where the evidence was weak.')).max(assessmentRealResultTwoOneGapsMax).describe('Domains with weak evidence; empty when none were found or the method finds none.'),
"durations": zod.object({
"items_seconds": zod.int().min(assessmentRealResultTwoOneDurationsItemsSecondsMin),
"practice_seconds": zod.int().min(assessmentRealResultTwoOneDurationsPracticeSecondsMin).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(assessmentRealResultTwoOneNextStepsMax),
"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.').and(zod.object({
"kind": zod.enum(['corrective']),
"root_attempt_id": zod.uuid(),
"chain_deadline": 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.')
})).and(zod.object({
"kind": zod.enum(['corrective'])
})).describe('Result of a corrective real assessment. Both chain fields are present and identify the same immutable correction chain.')]).describe('A completed root or corrective result. Training-only demo_express results are excluded from qualification history.')
export type AssessmentRealResult = zod.input<typeof AssessmentRealResult>;
export type AssessmentRealResultOutput = zod.output<typeof AssessmentRealResult>;
@@ -72,6 +72,14 @@ export const AssessmentRealResultCommon = zod.object({
"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),
@@ -159,6 +159,14 @@ export const AssessmentResult = zod.union([zod.object({
"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(assessmentResultOneOneLimitationsMax),
@@ -225,6 +233,14 @@ export const AssessmentResult = zod.union([zod.object({
"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(assessmentResultTwoOneLimitationsMax),
@@ -0,0 +1,267 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const assessmentResultHistoryPageItemsItemOneOneVersionsBankVersionMax = 64;
export const assessmentResultHistoryPageItemsItemOneOneVersionsBankVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const assessmentResultHistoryPageItemsItemOneOneVersionsAlgorithmVersionMax = 64;
export const assessmentResultHistoryPageItemsItemOneOneVersionsAlgorithmVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const assessmentResultHistoryPageItemsItemOneOneLimitationsMax = 10;
export const assessmentResultHistoryPageItemsItemOneOneUncertaintyOneStandardErrorMin = 0;
export const assessmentResultHistoryPageItemsItemOneOneUncertaintyOnePGradeMin = 0;
export const assessmentResultHistoryPageItemsItemOneOneUncertaintyOnePGradeMax = 1;
export const assessmentResultHistoryPageItemsItemOneOneBasicScoreOnePointsMin = 0;
export const assessmentResultHistoryPageItemsItemOneOnePracticesItemVerdictScoreMin = 0;
export const assessmentResultHistoryPageItemsItemOneOnePracticesItemVerdictScoreMax = 3;
export const assessmentResultHistoryPageItemsItemOneOnePracticesItemVerdictMaxScoreMin = 3;
export const assessmentResultHistoryPageItemsItemOneOnePracticesItemVerdictMaxScoreMax = 3;
export const assessmentResultHistoryPageItemsItemOneOnePracticesItemVerdictGroupsItemGroupMax = 3;
export const assessmentResultHistoryPageItemsItemOneOnePracticesItemVerdictGroupsMin = 3;
export const assessmentResultHistoryPageItemsItemOneOnePracticesItemVerdictGroupsMax = 3;
export const assessmentResultHistoryPageItemsItemOneOnePracticesMax = 5;
export const assessmentResultHistoryPageItemsItemOneOneGapsItemDomainMax = 64;
export const assessmentResultHistoryPageItemsItemOneOneGapsItemDomainRegExp = new RegExp('^[a-z0-9_]+$');
export const assessmentResultHistoryPageItemsItemOneOneGapsItemTitleMax = 200;
export const assessmentResultHistoryPageItemsItemOneOneGapsMax = 20;
export const assessmentResultHistoryPageItemsItemOneOneDurationsItemsSecondsMin = 0;
export const assessmentResultHistoryPageItemsItemOneOneDurationsPracticeSecondsMin = 0;
export const assessmentResultHistoryPageItemsItemOneOneNextStepsMax = 5;
export const assessmentResultHistoryPageItemsItemTwoOneVersionsBankVersionMax = 64;
export const assessmentResultHistoryPageItemsItemTwoOneVersionsBankVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const assessmentResultHistoryPageItemsItemTwoOneVersionsAlgorithmVersionMax = 64;
export const assessmentResultHistoryPageItemsItemTwoOneVersionsAlgorithmVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const assessmentResultHistoryPageItemsItemTwoOneLimitationsMax = 10;
export const assessmentResultHistoryPageItemsItemTwoOneUncertaintyOneStandardErrorMin = 0;
export const assessmentResultHistoryPageItemsItemTwoOneUncertaintyOnePGradeMin = 0;
export const assessmentResultHistoryPageItemsItemTwoOneUncertaintyOnePGradeMax = 1;
export const assessmentResultHistoryPageItemsItemTwoOneBasicScoreOnePointsMin = 0;
export const assessmentResultHistoryPageItemsItemTwoOnePracticesItemVerdictScoreMin = 0;
export const assessmentResultHistoryPageItemsItemTwoOnePracticesItemVerdictScoreMax = 3;
export const assessmentResultHistoryPageItemsItemTwoOnePracticesItemVerdictMaxScoreMin = 3;
export const assessmentResultHistoryPageItemsItemTwoOnePracticesItemVerdictMaxScoreMax = 3;
export const assessmentResultHistoryPageItemsItemTwoOnePracticesItemVerdictGroupsItemGroupMax = 3;
export const assessmentResultHistoryPageItemsItemTwoOnePracticesItemVerdictGroupsMin = 3;
export const assessmentResultHistoryPageItemsItemTwoOnePracticesItemVerdictGroupsMax = 3;
export const assessmentResultHistoryPageItemsItemTwoOnePracticesMax = 5;
export const assessmentResultHistoryPageItemsItemTwoOneGapsItemDomainMax = 64;
export const assessmentResultHistoryPageItemsItemTwoOneGapsItemDomainRegExp = new RegExp('^[a-z0-9_]+$');
export const assessmentResultHistoryPageItemsItemTwoOneGapsItemTitleMax = 200;
export const assessmentResultHistoryPageItemsItemTwoOneGapsMax = 20;
export const assessmentResultHistoryPageItemsItemTwoOneDurationsItemsSecondsMin = 0;
export const assessmentResultHistoryPageItemsItemTwoOneDurationsPracticeSecondsMin = 0;
export const assessmentResultHistoryPageItemsItemTwoOneNextStepsMax = 5;
export const assessmentResultHistoryPageItemsMax = 50;
export const assessmentResultHistoryPagePageNextCursorMax = 512;
export const assessmentResultHistoryPagePageNextCursorRegExp = new RegExp('^[A-Za-z0-9_-]+$');
export const AssessmentResultHistoryPage = zod.object({
"items": zod.array(zod.union([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()]).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()]).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(assessmentResultHistoryPageItemsItemOneOneVersionsBankVersionMax).regex(assessmentResultHistoryPageItemsItemOneOneVersionsBankVersionRegExp).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(assessmentResultHistoryPageItemsItemOneOneVersionsAlgorithmVersionMax).regex(assessmentResultHistoryPageItemsItemOneOneVersionsAlgorithmVersionRegExp).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(assessmentResultHistoryPageItemsItemOneOneLimitationsMax),
"uncertainty": zod.union([zod.object({
"theta": zod.number(),
"standard_error": zod.number().min(assessmentResultHistoryPageItemsItemOneOneUncertaintyOneStandardErrorMin),
"interval_95": zod.object({
"low": zod.number(),
"high": zod.number()
}).describe('Interval on the ability scale.'),
"p_grade": zod.number().min(assessmentResultHistoryPageItemsItemOneOneUncertaintyOnePGradeMin).max(assessmentResultHistoryPageItemsItemOneOneUncertaintyOnePGradeMax).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(assessmentResultHistoryPageItemsItemOneOneBasicScoreOnePointsMin),
"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(assessmentResultHistoryPageItemsItemOneOnePracticesItemVerdictScoreMin).max(assessmentResultHistoryPageItemsItemOneOnePracticesItemVerdictScoreMax),
"max_score": zod.int().min(assessmentResultHistoryPageItemsItemOneOnePracticesItemVerdictMaxScoreMin).max(assessmentResultHistoryPageItemsItemOneOnePracticesItemVerdictMaxScoreMax),
"groups": zod.array(zod.object({
"group": zod.int().min(1).max(assessmentResultHistoryPageItemsItemOneOnePracticesItemVerdictGroupsItemGroupMax),
"passed": zod.boolean()
}).describe('Outcome of one hidden check group. It never contains the checks themselves.')).min(assessmentResultHistoryPageItemsItemOneOnePracticesItemVerdictGroupsMin).max(assessmentResultHistoryPageItemsItemOneOnePracticesItemVerdictGroupsMax)
}).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(assessmentResultHistoryPageItemsItemOneOnePracticesMax).describe('Verdicts of the practices that have one, main first.'),
"gaps": zod.array(zod.object({
"domain": zod.string().min(1).max(assessmentResultHistoryPageItemsItemOneOneGapsItemDomainMax).regex(assessmentResultHistoryPageItemsItemOneOneGapsItemDomainRegExp).describe('Stable domain code of the bank blueprint.'),
"title": zod.string().min(1).max(assessmentResultHistoryPageItemsItemOneOneGapsItemTitleMax).describe('Display name in Russian. Plain text.')
}).describe('Domain of the specialization where the evidence was weak.')).max(assessmentResultHistoryPageItemsItemOneOneGapsMax).describe('Domains with weak evidence; empty when none were found or the method finds none.'),
"durations": zod.object({
"items_seconds": zod.int().min(assessmentResultHistoryPageItemsItemOneOneDurationsItemsSecondsMin),
"practice_seconds": zod.int().min(assessmentResultHistoryPageItemsItemOneOneDurationsPracticeSecondsMin).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(assessmentResultHistoryPageItemsItemOneOneNextStepsMax),
"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.').and(zod.object({
"kind": zod.enum(['root']),
"root_attempt_id": zod.null(),
"chain_deadline": zod.null()
})).and(zod.object({
"kind": zod.enum(['root'])
})).describe('Result of a real assessment that is not a corrective attempt. The correction-chain fields are explicitly null.'),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()]).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()]).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(assessmentResultHistoryPageItemsItemTwoOneVersionsBankVersionMax).regex(assessmentResultHistoryPageItemsItemTwoOneVersionsBankVersionRegExp).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(assessmentResultHistoryPageItemsItemTwoOneVersionsAlgorithmVersionMax).regex(assessmentResultHistoryPageItemsItemTwoOneVersionsAlgorithmVersionRegExp).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(assessmentResultHistoryPageItemsItemTwoOneLimitationsMax),
"uncertainty": zod.union([zod.object({
"theta": zod.number(),
"standard_error": zod.number().min(assessmentResultHistoryPageItemsItemTwoOneUncertaintyOneStandardErrorMin),
"interval_95": zod.object({
"low": zod.number(),
"high": zod.number()
}).describe('Interval on the ability scale.'),
"p_grade": zod.number().min(assessmentResultHistoryPageItemsItemTwoOneUncertaintyOnePGradeMin).max(assessmentResultHistoryPageItemsItemTwoOneUncertaintyOnePGradeMax).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(assessmentResultHistoryPageItemsItemTwoOneBasicScoreOnePointsMin),
"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(assessmentResultHistoryPageItemsItemTwoOnePracticesItemVerdictScoreMin).max(assessmentResultHistoryPageItemsItemTwoOnePracticesItemVerdictScoreMax),
"max_score": zod.int().min(assessmentResultHistoryPageItemsItemTwoOnePracticesItemVerdictMaxScoreMin).max(assessmentResultHistoryPageItemsItemTwoOnePracticesItemVerdictMaxScoreMax),
"groups": zod.array(zod.object({
"group": zod.int().min(1).max(assessmentResultHistoryPageItemsItemTwoOnePracticesItemVerdictGroupsItemGroupMax),
"passed": zod.boolean()
}).describe('Outcome of one hidden check group. It never contains the checks themselves.')).min(assessmentResultHistoryPageItemsItemTwoOnePracticesItemVerdictGroupsMin).max(assessmentResultHistoryPageItemsItemTwoOnePracticesItemVerdictGroupsMax)
}).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(assessmentResultHistoryPageItemsItemTwoOnePracticesMax).describe('Verdicts of the practices that have one, main first.'),
"gaps": zod.array(zod.object({
"domain": zod.string().min(1).max(assessmentResultHistoryPageItemsItemTwoOneGapsItemDomainMax).regex(assessmentResultHistoryPageItemsItemTwoOneGapsItemDomainRegExp).describe('Stable domain code of the bank blueprint.'),
"title": zod.string().min(1).max(assessmentResultHistoryPageItemsItemTwoOneGapsItemTitleMax).describe('Display name in Russian. Plain text.')
}).describe('Domain of the specialization where the evidence was weak.')).max(assessmentResultHistoryPageItemsItemTwoOneGapsMax).describe('Domains with weak evidence; empty when none were found or the method finds none.'),
"durations": zod.object({
"items_seconds": zod.int().min(assessmentResultHistoryPageItemsItemTwoOneDurationsItemsSecondsMin),
"practice_seconds": zod.int().min(assessmentResultHistoryPageItemsItemTwoOneDurationsPracticeSecondsMin).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(assessmentResultHistoryPageItemsItemTwoOneNextStepsMax),
"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.').and(zod.object({
"kind": zod.enum(['corrective']),
"root_attempt_id": zod.uuid(),
"chain_deadline": 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.')
})).and(zod.object({
"kind": zod.enum(['corrective'])
})).describe('Result of a corrective real assessment. Both chain fields are present and identify the same immutable correction chain.')]).describe('A completed root or corrective result. Training-only demo_express results are excluded from qualification history.')).max(assessmentResultHistoryPageItemsMax),
"page": zod.object({
"has_more": zod.boolean().describe('Whether another page follows this one.'),
"next_cursor": zod.string().min(1).max(assessmentResultHistoryPagePageNextCursorMax).regex(assessmentResultHistoryPagePageNextCursorRegExp).nullable().describe('Opaque cursor of the next page, or null on the last page. Clients must not parse, build, or store it beyond the current listing.')
}).describe('Cursor pagination state of a list response. Lists are ordered by a stable server-defined key. To read the next page, repeat the request with the same filters and `cursor` set to `next_cursor`.')
}).describe('Owner-only immutable root and corrective results ordered by decided_at and attempt_id descending. Legacy v1 results omit category_decision.')
export type AssessmentResultHistoryPage = zod.input<typeof AssessmentResultHistoryPage>;
export type AssessmentResultHistoryPageOutput = zod.output<typeof AssessmentResultHistoryPage>;
@@ -16,6 +16,7 @@ export * from './assessmentAttemptSessionStart.zod';
export * from './assessmentAttemptState.zod';
export * from './assessmentAttemptVersion.zod';
export * from './assessmentAvailability.zod';
export * from './assessmentCategoryDecisionView.zod';
export * from './assessmentClipboardSignal.zod';
export * from './assessmentCorrectiveAttempt.zod';
export * from './assessmentCorrectiveAttemptCreate.zod';
@@ -49,8 +50,10 @@ export * from './assessmentQualifiedAttempt.zod';
export * from './assessmentQualifiedAttemptCreate.zod';
export * from './assessmentQualifiedResult.zod';
export * from './assessmentRealMode.zod';
export * from './assessmentRealResult.zod';
export * from './assessmentRealResultCommon.zod';
export * from './assessmentResult.zod';
export * from './assessmentResultHistoryPage.zod';
export * from './assessmentSessions.zod';
export * from './assessmentSignalBatch.zod';
export * from './assessmentSignalEvent.zod';
@@ -77,6 +80,7 @@ export * from './finalizeMyAssessmentAttemptHeaders.zod';
export * from './findErrorAnswer.zod';
export * from './findErrorItemContent.zod';
export * from './itemContent.zod';
export * from './listMyAssessmentResultsParams.zod';
export * from './numberAnswer.zod';
export * from './numberItemContent.zod';
export * from './orderAnswer.zod';
@@ -0,0 +1,23 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const listMyAssessmentResultsParamsLimitDefault = 20;
export const listMyAssessmentResultsParamsLimitMax = 50;
export const listMyAssessmentResultsParamsCursorMax = 512;
export const listMyAssessmentResultsParamsCursorRegExp = new RegExp('^[A-Za-z0-9_-]+$');
export const ListMyAssessmentResultsParams = zod.object({
"limit": zod.int().min(1).max(listMyAssessmentResultsParamsLimitMax).default(listMyAssessmentResultsParamsLimitDefault),
"cursor": zod.string().min(1).max(listMyAssessmentResultsParamsCursorMax).regex(listMyAssessmentResultsParamsCursorRegExp).exactOptional()
})
export type ListMyAssessmentResultsParams = zod.input<typeof ListMyAssessmentResultsParams>;
export type ListMyAssessmentResultsParamsOutput = zod.output<typeof ListMyAssessmentResultsParams>;