feat(profile): add the manual candidate profile contract and storage
This commit is contained in:
1 parent
d21fd49a42
commit
e52ffe7bcb
97 files changed
+20442
-63
No files matched your search
@@ -22,7 +22,10 @@ import type {
|
||||
|
||||
import type {
|
||||
CandidateExperience,
|
||||
CandidateProfile,
|
||||
CandidateQuestionnaire,
|
||||
ProfileClaimSource,
|
||||
ProfileSalaryMinimum,
|
||||
WorkContext
|
||||
} from '../../schemas';
|
||||
|
||||
@@ -39,6 +42,18 @@ export const getSaveMyQuestionnaireResponseWorkContextMock = (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(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), self_assessed_grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), task_languages: faker.helpers.arrayElements(['python','go'] as const), stack: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 50}))), 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 getGetMyProfileResponseProfileClaimSourceMock = (overrideResponse: Partial<ProfileClaimSource> = {}): ProfileClaimSource => ({...{origin: faker.helpers.arrayElement(['manual','extracted_from_resume','imported'] as const), trust_level: faker.number.int({min: 0, max: 0}), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extraction_version: faker.helpers.arrayElement([fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}),null,]), confirmed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])}, ...overrideResponse});
|
||||
|
||||
export const getGetMyProfileResponseProfileSalaryMinimumMock = (overrideResponse: Partial<ProfileSalaryMinimum> = {}): ProfileSalaryMinimum => ({...{amount: faker.number.int({min: 1000, max: 100000000, multipleOf: 1000}), currency: faker.helpers.arrayElement(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getGetMyProfileResponseMock = (overrideResponse: Partial<Extract<CandidateProfile, object>> = {}): CandidateProfile => ({version: faker.number.int({min: 0}), full_name: {status: faker.helpers.arrayElement(['confirmed','extracted','unknown'] as const), value: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}),null,]), source: faker.helpers.arrayElement([{...getGetMyProfileResponseProfileClaimSourceMock()},null,])}, contacts: {email: {status: faker.helpers.arrayElement(['confirmed','extracted','unknown'] as const), value: faker.helpers.arrayElement([faker.internet.email(),null,]), source: faker.helpers.arrayElement([{...getGetMyProfileResponseProfileClaimSourceMock()},null,])}, phone: {status: faker.helpers.arrayElement(['confirmed','extracted','unknown'] as const), value: faker.helpers.arrayElement([fakeFromPattern("^\\+[1-9][0-9]{6,14}$", {minLength: 8, maxLength: 16}),null,]), source: faker.helpers.arrayElement([{...getGetMyProfileResponseProfileClaimSourceMock()},null,])}, telegram: {status: faker.helpers.arrayElement(['confirmed','extracted','unknown'] as const), value: faker.helpers.arrayElement([fakeFromPattern("^@[A-Za-z0-9_]{5,32}$", {minLength: 6, maxLength: 33}),null,]), source: faker.helpers.arrayElement([{...getGetMyProfileResponseProfileClaimSourceMock()},null,])}}, stack: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => ({tag: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 50}), status: faker.helpers.arrayElement(['confirmed','extracted'] as const), source: {origin: faker.helpers.arrayElement(['manual','extracted_from_resume','imported'] as const), trust_level: faker.number.int({min: 0, max: 0}), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extraction_version: faker.helpers.arrayElement([fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}),null,]), confirmed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])}})), roles: Array.from({ length: faker.number.int({min: 1, max: 9}) }, (_, i) => i + 1).map(() => ({specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), self_assessed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), status: faker.helpers.arrayElement(['confirmed','extracted'] as const), source: {origin: faker.helpers.arrayElement(['manual','extracted_from_resume','imported'] as const), trust_level: faker.number.int({min: 0, max: 0}), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extraction_version: faker.helpers.arrayElement([fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}),null,]), confirmed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])}})), experience: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => ({employer_name: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}),null,]), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), started_on: fakeFromPattern("^[0-9]{4}-(0[1-9]|1[0-2])$", {minLength: 7, maxLength: 7}), ended_on: faker.helpers.arrayElement([fakeFromPattern("^[0-9]{4}-(0[1-9]|1[0-2])$", {minLength: 7, maxLength: 7}),null,]), summary: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 1000}}),null,]), status: faker.helpers.arrayElement(['confirmed','extracted'] as const), source: {origin: faker.helpers.arrayElement(['manual','extracted_from_resume','imported'] as const), trust_level: faker.number.int({min: 0, max: 0}), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extraction_version: faker.helpers.arrayElement([fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}),null,]), confirmed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])}})), soft_skills: Array.from({ length: faker.number.int({min: 1, max: 10}) }, (_, i) => i + 1).map(() => ({skill: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 50}), status: faker.helpers.arrayElement(['confirmed','extracted'] as const), source: {origin: faker.helpers.arrayElement(['manual','extracted_from_resume','imported'] as const), trust_level: faker.number.int({min: 0, max: 0}), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extraction_version: faker.helpers.arrayElement([fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}),null,]), confirmed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])}})), terms: {location: {stLine truncated
|
||||
|
||||
export const getSaveMyProfileResponseProfileClaimSourceMock = (overrideResponse: Partial<ProfileClaimSource> = {}): ProfileClaimSource => ({...{origin: faker.helpers.arrayElement(['manual','extracted_from_resume','imported'] as const), trust_level: faker.number.int({min: 0, max: 0}), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extraction_version: faker.helpers.arrayElement([fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}),null,]), confirmed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])}, ...overrideResponse});
|
||||
|
||||
export const getSaveMyProfileResponseProfileSalaryMinimumMock = (overrideResponse: Partial<ProfileSalaryMinimum> = {}): ProfileSalaryMinimum => ({...{amount: faker.number.int({min: 1000, max: 100000000, multipleOf: 1000}), currency: faker.helpers.arrayElement(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getSaveMyProfileResponseMock = (overrideResponse: Partial<Extract<CandidateProfile, object>> = {}): CandidateProfile => ({version: faker.number.int({min: 0}), full_name: {status: faker.helpers.arrayElement(['confirmed','extracted','unknown'] as const), value: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}),null,]), source: faker.helpers.arrayElement([{...getSaveMyProfileResponseProfileClaimSourceMock()},null,])}, contacts: {email: {status: faker.helpers.arrayElement(['confirmed','extracted','unknown'] as const), value: faker.helpers.arrayElement([faker.internet.email(),null,]), source: faker.helpers.arrayElement([{...getSaveMyProfileResponseProfileClaimSourceMock()},null,])}, phone: {status: faker.helpers.arrayElement(['confirmed','extracted','unknown'] as const), value: faker.helpers.arrayElement([fakeFromPattern("^\\+[1-9][0-9]{6,14}$", {minLength: 8, maxLength: 16}),null,]), source: faker.helpers.arrayElement([{...getSaveMyProfileResponseProfileClaimSourceMock()},null,])}, telegram: {status: faker.helpers.arrayElement(['confirmed','extracted','unknown'] as const), value: faker.helpers.arrayElement([fakeFromPattern("^@[A-Za-z0-9_]{5,32}$", {minLength: 6, maxLength: 33}),null,]), source: faker.helpers.arrayElement([{...getSaveMyProfileResponseProfileClaimSourceMock()},null,])}}, stack: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => ({tag: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 50}), status: faker.helpers.arrayElement(['confirmed','extracted'] as const), source: {origin: faker.helpers.arrayElement(['manual','extracted_from_resume','imported'] as const), trust_level: faker.number.int({min: 0, max: 0}), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extraction_version: faker.helpers.arrayElement([fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}),null,]), confirmed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])}})), roles: Array.from({ length: faker.number.int({min: 1, max: 9}) }, (_, i) => i + 1).map(() => ({specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), self_assessed_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,]), status: faker.helpers.arrayElement(['confirmed','extracted'] as const), source: {origin: faker.helpers.arrayElement(['manual','extracted_from_resume','imported'] as const), trust_level: faker.number.int({min: 0, max: 0}), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extraction_version: faker.helpers.arrayElement([fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}),null,]), confirmed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])}})), experience: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => ({employer_name: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}),null,]), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), started_on: fakeFromPattern("^[0-9]{4}-(0[1-9]|1[0-2])$", {minLength: 7, maxLength: 7}), ended_on: faker.helpers.arrayElement([fakeFromPattern("^[0-9]{4}-(0[1-9]|1[0-2])$", {minLength: 7, maxLength: 7}),null,]), summary: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 1000}}),null,]), status: faker.helpers.arrayElement(['confirmed','extracted'] as const), source: {origin: faker.helpers.arrayElement(['manual','extracted_from_resume','imported'] as const), trust_level: faker.number.int({min: 0, max: 0}), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extraction_version: faker.helpers.arrayElement([fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}),null,]), confirmed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])}})), soft_skills: Array.from({ length: faker.number.int({min: 1, max: 10}) }, (_, i) => i + 1).map(() => ({skill: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 50}), status: faker.helpers.arrayElement(['confirmed','extracted'] as const), source: {origin: faker.helpers.arrayElement(['manual','extracted_from_resume','imported'] as const), trust_level: faker.number.int({min: 0, max: 0}), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extraction_version: faker.helpers.arrayElement([fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}),null,]), confirmed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,])}})), terms: {locationLine truncated
|
||||
|
||||
|
||||
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]) => {
|
||||
@@ -63,7 +78,33 @@ export const getSaveMyQuestionnaireMockHandler = (overrideResponse?: CandidateQu
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getGetMyProfileMockHandler = (overrideResponse?: CandidateProfile | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<CandidateProfile> | CandidateProfile), options?: RequestHandlerOptions) => {
|
||||
return http.get('*/api/v1/me/profile', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getGetMyProfileResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getSaveMyProfileMockHandler = (overrideResponse?: CandidateProfile | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<CandidateProfile> | CandidateProfile), options?: RequestHandlerOptions) => {
|
||||
return http.put('*/api/v1/me/profile', async (info: Parameters<Parameters<typeof http.put>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getSaveMyProfileResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
export const getCandidateMock = () => [
|
||||
getGetMyQuestionnaireMockHandler(),
|
||||
getSaveMyQuestionnaireMockHandler()
|
||||
getSaveMyQuestionnaireMockHandler(),
|
||||
getGetMyProfileMockHandler(),
|
||||
getSaveMyProfileMockHandler()
|
||||
]
|
||||
@@ -24,6 +24,8 @@ import type {
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
import type {
|
||||
CandidateProfile,
|
||||
CandidateProfileUpdate,
|
||||
CandidateQuestionnaire,
|
||||
CandidateQuestionnaireUpdate,
|
||||
Problem
|
||||
@@ -253,3 +255,210 @@ export const useSaveMyQuestionnaire = <TError = ErrorType<Problem>,
|
||||
> => {
|
||||
return useMutation(getSaveMyQuestionnaireMutationOptions(options), queryClient);
|
||||
}
|
||||
export const getGetMyProfileUrl = () => {
|
||||
|
||||
|
||||
|
||||
|
||||
return `/api/v1/me/profile`
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 profile yet gets 200 with version 0, every single field `unknown`, and empty lists rather than 404, so the client reads the version for the first save in the same way as for later ones and a missing profile is not an error state.
|
||||
*
|
||||
* The profile is personal data that only its owner reads: full name, contacts, work history, and the lowest salary. It is a private resource and never an organization-visible one; organizations see a candidate through the anonymous card and, after an accepted invitation, through the contact grant, and no organization contract refers to this schema. The response is `Cache-Control: no-store`, and the server never writes its values to logs, metrics, URLs, or events.
|
||||
*
|
||||
* Every value carries its confirmation state and provenance, and every claim has trust level 0. The self-assessed grade of a role is separate from `confirmed_categories`, which only assessment results establish and which no request writes. The profile needs no file, no ML extraction, and no FSP account.
|
||||
*
|
||||
* A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden.
|
||||
* @summary Read the private profile of the current candidate.
|
||||
*/
|
||||
export const getMyProfile = async ( options?: Parameters<typeof apiRequest>[1]): Promise<CandidateProfile> => {
|
||||
|
||||
return apiRequest<CandidateProfile>(getGetMyProfileUrl(),
|
||||
{
|
||||
...options,
|
||||
method: 'GET'
|
||||
|
||||
|
||||
}
|
||||
);}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const getGetMyProfileQueryKey = () => {
|
||||
return [
|
||||
`/api/v1/me/profile`
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getGetMyProfileQueryOptions = <TData = Awaited<ReturnType<typeof getMyProfile>>, TError = ErrorType<Problem>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMyProfile>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetMyProfileQueryKey();
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getMyProfile>>> = ({ signal }) => getMyProfile({ signal, ...requestOptions });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMyProfile>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type GetMyProfileQueryResult = NonNullable<Awaited<ReturnType<typeof getMyProfile>>>
|
||||
export type GetMyProfileQueryError = ErrorType<Problem>
|
||||
|
||||
|
||||
export function useGetMyProfile<TData = Awaited<ReturnType<typeof getMyProfile>>, TError = ErrorType<Problem>>(
|
||||
options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMyProfile>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getMyProfile>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getMyProfile>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetMyProfile<TData = Awaited<ReturnType<typeof getMyProfile>>, TError = ErrorType<Problem>>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMyProfile>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getMyProfile>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getMyProfile>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetMyProfile<TData = Awaited<ReturnType<typeof getMyProfile>>, TError = ErrorType<Problem>>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMyProfile>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary Read the private profile of the current candidate.
|
||||
*/
|
||||
|
||||
export function useGetMyProfile<TData = Awaited<ReturnType<typeof getMyProfile>>, TError = ErrorType<Problem>>(
|
||||
options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMyProfile>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getGetMyProfileQueryOptions(options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return withQueryKey(query, queryOptions.queryKey);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const getSaveMyProfileUrl = () => {
|
||||
|
||||
|
||||
|
||||
|
||||
return `/api/v1/me/profile`
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 of every field and list; see CandidateProfileUpdate for the decisions that it carries. It replaces the stored profile as a whole.
|
||||
*
|
||||
* Every field is optional in substance: a profile can be saved with any subset filled and the rest null or empty, so no value requires a resume, the ML service, an FSP account, or any other file or link. Which fields are needed to leave the onboarding step candidate_profile is an open product question that this contract does not decide; a save on that step advancing the account to candidate_questionnaire is planned.
|
||||
*
|
||||
* Provenance is the server's: a value typed in the form is `manual`, confirming a stored suggestion keeps its origin, and every claim keeps trust level 0. The body has no origin, trust level, confirmation time, confirmed grade, or category, and unknown fields are rejected. A self-assessed grade never becomes a confirmed grade or a category.
|
||||
*
|
||||
* 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, and the client reads the profile again and reapplies its edits, so a concurrent edit from another tab or device is never lost silently. The version travels in the body rather than in If-Match because the generated client cannot read the ETag response header yet, as for the questionnaire; the status and code are the same as for a failed If-Match.
|
||||
*
|
||||
* The operation needs no Idempotency-Key: it replaces the whole state and is idempotent. A body whose values equal the stored ones, with the same decisions, changes nothing, keeps the version, and answers 200 with the current profile even when `expected_version` is older, so a retry after a lost response of a successful save succeeds instead of failing with 412. A version above the current one never existed and always answers 412 version_conflict, even for an unchanged body.
|
||||
*
|
||||
* The save replaces the stored claims as a whole. A suggestion that an import stored and that the client did not render and send back with the decision `extracted` is dropped by the save; a client therefore sends every suggestion that it received, and a client that read an older version gets 412 instead of silently dropping a suggestion it never saw.
|
||||
*
|
||||
* Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), a version above the current one (412), domain rules that depend on the body alone (400), then the rules that depend on the stored claims against the version: a decision `extracted` for a value that is not a stored suggestion answers 412 when `expected_version` is stale, because another save may have confirmed that value, and 400 when it is current; an unchanged body (200); any other change over a stale version (412). The schema rejects an unknown field, an unknown specialization or grade, a phone number outside E.164, a Telegram username without the leading @, an email that is not an address, a month outside `YYYY-MM`, a salary that is not a positive multiple of 1000, and more items than a list allows. The server also rejects a repeated tag, skill, or role specialization, a period that ends before it starts or lies in the future, and a decision `extracted` for a value that is not a stored suggestion, with 400 validation_failed and pointers to the items, for example `/roles/1/specialization` or `/stack/1/status`. Error bodies never repeat a submitted value.
|
||||
* @summary Replace the private profile of the current candidate.
|
||||
*/
|
||||
export const saveMyProfile = async (candidateProfileUpdate: CandidateProfileUpdate, options?: Parameters<typeof apiRequest>[1]): Promise<CandidateProfile> => {
|
||||
|
||||
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<CandidateProfile>(getSaveMyProfileUrl(),
|
||||
{
|
||||
...options,
|
||||
method: 'PUT',
|
||||
headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
|
||||
body: JSON.stringify(candidateProfileUpdate)
|
||||
}
|
||||
);}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const getSaveMyProfileMutationKey = () => ['saveMyProfile'] as const;
|
||||
|
||||
export const getSaveMyProfileMutationOptions = <TError = ErrorType<Problem>,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof saveMyProfile>>, TError,SaveMyProfileMutationVariables, TContext>, request?: SecondParameter<typeof apiRequest>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof saveMyProfile>>, TError,SaveMyProfileMutationVariables, TContext> => {
|
||||
|
||||
const mutationKey = getSaveMyProfileMutationKey();
|
||||
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 saveMyProfile>>, SaveMyProfileMutationVariables> = (props) => {
|
||||
const {data} = props ?? {};
|
||||
|
||||
return saveMyProfile(data,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type SaveMyProfileMutationResult = NonNullable<Awaited<ReturnType<typeof saveMyProfile>>>
|
||||
export type SaveMyProfileMutationBody = CandidateProfileUpdate
|
||||
export type SaveMyProfileMutationError = ErrorType<Problem>
|
||||
export type SaveMyProfileMutationVariables = {data: CandidateProfileUpdate}
|
||||
|
||||
/**
|
||||
* @summary Replace the private profile of the current candidate.
|
||||
*/
|
||||
export const useSaveMyProfile = <TError = ErrorType<Problem>,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof saveMyProfile>>, TError,SaveMyProfileMutationVariables, TContext>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof saveMyProfile>>,
|
||||
TError,
|
||||
SaveMyProfileMutationVariables,
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getSaveMyProfileMutationOptions(options), queryClient);
|
||||
}
|
||||
@@ -0,0 +1,406 @@
|
||||
import { readFileSync, readdirSync } from "node:fs";
|
||||
import { dirname, join, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { describe, expect, expectTypeOf, it } from "vitest";
|
||||
import { saveMyProfile } from "./endpoints/candidate/candidate";
|
||||
import {
|
||||
CandidateProfile,
|
||||
CandidateProfileUpdate,
|
||||
ProfileClaimSource,
|
||||
ProfileConfirmedCategory,
|
||||
ProfileRoleItem,
|
||||
ProfileRoleItemInput,
|
||||
SaveMyProfileBody,
|
||||
} from "./schemas";
|
||||
|
||||
// These tests pin the generated candidate profile contract (TASK-066) that
|
||||
// the profile form consumes. They fail when regeneration drops a limit, lets a
|
||||
// request carry a confirmed grade, a category, or provenance, loses the trust
|
||||
// level of a claim, or mixes the private profile with organization DTOs.
|
||||
|
||||
const manual = (confirmedAt = "2026-10-05T09:30:00Z") => ({
|
||||
origin: "manual",
|
||||
trust_level: 0,
|
||||
quote: null,
|
||||
extraction_version: null,
|
||||
confirmed_at: confirmedAt,
|
||||
});
|
||||
|
||||
const suggestion = {
|
||||
origin: "extracted_from_resume",
|
||||
trust_level: 0,
|
||||
quote: "Tel.: +7 900 000-00-00",
|
||||
extraction_version: "resume-rules.2026-10.1",
|
||||
confirmed_at: null,
|
||||
};
|
||||
|
||||
// without returns a copy of an object that lacks one key.
|
||||
function without<T extends object>(value: T, key: string): Record<string, unknown> {
|
||||
return Object.fromEntries(Object.entries(value).filter(([name]) => name !== key));
|
||||
}
|
||||
|
||||
const unknownClaim = { status: "unknown", value: null, source: null } as const;
|
||||
|
||||
const validUpdate = {
|
||||
expected_version: 0,
|
||||
full_name: { value: "Anna Sokolova", status: "confirmed" },
|
||||
contacts: {
|
||||
email: { value: "anna.sokolova@example.com", status: "confirmed" },
|
||||
phone: { value: "+79000000000", status: "extracted" },
|
||||
telegram: null,
|
||||
},
|
||||
stack: [
|
||||
{ tag: "PostgreSQL", status: "confirmed" },
|
||||
{ tag: "Kafka", status: "extracted" },
|
||||
],
|
||||
roles: [{ specialization: "backend", self_assessed_grade: "middle", status: "confirmed" }],
|
||||
experience: [
|
||||
{
|
||||
employer_name: "Example Payments",
|
||||
specialization: "backend",
|
||||
started_on: "2022-03",
|
||||
ended_on: null,
|
||||
summary: "Moved the payout service to an event model.",
|
||||
status: "confirmed",
|
||||
},
|
||||
],
|
||||
soft_skills: [{ skill: "Mentoring", status: "confirmed" }],
|
||||
terms: {
|
||||
location: { value: "Kazan", status: "confirmed" },
|
||||
relocation: { value: false, status: "confirmed" },
|
||||
salary_minimum: {
|
||||
value: { amount: 180000, currency: "RUB", period: "month", tax_basis: "net" },
|
||||
status: "confirmed",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const emptyUpdate = {
|
||||
expected_version: 3,
|
||||
full_name: null,
|
||||
contacts: { email: null, phone: null, telegram: null },
|
||||
stack: [],
|
||||
roles: [],
|
||||
experience: [],
|
||||
soft_skills: [],
|
||||
terms: { location: null, relocation: null, salary_minimum: null },
|
||||
};
|
||||
|
||||
const profile = {
|
||||
version: 3,
|
||||
full_name: { status: "confirmed", value: "Anna Sokolova", source: manual() },
|
||||
contacts: {
|
||||
email: unknownClaim,
|
||||
phone: { status: "extracted", value: "+79000000000", source: suggestion },
|
||||
telegram: unknownClaim,
|
||||
},
|
||||
stack: [{ tag: "PostgreSQL", status: "confirmed", source: manual() }],
|
||||
roles: [
|
||||
{
|
||||
specialization: "backend",
|
||||
self_assessed_grade: "middle",
|
||||
status: "confirmed",
|
||||
source: manual(),
|
||||
},
|
||||
],
|
||||
experience: [],
|
||||
soft_skills: [],
|
||||
terms: { location: unknownClaim, relocation: unknownClaim, salary_minimum: unknownClaim },
|
||||
confirmed_categories: [
|
||||
{
|
||||
specialization: "backend",
|
||||
grade: "junior",
|
||||
confirmed_at: "2026-10-04T18:10:00Z",
|
||||
attempt_id: "0192b3c4-d5e6-7f80-9a1b-2c3d4e5f6a7b",
|
||||
},
|
||||
],
|
||||
updated_at: "2026-10-05T09:30:00Z",
|
||||
};
|
||||
|
||||
const bodySchemas = [
|
||||
["CandidateProfileUpdate", CandidateProfileUpdate],
|
||||
["SaveMyProfileBody", SaveMyProfileBody],
|
||||
] as const;
|
||||
|
||||
describe.each(bodySchemas)("generated %s", (_name, schema) => {
|
||||
it("accepts a manual profile with a kept suggestion", () => {
|
||||
const parsed = schema.parse(validUpdate);
|
||||
|
||||
expect(parsed.contacts.phone?.status).toBe("extracted");
|
||||
expect(parsed.roles[0]?.self_assessed_grade).toBe("middle");
|
||||
});
|
||||
|
||||
it("accepts a profile with nothing set, so no file or FSP link is required", () => {
|
||||
expect(schema.parse(emptyUpdate)).toEqual(emptyUpdate);
|
||||
});
|
||||
|
||||
it("requires the version that the client read", () => {
|
||||
const withoutVersion = without(validUpdate, "expected_version");
|
||||
|
||||
const result = schema.safeParse(withoutVersion);
|
||||
|
||||
expect(result.success).toBe(false);
|
||||
expect(result.error?.issues).toEqual([expect.objectContaining({ path: ["expected_version"] })]);
|
||||
});
|
||||
|
||||
it.each([
|
||||
[
|
||||
"a phone outside E.164",
|
||||
{ contacts: { ...validUpdate.contacts, phone: { value: "8 900 000", status: "confirmed" } } },
|
||||
["contacts", "phone", "value"],
|
||||
],
|
||||
[
|
||||
"a Telegram name without @",
|
||||
{ contacts: { ...validUpdate.contacts, telegram: { value: "anna", status: "confirmed" } } },
|
||||
["contacts", "telegram", "value"],
|
||||
],
|
||||
[
|
||||
"an email that is not an address",
|
||||
{ contacts: { ...validUpdate.contacts, email: { value: "anna", status: "confirmed" } } },
|
||||
["contacts", "email", "value"],
|
||||
],
|
||||
[
|
||||
"a decision outside confirmed and extracted",
|
||||
{ stack: [{ tag: "Go", status: "unknown" }] },
|
||||
["stack", 0, "status"],
|
||||
],
|
||||
[
|
||||
"a name with surrounding whitespace",
|
||||
{ full_name: { value: " Anna", status: "confirmed" } },
|
||||
["full_name", "value"],
|
||||
],
|
||||
[
|
||||
"a grade outside the scale",
|
||||
{ roles: [{ specialization: "backend", self_assessed_grade: "lead", status: "confirmed" }] },
|
||||
["roles", 0, "self_assessed_grade"],
|
||||
],
|
||||
[
|
||||
"a language used as a specialization",
|
||||
{ roles: [{ specialization: "go", self_assessed_grade: null, status: "confirmed" }] },
|
||||
["roles", 0, "specialization"],
|
||||
],
|
||||
[
|
||||
"a month outside YYYY-MM",
|
||||
{ experience: [{ ...validUpdate.experience[0], started_on: "2022-3" }] },
|
||||
["experience", 0, "started_on"],
|
||||
],
|
||||
[
|
||||
"a salary that is not a multiple of 1000",
|
||||
{
|
||||
terms: {
|
||||
...validUpdate.terms,
|
||||
salary_minimum: {
|
||||
value: { amount: 180500, currency: "RUB", period: "month", tax_basis: "net" },
|
||||
status: "confirmed",
|
||||
},
|
||||
},
|
||||
},
|
||||
["terms", "salary_minimum", "value", "amount"],
|
||||
],
|
||||
[
|
||||
"a salary in another currency",
|
||||
{
|
||||
terms: {
|
||||
...validUpdate.terms,
|
||||
salary_minimum: {
|
||||
value: { amount: 180000, currency: "USD", period: "month", tax_basis: "net" },
|
||||
status: "confirmed",
|
||||
},
|
||||
},
|
||||
},
|
||||
["terms", "salary_minimum"],
|
||||
],
|
||||
])("rejects %s", (_label, change, path) => {
|
||||
const result = schema.safeParse({ ...validUpdate, ...change });
|
||||
|
||||
expect(result.success).toBe(false);
|
||||
expect(result.error?.issues).toContainEqual(expect.objectContaining({ path }));
|
||||
});
|
||||
|
||||
it("rejects more items than a list allows instead of truncating it", () => {
|
||||
const stack = Array.from({ length: 31 }, (_, index) => ({
|
||||
tag: `Tag ${index}`,
|
||||
status: "confirmed",
|
||||
}));
|
||||
const roles = Array.from({ length: 10 }, () => ({
|
||||
specialization: "qa",
|
||||
self_assessed_grade: null,
|
||||
status: "confirmed",
|
||||
}));
|
||||
|
||||
const tooManyTags = schema.safeParse({ ...validUpdate, stack });
|
||||
const tooManyRoles = schema.safeParse({ ...validUpdate, roles });
|
||||
|
||||
expect(tooManyTags.error?.issues).toEqual([
|
||||
expect.objectContaining({ code: "too_big", path: ["stack"] }),
|
||||
]);
|
||||
expect(tooManyRoles.error?.issues).toEqual([
|
||||
expect.objectContaining({ code: "too_big", path: ["roles"] }),
|
||||
]);
|
||||
});
|
||||
|
||||
it("never carries a confirmed grade, a category, or provenance in the parsed body", () => {
|
||||
const parsed = schema.parse({
|
||||
...validUpdate,
|
||||
confirmed_categories: [{ specialization: "backend", grade: "senior" }],
|
||||
full_name: {
|
||||
value: "Anna Sokolova",
|
||||
status: "confirmed",
|
||||
source: suggestion,
|
||||
trust_level: 5,
|
||||
},
|
||||
roles: [
|
||||
{
|
||||
specialization: "backend",
|
||||
self_assessed_grade: "senior",
|
||||
status: "confirmed",
|
||||
confirmed_grade: "senior",
|
||||
category: "backend",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// Generated Zod strips unknown keys; the server rejects them with 400.
|
||||
expect(parsed).not.toHaveProperty("confirmed_categories");
|
||||
expect(parsed.full_name).not.toHaveProperty("source");
|
||||
expect(parsed.full_name).not.toHaveProperty("trust_level");
|
||||
expect(parsed.roles[0]).not.toHaveProperty("confirmed_grade");
|
||||
expect(parsed.roles[0]).not.toHaveProperty("category");
|
||||
});
|
||||
});
|
||||
|
||||
describe("generated CandidateProfile", () => {
|
||||
it("separates the self-assessed grade of a role from the confirmed category", () => {
|
||||
const parsed = CandidateProfile.parse(profile);
|
||||
|
||||
expect(parsed.roles[0]?.self_assessed_grade).toBe("middle");
|
||||
expect(parsed.confirmed_categories).toEqual([
|
||||
expect.objectContaining({ specialization: "backend", grade: "junior" }),
|
||||
]);
|
||||
expect(parsed.roles[0]).not.toHaveProperty("confirmed_grade");
|
||||
});
|
||||
|
||||
it("gives every claim a source with trust level 0", () => {
|
||||
expect(ProfileClaimSource.safeParse(suggestion).success).toBe(true);
|
||||
expect(ProfileClaimSource.safeParse(manual()).success).toBe(true);
|
||||
expect(ProfileClaimSource.safeParse({ ...suggestion, trust_level: 1 }).success).toBe(false);
|
||||
expect(ProfileClaimSource.safeParse({ ...manual(), origin: "verified" }).success).toBe(false);
|
||||
const withoutSource = without(profile.stack[0] ?? {}, "source");
|
||||
expect(CandidateProfile.safeParse({ ...profile, stack: [withoutSource] }).success).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps an unconfirmed suggestion apart from a confirmed value", () => {
|
||||
const parsed = CandidateProfile.parse(profile);
|
||||
|
||||
expect(parsed.contacts.phone.status).toBe("extracted");
|
||||
expect(parsed.contacts.phone.source?.confirmed_at).toBeNull();
|
||||
expect(parsed.contacts.phone.source?.trust_level).toBe(0);
|
||||
expect(parsed.full_name.source?.confirmed_at).toBe("2026-10-05T09:30:00Z");
|
||||
});
|
||||
|
||||
it("represents a profile that was never saved as version 0 with unknown fields", () => {
|
||||
const parsed = CandidateProfile.parse({
|
||||
version: 0,
|
||||
full_name: unknownClaim,
|
||||
contacts: { email: unknownClaim, phone: unknownClaim, telegram: unknownClaim },
|
||||
stack: [],
|
||||
roles: [],
|
||||
experience: [],
|
||||
soft_skills: [],
|
||||
terms: { location: unknownClaim, relocation: unknownClaim, salary_minimum: unknownClaim },
|
||||
confirmed_categories: [],
|
||||
updated_at: null,
|
||||
});
|
||||
|
||||
expect(parsed.version).toBe(0);
|
||||
expect(parsed.confirmed_categories).toEqual([]);
|
||||
});
|
||||
|
||||
it("requires a confirmed category to name its assessment", () => {
|
||||
const withoutAttempt = without(profile.confirmed_categories[0] ?? {}, "attempt_id");
|
||||
|
||||
expect(ProfileConfirmedCategory.safeParse(profile.confirmed_categories[0]).success).toBe(true);
|
||||
expect(ProfileConfirmedCategory.safeParse(withoutAttempt).success).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
it("exposes the profile DTOs without a confirmed grade or a category in requests", () => {
|
||||
type UpdateRole = CandidateProfileUpdate["roles"][number];
|
||||
|
||||
expectTypeOf<CandidateProfileUpdate>().not.toHaveProperty("confirmed_categories");
|
||||
expectTypeOf<CandidateProfileUpdate>().not.toHaveProperty("version");
|
||||
expectTypeOf<UpdateRole>().not.toHaveProperty("confirmed_grade");
|
||||
expectTypeOf<UpdateRole>().not.toHaveProperty("category");
|
||||
expectTypeOf<UpdateRole>().not.toHaveProperty("source");
|
||||
expectTypeOf<ProfileRoleItemInput>().not.toHaveProperty("trust_level");
|
||||
expectTypeOf<ProfileRoleItem>().not.toHaveProperty("confirmed_grade");
|
||||
expectTypeOf<ProfileRoleItem>().not.toHaveProperty("category");
|
||||
expectTypeOf<CandidateProfile>().toHaveProperty("confirmed_categories");
|
||||
expectTypeOf(saveMyProfile).parameter(0).toEqualTypeOf<CandidateProfileUpdate>();
|
||||
});
|
||||
|
||||
// The private profile holds personal data that no organization may read. The
|
||||
// generated Zod files inline every referenced schema, so a profile schema that
|
||||
// an organization-visible schema referred to would leave its field names in
|
||||
// that generated file. The check reads the generated files: the organization,
|
||||
// invitation, and need schemas and endpoints carry no profile-only field, and
|
||||
// the profile schemas carry no organization-only field.
|
||||
describe("private profile schemas", () => {
|
||||
const apiDirectory = resolve(dirname(fileURLToPath(import.meta.url)));
|
||||
const sourcesIn = (directory: string) =>
|
||||
readdirSync(join(apiDirectory, directory), { recursive: true, encoding: "utf8" })
|
||||
.filter((name) => name.endsWith(".ts"))
|
||||
.map((name) => ({
|
||||
name: join(directory, name),
|
||||
source: readFileSync(join(apiDirectory, directory, name), "utf8"),
|
||||
}));
|
||||
|
||||
const organizationSide = ["organization", "invitation", "need"].flatMap((tag) => [
|
||||
...sourcesIn(join("schemas", tag)),
|
||||
...sourcesIn(join("endpoints", tag)),
|
||||
]);
|
||||
const profileSide = sourcesIn(join("schemas", "candidate")).filter((file) =>
|
||||
/(^|\/)(profile|candidateProfile|saveMyProfile)[^/]*\.zod\.ts$/.test(file.name),
|
||||
);
|
||||
|
||||
// Generated object keys that only the private profile has. They are matched
|
||||
// as quoted keys, because endpoint comments quote contract prose.
|
||||
const profileOnly = [
|
||||
'"confirmed_categories":',
|
||||
'"salary_minimum":',
|
||||
'"soft_skills":',
|
||||
'"relocation":',
|
||||
];
|
||||
// Generated object keys that only organization-visible DTOs have.
|
||||
const organizationOnly = [
|
||||
'"verification_level":',
|
||||
'"candidate_card":',
|
||||
'"representatives":',
|
||||
'"membership":',
|
||||
];
|
||||
|
||||
it("finds the generated files of both sides", () => {
|
||||
expect(profileSide.length).toBeGreaterThan(20);
|
||||
expect(organizationSide.length).toBeGreaterThan(20);
|
||||
});
|
||||
|
||||
it("is not reachable from an organization, invitation, or need schema or endpoint", () => {
|
||||
const leaks = organizationSide.flatMap((file) =>
|
||||
profileOnly
|
||||
.filter((marker) => file.source.includes(marker))
|
||||
.map((marker) => `${file.name}: ${marker}`),
|
||||
);
|
||||
|
||||
expect(leaks).toEqual([]);
|
||||
});
|
||||
|
||||
it("refers to nothing of an organization, an invitation, or a need", () => {
|
||||
const leaks = profileSide.flatMap((file) =>
|
||||
organizationOnly
|
||||
.filter((marker) => file.source.includes(marker))
|
||||
.map((marker) => `${file.name}: ${marker}`),
|
||||
);
|
||||
|
||||
expect(leaks).toEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -16,7 +16,7 @@ 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.')
|
||||
}).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. The work history entries of the candidate profile (`ProfileExperienceItem`) are a different, detailed claim: the two are saved separately and the server neither adds the entries up nor fills them from these totals.')
|
||||
|
||||
export type CandidateExperience = zod.input<typeof CandidateExperience>;
|
||||
export type CandidateExperienceOutput = zod.output<typeof CandidateExperience>;
|
||||
@@ -0,0 +1,317 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const candidateProfileVersionMin = 0;
|
||||
|
||||
export const candidateProfileFullNameValueOneMax = 200;
|
||||
|
||||
|
||||
export const candidateProfileFullNameValueOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateProfileFullNameSourceOneTrustLevelMin = 0;
|
||||
export const candidateProfileFullNameSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const candidateProfileFullNameSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const candidateProfileFullNameSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const candidateProfileFullNameSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const candidateProfileContactsEmailValueOneMin = 3;
|
||||
export const candidateProfileContactsEmailValueOneMax = 254;
|
||||
|
||||
export const candidateProfileContactsEmailSourceOneTrustLevelMin = 0;
|
||||
export const candidateProfileContactsEmailSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const candidateProfileContactsEmailSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const candidateProfileContactsEmailSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const candidateProfileContactsEmailSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const candidateProfileContactsPhoneValueOneMin = 8;
|
||||
export const candidateProfileContactsPhoneValueOneMax = 16;
|
||||
|
||||
|
||||
export const candidateProfileContactsPhoneValueOneRegExp = new RegExp('^\\+[1-9][0-9]{6,14}$');
|
||||
export const candidateProfileContactsPhoneSourceOneTrustLevelMin = 0;
|
||||
export const candidateProfileContactsPhoneSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const candidateProfileContactsPhoneSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const candidateProfileContactsPhoneSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const candidateProfileContactsPhoneSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const candidateProfileContactsTelegramValueOneMin = 6;
|
||||
export const candidateProfileContactsTelegramValueOneMax = 33;
|
||||
|
||||
|
||||
export const candidateProfileContactsTelegramValueOneRegExp = new RegExp('^@[A-Za-z0-9_]{5,32}$');
|
||||
export const candidateProfileContactsTelegramSourceOneTrustLevelMin = 0;
|
||||
export const candidateProfileContactsTelegramSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const candidateProfileContactsTelegramSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const candidateProfileContactsTelegramSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const candidateProfileContactsTelegramSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const candidateProfileStackItemTagMax = 50;
|
||||
|
||||
|
||||
export const candidateProfileStackItemTagRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateProfileStackItemSourceTrustLevelMin = 0;
|
||||
export const candidateProfileStackItemSourceTrustLevelMax = 0;
|
||||
|
||||
export const candidateProfileStackItemSourceQuoteOneMax = 300;
|
||||
|
||||
export const candidateProfileStackItemSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const candidateProfileStackItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const candidateProfileStackMax = 30;
|
||||
|
||||
export const candidateProfileRolesItemSourceTrustLevelMin = 0;
|
||||
export const candidateProfileRolesItemSourceTrustLevelMax = 0;
|
||||
|
||||
export const candidateProfileRolesItemSourceQuoteOneMax = 300;
|
||||
|
||||
export const candidateProfileRolesItemSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const candidateProfileRolesItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const candidateProfileRolesMax = 9;
|
||||
|
||||
export const candidateProfileExperienceItemEmployerNameOneMax = 200;
|
||||
|
||||
|
||||
export const candidateProfileExperienceItemEmployerNameOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateProfileExperienceItemStartedOnMin = 7;
|
||||
export const candidateProfileExperienceItemStartedOnMax = 7;
|
||||
|
||||
|
||||
export const candidateProfileExperienceItemStartedOnRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
|
||||
export const candidateProfileExperienceItemEndedOnOneMin = 7;
|
||||
export const candidateProfileExperienceItemEndedOnOneMax = 7;
|
||||
|
||||
|
||||
export const candidateProfileExperienceItemEndedOnOneRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
|
||||
export const candidateProfileExperienceItemSummaryOneMax = 1000;
|
||||
|
||||
export const candidateProfileExperienceItemSourceTrustLevelMin = 0;
|
||||
export const candidateProfileExperienceItemSourceTrustLevelMax = 0;
|
||||
|
||||
export const candidateProfileExperienceItemSourceQuoteOneMax = 300;
|
||||
|
||||
export const candidateProfileExperienceItemSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const candidateProfileExperienceItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const candidateProfileExperienceMax = 20;
|
||||
|
||||
export const candidateProfileSoftSkillsItemSkillMax = 50;
|
||||
|
||||
|
||||
export const candidateProfileSoftSkillsItemSkillRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateProfileSoftSkillsItemSourceTrustLevelMin = 0;
|
||||
export const candidateProfileSoftSkillsItemSourceTrustLevelMax = 0;
|
||||
|
||||
export const candidateProfileSoftSkillsItemSourceQuoteOneMax = 300;
|
||||
|
||||
export const candidateProfileSoftSkillsItemSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const candidateProfileSoftSkillsItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const candidateProfileSoftSkillsMax = 10;
|
||||
|
||||
export const candidateProfileTermsLocationValueOneMax = 100;
|
||||
|
||||
|
||||
export const candidateProfileTermsLocationValueOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateProfileTermsLocationSourceOneTrustLevelMin = 0;
|
||||
export const candidateProfileTermsLocationSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const candidateProfileTermsLocationSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const candidateProfileTermsLocationSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const candidateProfileTermsLocationSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const candidateProfileTermsRelocationSourceOneTrustLevelMin = 0;
|
||||
export const candidateProfileTermsRelocationSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const candidateProfileTermsRelocationSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const candidateProfileTermsRelocationSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const candidateProfileTermsRelocationSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const candidateProfileTermsSalaryMinimumValueOneAmountMin = 1000;
|
||||
export const candidateProfileTermsSalaryMinimumValueOneAmountMax = 100000000;
|
||||
export const candidateProfileTermsSalaryMinimumValueOneAmountMultipleOf = 1000;
|
||||
|
||||
export const candidateProfileTermsSalaryMinimumSourceOneTrustLevelMin = 0;
|
||||
export const candidateProfileTermsSalaryMinimumSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const candidateProfileTermsSalaryMinimumSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const candidateProfileTermsSalaryMinimumSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const candidateProfileTermsSalaryMinimumSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const candidateProfileConfirmedCategoriesMax = 9;
|
||||
|
||||
|
||||
export const CandidateProfile = zod.object({
|
||||
"version": zod.int().min(candidateProfileVersionMin).describe('Version of the candidate profile. A candidate who has not saved the profile has version 0; every save that changes the profile advances it by one. The client sends the version it read as `expected_version`.'),
|
||||
"full_name": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.string().min(1).max(candidateProfileFullNameValueOneMax).regex(candidateProfileFullNameValueOneRegExp).describe('Full name as the candidate wrote it in the profile. Plain text without line breaks; clients show it as text, never as HTML.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(candidateProfileFullNameSourceOneTrustLevelMin).max(candidateProfileFullNameSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(candidateProfileFullNameSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(candidateProfileFullNameSourceOneExtractionVersionOneMax).regex(candidateProfileFullNameSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Full name of the candidate with its confirmation state and provenance. The value is personal data. It is disclosed to one organization only through the contact grant of the consent C4 and never appears in an organization-visible schema. `value` and `source` are null exactly when `status` is `unknown`.'),
|
||||
"contacts": zod.object({
|
||||
"email": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.email().min(candidateProfileContactsEmailValueOneMin).max(candidateProfileContactsEmailValueOneMax).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.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(candidateProfileContactsEmailSourceOneTrustLevelMin).max(candidateProfileContactsEmailSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(candidateProfileContactsEmailSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(candidateProfileContactsEmailSourceOneExtractionVersionOneMax).regex(candidateProfileContactsEmailSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Contact email of the candidate with its confirmation state and provenance. It is personal data. It is a contact channel that the candidate gives, not the login of the account: the two may differ, the server never sends mail to it and never verifies it. `value` and `source` are null exactly when `status` is `unknown`.'),
|
||||
"phone": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.string().min(candidateProfileContactsPhoneValueOneMin).max(candidateProfileContactsPhoneValueOneMax).regex(candidateProfileContactsPhoneValueOneRegExp).describe('Phone number in the E.164 format, for example +70000000000.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(candidateProfileContactsPhoneSourceOneTrustLevelMin).max(candidateProfileContactsPhoneSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(candidateProfileContactsPhoneSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(candidateProfileContactsPhoneSourceOneExtractionVersionOneMax).regex(candidateProfileContactsPhoneSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Contact phone number of the candidate with its confirmation state and provenance. It is personal data, stored in the E.164 format of the contact disclosure. `value` and `source` are null exactly when `status` is `unknown`.'),
|
||||
"telegram": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.string().min(candidateProfileContactsTelegramValueOneMin).max(candidateProfileContactsTelegramValueOneMax).regex(candidateProfileContactsTelegramValueOneRegExp).describe('Telegram username with the leading @.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(candidateProfileContactsTelegramSourceOneTrustLevelMin).max(candidateProfileContactsTelegramSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(candidateProfileContactsTelegramSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(candidateProfileContactsTelegramSourceOneExtractionVersionOneMax).regex(candidateProfileContactsTelegramSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Telegram username of the candidate with its confirmation state and provenance. It is personal data, stored with the leading @ of the contact disclosure. `value` and `source` are null exactly when `status` is `unknown`.')
|
||||
}).describe('Contact channels of the candidate. Each channel is a claim of its own, and the candidate fills in any subset. The kinds are the ones that the contact disclosure (consent C4) can pass on, with the same value formats, so a disclosure never has to convert or drop a stored value; adding a kind, such as a link to a code repository, is a contract change in both places. Contacts leave the profile only through a contact grant, never in a card or a search result. All values are personal data.'),
|
||||
"stack": zod.array(zod.object({
|
||||
"tag": zod.string().min(1).max(candidateProfileStackItemTagMax).regex(candidateProfileStackItemTagRegExp).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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(candidateProfileStackItemSourceTrustLevelMin).max(candidateProfileStackItemSourceTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(candidateProfileStackItemSourceQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(candidateProfileStackItemSourceExtractionVersionOneMax).regex(candidateProfileStackItemSourceExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.')
|
||||
}).describe('One technology tag of the candidate\'s stack with its confirmation state and provenance. The profile stack is one list for the whole profile; the questionnaire holds the tags of each chosen specialization with the same `StackTag` meaning, and the two lists are independent: the server never copies one into the other. A tag is a descriptive attribute and never forms a category.')).max(candidateProfileStackMax).describe('Technology tags in the order the candidate gave them, each tag at most once without regard to letter case.'),
|
||||
"roles": 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.union([zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),zod.null()]).describe('Grade that the candidate claims in the specialization, or null when the candidate names none.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(candidateProfileRolesItemSourceTrustLevelMin).max(candidateProfileRolesItemSourceTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(candidateProfileRolesItemSourceQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(candidateProfileRolesItemSourceExtractionVersionOneMax).regex(candidateProfileRolesItemSourceExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.')
|
||||
}).describe('One role of the candidate: a specialization of the catalog with the grade that the candidate claims for it. `self_assessed_grade` is a claim, the same one that the questionnaire calls `self_assessed_grade` for its at most two chosen specializations: it influences nothing but the display and never becomes a confirmed grade or a category. The questionnaire value starts the assessment and the profile value is what the profile shows; the two are saved separately and the server never copies one into the other. A confirmed grade comes only from an assessment result and appears in `confirmed_categories` of the profile, never in a role; unknown fields such as `confirmed_grade` or `category` are rejected.')).max(candidateProfileRolesMax).describe('Roles in the order the candidate gave them, each specialization at most once.'),
|
||||
"experience": zod.array(zod.object({
|
||||
"employer_name": zod.union([zod.string().min(1).max(candidateProfileExperienceItemEmployerNameOneMax).regex(candidateProfileExperienceItemEmployerNameOneRegExp).describe('Name of the employer in one experience entry, as the candidate wrote it. It is personal data of the candidate\'s career. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Employer of the entry, or null when the candidate gives none.'),
|
||||
"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.'),
|
||||
"started_on": zod.string().min(candidateProfileExperienceItemStartedOnMin).max(candidateProfileExperienceItemStartedOnMax).regex(candidateProfileExperienceItemStartedOnRegExp).describe('Calendar month in the `YYYY-MM` format, for example 2024-03. An experience period has month precision only, so the contract holds no exact date of employment. The server rejects a month that lies in the future.'),
|
||||
"ended_on": zod.union([zod.string().min(candidateProfileExperienceItemEndedOnOneMin).max(candidateProfileExperienceItemEndedOnOneMax).regex(candidateProfileExperienceItemEndedOnOneRegExp).describe('Calendar month in the `YYYY-MM` format, for example 2024-03. An experience period has month precision only, so the contract holds no exact date of employment. The server rejects a month that lies in the future.'),zod.null()]).describe('Last month of the work, or null when the candidate still works there. It is not earlier than `started_on`.'),
|
||||
"summary": zod.union([zod.string().min(1).max(candidateProfileExperienceItemSummaryOneMax).describe('Tasks and results of the candidate in one experience entry. It describes the work rather than a job title. It may contain line breaks and personal data of the candidate; it must not contain personal data of other people. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Tasks and results of the entry, or null when the candidate gives none.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(candidateProfileExperienceItemSourceTrustLevelMin).max(candidateProfileExperienceItemSourceTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(candidateProfileExperienceItemSourceQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(candidateProfileExperienceItemSourceExtractionVersionOneMax).regex(candidateProfileExperienceItemSourceExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.')
|
||||
}).describe('One entry of the candidate\'s work history with its confirmation state and provenance. An entry describes the work by its specialization and tasks rather than by a job title, and it is a claim of trust level 0. It is different from the `CandidateExperience` of the questionnaire, which holds only the total months of commercial and academic experience of a chosen specialization as a hint for the assessment: the two are saved separately, and the server neither adds the entries up for the questionnaire nor fills the entries from it. An entry is personal data.')).max(candidateProfileExperienceMax).describe('Work history entries in the order the candidate gave them.'),
|
||||
"soft_skills": zod.array(zod.object({
|
||||
"skill": zod.string().min(1).max(candidateProfileSoftSkillsItemSkillMax).regex(candidateProfileSoftSkillsItemSkillRegExp).describe('Soft skill as the candidate wrote it, for example "Mentoring" or "Negotiation". The platform has no soft skill taxonomy, so the text is free; it never changes a category or a grade. It has no leading or trailing whitespace and no line breaks. The server compares skills without regard to letter case. Plain text; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(candidateProfileSoftSkillsItemSourceTrustLevelMin).max(candidateProfileSoftSkillsItemSourceTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(candidateProfileSoftSkillsItemSourceQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(candidateProfileSoftSkillsItemSourceExtractionVersionOneMax).regex(candidateProfileSoftSkillsItemSourceExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.')
|
||||
}).describe('One soft skill of the candidate with its confirmation state and provenance. It is a claim; no assessment checks it.')).max(candidateProfileSoftSkillsMax).describe('Soft skills in the order the candidate gave them, each skill at most once without regard to letter case.'),
|
||||
"terms": zod.object({
|
||||
"location": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.string().min(1).max(candidateProfileTermsLocationValueOneMax).regex(candidateProfileTermsLocationValueOneRegExp).describe('City or region where the candidate lives or wants to work, as free text. It is personal data of the candidate and never a street address. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(candidateProfileTermsLocationSourceOneTrustLevelMin).max(candidateProfileTermsLocationSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(candidateProfileTermsLocationSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(candidateProfileTermsLocationSourceOneExtractionVersionOneMax).regex(candidateProfileTermsLocationSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Place of the candidate with its confirmation state and provenance. It is personal data. `value` and `source` are null exactly when `status` is `unknown`.'),
|
||||
"relocation": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.boolean().nullable(),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(candidateProfileTermsRelocationSourceOneTrustLevelMin).max(candidateProfileTermsRelocationSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(candidateProfileTermsRelocationSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(candidateProfileTermsRelocationSourceOneExtractionVersionOneMax).regex(candidateProfileTermsRelocationSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Whether the candidate is ready to relocate, with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`; the server never assumes an answer.'),
|
||||
"salary_minimum": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.object({
|
||||
"amount": zod.int().min(candidateProfileTermsSalaryMinimumValueOneAmountMin).max(candidateProfileTermsSalaryMinimumValueOneAmountMax).multipleOf(candidateProfileTermsSalaryMinimumValueOneAmountMultipleOf).describe('Amount of money in whole rubles. A salary bound is positive and a multiple of 1000, the step that PRD FR13 sets for the bounds of a salary range and for the bids of the sealed final.'),
|
||||
"currency": zod.enum(['RUB']).describe('ISO 4217 currency code. The MVP accepts only RUB; adding a value is a contract change.'),
|
||||
"period": zod.enum(['month']).describe('Pay period of a salary amount. The MVP uses only `month`; adding a value is a contract change.'),
|
||||
"tax_basis": zod.enum(['net', 'gross']).describe('Tax basis of a salary amount: `net`, the amount paid out after personal income tax, or `gross`, the amount before it. The basis is always explicit; amounts in different bases are never compared directly.')
|
||||
}).describe('The lowest salary that the candidate accepts, in whole rubles with its base: the currency, the pay period, and the tax basis. It is private to the candidate: no organization reads it, and the invitation only shows a compatibility indicator that the server derives from it. It is personal data. The amount is a positive multiple of 1000.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(candidateProfileTermsSalaryMinimumSourceOneTrustLevelMin).max(candidateProfileTermsSalaryMinimumSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(candidateProfileTermsSalaryMinimumSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(candidateProfileTermsSalaryMinimumSourceOneExtractionVersionOneMax).regex(candidateProfileTermsSalaryMinimumSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Lowest acceptable salary with its confirmation state and provenance. It is personal data that no organization reads. `value` and `source` are null exactly when `status` is `unknown`; the server never substitutes zero or a market estimate.')
|
||||
}).describe('Conditions that the candidate wants: the place, readiness to relocate, and the lowest salary. Acceptable work formats are not repeated here; they are the `work_formats` of the questionnaire `WorkContext`, the only place that holds them. These are the candidate\'s wishes, never the terms of an invitation, which an organization offers and which the invitation contract describes.'),
|
||||
"confirmed_categories": 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.'),
|
||||
"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.'),
|
||||
"confirmed_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.'),
|
||||
"attempt_id": zod.uuid().describe('Assessment attempt whose result confirmed the grade. The attempt belongs to the candidate.')
|
||||
}).describe('A category that an assessment result confirmed: the specialization with the confirmed grade. It is read-only and derived by the server from the assessment results of the candidate; no request carries it and the profile storage holds no such column, so neither a form nor an import can write a confirmed grade. It is separate from the claims of the profile and from the self-assessed grades in `roles`.')).max(candidateProfileConfirmedCategoriesMax).describe('Categories that assessment results confirmed, at most one per specialization, in catalog order. Read-only and empty until an assessment confirms a grade.'),
|
||||
"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('The private profile of the current candidate: full name and contacts, stack, roles, work experience, soft skills, and desired terms, each value with its confirmation state and provenance. It is personal data that only the candidate reads. It is never an organization-visible schema: an organization sees a candidate only through the anonymous card and, after an accepted invitation, through the contact grant, and no organization schema refers to this one.\nEvery value is a claim of trust level 0. The `self_assessed_grade` of a role is what the candidate says; the `confirmed_categories` list is what assessment results established, and the two are never mixed. A candidate who has not saved the profile gets version 0, every single field `unknown`, empty lists, and null `updated_at`.\nThe profile is manual by nature and complete without a file: no field requires a resume, the ML service, or an FSP account, and a candidate with none of them has the same fields. Work formats live in the questionnaire; a candidate\'s assessment starts from the questionnaire, not from this profile.')
|
||||
|
||||
export type CandidateProfile = zod.input<typeof CandidateProfile>;
|
||||
export type CandidateProfileOutput = zod.output<typeof CandidateProfile>;
|
||||
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const candidateProfileUpdateExpectedVersionMin = 0;
|
||||
|
||||
export const candidateProfileUpdateFullNameOneValueMax = 200;
|
||||
|
||||
|
||||
export const candidateProfileUpdateFullNameOneValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateProfileUpdateContactsEmailOneValueMin = 3;
|
||||
export const candidateProfileUpdateContactsEmailOneValueMax = 254;
|
||||
|
||||
export const candidateProfileUpdateContactsPhoneOneValueMin = 8;
|
||||
export const candidateProfileUpdateContactsPhoneOneValueMax = 16;
|
||||
|
||||
|
||||
export const candidateProfileUpdateContactsPhoneOneValueRegExp = new RegExp('^\\+[1-9][0-9]{6,14}$');
|
||||
export const candidateProfileUpdateContactsTelegramOneValueMin = 6;
|
||||
export const candidateProfileUpdateContactsTelegramOneValueMax = 33;
|
||||
|
||||
|
||||
export const candidateProfileUpdateContactsTelegramOneValueRegExp = new RegExp('^@[A-Za-z0-9_]{5,32}$');
|
||||
export const candidateProfileUpdateStackItemTagMax = 50;
|
||||
|
||||
|
||||
export const candidateProfileUpdateStackItemTagRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateProfileUpdateStackMax = 30;
|
||||
|
||||
export const candidateProfileUpdateRolesMax = 9;
|
||||
|
||||
export const candidateProfileUpdateExperienceItemEmployerNameOneMax = 200;
|
||||
|
||||
|
||||
export const candidateProfileUpdateExperienceItemEmployerNameOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateProfileUpdateExperienceItemStartedOnMin = 7;
|
||||
export const candidateProfileUpdateExperienceItemStartedOnMax = 7;
|
||||
|
||||
|
||||
export const candidateProfileUpdateExperienceItemStartedOnRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
|
||||
export const candidateProfileUpdateExperienceItemEndedOnOneMin = 7;
|
||||
export const candidateProfileUpdateExperienceItemEndedOnOneMax = 7;
|
||||
|
||||
|
||||
export const candidateProfileUpdateExperienceItemEndedOnOneRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
|
||||
export const candidateProfileUpdateExperienceItemSummaryOneMax = 1000;
|
||||
|
||||
export const candidateProfileUpdateExperienceMax = 20;
|
||||
|
||||
export const candidateProfileUpdateSoftSkillsItemSkillMax = 50;
|
||||
|
||||
|
||||
export const candidateProfileUpdateSoftSkillsItemSkillRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateProfileUpdateSoftSkillsMax = 10;
|
||||
|
||||
export const candidateProfileUpdateTermsLocationOneValueMax = 100;
|
||||
|
||||
|
||||
export const candidateProfileUpdateTermsLocationOneValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateProfileUpdateTermsSalaryMinimumOneValueAmountMin = 1000;
|
||||
export const candidateProfileUpdateTermsSalaryMinimumOneValueAmountMax = 100000000;
|
||||
export const candidateProfileUpdateTermsSalaryMinimumOneValueAmountMultipleOf = 1000;
|
||||
|
||||
|
||||
export const CandidateProfileUpdate = zod.object({
|
||||
"expected_version": zod.int().min(candidateProfileUpdateExpectedVersionMin).describe('Version of the candidate profile. A candidate who has not saved the profile has version 0; every save that changes the profile advances it by one. The client sends the version it read as `expected_version`.'),
|
||||
"full_name": zod.union([zod.object({
|
||||
"value": zod.string().min(1).max(candidateProfileUpdateFullNameOneValueMax).regex(candidateProfileUpdateFullNameOneValueRegExp).describe('Full name as the candidate wrote it in the profile. Plain text without line breaks; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the full name in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()]),
|
||||
"contacts": zod.object({
|
||||
"email": zod.union([zod.object({
|
||||
"value": zod.email().min(candidateProfileUpdateContactsEmailOneValueMin).max(candidateProfileUpdateContactsEmailOneValueMax).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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the contact email in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()]),
|
||||
"phone": zod.union([zod.object({
|
||||
"value": zod.string().min(candidateProfileUpdateContactsPhoneOneValueMin).max(candidateProfileUpdateContactsPhoneOneValueMax).regex(candidateProfileUpdateContactsPhoneOneValueRegExp).describe('Phone number in the E.164 format, for example +70000000000.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the contact phone number in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()]),
|
||||
"telegram": zod.union([zod.object({
|
||||
"value": zod.string().min(candidateProfileUpdateContactsTelegramOneValueMin).max(candidateProfileUpdateContactsTelegramOneValueMax).regex(candidateProfileUpdateContactsTelegramOneValueRegExp).describe('Telegram username with the leading @.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the Telegram username in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()])
|
||||
}).describe('Decisions about the contact channels in a request. A channel sent as null is unknown: it is removed if it was set.'),
|
||||
"stack": zod.array(zod.object({
|
||||
"tag": zod.string().min(1).max(candidateProfileUpdateStackItemTagMax).regex(candidateProfileUpdateStackItemTagRegExp).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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about one stack tag in a request; see CandidateProfileUpdate for the rules of `status`.')).max(candidateProfileUpdateStackMax).describe('Technology tags. The schema limits the count; the server also answers 400 with the pointer of a tag that repeats an earlier one without regard to letter case, for example `/stack/2/tag`.'),
|
||||
"roles": 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.union([zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),zod.null()]).describe('Grade that the candidate claims, or null when the candidate names none.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about one role in a request; see CandidateProfileUpdate for the rules of `status`. The object has no confirmed grade and no category: unknown fields are rejected.')).max(candidateProfileUpdateRolesMax).describe('Roles. The server answers 400 with the pointer of a role whose specialization repeats an earlier one, for example `/roles/1/specialization`.'),
|
||||
"experience": zod.array(zod.object({
|
||||
"employer_name": zod.union([zod.string().min(1).max(candidateProfileUpdateExperienceItemEmployerNameOneMax).regex(candidateProfileUpdateExperienceItemEmployerNameOneRegExp).describe('Name of the employer in one experience entry, as the candidate wrote it. It is personal data of the candidate\'s career. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]),
|
||||
"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.'),
|
||||
"started_on": zod.string().min(candidateProfileUpdateExperienceItemStartedOnMin).max(candidateProfileUpdateExperienceItemStartedOnMax).regex(candidateProfileUpdateExperienceItemStartedOnRegExp).describe('Calendar month in the `YYYY-MM` format, for example 2024-03. An experience period has month precision only, so the contract holds no exact date of employment. The server rejects a month that lies in the future.'),
|
||||
"ended_on": zod.union([zod.string().min(candidateProfileUpdateExperienceItemEndedOnOneMin).max(candidateProfileUpdateExperienceItemEndedOnOneMax).regex(candidateProfileUpdateExperienceItemEndedOnOneRegExp).describe('Calendar month in the `YYYY-MM` format, for example 2024-03. An experience period has month precision only, so the contract holds no exact date of employment. The server rejects a month that lies in the future.'),zod.null()]),
|
||||
"summary": zod.union([zod.string().min(1).max(candidateProfileUpdateExperienceItemSummaryOneMax).describe('Tasks and results of the candidate in one experience entry. It describes the work rather than a job title. It may contain line breaks and personal data of the candidate; it must not contain personal data of other people. Plain text; clients show it as text, never as HTML.'),zod.null()]),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about one work history entry in a request; see CandidateProfileUpdate for the rules of `status`. The server also requires `ended_on` not to precede `started_on` and no month to lie in the future, and answers 400 with the pointer of the month.')).max(candidateProfileUpdateExperienceMax).describe('Work history entries.'),
|
||||
"soft_skills": zod.array(zod.object({
|
||||
"skill": zod.string().min(1).max(candidateProfileUpdateSoftSkillsItemSkillMax).regex(candidateProfileUpdateSoftSkillsItemSkillRegExp).describe('Soft skill as the candidate wrote it, for example "Mentoring" or "Negotiation". The platform has no soft skill taxonomy, so the text is free; it never changes a category or a grade. It has no leading or trailing whitespace and no line breaks. The server compares skills without regard to letter case. Plain text; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about one soft skill in a request; see CandidateProfileUpdate for the rules of `status`.')).max(candidateProfileUpdateSoftSkillsMax).describe('Soft skills. The server answers 400 with the pointer of a skill that repeats an earlier one without regard to letter case.'),
|
||||
"terms": zod.object({
|
||||
"location": zod.union([zod.object({
|
||||
"value": zod.string().min(1).max(candidateProfileUpdateTermsLocationOneValueMax).regex(candidateProfileUpdateTermsLocationOneValueRegExp).describe('City or region where the candidate lives or wants to work, as free text. It is personal data of the candidate and never a street address. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the place in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()]),
|
||||
"relocation": zod.union([zod.object({
|
||||
"value": zod.boolean(),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about readiness to relocate in a request; see CandidateProfileUpdate for the rules of `status`.'),zod.null()]),
|
||||
"salary_minimum": zod.union([zod.object({
|
||||
"value": zod.object({
|
||||
"amount": zod.int().min(candidateProfileUpdateTermsSalaryMinimumOneValueAmountMin).max(candidateProfileUpdateTermsSalaryMinimumOneValueAmountMax).multipleOf(candidateProfileUpdateTermsSalaryMinimumOneValueAmountMultipleOf).describe('Amount of money in whole rubles. A salary bound is positive and a multiple of 1000, the step that PRD FR13 sets for the bounds of a salary range and for the bids of the sealed final.'),
|
||||
"currency": zod.enum(['RUB']).describe('ISO 4217 currency code. The MVP accepts only RUB; adding a value is a contract change.'),
|
||||
"period": zod.enum(['month']).describe('Pay period of a salary amount. The MVP uses only `month`; adding a value is a contract change.'),
|
||||
"tax_basis": zod.enum(['net', 'gross']).describe('Tax basis of a salary amount: `net`, the amount paid out after personal income tax, or `gross`, the amount before it. The basis is always explicit; amounts in different bases are never compared directly.')
|
||||
}).describe('The lowest salary that the candidate accepts, in whole rubles with its base: the currency, the pay period, and the tax basis. It is private to the candidate: no organization reads it, and the invitation only shows a compatibility indicator that the server derives from it. It is personal data. The amount is a positive multiple of 1000.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the lowest salary in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()])
|
||||
}).describe('Decisions about the desired terms in a request. A field sent as null is unknown: it is removed if it was set.')
|
||||
}).describe('Complete new state of the candidate profile. It replaces every stored value as a whole: a single field sent as null is unknown and is removed, and a list replaces the stored list. The body is personal data.\nEach value carries a decision `status`. `confirmed` sets a manual value or confirms a stored suggestion; confirming a suggestion with exactly its stored value keeps its origin and quote, and any other value makes the claim manual. `extracted` keeps a stored suggestion unconfirmed and is accepted only with exactly the stored value; any other use answers 400 with the pointer of that status, for example `/stack/1/status`. The provenance, the trust level, and the confirmed categories are not part of the request, and unknown fields are rejected, so a request can neither mark a claim as verified nor write a confirmed grade or a category.')
|
||||
|
||||
export type CandidateProfileUpdate = zod.input<typeof CandidateProfileUpdate>;
|
||||
export type CandidateProfileUpdateOutput = zod.output<typeof CandidateProfileUpdate>;
|
||||
@@ -37,11 +37,11 @@ export const CandidateQuestionnaire = zod.object({
|
||||
"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.'),
|
||||
}).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. The work history entries of the candidate profile (`ProfileExperienceItem`) are a different, detailed claim: the two are saved separately and the server neither adds the entries up nor fills them from these totals.'),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. The candidate profile states the same kind of claim in the `roles` of `CandidateProfile` (`ProfileRoleItem.self_assessed_grade`): the questionnaire value starts the assessment and the profile value is what the profile shows, the two are saved separately, and neither is ever a confirmed grade.')).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.'),
|
||||
}).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 (`ProfileTerms`). The acceptable work formats live only here: the profile does not repeat them.'),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`.')
|
||||
|
||||
|
||||
@@ -37,11 +37,11 @@ export const CandidateQuestionnaireUpdate = zod.object({
|
||||
"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`.'),
|
||||
}).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. The work history entries of the candidate profile (`ProfileExperienceItem`) are a different, detailed claim: the two are saved separately and the server neither adds the entries up nor fills them from these totals.'),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. The candidate profile states the same kind of claim in the `roles` of `CandidateProfile` (`ProfileRoleItem.self_assessed_grade`): the questionnaire value starts the assessment and the profile value is what the profile shows, the two are saved separately, and neither is ever a confirmed grade.')).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('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 (`ProfileTerms`). The acceptable work formats live only here: the profile does not repeat them.')
|
||||
}).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>;
|
||||
|
||||
@@ -6,10 +6,53 @@
|
||||
*/
|
||||
|
||||
export * from './candidateExperience.zod';
|
||||
export * from './candidateProfile.zod';
|
||||
export * from './candidateProfileUpdate.zod';
|
||||
export * from './candidateQuestionnaire.zod';
|
||||
export * from './candidateQuestionnaireUpdate.zod';
|
||||
export * from './profileClaimOrigin.zod';
|
||||
export * from './profileClaimQuote.zod';
|
||||
export * from './profileClaimSource.zod';
|
||||
export * from './profileClaimStatus.zod';
|
||||
export * from './profileClaimTrustLevel.zod';
|
||||
export * from './profileConfirmedCategory.zod';
|
||||
export * from './profileContacts.zod';
|
||||
export * from './profileContactsInput.zod';
|
||||
export * from './profileEmailClaim.zod';
|
||||
export * from './profileEmailInput.zod';
|
||||
export * from './profileEmployerName.zod';
|
||||
export * from './profileExperienceItem.zod';
|
||||
export * from './profileExperienceItemInput.zod';
|
||||
export * from './profileExperienceSummary.zod';
|
||||
export * from './profileFullNameClaim.zod';
|
||||
export * from './profileFullNameInput.zod';
|
||||
export * from './profileItemStatus.zod';
|
||||
export * from './profileLocationClaim.zod';
|
||||
export * from './profileLocationInput.zod';
|
||||
export * from './profileLocationName.zod';
|
||||
export * from './profilePhoneClaim.zod';
|
||||
export * from './profilePhoneInput.zod';
|
||||
export * from './profileRelocationClaim.zod';
|
||||
export * from './profileRelocationInput.zod';
|
||||
export * from './profileRoleItem.zod';
|
||||
export * from './profileRoleItemInput.zod';
|
||||
export * from './profileSalaryMinimum.zod';
|
||||
export * from './profileSalaryMinimumClaim.zod';
|
||||
export * from './profileSalaryMinimumInput.zod';
|
||||
export * from './profileSoftSkill.zod';
|
||||
export * from './profileSoftSkillItem.zod';
|
||||
export * from './profileSoftSkillItemInput.zod';
|
||||
export * from './profileStackItem.zod';
|
||||
export * from './profileStackItemInput.zod';
|
||||
export * from './profileTelegramClaim.zod';
|
||||
export * from './profileTelegramInput.zod';
|
||||
export * from './profileTerms.zod';
|
||||
export * from './profileTermsInput.zod';
|
||||
export * from './profileVersion.zod';
|
||||
export * from './profileYearMonth.zod';
|
||||
export * from './questionnaireSpecialization.zod';
|
||||
export * from './questionnaireVersion.zod';
|
||||
export * from './saveMyProfileBody.zod';
|
||||
export * from './saveMyQuestionnaireBody.zod';
|
||||
export * from './stackTag.zod';
|
||||
export * from './workContext.zod';
|
||||
@@ -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 ProfileClaimOrigin = zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.')
|
||||
|
||||
export type ProfileClaimOrigin = zod.input<typeof ProfileClaimOrigin>;
|
||||
export type ProfileClaimOriginOutput = zod.output<typeof ProfileClaimOrigin>;
|
||||
@@ -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 ProfileClaimQuoteMax = 300;
|
||||
|
||||
|
||||
export const ProfileClaimQuote = zod.string().min(1).max(ProfileClaimQuoteMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
|
||||
export type ProfileClaimQuote = zod.input<typeof ProfileClaimQuote>;
|
||||
export type ProfileClaimQuoteOutput = zod.output<typeof ProfileClaimQuote>;
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileClaimSourceTrustLevelMin = 0;
|
||||
export const profileClaimSourceTrustLevelMax = 0;
|
||||
|
||||
export const profileClaimSourceQuoteOneMax = 300;
|
||||
|
||||
export const profileClaimSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileClaimSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ProfileClaimSource = zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileClaimSourceTrustLevelMin).max(profileClaimSourceTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileClaimSourceQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileClaimSourceExtractionVersionOneMax).regex(profileClaimSourceExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.')
|
||||
|
||||
export type ProfileClaimSource = zod.input<typeof ProfileClaimSource>;
|
||||
export type ProfileClaimSourceOutput = zod.output<typeof ProfileClaimSource>;
|
||||
@@ -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 ProfileClaimStatus = zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.')
|
||||
|
||||
export type ProfileClaimStatus = zod.input<typeof ProfileClaimStatus>;
|
||||
export type ProfileClaimStatusOutput = zod.output<typeof ProfileClaimStatus>;
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const ProfileClaimTrustLevelMin = 0;
|
||||
export const ProfileClaimTrustLevelMax = 0;
|
||||
|
||||
|
||||
export const ProfileClaimTrustLevel = zod.int().min(ProfileClaimTrustLevelMin).max(ProfileClaimTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.')
|
||||
|
||||
export type ProfileClaimTrustLevel = zod.input<typeof ProfileClaimTrustLevel>;
|
||||
export type ProfileClaimTrustLevelOutput = zod.output<typeof ProfileClaimTrustLevel>;
|
||||
@@ -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 ProfileConfirmedCategory = 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.'),
|
||||
"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.'),
|
||||
"confirmed_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.'),
|
||||
"attempt_id": zod.uuid().describe('Assessment attempt whose result confirmed the grade. The attempt belongs to the candidate.')
|
||||
}).describe('A category that an assessment result confirmed: the specialization with the confirmed grade. It is read-only and derived by the server from the assessment results of the candidate; no request carries it and the profile storage holds no such column, so neither a form nor an import can write a confirmed grade. It is separate from the claims of the profile and from the self-assessed grades in `roles`.')
|
||||
|
||||
export type ProfileConfirmedCategory = zod.input<typeof ProfileConfirmedCategory>;
|
||||
export type ProfileConfirmedCategoryOutput = zod.output<typeof ProfileConfirmedCategory>;
|
||||
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileContactsEmailValueOneMin = 3;
|
||||
export const profileContactsEmailValueOneMax = 254;
|
||||
|
||||
export const profileContactsEmailSourceOneTrustLevelMin = 0;
|
||||
export const profileContactsEmailSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const profileContactsEmailSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const profileContactsEmailSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileContactsEmailSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const profileContactsPhoneValueOneMin = 8;
|
||||
export const profileContactsPhoneValueOneMax = 16;
|
||||
|
||||
|
||||
export const profileContactsPhoneValueOneRegExp = new RegExp('^\\+[1-9][0-9]{6,14}$');
|
||||
export const profileContactsPhoneSourceOneTrustLevelMin = 0;
|
||||
export const profileContactsPhoneSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const profileContactsPhoneSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const profileContactsPhoneSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileContactsPhoneSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const profileContactsTelegramValueOneMin = 6;
|
||||
export const profileContactsTelegramValueOneMax = 33;
|
||||
|
||||
|
||||
export const profileContactsTelegramValueOneRegExp = new RegExp('^@[A-Za-z0-9_]{5,32}$');
|
||||
export const profileContactsTelegramSourceOneTrustLevelMin = 0;
|
||||
export const profileContactsTelegramSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const profileContactsTelegramSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const profileContactsTelegramSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileContactsTelegramSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ProfileContacts = zod.object({
|
||||
"email": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.email().min(profileContactsEmailValueOneMin).max(profileContactsEmailValueOneMax).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.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileContactsEmailSourceOneTrustLevelMin).max(profileContactsEmailSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileContactsEmailSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileContactsEmailSourceOneExtractionVersionOneMax).regex(profileContactsEmailSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Contact email of the candidate with its confirmation state and provenance. It is personal data. It is a contact channel that the candidate gives, not the login of the account: the two may differ, the server never sends mail to it and never verifies it. `value` and `source` are null exactly when `status` is `unknown`.'),
|
||||
"phone": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.string().min(profileContactsPhoneValueOneMin).max(profileContactsPhoneValueOneMax).regex(profileContactsPhoneValueOneRegExp).describe('Phone number in the E.164 format, for example +70000000000.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileContactsPhoneSourceOneTrustLevelMin).max(profileContactsPhoneSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileContactsPhoneSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileContactsPhoneSourceOneExtractionVersionOneMax).regex(profileContactsPhoneSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Contact phone number of the candidate with its confirmation state and provenance. It is personal data, stored in the E.164 format of the contact disclosure. `value` and `source` are null exactly when `status` is `unknown`.'),
|
||||
"telegram": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.string().min(profileContactsTelegramValueOneMin).max(profileContactsTelegramValueOneMax).regex(profileContactsTelegramValueOneRegExp).describe('Telegram username with the leading @.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileContactsTelegramSourceOneTrustLevelMin).max(profileContactsTelegramSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileContactsTelegramSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileContactsTelegramSourceOneExtractionVersionOneMax).regex(profileContactsTelegramSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Telegram username of the candidate with its confirmation state and provenance. It is personal data, stored with the leading @ of the contact disclosure. `value` and `source` are null exactly when `status` is `unknown`.')
|
||||
}).describe('Contact channels of the candidate. Each channel is a claim of its own, and the candidate fills in any subset. The kinds are the ones that the contact disclosure (consent C4) can pass on, with the same value formats, so a disclosure never has to convert or drop a stored value; adding a kind, such as a link to a code repository, is a contract change in both places. Contacts leave the profile only through a contact grant, never in a card or a search result. All values are personal data.')
|
||||
|
||||
export type ProfileContacts = zod.input<typeof ProfileContacts>;
|
||||
export type ProfileContactsOutput = zod.output<typeof ProfileContacts>;
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileContactsInputEmailOneValueMin = 3;
|
||||
export const profileContactsInputEmailOneValueMax = 254;
|
||||
|
||||
export const profileContactsInputPhoneOneValueMin = 8;
|
||||
export const profileContactsInputPhoneOneValueMax = 16;
|
||||
|
||||
|
||||
export const profileContactsInputPhoneOneValueRegExp = new RegExp('^\\+[1-9][0-9]{6,14}$');
|
||||
export const profileContactsInputTelegramOneValueMin = 6;
|
||||
export const profileContactsInputTelegramOneValueMax = 33;
|
||||
|
||||
|
||||
export const profileContactsInputTelegramOneValueRegExp = new RegExp('^@[A-Za-z0-9_]{5,32}$');
|
||||
|
||||
export const ProfileContactsInput = zod.object({
|
||||
"email": zod.union([zod.object({
|
||||
"value": zod.email().min(profileContactsInputEmailOneValueMin).max(profileContactsInputEmailOneValueMax).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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the contact email in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()]),
|
||||
"phone": zod.union([zod.object({
|
||||
"value": zod.string().min(profileContactsInputPhoneOneValueMin).max(profileContactsInputPhoneOneValueMax).regex(profileContactsInputPhoneOneValueRegExp).describe('Phone number in the E.164 format, for example +70000000000.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the contact phone number in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()]),
|
||||
"telegram": zod.union([zod.object({
|
||||
"value": zod.string().min(profileContactsInputTelegramOneValueMin).max(profileContactsInputTelegramOneValueMax).regex(profileContactsInputTelegramOneValueRegExp).describe('Telegram username with the leading @.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the Telegram username in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()])
|
||||
}).describe('Decisions about the contact channels in a request. A channel sent as null is unknown: it is removed if it was set.')
|
||||
|
||||
export type ProfileContactsInput = zod.input<typeof ProfileContactsInput>;
|
||||
export type ProfileContactsInputOutput = zod.output<typeof ProfileContactsInput>;
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileEmailClaimValueOneMin = 3;
|
||||
export const profileEmailClaimValueOneMax = 254;
|
||||
|
||||
export const profileEmailClaimSourceOneTrustLevelMin = 0;
|
||||
export const profileEmailClaimSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const profileEmailClaimSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const profileEmailClaimSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileEmailClaimSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ProfileEmailClaim = zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.email().min(profileEmailClaimValueOneMin).max(profileEmailClaimValueOneMax).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.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileEmailClaimSourceOneTrustLevelMin).max(profileEmailClaimSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileEmailClaimSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileEmailClaimSourceOneExtractionVersionOneMax).regex(profileEmailClaimSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Contact email of the candidate with its confirmation state and provenance. It is personal data. It is a contact channel that the candidate gives, not the login of the account: the two may differ, the server never sends mail to it and never verifies it. `value` and `source` are null exactly when `status` is `unknown`.')
|
||||
|
||||
export type ProfileEmailClaim = zod.input<typeof ProfileEmailClaim>;
|
||||
export type ProfileEmailClaimOutput = zod.output<typeof ProfileEmailClaim>;
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileEmailInputValueMin = 3;
|
||||
export const profileEmailInputValueMax = 254;
|
||||
|
||||
|
||||
export const ProfileEmailInput = zod.object({
|
||||
"value": zod.email().min(profileEmailInputValueMin).max(profileEmailInputValueMax).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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the contact email in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.')
|
||||
|
||||
export type ProfileEmailInput = zod.input<typeof ProfileEmailInput>;
|
||||
export type ProfileEmailInputOutput = zod.output<typeof ProfileEmailInput>;
|
||||
@@ -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 ProfileEmployerNameMax = 200;
|
||||
|
||||
|
||||
export const ProfileEmployerNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const ProfileEmployerName = zod.string().min(1).max(ProfileEmployerNameMax).regex(ProfileEmployerNameRegExp).describe('Name of the employer in one experience entry, as the candidate wrote it. It is personal data of the candidate\'s career. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
|
||||
export type ProfileEmployerName = zod.input<typeof ProfileEmployerName>;
|
||||
export type ProfileEmployerNameOutput = zod.output<typeof ProfileEmployerName>;
|
||||
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileExperienceItemEmployerNameOneMax = 200;
|
||||
|
||||
|
||||
export const profileExperienceItemEmployerNameOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const profileExperienceItemStartedOnMin = 7;
|
||||
export const profileExperienceItemStartedOnMax = 7;
|
||||
|
||||
|
||||
export const profileExperienceItemStartedOnRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
|
||||
export const profileExperienceItemEndedOnOneMin = 7;
|
||||
export const profileExperienceItemEndedOnOneMax = 7;
|
||||
|
||||
|
||||
export const profileExperienceItemEndedOnOneRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
|
||||
export const profileExperienceItemSummaryOneMax = 1000;
|
||||
|
||||
export const profileExperienceItemSourceTrustLevelMin = 0;
|
||||
export const profileExperienceItemSourceTrustLevelMax = 0;
|
||||
|
||||
export const profileExperienceItemSourceQuoteOneMax = 300;
|
||||
|
||||
export const profileExperienceItemSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileExperienceItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ProfileExperienceItem = zod.object({
|
||||
"employer_name": zod.union([zod.string().min(1).max(profileExperienceItemEmployerNameOneMax).regex(profileExperienceItemEmployerNameOneRegExp).describe('Name of the employer in one experience entry, as the candidate wrote it. It is personal data of the candidate\'s career. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Employer of the entry, or null when the candidate gives none.'),
|
||||
"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.'),
|
||||
"started_on": zod.string().min(profileExperienceItemStartedOnMin).max(profileExperienceItemStartedOnMax).regex(profileExperienceItemStartedOnRegExp).describe('Calendar month in the `YYYY-MM` format, for example 2024-03. An experience period has month precision only, so the contract holds no exact date of employment. The server rejects a month that lies in the future.'),
|
||||
"ended_on": zod.union([zod.string().min(profileExperienceItemEndedOnOneMin).max(profileExperienceItemEndedOnOneMax).regex(profileExperienceItemEndedOnOneRegExp).describe('Calendar month in the `YYYY-MM` format, for example 2024-03. An experience period has month precision only, so the contract holds no exact date of employment. The server rejects a month that lies in the future.'),zod.null()]).describe('Last month of the work, or null when the candidate still works there. It is not earlier than `started_on`.'),
|
||||
"summary": zod.union([zod.string().min(1).max(profileExperienceItemSummaryOneMax).describe('Tasks and results of the candidate in one experience entry. It describes the work rather than a job title. It may contain line breaks and personal data of the candidate; it must not contain personal data of other people. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Tasks and results of the entry, or null when the candidate gives none.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileExperienceItemSourceTrustLevelMin).max(profileExperienceItemSourceTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileExperienceItemSourceQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileExperienceItemSourceExtractionVersionOneMax).regex(profileExperienceItemSourceExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.')
|
||||
}).describe('One entry of the candidate\'s work history with its confirmation state and provenance. An entry describes the work by its specialization and tasks rather than by a job title, and it is a claim of trust level 0. It is different from the `CandidateExperience` of the questionnaire, which holds only the total months of commercial and academic experience of a chosen specialization as a hint for the assessment: the two are saved separately, and the server neither adds the entries up for the questionnaire nor fills the entries from it. An entry is personal data.')
|
||||
|
||||
export type ProfileExperienceItem = zod.input<typeof ProfileExperienceItem>;
|
||||
export type ProfileExperienceItemOutput = zod.output<typeof ProfileExperienceItem>;
|
||||
@@ -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 profileExperienceItemInputEmployerNameOneMax = 200;
|
||||
|
||||
|
||||
export const profileExperienceItemInputEmployerNameOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const profileExperienceItemInputStartedOnMin = 7;
|
||||
export const profileExperienceItemInputStartedOnMax = 7;
|
||||
|
||||
|
||||
export const profileExperienceItemInputStartedOnRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
|
||||
export const profileExperienceItemInputEndedOnOneMin = 7;
|
||||
export const profileExperienceItemInputEndedOnOneMax = 7;
|
||||
|
||||
|
||||
export const profileExperienceItemInputEndedOnOneRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
|
||||
export const profileExperienceItemInputSummaryOneMax = 1000;
|
||||
|
||||
|
||||
export const ProfileExperienceItemInput = zod.object({
|
||||
"employer_name": zod.union([zod.string().min(1).max(profileExperienceItemInputEmployerNameOneMax).regex(profileExperienceItemInputEmployerNameOneRegExp).describe('Name of the employer in one experience entry, as the candidate wrote it. It is personal data of the candidate\'s career. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]),
|
||||
"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.'),
|
||||
"started_on": zod.string().min(profileExperienceItemInputStartedOnMin).max(profileExperienceItemInputStartedOnMax).regex(profileExperienceItemInputStartedOnRegExp).describe('Calendar month in the `YYYY-MM` format, for example 2024-03. An experience period has month precision only, so the contract holds no exact date of employment. The server rejects a month that lies in the future.'),
|
||||
"ended_on": zod.union([zod.string().min(profileExperienceItemInputEndedOnOneMin).max(profileExperienceItemInputEndedOnOneMax).regex(profileExperienceItemInputEndedOnOneRegExp).describe('Calendar month in the `YYYY-MM` format, for example 2024-03. An experience period has month precision only, so the contract holds no exact date of employment. The server rejects a month that lies in the future.'),zod.null()]),
|
||||
"summary": zod.union([zod.string().min(1).max(profileExperienceItemInputSummaryOneMax).describe('Tasks and results of the candidate in one experience entry. It describes the work rather than a job title. It may contain line breaks and personal data of the candidate; it must not contain personal data of other people. Plain text; clients show it as text, never as HTML.'),zod.null()]),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about one work history entry in a request; see CandidateProfileUpdate for the rules of `status`. The server also requires `ended_on` not to precede `started_on` and no month to lie in the future, and answers 400 with the pointer of the month.')
|
||||
|
||||
export type ProfileExperienceItemInput = zod.input<typeof ProfileExperienceItemInput>;
|
||||
export type ProfileExperienceItemInputOutput = zod.output<typeof ProfileExperienceItemInput>;
|
||||
@@ -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 ProfileExperienceSummaryMax = 1000;
|
||||
|
||||
|
||||
export const ProfileExperienceSummary = zod.string().min(1).max(ProfileExperienceSummaryMax).describe('Tasks and results of the candidate in one experience entry. It describes the work rather than a job title. It may contain line breaks and personal data of the candidate; it must not contain personal data of other people. Plain text; clients show it as text, never as HTML.')
|
||||
|
||||
export type ProfileExperienceSummary = zod.input<typeof ProfileExperienceSummary>;
|
||||
export type ProfileExperienceSummaryOutput = zod.output<typeof ProfileExperienceSummary>;
|
||||
@@ -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 profileFullNameClaimValueOneMax = 200;
|
||||
|
||||
|
||||
export const profileFullNameClaimValueOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const profileFullNameClaimSourceOneTrustLevelMin = 0;
|
||||
export const profileFullNameClaimSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const profileFullNameClaimSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const profileFullNameClaimSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileFullNameClaimSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ProfileFullNameClaim = zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.string().min(1).max(profileFullNameClaimValueOneMax).regex(profileFullNameClaimValueOneRegExp).describe('Full name as the candidate wrote it in the profile. Plain text without line breaks; clients show it as text, never as HTML.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileFullNameClaimSourceOneTrustLevelMin).max(profileFullNameClaimSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileFullNameClaimSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileFullNameClaimSourceOneExtractionVersionOneMax).regex(profileFullNameClaimSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Full name of the candidate with its confirmation state and provenance. The value is personal data. It is disclosed to one organization only through the contact grant of the consent C4 and never appears in an organization-visible schema. `value` and `source` are null exactly when `status` is `unknown`.')
|
||||
|
||||
export type ProfileFullNameClaim = zod.input<typeof ProfileFullNameClaim>;
|
||||
export type ProfileFullNameClaimOutput = zod.output<typeof ProfileFullNameClaim>;
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileFullNameInputValueMax = 200;
|
||||
|
||||
|
||||
export const profileFullNameInputValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const ProfileFullNameInput = zod.object({
|
||||
"value": zod.string().min(1).max(profileFullNameInputValueMax).regex(profileFullNameInputValueRegExp).describe('Full name as the candidate wrote it in the profile. Plain text without line breaks; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the full name in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.')
|
||||
|
||||
export type ProfileFullNameInput = zod.input<typeof ProfileFullNameInput>;
|
||||
export type ProfileFullNameInputOutput = zod.output<typeof ProfileFullNameInput>;
|
||||
@@ -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 ProfileItemStatus = zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
|
||||
export type ProfileItemStatus = zod.input<typeof ProfileItemStatus>;
|
||||
export type ProfileItemStatusOutput = zod.output<typeof ProfileItemStatus>;
|
||||
@@ -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 profileLocationClaimValueOneMax = 100;
|
||||
|
||||
|
||||
export const profileLocationClaimValueOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const profileLocationClaimSourceOneTrustLevelMin = 0;
|
||||
export const profileLocationClaimSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const profileLocationClaimSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const profileLocationClaimSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileLocationClaimSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ProfileLocationClaim = zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.string().min(1).max(profileLocationClaimValueOneMax).regex(profileLocationClaimValueOneRegExp).describe('City or region where the candidate lives or wants to work, as free text. It is personal data of the candidate and never a street address. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileLocationClaimSourceOneTrustLevelMin).max(profileLocationClaimSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileLocationClaimSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileLocationClaimSourceOneExtractionVersionOneMax).regex(profileLocationClaimSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Place of the candidate with its confirmation state and provenance. It is personal data. `value` and `source` are null exactly when `status` is `unknown`.')
|
||||
|
||||
export type ProfileLocationClaim = zod.input<typeof ProfileLocationClaim>;
|
||||
export type ProfileLocationClaimOutput = zod.output<typeof ProfileLocationClaim>;
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileLocationInputValueMax = 100;
|
||||
|
||||
|
||||
export const profileLocationInputValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const ProfileLocationInput = zod.object({
|
||||
"value": zod.string().min(1).max(profileLocationInputValueMax).regex(profileLocationInputValueRegExp).describe('City or region where the candidate lives or wants to work, as free text. It is personal data of the candidate and never a street address. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the place in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.')
|
||||
|
||||
export type ProfileLocationInput = zod.input<typeof ProfileLocationInput>;
|
||||
export type ProfileLocationInputOutput = zod.output<typeof ProfileLocationInput>;
|
||||
@@ -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 ProfileLocationNameMax = 100;
|
||||
|
||||
|
||||
export const ProfileLocationNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const ProfileLocationName = zod.string().min(1).max(ProfileLocationNameMax).regex(ProfileLocationNameRegExp).describe('City or region where the candidate lives or wants to work, as free text. It is personal data of the candidate and never a street address. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
|
||||
export type ProfileLocationName = zod.input<typeof ProfileLocationName>;
|
||||
export type ProfileLocationNameOutput = zod.output<typeof ProfileLocationName>;
|
||||
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profilePhoneClaimValueOneMin = 8;
|
||||
export const profilePhoneClaimValueOneMax = 16;
|
||||
|
||||
|
||||
export const profilePhoneClaimValueOneRegExp = new RegExp('^\\+[1-9][0-9]{6,14}$');
|
||||
export const profilePhoneClaimSourceOneTrustLevelMin = 0;
|
||||
export const profilePhoneClaimSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const profilePhoneClaimSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const profilePhoneClaimSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profilePhoneClaimSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ProfilePhoneClaim = zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.string().min(profilePhoneClaimValueOneMin).max(profilePhoneClaimValueOneMax).regex(profilePhoneClaimValueOneRegExp).describe('Phone number in the E.164 format, for example +70000000000.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profilePhoneClaimSourceOneTrustLevelMin).max(profilePhoneClaimSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profilePhoneClaimSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profilePhoneClaimSourceOneExtractionVersionOneMax).regex(profilePhoneClaimSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Contact phone number of the candidate with its confirmation state and provenance. It is personal data, stored in the E.164 format of the contact disclosure. `value` and `source` are null exactly when `status` is `unknown`.')
|
||||
|
||||
export type ProfilePhoneClaim = zod.input<typeof ProfilePhoneClaim>;
|
||||
export type ProfilePhoneClaimOutput = zod.output<typeof ProfilePhoneClaim>;
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profilePhoneInputValueMin = 8;
|
||||
export const profilePhoneInputValueMax = 16;
|
||||
|
||||
|
||||
export const profilePhoneInputValueRegExp = new RegExp('^\\+[1-9][0-9]{6,14}$');
|
||||
|
||||
export const ProfilePhoneInput = zod.object({
|
||||
"value": zod.string().min(profilePhoneInputValueMin).max(profilePhoneInputValueMax).regex(profilePhoneInputValueRegExp).describe('Phone number in the E.164 format, for example +70000000000.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the contact phone number in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.')
|
||||
|
||||
export type ProfilePhoneInput = zod.input<typeof ProfilePhoneInput>;
|
||||
export type ProfilePhoneInputOutput = zod.output<typeof ProfilePhoneInput>;
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileRelocationClaimSourceOneTrustLevelMin = 0;
|
||||
export const profileRelocationClaimSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const profileRelocationClaimSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const profileRelocationClaimSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileRelocationClaimSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ProfileRelocationClaim = zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.boolean().nullable(),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileRelocationClaimSourceOneTrustLevelMin).max(profileRelocationClaimSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileRelocationClaimSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileRelocationClaimSourceOneExtractionVersionOneMax).regex(profileRelocationClaimSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Whether the candidate is ready to relocate, with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`; the server never assumes an answer.')
|
||||
|
||||
export type ProfileRelocationClaim = zod.input<typeof ProfileRelocationClaim>;
|
||||
export type ProfileRelocationClaimOutput = zod.output<typeof ProfileRelocationClaim>;
|
||||
@@ -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 ProfileRelocationInput = zod.object({
|
||||
"value": zod.boolean(),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about readiness to relocate in a request; see CandidateProfileUpdate for the rules of `status`.')
|
||||
|
||||
export type ProfileRelocationInput = zod.input<typeof ProfileRelocationInput>;
|
||||
export type ProfileRelocationInputOutput = zod.output<typeof ProfileRelocationInput>;
|
||||
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileRoleItemSourceTrustLevelMin = 0;
|
||||
export const profileRoleItemSourceTrustLevelMax = 0;
|
||||
|
||||
export const profileRoleItemSourceQuoteOneMax = 300;
|
||||
|
||||
export const profileRoleItemSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileRoleItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ProfileRoleItem = 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.union([zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),zod.null()]).describe('Grade that the candidate claims in the specialization, or null when the candidate names none.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileRoleItemSourceTrustLevelMin).max(profileRoleItemSourceTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileRoleItemSourceQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileRoleItemSourceExtractionVersionOneMax).regex(profileRoleItemSourceExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.')
|
||||
}).describe('One role of the candidate: a specialization of the catalog with the grade that the candidate claims for it. `self_assessed_grade` is a claim, the same one that the questionnaire calls `self_assessed_grade` for its at most two chosen specializations: it influences nothing but the display and never becomes a confirmed grade or a category. The questionnaire value starts the assessment and the profile value is what the profile shows; the two are saved separately and the server never copies one into the other. A confirmed grade comes only from an assessment result and appears in `confirmed_categories` of the profile, never in a role; unknown fields such as `confirmed_grade` or `category` are rejected.')
|
||||
|
||||
export type ProfileRoleItem = zod.input<typeof ProfileRoleItem>;
|
||||
export type ProfileRoleItemOutput = zod.output<typeof ProfileRoleItem>;
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const ProfileRoleItemInput = 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.union([zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),zod.null()]).describe('Grade that the candidate claims, or null when the candidate names none.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about one role in a request; see CandidateProfileUpdate for the rules of `status`. The object has no confirmed grade and no category: unknown fields are rejected.')
|
||||
|
||||
export type ProfileRoleItemInput = zod.input<typeof ProfileRoleItemInput>;
|
||||
export type ProfileRoleItemInputOutput = zod.output<typeof ProfileRoleItemInput>;
|
||||
@@ -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 profileSalaryMinimumAmountMin = 1000;
|
||||
export const profileSalaryMinimumAmountMax = 100000000;
|
||||
export const profileSalaryMinimumAmountMultipleOf = 1000;
|
||||
|
||||
|
||||
export const ProfileSalaryMinimum = zod.object({
|
||||
"amount": zod.int().min(profileSalaryMinimumAmountMin).max(profileSalaryMinimumAmountMax).multipleOf(profileSalaryMinimumAmountMultipleOf).describe('Amount of money in whole rubles. A salary bound is positive and a multiple of 1000, the step that PRD FR13 sets for the bounds of a salary range and for the bids of the sealed final.'),
|
||||
"currency": zod.enum(['RUB']).describe('ISO 4217 currency code. The MVP accepts only RUB; adding a value is a contract change.'),
|
||||
"period": zod.enum(['month']).describe('Pay period of a salary amount. The MVP uses only `month`; adding a value is a contract change.'),
|
||||
"tax_basis": zod.enum(['net', 'gross']).describe('Tax basis of a salary amount: `net`, the amount paid out after personal income tax, or `gross`, the amount before it. The basis is always explicit; amounts in different bases are never compared directly.')
|
||||
}).describe('The lowest salary that the candidate accepts, in whole rubles with its base: the currency, the pay period, and the tax basis. It is private to the candidate: no organization reads it, and the invitation only shows a compatibility indicator that the server derives from it. It is personal data. The amount is a positive multiple of 1000.')
|
||||
|
||||
export type ProfileSalaryMinimum = zod.input<typeof ProfileSalaryMinimum>;
|
||||
export type ProfileSalaryMinimumOutput = zod.output<typeof ProfileSalaryMinimum>;
|
||||
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileSalaryMinimumClaimValueOneAmountMin = 1000;
|
||||
export const profileSalaryMinimumClaimValueOneAmountMax = 100000000;
|
||||
export const profileSalaryMinimumClaimValueOneAmountMultipleOf = 1000;
|
||||
|
||||
export const profileSalaryMinimumClaimSourceOneTrustLevelMin = 0;
|
||||
export const profileSalaryMinimumClaimSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const profileSalaryMinimumClaimSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const profileSalaryMinimumClaimSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileSalaryMinimumClaimSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ProfileSalaryMinimumClaim = zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.object({
|
||||
"amount": zod.int().min(profileSalaryMinimumClaimValueOneAmountMin).max(profileSalaryMinimumClaimValueOneAmountMax).multipleOf(profileSalaryMinimumClaimValueOneAmountMultipleOf).describe('Amount of money in whole rubles. A salary bound is positive and a multiple of 1000, the step that PRD FR13 sets for the bounds of a salary range and for the bids of the sealed final.'),
|
||||
"currency": zod.enum(['RUB']).describe('ISO 4217 currency code. The MVP accepts only RUB; adding a value is a contract change.'),
|
||||
"period": zod.enum(['month']).describe('Pay period of a salary amount. The MVP uses only `month`; adding a value is a contract change.'),
|
||||
"tax_basis": zod.enum(['net', 'gross']).describe('Tax basis of a salary amount: `net`, the amount paid out after personal income tax, or `gross`, the amount before it. The basis is always explicit; amounts in different bases are never compared directly.')
|
||||
}).describe('The lowest salary that the candidate accepts, in whole rubles with its base: the currency, the pay period, and the tax basis. It is private to the candidate: no organization reads it, and the invitation only shows a compatibility indicator that the server derives from it. It is personal data. The amount is a positive multiple of 1000.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileSalaryMinimumClaimSourceOneTrustLevelMin).max(profileSalaryMinimumClaimSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileSalaryMinimumClaimSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileSalaryMinimumClaimSourceOneExtractionVersionOneMax).regex(profileSalaryMinimumClaimSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Lowest acceptable salary with its confirmation state and provenance. It is personal data that no organization reads. `value` and `source` are null exactly when `status` is `unknown`; the server never substitutes zero or a market estimate.')
|
||||
|
||||
export type ProfileSalaryMinimumClaim = zod.input<typeof ProfileSalaryMinimumClaim>;
|
||||
export type ProfileSalaryMinimumClaimOutput = zod.output<typeof ProfileSalaryMinimumClaim>;
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileSalaryMinimumInputValueAmountMin = 1000;
|
||||
export const profileSalaryMinimumInputValueAmountMax = 100000000;
|
||||
export const profileSalaryMinimumInputValueAmountMultipleOf = 1000;
|
||||
|
||||
|
||||
export const ProfileSalaryMinimumInput = zod.object({
|
||||
"value": zod.object({
|
||||
"amount": zod.int().min(profileSalaryMinimumInputValueAmountMin).max(profileSalaryMinimumInputValueAmountMax).multipleOf(profileSalaryMinimumInputValueAmountMultipleOf).describe('Amount of money in whole rubles. A salary bound is positive and a multiple of 1000, the step that PRD FR13 sets for the bounds of a salary range and for the bids of the sealed final.'),
|
||||
"currency": zod.enum(['RUB']).describe('ISO 4217 currency code. The MVP accepts only RUB; adding a value is a contract change.'),
|
||||
"period": zod.enum(['month']).describe('Pay period of a salary amount. The MVP uses only `month`; adding a value is a contract change.'),
|
||||
"tax_basis": zod.enum(['net', 'gross']).describe('Tax basis of a salary amount: `net`, the amount paid out after personal income tax, or `gross`, the amount before it. The basis is always explicit; amounts in different bases are never compared directly.')
|
||||
}).describe('The lowest salary that the candidate accepts, in whole rubles with its base: the currency, the pay period, and the tax basis. It is private to the candidate: no organization reads it, and the invitation only shows a compatibility indicator that the server derives from it. It is personal data. The amount is a positive multiple of 1000.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the lowest salary in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.')
|
||||
|
||||
export type ProfileSalaryMinimumInput = zod.input<typeof ProfileSalaryMinimumInput>;
|
||||
export type ProfileSalaryMinimumInputOutput = zod.output<typeof ProfileSalaryMinimumInput>;
|
||||
@@ -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 ProfileSoftSkillMax = 50;
|
||||
|
||||
|
||||
export const ProfileSoftSkillRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const ProfileSoftSkill = zod.string().min(1).max(ProfileSoftSkillMax).regex(ProfileSoftSkillRegExp).describe('Soft skill as the candidate wrote it, for example "Mentoring" or "Negotiation". The platform has no soft skill taxonomy, so the text is free; it never changes a category or a grade. It has no leading or trailing whitespace and no line breaks. The server compares skills without regard to letter case. Plain text; clients show it as text, never as HTML.')
|
||||
|
||||
export type ProfileSoftSkill = zod.input<typeof ProfileSoftSkill>;
|
||||
export type ProfileSoftSkillOutput = zod.output<typeof ProfileSoftSkill>;
|
||||
@@ -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 profileSoftSkillItemSkillMax = 50;
|
||||
|
||||
|
||||
export const profileSoftSkillItemSkillRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const profileSoftSkillItemSourceTrustLevelMin = 0;
|
||||
export const profileSoftSkillItemSourceTrustLevelMax = 0;
|
||||
|
||||
export const profileSoftSkillItemSourceQuoteOneMax = 300;
|
||||
|
||||
export const profileSoftSkillItemSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileSoftSkillItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ProfileSoftSkillItem = zod.object({
|
||||
"skill": zod.string().min(1).max(profileSoftSkillItemSkillMax).regex(profileSoftSkillItemSkillRegExp).describe('Soft skill as the candidate wrote it, for example "Mentoring" or "Negotiation". The platform has no soft skill taxonomy, so the text is free; it never changes a category or a grade. It has no leading or trailing whitespace and no line breaks. The server compares skills without regard to letter case. Plain text; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileSoftSkillItemSourceTrustLevelMin).max(profileSoftSkillItemSourceTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileSoftSkillItemSourceQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileSoftSkillItemSourceExtractionVersionOneMax).regex(profileSoftSkillItemSourceExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.')
|
||||
}).describe('One soft skill of the candidate with its confirmation state and provenance. It is a claim; no assessment checks it.')
|
||||
|
||||
export type ProfileSoftSkillItem = zod.input<typeof ProfileSoftSkillItem>;
|
||||
export type ProfileSoftSkillItemOutput = zod.output<typeof ProfileSoftSkillItem>;
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileSoftSkillItemInputSkillMax = 50;
|
||||
|
||||
|
||||
export const profileSoftSkillItemInputSkillRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const ProfileSoftSkillItemInput = zod.object({
|
||||
"skill": zod.string().min(1).max(profileSoftSkillItemInputSkillMax).regex(profileSoftSkillItemInputSkillRegExp).describe('Soft skill as the candidate wrote it, for example "Mentoring" or "Negotiation". The platform has no soft skill taxonomy, so the text is free; it never changes a category or a grade. It has no leading or trailing whitespace and no line breaks. The server compares skills without regard to letter case. Plain text; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about one soft skill in a request; see CandidateProfileUpdate for the rules of `status`.')
|
||||
|
||||
export type ProfileSoftSkillItemInput = zod.input<typeof ProfileSoftSkillItemInput>;
|
||||
export type ProfileSoftSkillItemInputOutput = zod.output<typeof ProfileSoftSkillItemInput>;
|
||||
@@ -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 profileStackItemTagMax = 50;
|
||||
|
||||
|
||||
export const profileStackItemTagRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const profileStackItemSourceTrustLevelMin = 0;
|
||||
export const profileStackItemSourceTrustLevelMax = 0;
|
||||
|
||||
export const profileStackItemSourceQuoteOneMax = 300;
|
||||
|
||||
export const profileStackItemSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileStackItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ProfileStackItem = zod.object({
|
||||
"tag": zod.string().min(1).max(profileStackItemTagMax).regex(profileStackItemTagRegExp).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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileStackItemSourceTrustLevelMin).max(profileStackItemSourceTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileStackItemSourceQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileStackItemSourceExtractionVersionOneMax).regex(profileStackItemSourceExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.')
|
||||
}).describe('One technology tag of the candidate\'s stack with its confirmation state and provenance. The profile stack is one list for the whole profile; the questionnaire holds the tags of each chosen specialization with the same `StackTag` meaning, and the two lists are independent: the server never copies one into the other. A tag is a descriptive attribute and never forms a category.')
|
||||
|
||||
export type ProfileStackItem = zod.input<typeof ProfileStackItem>;
|
||||
export type ProfileStackItemOutput = zod.output<typeof ProfileStackItem>;
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileStackItemInputTagMax = 50;
|
||||
|
||||
|
||||
export const profileStackItemInputTagRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const ProfileStackItemInput = zod.object({
|
||||
"tag": zod.string().min(1).max(profileStackItemInputTagMax).regex(profileStackItemInputTagRegExp).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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about one stack tag in a request; see CandidateProfileUpdate for the rules of `status`.')
|
||||
|
||||
export type ProfileStackItemInput = zod.input<typeof ProfileStackItemInput>;
|
||||
export type ProfileStackItemInputOutput = zod.output<typeof ProfileStackItemInput>;
|
||||
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileTelegramClaimValueOneMin = 6;
|
||||
export const profileTelegramClaimValueOneMax = 33;
|
||||
|
||||
|
||||
export const profileTelegramClaimValueOneRegExp = new RegExp('^@[A-Za-z0-9_]{5,32}$');
|
||||
export const profileTelegramClaimSourceOneTrustLevelMin = 0;
|
||||
export const profileTelegramClaimSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const profileTelegramClaimSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const profileTelegramClaimSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileTelegramClaimSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ProfileTelegramClaim = zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.string().min(profileTelegramClaimValueOneMin).max(profileTelegramClaimValueOneMax).regex(profileTelegramClaimValueOneRegExp).describe('Telegram username with the leading @.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileTelegramClaimSourceOneTrustLevelMin).max(profileTelegramClaimSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileTelegramClaimSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileTelegramClaimSourceOneExtractionVersionOneMax).regex(profileTelegramClaimSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Telegram username of the candidate with its confirmation state and provenance. It is personal data, stored with the leading @ of the contact disclosure. `value` and `source` are null exactly when `status` is `unknown`.')
|
||||
|
||||
export type ProfileTelegramClaim = zod.input<typeof ProfileTelegramClaim>;
|
||||
export type ProfileTelegramClaimOutput = zod.output<typeof ProfileTelegramClaim>;
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileTelegramInputValueMin = 6;
|
||||
export const profileTelegramInputValueMax = 33;
|
||||
|
||||
|
||||
export const profileTelegramInputValueRegExp = new RegExp('^@[A-Za-z0-9_]{5,32}$');
|
||||
|
||||
export const ProfileTelegramInput = zod.object({
|
||||
"value": zod.string().min(profileTelegramInputValueMin).max(profileTelegramInputValueMax).regex(profileTelegramInputValueRegExp).describe('Telegram username with the leading @.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the Telegram username in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.')
|
||||
|
||||
export type ProfileTelegramInput = zod.input<typeof ProfileTelegramInput>;
|
||||
export type ProfileTelegramInputOutput = zod.output<typeof ProfileTelegramInput>;
|
||||
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileTermsLocationValueOneMax = 100;
|
||||
|
||||
|
||||
export const profileTermsLocationValueOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const profileTermsLocationSourceOneTrustLevelMin = 0;
|
||||
export const profileTermsLocationSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const profileTermsLocationSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const profileTermsLocationSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileTermsLocationSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const profileTermsRelocationSourceOneTrustLevelMin = 0;
|
||||
export const profileTermsRelocationSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const profileTermsRelocationSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const profileTermsRelocationSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileTermsRelocationSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const profileTermsSalaryMinimumValueOneAmountMin = 1000;
|
||||
export const profileTermsSalaryMinimumValueOneAmountMax = 100000000;
|
||||
export const profileTermsSalaryMinimumValueOneAmountMultipleOf = 1000;
|
||||
|
||||
export const profileTermsSalaryMinimumSourceOneTrustLevelMin = 0;
|
||||
export const profileTermsSalaryMinimumSourceOneTrustLevelMax = 0;
|
||||
|
||||
export const profileTermsSalaryMinimumSourceOneQuoteOneMax = 300;
|
||||
|
||||
export const profileTermsSalaryMinimumSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const profileTermsSalaryMinimumSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ProfileTerms = zod.object({
|
||||
"location": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.string().min(1).max(profileTermsLocationValueOneMax).regex(profileTermsLocationValueOneRegExp).describe('City or region where the candidate lives or wants to work, as free text. It is personal data of the candidate and never a street address. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileTermsLocationSourceOneTrustLevelMin).max(profileTermsLocationSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileTermsLocationSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileTermsLocationSourceOneExtractionVersionOneMax).regex(profileTermsLocationSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Place of the candidate with its confirmation state and provenance. It is personal data. `value` and `source` are null exactly when `status` is `unknown`.'),
|
||||
"relocation": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.boolean().nullable(),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileTermsRelocationSourceOneTrustLevelMin).max(profileTermsRelocationSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileTermsRelocationSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileTermsRelocationSourceOneExtractionVersionOneMax).regex(profileTermsRelocationSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Whether the candidate is ready to relocate, with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`; the server never assumes an answer.'),
|
||||
"salary_minimum": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of a single profile field.\n\n- confirmed: the candidate typed the value or confirmed a suggestion.\n- extracted: the server proposed the value from an imported document or source and the candidate has not confirmed it. It is a claim of trust level 0.\n- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a zero salary or a relocation answer.'),
|
||||
"value": zod.union([zod.object({
|
||||
"amount": zod.int().min(profileTermsSalaryMinimumValueOneAmountMin).max(profileTermsSalaryMinimumValueOneAmountMax).multipleOf(profileTermsSalaryMinimumValueOneAmountMultipleOf).describe('Amount of money in whole rubles. A salary bound is positive and a multiple of 1000, the step that PRD FR13 sets for the bounds of a salary range and for the bids of the sealed final.'),
|
||||
"currency": zod.enum(['RUB']).describe('ISO 4217 currency code. The MVP accepts only RUB; adding a value is a contract change.'),
|
||||
"period": zod.enum(['month']).describe('Pay period of a salary amount. The MVP uses only `month`; adding a value is a contract change.'),
|
||||
"tax_basis": zod.enum(['net', 'gross']).describe('Tax basis of a salary amount: `net`, the amount paid out after personal income tax, or `gross`, the amount before it. The basis is always explicit; amounts in different bases are never compared directly.')
|
||||
}).describe('The lowest salary that the candidate accepts, in whole rubles with its base: the currency, the pay period, and the tax basis. It is private to the candidate: no organization reads it, and the invitation only shows a compatibility indicator that the server derives from it. It is personal data. The amount is a positive multiple of 1000.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_resume', 'imported']).describe('Where the value of a profile field or item came from. The server sets it; a request never sends it.\n\n- manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.\n- extracted_from_resume: planned; the server extracted the value from an uploaded resume with the deterministic rules or the ML service. No MVP operation produces it, and no profile requires a resume.\n- imported: planned; the value was copied from an external source such as the FSP account of the candidate. No MVP operation produces it, and no profile requires such a link.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"trust_level": zod.int().min(profileTermsSalaryMinimumSourceOneTrustLevelMin).max(profileTermsSalaryMinimumSourceOneTrustLevelMax).describe('Trust level of a profile claim. Every claim of the profile has trust level 0, whatever its origin: a manual value, an imported value, and a value that the candidate confirmed are all unverified statements. Confirming a suggestion changes its status, never its trust level. Higher levels belong to evidence, such as an assessment result or a confirmation by a third party, which are separate resources and never write a level into a profile claim.'),
|
||||
"quote": zod.union([zod.string().min(1).max(profileTermsSalaryMinimumSourceOneQuoteOneMax).describe('Exact excerpt of the imported document that the value was extracted from, so the candidate can check it. It may contain personal data of the candidate. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the imported document that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(profileTermsSalaryMinimumSourceOneExtractionVersionOneMax).regex(profileTermsSalaryMinimumSourceOneExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.'),
|
||||
"confirmed_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 the candidate typed or confirmed the value, or null while the value is an unconfirmed suggestion.')
|
||||
}).describe('Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the server derives it and a request cannot set it. The imported document or source itself is not referenced: the profile never requires a file, the ML service, or an FSP account, and a later link to them is an additive field.'),zod.null()])
|
||||
}).describe('Lowest acceptable salary with its confirmation state and provenance. It is personal data that no organization reads. `value` and `source` are null exactly when `status` is `unknown`; the server never substitutes zero or a market estimate.')
|
||||
}).describe('Conditions that the candidate wants: the place, readiness to relocate, and the lowest salary. Acceptable work formats are not repeated here; they are the `work_formats` of the questionnaire `WorkContext`, the only place that holds them. These are the candidate\'s wishes, never the terms of an invitation, which an organization offers and which the invitation contract describes.')
|
||||
|
||||
export type ProfileTerms = zod.input<typeof ProfileTerms>;
|
||||
export type ProfileTermsOutput = zod.output<typeof ProfileTerms>;
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const profileTermsInputLocationOneValueMax = 100;
|
||||
|
||||
|
||||
export const profileTermsInputLocationOneValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const profileTermsInputSalaryMinimumOneValueAmountMin = 1000;
|
||||
export const profileTermsInputSalaryMinimumOneValueAmountMax = 100000000;
|
||||
export const profileTermsInputSalaryMinimumOneValueAmountMultipleOf = 1000;
|
||||
|
||||
|
||||
export const ProfileTermsInput = zod.object({
|
||||
"location": zod.union([zod.object({
|
||||
"value": zod.string().min(1).max(profileTermsInputLocationOneValueMax).regex(profileTermsInputLocationOneValueRegExp).describe('City or region where the candidate lives or wants to work, as free text. It is personal data of the candidate and never a street address. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the place in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()]),
|
||||
"relocation": zod.union([zod.object({
|
||||
"value": zod.boolean(),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about readiness to relocate in a request; see CandidateProfileUpdate for the rules of `status`.'),zod.null()]),
|
||||
"salary_minimum": zod.union([zod.object({
|
||||
"value": zod.object({
|
||||
"amount": zod.int().min(profileTermsInputSalaryMinimumOneValueAmountMin).max(profileTermsInputSalaryMinimumOneValueAmountMax).multipleOf(profileTermsInputSalaryMinimumOneValueAmountMultipleOf).describe('Amount of money in whole rubles. A salary bound is positive and a multiple of 1000, the step that PRD FR13 sets for the bounds of a salary range and for the bids of the sealed final.'),
|
||||
"currency": zod.enum(['RUB']).describe('ISO 4217 currency code. The MVP accepts only RUB; adding a value is a contract change.'),
|
||||
"period": zod.enum(['month']).describe('Pay period of a salary amount. The MVP uses only `month`; adding a value is a contract change.'),
|
||||
"tax_basis": zod.enum(['net', 'gross']).describe('Tax basis of a salary amount: `net`, the amount paid out after personal income tax, or `gross`, the amount before it. The basis is always explicit; amounts in different bases are never compared directly.')
|
||||
}).describe('The lowest salary that the candidate accepts, in whole rubles with its base: the currency, the pay period, and the tax basis. It is private to the candidate: no organization reads it, and the invitation only shows a compatibility indicator that the server derives from it. It is personal data. The amount is a positive multiple of 1000.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the lowest salary in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()])
|
||||
}).describe('Decisions about the desired terms in a request. A field sent as null is unknown: it is removed if it was set.')
|
||||
|
||||
export type ProfileTermsInput = zod.input<typeof ProfileTermsInput>;
|
||||
export type ProfileTermsInputOutput = zod.output<typeof ProfileTermsInput>;
|
||||
@@ -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 ProfileVersionMin = 0;
|
||||
|
||||
|
||||
export const ProfileVersion = zod.int().min(ProfileVersionMin).describe('Version of the candidate profile. A candidate who has not saved the profile has version 0; every save that changes the profile advances it by one. The client sends the version it read as `expected_version`.')
|
||||
|
||||
export type ProfileVersion = zod.input<typeof ProfileVersion>;
|
||||
export type ProfileVersionOutput = zod.output<typeof ProfileVersion>;
|
||||
@@ -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 ProfileYearMonthMin = 7;
|
||||
export const ProfileYearMonthMax = 7;
|
||||
|
||||
|
||||
export const ProfileYearMonthRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
|
||||
|
||||
export const ProfileYearMonth = zod.string().min(ProfileYearMonthMin).max(ProfileYearMonthMax).regex(ProfileYearMonthRegExp).describe('Calendar month in the `YYYY-MM` format, for example 2024-03. An experience period has month precision only, so the contract holds no exact date of employment. The server rejects a month that lies in the future.')
|
||||
|
||||
export type ProfileYearMonth = zod.input<typeof ProfileYearMonth>;
|
||||
export type ProfileYearMonthOutput = zod.output<typeof ProfileYearMonth>;
|
||||
@@ -29,8 +29,8 @@ export const QuestionnaireSpecialization = zod.object({
|
||||
"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.')
|
||||
}).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. The work history entries of the candidate profile (`ProfileExperienceItem`) are a different, detailed claim: the two are saved separately and the server neither adds the entries up nor fills them from these totals.'),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. The candidate profile states the same kind of claim in the `roles` of `CandidateProfile` (`ProfileRoleItem.self_assessed_grade`): the questionnaire value starts the assessment and the profile value is what the profile shows, the two are saved separately, and neither is ever a confirmed grade.')
|
||||
|
||||
export type QuestionnaireSpecialization = zod.input<typeof QuestionnaireSpecialization>;
|
||||
export type QuestionnaireSpecializationOutput = zod.output<typeof QuestionnaireSpecialization>;
|
||||
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const saveMyProfileBodyExpectedVersionMin = 0;
|
||||
|
||||
export const saveMyProfileBodyFullNameOneValueMax = 200;
|
||||
|
||||
|
||||
export const saveMyProfileBodyFullNameOneValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const saveMyProfileBodyContactsEmailOneValueMin = 3;
|
||||
export const saveMyProfileBodyContactsEmailOneValueMax = 254;
|
||||
|
||||
export const saveMyProfileBodyContactsPhoneOneValueMin = 8;
|
||||
export const saveMyProfileBodyContactsPhoneOneValueMax = 16;
|
||||
|
||||
|
||||
export const saveMyProfileBodyContactsPhoneOneValueRegExp = new RegExp('^\\+[1-9][0-9]{6,14}$');
|
||||
export const saveMyProfileBodyContactsTelegramOneValueMin = 6;
|
||||
export const saveMyProfileBodyContactsTelegramOneValueMax = 33;
|
||||
|
||||
|
||||
export const saveMyProfileBodyContactsTelegramOneValueRegExp = new RegExp('^@[A-Za-z0-9_]{5,32}$');
|
||||
export const saveMyProfileBodyStackItemTagMax = 50;
|
||||
|
||||
|
||||
export const saveMyProfileBodyStackItemTagRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const saveMyProfileBodyStackMax = 30;
|
||||
|
||||
export const saveMyProfileBodyRolesMax = 9;
|
||||
|
||||
export const saveMyProfileBodyExperienceItemEmployerNameOneMax = 200;
|
||||
|
||||
|
||||
export const saveMyProfileBodyExperienceItemEmployerNameOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const saveMyProfileBodyExperienceItemStartedOnMin = 7;
|
||||
export const saveMyProfileBodyExperienceItemStartedOnMax = 7;
|
||||
|
||||
|
||||
export const saveMyProfileBodyExperienceItemStartedOnRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
|
||||
export const saveMyProfileBodyExperienceItemEndedOnOneMin = 7;
|
||||
export const saveMyProfileBodyExperienceItemEndedOnOneMax = 7;
|
||||
|
||||
|
||||
export const saveMyProfileBodyExperienceItemEndedOnOneRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
|
||||
export const saveMyProfileBodyExperienceItemSummaryOneMax = 1000;
|
||||
|
||||
export const saveMyProfileBodyExperienceMax = 20;
|
||||
|
||||
export const saveMyProfileBodySoftSkillsItemSkillMax = 50;
|
||||
|
||||
|
||||
export const saveMyProfileBodySoftSkillsItemSkillRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const saveMyProfileBodySoftSkillsMax = 10;
|
||||
|
||||
export const saveMyProfileBodyTermsLocationOneValueMax = 100;
|
||||
|
||||
|
||||
export const saveMyProfileBodyTermsLocationOneValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const saveMyProfileBodyTermsSalaryMinimumOneValueAmountMin = 1000;
|
||||
export const saveMyProfileBodyTermsSalaryMinimumOneValueAmountMax = 100000000;
|
||||
export const saveMyProfileBodyTermsSalaryMinimumOneValueAmountMultipleOf = 1000;
|
||||
|
||||
|
||||
export const SaveMyProfileBody = zod.object({
|
||||
"expected_version": zod.int().min(saveMyProfileBodyExpectedVersionMin).describe('Version of the candidate profile. A candidate who has not saved the profile has version 0; every save that changes the profile advances it by one. The client sends the version it read as `expected_version`.'),
|
||||
"full_name": zod.union([zod.object({
|
||||
"value": zod.string().min(1).max(saveMyProfileBodyFullNameOneValueMax).regex(saveMyProfileBodyFullNameOneValueRegExp).describe('Full name as the candidate wrote it in the profile. Plain text without line breaks; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the full name in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()]),
|
||||
"contacts": zod.object({
|
||||
"email": zod.union([zod.object({
|
||||
"value": zod.email().min(saveMyProfileBodyContactsEmailOneValueMin).max(saveMyProfileBodyContactsEmailOneValueMax).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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the contact email in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()]),
|
||||
"phone": zod.union([zod.object({
|
||||
"value": zod.string().min(saveMyProfileBodyContactsPhoneOneValueMin).max(saveMyProfileBodyContactsPhoneOneValueMax).regex(saveMyProfileBodyContactsPhoneOneValueRegExp).describe('Phone number in the E.164 format, for example +70000000000.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the contact phone number in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()]),
|
||||
"telegram": zod.union([zod.object({
|
||||
"value": zod.string().min(saveMyProfileBodyContactsTelegramOneValueMin).max(saveMyProfileBodyContactsTelegramOneValueMax).regex(saveMyProfileBodyContactsTelegramOneValueRegExp).describe('Telegram username with the leading @.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the Telegram username in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()])
|
||||
}).describe('Decisions about the contact channels in a request. A channel sent as null is unknown: it is removed if it was set.'),
|
||||
"stack": zod.array(zod.object({
|
||||
"tag": zod.string().min(1).max(saveMyProfileBodyStackItemTagMax).regex(saveMyProfileBodyStackItemTagRegExp).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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about one stack tag in a request; see CandidateProfileUpdate for the rules of `status`.')).max(saveMyProfileBodyStackMax).describe('Technology tags. The schema limits the count; the server also answers 400 with the pointer of a tag that repeats an earlier one without regard to letter case, for example `/stack/2/tag`.'),
|
||||
"roles": 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.union([zod.enum(['intern', 'junior', 'middle', 'senior']).describe('Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.'),zod.null()]).describe('Grade that the candidate claims, or null when the candidate names none.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about one role in a request; see CandidateProfileUpdate for the rules of `status`. The object has no confirmed grade and no category: unknown fields are rejected.')).max(saveMyProfileBodyRolesMax).describe('Roles. The server answers 400 with the pointer of a role whose specialization repeats an earlier one, for example `/roles/1/specialization`.'),
|
||||
"experience": zod.array(zod.object({
|
||||
"employer_name": zod.union([zod.string().min(1).max(saveMyProfileBodyExperienceItemEmployerNameOneMax).regex(saveMyProfileBodyExperienceItemEmployerNameOneRegExp).describe('Name of the employer in one experience entry, as the candidate wrote it. It is personal data of the candidate\'s career. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]),
|
||||
"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.'),
|
||||
"started_on": zod.string().min(saveMyProfileBodyExperienceItemStartedOnMin).max(saveMyProfileBodyExperienceItemStartedOnMax).regex(saveMyProfileBodyExperienceItemStartedOnRegExp).describe('Calendar month in the `YYYY-MM` format, for example 2024-03. An experience period has month precision only, so the contract holds no exact date of employment. The server rejects a month that lies in the future.'),
|
||||
"ended_on": zod.union([zod.string().min(saveMyProfileBodyExperienceItemEndedOnOneMin).max(saveMyProfileBodyExperienceItemEndedOnOneMax).regex(saveMyProfileBodyExperienceItemEndedOnOneRegExp).describe('Calendar month in the `YYYY-MM` format, for example 2024-03. An experience period has month precision only, so the contract holds no exact date of employment. The server rejects a month that lies in the future.'),zod.null()]),
|
||||
"summary": zod.union([zod.string().min(1).max(saveMyProfileBodyExperienceItemSummaryOneMax).describe('Tasks and results of the candidate in one experience entry. It describes the work rather than a job title. It may contain line breaks and personal data of the candidate; it must not contain personal data of other people. Plain text; clients show it as text, never as HTML.'),zod.null()]),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about one work history entry in a request; see CandidateProfileUpdate for the rules of `status`. The server also requires `ended_on` not to precede `started_on` and no month to lie in the future, and answers 400 with the pointer of the month.')).max(saveMyProfileBodyExperienceMax).describe('Work history entries.'),
|
||||
"soft_skills": zod.array(zod.object({
|
||||
"skill": zod.string().min(1).max(saveMyProfileBodySoftSkillsItemSkillMax).regex(saveMyProfileBodySoftSkillsItemSkillRegExp).describe('Soft skill as the candidate wrote it, for example "Mentoring" or "Negotiation". The platform has no soft skill taxonomy, so the text is free; it never changes a category or a grade. It has no leading or trailing whitespace and no line breaks. The server compares skills without regard to letter case. Plain text; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about one soft skill in a request; see CandidateProfileUpdate for the rules of `status`.')).max(saveMyProfileBodySoftSkillsMax).describe('Soft skills. The server answers 400 with the pointer of a skill that repeats an earlier one without regard to letter case.'),
|
||||
"terms": zod.object({
|
||||
"location": zod.union([zod.object({
|
||||
"value": zod.string().min(1).max(saveMyProfileBodyTermsLocationOneValueMax).regex(saveMyProfileBodyTermsLocationOneValueRegExp).describe('City or region where the candidate lives or wants to work, as free text. It is personal data of the candidate and never a street address. It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the place in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()]),
|
||||
"relocation": zod.union([zod.object({
|
||||
"value": zod.boolean(),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about readiness to relocate in a request; see CandidateProfileUpdate for the rules of `status`.'),zod.null()]),
|
||||
"salary_minimum": zod.union([zod.object({
|
||||
"value": zod.object({
|
||||
"amount": zod.int().min(saveMyProfileBodyTermsSalaryMinimumOneValueAmountMin).max(saveMyProfileBodyTermsSalaryMinimumOneValueAmountMax).multipleOf(saveMyProfileBodyTermsSalaryMinimumOneValueAmountMultipleOf).describe('Amount of money in whole rubles. A salary bound is positive and a multiple of 1000, the step that PRD FR13 sets for the bounds of a salary range and for the bids of the sealed final.'),
|
||||
"currency": zod.enum(['RUB']).describe('ISO 4217 currency code. The MVP accepts only RUB; adding a value is a contract change.'),
|
||||
"period": zod.enum(['month']).describe('Pay period of a salary amount. The MVP uses only `month`; adding a value is a contract change.'),
|
||||
"tax_basis": zod.enum(['net', 'gross']).describe('Tax basis of a salary amount: `net`, the amount paid out after personal income tax, or `gross`, the amount before it. The basis is always explicit; amounts in different bases are never compared directly.')
|
||||
}).describe('The lowest salary that the candidate accepts, in whole rubles with its base: the currency, the pay period, and the tax basis. It is private to the candidate: no organization reads it, and the invitation only shows a compatibility indicator that the server derives from it. It is personal data. The amount is a positive multiple of 1000.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a profile list item, and the decision that a request sends for a field or an item.\n\n- confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave the profile, for example into a disclosure.\n- extracted: a suggestion that the server took from an imported document or source. Nobody has confirmed it yet, so it is a claim of trust level 0 that no other feature uses.\n\nA request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is simply absent from the list.')
|
||||
}).describe('Decision about the lowest salary in a request; see CandidateProfileUpdate for the rules of `status`. The value is personal data.'),zod.null()])
|
||||
}).describe('Decisions about the desired terms in a request. A field sent as null is unknown: it is removed if it was set.')
|
||||
}).describe('Complete new state of the candidate profile. It replaces every stored value as a whole: a single field sent as null is unknown and is removed, and a list replaces the stored list. The body is personal data.\nEach value carries a decision `status`. `confirmed` sets a manual value or confirms a stored suggestion; confirming a suggestion with exactly its stored value keeps its origin and quote, and any other value makes the claim manual. `extracted` keeps a stored suggestion unconfirmed and is accepted only with exactly the stored value; any other use answers 400 with the pointer of that status, for example `/stack/1/status`. The provenance, the trust level, and the confirmed categories are not part of the request, and unknown fields are rejected, so a request can neither mark a claim as verified nor write a confirmed grade or a category.')
|
||||
|
||||
export type SaveMyProfileBody = zod.input<typeof SaveMyProfileBody>;
|
||||
export type SaveMyProfileBodyOutput = zod.output<typeof SaveMyProfileBody>;
|
||||
@@ -37,11 +37,11 @@ export const SaveMyQuestionnaireBody = zod.object({
|
||||
"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`.'),
|
||||
}).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. The work history entries of the candidate profile (`ProfileExperienceItem`) are a different, detailed claim: the two are saved separately and the server neither adds the entries up nor fills them from these totals.'),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. The candidate profile states the same kind of claim in the `roles` of `CandidateProfile` (`ProfileRoleItem.self_assessed_grade`): the questionnaire value starts the assessment and the profile value is what the profile shows, the two are saved separately, and neither is ever a confirmed grade.')).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('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 (`ProfileTerms`). The acceptable work formats live only here: the profile does not repeat them.')
|
||||
}).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>;
|
||||
|
||||
@@ -11,7 +11,7 @@ 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.')
|
||||
}).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 (`ProfileTerms`). The acceptable work formats live only here: the profile does not repeat them.')
|
||||
|
||||
export type WorkContext = zod.input<typeof WorkContext>;
|
||||
export type WorkContextOutput = zod.output<typeof WorkContext>;
|
||||
File renamed without changes.
@@ -7,6 +7,7 @@
|
||||
|
||||
export * from './consentTextVersion.zod';
|
||||
export * from './contactFieldKind.zod';
|
||||
export * from './contactFullName.zod';
|
||||
export * from './contactPhoneNumber.zod';
|
||||
export * from './contactTelegramUsername.zod';
|
||||
export * from './currencyCode.zod';
|
||||
@@ -16,6 +17,7 @@ export * from './invitationTermsVersion.zod';
|
||||
export * from './needLocationName.zod';
|
||||
export * from './needTaskText.zod';
|
||||
export * from './needVersion.zod';
|
||||
export * from './needVersionLabel.zod';
|
||||
export * from './pageInfo.zod';
|
||||
export * from './problem.zod';
|
||||
export * from './problemCode.zod';
|
||||
|
||||
@@ -18,7 +18,6 @@ export * from './contactConsentAcceptance.zod';
|
||||
export * from './contactConsentOffer.zod';
|
||||
export * from './contactConsentText.zod';
|
||||
export * from './contactDisclosure.zod';
|
||||
export * from './contactFullName.zod';
|
||||
export * from './contactGrant.zod';
|
||||
export * from './contactGrantState.zod';
|
||||
export * from './contactRevocationReason.zod';
|
||||
|
||||
@@ -48,7 +48,6 @@ export * from './needUpdate.zod';
|
||||
export * from './needValueOrigin.zod';
|
||||
export * from './needValueSource.zod';
|
||||
export * from './needValueStatus.zod';
|
||||
export * from './needVersionLabel.zod';
|
||||
export * from './needWorkFormats.zod';
|
||||
export * from './needWorkFormatsInput.zod';
|
||||
export * from './skillTaxonomyCode.zod';
|
||||
|
||||
Reference in new issue
Block a user