feat(api): add specialization catalog and candidate questionnaire contract

This commit is contained in:
shira committed 2026-10-06 02:51:23 +03:00
1 parent c338c0c188
commit faeeb5f157
64 files changed
+8339 -47

No files matched your search

@@ -0,0 +1,71 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import {
faker
} from '@faker-js/faker';
import {
HttpResponse,
http
} from 'msw';
import type {
RequestHandlerOptions
} from 'msw';
import {
GradeCode,
SpecializationCode,
TaskLanguage,
WorkFormat
} from '../../schemas';
import type {
CandidateExperience,
CandidateQuestionnaire,
WorkContext
} from '../../schemas';
export const getGetMyQuestionnaireResponseCandidateExperienceMock = (overrideResponse: Partial<CandidateExperience> = {}): CandidateExperience => ({...{commercial_months: faker.number.int({min: 0, max: 600}), academic_months: faker.number.int({min: 0, max: 600})}, ...overrideResponse});
export const getGetMyQuestionnaireResponseWorkContextMock = (overrideResponse: Partial<WorkContext> = {}): WorkContext => ({...{work_formats: faker.helpers.arrayElements(Object.values(WorkFormat))}, ...overrideResponse});
export const getGetMyQuestionnaireResponseMock = (overrideResponse: Partial<Extract<CandidateQuestionnaire, object>> = {}): CandidateQuestionnaire => ({version: faker.number.int({min: 0}), specializations: Array.from({ length: faker.number.int({min: 1, max: 2}) }, (_, i) => i + 1).map(() => ({specialization: faker.helpers.arrayElement(Object.values(SpecializationCode)), self_assessed_grade: faker.helpers.arrayElement(Object.values(GradeCode)), task_languages: faker.helpers.arrayElements(Object.values(TaskLanguage)), stack: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => (faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"))), experience: faker.helpers.arrayElement([{...getGetMyQuestionnaireResponseCandidateExperienceMock()},null,])})), work_context: faker.helpers.arrayElement([{...getGetMyQuestionnaireResponseWorkContextMock()},null,]), updated_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), ...overrideResponse})
export const getSaveMyQuestionnaireResponseCandidateExperienceMock = (overrideResponse: Partial<CandidateExperience> = {}): CandidateExperience => ({...{commercial_months: faker.number.int({min: 0, max: 600}), academic_months: faker.number.int({min: 0, max: 600})}, ...overrideResponse});
export const getSaveMyQuestionnaireResponseWorkContextMock = (overrideResponse: Partial<WorkContext> = {}): WorkContext => ({...{work_formats: faker.helpers.arrayElements(Object.values(WorkFormat))}, ...overrideResponse});
export const getSaveMyQuestionnaireResponseMock = (overrideResponse: Partial<Extract<CandidateQuestionnaire, object>> = {}): CandidateQuestionnaire => ({version: faker.number.int({min: 0}), specializations: Array.from({ length: faker.number.int({min: 1, max: 2}) }, (_, i) => i + 1).map(() => ({specialization: faker.helpers.arrayElement(Object.values(SpecializationCode)), self_assessed_grade: faker.helpers.arrayElement(Object.values(GradeCode)), task_languages: faker.helpers.arrayElements(Object.values(TaskLanguage)), stack: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => (faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"))), experience: faker.helpers.arrayElement([{...getSaveMyQuestionnaireResponseCandidateExperienceMock()},null,])})), work_context: faker.helpers.arrayElement([{...getSaveMyQuestionnaireResponseWorkContextMock()},null,]), updated_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), ...overrideResponse})
export const getGetMyQuestionnaireMockHandler = (overrideResponse?: CandidateQuestionnaire | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<CandidateQuestionnaire> | CandidateQuestionnaire), options?: RequestHandlerOptions) => {
return http.get('*/api/v1/me/questionnaire', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {
return HttpResponse.json(overrideResponse !== undefined
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
: getGetMyQuestionnaireResponseMock(),
{ status: 200
})
}, options)
}
export const getSaveMyQuestionnaireMockHandler = (overrideResponse?: CandidateQuestionnaire | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<CandidateQuestionnaire> | CandidateQuestionnaire), options?: RequestHandlerOptions) => {
return http.put('*/api/v1/me/questionnaire', async (info: Parameters<Parameters<typeof http.put>[1]>[0]) => {
return HttpResponse.json(overrideResponse !== undefined
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
: getSaveMyQuestionnaireResponseMock(),
{ status: 200
})
}, options)
}
export const getCandidateMock = () => [
getGetMyQuestionnaireMockHandler(),
getSaveMyQuestionnaireMockHandler()
]
@@ -0,0 +1,255 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import {
useMutation,
useQuery
} from '@tanstack/react-query';
import type {
DataTag,
DefinedInitialDataOptions,
DefinedUseQueryResult,
MutationFunction,
QueryClient,
QueryFunction,
QueryKey,
UndefinedInitialDataOptions,
UseMutationOptions,
UseMutationResult,
UseQueryOptions,
UseQueryResult
} from '@tanstack/react-query';
import type {
CandidateQuestionnaire,
CandidateQuestionnaireUpdate,
Problem
} from '../../schemas';
import { apiRequest } from '../../client';
import type { ErrorType } from '../../client';
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
const withQueryKey = <T extends object, K>(query: T, queryKey: K): T & { queryKey: K } => {
const result = { queryKey } as T & { queryKey: K };
for (const key of Object.keys(query)) {
// The explicit queryKey always wins, matching the previous
// `{ ...query, queryKey }` spread where it was set last.
if (key === 'queryKey') continue;
Object.defineProperty(result, key, {
enumerable: true,
configurable: true,
get: () => (query as Record<string, unknown>)[key],
});
}
return result;
};
export const getGetMyQuestionnaireUrl = () => {
return `/api/v1/me/questionnaire`
}
/**
* Requires the session cookie of a candidate account. The candidate comes from the session, never from a request parameter. A candidate who has not saved the questionnaire yet gets 200 with version 0 and no specializations rather than 404, so the client reads the version for the first save in the same way as for later ones and a missing questionnaire is not an error state.
*
* The response never contains a confirmed grade or a category; those come only from assessment results. A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden.
* @summary Read the questionnaire of the current candidate.
*/
export const getMyQuestionnaire = async ( options?: Parameters<typeof apiRequest>[1]): Promise<CandidateQuestionnaire> => {
return apiRequest<CandidateQuestionnaire>(getGetMyQuestionnaireUrl(),
{
...options,
method: 'GET'
}
);}
export const getGetMyQuestionnaireQueryKey = () => {
return [
`/api/v1/me/questionnaire`
] as const;
}
export const getGetMyQuestionnaireQueryOptions = <TData = Awaited<ReturnType<typeof getMyQuestionnaire>>, TError = ErrorType<Problem>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMyQuestionnaire>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
) => {
const {query: queryOptions, request: requestOptions} = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetMyQuestionnaireQueryKey();
const queryFn: QueryFunction<Awaited<ReturnType<typeof getMyQuestionnaire>>> = ({ signal }) => getMyQuestionnaire({ signal, ...requestOptions });
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMyQuestionnaire>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}
export type GetMyQuestionnaireQueryResult = NonNullable<Awaited<ReturnType<typeof getMyQuestionnaire>>>
export type GetMyQuestionnaireQueryError = ErrorType<Problem>
export function useGetMyQuestionnaire<TData = Awaited<ReturnType<typeof getMyQuestionnaire>>, TError = ErrorType<Problem>>(
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMyQuestionnaire>>, TError, TData>> & Pick<
DefinedInitialDataOptions<
Awaited<ReturnType<typeof getMyQuestionnaire>>,
TError,
Awaited<ReturnType<typeof getMyQuestionnaire>>
> , 'initialData'
>, request?: SecondParameter<typeof apiRequest>}
, queryClient?: QueryClient
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetMyQuestionnaire<TData = Awaited<ReturnType<typeof getMyQuestionnaire>>, TError = ErrorType<Problem>>(
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMyQuestionnaire>>, TError, TData>> & Pick<
UndefinedInitialDataOptions<
Awaited<ReturnType<typeof getMyQuestionnaire>>,
TError,
Awaited<ReturnType<typeof getMyQuestionnaire>>
> , 'initialData'
>, request?: SecondParameter<typeof apiRequest>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetMyQuestionnaire<TData = Awaited<ReturnType<typeof getMyQuestionnaire>>, TError = ErrorType<Problem>>(
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMyQuestionnaire>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
/**
* @summary Read the questionnaire of the current candidate.
*/
export function useGetMyQuestionnaire<TData = Awaited<ReturnType<typeof getMyQuestionnaire>>, TError = ErrorType<Problem>>(
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMyQuestionnaire>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
const queryOptions = getGetMyQuestionnaireQueryOptions(options)
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
return withQueryKey(query, queryOptions.queryKey);
}
export const getSaveMyQuestionnaireUrl = () => {
return `/api/v1/me/questionnaire`
}
/**
* Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The body is the complete new state: one or two specializations, each with a self-assessed grade, task languages, stack tags, and stated experience or null, and the working context. It replaces the stored questionnaire as a whole.
*
* Self-assessment is a claim. It influences where the assessment starts and which grade the assessment step offers first, but it adds no points and never writes a confirmed grade or a category: a self-assessed `senior`, or the word "Senior" in a stack tag, never assigns the Senior category. A real profile stays invisible to employers until an assessment confirms a category. Choosing a specialization whose test is `in_development` is allowed; no assessment starts for it until its bank is published. Removing a specialization from the questionnaire does not change assessment results.
*
* Optimistic concurrency uses `expected_version` in the body: the client sends the `version` it read, 0 for the first save. If it is not the current version, the server answers 412 version_conflict and changes nothing; the client reads the questionnaire again. The version travels in the body rather than in If-Match because the generated client cannot read the ETag response header yet. The status and code are the same as for a failed If-Match, since the client action is the same.
*
* The operation needs no Idempotency-Key: it replaces the whole state and is idempotent. A body whose specializations and working context equal the stored ones changes nothing, keeps the version, and answers 200 with the current questionnaire even when `expected_version` is older, so a retry after a lost response of a successful save succeeds instead of failing with 412.
*
* Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), domain rules (400), then the version (412). The schema rejects more than two specializations, an unknown grade, specialization, or task language, and unknown fields. The server also rejects a repeated specialization and a task language that the specialization's published bank does not offer, with 400 validation_failed and pointers to the items, for example `/specializations/1/specialization` or `/specializations/0/task_languages/0`.
*
* A successful save on the onboarding step candidate_questionnaire advances the account to candidate_assessment (planned).
* @summary Replace the questionnaire of the current candidate.
*/
export const saveMyQuestionnaire = async (candidateQuestionnaireUpdate: CandidateQuestionnaireUpdate, options?: Parameters<typeof apiRequest>[1]): Promise<CandidateQuestionnaire> => {
const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
if (!h) return {};
if (h instanceof Headers) return Object.fromEntries(h.entries());
if (Symbol.iterator in h) {
return Object.fromEntries(
Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
);
}
const headers: Record<string, string | readonly string[]> = {};
for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
if (value !== undefined) headers[name] = value;
}
return headers;
};
return apiRequest<CandidateQuestionnaire>(getSaveMyQuestionnaireUrl(),
{
...options,
method: 'PUT',
headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
body: JSON.stringify(candidateQuestionnaireUpdate)
}
);}
export const getSaveMyQuestionnaireMutationKey = () => ['saveMyQuestionnaire'] as const;
export const getSaveMyQuestionnaireMutationOptions = <TError = ErrorType<Problem>,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof saveMyQuestionnaire>>, TError,SaveMyQuestionnaireMutationVariables, TContext>, request?: SecondParameter<typeof apiRequest>}
): UseMutationOptions<Awaited<ReturnType<typeof saveMyQuestionnaire>>, TError,SaveMyQuestionnaireMutationVariables, TContext> => {
const mutationKey = getSaveMyQuestionnaireMutationKey();
const {mutation: mutationOptions, request: requestOptions} = options ?
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
options
: {...options, mutation: {...options.mutation, mutationKey}}
: {mutation: { mutationKey, }, request: undefined};
const mutationFn: MutationFunction<Awaited<ReturnType<typeof saveMyQuestionnaire>>, SaveMyQuestionnaireMutationVariables> = (props) => {
const {data} = props ?? {};
return saveMyQuestionnaire(data,requestOptions)
}
return { mutationFn, ...mutationOptions }}
export type SaveMyQuestionnaireMutationResult = NonNullable<Awaited<ReturnType<typeof saveMyQuestionnaire>>>
export type SaveMyQuestionnaireMutationBody = CandidateQuestionnaireUpdate
export type SaveMyQuestionnaireMutationError = ErrorType<Problem>
export type SaveMyQuestionnaireMutationVariables = {data: CandidateQuestionnaireUpdate}
/**
* @summary Replace the questionnaire of the current candidate.
*/
export const useSaveMyQuestionnaire = <TError = ErrorType<Problem>,
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof saveMyQuestionnaire>>, TError,SaveMyQuestionnaireMutationVariables, TContext>, request?: SecondParameter<typeof apiRequest>}
, queryClient?: QueryClient): UseMutationResult<
Awaited<ReturnType<typeof saveMyQuestionnaire>>,
TError,
SaveMyQuestionnaireMutationVariables,
TContext
> => {
return useMutation(getSaveMyQuestionnaireMutationOptions(options), queryClient);
}
@@ -0,0 +1,47 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import {
faker
} from '@faker-js/faker';
import {
HttpResponse,
http
} from 'msw';
import type {
RequestHandlerOptions
} from 'msw';
import {
DirectionCode,
GradeCode,
SpecializationCode,
TaskLanguage,
TestAvailabilityStatus
} from '../../schemas';
import type {
SpecializationCatalog
} from '../../schemas';
export const getGetSpecializationCatalogResponseMock = (overrideResponse: Partial<Extract<SpecializationCatalog, object>> = {}): SpecializationCatalog => ({directions: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => ({code: faker.helpers.arrayElement(Object.values(DirectionCode)), title: faker.string.alpha({length: {min: 1, max: 100}}), specializations: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => ({code: faker.helpers.arrayElement(Object.values(SpecializationCode)), title: faker.string.alpha({length: {min: 1, max: 100}}), test_availability: {status: faker.helpers.arrayElement(Object.values(TestAvailabilityStatus)), grades: faker.helpers.arrayElements(Object.values(GradeCode)), task_languages: faker.helpers.arrayElements(Object.values(TaskLanguage)), note: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}), null])}}))})), grades: Array.from({ length: faker.number.int({min: 1, max: 10}) }, (_, i) => i + 1).map(() => ({code: faker.helpers.arrayElement(Object.values(GradeCode)), title: faker.string.alpha({length: {min: 1, max: 100}})})), ...overrideResponse})
export const getGetSpecializationCatalogMockHandler = (overrideResponse?: SpecializationCatalog | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<SpecializationCatalog> | SpecializationCatalog), options?: RequestHandlerOptions) => {
return http.get('*/api/v1/specializations', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {
return HttpResponse.json(overrideResponse !== undefined
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
: getGetSpecializationCatalogResponseMock(),
{ status: 200
})
}, options)
}
export const getCatalogMock = () => [
getGetSpecializationCatalogMockHandler()
]
@@ -0,0 +1,154 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import {
useQuery
} from '@tanstack/react-query';
import type {
DataTag,
DefinedInitialDataOptions,
DefinedUseQueryResult,
QueryClient,
QueryFunction,
QueryKey,
UndefinedInitialDataOptions,
UseQueryOptions,
UseQueryResult
} from '@tanstack/react-query';
import type {
Problem,
SpecializationCatalog
} from '../../schemas';
import { apiRequest } from '../../client';
import type { ErrorType } from '../../client';
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
const withQueryKey = <T extends object, K>(query: T, queryKey: K): T & { queryKey: K } => {
const result = { queryKey } as T & { queryKey: K };
for (const key of Object.keys(query)) {
// The explicit queryKey always wins, matching the previous
// `{ ...query, queryKey }` spread where it was set last.
if (key === 'queryKey') continue;
Object.defineProperty(result, key, {
enumerable: true,
configurable: true,
get: () => (query as Record<string, unknown>)[key],
});
}
return result;
};
export const getGetSpecializationCatalogUrl = () => {
return `/api/v1/specializations`
}
/**
* Public operation without a session. Returns the directions with their specializations, the assessment availability of each specialization, and the grade scale. The candidate picks specializations and self-assessed grades from this catalog for the questionnaire, and the client joins the codes stored in the questionnaire with the titles here.
*
* The catalog is public because it is the same for every caller and contains no personal data: the product shows it before registration, and a public read lets intermediaries and the browser cache it. It reveals nothing beyond what the landing pages already show.
*
* A category is a specialization together with a confirmed grade. Task languages and the stack are attributes of a chosen specialization and never appear as categories. `test_availability` is derived from the published task banks at the time of the request, so it changes when a bank is published, without a contract change: the MVP opens an assessment only for a category with a published bank, and every other specialization is marked `in_development`. Presence in the catalog never means that its test is ready.
* @summary Read the catalog of directions, specializations, and grades.
*/
export const getSpecializationCatalog = async ( options?: Parameters<typeof apiRequest>[1]): Promise<SpecializationCatalog> => {
return apiRequest<SpecializationCatalog>(getGetSpecializationCatalogUrl(),
{
...options,
method: 'GET'
}
);}
export const getGetSpecializationCatalogQueryKey = () => {
return [
`/api/v1/specializations`
] as const;
}
export const getGetSpecializationCatalogQueryOptions = <TData = Awaited<ReturnType<typeof getSpecializationCatalog>>, TError = ErrorType<Problem>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecializationCatalog>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
) => {
const {query: queryOptions, request: requestOptions} = options ?? {};
const queryKey = queryOptions?.queryKey ?? getGetSpecializationCatalogQueryKey();
const queryFn: QueryFunction<Awaited<ReturnType<typeof getSpecializationCatalog>>> = ({ signal }) => getSpecializationCatalog({ signal, ...requestOptions });
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getSpecializationCatalog>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
}
export type GetSpecializationCatalogQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecializationCatalog>>>
export type GetSpecializationCatalogQueryError = ErrorType<Problem>
export function useGetSpecializationCatalog<TData = Awaited<ReturnType<typeof getSpecializationCatalog>>, TError = ErrorType<Problem>>(
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecializationCatalog>>, TError, TData>> & Pick<
DefinedInitialDataOptions<
Awaited<ReturnType<typeof getSpecializationCatalog>>,
TError,
Awaited<ReturnType<typeof getSpecializationCatalog>>
> , 'initialData'
>, request?: SecondParameter<typeof apiRequest>}
, queryClient?: QueryClient
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetSpecializationCatalog<TData = Awaited<ReturnType<typeof getSpecializationCatalog>>, TError = ErrorType<Problem>>(
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecializationCatalog>>, TError, TData>> & Pick<
UndefinedInitialDataOptions<
Awaited<ReturnType<typeof getSpecializationCatalog>>,
TError,
Awaited<ReturnType<typeof getSpecializationCatalog>>
> , 'initialData'
>, request?: SecondParameter<typeof apiRequest>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
export function useGetSpecializationCatalog<TData = Awaited<ReturnType<typeof getSpecializationCatalog>>, TError = ErrorType<Problem>>(
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecializationCatalog>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
/**
* @summary Read the catalog of directions, specializations, and grades.
*/
export function useGetSpecializationCatalog<TData = Awaited<ReturnType<typeof getSpecializationCatalog>>, TError = ErrorType<Problem>>(
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecializationCatalog>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
const queryOptions = getGetSpecializationCatalogQueryOptions(options)
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
return withQueryKey(query, queryOptions.queryKey);
}
@@ -1,2 +1,4 @@
export { getCandidateMock } from './candidate/candidate.msw'
export { getCatalogMock } from './catalog/catalog.msw'
export { getHealthMock } from './health/health.msw'
export { getIdentityMock } from './identity/identity.msw'
@@ -1,2 +1,4 @@
export * from './candidate/candidate';
export * from './catalog/catalog';
export * from './health/health';
export * from './identity/identity';
@@ -0,0 +1,22 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const candidateExperienceCommercialMonthsMin = 0;
export const candidateExperienceCommercialMonthsMax = 600;
export const candidateExperienceAcademicMonthsMin = 0;
export const candidateExperienceAcademicMonthsMax = 600;
export const CandidateExperience = zod.object({
"commercial_months": zod.int().min(candidateExperienceCommercialMonthsMin).max(candidateExperienceCommercialMonthsMax).describe('Months of commercial work in the specialization.'),
"academic_months": zod.int().min(candidateExperienceAcademicMonthsMin).max(candidateExperienceAcademicMonthsMax).describe('Months of study, internships, or academic projects in the specialization.')
}).describe('Experience that the candidate states for one specialization, in whole months. It is self-reported context: it never adds assessment points and never confirms a grade.')
export type CandidateExperience = zod.input<typeof CandidateExperience>;
export type CandidateExperienceOutput = zod.output<typeof CandidateExperience>;
@@ -0,0 +1,49 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const candidateQuestionnaireVersionMin = 0;
export const candidateQuestionnaireSpecializationsItemTaskLanguagesMax = 2;
export const candidateQuestionnaireSpecializationsItemStackItemMax = 50;
export const candidateQuestionnaireSpecializationsItemStackItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
export const candidateQuestionnaireSpecializationsItemStackMax = 20;
export const candidateQuestionnaireSpecializationsItemExperienceOneCommercialMonthsMin = 0;
export const candidateQuestionnaireSpecializationsItemExperienceOneCommercialMonthsMax = 600;
export const candidateQuestionnaireSpecializationsItemExperienceOneAcademicMonthsMin = 0;
export const candidateQuestionnaireSpecializationsItemExperienceOneAcademicMonthsMax = 600;
export const candidateQuestionnaireSpecializationsMax = 2;
export const candidateQuestionnaireWorkContextOneWorkFormatsMax = 3;
export const CandidateQuestionnaire = zod.object({
"version": zod.int().min(candidateQuestionnaireVersionMin).describe('Version of the candidate questionnaire. A candidate without a saved questionnaire has version 0; every save that changes the questionnaire advances it by one.'),
"specializations": zod.array(zod.object({
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
"self_assessed_grade": zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),
"task_languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(candidateQuestionnaireSpecializationsItemTaskLanguagesMax).describe('Task languages in which the candidate wants to solve assessment tasks of this specialization. Each value must be one of `test_availability.task_languages` of the specialization in the current catalog; any other value answers 400 validation_failed with a pointer to it. Empty when the bank offers no choice of language.'),
"stack": zod.array(zod.string().min(1).max(candidateQuestionnaireSpecializationsItemStackItemMax).regex(candidateQuestionnaireSpecializationsItemStackItemRegExp).describe('Free technology tag of the candidate\'s stack, for example PostgreSQL, Kubernetes, or Django. A tag is a descriptive attribute: it never forms a category, never selects the task language, and never changes a grade, so a tag such as "Senior" has no effect on any category. It has no leading or trailing whitespace and no line breaks. The server compares tags without regard to letter case. Clients show tags as text, never as HTML.')).max(candidateQuestionnaireSpecializationsItemStackMax).describe('Technology tags of the candidate in this specialization.'),
"experience": zod.union([zod.object({
"commercial_months": zod.int().min(candidateQuestionnaireSpecializationsItemExperienceOneCommercialMonthsMin).max(candidateQuestionnaireSpecializationsItemExperienceOneCommercialMonthsMax).describe('Months of commercial work in the specialization.'),
"academic_months": zod.int().min(candidateQuestionnaireSpecializationsItemExperienceOneAcademicMonthsMin).max(candidateQuestionnaireSpecializationsItemExperienceOneAcademicMonthsMax).describe('Months of study, internships, or academic projects in the specialization.')
}).describe('Experience that the candidate states for one specialization, in whole months. It is self-reported context: it never adds assessment points and never confirms a grade.'),zod.null()]).describe('Stated experience, or null when the candidate did not state it.')
}).describe('One specialization chosen by the candidate with the candidate\'s self-assessment. `self_assessed_grade` is a claim: it influences where the assessment starts and which grade the assessment step offers first, but it adds no points and never becomes a confirmed grade. A confirmed grade, and with it a category, comes only from an assessment result and is never part of the questionnaire; unknown fields such as `confirmed_grade` or `category` are rejected. Task languages and the stack are attributes of the chosen specialization, not categories.')).max(candidateQuestionnaireSpecializationsMax).describe('Chosen specializations in the order the candidate gave them, each specialization at most once. Each one is assessed independently.'),
"work_context": zod.union([zod.object({
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(candidateQuestionnaireWorkContextOneWorkFormatsMax).describe('Acceptable work formats.')
}).describe('Working context of the candidate\'s search. It holds no personal data such as an address or a city; location, relocation, and salary expectations belong to the candidate profile.'),zod.null()]).describe('Working context, or null before the first save.'),
"updated_at": zod.union([zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),zod.null()]).describe('Time of the last change, or null before the first save.')
}).describe('Questionnaire of the current candidate: the chosen specializations with self-assessed grades and the working context. It never contains a confirmed grade or a category; those come only from assessment results. A candidate who has not saved the questionnaire yet gets version 0, no specializations, and null `work_context` and `updated_at`.')
export type CandidateQuestionnaire = zod.input<typeof CandidateQuestionnaire>;
export type CandidateQuestionnaireOutput = zod.output<typeof CandidateQuestionnaire>;
@@ -0,0 +1,48 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const candidateQuestionnaireUpdateExpectedVersionMin = 0;
export const candidateQuestionnaireUpdateSpecializationsItemTaskLanguagesMax = 2;
export const candidateQuestionnaireUpdateSpecializationsItemStackItemMax = 50;
export const candidateQuestionnaireUpdateSpecializationsItemStackItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
export const candidateQuestionnaireUpdateSpecializationsItemStackMax = 20;
export const candidateQuestionnaireUpdateSpecializationsItemExperienceOneCommercialMonthsMin = 0;
export const candidateQuestionnaireUpdateSpecializationsItemExperienceOneCommercialMonthsMax = 600;
export const candidateQuestionnaireUpdateSpecializationsItemExperienceOneAcademicMonthsMin = 0;
export const candidateQuestionnaireUpdateSpecializationsItemExperienceOneAcademicMonthsMax = 600;
export const candidateQuestionnaireUpdateSpecializationsMax = 2;
export const candidateQuestionnaireUpdateWorkContextWorkFormatsMax = 3;
export const CandidateQuestionnaireUpdate = zod.object({
"expected_version": zod.int().min(candidateQuestionnaireUpdateExpectedVersionMin).describe('Version of the candidate questionnaire. A candidate without a saved questionnaire has version 0; every save that changes the questionnaire advances it by one.'),
"specializations": zod.array(zod.object({
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
"self_assessed_grade": zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),
"task_languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(candidateQuestionnaireUpdateSpecializationsItemTaskLanguagesMax).describe('Task languages in which the candidate wants to solve assessment tasks of this specialization. Each value must be one of `test_availability.task_languages` of the specialization in the current catalog; any other value answers 400 validation_failed with a pointer to it. Empty when the bank offers no choice of language.'),
"stack": zod.array(zod.string().min(1).max(candidateQuestionnaireUpdateSpecializationsItemStackItemMax).regex(candidateQuestionnaireUpdateSpecializationsItemStackItemRegExp).describe('Free technology tag of the candidate\'s stack, for example PostgreSQL, Kubernetes, or Django. A tag is a descriptive attribute: it never forms a category, never selects the task language, and never changes a grade, so a tag such as "Senior" has no effect on any category. It has no leading or trailing whitespace and no line breaks. The server compares tags without regard to letter case. Clients show tags as text, never as HTML.')).max(candidateQuestionnaireUpdateSpecializationsItemStackMax).describe('Technology tags of the candidate in this specialization.'),
"experience": zod.union([zod.object({
"commercial_months": zod.int().min(candidateQuestionnaireUpdateSpecializationsItemExperienceOneCommercialMonthsMin).max(candidateQuestionnaireUpdateSpecializationsItemExperienceOneCommercialMonthsMax).describe('Months of commercial work in the specialization.'),
"academic_months": zod.int().min(candidateQuestionnaireUpdateSpecializationsItemExperienceOneAcademicMonthsMin).max(candidateQuestionnaireUpdateSpecializationsItemExperienceOneAcademicMonthsMax).describe('Months of study, internships, or academic projects in the specialization.')
}).describe('Experience that the candidate states for one specialization, in whole months. It is self-reported context: it never adds assessment points and never confirms a grade.'),zod.null()]).describe('Stated experience, or null when the candidate did not state it.')
}).describe('One specialization chosen by the candidate with the candidate\'s self-assessment. `self_assessed_grade` is a claim: it influences where the assessment starts and which grade the assessment step offers first, but it adds no points and never becomes a confirmed grade. A confirmed grade, and with it a category, comes only from an assessment result and is never part of the questionnaire; unknown fields such as `confirmed_grade` or `category` are rejected. Task languages and the stack are attributes of the chosen specialization, not categories.')).min(1).max(candidateQuestionnaireUpdateSpecializationsMax).describe('One or two chosen specializations. The schema limits the count; the server also requires each specialization to appear at most once and answers a repeated one with 400 validation_failed and the pointer of the repeated item\'s `specialization`, for example `/specializations/1/specialization`.'),
"work_context": zod.object({
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(candidateQuestionnaireUpdateWorkContextWorkFormatsMax).describe('Acceptable work formats.')
}).describe('Working context of the candidate\'s search. It holds no personal data such as an address or a city; location, relocation, and salary expectations belong to the candidate profile.')
}).describe('Complete new state of the questionnaire. It replaces the stored specializations and working context as a whole. Unknown fields are rejected, so a request cannot set a confirmed grade or a category.')
export type CandidateQuestionnaireUpdate = zod.input<typeof CandidateQuestionnaireUpdate>;
export type CandidateQuestionnaireUpdateOutput = zod.output<typeof CandidateQuestionnaireUpdate>;
@@ -0,0 +1,16 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
export * from './candidateExperience.zod';
export * from './candidateQuestionnaire.zod';
export * from './candidateQuestionnaireUpdate.zod';
export * from './questionnaireSpecialization.zod';
export * from './questionnaireVersion.zod';
export * from './saveMyQuestionnaireBody.zod';
export * from './stackTag.zod';
export * from './workContext.zod';
export * from './workFormat.zod';
@@ -0,0 +1,36 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const questionnaireSpecializationTaskLanguagesMax = 2;
export const questionnaireSpecializationStackItemMax = 50;
export const questionnaireSpecializationStackItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
export const questionnaireSpecializationStackMax = 20;
export const questionnaireSpecializationExperienceOneCommercialMonthsMin = 0;
export const questionnaireSpecializationExperienceOneCommercialMonthsMax = 600;
export const questionnaireSpecializationExperienceOneAcademicMonthsMin = 0;
export const questionnaireSpecializationExperienceOneAcademicMonthsMax = 600;
export const QuestionnaireSpecialization = zod.object({
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
"self_assessed_grade": zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),
"task_languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(questionnaireSpecializationTaskLanguagesMax).describe('Task languages in which the candidate wants to solve assessment tasks of this specialization. Each value must be one of `test_availability.task_languages` of the specialization in the current catalog; any other value answers 400 validation_failed with a pointer to it. Empty when the bank offers no choice of language.'),
"stack": zod.array(zod.string().min(1).max(questionnaireSpecializationStackItemMax).regex(questionnaireSpecializationStackItemRegExp).describe('Free technology tag of the candidate\'s stack, for example PostgreSQL, Kubernetes, or Django. A tag is a descriptive attribute: it never forms a category, never selects the task language, and never changes a grade, so a tag such as "Senior" has no effect on any category. It has no leading or trailing whitespace and no line breaks. The server compares tags without regard to letter case. Clients show tags as text, never as HTML.')).max(questionnaireSpecializationStackMax).describe('Technology tags of the candidate in this specialization.'),
"experience": zod.union([zod.object({
"commercial_months": zod.int().min(questionnaireSpecializationExperienceOneCommercialMonthsMin).max(questionnaireSpecializationExperienceOneCommercialMonthsMax).describe('Months of commercial work in the specialization.'),
"academic_months": zod.int().min(questionnaireSpecializationExperienceOneAcademicMonthsMin).max(questionnaireSpecializationExperienceOneAcademicMonthsMax).describe('Months of study, internships, or academic projects in the specialization.')
}).describe('Experience that the candidate states for one specialization, in whole months. It is self-reported context: it never adds assessment points and never confirms a grade.'),zod.null()]).describe('Stated experience, or null when the candidate did not state it.')
}).describe('One specialization chosen by the candidate with the candidate\'s self-assessment. `self_assessed_grade` is a claim: it influences where the assessment starts and which grade the assessment step offers first, but it adds no points and never becomes a confirmed grade. A confirmed grade, and with it a category, comes only from an assessment result and is never part of the questionnaire; unknown fields such as `confirmed_grade` or `category` are rejected. Task languages and the stack are attributes of the chosen specialization, not categories.')
export type QuestionnaireSpecialization = zod.input<typeof QuestionnaireSpecialization>;
export type QuestionnaireSpecializationOutput = zod.output<typeof QuestionnaireSpecialization>;
@@ -0,0 +1,15 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const QuestionnaireVersionMin = 0;
export const QuestionnaireVersion = zod.int().min(QuestionnaireVersionMin).describe('Version of the candidate questionnaire. A candidate without a saved questionnaire has version 0; every save that changes the questionnaire advances it by one.')
export type QuestionnaireVersion = zod.input<typeof QuestionnaireVersion>;
export type QuestionnaireVersionOutput = zod.output<typeof QuestionnaireVersion>;
@@ -0,0 +1,48 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const saveMyQuestionnaireBodyExpectedVersionMin = 0;
export const saveMyQuestionnaireBodySpecializationsItemTaskLanguagesMax = 2;
export const saveMyQuestionnaireBodySpecializationsItemStackItemMax = 50;
export const saveMyQuestionnaireBodySpecializationsItemStackItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
export const saveMyQuestionnaireBodySpecializationsItemStackMax = 20;
export const saveMyQuestionnaireBodySpecializationsItemExperienceOneCommercialMonthsMin = 0;
export const saveMyQuestionnaireBodySpecializationsItemExperienceOneCommercialMonthsMax = 600;
export const saveMyQuestionnaireBodySpecializationsItemExperienceOneAcademicMonthsMin = 0;
export const saveMyQuestionnaireBodySpecializationsItemExperienceOneAcademicMonthsMax = 600;
export const saveMyQuestionnaireBodySpecializationsMax = 2;
export const saveMyQuestionnaireBodyWorkContextWorkFormatsMax = 3;
export const SaveMyQuestionnaireBody = zod.object({
"expected_version": zod.int().min(saveMyQuestionnaireBodyExpectedVersionMin).describe('Version of the candidate questionnaire. A candidate without a saved questionnaire has version 0; every save that changes the questionnaire advances it by one.'),
"specializations": zod.array(zod.object({
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
"self_assessed_grade": zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),
"task_languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(saveMyQuestionnaireBodySpecializationsItemTaskLanguagesMax).describe('Task languages in which the candidate wants to solve assessment tasks of this specialization. Each value must be one of `test_availability.task_languages` of the specialization in the current catalog; any other value answers 400 validation_failed with a pointer to it. Empty when the bank offers no choice of language.'),
"stack": zod.array(zod.string().min(1).max(saveMyQuestionnaireBodySpecializationsItemStackItemMax).regex(saveMyQuestionnaireBodySpecializationsItemStackItemRegExp).describe('Free technology tag of the candidate\'s stack, for example PostgreSQL, Kubernetes, or Django. A tag is a descriptive attribute: it never forms a category, never selects the task language, and never changes a grade, so a tag such as "Senior" has no effect on any category. It has no leading or trailing whitespace and no line breaks. The server compares tags without regard to letter case. Clients show tags as text, never as HTML.')).max(saveMyQuestionnaireBodySpecializationsItemStackMax).describe('Technology tags of the candidate in this specialization.'),
"experience": zod.union([zod.object({
"commercial_months": zod.int().min(saveMyQuestionnaireBodySpecializationsItemExperienceOneCommercialMonthsMin).max(saveMyQuestionnaireBodySpecializationsItemExperienceOneCommercialMonthsMax).describe('Months of commercial work in the specialization.'),
"academic_months": zod.int().min(saveMyQuestionnaireBodySpecializationsItemExperienceOneAcademicMonthsMin).max(saveMyQuestionnaireBodySpecializationsItemExperienceOneAcademicMonthsMax).describe('Months of study, internships, or academic projects in the specialization.')
}).describe('Experience that the candidate states for one specialization, in whole months. It is self-reported context: it never adds assessment points and never confirms a grade.'),zod.null()]).describe('Stated experience, or null when the candidate did not state it.')
}).describe('One specialization chosen by the candidate with the candidate\'s self-assessment. `self_assessed_grade` is a claim: it influences where the assessment starts and which grade the assessment step offers first, but it adds no points and never becomes a confirmed grade. A confirmed grade, and with it a category, comes only from an assessment result and is never part of the questionnaire; unknown fields such as `confirmed_grade` or `category` are rejected. Task languages and the stack are attributes of the chosen specialization, not categories.')).min(1).max(saveMyQuestionnaireBodySpecializationsMax).describe('One or two chosen specializations. The schema limits the count; the server also requires each specialization to appear at most once and answers a repeated one with 400 validation_failed and the pointer of the repeated item\'s `specialization`, for example `/specializations/1/specialization`.'),
"work_context": zod.object({
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(saveMyQuestionnaireBodyWorkContextWorkFormatsMax).describe('Acceptable work formats.')
}).describe('Working context of the candidate\'s search. It holds no personal data such as an address or a city; location, relocation, and salary expectations belong to the candidate profile.')
}).describe('Complete new state of the questionnaire. It replaces the stored specializations and working context as a whole. Unknown fields are rejected, so a request cannot set a confirmed grade or a category.')
export type SaveMyQuestionnaireBody = zod.input<typeof SaveMyQuestionnaireBody>;
export type SaveMyQuestionnaireBodyOutput = zod.output<typeof SaveMyQuestionnaireBody>;
@@ -0,0 +1,17 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const StackTagMax = 50;
export const StackTagRegExp = new RegExp('^\\S(?:.*\\S)?$');
export const StackTag = zod.string().min(1).max(StackTagMax).regex(StackTagRegExp).describe('Free technology tag of the candidate\'s stack, for example PostgreSQL, Kubernetes, or Django. A tag is a descriptive attribute: it never forms a category, never selects the task language, and never changes a grade, so a tag such as "Senior" has no effect on any category. It has no leading or trailing whitespace and no line breaks. The server compares tags without regard to letter case. Clients show tags as text, never as HTML.')
export type StackTag = zod.input<typeof StackTag>;
export type StackTagOutput = zod.output<typeof StackTag>;
@@ -0,0 +1,17 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const workContextWorkFormatsMax = 3;
export const WorkContext = zod.object({
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(workContextWorkFormatsMax).describe('Acceptable work formats.')
}).describe('Working context of the candidate\'s search. It holds no personal data such as an address or a city; location, relocation, and salary expectations belong to the candidate profile.')
export type WorkContext = zod.input<typeof WorkContext>;
export type WorkContextOutput = zod.output<typeof WorkContext>;
@@ -0,0 +1,12 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const WorkFormat = zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')
export type WorkFormat = zod.input<typeof WorkFormat>;
export type WorkFormatOutput = zod.output<typeof WorkFormat>;
@@ -0,0 +1,38 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const catalogDirectionTitleMax = 100;
export const catalogDirectionSpecializationsItemTitleMax = 100;
export const catalogDirectionSpecializationsItemTestAvailabilityGradesMax = 10;
export const catalogDirectionSpecializationsItemTestAvailabilityTaskLanguagesMax = 2;
export const catalogDirectionSpecializationsItemTestAvailabilityNoteMax = 300;
export const catalogDirectionSpecializationsMax = 20;
export const CatalogDirection = zod.object({
"code": zod.enum(['development', 'infrastructure', 'data', 'security', 'quality']).describe('Stable code of a professional direction, the group that a specialization belongs to.\n\n- development: Development.\n- infrastructure: Infrastructure.\n- data: Data.\n- security: Security.\n- quality: Quality.\n\nAdding a value is a contract change.'),
"title": zod.string().min(1).max(catalogDirectionTitleMax).describe('Display name in Russian. Plain text.'),
"specializations": zod.array(zod.object({
"code": 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.'),
"title": zod.string().min(1).max(catalogDirectionSpecializationsItemTitleMax).describe('Display name in Russian. Plain text.'),
"test_availability": zod.object({
"status": zod.enum(['available', 'in_development']).describe('Whether an assessment can start for the specialization. `available` means that a published task bank exists for at least one grade, listed in `TestAvailability.grades`. `in_development` means that no grade of the specialization has a published bank yet; the specialization can still be chosen in the questionnaire, but no assessment starts and no category can be confirmed for it. Presence in the catalog or in demo data never means that a test is ready.'),
"grades": zod.array(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.')).max(catalogDirectionSpecializationsItemTestAvailabilityGradesMax).describe('Grades of the specialization with a published task bank, in ascending order. Only these categories can be assessed and confirmed.'),
"task_languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(catalogDirectionSpecializationsItemTestAvailabilityTaskLanguagesMax).describe('Task languages that the published bank offers for this specialization. Empty when the bank does not offer a choice of language, as for Network Engineer, or when no bank is published. The questionnaire accepts only these languages for the specialization.'),
"note": zod.string().min(1).max(catalogDirectionSpecializationsItemTestAvailabilityNoteMax).nullable().describe('Short Russian note for the candidate, for example why the test is not available yet, or null. Plain text; the client shows it as text, never as HTML.')
}).describe('Assessment availability of a specialization, derived by the server from the published task banks at the time of the request. The MVP opens an assessment only for a category, a specialization and a grade, that has a published bank. `status` is `available` exactly when `grades` is not empty; for `in_development` both `grades` and `task_languages` are empty.')
}).describe('Specialization in the catalog with its assessment availability.')).min(1).max(catalogDirectionSpecializationsMax).describe('Specializations of the direction in display order.')
}).describe('Professional direction with its specializations. Each specialization belongs to exactly one direction.')
export type CatalogDirection = zod.input<typeof CatalogDirection>;
export type CatalogDirectionOutput = zod.output<typeof CatalogDirection>;
@@ -0,0 +1,18 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const catalogGradeTitleMax = 100;
export const CatalogGrade = zod.object({
"code": 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.'),
"title": zod.string().min(1).max(catalogGradeTitleMax).describe('Display name in Russian. Plain text.')
}).describe('Grade of the scale with its display name.')
export type CatalogGrade = zod.input<typeof CatalogGrade>;
export type CatalogGradeOutput = zod.output<typeof CatalogGrade>;
@@ -0,0 +1,30 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const catalogSpecializationTitleMax = 100;
export const catalogSpecializationTestAvailabilityGradesMax = 10;
export const catalogSpecializationTestAvailabilityTaskLanguagesMax = 2;
export const catalogSpecializationTestAvailabilityNoteMax = 300;
export const CatalogSpecialization = zod.object({
"code": 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.'),
"title": zod.string().min(1).max(catalogSpecializationTitleMax).describe('Display name in Russian. Plain text.'),
"test_availability": zod.object({
"status": zod.enum(['available', 'in_development']).describe('Whether an assessment can start for the specialization. `available` means that a published task bank exists for at least one grade, listed in `TestAvailability.grades`. `in_development` means that no grade of the specialization has a published bank yet; the specialization can still be chosen in the questionnaire, but no assessment starts and no category can be confirmed for it. Presence in the catalog or in demo data never means that a test is ready.'),
"grades": zod.array(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.')).max(catalogSpecializationTestAvailabilityGradesMax).describe('Grades of the specialization with a published task bank, in ascending order. Only these categories can be assessed and confirmed.'),
"task_languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(catalogSpecializationTestAvailabilityTaskLanguagesMax).describe('Task languages that the published bank offers for this specialization. Empty when the bank does not offer a choice of language, as for Network Engineer, or when no bank is published. The questionnaire accepts only these languages for the specialization.'),
"note": zod.string().min(1).max(catalogSpecializationTestAvailabilityNoteMax).nullable().describe('Short Russian note for the candidate, for example why the test is not available yet, or null. Plain text; the client shows it as text, never as HTML.')
}).describe('Assessment availability of a specialization, derived by the server from the published task banks at the time of the request. The MVP opens an assessment only for a category, a specialization and a grade, that has a published bank. `status` is `available` exactly when `grades` is not empty; for `in_development` both `grades` and `task_languages` are empty.')
}).describe('Specialization in the catalog with its assessment availability.')
export type CatalogSpecialization = zod.input<typeof CatalogSpecialization>;
export type CatalogSpecializationOutput = zod.output<typeof CatalogSpecialization>;
@@ -0,0 +1,12 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const DirectionCode = zod.enum(['development', 'infrastructure', 'data', 'security', 'quality']).describe('Stable code of a professional direction, the group that a specialization belongs to.\n\n- development: Development.\n- infrastructure: Infrastructure.\n- data: Data.\n- security: Security.\n- quality: Quality.\n\nAdding a value is a contract change.')
export type DirectionCode = zod.input<typeof DirectionCode>;
export type DirectionCodeOutput = zod.output<typeof DirectionCode>;
@@ -0,0 +1,14 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
export * from './catalogDirection.zod';
export * from './catalogGrade.zod';
export * from './catalogSpecialization.zod';
export * from './directionCode.zod';
export * from './specializationCatalog.zod';
export * from './testAvailability.zod';
export * from './testAvailabilityStatus.zod';
@@ -0,0 +1,50 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const specializationCatalogDirectionsItemTitleMax = 100;
export const specializationCatalogDirectionsItemSpecializationsItemTitleMax = 100;
export const specializationCatalogDirectionsItemSpecializationsItemTestAvailabilityGradesMax = 10;
export const specializationCatalogDirectionsItemSpecializationsItemTestAvailabilityTaskLanguagesMax = 2;
export const specializationCatalogDirectionsItemSpecializationsItemTestAvailabilityNoteMax = 300;
export const specializationCatalogDirectionsItemSpecializationsMax = 20;
export const specializationCatalogDirectionsMax = 20;
export const specializationCatalogGradesItemTitleMax = 100;
export const specializationCatalogGradesMax = 10;
export const SpecializationCatalog = zod.object({
"directions": zod.array(zod.object({
"code": zod.enum(['development', 'infrastructure', 'data', 'security', 'quality']).describe('Stable code of a professional direction, the group that a specialization belongs to.\n\n- development: Development.\n- infrastructure: Infrastructure.\n- data: Data.\n- security: Security.\n- quality: Quality.\n\nAdding a value is a contract change.'),
"title": zod.string().min(1).max(specializationCatalogDirectionsItemTitleMax).describe('Display name in Russian. Plain text.'),
"specializations": zod.array(zod.object({
"code": 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.'),
"title": zod.string().min(1).max(specializationCatalogDirectionsItemSpecializationsItemTitleMax).describe('Display name in Russian. Plain text.'),
"test_availability": zod.object({
"status": zod.enum(['available', 'in_development']).describe('Whether an assessment can start for the specialization. `available` means that a published task bank exists for at least one grade, listed in `TestAvailability.grades`. `in_development` means that no grade of the specialization has a published bank yet; the specialization can still be chosen in the questionnaire, but no assessment starts and no category can be confirmed for it. Presence in the catalog or in demo data never means that a test is ready.'),
"grades": zod.array(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.')).max(specializationCatalogDirectionsItemSpecializationsItemTestAvailabilityGradesMax).describe('Grades of the specialization with a published task bank, in ascending order. Only these categories can be assessed and confirmed.'),
"task_languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(specializationCatalogDirectionsItemSpecializationsItemTestAvailabilityTaskLanguagesMax).describe('Task languages that the published bank offers for this specialization. Empty when the bank does not offer a choice of language, as for Network Engineer, or when no bank is published. The questionnaire accepts only these languages for the specialization.'),
"note": zod.string().min(1).max(specializationCatalogDirectionsItemSpecializationsItemTestAvailabilityNoteMax).nullable().describe('Short Russian note for the candidate, for example why the test is not available yet, or null. Plain text; the client shows it as text, never as HTML.')
}).describe('Assessment availability of a specialization, derived by the server from the published task banks at the time of the request. The MVP opens an assessment only for a category, a specialization and a grade, that has a published bank. `status` is `available` exactly when `grades` is not empty; for `in_development` both `grades` and `task_languages` are empty.')
}).describe('Specialization in the catalog with its assessment availability.')).min(1).max(specializationCatalogDirectionsItemSpecializationsMax).describe('Specializations of the direction in display order.')
}).describe('Professional direction with its specializations. Each specialization belongs to exactly one direction.')).min(1).max(specializationCatalogDirectionsMax).describe('Directions in display order.'),
"grades": zod.array(zod.object({
"code": 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.'),
"title": zod.string().min(1).max(specializationCatalogGradesItemTitleMax).describe('Display name in Russian. Plain text.')
}).describe('Grade of the scale with its display name.')).min(1).max(specializationCatalogGradesMax).describe('Grade scale in ascending order.')
}).describe('Catalog of directions, specializations, and the grade scale that the questionnaire and the assessment use. The catalog is reference data and identical for every caller; it contains no personal data.')
export type SpecializationCatalog = zod.input<typeof SpecializationCatalog>;
export type SpecializationCatalogOutput = zod.output<typeof SpecializationCatalog>;
@@ -0,0 +1,24 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const testAvailabilityGradesMax = 10;
export const testAvailabilityTaskLanguagesMax = 2;
export const testAvailabilityNoteMax = 300;
export const TestAvailability = zod.object({
"status": zod.enum(['available', 'in_development']).describe('Whether an assessment can start for the specialization. `available` means that a published task bank exists for at least one grade, listed in `TestAvailability.grades`. `in_development` means that no grade of the specialization has a published bank yet; the specialization can still be chosen in the questionnaire, but no assessment starts and no category can be confirmed for it. Presence in the catalog or in demo data never means that a test is ready.'),
"grades": zod.array(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.')).max(testAvailabilityGradesMax).describe('Grades of the specialization with a published task bank, in ascending order. Only these categories can be assessed and confirmed.'),
"task_languages": zod.array(zod.enum(['python', 'go']).describe('Programming language in which assessment tasks of a specialization are offered and solved. It is the language of the task bank, not the candidate\'s platform stack, and it never forms a separate category. Only banks that offer a choice of language define task languages; the first Backend bank offers Python and Go. Adding a value is a contract change.')).max(testAvailabilityTaskLanguagesMax).describe('Task languages that the published bank offers for this specialization. Empty when the bank does not offer a choice of language, as for Network Engineer, or when no bank is published. The questionnaire accepts only these languages for the specialization.'),
"note": zod.string().min(1).max(testAvailabilityNoteMax).nullable().describe('Short Russian note for the candidate, for example why the test is not available yet, or null. Plain text; the client shows it as text, never as HTML.')
}).describe('Assessment availability of a specialization, derived by the server from the published task banks at the time of the request. The MVP opens an assessment only for a category, a specialization and a grade, that has a published bank. `status` is `available` exactly when `grades` is not empty; for `in_development` both `grades` and `task_languages` are empty.')
export type TestAvailability = zod.input<typeof TestAvailability>;
export type TestAvailabilityOutput = zod.output<typeof TestAvailability>;
@@ -0,0 +1,12 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const TestAvailabilityStatus = zod.enum(['available', 'in_development']).describe('Whether an assessment can start for the specialization. `available` means that a published task bank exists for at least one grade, listed in `TestAvailability.grades`. `in_development` means that no grade of the specialization has a published bank yet; the specialization can still be chosen in the questionnaire, but no assessment starts and no category can be confirmed for it. Presence in the catalog or in demo data never means that a test is ready.')
export type TestAvailabilityStatus = zod.input<typeof TestAvailabilityStatus>;
export type TestAvailabilityStatusOutput = zod.output<typeof TestAvailabilityStatus>;
@@ -0,0 +1,12 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const GradeCode = 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.')
export type GradeCode = zod.input<typeof GradeCode>;
export type GradeCodeOutput = zod.output<typeof GradeCode>;
@@ -15,7 +15,7 @@ export const Account = zod.object({
"email": zod.email().min(accountEmailMin).max(accountEmailMax).describe('Account email address. The server compares addresses without regard to letter case and never reveals in a response whether an address belongs to an account.'),
"email_verified": zod.boolean().describe('Whether the address is verified. A session exists only for a verified account, so this is true in every current response.'),
"scenario": zod.enum(['candidate', 'employer']).describe('Scenario chosen at registration: `candidate` looks for an offer and passes the assessment, `employer` represents a company that searches for candidates. The scenario selects the onboarding steps.'),
"onboarding_step": zod.enum(['candidate_consents', 'candidate_profile', 'candidate_questionnaire', 'candidate_assessment', 'employer_company', 'completed']).describe('Saved onboarding step that the account returns to after login. The server stores it and advances it as each step completes; clients route by it and never set it directly.\n\n- candidate_consents: candidate consents beyond C1, which was given at registration.\n- candidate_profile: candidate profile.\n- candidate_questionnaire: candidate questionnaire.\n- candidate_assessment: choice of the expected grade and the assessment.\n- employer_company: company profile of the employer.\n- completed: onboarding is finished; the client opens the scenario home.\n\nCandidate steps follow the order above and end with completed; the employer has employer_company and then completed. New steps may be added as onboarding grows; adding a value is a contract change.'),
"onboarding_step": zod.enum(['candidate_consents', 'candidate_profile', 'candidate_questionnaire', 'candidate_assessment', 'employer_company', 'completed']).describe('Saved onboarding step that the account returns to after login. The server stores it and advances it as each step completes; clients route by it and never set it directly.\n\n- candidate_consents: candidate consents beyond C1, which was given at registration.\n- candidate_profile: candidate profile.\n- candidate_questionnaire: candidate questionnaire.\n- candidate_assessment: the assessment. The expected grade is the `self_assessed_grade` saved in the questionnaire, and this step offers it first; only an assessment result confirms a grade. The first successful SaveMyQuestionnaire moves the account from candidate_questionnaire to this step (planned).\n- employer_company: company profile of the employer.\n- completed: onboarding is finished; the client opens the scenario home.\n\nCandidate steps follow the order above and end with completed; the employer has employer_company and then completed. New steps may be added as onboarding grows; adding a value is a contract change.'),
"created_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('Current account view. It never contains password hashes, token hashes, session identifiers, or other storage secrets.')
@@ -9,7 +9,7 @@ import * as zod from 'zod';
export const EmailVerificationResult = zod.object({
"email_verified": zod.literal(true).describe('Always true in a successful response.'),
"scenario": zod.enum(['candidate', 'employer']).describe('Scenario chosen at registration: `candidate` looks for an offer and passes the assessment, `employer` represents a company that searches for candidates. The scenario selects the onboarding steps.'),
"onboarding_step": zod.enum(['candidate_consents', 'candidate_profile', 'candidate_questionnaire', 'candidate_assessment', 'employer_company', 'completed']).describe('Saved onboarding step that the account returns to after login. The server stores it and advances it as each step completes; clients route by it and never set it directly.\n\n- candidate_consents: candidate consents beyond C1, which was given at registration.\n- candidate_profile: candidate profile.\n- candidate_questionnaire: candidate questionnaire.\n- candidate_assessment: choice of the expected grade and the assessment.\n- employer_company: company profile of the employer.\n- completed: onboarding is finished; the client opens the scenario home.\n\nCandidate steps follow the order above and end with completed; the employer has employer_company and then completed. New steps may be added as onboarding grows; adding a value is a contract change.')
"onboarding_step": zod.enum(['candidate_consents', 'candidate_profile', 'candidate_questionnaire', 'candidate_assessment', 'employer_company', 'completed']).describe('Saved onboarding step that the account returns to after login. The server stores it and advances it as each step completes; clients route by it and never set it directly.\n\n- candidate_consents: candidate consents beyond C1, which was given at registration.\n- candidate_profile: candidate profile.\n- candidate_questionnaire: candidate questionnaire.\n- candidate_assessment: the assessment. The expected grade is the `self_assessed_grade` saved in the questionnaire, and this step offers it first; only an assessment result confirms a grade. The first successful SaveMyQuestionnaire moves the account from candidate_questionnaire to this step (planned).\n- employer_company: company profile of the employer.\n- completed: onboarding is finished; the client opens the scenario home.\n\nCandidate steps follow the order above and end with completed; the employer has employer_company and then completed. New steps may be added as onboarding grows; adding a value is a contract change.')
}).describe('Result of a successful email verification. It does not start a session; the user signs in next and continues from `onboarding_step`.')
export type EmailVerificationResult = zod.input<typeof EmailVerificationResult>;
@@ -28,5 +28,4 @@ export * from './registerAccountHeaders.zod';
export * from './registrationRequest.zod';
export * from './resendEmailVerificationBody.zod';
export * from './session.zod';
export * from './timestamp.zod';
export * from './verificationToken.zod';
@@ -6,7 +6,7 @@
*/
import * as zod from 'zod';
export const OnboardingStep = zod.enum(['candidate_consents', 'candidate_profile', 'candidate_questionnaire', 'candidate_assessment', 'employer_company', 'completed']).describe('Saved onboarding step that the account returns to after login. The server stores it and advances it as each step completes; clients route by it and never set it directly.\n\n- candidate_consents: candidate consents beyond C1, which was given at registration.\n- candidate_profile: candidate profile.\n- candidate_questionnaire: candidate questionnaire.\n- candidate_assessment: choice of the expected grade and the assessment.\n- employer_company: company profile of the employer.\n- completed: onboarding is finished; the client opens the scenario home.\n\nCandidate steps follow the order above and end with completed; the employer has employer_company and then completed. New steps may be added as onboarding grows; adding a value is a contract change.')
export const OnboardingStep = zod.enum(['candidate_consents', 'candidate_profile', 'candidate_questionnaire', 'candidate_assessment', 'employer_company', 'completed']).describe('Saved onboarding step that the account returns to after login. The server stores it and advances it as each step completes; clients route by it and never set it directly.\n\n- candidate_consents: candidate consents beyond C1, which was given at registration.\n- candidate_profile: candidate profile.\n- candidate_questionnaire: candidate questionnaire.\n- candidate_assessment: the assessment. The expected grade is the `self_assessed_grade` saved in the questionnaire, and this step offers it first; only an assessment result confirms a grade. The first successful SaveMyQuestionnaire moves the account from candidate_questionnaire to this step (planned).\n- employer_company: company profile of the employer.\n- completed: onboarding is finished; the client opens the scenario home.\n\nCandidate steps follow the order above and end with completed; the employer has employer_company and then completed. New steps may be added as onboarding grows; adding a value is a contract change.')
export type OnboardingStep = zod.input<typeof OnboardingStep>;
export type OnboardingStepOutput = zod.output<typeof OnboardingStep>;
@@ -21,7 +21,7 @@ export const Session = zod.object({
"email": zod.email().min(sessionAccountEmailMin).max(sessionAccountEmailMax).describe('Account email address. The server compares addresses without regard to letter case and never reveals in a response whether an address belongs to an account.'),
"email_verified": zod.boolean().describe('Whether the address is verified. A session exists only for a verified account, so this is true in every current response.'),
"scenario": zod.enum(['candidate', 'employer']).describe('Scenario chosen at registration: `candidate` looks for an offer and passes the assessment, `employer` represents a company that searches for candidates. The scenario selects the onboarding steps.'),
"onboarding_step": zod.enum(['candidate_consents', 'candidate_profile', 'candidate_questionnaire', 'candidate_assessment', 'employer_company', 'completed']).describe('Saved onboarding step that the account returns to after login. The server stores it and advances it as each step completes; clients route by it and never set it directly.\n\n- candidate_consents: candidate consents beyond C1, which was given at registration.\n- candidate_profile: candidate profile.\n- candidate_questionnaire: candidate questionnaire.\n- candidate_assessment: choice of the expected grade and the assessment.\n- employer_company: company profile of the employer.\n- completed: onboarding is finished; the client opens the scenario home.\n\nCandidate steps follow the order above and end with completed; the employer has employer_company and then completed. New steps may be added as onboarding grows; adding a value is a contract change.'),
"onboarding_step": zod.enum(['candidate_consents', 'candidate_profile', 'candidate_questionnaire', 'candidate_assessment', 'employer_company', 'completed']).describe('Saved onboarding step that the account returns to after login. The server stores it and advances it as each step completes; clients route by it and never set it directly.\n\n- candidate_consents: candidate consents beyond C1, which was given at registration.\n- candidate_profile: candidate profile.\n- candidate_questionnaire: candidate questionnaire.\n- candidate_assessment: the assessment. The expected grade is the `self_assessed_grade` saved in the questionnaire, and this step offers it first; only an assessment result confirms a grade. The first successful SaveMyQuestionnaire moves the account from candidate_questionnaire to this step (planned).\n- employer_company: company profile of the employer.\n- completed: onboarding is finished; the client opens the scenario home.\n\nCandidate steps follow the order above and end with completed; the employer has employer_company and then completed. New steps may be added as onboarding grows; adding a value is a contract change.'),
"created_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('Current account view. It never contains password hashes, token hashes, session identifiers, or other storage secrets.'),
"csrf_token": zod.string().min(sessionCsrfTokenMin).max(sessionCsrfTokenMax).regex(sessionCsrfTokenRegExp).describe('CSRF token bound to the current session. The client keeps it in memory only and sends it in the X-CSRF-Token header of every mutating request that requires a session. It changes when a new session starts.')
+6
View File
@@ -5,10 +5,16 @@
* OpenAPI spec version: 0.1.0
*/
export * from './gradeCode.zod';
export * from './pageInfo.zod';
export * from './problem.zod';
export * from './problemCode.zod';
export * from './problemFieldError.zod';
export * from './problemFieldLocation.zod';
export * from './specializationCode.zod';
export * from './taskLanguage.zod';
export * from './timestamp.zod';
export * from './candidate';
export * from './catalog';
export * from './health';
export * from './identity';
@@ -38,7 +38,7 @@ export const Problem = zod.object({
"type": zod.string().max(problemTypeMax).describe('URI that identifies the problem type. It has the form `urn:lincodex:problem:<code>` and is an identifier, not a link to dereference.'),
"title": zod.string().min(1).max(problemTitleMax).describe('Short, fixed English summary of the problem type. It does not change between occurrences.'),
"status": zod.int().min(problemStatusMin).max(problemStatusMax).describe('HTTP status code generated by the origin server.'),
"code": zod.enum(['validation_failed', 'verification_token_invalid', 'verification_token_expired', 'unauthenticated', 'invalid_credentials', 'forbidden', 'email_not_verified', 'csrf_check_failed', 'not_found', 'method_not_allowed', 'idempotency_in_progress', 'state_conflict', 'version_conflict', 'payload_too_large', 'unsupported_media_type', 'idempotency_key_reused', 'precondition_required', 'rate_limited', 'internal', 'not_implemented']).describe('Stable public error code. Adding a code is a contract change; renaming or removing one is a breaking change. Clients must handle an unknown code by its HTTP status.\n\n- validation_failed (400): parameters or body do not match the contract, or a body violates a domain rule such as salary_from <= salary_to; `errors` points at the fields.\n- verification_token_invalid (400): the email verification token is unknown, already used, or replaced by a newer one; request a new link or sign in.\n- verification_token_expired (400): the email verification token is past its lifetime; request a new link.\n- unauthenticated (401): no valid session or credentials.\n- invalid_credentials (401): the email and password do not match an account; an unknown email and a wrong password are not distinguished.\n- forbidden (403): the caller is authenticated but not allowed.\n- email_not_verified (403): the credentials are correct but the email is not verified yet.\n- csrf_check_failed (403): the request failed cross-site request protection: a missing or wrong X-CSRF-Token or a disallowed Origin.\n- not_found (404): the route or object does not exist or is not visible.\n- method_not_allowed (405): the route does not support the method.\n- idempotency_in_progress (409): a request with the same Idempotency-Key is still being processed.\n- state_conflict (409): the operation conflicts with the current state of the resource, for example an invitation that was already accepted.\n- version_conflict (412): If-Match does not match the current version.\n- payload_too_large (413): the request body exceeds the limit.\n- unsupported_media_type (415): the request Content-Type is not accepted.\n- idempotency_key_reused (422): the Idempotency-Key was already used with a different request.\n- precondition_required (428): the operation requires If-Match.\n- rate_limited (429): too many requests; see Retry-After.\n- internal (500): unexpected server error.\n- not_implemented (501): the operation is in the contract but not implemented yet.'),
"code": zod.enum(['validation_failed', 'verification_token_invalid', 'verification_token_expired', 'unauthenticated', 'invalid_credentials', 'forbidden', 'email_not_verified', 'csrf_check_failed', 'not_found', 'method_not_allowed', 'idempotency_in_progress', 'state_conflict', 'version_conflict', 'payload_too_large', 'unsupported_media_type', 'idempotency_key_reused', 'precondition_required', 'rate_limited', 'internal', 'not_implemented']).describe('Stable public error code. Adding a code is a contract change; renaming or removing one is a breaking change. Clients must handle an unknown code by its HTTP status.\n\n- validation_failed (400): parameters or body do not match the contract, or a body violates a domain rule such as salary_from <= salary_to; `errors` points at the fields.\n- verification_token_invalid (400): the email verification token is unknown, already used, or replaced by a newer one; request a new link or sign in.\n- verification_token_expired (400): the email verification token is past its lifetime; request a new link.\n- unauthenticated (401): no valid session or credentials.\n- invalid_credentials (401): the email and password do not match an account; an unknown email and a wrong password are not distinguished.\n- forbidden (403): the caller is authenticated but not allowed.\n- email_not_verified (403): the credentials are correct but the email is not verified yet.\n- csrf_check_failed (403): the request failed cross-site request protection: a missing or wrong X-CSRF-Token or a disallowed Origin.\n- not_found (404): the route or object does not exist or is not visible.\n- method_not_allowed (405): the route does not support the method.\n- idempotency_in_progress (409): a request with the same Idempotency-Key is still being processed.\n- state_conflict (409): the operation conflicts with the current state of the resource, for example an invitation that was already accepted.\n- version_conflict (412): If-Match, or an `expected_version` field in the request body, does not match the current version; nothing was changed.\n- payload_too_large (413): the request body exceeds the limit.\n- unsupported_media_type (415): the request Content-Type is not accepted.\n- idempotency_key_reused (422): the Idempotency-Key was already used with a different request.\n- precondition_required (428): the operation requires If-Match.\n- rate_limited (429): too many requests; see Retry-After.\n- internal (500): unexpected server error.\n- not_implemented (501): the operation is in the contract but not implemented yet.'),
"detail": zod.string().max(problemDetailMax).exactOptional().describe('Safe English explanation of this occurrence. It never contains internal error text or request values.'),
"instance": zod.string().max(problemInstanceMax).exactOptional().describe('URI reference that identifies this occurrence, when one exists.'),
"trace_id": zod.string().min(1).max(problemTraceIdMax).regex(problemTraceIdRegExp).exactOptional().describe('Request identifier, equal to the X-Request-ID response header. Quote it when reporting the problem; it is not a secret.'),
@@ -6,7 +6,7 @@
*/
import * as zod from 'zod';
export const ProblemCode = zod.enum(['validation_failed', 'verification_token_invalid', 'verification_token_expired', 'unauthenticated', 'invalid_credentials', 'forbidden', 'email_not_verified', 'csrf_check_failed', 'not_found', 'method_not_allowed', 'idempotency_in_progress', 'state_conflict', 'version_conflict', 'payload_too_large', 'unsupported_media_type', 'idempotency_key_reused', 'precondition_required', 'rate_limited', 'internal', 'not_implemented']).describe('Stable public error code. Adding a code is a contract change; renaming or removing one is a breaking change. Clients must handle an unknown code by its HTTP status.\n\n- validation_failed (400): parameters or body do not match the contract, or a body violates a domain rule such as salary_from <= salary_to; `errors` points at the fields.\n- verification_token_invalid (400): the email verification token is unknown, already used, or replaced by a newer one; request a new link or sign in.\n- verification_token_expired (400): the email verification token is past its lifetime; request a new link.\n- unauthenticated (401): no valid session or credentials.\n- invalid_credentials (401): the email and password do not match an account; an unknown email and a wrong password are not distinguished.\n- forbidden (403): the caller is authenticated but not allowed.\n- email_not_verified (403): the credentials are correct but the email is not verified yet.\n- csrf_check_failed (403): the request failed cross-site request protection: a missing or wrong X-CSRF-Token or a disallowed Origin.\n- not_found (404): the route or object does not exist or is not visible.\n- method_not_allowed (405): the route does not support the method.\n- idempotency_in_progress (409): a request with the same Idempotency-Key is still being processed.\n- state_conflict (409): the operation conflicts with the current state of the resource, for example an invitation that was already accepted.\n- version_conflict (412): If-Match does not match the current version.\n- payload_too_large (413): the request body exceeds the limit.\n- unsupported_media_type (415): the request Content-Type is not accepted.\n- idempotency_key_reused (422): the Idempotency-Key was already used with a different request.\n- precondition_required (428): the operation requires If-Match.\n- rate_limited (429): too many requests; see Retry-After.\n- internal (500): unexpected server error.\n- not_implemented (501): the operation is in the contract but not implemented yet.')
export const ProblemCode = zod.enum(['validation_failed', 'verification_token_invalid', 'verification_token_expired', 'unauthenticated', 'invalid_credentials', 'forbidden', 'email_not_verified', 'csrf_check_failed', 'not_found', 'method_not_allowed', 'idempotency_in_progress', 'state_conflict', 'version_conflict', 'payload_too_large', 'unsupported_media_type', 'idempotency_key_reused', 'precondition_required', 'rate_limited', 'internal', 'not_implemented']).describe('Stable public error code. Adding a code is a contract change; renaming or removing one is a breaking change. Clients must handle an unknown code by its HTTP status.\n\n- validation_failed (400): parameters or body do not match the contract, or a body violates a domain rule such as salary_from <= salary_to; `errors` points at the fields.\n- verification_token_invalid (400): the email verification token is unknown, already used, or replaced by a newer one; request a new link or sign in.\n- verification_token_expired (400): the email verification token is past its lifetime; request a new link.\n- unauthenticated (401): no valid session or credentials.\n- invalid_credentials (401): the email and password do not match an account; an unknown email and a wrong password are not distinguished.\n- forbidden (403): the caller is authenticated but not allowed.\n- email_not_verified (403): the credentials are correct but the email is not verified yet.\n- csrf_check_failed (403): the request failed cross-site request protection: a missing or wrong X-CSRF-Token or a disallowed Origin.\n- not_found (404): the route or object does not exist or is not visible.\n- method_not_allowed (405): the route does not support the method.\n- idempotency_in_progress (409): a request with the same Idempotency-Key is still being processed.\n- state_conflict (409): the operation conflicts with the current state of the resource, for example an invitation that was already accepted.\n- version_conflict (412): If-Match, or an `expected_version` field in the request body, does not match the current version; nothing was changed.\n- payload_too_large (413): the request body exceeds the limit.\n- unsupported_media_type (415): the request Content-Type is not accepted.\n- idempotency_key_reused (422): the Idempotency-Key was already used with a different request.\n- precondition_required (428): the operation requires If-Match.\n- rate_limited (429): too many requests; see Retry-After.\n- internal (500): unexpected server error.\n- not_implemented (501): the operation is in the contract but not implemented yet.')
export type ProblemCode = zod.input<typeof ProblemCode>;
export type ProblemCodeOutput = zod.output<typeof ProblemCode>;
@@ -0,0 +1,12 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const SpecializationCode = 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.')
export type SpecializationCode = zod.input<typeof SpecializationCode>;
export type SpecializationCodeOutput = zod.output<typeof SpecializationCode>;
@@ -0,0 +1,12 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const TaskLanguage = 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.')
export type TaskLanguage = zod.input<typeof TaskLanguage>;
export type TaskLanguageOutput = zod.output<typeof TaskLanguage>;