feat(profile): persist candidate edits and enforce company access

This commit is contained in:
TakuyaYagam1 committed 2026-10-07 14:15:16 +03:00
1 parent 3ab6bd91a3
commit 73c7caa225
67 files changed
+5286 -229

No files matched your search

@@ -46,13 +46,13 @@ export const getGetMyProfileResponseProfileClaimSourceMock = (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 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,])}})), experience_overlaps: Array.from({ length: faker.number.int({min: 1, max: 190}) }, (_, i) => i + 1).map(() => ({first_index: faker.number.int({min: 0, max: 19}), second_index: faker.number.int({min: 1, max: 19}), status: faker.helpers.arrayElement(['needs_confirmation','confirmed'] as const)})), 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.aLine 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 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,])}})), experience_overlaps: Array.from({ length: faker.number.int({min: 1, max: 190}) }, (_, i) => i + 1).map(() => ({first_index: faker.number.int({min: 0, max: 19}), second_index: faker.number.int({min: 1, max: 19}), status: faker.helpers.arrayElement(['needs_confirmation','confirmed'] as const)})), 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.strLine truncated
export const getGetMyQuestionnaireMockHandler = (overrideResponse?: CandidateQuestionnaire | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<CandidateQuestionnaire> | CandidateQuestionnaire), options?: RequestHandlerOptions) => {
@@ -270,6 +270,8 @@ export const useSaveMyQuestionnaire = <TError = ErrorType<Problem>,
*
* 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.
*
* `experience_overlaps` lists every pair of entries whose inclusive month ranges overlap. Its indices refer to this response's `experience` array and are scoped to the same `version`; each pair is either `needs_confirmation` or `confirmed`.
*
* 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.
*/
@@ -373,7 +375,7 @@ export const getSaveMyProfileUrl = () => {
/**
* 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.
* 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. A successful save advances an account whose current onboarding step is candidate_profile to candidate_questionnaire, including a no-op save; it never moves a later step backwards. This update is atomic with the profile and its history.
*
* 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.
*
@@ -383,7 +385,9 @@ export const getSaveMyProfileUrl = () => {
*
* 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.
* Experience periods use inclusive calendar months. An overlap is allowed only when `confirmed_parallel_periods` explicitly acknowledges that the two date ranges are genuine parallel work. Each acknowledgement names two distinct experience indices and repeats their exact normalized `started_on` and `ended_on` values; both indices and periods must match the submitted array and `expected_version`. A new or changed period needs an acknowledgement in that PUT. The server carries an earlier acknowledgement only when the same two indices still contain the same dates; reordering or changing either date requires a new acknowledgement. Editing other experience fields does not invalidate a matching date-pair acknowledgement. A missing acknowledgement answers 400 with pointers to the period fields and changes nothing. Duplicate, out-of-range, self, and non-overlapping acknowledgements are invalid.
*
* 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, a changed overlap without explicit confirmation, 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> => {
@@ -274,14 +274,12 @@ export const useCreateOrganization = <TError = ErrorType<Problem>,
}
/**
* Requires the session cookie of an employer account with an active membership in `org_id`. The organization comes from the path and is checked against the membership that the server holds for the session account on every request; the identifier itself grants nothing.
* Requires the session cookie of a verified employer account with an active owner membership in `org_id`. The organization comes from the path and is checked against the membership that the server holds for the session account on every request; the identifier itself grants nothing.
*
* Returns the profile with its current `version`, the verification level (`verification`), and the card as a candidate sees it (`candidate_card`). The verification level is always the one the server holds: it never rises because the profile is complete, because the organization has members, or because of an email domain. The role of the caller is not part of this resource; ListMyOrganizations returns it with the membership.
*
* In the MVP the profile is readable by any active member; every member is an owner, because the operations that add members are planned. The roles of PRD FR07 that read a company card without managing it change no field of this contract.
*
* Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate account answers 403 forbidden; an account without an active membership in the organization, including a `suspended`, `removed`, or `left` one, and an unknown organization all answer 404 not_found, so organizations cannot be enumerated. A malformed `org_id` answers 400 validation_failed with the path pointer.
* @summary Read an organization of which the caller is a member.
* Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate account answers 403 forbidden; an account without an active membership in the organization, including a `suspended`, `removed`, or `left` one, and an unknown organization all answer 404 not_found, so organizations cannot be enumerated. An active member whose role is not `owner` answers 403 forbidden. A malformed `org_id` answers 400 validation_failed with the path pointer.
* @summary Read an organization managed by the caller.
*/
export const getOrganization = async (orgId: string, options?: Parameters<typeof apiRequest>[1]): Promise<Organization> => {
@@ -352,7 +350,7 @@ export function useGetOrganization<TData = Awaited<ReturnType<typeof getOrganiza
, queryClient?: QueryClient
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
/**
* @summary Read an organization of which the caller is a member.
* @summary Read an organization managed by the caller.
*/
export function useGetOrganization<TData = Awaited<ReturnType<typeof getOrganization>>, TError = ErrorType<Problem>>(
@@ -64,6 +64,7 @@ const validUpdate = {
status: "confirmed",
},
],
confirmed_parallel_periods: [],
soft_skills: [{ skill: "Mentoring", status: "confirmed" }],
terms: {
location: { value: "Kazan", status: "confirmed" },
@@ -82,6 +83,7 @@ const emptyUpdate = {
stack: [],
roles: [],
experience: [],
confirmed_parallel_periods: [],
soft_skills: [],
terms: { location: null, relocation: null, salary_minimum: null },
};
@@ -104,6 +106,7 @@ const profile = {
},
],
experience: [],
experience_overlaps: [],
soft_skills: [],
terms: { location: unknownClaim, relocation: unknownClaim, salary_minimum: unknownClaim },
confirmed_categories: [
@@ -306,6 +309,7 @@ describe("generated CandidateProfile", () => {
stack: [],
roles: [],
experience: [],
experience_overlaps: [],
soft_skills: [],
terms: { location: unknownClaim, relocation: unknownClaim, salary_minimum: unknownClaim },
confirmed_categories: [],
@@ -329,6 +333,7 @@ it("exposes the profile DTOs without a confirmed grade or a category in requests
expectTypeOf<CandidateProfileUpdate>().not.toHaveProperty("confirmed_categories");
expectTypeOf<CandidateProfileUpdate>().not.toHaveProperty("version");
expectTypeOf<CandidateProfileUpdate>().toHaveProperty("confirmed_parallel_periods");
expectTypeOf<UpdateRole>().not.toHaveProperty("confirmed_grade");
expectTypeOf<UpdateRole>().not.toHaveProperty("category");
expectTypeOf<UpdateRole>().not.toHaveProperty("source");
@@ -336,6 +341,7 @@ it("exposes the profile DTOs without a confirmed grade or a category in requests
expectTypeOf<ProfileRoleItem>().not.toHaveProperty("confirmed_grade");
expectTypeOf<ProfileRoleItem>().not.toHaveProperty("category");
expectTypeOf<CandidateProfile>().toHaveProperty("confirmed_categories");
expectTypeOf<CandidateProfile>().toHaveProperty("experience_overlaps");
expectTypeOf(saveMyProfile).parameter(0).toEqualTypeOf<CandidateProfileUpdate>();
});
@@ -114,6 +114,13 @@ export const candidateProfileExperienceItemSourceExtractionVersionOneMax = 64;
export const candidateProfileExperienceItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
export const candidateProfileExperienceMax = 20;
export const candidateProfileExperienceOverlapsItemFirstIndexMin = 0;
export const candidateProfileExperienceOverlapsItemFirstIndexMax = 19;
export const candidateProfileExperienceOverlapsItemSecondIndexMax = 19;
export const candidateProfileExperienceOverlapsMax = 190;
export const candidateProfileSoftSkillsItemSkillMax = 50;
@@ -253,6 +260,11 @@ export const CandidateProfile = zod.object({
"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.'),
"experience_overlaps": zod.array(zod.object({
"first_index": zod.int().min(candidateProfileExperienceOverlapsItemFirstIndexMin).max(candidateProfileExperienceOverlapsItemFirstIndexMax),
"second_index": zod.int().min(1).max(candidateProfileExperienceOverlapsItemSecondIndexMax),
"status": zod.enum(['needs_confirmation', 'confirmed']).describe('Whether the candidate confirmed that two overlapping periods are genuine parallel work.')
}).describe('One pair of work history entries whose inclusive month ranges overlap. The indices refer to the experience array in this profile version. `confirmed` records an explicit acknowledgement for this pair of dates; otherwise the pair needs confirmation before a changed profile can be saved.')).max(candidateProfileExperienceOverlapsMax).describe('Every pair of overlapping experience periods, with its confirmation status. The indices refer to this version\'s experience array.'),
"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.'),
@@ -51,6 +51,33 @@ export const candidateProfileUpdateExperienceItemSummaryOneMax = 1000;
export const candidateProfileUpdateExperienceMax = 20;
export const candidateProfileUpdateConfirmedParallelPeriodsItemFirstIndexMin = 0;
export const candidateProfileUpdateConfirmedParallelPeriodsItemFirstIndexMax = 19;
export const candidateProfileUpdateConfirmedParallelPeriodsItemSecondIndexMax = 19;
export const candidateProfileUpdateConfirmedParallelPeriodsItemFirstPeriodStartedOnMin = 7;
export const candidateProfileUpdateConfirmedParallelPeriodsItemFirstPeriodStartedOnMax = 7;
export const candidateProfileUpdateConfirmedParallelPeriodsItemFirstPeriodStartedOnRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
export const candidateProfileUpdateConfirmedParallelPeriodsItemFirstPeriodEndedOnOneMin = 7;
export const candidateProfileUpdateConfirmedParallelPeriodsItemFirstPeriodEndedOnOneMax = 7;
export const candidateProfileUpdateConfirmedParallelPeriodsItemFirstPeriodEndedOnOneRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
export const candidateProfileUpdateConfirmedParallelPeriodsItemSecondPeriodStartedOnMin = 7;
export const candidateProfileUpdateConfirmedParallelPeriodsItemSecondPeriodStartedOnMax = 7;
export const candidateProfileUpdateConfirmedParallelPeriodsItemSecondPeriodStartedOnRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
export const candidateProfileUpdateConfirmedParallelPeriodsItemSecondPeriodEndedOnOneMin = 7;
export const candidateProfileUpdateConfirmedParallelPeriodsItemSecondPeriodEndedOnOneMax = 7;
export const candidateProfileUpdateConfirmedParallelPeriodsItemSecondPeriodEndedOnOneRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
export const candidateProfileUpdateConfirmedParallelPeriodsMax = 190;
export const candidateProfileUpdateSoftSkillsItemSkillMax = 50;
@@ -103,6 +130,18 @@ export const CandidateProfileUpdate = zod.object({
"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.'),
"confirmed_parallel_periods": zod.array(zod.object({
"first_index": zod.int().min(candidateProfileUpdateConfirmedParallelPeriodsItemFirstIndexMin).max(candidateProfileUpdateConfirmedParallelPeriodsItemFirstIndexMax),
"second_index": zod.int().min(1).max(candidateProfileUpdateConfirmedParallelPeriodsItemSecondIndexMax),
"first_period": zod.object({
"started_on": zod.string().min(candidateProfileUpdateConfirmedParallelPeriodsItemFirstPeriodStartedOnMin).max(candidateProfileUpdateConfirmedParallelPeriodsItemFirstPeriodStartedOnMax).regex(candidateProfileUpdateConfirmedParallelPeriodsItemFirstPeriodStartedOnRegExp).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(candidateProfileUpdateConfirmedParallelPeriodsItemFirstPeriodEndedOnOneMin).max(candidateProfileUpdateConfirmedParallelPeriodsItemFirstPeriodEndedOnOneMax).regex(candidateProfileUpdateConfirmedParallelPeriodsItemFirstPeriodEndedOnOneRegExp).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 work, or null when the period is open-ended.')
}).describe('The exact month range of an experience entry, copied into a confirmation.'),
"second_period": zod.object({
"started_on": zod.string().min(candidateProfileUpdateConfirmedParallelPeriodsItemSecondPeriodStartedOnMin).max(candidateProfileUpdateConfirmedParallelPeriodsItemSecondPeriodStartedOnMax).regex(candidateProfileUpdateConfirmedParallelPeriodsItemSecondPeriodStartedOnRegExp).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(candidateProfileUpdateConfirmedParallelPeriodsItemSecondPeriodEndedOnOneMin).max(candidateProfileUpdateConfirmedParallelPeriodsItemSecondPeriodEndedOnOneMax).regex(candidateProfileUpdateConfirmedParallelPeriodsItemSecondPeriodEndedOnOneRegExp).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 work, or null when the period is open-ended.')
}).describe('The exact month range of an experience entry, copied into a confirmation.')
}).describe('Explicit acknowledgement that the two indexed experience periods are genuine parallel work. The indices and exact ranges must match the submitted experience array; expected_version binds the acknowledgement to the profile version the candidate read.')).max(candidateProfileUpdateConfirmedParallelPeriodsMax).exactOptional().describe('Explicit acknowledgements for overlapping periods. Each pair must use distinct in-range indices and repeat the exact normalized started_on and ended_on values of those entries in this body. A changed or reordered period needs a new acknowledgement. The server retains a previous acknowledgement only for the same indices and dates. Duplicate pairs and pairs that do not overlap are rejected.'),
"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.')
@@ -23,6 +23,9 @@ export * from './profileEmailInput.zod';
export * from './profileEmployerName.zod';
export * from './profileExperienceItem.zod';
export * from './profileExperienceItemInput.zod';
export * from './profileExperienceOverlap.zod';
export * from './profileExperienceOverlapStatus.zod';
export * from './profileExperiencePeriod.zod';
export * from './profileExperienceSummary.zod';
export * from './profileFullNameClaim.zod';
export * from './profileFullNameInput.zod';
@@ -30,6 +33,7 @@ export * from './profileItemStatus.zod';
export * from './profileLocationClaim.zod';
export * from './profileLocationInput.zod';
export * from './profileLocationName.zod';
export * from './profileParallelPeriodConfirmation.zod';
export * from './profilePhoneClaim.zod';
export * from './profilePhoneInput.zod';
export * from './profileRelocationClaim.zod';
@@ -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 profileExperienceOverlapFirstIndexMin = 0;
export const profileExperienceOverlapFirstIndexMax = 19;
export const profileExperienceOverlapSecondIndexMax = 19;
export const ProfileExperienceOverlap = zod.object({
"first_index": zod.int().min(profileExperienceOverlapFirstIndexMin).max(profileExperienceOverlapFirstIndexMax),
"second_index": zod.int().min(1).max(profileExperienceOverlapSecondIndexMax),
"status": zod.enum(['needs_confirmation', 'confirmed']).describe('Whether the candidate confirmed that two overlapping periods are genuine parallel work.')
}).describe('One pair of work history entries whose inclusive month ranges overlap. The indices refer to the experience array in this profile version. `confirmed` records an explicit acknowledgement for this pair of dates; otherwise the pair needs confirmation before a changed profile can be saved.')
export type ProfileExperienceOverlap = zod.input<typeof ProfileExperienceOverlap>;
export type ProfileExperienceOverlapOutput = zod.output<typeof ProfileExperienceOverlap>;
@@ -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 ProfileExperienceOverlapStatus = zod.enum(['needs_confirmation', 'confirmed']).describe('Whether the candidate confirmed that two overlapping periods are genuine parallel work.')
export type ProfileExperienceOverlapStatus = zod.input<typeof ProfileExperienceOverlapStatus>;
export type ProfileExperienceOverlapStatusOutput = zod.output<typeof ProfileExperienceOverlapStatus>;
@@ -0,0 +1,26 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const profileExperiencePeriodStartedOnMin = 7;
export const profileExperiencePeriodStartedOnMax = 7;
export const profileExperiencePeriodStartedOnRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
export const profileExperiencePeriodEndedOnOneMin = 7;
export const profileExperiencePeriodEndedOnOneMax = 7;
export const profileExperiencePeriodEndedOnOneRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
export const ProfileExperiencePeriod = zod.object({
"started_on": zod.string().min(profileExperiencePeriodStartedOnMin).max(profileExperiencePeriodStartedOnMax).regex(profileExperiencePeriodStartedOnRegExp).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(profileExperiencePeriodEndedOnOneMin).max(profileExperiencePeriodEndedOnOneMax).regex(profileExperiencePeriodEndedOnOneRegExp).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 work, or null when the period is open-ended.')
}).describe('The exact month range of an experience entry, copied into a confirmation.')
export type ProfileExperiencePeriod = zod.input<typeof ProfileExperiencePeriod>;
export type ProfileExperiencePeriodOutput = zod.output<typeof ProfileExperiencePeriod>;
@@ -0,0 +1,49 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const profileParallelPeriodConfirmationFirstIndexMin = 0;
export const profileParallelPeriodConfirmationFirstIndexMax = 19;
export const profileParallelPeriodConfirmationSecondIndexMax = 19;
export const profileParallelPeriodConfirmationFirstPeriodStartedOnMin = 7;
export const profileParallelPeriodConfirmationFirstPeriodStartedOnMax = 7;
export const profileParallelPeriodConfirmationFirstPeriodStartedOnRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
export const profileParallelPeriodConfirmationFirstPeriodEndedOnOneMin = 7;
export const profileParallelPeriodConfirmationFirstPeriodEndedOnOneMax = 7;
export const profileParallelPeriodConfirmationFirstPeriodEndedOnOneRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
export const profileParallelPeriodConfirmationSecondPeriodStartedOnMin = 7;
export const profileParallelPeriodConfirmationSecondPeriodStartedOnMax = 7;
export const profileParallelPeriodConfirmationSecondPeriodStartedOnRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
export const profileParallelPeriodConfirmationSecondPeriodEndedOnOneMin = 7;
export const profileParallelPeriodConfirmationSecondPeriodEndedOnOneMax = 7;
export const profileParallelPeriodConfirmationSecondPeriodEndedOnOneRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
export const ProfileParallelPeriodConfirmation = zod.object({
"first_index": zod.int().min(profileParallelPeriodConfirmationFirstIndexMin).max(profileParallelPeriodConfirmationFirstIndexMax),
"second_index": zod.int().min(1).max(profileParallelPeriodConfirmationSecondIndexMax),
"first_period": zod.object({
"started_on": zod.string().min(profileParallelPeriodConfirmationFirstPeriodStartedOnMin).max(profileParallelPeriodConfirmationFirstPeriodStartedOnMax).regex(profileParallelPeriodConfirmationFirstPeriodStartedOnRegExp).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(profileParallelPeriodConfirmationFirstPeriodEndedOnOneMin).max(profileParallelPeriodConfirmationFirstPeriodEndedOnOneMax).regex(profileParallelPeriodConfirmationFirstPeriodEndedOnOneRegExp).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 work, or null when the period is open-ended.')
}).describe('The exact month range of an experience entry, copied into a confirmation.'),
"second_period": zod.object({
"started_on": zod.string().min(profileParallelPeriodConfirmationSecondPeriodStartedOnMin).max(profileParallelPeriodConfirmationSecondPeriodStartedOnMax).regex(profileParallelPeriodConfirmationSecondPeriodStartedOnRegExp).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(profileParallelPeriodConfirmationSecondPeriodEndedOnOneMin).max(profileParallelPeriodConfirmationSecondPeriodEndedOnOneMax).regex(profileParallelPeriodConfirmationSecondPeriodEndedOnOneRegExp).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 work, or null when the period is open-ended.')
}).describe('The exact month range of an experience entry, copied into a confirmation.')
}).describe('Explicit acknowledgement that the two indexed experience periods are genuine parallel work. The indices and exact ranges must match the submitted experience array; expected_version binds the acknowledgement to the profile version the candidate read.')
export type ProfileParallelPeriodConfirmation = zod.input<typeof ProfileParallelPeriodConfirmation>;
export type ProfileParallelPeriodConfirmationOutput = zod.output<typeof ProfileParallelPeriodConfirmation>;
@@ -51,6 +51,33 @@ export const saveMyProfileBodyExperienceItemSummaryOneMax = 1000;
export const saveMyProfileBodyExperienceMax = 20;
export const saveMyProfileBodyConfirmedParallelPeriodsItemFirstIndexMin = 0;
export const saveMyProfileBodyConfirmedParallelPeriodsItemFirstIndexMax = 19;
export const saveMyProfileBodyConfirmedParallelPeriodsItemSecondIndexMax = 19;
export const saveMyProfileBodyConfirmedParallelPeriodsItemFirstPeriodStartedOnMin = 7;
export const saveMyProfileBodyConfirmedParallelPeriodsItemFirstPeriodStartedOnMax = 7;
export const saveMyProfileBodyConfirmedParallelPeriodsItemFirstPeriodStartedOnRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
export const saveMyProfileBodyConfirmedParallelPeriodsItemFirstPeriodEndedOnOneMin = 7;
export const saveMyProfileBodyConfirmedParallelPeriodsItemFirstPeriodEndedOnOneMax = 7;
export const saveMyProfileBodyConfirmedParallelPeriodsItemFirstPeriodEndedOnOneRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
export const saveMyProfileBodyConfirmedParallelPeriodsItemSecondPeriodStartedOnMin = 7;
export const saveMyProfileBodyConfirmedParallelPeriodsItemSecondPeriodStartedOnMax = 7;
export const saveMyProfileBodyConfirmedParallelPeriodsItemSecondPeriodStartedOnRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
export const saveMyProfileBodyConfirmedParallelPeriodsItemSecondPeriodEndedOnOneMin = 7;
export const saveMyProfileBodyConfirmedParallelPeriodsItemSecondPeriodEndedOnOneMax = 7;
export const saveMyProfileBodyConfirmedParallelPeriodsItemSecondPeriodEndedOnOneRegExp = new RegExp('^[0-9]{4}-(0[1-9]|1[0-2])$');
export const saveMyProfileBodyConfirmedParallelPeriodsMax = 190;
export const saveMyProfileBodySoftSkillsItemSkillMax = 50;
@@ -103,6 +130,18 @@ export const SaveMyProfileBody = zod.object({
"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.'),
"confirmed_parallel_periods": zod.array(zod.object({
"first_index": zod.int().min(saveMyProfileBodyConfirmedParallelPeriodsItemFirstIndexMin).max(saveMyProfileBodyConfirmedParallelPeriodsItemFirstIndexMax),
"second_index": zod.int().min(1).max(saveMyProfileBodyConfirmedParallelPeriodsItemSecondIndexMax),
"first_period": zod.object({
"started_on": zod.string().min(saveMyProfileBodyConfirmedParallelPeriodsItemFirstPeriodStartedOnMin).max(saveMyProfileBodyConfirmedParallelPeriodsItemFirstPeriodStartedOnMax).regex(saveMyProfileBodyConfirmedParallelPeriodsItemFirstPeriodStartedOnRegExp).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(saveMyProfileBodyConfirmedParallelPeriodsItemFirstPeriodEndedOnOneMin).max(saveMyProfileBodyConfirmedParallelPeriodsItemFirstPeriodEndedOnOneMax).regex(saveMyProfileBodyConfirmedParallelPeriodsItemFirstPeriodEndedOnOneRegExp).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 work, or null when the period is open-ended.')
}).describe('The exact month range of an experience entry, copied into a confirmation.'),
"second_period": zod.object({
"started_on": zod.string().min(saveMyProfileBodyConfirmedParallelPeriodsItemSecondPeriodStartedOnMin).max(saveMyProfileBodyConfirmedParallelPeriodsItemSecondPeriodStartedOnMax).regex(saveMyProfileBodyConfirmedParallelPeriodsItemSecondPeriodStartedOnRegExp).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(saveMyProfileBodyConfirmedParallelPeriodsItemSecondPeriodEndedOnOneMin).max(saveMyProfileBodyConfirmedParallelPeriodsItemSecondPeriodEndedOnOneMax).regex(saveMyProfileBodyConfirmedParallelPeriodsItemSecondPeriodEndedOnOneRegExp).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 work, or null when the period is open-ended.')
}).describe('The exact month range of an experience entry, copied into a confirmation.')
}).describe('Explicit acknowledgement that the two indexed experience periods are genuine parallel work. The indices and exact ranges must match the submitted experience array; expected_version binds the acknowledgement to the profile version the candidate read.')).max(saveMyProfileBodyConfirmedParallelPeriodsMax).exactOptional().describe('Explicit acknowledgements for overlapping periods. Each pair must use distinct in-range indices and repeat the exact normalized started_on and ended_on values of those entries in this body. A changed or reordered period needs a new acknowledgement. The server retains a previous acknowledgement only for the same indices and dates. Duplicate pairs and pairs that do not overlap are rejected.'),
"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.')