feat(api): add employer need contract with requirement versions and recommendations
This commit is contained in:
1 parent
3adb0ef9e4
commit
a7d5781f2d
95 files changed
+25352
-26
No files matched your search
@@ -3,3 +3,4 @@ export { getCandidateMock } from './candidate/candidate.msw'
|
||||
export { getCatalogMock } from './catalog/catalog.msw'
|
||||
export { getHealthMock } from './health/health.msw'
|
||||
export { getIdentityMock } from './identity/identity.msw'
|
||||
export { getNeedMock } from './need/need.msw'
|
||||
@@ -3,3 +3,4 @@ export * from './candidate/candidate';
|
||||
export * from './catalog/catalog';
|
||||
export * from './health/health';
|
||||
export * from './identity/identity';
|
||||
export * from './need/need';
|
||||
@@ -0,0 +1,119 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import {
|
||||
faker
|
||||
} from '@faker-js/faker';
|
||||
|
||||
import {
|
||||
HttpResponse,
|
||||
http
|
||||
} from 'msw';
|
||||
import type {
|
||||
RequestHandlerOptions
|
||||
} from 'msw';
|
||||
|
||||
import {
|
||||
CurrencyCode,
|
||||
GradeCode,
|
||||
NeedFieldName,
|
||||
NeedItemStatus,
|
||||
NeedMissingReason,
|
||||
NeedMoneyStatus,
|
||||
NeedReadinessStatus,
|
||||
NeedRecommendationStatus,
|
||||
NeedSupplyBand,
|
||||
NeedValueOrigin,
|
||||
NeedValueStatus,
|
||||
SalaryPeriod,
|
||||
SalaryTaxBasis,
|
||||
SpecializationCode,
|
||||
WorkFormat
|
||||
} from '../../schemas';
|
||||
import type {
|
||||
Need,
|
||||
NeedList,
|
||||
NeedValueSource,
|
||||
SalaryRange
|
||||
} from '../../schemas';
|
||||
|
||||
|
||||
export const getListOrganizationNeedsResponseNeedValueSourceMock = (overrideResponse: Partial<NeedValueSource> = {}): NeedValueSource => ({...{origin: faker.helpers.arrayElement(Object.values(NeedValueOrigin)), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extracted_in_version: faker.helpers.arrayElement([faker.number.int({min: 1}),null,]), extraction_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,])}, ...overrideResponse});
|
||||
|
||||
export const getListOrganizationNeedsResponseMock = (overrideResponse: Partial<Extract<NeedList, object>> = {}): NeedList => ({items: Array.from({ length: faker.number.int({min: 1, max: 100}) }, (_, i) => i + 1).map(() => ({id: faker.string.uuid(), vacancy_id: faker.helpers.arrayElement([faker.string.uuid(), null]), title: faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"), version: faker.number.int({min: 1}), specialization: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(SpecializationCode)),null,]), source: faker.helpers.arrayElement([{...getListOrganizationNeedsResponseNeedValueSourceMock()},null,])}, grade: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(GradeCode)),null,]), source: faker.helpers.arrayElement([{...getListOrganizationNeedsResponseNeedValueSourceMock()},null,])}, readiness: {status: faker.helpers.arrayElement(Object.values(NeedReadinessStatus)), missing_fields: Array.from({ length: faker.number.int({min: 1, max: 9}) }, (_, i) => i + 1).map(() => ({field: faker.helpers.arrayElement(Object.values(NeedFieldName)), reason: faker.helpers.arrayElement(Object.values(NeedMissingReason)), question: faker.string.alpha({length: {min: 1, max: 300}})}))}, created_at: faker.date.past().toISOString().slice(0, 19) + 'Z', updated_at: faker.date.past().toISOString().slice(0, 19) + 'Z'})), page: {has_more: faker.datatype.boolean(), next_cursor: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9_-]+$"), null])}, ...overrideResponse})
|
||||
|
||||
export const getCreateOrganizationNeedResponseNeedValueSourceMock = (overrideResponse: Partial<NeedValueSource> = {}): NeedValueSource => ({...{origin: faker.helpers.arrayElement(Object.values(NeedValueOrigin)), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extracted_in_version: faker.helpers.arrayElement([faker.number.int({min: 1}),null,]), extraction_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,])}, ...overrideResponse});
|
||||
|
||||
export const getCreateOrganizationNeedResponseSalaryRangeMock = (overrideResponse: Partial<SalaryRange> = {}): SalaryRange => ({...{salary_from: faker.number.int({min: 1000, max: 100000000, multipleOf: 1000}), salary_to: faker.number.int({min: 1000, max: 100000000, multipleOf: 1000}), currency: faker.helpers.arrayElement(Object.values(CurrencyCode)), period: faker.helpers.arrayElement(Object.values(SalaryPeriod)), tax_basis: faker.helpers.arrayElement(Object.values(SalaryTaxBasis))}, ...overrideResponse});
|
||||
|
||||
export const getCreateOrganizationNeedResponseMock = (overrideResponse: Partial<Extract<Need, object>> = {}): Need => ({id: faker.string.uuid(), organization_id: faker.string.uuid(), vacancy_id: faker.helpers.arrayElement([faker.string.uuid(), null]), title: faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"), source_text: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 10000}}),null,]), version: faker.number.int({min: 1}), requirements_version: faker.number.int({min: 1}), requirements: {specialization: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(SpecializationCode)),null,]), source: faker.helpers.arrayElement([{...getCreateOrganizationNeedResponseNeedValueSourceMock()},null,])}, grade: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(GradeCode)),null,]), source: faker.helpers.arrayElement([{...getCreateOrganizationNeedResponseNeedValueSourceMock()},null,])}, required_skills: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => ({name: faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"), taxonomy_code: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[a-z0-9][a-z0-9_.+#-]*$"),null,]), status: faker.helpers.arrayElement(Object.values(NeedItemStatus)), source: {origin: faker.helpers.arrayElement(Object.values(NeedValueOrigin)), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extracted_in_version: faker.helpers.arrayElement([faker.number.int({min: 1}),null,]), extraction_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,])}})), desired_skills: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => ({name: faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"), taxonomy_code: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[a-z0-9][a-z0-9_.+#-]*$"),null,]), status: faker.helpers.arrayElement(Object.values(NeedItemStatus)), source: {origin: faker.helpers.arrayElement(Object.values(NeedValueOrigin)), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extracted_in_version: faker.helpers.arrayElement([faker.number.int({min: 1}),null,]), extraction_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,])}})), tasks: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => ({text: faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"), status: faker.helpers.arrayElement(Object.values(NeedItemStatus)), source: {origin: faker.helpers.arrayElement(Object.values(NeedValueOrigin)), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extracted_in_version: faker.helpers.arrayElement([faker.number.int({min: 1}),null,]), extraction_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,])}})), domain: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"),null,]), source: faker.helpers.arrayElement([{...getCreateOrganizationNeedResponseNeedValueSourceMock()},null,])}, work_formats: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.arrayElements(Object.values(WorkFormat)), null]), source: faker.helpers.arrayElement([{...getCreateOrganizationNeedResponseNeedValueSourceMock()},null,])}, location: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"),null,]), source: faker.helpers.arrayElement([{...getCreateOrganizationNeedResponseNeedValueSourceMock()},null,])}, salary: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([{...getCreateOrganizationNeedResponseSalaryRangeMock()},null,]), source: faker.helpers.arrayElement([{...getCreateOrganizationNeedResponseNeedValueSourceMock()},null,])}}, readiness: {status: faker.helpers.arrayElement(Object.values(NeedReadinessStatus)), missing_fields: Array.from({ length: faker.number.int({min: 1, max: 9}) }, (_, i) => i + 1).map(() => ({field: faker.helpers.arrayElement(Object.values(NeedFieldName)), reason: faker.helpers.arrayElement(Object.values(NeedMissingReason)), question: faker.string.alpha({length: {min: 1, max: 300}})}))}, recommendations: {status: faker.helpers.arrayElement(Object.values(NeedRecommendationStatus)), requirements_version: faker.number.int({min: 1}), policy_version: faker.helpers.arrayElement([faker.number.int({min: 1}), null]), algorithm_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,]), computed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), categories: Array.from({
Line truncated
|
||||
|
||||
export const getGetOrganizationNeedResponseNeedValueSourceMock = (overrideResponse: Partial<NeedValueSource> = {}): NeedValueSource => ({...{origin: faker.helpers.arrayElement(Object.values(NeedValueOrigin)), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extracted_in_version: faker.helpers.arrayElement([faker.number.int({min: 1}),null,]), extraction_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,])}, ...overrideResponse});
|
||||
|
||||
export const getGetOrganizationNeedResponseSalaryRangeMock = (overrideResponse: Partial<SalaryRange> = {}): SalaryRange => ({...{salary_from: faker.number.int({min: 1000, max: 100000000, multipleOf: 1000}), salary_to: faker.number.int({min: 1000, max: 100000000, multipleOf: 1000}), currency: faker.helpers.arrayElement(Object.values(CurrencyCode)), period: faker.helpers.arrayElement(Object.values(SalaryPeriod)), tax_basis: faker.helpers.arrayElement(Object.values(SalaryTaxBasis))}, ...overrideResponse});
|
||||
|
||||
export const getGetOrganizationNeedResponseMock = (overrideResponse: Partial<Extract<Need, object>> = {}): Need => ({id: faker.string.uuid(), organization_id: faker.string.uuid(), vacancy_id: faker.helpers.arrayElement([faker.string.uuid(), null]), title: faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"), source_text: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 10000}}),null,]), version: faker.number.int({min: 1}), requirements_version: faker.number.int({min: 1}), requirements: {specialization: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(SpecializationCode)),null,]), source: faker.helpers.arrayElement([{...getGetOrganizationNeedResponseNeedValueSourceMock()},null,])}, grade: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(GradeCode)),null,]), source: faker.helpers.arrayElement([{...getGetOrganizationNeedResponseNeedValueSourceMock()},null,])}, required_skills: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => ({name: faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"), taxonomy_code: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[a-z0-9][a-z0-9_.+#-]*$"),null,]), status: faker.helpers.arrayElement(Object.values(NeedItemStatus)), source: {origin: faker.helpers.arrayElement(Object.values(NeedValueOrigin)), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extracted_in_version: faker.helpers.arrayElement([faker.number.int({min: 1}),null,]), extraction_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,])}})), desired_skills: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => ({name: faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"), taxonomy_code: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[a-z0-9][a-z0-9_.+#-]*$"),null,]), status: faker.helpers.arrayElement(Object.values(NeedItemStatus)), source: {origin: faker.helpers.arrayElement(Object.values(NeedValueOrigin)), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extracted_in_version: faker.helpers.arrayElement([faker.number.int({min: 1}),null,]), extraction_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,])}})), tasks: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => ({text: faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"), status: faker.helpers.arrayElement(Object.values(NeedItemStatus)), source: {origin: faker.helpers.arrayElement(Object.values(NeedValueOrigin)), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extracted_in_version: faker.helpers.arrayElement([faker.number.int({min: 1}),null,]), extraction_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,])}})), domain: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"),null,]), source: faker.helpers.arrayElement([{...getGetOrganizationNeedResponseNeedValueSourceMock()},null,])}, work_formats: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.arrayElements(Object.values(WorkFormat)), null]), source: faker.helpers.arrayElement([{...getGetOrganizationNeedResponseNeedValueSourceMock()},null,])}, location: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"),null,]), source: faker.helpers.arrayElement([{...getGetOrganizationNeedResponseNeedValueSourceMock()},null,])}, salary: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([{...getGetOrganizationNeedResponseSalaryRangeMock()},null,]), source: faker.helpers.arrayElement([{...getGetOrganizationNeedResponseNeedValueSourceMock()},null,])}}, readiness: {status: faker.helpers.arrayElement(Object.values(NeedReadinessStatus)), missing_fields: Array.from({ length: faker.number.int({min: 1, max: 9}) }, (_, i) => i + 1).map(() => ({field: faker.helpers.arrayElement(Object.values(NeedFieldName)), reason: faker.helpers.arrayElement(Object.values(NeedMissingReason)), question: faker.string.alpha({length: {min: 1, max: 300}})}))}, recommendations: {status: faker.helpers.arrayElement(Object.values(NeedRecommendationStatus)), requirements_version: faker.number.int({min: 1}), policy_version: faker.helpers.arrayElement([faker.number.int({min: 1}), null]), algorithm_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,]), computed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), categories: Array.from({ length: faker.number.intLine truncated
|
||||
|
||||
export const getUpdateOrganizationNeedResponseNeedValueSourceMock = (overrideResponse: Partial<NeedValueSource> = {}): NeedValueSource => ({...{origin: faker.helpers.arrayElement(Object.values(NeedValueOrigin)), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extracted_in_version: faker.helpers.arrayElement([faker.number.int({min: 1}),null,]), extraction_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,])}, ...overrideResponse});
|
||||
|
||||
export const getUpdateOrganizationNeedResponseSalaryRangeMock = (overrideResponse: Partial<SalaryRange> = {}): SalaryRange => ({...{salary_from: faker.number.int({min: 1000, max: 100000000, multipleOf: 1000}), salary_to: faker.number.int({min: 1000, max: 100000000, multipleOf: 1000}), currency: faker.helpers.arrayElement(Object.values(CurrencyCode)), period: faker.helpers.arrayElement(Object.values(SalaryPeriod)), tax_basis: faker.helpers.arrayElement(Object.values(SalaryTaxBasis))}, ...overrideResponse});
|
||||
|
||||
export const getUpdateOrganizationNeedResponseMock = (overrideResponse: Partial<Extract<Need, object>> = {}): Need => ({id: faker.string.uuid(), organization_id: faker.string.uuid(), vacancy_id: faker.helpers.arrayElement([faker.string.uuid(), null]), title: faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"), source_text: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 10000}}),null,]), version: faker.number.int({min: 1}), requirements_version: faker.number.int({min: 1}), requirements: {specialization: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(SpecializationCode)),null,]), source: faker.helpers.arrayElement([{...getUpdateOrganizationNeedResponseNeedValueSourceMock()},null,])}, grade: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.arrayElement(Object.values(GradeCode)),null,]), source: faker.helpers.arrayElement([{...getUpdateOrganizationNeedResponseNeedValueSourceMock()},null,])}, required_skills: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => ({name: faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"), taxonomy_code: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[a-z0-9][a-z0-9_.+#-]*$"),null,]), status: faker.helpers.arrayElement(Object.values(NeedItemStatus)), source: {origin: faker.helpers.arrayElement(Object.values(NeedValueOrigin)), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extracted_in_version: faker.helpers.arrayElement([faker.number.int({min: 1}),null,]), extraction_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,])}})), desired_skills: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => ({name: faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"), taxonomy_code: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[a-z0-9][a-z0-9_.+#-]*$"),null,]), status: faker.helpers.arrayElement(Object.values(NeedItemStatus)), source: {origin: faker.helpers.arrayElement(Object.values(NeedValueOrigin)), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extracted_in_version: faker.helpers.arrayElement([faker.number.int({min: 1}),null,]), extraction_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,])}})), tasks: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => ({text: faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"), status: faker.helpers.arrayElement(Object.values(NeedItemStatus)), source: {origin: faker.helpers.arrayElement(Object.values(NeedValueOrigin)), quote: faker.helpers.arrayElement([faker.string.alpha({length: {min: 1, max: 300}}),null,]), extracted_in_version: faker.helpers.arrayElement([faker.number.int({min: 1}),null,]), extraction_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,])}})), domain: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"),null,]), source: faker.helpers.arrayElement([{...getUpdateOrganizationNeedResponseNeedValueSourceMock()},null,])}, work_formats: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.arrayElements(Object.values(WorkFormat)), null]), source: faker.helpers.arrayElement([{...getUpdateOrganizationNeedResponseNeedValueSourceMock()},null,])}, location: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([faker.helpers.fromRegExp("^\\S(?:.*\\S)?$"),null,]), source: faker.helpers.arrayElement([{...getUpdateOrganizationNeedResponseNeedValueSourceMock()},null,])}, salary: {status: faker.helpers.arrayElement(Object.values(NeedValueStatus)), value: faker.helpers.arrayElement([{...getUpdateOrganizationNeedResponseSalaryRangeMock()},null,]), source: faker.helpers.arrayElement([{...getUpdateOrganizationNeedResponseNeedValueSourceMock()},null,])}}, readiness: {status: faker.helpers.arrayElement(Object.values(NeedReadinessStatus)), missing_fields: Array.from({ length: faker.number.int({min: 1, max: 9}) }, (_, i) => i + 1).map(() => ({field: faker.helpers.arrayElement(Object.values(NeedFieldName)), reason: faker.helpers.arrayElement(Object.values(NeedMissingReason)), question: faker.string.alpha({length: {min: 1, max: 300}})}))}, recommendations: {status: faker.helpers.arrayElement(Object.values(NeedRecommendationStatus)), requirements_version: faker.number.int({min: 1}), policy_version: faker.helpers.arrayElement([faker.number.int({min: 1}), null]), algorithm_version: faker.helpers.arrayElement([faker.helpers.fromRegExp("^[A-Za-z0-9._-]+$"),null,]), computed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), categories: Array.from({
Line truncated
|
||||
|
||||
|
||||
export const getListOrganizationNeedsMockHandler = (overrideResponse?: NeedList | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<NeedList> | NeedList), options?: RequestHandlerOptions) => {
|
||||
return http.get('*/api/v1/organizations/:orgId/needs', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getListOrganizationNeedsResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getCreateOrganizationNeedMockHandler = (overrideResponse?: Need | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<Need> | Need), options?: RequestHandlerOptions) => {
|
||||
return http.post('*/api/v1/organizations/:orgId/needs', async (info: Parameters<Parameters<typeof http.post>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getCreateOrganizationNeedResponseMock(),
|
||||
{ status: 201
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getGetOrganizationNeedMockHandler = (overrideResponse?: Need | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<Need> | Need), options?: RequestHandlerOptions) => {
|
||||
return http.get('*/api/v1/organizations/:orgId/needs/:needId', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getGetOrganizationNeedResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getUpdateOrganizationNeedMockHandler = (overrideResponse?: Need | ((info: Parameters<Parameters<typeof http.patch>[1]>[0]) => Promise<Need> | Need), options?: RequestHandlerOptions) => {
|
||||
return http.patch('*/api/v1/organizations/:orgId/needs/:needId', async (info: Parameters<Parameters<typeof http.patch>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getUpdateOrganizationNeedResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
export const getNeedMock = () => [
|
||||
getListOrganizationNeedsMockHandler(),
|
||||
getCreateOrganizationNeedMockHandler(),
|
||||
getGetOrganizationNeedMockHandler(),
|
||||
getUpdateOrganizationNeedMockHandler()
|
||||
]
|
||||
@@ -0,0 +1,503 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import {
|
||||
useMutation,
|
||||
useQuery
|
||||
} from '@tanstack/react-query';
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
import type {
|
||||
CreateOrganizationNeedHeaders,
|
||||
ListOrganizationNeedsParams,
|
||||
Need,
|
||||
NeedCreate,
|
||||
NeedList,
|
||||
NeedUpdate,
|
||||
Problem
|
||||
} from '../../schemas';
|
||||
|
||||
import { apiRequest } from '../../client';
|
||||
import type { ErrorType } from '../../client';
|
||||
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
|
||||
|
||||
const withQueryKey = <T extends object, K>(query: T, queryKey: K): T & { queryKey: K } => {
|
||||
const result = { queryKey } as T & { queryKey: K };
|
||||
for (const key of Object.keys(query)) {
|
||||
// The explicit queryKey always wins, matching the previous
|
||||
// `{ ...query, queryKey }` spread where it was set last.
|
||||
if (key === 'queryKey') continue;
|
||||
Object.defineProperty(result, key, {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
get: () => (query as Record<string, unknown>)[key],
|
||||
});
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
export const getListOrganizationNeedsUrl = (orgId: string,
|
||||
params?: ListOrganizationNeedsParams,) => {
|
||||
const normalizedParams = new URLSearchParams();
|
||||
|
||||
Object.entries(params || {}).forEach(([key, value]) => {
|
||||
|
||||
if (value !== undefined) {
|
||||
normalizedParams.append(key, value === null ? 'null' : String(value))
|
||||
}
|
||||
});
|
||||
|
||||
const stringifiedParams = normalizedParams.toString();
|
||||
|
||||
return stringifiedParams.length > 0 ? `/api/v1/organizations/${orgId}/needs?${stringifiedParams}` : `/api/v1/organizations/${orgId}/needs`
|
||||
}
|
||||
|
||||
/**
|
||||
* Requires the session cookie of an employer account with an active membership in `org_id`. The organization and the role come from the membership that the server holds for the session account, never from the request. In the MVP only the owner of the organization works with needs; the other roles of the PRD FR07 matrix (recruiter, hiring manager and technical expert for assigned needs) are planned and change no field of this contract. The list holds only the needs that the role may read.
|
||||
*
|
||||
* Returns a page of need summaries, newest first by creation time with the identifier as the tie-breaker, with cursor pagination. A summary has the current version, the target specialization and grade with their confirmation state, and the readiness; GetOrganizationNeed returns the requirements and the recommendations.
|
||||
*
|
||||
* 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 and an unknown organization both answer 404 not_found, so organizations cannot be enumerated; a member whose role does not allow reading needs answers 403 forbidden. A malformed `org_id`, `limit`, or `cursor` answers 400 validation_failed.
|
||||
* @summary List the needs of an organization.
|
||||
*/
|
||||
export const listOrganizationNeeds = async (orgId: string,
|
||||
params?: ListOrganizationNeedsParams, options?: Parameters<typeof apiRequest>[1]): Promise<NeedList> => {
|
||||
|
||||
return apiRequest<NeedList>(getListOrganizationNeedsUrl(orgId,params),
|
||||
{
|
||||
...options,
|
||||
method: 'GET'
|
||||
|
||||
|
||||
}
|
||||
);}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const getListOrganizationNeedsQueryKey = (orgId: string,
|
||||
params?: ListOrganizationNeedsParams,) => {
|
||||
return [
|
||||
`/api/v1/organizations/${orgId}/needs`, ...(params ? [params] : [])
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getListOrganizationNeedsQueryOptions = <TData = Awaited<ReturnType<typeof listOrganizationNeeds>>, TError = ErrorType<Problem>>(orgId: string,
|
||||
params?: ListOrganizationNeedsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listOrganizationNeeds>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getListOrganizationNeedsQueryKey(orgId,params);
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof listOrganizationNeeds>>> = ({ signal }) => listOrganizationNeeds(orgId,params, { signal, ...requestOptions });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, enabled: orgId !== null && orgId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listOrganizationNeeds>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type ListOrganizationNeedsQueryResult = NonNullable<Awaited<ReturnType<typeof listOrganizationNeeds>>>
|
||||
export type ListOrganizationNeedsQueryError = ErrorType<Problem>
|
||||
|
||||
|
||||
export function useListOrganizationNeeds<TData = Awaited<ReturnType<typeof listOrganizationNeeds>>, TError = ErrorType<Problem>>(
|
||||
orgId: string,
|
||||
params: undefined | ListOrganizationNeedsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listOrganizationNeeds>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listOrganizationNeeds>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listOrganizationNeeds>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useListOrganizationNeeds<TData = Awaited<ReturnType<typeof listOrganizationNeeds>>, TError = ErrorType<Problem>>(
|
||||
orgId: string,
|
||||
params?: ListOrganizationNeedsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listOrganizationNeeds>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listOrganizationNeeds>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listOrganizationNeeds>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useListOrganizationNeeds<TData = Awaited<ReturnType<typeof listOrganizationNeeds>>, TError = ErrorType<Problem>>(
|
||||
orgId: string,
|
||||
params?: ListOrganizationNeedsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listOrganizationNeeds>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary List the needs of an organization.
|
||||
*/
|
||||
|
||||
export function useListOrganizationNeeds<TData = Awaited<ReturnType<typeof listOrganizationNeeds>>, TError = ErrorType<Problem>>(
|
||||
orgId: string,
|
||||
params?: ListOrganizationNeedsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listOrganizationNeeds>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getListOrganizationNeedsQueryOptions(orgId,params,options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return withQueryKey(query, queryOptions.queryKey);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const getCreateOrganizationNeedUrl = (orgId: string,) => {
|
||||
|
||||
|
||||
|
||||
|
||||
return `/api/v1/organizations/${orgId}/needs`
|
||||
}
|
||||
|
||||
/**
|
||||
* Requires the session cookie of an employer account with an active membership in `org_id`, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The organization comes from the path and the server-side membership; the body has no organization, membership, or role field. In the MVP only the owner of the organization may create a need; the other roles of PRD FR07 are planned.
|
||||
*
|
||||
* A need does not require a vacancy: `vacancy_id` is optional and nullable. When it is given, it must name a vacancy of the same organization; until vacancies exist in the contract, any vacancy identifier answers 400 with the pointer `/vacancy_id`, the same for an unknown vacancy and one of another organization.
|
||||
*
|
||||
* Only `title` is required. A field is sent as a decision `{value, status}` and a list item as `{name or text, status}`; on creation the status must be `confirmed`, and the value becomes a confirmed manual value. When `source_text` is given, the server extracts suggestions for the absent fields with deterministic rules and a dictionary before it answers, so creation works while the ML service is disabled; every suggestion has the status `extracted`, the origin extracted_from_text, a quote where the extractor found one, and the extractor version, and it waits for a member to confirm it. A field that the text does not state stays `unknown` with null value and source; the server never guesses a grade, a format, or a salary. ML suggestions with quotes are planned as an asynchronous addition that creates a new version and never overwrites a confirmed value.
|
||||
*
|
||||
* The need is saved even when critical fields are missing: the response is 201 with version 1, and `readiness.missing_fields` names each critical field without a confirmed value with a specific question. `recommendations` is computed by the server from the confirmed requirements only; the request cannot set a recommendation, its score, or its components. Creating a need never contacts a candidate or sends an invitation.
|
||||
*
|
||||
* Salary limit: setting a salary range counts against a limit shared by the whole organization, every member and every need, on creation as on a change: at most three range settings a day (PRD FR13, planned in TASK-211). Over the limit the server answers 429 with Retry-After and creates nothing. After five settings within seven days the money component of the recommendations is `withheld` for seven days. The limit keeps an organization from probing hidden candidate minimums with new needs instead of edits; repeated range changes also feed the private risk signals of TASK-319.
|
||||
*
|
||||
* Idempotency: a retry with the same key and body within 24 hours replays the stored 201 and creates nothing, so a lost response never creates a second need. A different body with the same key answers 422 idempotency_key_reused. 400 is never stored, so a corrected retry is evaluated again.
|
||||
*
|
||||
* Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for a candidate), membership (404 not_found) and role (403 forbidden), the Idempotency-Key (422, 409 idempotency_in_progress, replay), domain rules (400 with a pointer: `/salary/value/salary_to` for a range whose lower bound is not below the upper one or whose width is outside 10-40%, `/required_skills/1/name` for a repeated skill, `/grade/status` or `/required_skills/0/status` for `extracted`, which a new need cannot have, or `/vacancy_id`), then the salary limit (429). The schema already rejects unknown fields such as `rec_score`, `members`, or `candidate_minimum`, a field sent as a bare value instead of `{value, status}`, a salary bound that is not a positive multiple of 1000, and an unknown currency, period, or tax basis. The general rate limit can answer 429 with Retry-After before any check. 429 is never stored.
|
||||
* @summary Create a need of an organization from a form, a text, or both.
|
||||
*/
|
||||
export const createOrganizationNeed = async (orgId: string,
|
||||
needCreate: NeedCreate,
|
||||
headers: CreateOrganizationNeedHeaders, options?: Parameters<typeof apiRequest>[1]): Promise<Need> => {
|
||||
|
||||
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<Need>(getCreateOrganizationNeedUrl(orgId),
|
||||
{
|
||||
...options,
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json',...headers, ...getHeaders(options?.headers) },
|
||||
body: JSON.stringify(needCreate)
|
||||
}
|
||||
);}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const getCreateOrganizationNeedMutationKey = () => ['createOrganizationNeed'] as const;
|
||||
|
||||
export const getCreateOrganizationNeedMutationOptions = <TError = ErrorType<Problem>,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganizationNeed>>, TError,CreateOrganizationNeedMutationVariables, TContext>, request?: SecondParameter<typeof apiRequest>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof createOrganizationNeed>>, TError,CreateOrganizationNeedMutationVariables, TContext> => {
|
||||
|
||||
const mutationKey = getCreateOrganizationNeedMutationKey();
|
||||
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 createOrganizationNeed>>, CreateOrganizationNeedMutationVariables> = (props) => {
|
||||
const {orgId,data,headers} = props ?? {};
|
||||
|
||||
return createOrganizationNeed(orgId,data,headers,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type CreateOrganizationNeedMutationResult = NonNullable<Awaited<ReturnType<typeof createOrganizationNeed>>>
|
||||
export type CreateOrganizationNeedMutationBody = NeedCreate
|
||||
export type CreateOrganizationNeedMutationError = ErrorType<Problem>
|
||||
export type CreateOrganizationNeedMutationVariables = {orgId: string;data: NeedCreate;headers: CreateOrganizationNeedHeaders}
|
||||
|
||||
/**
|
||||
* @summary Create a need of an organization from a form, a text, or both.
|
||||
*/
|
||||
export const useCreateOrganizationNeed = <TError = ErrorType<Problem>,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganizationNeed>>, TError,CreateOrganizationNeedMutationVariables, TContext>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createOrganizationNeed>>,
|
||||
TError,
|
||||
CreateOrganizationNeedMutationVariables,
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getCreateOrganizationNeedMutationOptions(options), queryClient);
|
||||
}
|
||||
export const getGetOrganizationNeedUrl = (orgId: string,
|
||||
needId: string,) => {
|
||||
|
||||
|
||||
|
||||
|
||||
return `/api/v1/organizations/${orgId}/needs/${needId}`
|
||||
}
|
||||
|
||||
/**
|
||||
* Requires the session cookie of an employer account with an active membership in `org_id`. The organization and the role come from the server-side membership, never from the request. In the MVP only the owner of the organization reads needs; the other roles of PRD FR07 are planned.
|
||||
*
|
||||
* Returns the current version of the need: `version`, the requirements with the confirmation state and provenance of each field (`status`, and `source` with the origin, the quote, the version whose text the quote belongs to, and the extractor version), the readiness with `missing_fields`, and the category recommendations of the server. A field with status `unknown` has null value and source; an `extracted` value is a suggestion that waits for confirmation and never feeds search or recommendations.
|
||||
*
|
||||
* Versions: every committed change creates a new immutable `version`, and this operation always returns the latest one. `requirements_version` is the version in which the confirmed requirements were last changed; a change of the title, the vacancy link, the text, or suggestions only keeps it. Search runs, selection snapshots, and invitations refer to a need by its identifier and `requirements_version`, so they keep the requirements they used, and only a new `requirements_version` calls for a new selection snapshot. Reading and comparing earlier versions (PRD FR10) are planned as separate operations that return the same NeedRequirementSet for a given version; they add no field here.
|
||||
*
|
||||
* 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, an unknown organization, an unknown need, and a need of another organization all answer 404 not_found, so identifiers cannot be probed; a member whose role does not allow reading the need answers 403 forbidden. An `org_id` or `need_id` that is not a UUID answers 400 validation_failed with the path pointer.
|
||||
* @summary Read the current version of a need of an organization.
|
||||
*/
|
||||
export const getOrganizationNeed = async (orgId: string,
|
||||
needId: string, options?: Parameters<typeof apiRequest>[1]): Promise<Need> => {
|
||||
|
||||
return apiRequest<Need>(getGetOrganizationNeedUrl(orgId,needId),
|
||||
{
|
||||
...options,
|
||||
method: 'GET'
|
||||
|
||||
|
||||
}
|
||||
);}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const getGetOrganizationNeedQueryKey = (orgId: string,
|
||||
needId: string,) => {
|
||||
return [
|
||||
`/api/v1/organizations/${orgId}/needs/${needId}`
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getGetOrganizationNeedQueryOptions = <TData = Awaited<ReturnType<typeof getOrganizationNeed>>, TError = ErrorType<Problem>>(orgId: string,
|
||||
needId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganizationNeed>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetOrganizationNeedQueryKey(orgId,needId);
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganizationNeed>>> = ({ signal }) => getOrganizationNeed(orgId,needId, { signal, ...requestOptions });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, enabled: orgId !== null && orgId !== undefined && needId !== null && needId !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganizationNeed>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type GetOrganizationNeedQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganizationNeed>>>
|
||||
export type GetOrganizationNeedQueryError = ErrorType<Problem>
|
||||
|
||||
|
||||
export function useGetOrganizationNeed<TData = Awaited<ReturnType<typeof getOrganizationNeed>>, TError = ErrorType<Problem>>(
|
||||
orgId: string,
|
||||
needId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganizationNeed>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getOrganizationNeed>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getOrganizationNeed>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetOrganizationNeed<TData = Awaited<ReturnType<typeof getOrganizationNeed>>, TError = ErrorType<Problem>>(
|
||||
orgId: string,
|
||||
needId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganizationNeed>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getOrganizationNeed>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getOrganizationNeed>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetOrganizationNeed<TData = Awaited<ReturnType<typeof getOrganizationNeed>>, TError = ErrorType<Problem>>(
|
||||
orgId: string,
|
||||
needId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganizationNeed>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary Read the current version of a need of an organization.
|
||||
*/
|
||||
|
||||
export function useGetOrganizationNeed<TData = Awaited<ReturnType<typeof getOrganizationNeed>>, TError = ErrorType<Problem>>(
|
||||
orgId: string,
|
||||
needId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganizationNeed>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getGetOrganizationNeedQueryOptions(orgId,needId,options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return withQueryKey(query, queryOptions.queryKey);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const getUpdateOrganizationNeedUrl = (orgId: string,
|
||||
needId: string,) => {
|
||||
|
||||
|
||||
|
||||
|
||||
return `/api/v1/organizations/${orgId}/needs/${needId}`
|
||||
}
|
||||
|
||||
/**
|
||||
* Requires the session cookie of an employer account with an active membership in `org_id`, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The organization and the role come from the server-side membership; the body has no organization, membership, or role field. In the MVP only the owner of the organization changes needs; the technical expert, who may refine the requirements of assigned needs under PRD FR07, is planned.
|
||||
*
|
||||
* Merge rules: the body is `application/json` with explicit field replacement, not JSON Merge Patch. Each field present replaces that field as a whole and an absent field stays unchanged; a field decision and each list are replaced entirely and never merged. This keeps every field one optional value in the generated server and client, without nested partial updates.
|
||||
*
|
||||
* Each requirement field is sent as a decision `{value, status}` and each list item as `{name or text, status}`, so confirmation is always explicit:
|
||||
* - Confirm a suggestion: send its stored value with `confirmed`. It keeps its origin and quote.
|
||||
* - Keep a suggestion open: send its stored value with `extracted`, or leave the field out. `extracted` with any other value, or for a field or item without a stored suggestion, answers 400 with the pointer of that `status`, for example `/grade/status` or `/required_skills/2/status`. A client that sends back an unchanged form therefore never confirms a suggestion by accident.
|
||||
* - Change: send another value with `confirmed`. It becomes a confirmed manual value, and its quote is dropped.
|
||||
* - Delete: send null for a nullable field, which makes it `unknown` (or unlinks `vacancy_id`), or leave the item out of a skill or task list, which deletes it. An empty skill or task list deletes every item; a list sent as null answers 400. A deleted requirement really changes the requirements that search uses, not only an explanation, and a deleted suggestion is not proposed again by a later extraction.
|
||||
* - Text: a different `source_text` extracts again. New suggestions replace only the `extracted` values and items of the fields not named in the body; confirmed values are never overwritten, and a suggested skill whose name is already in either skill list is skipped. Null removes the text and keeps every value.
|
||||
*
|
||||
* Versions: every committed change creates version `expected_version + 1` as an immutable snapshot and answers 200 with it. `requirements_version` becomes the new version only when a confirmed requirement was confirmed, changed, or removed. `expected_version` is the `version` the client read; when it is not current, the server answers 412 version_conflict and changes nothing, and the client reads the need again and reapplies its unsaved edits. 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. Concurrent changes therefore never overwrite each other silently.
|
||||
*
|
||||
* The operation needs no Idempotency-Key: a body that changes nothing when applied to the current version, such as a retry of a change that already succeeded, keeps the version and answers 200 with the current need even when `expected_version` is older. An incomplete need is a valid result; `readiness.missing_fields` tells what remains.
|
||||
*
|
||||
* Salary limit: the recommendations aggregate candidates' minimums against the upper bound, so setting or changing a confirmed salary range counts against a limit shared by the whole organization, every member and every need, together with ranges set on creation: at most three a day (PRD FR13, planned in TASK-211). Over the limit the server answers 429 with Retry-After and changes nothing. After five settings within seven days the money component is `withheld` for seven days. Repeated range changes also feed the private risk signals of TASK-319.
|
||||
*
|
||||
* Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for a candidate), membership (404 not_found) and role (403 forbidden), the need (404 not_found), a body that changes nothing (200), the version (412), domain rules (400 with a pointer such as `/salary/value/salary_to` for a range whose lower bound is not below the upper one or whose width is outside 10-40%, `/desired_skills/0/name` for a skill that is also in the required list, `/grade/status` or `/required_skills/2/status` for `extracted` with a value that is not the stored suggestion, or `/vacancy_id`), then the salary change limit (429). The schema rejects a missing or non-positive `expected_version`, unknown fields such as `rec_score`, `members`, `candidate_minimum`, or `version`, a field sent as a bare value instead of `{value, status}`, a list sent as null, a salary bound that is not a positive multiple of 1000, and an unknown currency, period, or tax basis.
|
||||
* @summary Confirm, change, or delete requirements of a need.
|
||||
*/
|
||||
export const updateOrganizationNeed = async (orgId: string,
|
||||
needId: string,
|
||||
needUpdate: NeedUpdate, options?: Parameters<typeof apiRequest>[1]): Promise<Need> => {
|
||||
|
||||
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<Need>(getUpdateOrganizationNeedUrl(orgId,needId),
|
||||
{
|
||||
...options,
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
|
||||
body: JSON.stringify(needUpdate)
|
||||
}
|
||||
);}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const getUpdateOrganizationNeedMutationKey = () => ['updateOrganizationNeed'] as const;
|
||||
|
||||
export const getUpdateOrganizationNeedMutationOptions = <TError = ErrorType<Problem>,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateOrganizationNeed>>, TError,UpdateOrganizationNeedMutationVariables, TContext>, request?: SecondParameter<typeof apiRequest>}
|
||||
): UseMutationOptions<Awaited<ReturnType<typeof updateOrganizationNeed>>, TError,UpdateOrganizationNeedMutationVariables, TContext> => {
|
||||
|
||||
const mutationKey = getUpdateOrganizationNeedMutationKey();
|
||||
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 updateOrganizationNeed>>, UpdateOrganizationNeedMutationVariables> = (props) => {
|
||||
const {orgId,needId,data} = props ?? {};
|
||||
|
||||
return updateOrganizationNeed(orgId,needId,data,requestOptions)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { mutationFn, ...mutationOptions }}
|
||||
|
||||
export type UpdateOrganizationNeedMutationResult = NonNullable<Awaited<ReturnType<typeof updateOrganizationNeed>>>
|
||||
export type UpdateOrganizationNeedMutationBody = NeedUpdate
|
||||
export type UpdateOrganizationNeedMutationError = ErrorType<Problem>
|
||||
export type UpdateOrganizationNeedMutationVariables = {orgId: string;needId: string;data: NeedUpdate}
|
||||
|
||||
/**
|
||||
* @summary Confirm, change, or delete requirements of a need.
|
||||
*/
|
||||
export const useUpdateOrganizationNeed = <TError = ErrorType<Problem>,
|
||||
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof updateOrganizationNeed>>, TError,UpdateOrganizationNeedMutationVariables, TContext>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateOrganizationNeed>>,
|
||||
TError,
|
||||
UpdateOrganizationNeedMutationVariables,
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(getUpdateOrganizationNeedMutationOptions(options), queryClient);
|
||||
}
|
||||
@@ -0,0 +1,343 @@
|
||||
import { describe, expect, expectTypeOf, it } from "vitest";
|
||||
import { createOrganizationNeed, updateOrganizationNeed } from "./endpoints/need/need";
|
||||
import {
|
||||
CreateOrganizationNeedBody,
|
||||
Need,
|
||||
NeedCategoryRecommendation,
|
||||
NeedCreate,
|
||||
NeedUpdate,
|
||||
SalaryRange,
|
||||
UpdateOrganizationNeedBody,
|
||||
} from "./schemas";
|
||||
|
||||
// These tests pin the generated need contract that the FSD adapters consume.
|
||||
// They fail when regeneration drops a salary limit, an unknown state, or the
|
||||
// explicit confirmation status of a field, or adds a request field that would
|
||||
// let an employer set membership, a candidate's minimum, or a ready
|
||||
// recommendation score.
|
||||
|
||||
const salary = {
|
||||
salary_from: 120000,
|
||||
salary_to: 160000,
|
||||
currency: "RUB",
|
||||
period: "month",
|
||||
tax_basis: "net",
|
||||
} as const;
|
||||
|
||||
const manualNeed = {
|
||||
title: "Junior Go-разработчик для сервиса уведомлений",
|
||||
specialization: { value: "backend", status: "confirmed" },
|
||||
grade: { value: "junior", status: "confirmed" },
|
||||
required_skills: [
|
||||
{ name: "Go", status: "confirmed" },
|
||||
{ name: "PostgreSQL", status: "confirmed" },
|
||||
],
|
||||
desired_skills: [{ name: "Docker", status: "confirmed" }],
|
||||
tasks: [{ text: "Поддерживать и развивать сервис уведомлений", status: "confirmed" }],
|
||||
work_formats: { value: ["hybrid"], status: "confirmed" },
|
||||
location: { value: "Москва", status: "confirmed" },
|
||||
salary: { value: salary, status: "confirmed" },
|
||||
} as const;
|
||||
|
||||
const createSchemas = [
|
||||
["NeedCreate", NeedCreate],
|
||||
["CreateOrganizationNeedBody", CreateOrganizationNeedBody],
|
||||
] as const;
|
||||
|
||||
describe.each(createSchemas)("generated %s", (_name, schema) => {
|
||||
it("accepts a manual need without a vacancy", () => {
|
||||
const parsed = schema.parse(manualNeed);
|
||||
|
||||
expect(parsed).not.toHaveProperty("vacancy_id");
|
||||
expect(parsed.salary).toEqual({ value: salary, status: "confirmed" });
|
||||
});
|
||||
|
||||
it("accepts a need from a title and a text only", () => {
|
||||
const parsed = schema.parse({ title: "Backend", source_text: "Ищем бэкенд-разработчика." });
|
||||
|
||||
expect(parsed).toEqual({ title: "Backend", source_text: "Ищем бэкенд-разработчика." });
|
||||
});
|
||||
|
||||
it("keeps an explicit null as a field without a value", () => {
|
||||
const parsed = schema.parse({ title: "Backend", vacancy_id: null, grade: null, salary: null });
|
||||
|
||||
expect(parsed).toEqual({ title: "Backend", vacancy_id: null, grade: null, salary: null });
|
||||
});
|
||||
|
||||
it("requires a title", () => {
|
||||
const result = schema.safeParse({ specialization: { value: "backend", status: "confirmed" } });
|
||||
|
||||
expect(result.success).toBe(false);
|
||||
expect(result.error?.issues).toEqual([expect.objectContaining({ path: ["title"] })]);
|
||||
});
|
||||
|
||||
it.each([
|
||||
["a bare value", "junior"],
|
||||
["a value without a status", { value: "junior" }],
|
||||
["an unknown status", { value: "junior", status: "unknown" }],
|
||||
["a grade outside the scale", { value: "lead", status: "confirmed" }],
|
||||
])("rejects a grade decision with %s", (_case, grade) => {
|
||||
const result = schema.safeParse({ ...manualNeed, grade });
|
||||
|
||||
expect(result.success).toBe(false);
|
||||
expect(result.error?.issues).toEqual([
|
||||
expect.objectContaining({ path: expect.arrayContaining(["grade"]) }),
|
||||
]);
|
||||
});
|
||||
|
||||
it.each([
|
||||
["a zero lower bound", { salary_from: 0 }, "salary_from"],
|
||||
["a negative lower bound", { salary_from: -1000 }, "salary_from"],
|
||||
["a bound that is not a multiple of 1000", { salary_to: 160500 }, "salary_to"],
|
||||
["a fractional bound", { salary_to: 160000.5 }, "salary_to"],
|
||||
["another currency", { currency: "USD" }, "currency"],
|
||||
["an hourly period", { period: "hour" }, "period"],
|
||||
["an unknown tax basis", { tax_basis: "after_tax" }, "tax_basis"],
|
||||
])("rejects a salary with %s", (_case, change, field) => {
|
||||
const range = { ...salary, ...change };
|
||||
const result = schema.safeParse({
|
||||
...manualNeed,
|
||||
salary: { value: range, status: "confirmed" },
|
||||
});
|
||||
|
||||
// The nullable salary is a union, so Zod reports some failures on the
|
||||
// union and others on the field; the range schema itself names the field.
|
||||
expect(result.success).toBe(false);
|
||||
expect(result.error?.issues).toEqual([
|
||||
expect.objectContaining({ path: expect.arrayContaining(["salary"]) }),
|
||||
]);
|
||||
expect(SalaryRange.safeParse(range).error?.issues).toEqual([
|
||||
expect.objectContaining({ path: [field] }),
|
||||
]);
|
||||
});
|
||||
|
||||
it("rejects a salary without a tax basis or without a decision", () => {
|
||||
const withoutBasis = {
|
||||
salary_from: salary.salary_from,
|
||||
salary_to: salary.salary_to,
|
||||
currency: salary.currency,
|
||||
period: salary.period,
|
||||
};
|
||||
|
||||
expect(
|
||||
schema.safeParse({ ...manualNeed, salary: { value: withoutBasis, status: "confirmed" } })
|
||||
.success,
|
||||
).toBe(false);
|
||||
expect(schema.safeParse({ ...manualNeed, salary }).success).toBe(false);
|
||||
});
|
||||
|
||||
it("leaves the cross-field salary rules to the server", () => {
|
||||
// A < B and the 10-40% width compare two fields; the server answers 400
|
||||
// with the pointer /salary/value/salary_to.
|
||||
for (const [from, to] of [
|
||||
[150000, 150000],
|
||||
[100000, 200000],
|
||||
]) {
|
||||
const range = { ...salary, salary_from: from, salary_to: to };
|
||||
|
||||
expect(SalaryRange.safeParse(range).success).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
it("rejects an unknown item status and empty work formats", () => {
|
||||
expect(
|
||||
schema.safeParse({ ...manualNeed, required_skills: [{ name: "Go", status: "unknown" }] })
|
||||
.success,
|
||||
).toBe(false);
|
||||
expect(
|
||||
schema.safeParse({ ...manualNeed, work_formats: { value: [], status: "confirmed" } }).success,
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("never carries membership, a candidate minimum, or a score in the parsed body", () => {
|
||||
const parsed = schema.parse({
|
||||
...manualNeed,
|
||||
rec_score: 0.99,
|
||||
members: [{ user_id: "01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01", role: "owner" }],
|
||||
candidate_minimum: 130000,
|
||||
salary: { value: { ...salary, candidate_minimum: 130000 }, status: "confirmed" },
|
||||
});
|
||||
|
||||
// Generated Zod strips unknown keys; the server rejects them with 400.
|
||||
expect(parsed).not.toHaveProperty("rec_score");
|
||||
expect(parsed).not.toHaveProperty("members");
|
||||
expect(parsed).not.toHaveProperty("candidate_minimum");
|
||||
expect(parsed.salary?.value).not.toHaveProperty("candidate_minimum");
|
||||
});
|
||||
});
|
||||
|
||||
const updateSchemas = [
|
||||
["NeedUpdate", NeedUpdate],
|
||||
["UpdateOrganizationNeedBody", UpdateOrganizationNeedBody],
|
||||
] as const;
|
||||
|
||||
describe.each(updateSchemas)("generated %s", (_name, schema) => {
|
||||
it("confirms suggestions and keeps others open explicitly", () => {
|
||||
const parsed = schema.parse({
|
||||
expected_version: 1,
|
||||
specialization: { value: "backend", status: "confirmed" },
|
||||
grade: { value: "middle", status: "confirmed" },
|
||||
domain: { value: "платежи", status: "extracted" },
|
||||
required_skills: [{ name: "Temporal", status: "confirmed" }],
|
||||
desired_skills: [{ name: "Kafka", status: "extracted" }],
|
||||
salary: { value: { ...salary, tax_basis: "gross" }, status: "confirmed" },
|
||||
});
|
||||
|
||||
expect(parsed.domain).toEqual({ value: "платежи", status: "extracted" });
|
||||
expect(parsed.desired_skills).toEqual([{ name: "Kafka", status: "extracted" }]);
|
||||
});
|
||||
|
||||
it("keeps null, which removes a requirement, apart from an absent field", () => {
|
||||
const parsed = schema.parse({ expected_version: 3, grade: null, salary: null, tasks: [] });
|
||||
|
||||
expect(parsed).toEqual({ expected_version: 3, grade: null, salary: null, tasks: [] });
|
||||
expect(parsed).not.toHaveProperty("specialization");
|
||||
});
|
||||
|
||||
it("rejects a list sent as null", () => {
|
||||
expect(schema.safeParse({ expected_version: 3, tasks: null }).success).toBe(false);
|
||||
});
|
||||
|
||||
it.each([
|
||||
["missing", {}],
|
||||
["zero", { expected_version: 0 }],
|
||||
["fractional", { expected_version: 1.5 }],
|
||||
["text", { expected_version: "1" }],
|
||||
])("rejects an expected_version that is %s", (_case, version) => {
|
||||
const result = schema.safeParse({ ...version, grade: null });
|
||||
|
||||
expect(result.success).toBe(false);
|
||||
expect(result.error?.issues).toEqual([expect.objectContaining({ path: ["expected_version"] })]);
|
||||
});
|
||||
});
|
||||
|
||||
it("parses a need whose unknown fields stay null instead of guessed values", () => {
|
||||
const unknown = { status: "unknown", value: null, source: null } as const;
|
||||
const parsed = Need.parse({
|
||||
id: "01928f7a-3c4d-7e5f-8a6b-7c8d9e0f1a23",
|
||||
organization_id: "01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01",
|
||||
vacancy_id: null,
|
||||
title: "Backend в команду платежей",
|
||||
source_text: "Ищем бэкенд-разработчика. Обязательно: Go и Temporal.",
|
||||
version: 1,
|
||||
requirements_version: 1,
|
||||
requirements: {
|
||||
specialization: {
|
||||
status: "extracted",
|
||||
value: "backend",
|
||||
source: {
|
||||
origin: "extracted_from_text",
|
||||
quote: "Ищем бэкенд-разработчика",
|
||||
extracted_in_version: 1,
|
||||
extraction_version: "need-rules.2026-10.1",
|
||||
},
|
||||
},
|
||||
grade: unknown,
|
||||
required_skills: [
|
||||
{
|
||||
name: "Temporal",
|
||||
taxonomy_code: null,
|
||||
status: "extracted",
|
||||
source: {
|
||||
origin: "extracted_from_text",
|
||||
quote: "Обязательно: Go и Temporal",
|
||||
extracted_in_version: 1,
|
||||
extraction_version: "need-rules.2026-10.1",
|
||||
},
|
||||
},
|
||||
],
|
||||
desired_skills: [],
|
||||
tasks: [],
|
||||
domain: unknown,
|
||||
work_formats: unknown,
|
||||
location: unknown,
|
||||
salary: unknown,
|
||||
},
|
||||
readiness: {
|
||||
status: "incomplete",
|
||||
missing_fields: [
|
||||
{
|
||||
field: "grade",
|
||||
reason: "unknown",
|
||||
question: "Какой грейд нужен: Intern, Junior, Middle или Senior?",
|
||||
},
|
||||
],
|
||||
},
|
||||
recommendations: {
|
||||
status: "not_available",
|
||||
requirements_version: 1,
|
||||
policy_version: null,
|
||||
algorithm_version: null,
|
||||
computed_at: null,
|
||||
categories: [],
|
||||
},
|
||||
created_at: "2026-10-06T09:00:00Z",
|
||||
updated_at: "2026-10-06T09:00:00Z",
|
||||
});
|
||||
|
||||
expect(parsed.requirements.grade).toEqual(unknown);
|
||||
expect(parsed.requirements.salary.value).toBeNull();
|
||||
expect(parsed.requirements.required_skills[0]?.taxonomy_code).toBeNull();
|
||||
expect(parsed.requirements.required_skills[0]?.source.extracted_in_version).toBe(1);
|
||||
});
|
||||
|
||||
it("parses a recommendation whose small group hides the score", () => {
|
||||
const parsed = NeedCategoryRecommendation.parse({
|
||||
specialization: "backend",
|
||||
grade: "intern",
|
||||
score: null,
|
||||
skill_overlap: { share: 0.8, covered_skills: ["Go"], uncovered_skills: ["Docker"] },
|
||||
money: { status: "withheld", share: null },
|
||||
supply: "fewer_than_5",
|
||||
});
|
||||
|
||||
expect(parsed.score).toBeNull();
|
||||
expect(
|
||||
NeedCategoryRecommendation.safeParse({ ...parsed, money: { status: "hidden", share: null } })
|
||||
.success,
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
type ForbiddenRequestKey =
|
||||
| "rec_score"
|
||||
| "score"
|
||||
| "recommendations"
|
||||
| "candidate_minimum"
|
||||
| "salary_minimum"
|
||||
| "minimum"
|
||||
| "members"
|
||||
| "membership"
|
||||
| "role"
|
||||
| "organization_id"
|
||||
| "version"
|
||||
| "requirements_version"
|
||||
| "readiness"
|
||||
| "source"
|
||||
| "origin"
|
||||
| "quote";
|
||||
|
||||
type ItemOf<T> = T extends readonly (infer Item)[] ? Item : never;
|
||||
|
||||
it("exposes request DTOs without membership, candidate minimum, or recommendation fields", () => {
|
||||
expectTypeOf<Extract<keyof NeedCreate, ForbiddenRequestKey>>().toEqualTypeOf<never>();
|
||||
expectTypeOf<Extract<keyof NeedUpdate, ForbiddenRequestKey>>().toEqualTypeOf<never>();
|
||||
expectTypeOf<
|
||||
Extract<keyof NonNullable<NeedCreate["salary"]>, ForbiddenRequestKey>
|
||||
>().toEqualTypeOf<never>();
|
||||
expectTypeOf<
|
||||
Extract<keyof NonNullable<NeedUpdate["salary"]>["value"], ForbiddenRequestKey>
|
||||
>().toEqualTypeOf<never>();
|
||||
expectTypeOf<
|
||||
Extract<keyof NonNullable<NeedUpdate["grade"]>, ForbiddenRequestKey>
|
||||
>().toEqualTypeOf<never>();
|
||||
expectTypeOf<
|
||||
Extract<keyof ItemOf<NonNullable<NeedUpdate["required_skills"]>>, ForbiddenRequestKey>
|
||||
>().toEqualTypeOf<never>();
|
||||
// A field decision always carries an explicit status, so a round-tripped
|
||||
// form cannot confirm a suggestion without saying so.
|
||||
expectTypeOf<NonNullable<NeedUpdate["grade"]>["status"]>().toEqualTypeOf<
|
||||
"confirmed" | "extracted"
|
||||
>();
|
||||
expectTypeOf(createOrganizationNeed).parameter(1).toEqualTypeOf<NeedCreate>();
|
||||
expectTypeOf(updateOrganizationNeed).parameter(2).toEqualTypeOf<NeedUpdate>();
|
||||
});
|
||||
@@ -13,4 +13,3 @@ export * from './questionnaireVersion.zod';
|
||||
export * from './saveMyQuestionnaireBody.zod';
|
||||
export * from './stackTag.zod';
|
||||
export * from './workContext.zod';
|
||||
export * from './workFormat.zod';
|
||||
@@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
export * from './gradeCode.zod';
|
||||
export * from './pageInfo.zod';
|
||||
export * from './problem.zod';
|
||||
export * from './problemCode.zod';
|
||||
export * from './problemFieldError.zod';
|
||||
@@ -14,8 +13,10 @@ export * from './problemFieldLocation.zod';
|
||||
export * from './specializationCode.zod';
|
||||
export * from './taskLanguage.zod';
|
||||
export * from './timestamp.zod';
|
||||
export * from './workFormat.zod';
|
||||
export * from './assessment';
|
||||
export * from './candidate';
|
||||
export * from './catalog';
|
||||
export * from './health';
|
||||
export * from './identity';
|
||||
export * from './need';
|
||||
@@ -0,0 +1,101 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const createOrganizationNeedBodyTitleMax = 200;
|
||||
|
||||
|
||||
export const createOrganizationNeedBodyTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const createOrganizationNeedBodySourceTextOneMax = 10000;
|
||||
|
||||
export const createOrganizationNeedBodyRequiredSkillsItemNameMax = 100;
|
||||
|
||||
|
||||
export const createOrganizationNeedBodyRequiredSkillsItemNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const createOrganizationNeedBodyRequiredSkillsMax = 30;
|
||||
|
||||
export const createOrganizationNeedBodyDesiredSkillsItemNameMax = 100;
|
||||
|
||||
|
||||
export const createOrganizationNeedBodyDesiredSkillsItemNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const createOrganizationNeedBodyDesiredSkillsMax = 30;
|
||||
|
||||
export const createOrganizationNeedBodyTasksItemTextMax = 300;
|
||||
|
||||
|
||||
export const createOrganizationNeedBodyTasksItemTextRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const createOrganizationNeedBodyTasksMax = 20;
|
||||
|
||||
export const createOrganizationNeedBodyDomainOneValueMax = 100;
|
||||
|
||||
|
||||
export const createOrganizationNeedBodyDomainOneValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const createOrganizationNeedBodyWorkFormatsOneValueMax = 3;
|
||||
|
||||
export const createOrganizationNeedBodyLocationOneValueMax = 100;
|
||||
|
||||
|
||||
export const createOrganizationNeedBodyLocationOneValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const createOrganizationNeedBodySalaryOneValueSalaryFromMin = 1000;
|
||||
export const createOrganizationNeedBodySalaryOneValueSalaryFromMax = 100000000;
|
||||
export const createOrganizationNeedBodySalaryOneValueSalaryFromMultipleOf = 1000;
|
||||
|
||||
export const createOrganizationNeedBodySalaryOneValueSalaryToMin = 1000;
|
||||
export const createOrganizationNeedBodySalaryOneValueSalaryToMax = 100000000;
|
||||
export const createOrganizationNeedBodySalaryOneValueSalaryToMultipleOf = 1000;
|
||||
|
||||
|
||||
export const CreateOrganizationNeedBody = zod.object({
|
||||
"title": zod.string().min(1).max(createOrganizationNeedBodyTitleMax).regex(createOrganizationNeedBodyTitleRegExp).describe('Short name of the need inside the organization, for example "Backend for the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"vacancy_id": zod.uuid().nullish().describe('Vacancy of the same organization to link, or null or absent for a need without a vacancy.'),
|
||||
"source_text": zod.union([zod.string().min(1).max(createOrganizationNeedBodySourceTextOneMax).describe('Free description of the team\'s tasks as the employer wrote or pasted it. The server extracts proposed requirements from it; the text itself is never a requirement. It may contain line breaks. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of candidates. The server stores it as written: it may contain requirements that discriminate by a protected characteristic, and the extractor never turns such a requirement into a need field. Exclusions, the requirements that a candidate must not meet, are planned as a separate additive field with the Labor Code article 64 check (TASK-182).'),zod.null()]).exactOptional(),
|
||||
"specialization": zod.union([zod.object({
|
||||
"value": 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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the specialization in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"grade": zod.union([zod.object({
|
||||
"value": 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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the grade in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"required_skills": zod.array(zod.object({
|
||||
"name": zod.string().min(1).max(createOrganizationNeedBodyRequiredSkillsItemNameMax).regex(createOrganizationNeedBodyRequiredSkillsItemNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('One skill of a list in a request. A name that equals, without regard to letter case, a skill of the current version in either skill list refers to that skill and keeps its origin, quote, and taxonomy code; this is how an extracted skill is confirmed or moved between the required and desired lists. Any other name is a new manual skill. `status` follows the rules of NeedUpdate: `extracted` for a name that is not a stored suggestion answers 400 validation_failed with the pointer of that `status`, for example `/required_skills/2/status`. A name repeated within or across the two skill lists answers 400 with the pointer of the later `name`.')).max(createOrganizationNeedBodyRequiredSkillsMax).exactOptional(),
|
||||
"desired_skills": zod.array(zod.object({
|
||||
"name": zod.string().min(1).max(createOrganizationNeedBodyDesiredSkillsItemNameMax).regex(createOrganizationNeedBodyDesiredSkillsItemNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('One skill of a list in a request. A name that equals, without regard to letter case, a skill of the current version in either skill list refers to that skill and keeps its origin, quote, and taxonomy code; this is how an extracted skill is confirmed or moved between the required and desired lists. Any other name is a new manual skill. `status` follows the rules of NeedUpdate: `extracted` for a name that is not a stored suggestion answers 400 validation_failed with the pointer of that `status`, for example `/required_skills/2/status`. A name repeated within or across the two skill lists answers 400 with the pointer of the later `name`.')).max(createOrganizationNeedBodyDesiredSkillsMax).exactOptional(),
|
||||
"tasks": zod.array(zod.object({
|
||||
"text": zod.string().min(1).max(createOrganizationNeedBodyTasksItemTextMax).regex(createOrganizationNeedBodyTasksItemTextRegExp).describe('One work task of the team, for example "Move the payout service to an event model". 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('One task of the list in a request. A text equal to a task of the current version refers to that task and keeps its origin and quote; any other text is a new manual task. `status` and repeated texts follow the rules of NeedSkillInput.')).max(createOrganizationNeedBodyTasksMax).exactOptional(),
|
||||
"domain": zod.union([zod.object({
|
||||
"value": zod.string().min(1).max(createOrganizationNeedBodyDomainOneValueMax).regex(createOrganizationNeedBodyDomainOneValueRegExp).describe('Business domain of the work, for example payments or logistics, as free text. Plain text without line breaks; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the domain in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"work_formats": zod.union([zod.object({
|
||||
"value": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(createOrganizationNeedBodyWorkFormatsOneValueMax),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the work formats in a request; see NeedUpdate for the rules of `status`. Formats are compared as a set.'),zod.null()]).exactOptional(),
|
||||
"location": zod.union([zod.object({
|
||||
"value": zod.string().min(1).max(createOrganizationNeedBodyLocationOneValueMax).regex(createOrganizationNeedBodyLocationOneValueRegExp).describe('Place of work for the office or hybrid format, for example a city, as free text. It describes the employer\'s office, never a candidate\'s address. Plain text without line breaks; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the place of work in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"salary": zod.union([zod.object({
|
||||
"value": zod.object({
|
||||
"salary_from": zod.int().min(createOrganizationNeedBodySalaryOneValueSalaryFromMin).max(createOrganizationNeedBodySalaryOneValueSalaryFromMax).multipleOf(createOrganizationNeedBodySalaryOneValueSalaryFromMultipleOf).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.'),
|
||||
"salary_to": zod.int().min(createOrganizationNeedBodySalaryOneValueSalaryToMin).max(createOrganizationNeedBodySalaryOneValueSalaryToMax).multipleOf(createOrganizationNeedBodySalaryOneValueSalaryToMultipleOf).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('Salary range `[A; B]` in whole rubles with its base: the currency, the pay period, and the tax basis (PRD FR13). The schema requires every field, bounds that are positive multiples of 1000, and the known currency, period, and basis. The server checks the cross-field rules in integer arithmetic: `salary_from < salary_to`, and a width `(B - A) / ((A + B) / 2)` from 10% to 40% inclusive, that is `20 * (B - A) >= A + B` and `5 * (B - A) <= A + B`. A violation answers 400 validation_failed with the pointer of `salary_to` in the request, for example `/salary/value/salary_to`. For example, `[95000; 105000]` has a width of exactly 10% and `[80000; 120000]` exactly 40%; both are accepted. The rules are the same for a need and an invitation.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the salary range in a request; see NeedUpdate for the rules of `status` and SalaryRange for the rules of the range, whose pointers are under `/salary/value`.'),zod.null()]).exactOptional()
|
||||
}).describe('New need. Only `title` is required, so a need can start from a title, from a text, or from form fields, and with or without a vacancy. A field or list item given here must have `status` `confirmed` and becomes a confirmed manual value; `extracted` answers 400 with the pointer of that `status`, such as `/grade/status`, because a new need has no stored suggestion. A field that is absent is extracted from `source_text` when the text is given and is left unknown or empty otherwise. A nullable field sent as null, and a skill or task list sent as an empty list, stays unknown or empty and is not extracted; an empty `work_formats` value fails `minItems`. Unknown fields are rejected, so a request cannot set membership, a role, a status of the need, a provenance, readiness, a recommendation or its score, or a candidate\'s salary minimum.')
|
||||
|
||||
export type CreateOrganizationNeedBody = zod.input<typeof CreateOrganizationNeedBody>;
|
||||
export type CreateOrganizationNeedBodyOutput = zod.output<typeof CreateOrganizationNeedBody>;
|
||||
@@ -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 createOrganizationNeedHeadersIdempotencyKeyMax = 255;
|
||||
|
||||
|
||||
export const createOrganizationNeedHeadersIdempotencyKeyRegExp = new RegExp('^[A-Za-z0-9._:-]+$');
|
||||
|
||||
export const CreateOrganizationNeedHeaders = zod.object({
|
||||
"Idempotency-Key": zod.string().min(1).max(createOrganizationNeedHeadersIdempotencyKeyMax).regex(createOrganizationNeedHeadersIdempotencyKeyRegExp)
|
||||
})
|
||||
|
||||
export type CreateOrganizationNeedHeaders = zod.input<typeof CreateOrganizationNeedHeaders>;
|
||||
export type CreateOrganizationNeedHeadersOutput = zod.output<typeof CreateOrganizationNeedHeaders>;
|
||||
@@ -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 CurrencyCode = zod.enum(['RUB']).describe('ISO 4217 currency code. The MVP accepts only RUB; adding a value is a contract change.')
|
||||
|
||||
export type CurrencyCode = zod.input<typeof CurrencyCode>;
|
||||
export type CurrencyCodeOutput = zod.output<typeof CurrencyCode>;
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export * from './createOrganizationNeedBody.zod';
|
||||
export * from './createOrganizationNeedHeaders.zod';
|
||||
export * from './currencyCode.zod';
|
||||
export * from './listOrganizationNeedsParams.zod';
|
||||
export * from './need.zod';
|
||||
export * from './needCategoryRecommendation.zod';
|
||||
export * from './needCategoryRecommendations.zod';
|
||||
export * from './needCreate.zod';
|
||||
export * from './needDomain.zod';
|
||||
export * from './needDomainInput.zod';
|
||||
export * from './needDomainName.zod';
|
||||
export * from './needFieldName.zod';
|
||||
export * from './needGrade.zod';
|
||||
export * from './needGradeInput.zod';
|
||||
export * from './needItemStatus.zod';
|
||||
export * from './needList.zod';
|
||||
export * from './needLocation.zod';
|
||||
export * from './needLocationInput.zod';
|
||||
export * from './needLocationName.zod';
|
||||
export * from './needMissingField.zod';
|
||||
export * from './needMissingReason.zod';
|
||||
export * from './needMoneyFit.zod';
|
||||
export * from './needMoneyStatus.zod';
|
||||
export * from './needReadinessReport.zod';
|
||||
export * from './needReadinessStatus.zod';
|
||||
export * from './needRecommendationStatus.zod';
|
||||
export * from './needRequirementSet.zod';
|
||||
export * from './needSalary.zod';
|
||||
export * from './needSalaryInput.zod';
|
||||
export * from './needSkill.zod';
|
||||
export * from './needSkillInput.zod';
|
||||
export * from './needSkillOverlap.zod';
|
||||
export * from './needSourceQuote.zod';
|
||||
export * from './needSourceText.zod';
|
||||
export * from './needSpecialization.zod';
|
||||
export * from './needSpecializationInput.zod';
|
||||
export * from './needSummary.zod';
|
||||
export * from './needSupplyBand.zod';
|
||||
export * from './needTask.zod';
|
||||
export * from './needTaskInput.zod';
|
||||
export * from './needTaskText.zod';
|
||||
export * from './needTitle.zod';
|
||||
export * from './needUpdate.zod';
|
||||
export * from './needValueOrigin.zod';
|
||||
export * from './needValueSource.zod';
|
||||
export * from './needValueStatus.zod';
|
||||
export * from './needVersion.zod';
|
||||
export * from './needVersionLabel.zod';
|
||||
export * from './needWorkFormats.zod';
|
||||
export * from './needWorkFormatsInput.zod';
|
||||
export * from './pageInfo.zod';
|
||||
export * from './rubAmount.zod';
|
||||
export * from './salaryPeriod.zod';
|
||||
export * from './salaryRange.zod';
|
||||
export * from './salaryTaxBasis.zod';
|
||||
export * from './skillName.zod';
|
||||
export * from './skillTaxonomyCode.zod';
|
||||
export * from './updateOrganizationNeedBody.zod';
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const listOrganizationNeedsParamsLimitDefault = 20;
|
||||
export const listOrganizationNeedsParamsLimitMax = 100;
|
||||
|
||||
export const listOrganizationNeedsParamsCursorMax = 512;
|
||||
|
||||
|
||||
export const listOrganizationNeedsParamsCursorRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
|
||||
export const ListOrganizationNeedsParams = zod.object({
|
||||
"limit": zod.int().min(1).max(listOrganizationNeedsParamsLimitMax).default(listOrganizationNeedsParamsLimitDefault),
|
||||
"cursor": zod.string().min(1).max(listOrganizationNeedsParamsCursorMax).regex(listOrganizationNeedsParamsCursorRegExp).exactOptional()
|
||||
})
|
||||
|
||||
export type ListOrganizationNeedsParams = zod.input<typeof ListOrganizationNeedsParams>;
|
||||
export type ListOrganizationNeedsParamsOutput = zod.output<typeof ListOrganizationNeedsParams>;
|
||||
@@ -0,0 +1,301 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const needTitleMax = 200;
|
||||
|
||||
|
||||
export const needTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needSourceTextOneMax = 10000;
|
||||
|
||||
|
||||
|
||||
export const needRequirementsSpecializationSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementsSpecializationSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementsSpecializationSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementsGradeSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementsGradeSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementsGradeSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementsRequiredSkillsItemNameMax = 100;
|
||||
|
||||
|
||||
export const needRequirementsRequiredSkillsItemNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needRequirementsRequiredSkillsItemTaxonomyCodeOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementsRequiredSkillsItemTaxonomyCodeOneRegExp = new RegExp('^[a-z0-9][a-z0-9_.+#-]*$');
|
||||
export const needRequirementsRequiredSkillsItemSourceQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementsRequiredSkillsItemSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementsRequiredSkillsItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementsRequiredSkillsMax = 30;
|
||||
|
||||
export const needRequirementsDesiredSkillsItemNameMax = 100;
|
||||
|
||||
|
||||
export const needRequirementsDesiredSkillsItemNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needRequirementsDesiredSkillsItemTaxonomyCodeOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementsDesiredSkillsItemTaxonomyCodeOneRegExp = new RegExp('^[a-z0-9][a-z0-9_.+#-]*$');
|
||||
export const needRequirementsDesiredSkillsItemSourceQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementsDesiredSkillsItemSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementsDesiredSkillsItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementsDesiredSkillsMax = 30;
|
||||
|
||||
export const needRequirementsTasksItemTextMax = 300;
|
||||
|
||||
|
||||
export const needRequirementsTasksItemTextRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needRequirementsTasksItemSourceQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementsTasksItemSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementsTasksItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementsTasksMax = 20;
|
||||
|
||||
export const needRequirementsDomainValueOneMax = 100;
|
||||
|
||||
|
||||
export const needRequirementsDomainValueOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needRequirementsDomainSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementsDomainSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementsDomainSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementsWorkFormatsValueMax = 3;
|
||||
|
||||
export const needRequirementsWorkFormatsSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementsWorkFormatsSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementsWorkFormatsSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementsLocationValueOneMax = 100;
|
||||
|
||||
|
||||
export const needRequirementsLocationValueOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needRequirementsLocationSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementsLocationSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementsLocationSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementsSalaryValueOneSalaryFromMin = 1000;
|
||||
export const needRequirementsSalaryValueOneSalaryFromMax = 100000000;
|
||||
export const needRequirementsSalaryValueOneSalaryFromMultipleOf = 1000;
|
||||
|
||||
export const needRequirementsSalaryValueOneSalaryToMin = 1000;
|
||||
export const needRequirementsSalaryValueOneSalaryToMax = 100000000;
|
||||
export const needRequirementsSalaryValueOneSalaryToMultipleOf = 1000;
|
||||
|
||||
export const needRequirementsSalarySourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementsSalarySourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementsSalarySourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needReadinessMissingFieldsItemQuestionMax = 300;
|
||||
|
||||
export const needReadinessMissingFieldsMax = 9;
|
||||
|
||||
|
||||
|
||||
export const needRecommendationsAlgorithmVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRecommendationsAlgorithmVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRecommendationsCategoriesItemScoreMin = 0;
|
||||
export const needRecommendationsCategoriesItemScoreMax = 1;
|
||||
|
||||
export const needRecommendationsCategoriesItemSkillOverlapShareMin = 0;
|
||||
export const needRecommendationsCategoriesItemSkillOverlapShareMax = 1;
|
||||
|
||||
export const needRecommendationsCategoriesItemSkillOverlapCoveredSkillsItemMax = 100;
|
||||
|
||||
|
||||
export const needRecommendationsCategoriesItemSkillOverlapCoveredSkillsItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needRecommendationsCategoriesItemSkillOverlapCoveredSkillsMax = 60;
|
||||
|
||||
export const needRecommendationsCategoriesItemSkillOverlapUncoveredSkillsItemMax = 100;
|
||||
|
||||
|
||||
export const needRecommendationsCategoriesItemSkillOverlapUncoveredSkillsItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needRecommendationsCategoriesItemSkillOverlapUncoveredSkillsMax = 60;
|
||||
|
||||
export const needRecommendationsCategoriesItemMoneyShareMin = 0;
|
||||
export const needRecommendationsCategoriesItemMoneyShareMax = 1;
|
||||
|
||||
export const needRecommendationsCategoriesMax = 10;
|
||||
|
||||
|
||||
export const Need = zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the need.'),
|
||||
"organization_id": zod.uuid().describe('Organization that owns the need, equal to `org_id` of the path. It never changes.'),
|
||||
"vacancy_id": zod.uuid().nullable().describe('Linked vacancy of the same organization, or null. A need never requires a vacancy.'),
|
||||
"title": zod.string().min(1).max(needTitleMax).regex(needTitleRegExp).describe('Short name of the need inside the organization, for example "Backend for the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"source_text": zod.union([zod.string().min(1).max(needSourceTextOneMax).describe('Free description of the team\'s tasks as the employer wrote or pasted it. The server extracts proposed requirements from it; the text itself is never a requirement. It may contain line breaks. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of candidates. The server stores it as written: it may contain requirements that discriminate by a protected characteristic, and the extractor never turns such a requirement into a need field. Exclusions, the requirements that a candidate must not meet, are planned as a separate additive field with the Labor Code article 64 check (TASK-182).'),zod.null()]).describe('Text the requirements were extracted from, or null.'),
|
||||
"version": zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),
|
||||
"requirements_version": zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.').describe('Need version in which the current confirmed requirements were last changed, at most `version`. A change that confirms, changes, or removes a requirement makes it equal to the new `version`. A change of the title, the vacancy link, or the text, or of suggestions only, creates a new `version` but keeps `requirements_version`, so it invalidates neither the recommendations nor search results and selection snapshots. Search runs and selection snapshots (PRD FR10) refer to `(need id, requirements_version)`, and a new selection snapshot is due only when it changes.'),
|
||||
"requirements": zod.object({
|
||||
"specialization": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.union([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.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementsSpecializationSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementsSpecializationSourceOneExtractionVersionOneMax).regex(needRequirementsSpecializationSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Target specialization of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`.'),
|
||||
"grade": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": 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()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementsGradeSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementsGradeSourceOneExtractionVersionOneMax).regex(needRequirementsGradeSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Target grade of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`; a text that names no grade leaves the grade unknown instead of assuming one.'),
|
||||
"required_skills": zod.array(zod.object({
|
||||
"name": zod.string().min(1).max(needRequirementsRequiredSkillsItemNameMax).regex(needRequirementsRequiredSkillsItemNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.'),
|
||||
"taxonomy_code": zod.union([zod.string().min(1).max(needRequirementsRequiredSkillsItemTaxonomyCodeOneMax).regex(needRequirementsRequiredSkillsItemTaxonomyCodeOneRegExp).describe('Code of a skill in the platform skill taxonomy, for example `postgresql`. The server assigns it from the taxonomy; clients never send it and never derive it from the name.'),zod.null()]),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementsRequiredSkillsItemSourceQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementsRequiredSkillsItemSourceExtractionVersionOneMax).regex(needRequirementsRequiredSkillsItemSourceExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.')
|
||||
}).describe('One required or desired skill of the need. `taxonomy_code` is null for a skill that the platform taxonomy does not know: the server keeps the name as given, never maps it to a guessed code, and counts it as not covered in category recommendations.')).max(needRequirementsRequiredSkillsMax).describe('Required skills; each has weight 2 in skill coverage. Only confirmed skills count.'),
|
||||
"desired_skills": zod.array(zod.object({
|
||||
"name": zod.string().min(1).max(needRequirementsDesiredSkillsItemNameMax).regex(needRequirementsDesiredSkillsItemNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.'),
|
||||
"taxonomy_code": zod.union([zod.string().min(1).max(needRequirementsDesiredSkillsItemTaxonomyCodeOneMax).regex(needRequirementsDesiredSkillsItemTaxonomyCodeOneRegExp).describe('Code of a skill in the platform skill taxonomy, for example `postgresql`. The server assigns it from the taxonomy; clients never send it and never derive it from the name.'),zod.null()]),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementsDesiredSkillsItemSourceQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementsDesiredSkillsItemSourceExtractionVersionOneMax).regex(needRequirementsDesiredSkillsItemSourceExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.')
|
||||
}).describe('One required or desired skill of the need. `taxonomy_code` is null for a skill that the platform taxonomy does not know: the server keeps the name as given, never maps it to a guessed code, and counts it as not covered in category recommendations.')).max(needRequirementsDesiredSkillsMax).describe('Desired skills; each has weight 1 in skill coverage. Only confirmed skills count.'),
|
||||
"tasks": zod.array(zod.object({
|
||||
"text": zod.string().min(1).max(needRequirementsTasksItemTextMax).regex(needRequirementsTasksItemTextRegExp).describe('One work task of the team, for example "Move the payout service to an event model". 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementsTasksItemSourceQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementsTasksItemSourceExtractionVersionOneMax).regex(needRequirementsTasksItemSourceExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.')
|
||||
}).describe('One work task of the team with its confirmation state and provenance.')).max(needRequirementsTasksMax).describe('Work tasks of the team in the order given.'),
|
||||
"domain": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.union([zod.string().min(1).max(needRequirementsDomainValueOneMax).regex(needRequirementsDomainValueOneRegExp).describe('Business domain of the work, for example payments or logistics, as free text. 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_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementsDomainSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementsDomainSourceOneExtractionVersionOneMax).regex(needRequirementsDomainSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Business domain of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`.'),
|
||||
"work_formats": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(needRequirementsWorkFormatsValueMax).nullable(),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementsWorkFormatsSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementsWorkFormatsSourceOneExtractionVersionOneMax).regex(needRequirementsWorkFormatsSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Work formats that the employer offers, with their confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`; a known value lists one to three formats.'),
|
||||
"location": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.union([zod.string().min(1).max(needRequirementsLocationValueOneMax).regex(needRequirementsLocationValueOneRegExp).describe('Place of work for the office or hybrid format, for example a city, as free text. It describes the employer\'s office, never a candidate\'s address. 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_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementsLocationSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementsLocationSourceOneExtractionVersionOneMax).regex(needRequirementsLocationSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Place of work with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`. Readiness requires a confirmed place only when the confirmed work formats include `office` or `hybrid`.'),
|
||||
"salary": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.union([zod.object({
|
||||
"salary_from": zod.int().min(needRequirementsSalaryValueOneSalaryFromMin).max(needRequirementsSalaryValueOneSalaryFromMax).multipleOf(needRequirementsSalaryValueOneSalaryFromMultipleOf).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.'),
|
||||
"salary_to": zod.int().min(needRequirementsSalaryValueOneSalaryToMin).max(needRequirementsSalaryValueOneSalaryToMax).multipleOf(needRequirementsSalaryValueOneSalaryToMultipleOf).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('Salary range `[A; B]` in whole rubles with its base: the currency, the pay period, and the tax basis (PRD FR13). The schema requires every field, bounds that are positive multiples of 1000, and the known currency, period, and basis. The server checks the cross-field rules in integer arithmetic: `salary_from < salary_to`, and a width `(B - A) / ((A + B) / 2)` from 10% to 40% inclusive, that is `20 * (B - A) >= A + B` and `5 * (B - A) <= A + B`. A violation answers 400 validation_failed with the pointer of `salary_to` in the request, for example `/salary/value/salary_to`. For example, `[95000; 105000]` has a width of exactly 10% and `[80000; 120000]` exactly 40%; both are accepted. The rules are the same for a need and an invitation.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementsSalarySourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementsSalarySourceOneExtractionVersionOneMax).regex(needRequirementsSalarySourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Salary range that the employer offers, with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`. A text without a salary leaves it unknown; the server never substitutes zero, a market estimate, or a range from another need.')
|
||||
}).describe('Requirements of one need version, each with its confirmation state and provenance. Read-only; requests change them through the fields of NeedCreate and NeedUpdate.'),
|
||||
"readiness": zod.object({
|
||||
"status": zod.enum(['complete', 'incomplete']).describe('`complete` when every critical field has a confirmed value, otherwise `incomplete`.'),
|
||||
"missing_fields": zod.array(zod.object({
|
||||
"field": zod.enum(['specialization', 'grade', 'required_skills', 'desired_skills', 'tasks', 'domain', 'work_formats', 'location', 'salary']).describe('Name of a need field, equal to its property name in NeedRequirementSet and in the request bodies. Adding a value is a contract change.'),
|
||||
"reason": zod.enum(['unknown', 'unconfirmed']).describe('Why a critical field is missing: `unknown`, the field has no value, or `unconfirmed`, it has only an extracted value or, for required skills, only extracted items that wait for confirmation.'),
|
||||
"question": zod.string().min(1).max(needReadinessMissingFieldsItemQuestionMax).describe('Specific Russian question about the missing value, for example which grade is needed. Plain text; the client shows it as text, never as HTML.')
|
||||
}).describe('One critical field that has no confirmed value, with a specific question that the client shows next to the field.')).max(needReadinessMissingFieldsMax).describe('Critical fields without a confirmed value, each at most once, in the order of NeedFieldName. Empty exactly when `status` is `complete`.')
|
||||
}).describe('Completeness of the critical fields, computed by the server for the current version. The critical fields are `specialization`, `grade`, `required_skills` (at least one confirmed skill), `work_formats`, `salary`, and `location` when the confirmed work formats include `office` or `hybrid`. An incomplete need is still a valid saved need; each later operation, such as search or an invitation, states which readiness it requires.'),
|
||||
"recommendations": zod.object({
|
||||
"status": zod.enum(['computed', 'pending', 'not_available']).describe('State of the category recommendations of the current requirements version.\n\n- computed: `categories` holds the recommendations computed from the confirmed requirements of `requirements_version`.\n- pending: the computation for the current requirements version has not finished yet; `categories` is empty. Read the need again later.\n- not_available: the current requirements have no confirmed required or desired skill to compute from; `categories` is empty.'),
|
||||
"requirements_version": zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),
|
||||
"policy_version": zod.int().min(1).nullable().describe('Number of the policy version whose weights were applied, or null unless `status` is `computed`.'),
|
||||
"algorithm_version": zod.union([zod.string().min(1).max(needRecommendationsAlgorithmVersionOneMax).regex(needRecommendationsAlgorithmVersionOneRegExp).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('Version of the recommendation algorithm, or null unless `status` is `computed`.'),
|
||||
"computed_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 computation, or null unless `status` is `computed`.'),
|
||||
"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.'),
|
||||
"score": zod.number().min(needRecommendationsCategoriesItemScoreMin).max(needRecommendationsCategoriesItemScoreMax).nullable().describe('Recommendation score from 0 to 1, rounded half up to two decimals, or null when `supply` is `fewer_than_5`. Read-only; no request can set it.'),
|
||||
"skill_overlap": zod.object({
|
||||
"share": zod.number().min(needRecommendationsCategoriesItemSkillOverlapShareMin).max(needRecommendationsCategoriesItemSkillOverlapShareMax).describe('Weighted share from 0 to 1, rounded to two decimals.'),
|
||||
"covered_skills": zod.array(zod.string().min(1).max(needRecommendationsCategoriesItemSkillOverlapCoveredSkillsItemMax).regex(needRecommendationsCategoriesItemSkillOverlapCoveredSkillsItemRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.')).max(needRecommendationsCategoriesItemSkillOverlapCoveredSkillsMax).describe('Confirmed skills of the need that the category covers.'),
|
||||
"uncovered_skills": zod.array(zod.string().min(1).max(needRecommendationsCategoriesItemSkillOverlapUncoveredSkillsItemMax).regex(needRecommendationsCategoriesItemSkillOverlapUncoveredSkillsItemRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.')).max(needRecommendationsCategoriesItemSkillOverlapUncoveredSkillsMax).describe('Confirmed skills of the need that the category does not cover, including skills without a taxonomy code.')
|
||||
}).describe('Skill coverage of a category: the weighted share of the confirmed skills of the need that the category taxonomy covers, with weight 2 for a required and 1 for a desired skill.'),
|
||||
"money": zod.object({
|
||||
"status": zod.enum(['computed', 'insufficient_data', 'no_salary', 'withheld']).describe('How the salary component of a recommendation was obtained.\n\n- computed: at least five available candidates of the category have a known minimum comparable with the confirmed range; `share` is given.\n- insufficient_data: fewer than five such candidates; the policy uses the neutral value 0.5 and `share` is null.\n- no_salary: the need has no confirmed salary range; the policy uses the neutral value 0.5 and `share` is null.\n- withheld: the organization changed salary ranges five times within seven days, so salary aggregates are withheld for seven days (PRD FR13, planned in TASK-211); the policy uses the neutral value 0.5 and `share` is null.\n\nAn unknown candidate minimum never counts as zero.'),
|
||||
"share": zod.number().min(needRecommendationsCategoriesItemMoneyShareMin).max(needRecommendationsCategoriesItemMoneyShareMax).nullable().describe('Share of those candidates whose minimum is not above the upper bound of the range, rounded down to a multiple of 0.25 (one of 0, 0.25, 0.5, 0.75, 1), or null unless `status` is `computed`. The score and the ranking use this rounded value, never the exact share. A quarter step gives five levels: each probe of a new upper bound tells at most which quarter of the group accepts it, and in the smallest allowed group of five candidates a single minimum often does not move the value, while the share still separates a range that most candidates accept from one that few accept.')
|
||||
}).describe('Salary component of a recommendation. It is an aggregate over at least five candidates and never reveals a minimum of any candidate.'),
|
||||
"supply": zod.enum(['fewer_than_5', 'from_5_to_29', '30_or_more']).describe('Number of available candidates of the category in the allowed detail: `fewer_than_5`, `from_5_to_29`, or `30_or_more`. Smaller groups are never counted exactly.')
|
||||
}).describe('One recommended category, a specialization with a grade, with its score and the reasons for it. The score is `0.5 * Overlap + 0.3 * Money + 0.2 * Supply` (PRD FR08) computed from the published components: the exact skill overlap, the money share rounded down to a quarter or the neutral 0.5, and `Supply = min(1, active / 30)` when at least five candidates are available. For a group of fewer than five, Supply enters the ranking as 0, the same for every such group, so neither the score nor the order reveals the exact size of a group below five.')).max(needRecommendationsCategoriesMax).describe('Recommended categories, best first by the score described in NeedCategoryRecommendation. Empty unless `status` is `computed`.')
|
||||
}).describe('Category recommendations computed by the server from the confirmed requirements of `requirements_version` with a versioned policy (PRD FR08). Read-only: no request can set a recommendation, a score, or one of its components. The server may recompute them for the same requirements version, for example for a new policy or a changed pool of available candidates, without a new need version; `computed_at` and `policy_version` then change. The policy version and the candidate group used are stored with each computation, so a later policy never rewrites it.'),
|
||||
"created_at": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),
|
||||
"updated_at": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.')
|
||||
}).describe('Hiring need of an organization: what the team needs, independent of any published vacancy. It holds the current version of the requirements with their provenance, the readiness of the critical fields, and the category recommendations. It never contains membership data, a candidate\'s personal data, or a candidate\'s salary minimum.')
|
||||
|
||||
export type Need = zod.input<typeof Need>;
|
||||
export type NeedOutput = zod.output<typeof Need>;
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const needCategoryRecommendationScoreMin = 0;
|
||||
export const needCategoryRecommendationScoreMax = 1;
|
||||
|
||||
export const needCategoryRecommendationSkillOverlapShareMin = 0;
|
||||
export const needCategoryRecommendationSkillOverlapShareMax = 1;
|
||||
|
||||
export const needCategoryRecommendationSkillOverlapCoveredSkillsItemMax = 100;
|
||||
|
||||
|
||||
export const needCategoryRecommendationSkillOverlapCoveredSkillsItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needCategoryRecommendationSkillOverlapCoveredSkillsMax = 60;
|
||||
|
||||
export const needCategoryRecommendationSkillOverlapUncoveredSkillsItemMax = 100;
|
||||
|
||||
|
||||
export const needCategoryRecommendationSkillOverlapUncoveredSkillsItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needCategoryRecommendationSkillOverlapUncoveredSkillsMax = 60;
|
||||
|
||||
export const needCategoryRecommendationMoneyShareMin = 0;
|
||||
export const needCategoryRecommendationMoneyShareMax = 1;
|
||||
|
||||
|
||||
export const NeedCategoryRecommendation = 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.'),
|
||||
"score": zod.number().min(needCategoryRecommendationScoreMin).max(needCategoryRecommendationScoreMax).nullable().describe('Recommendation score from 0 to 1, rounded half up to two decimals, or null when `supply` is `fewer_than_5`. Read-only; no request can set it.'),
|
||||
"skill_overlap": zod.object({
|
||||
"share": zod.number().min(needCategoryRecommendationSkillOverlapShareMin).max(needCategoryRecommendationSkillOverlapShareMax).describe('Weighted share from 0 to 1, rounded to two decimals.'),
|
||||
"covered_skills": zod.array(zod.string().min(1).max(needCategoryRecommendationSkillOverlapCoveredSkillsItemMax).regex(needCategoryRecommendationSkillOverlapCoveredSkillsItemRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.')).max(needCategoryRecommendationSkillOverlapCoveredSkillsMax).describe('Confirmed skills of the need that the category covers.'),
|
||||
"uncovered_skills": zod.array(zod.string().min(1).max(needCategoryRecommendationSkillOverlapUncoveredSkillsItemMax).regex(needCategoryRecommendationSkillOverlapUncoveredSkillsItemRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.')).max(needCategoryRecommendationSkillOverlapUncoveredSkillsMax).describe('Confirmed skills of the need that the category does not cover, including skills without a taxonomy code.')
|
||||
}).describe('Skill coverage of a category: the weighted share of the confirmed skills of the need that the category taxonomy covers, with weight 2 for a required and 1 for a desired skill.'),
|
||||
"money": zod.object({
|
||||
"status": zod.enum(['computed', 'insufficient_data', 'no_salary', 'withheld']).describe('How the salary component of a recommendation was obtained.\n\n- computed: at least five available candidates of the category have a known minimum comparable with the confirmed range; `share` is given.\n- insufficient_data: fewer than five such candidates; the policy uses the neutral value 0.5 and `share` is null.\n- no_salary: the need has no confirmed salary range; the policy uses the neutral value 0.5 and `share` is null.\n- withheld: the organization changed salary ranges five times within seven days, so salary aggregates are withheld for seven days (PRD FR13, planned in TASK-211); the policy uses the neutral value 0.5 and `share` is null.\n\nAn unknown candidate minimum never counts as zero.'),
|
||||
"share": zod.number().min(needCategoryRecommendationMoneyShareMin).max(needCategoryRecommendationMoneyShareMax).nullable().describe('Share of those candidates whose minimum is not above the upper bound of the range, rounded down to a multiple of 0.25 (one of 0, 0.25, 0.5, 0.75, 1), or null unless `status` is `computed`. The score and the ranking use this rounded value, never the exact share. A quarter step gives five levels: each probe of a new upper bound tells at most which quarter of the group accepts it, and in the smallest allowed group of five candidates a single minimum often does not move the value, while the share still separates a range that most candidates accept from one that few accept.')
|
||||
}).describe('Salary component of a recommendation. It is an aggregate over at least five candidates and never reveals a minimum of any candidate.'),
|
||||
"supply": zod.enum(['fewer_than_5', 'from_5_to_29', '30_or_more']).describe('Number of available candidates of the category in the allowed detail: `fewer_than_5`, `from_5_to_29`, or `30_or_more`. Smaller groups are never counted exactly.')
|
||||
}).describe('One recommended category, a specialization with a grade, with its score and the reasons for it. The score is `0.5 * Overlap + 0.3 * Money + 0.2 * Supply` (PRD FR08) computed from the published components: the exact skill overlap, the money share rounded down to a quarter or the neutral 0.5, and `Supply = min(1, active / 30)` when at least five candidates are available. For a group of fewer than five, Supply enters the ranking as 0, the same for every such group, so neither the score nor the order reveals the exact size of a group below five.')
|
||||
|
||||
export type NeedCategoryRecommendation = zod.input<typeof NeedCategoryRecommendation>;
|
||||
export type NeedCategoryRecommendationOutput = zod.output<typeof NeedCategoryRecommendation>;
|
||||
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
|
||||
|
||||
export const needCategoryRecommendationsAlgorithmVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needCategoryRecommendationsAlgorithmVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needCategoryRecommendationsCategoriesItemScoreMin = 0;
|
||||
export const needCategoryRecommendationsCategoriesItemScoreMax = 1;
|
||||
|
||||
export const needCategoryRecommendationsCategoriesItemSkillOverlapShareMin = 0;
|
||||
export const needCategoryRecommendationsCategoriesItemSkillOverlapShareMax = 1;
|
||||
|
||||
export const needCategoryRecommendationsCategoriesItemSkillOverlapCoveredSkillsItemMax = 100;
|
||||
|
||||
|
||||
export const needCategoryRecommendationsCategoriesItemSkillOverlapCoveredSkillsItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needCategoryRecommendationsCategoriesItemSkillOverlapCoveredSkillsMax = 60;
|
||||
|
||||
export const needCategoryRecommendationsCategoriesItemSkillOverlapUncoveredSkillsItemMax = 100;
|
||||
|
||||
|
||||
export const needCategoryRecommendationsCategoriesItemSkillOverlapUncoveredSkillsItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needCategoryRecommendationsCategoriesItemSkillOverlapUncoveredSkillsMax = 60;
|
||||
|
||||
export const needCategoryRecommendationsCategoriesItemMoneyShareMin = 0;
|
||||
export const needCategoryRecommendationsCategoriesItemMoneyShareMax = 1;
|
||||
|
||||
export const needCategoryRecommendationsCategoriesMax = 10;
|
||||
|
||||
|
||||
export const NeedCategoryRecommendations = zod.object({
|
||||
"status": zod.enum(['computed', 'pending', 'not_available']).describe('State of the category recommendations of the current requirements version.\n\n- computed: `categories` holds the recommendations computed from the confirmed requirements of `requirements_version`.\n- pending: the computation for the current requirements version has not finished yet; `categories` is empty. Read the need again later.\n- not_available: the current requirements have no confirmed required or desired skill to compute from; `categories` is empty.'),
|
||||
"requirements_version": zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),
|
||||
"policy_version": zod.int().min(1).nullable().describe('Number of the policy version whose weights were applied, or null unless `status` is `computed`.'),
|
||||
"algorithm_version": zod.union([zod.string().min(1).max(needCategoryRecommendationsAlgorithmVersionOneMax).regex(needCategoryRecommendationsAlgorithmVersionOneRegExp).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('Version of the recommendation algorithm, or null unless `status` is `computed`.'),
|
||||
"computed_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 computation, or null unless `status` is `computed`.'),
|
||||
"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.'),
|
||||
"score": zod.number().min(needCategoryRecommendationsCategoriesItemScoreMin).max(needCategoryRecommendationsCategoriesItemScoreMax).nullable().describe('Recommendation score from 0 to 1, rounded half up to two decimals, or null when `supply` is `fewer_than_5`. Read-only; no request can set it.'),
|
||||
"skill_overlap": zod.object({
|
||||
"share": zod.number().min(needCategoryRecommendationsCategoriesItemSkillOverlapShareMin).max(needCategoryRecommendationsCategoriesItemSkillOverlapShareMax).describe('Weighted share from 0 to 1, rounded to two decimals.'),
|
||||
"covered_skills": zod.array(zod.string().min(1).max(needCategoryRecommendationsCategoriesItemSkillOverlapCoveredSkillsItemMax).regex(needCategoryRecommendationsCategoriesItemSkillOverlapCoveredSkillsItemRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.')).max(needCategoryRecommendationsCategoriesItemSkillOverlapCoveredSkillsMax).describe('Confirmed skills of the need that the category covers.'),
|
||||
"uncovered_skills": zod.array(zod.string().min(1).max(needCategoryRecommendationsCategoriesItemSkillOverlapUncoveredSkillsItemMax).regex(needCategoryRecommendationsCategoriesItemSkillOverlapUncoveredSkillsItemRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.')).max(needCategoryRecommendationsCategoriesItemSkillOverlapUncoveredSkillsMax).describe('Confirmed skills of the need that the category does not cover, including skills without a taxonomy code.')
|
||||
}).describe('Skill coverage of a category: the weighted share of the confirmed skills of the need that the category taxonomy covers, with weight 2 for a required and 1 for a desired skill.'),
|
||||
"money": zod.object({
|
||||
"status": zod.enum(['computed', 'insufficient_data', 'no_salary', 'withheld']).describe('How the salary component of a recommendation was obtained.\n\n- computed: at least five available candidates of the category have a known minimum comparable with the confirmed range; `share` is given.\n- insufficient_data: fewer than five such candidates; the policy uses the neutral value 0.5 and `share` is null.\n- no_salary: the need has no confirmed salary range; the policy uses the neutral value 0.5 and `share` is null.\n- withheld: the organization changed salary ranges five times within seven days, so salary aggregates are withheld for seven days (PRD FR13, planned in TASK-211); the policy uses the neutral value 0.5 and `share` is null.\n\nAn unknown candidate minimum never counts as zero.'),
|
||||
"share": zod.number().min(needCategoryRecommendationsCategoriesItemMoneyShareMin).max(needCategoryRecommendationsCategoriesItemMoneyShareMax).nullable().describe('Share of those candidates whose minimum is not above the upper bound of the range, rounded down to a multiple of 0.25 (one of 0, 0.25, 0.5, 0.75, 1), or null unless `status` is `computed`. The score and the ranking use this rounded value, never the exact share. A quarter step gives five levels: each probe of a new upper bound tells at most which quarter of the group accepts it, and in the smallest allowed group of five candidates a single minimum often does not move the value, while the share still separates a range that most candidates accept from one that few accept.')
|
||||
}).describe('Salary component of a recommendation. It is an aggregate over at least five candidates and never reveals a minimum of any candidate.'),
|
||||
"supply": zod.enum(['fewer_than_5', 'from_5_to_29', '30_or_more']).describe('Number of available candidates of the category in the allowed detail: `fewer_than_5`, `from_5_to_29`, or `30_or_more`. Smaller groups are never counted exactly.')
|
||||
}).describe('One recommended category, a specialization with a grade, with its score and the reasons for it. The score is `0.5 * Overlap + 0.3 * Money + 0.2 * Supply` (PRD FR08) computed from the published components: the exact skill overlap, the money share rounded down to a quarter or the neutral 0.5, and `Supply = min(1, active / 30)` when at least five candidates are available. For a group of fewer than five, Supply enters the ranking as 0, the same for every such group, so neither the score nor the order reveals the exact size of a group below five.')).max(needCategoryRecommendationsCategoriesMax).describe('Recommended categories, best first by the score described in NeedCategoryRecommendation. Empty unless `status` is `computed`.')
|
||||
}).describe('Category recommendations computed by the server from the confirmed requirements of `requirements_version` with a versioned policy (PRD FR08). Read-only: no request can set a recommendation, a score, or one of its components. The server may recompute them for the same requirements version, for example for a new policy or a changed pool of available candidates, without a new need version; `computed_at` and `policy_version` then change. The policy version and the candidate group used are stored with each computation, so a later policy never rewrites it.')
|
||||
|
||||
export type NeedCategoryRecommendations = zod.input<typeof NeedCategoryRecommendations>;
|
||||
export type NeedCategoryRecommendationsOutput = zod.output<typeof NeedCategoryRecommendations>;
|
||||
@@ -0,0 +1,101 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const needCreateTitleMax = 200;
|
||||
|
||||
|
||||
export const needCreateTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needCreateSourceTextOneMax = 10000;
|
||||
|
||||
export const needCreateRequiredSkillsItemNameMax = 100;
|
||||
|
||||
|
||||
export const needCreateRequiredSkillsItemNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needCreateRequiredSkillsMax = 30;
|
||||
|
||||
export const needCreateDesiredSkillsItemNameMax = 100;
|
||||
|
||||
|
||||
export const needCreateDesiredSkillsItemNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needCreateDesiredSkillsMax = 30;
|
||||
|
||||
export const needCreateTasksItemTextMax = 300;
|
||||
|
||||
|
||||
export const needCreateTasksItemTextRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needCreateTasksMax = 20;
|
||||
|
||||
export const needCreateDomainOneValueMax = 100;
|
||||
|
||||
|
||||
export const needCreateDomainOneValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needCreateWorkFormatsOneValueMax = 3;
|
||||
|
||||
export const needCreateLocationOneValueMax = 100;
|
||||
|
||||
|
||||
export const needCreateLocationOneValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needCreateSalaryOneValueSalaryFromMin = 1000;
|
||||
export const needCreateSalaryOneValueSalaryFromMax = 100000000;
|
||||
export const needCreateSalaryOneValueSalaryFromMultipleOf = 1000;
|
||||
|
||||
export const needCreateSalaryOneValueSalaryToMin = 1000;
|
||||
export const needCreateSalaryOneValueSalaryToMax = 100000000;
|
||||
export const needCreateSalaryOneValueSalaryToMultipleOf = 1000;
|
||||
|
||||
|
||||
export const NeedCreate = zod.object({
|
||||
"title": zod.string().min(1).max(needCreateTitleMax).regex(needCreateTitleRegExp).describe('Short name of the need inside the organization, for example "Backend for the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"vacancy_id": zod.uuid().nullish().describe('Vacancy of the same organization to link, or null or absent for a need without a vacancy.'),
|
||||
"source_text": zod.union([zod.string().min(1).max(needCreateSourceTextOneMax).describe('Free description of the team\'s tasks as the employer wrote or pasted it. The server extracts proposed requirements from it; the text itself is never a requirement. It may contain line breaks. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of candidates. The server stores it as written: it may contain requirements that discriminate by a protected characteristic, and the extractor never turns such a requirement into a need field. Exclusions, the requirements that a candidate must not meet, are planned as a separate additive field with the Labor Code article 64 check (TASK-182).'),zod.null()]).exactOptional(),
|
||||
"specialization": zod.union([zod.object({
|
||||
"value": 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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the specialization in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"grade": zod.union([zod.object({
|
||||
"value": 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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the grade in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"required_skills": zod.array(zod.object({
|
||||
"name": zod.string().min(1).max(needCreateRequiredSkillsItemNameMax).regex(needCreateRequiredSkillsItemNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('One skill of a list in a request. A name that equals, without regard to letter case, a skill of the current version in either skill list refers to that skill and keeps its origin, quote, and taxonomy code; this is how an extracted skill is confirmed or moved between the required and desired lists. Any other name is a new manual skill. `status` follows the rules of NeedUpdate: `extracted` for a name that is not a stored suggestion answers 400 validation_failed with the pointer of that `status`, for example `/required_skills/2/status`. A name repeated within or across the two skill lists answers 400 with the pointer of the later `name`.')).max(needCreateRequiredSkillsMax).exactOptional(),
|
||||
"desired_skills": zod.array(zod.object({
|
||||
"name": zod.string().min(1).max(needCreateDesiredSkillsItemNameMax).regex(needCreateDesiredSkillsItemNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('One skill of a list in a request. A name that equals, without regard to letter case, a skill of the current version in either skill list refers to that skill and keeps its origin, quote, and taxonomy code; this is how an extracted skill is confirmed or moved between the required and desired lists. Any other name is a new manual skill. `status` follows the rules of NeedUpdate: `extracted` for a name that is not a stored suggestion answers 400 validation_failed with the pointer of that `status`, for example `/required_skills/2/status`. A name repeated within or across the two skill lists answers 400 with the pointer of the later `name`.')).max(needCreateDesiredSkillsMax).exactOptional(),
|
||||
"tasks": zod.array(zod.object({
|
||||
"text": zod.string().min(1).max(needCreateTasksItemTextMax).regex(needCreateTasksItemTextRegExp).describe('One work task of the team, for example "Move the payout service to an event model". 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('One task of the list in a request. A text equal to a task of the current version refers to that task and keeps its origin and quote; any other text is a new manual task. `status` and repeated texts follow the rules of NeedSkillInput.')).max(needCreateTasksMax).exactOptional(),
|
||||
"domain": zod.union([zod.object({
|
||||
"value": zod.string().min(1).max(needCreateDomainOneValueMax).regex(needCreateDomainOneValueRegExp).describe('Business domain of the work, for example payments or logistics, as free text. Plain text without line breaks; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the domain in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"work_formats": zod.union([zod.object({
|
||||
"value": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(needCreateWorkFormatsOneValueMax),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the work formats in a request; see NeedUpdate for the rules of `status`. Formats are compared as a set.'),zod.null()]).exactOptional(),
|
||||
"location": zod.union([zod.object({
|
||||
"value": zod.string().min(1).max(needCreateLocationOneValueMax).regex(needCreateLocationOneValueRegExp).describe('Place of work for the office or hybrid format, for example a city, as free text. It describes the employer\'s office, never a candidate\'s address. Plain text without line breaks; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the place of work in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"salary": zod.union([zod.object({
|
||||
"value": zod.object({
|
||||
"salary_from": zod.int().min(needCreateSalaryOneValueSalaryFromMin).max(needCreateSalaryOneValueSalaryFromMax).multipleOf(needCreateSalaryOneValueSalaryFromMultipleOf).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.'),
|
||||
"salary_to": zod.int().min(needCreateSalaryOneValueSalaryToMin).max(needCreateSalaryOneValueSalaryToMax).multipleOf(needCreateSalaryOneValueSalaryToMultipleOf).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('Salary range `[A; B]` in whole rubles with its base: the currency, the pay period, and the tax basis (PRD FR13). The schema requires every field, bounds that are positive multiples of 1000, and the known currency, period, and basis. The server checks the cross-field rules in integer arithmetic: `salary_from < salary_to`, and a width `(B - A) / ((A + B) / 2)` from 10% to 40% inclusive, that is `20 * (B - A) >= A + B` and `5 * (B - A) <= A + B`. A violation answers 400 validation_failed with the pointer of `salary_to` in the request, for example `/salary/value/salary_to`. For example, `[95000; 105000]` has a width of exactly 10% and `[80000; 120000]` exactly 40%; both are accepted. The rules are the same for a need and an invitation.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the salary range in a request; see NeedUpdate for the rules of `status` and SalaryRange for the rules of the range, whose pointers are under `/salary/value`.'),zod.null()]).exactOptional()
|
||||
}).describe('New need. Only `title` is required, so a need can start from a title, from a text, or from form fields, and with or without a vacancy. A field or list item given here must have `status` `confirmed` and becomes a confirmed manual value; `extracted` answers 400 with the pointer of that `status`, such as `/grade/status`, because a new need has no stored suggestion. A field that is absent is extracted from `source_text` when the text is given and is left unknown or empty otherwise. A nullable field sent as null, and a skill or task list sent as an empty list, stays unknown or empty and is not extracted; an empty `work_formats` value fails `minItems`. Unknown fields are rejected, so a request cannot set membership, a role, a status of the need, a provenance, readiness, a recommendation or its score, or a candidate\'s salary minimum.')
|
||||
|
||||
export type NeedCreate = zod.input<typeof NeedCreate>;
|
||||
export type NeedCreateOutput = zod.output<typeof NeedCreate>;
|
||||
@@ -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 needDomainValueOneMax = 100;
|
||||
|
||||
|
||||
export const needDomainValueOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needDomainSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needDomainSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needDomainSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const NeedDomain = zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.union([zod.string().min(1).max(needDomainValueOneMax).regex(needDomainValueOneRegExp).describe('Business domain of the work, for example payments or logistics, as free text. 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_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needDomainSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needDomainSourceOneExtractionVersionOneMax).regex(needDomainSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Business domain of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`.')
|
||||
|
||||
export type NeedDomain = zod.input<typeof NeedDomain>;
|
||||
export type NeedDomainOutput = zod.output<typeof NeedDomain>;
|
||||
@@ -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 needDomainInputValueMax = 100;
|
||||
|
||||
|
||||
export const needDomainInputValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const NeedDomainInput = zod.object({
|
||||
"value": zod.string().min(1).max(needDomainInputValueMax).regex(needDomainInputValueRegExp).describe('Business domain of the work, for example payments or logistics, as free text. Plain text without line breaks; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the domain in a request; see NeedUpdate for the rules of `status`.')
|
||||
|
||||
export type NeedDomainInput = zod.input<typeof NeedDomainInput>;
|
||||
export type NeedDomainInputOutput = zod.output<typeof NeedDomainInput>;
|
||||
@@ -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 NeedDomainNameMax = 100;
|
||||
|
||||
|
||||
export const NeedDomainNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const NeedDomainName = zod.string().min(1).max(NeedDomainNameMax).regex(NeedDomainNameRegExp).describe('Business domain of the work, for example payments or logistics, as free text. Plain text without line breaks; clients show it as text, never as HTML.')
|
||||
|
||||
export type NeedDomainName = zod.input<typeof NeedDomainName>;
|
||||
export type NeedDomainNameOutput = zod.output<typeof NeedDomainName>;
|
||||
@@ -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 NeedFieldName = zod.enum(['specialization', 'grade', 'required_skills', 'desired_skills', 'tasks', 'domain', 'work_formats', 'location', 'salary']).describe('Name of a need field, equal to its property name in NeedRequirementSet and in the request bodies. Adding a value is a contract change.')
|
||||
|
||||
export type NeedFieldName = zod.input<typeof NeedFieldName>;
|
||||
export type NeedFieldNameOutput = zod.output<typeof NeedFieldName>;
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const needGradeSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needGradeSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needGradeSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const NeedGrade = zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": 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()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needGradeSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needGradeSourceOneExtractionVersionOneMax).regex(needGradeSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Target grade of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`; a text that names no grade leaves the grade unknown instead of assuming one.')
|
||||
|
||||
export type NeedGrade = zod.input<typeof NeedGrade>;
|
||||
export type NeedGradeOutput = zod.output<typeof NeedGrade>;
|
||||
@@ -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 NeedGradeInput = zod.object({
|
||||
"value": 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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the grade in a request; see NeedUpdate for the rules of `status`.')
|
||||
|
||||
export type NeedGradeInput = zod.input<typeof NeedGradeInput>;
|
||||
export type NeedGradeInputOutput = zod.output<typeof NeedGradeInput>;
|
||||
@@ -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 NeedItemStatus = zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
|
||||
export type NeedItemStatus = zod.input<typeof NeedItemStatus>;
|
||||
export type NeedItemStatusOutput = zod.output<typeof NeedItemStatus>;
|
||||
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const needListItemsItemTitleMax = 200;
|
||||
|
||||
|
||||
export const needListItemsItemTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const needListItemsItemSpecializationSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needListItemsItemSpecializationSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needListItemsItemSpecializationSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needListItemsItemGradeSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needListItemsItemGradeSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needListItemsItemGradeSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needListItemsItemReadinessMissingFieldsItemQuestionMax = 300;
|
||||
|
||||
export const needListItemsItemReadinessMissingFieldsMax = 9;
|
||||
|
||||
export const needListItemsMax = 100;
|
||||
|
||||
export const needListPageNextCursorMax = 512;
|
||||
|
||||
|
||||
export const needListPageNextCursorRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
|
||||
export const NeedList = zod.object({
|
||||
"items": zod.array(zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the need.'),
|
||||
"vacancy_id": zod.uuid().nullable().describe('Linked vacancy, or null.'),
|
||||
"title": zod.string().min(1).max(needListItemsItemTitleMax).regex(needListItemsItemTitleRegExp).describe('Short name of the need inside the organization, for example "Backend for the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"version": zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),
|
||||
"specialization": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.union([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.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needListItemsItemSpecializationSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needListItemsItemSpecializationSourceOneExtractionVersionOneMax).regex(needListItemsItemSpecializationSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Target specialization of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`.'),
|
||||
"grade": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": 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()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needListItemsItemGradeSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needListItemsItemGradeSourceOneExtractionVersionOneMax).regex(needListItemsItemGradeSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Target grade of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`; a text that names no grade leaves the grade unknown instead of assuming one.'),
|
||||
"readiness": zod.object({
|
||||
"status": zod.enum(['complete', 'incomplete']).describe('`complete` when every critical field has a confirmed value, otherwise `incomplete`.'),
|
||||
"missing_fields": zod.array(zod.object({
|
||||
"field": zod.enum(['specialization', 'grade', 'required_skills', 'desired_skills', 'tasks', 'domain', 'work_formats', 'location', 'salary']).describe('Name of a need field, equal to its property name in NeedRequirementSet and in the request bodies. Adding a value is a contract change.'),
|
||||
"reason": zod.enum(['unknown', 'unconfirmed']).describe('Why a critical field is missing: `unknown`, the field has no value, or `unconfirmed`, it has only an extracted value or, for required skills, only extracted items that wait for confirmation.'),
|
||||
"question": zod.string().min(1).max(needListItemsItemReadinessMissingFieldsItemQuestionMax).describe('Specific Russian question about the missing value, for example which grade is needed. Plain text; the client shows it as text, never as HTML.')
|
||||
}).describe('One critical field that has no confirmed value, with a specific question that the client shows next to the field.')).max(needListItemsItemReadinessMissingFieldsMax).describe('Critical fields without a confirmed value, each at most once, in the order of NeedFieldName. Empty exactly when `status` is `complete`.')
|
||||
}).describe('Completeness of the critical fields, computed by the server for the current version. The critical fields are `specialization`, `grade`, `required_skills` (at least one confirmed skill), `work_formats`, `salary`, and `location` when the confirmed work formats include `office` or `hybrid`. An incomplete need is still a valid saved need; each later operation, such as search or an invitation, states which readiness it requires.'),
|
||||
"created_at": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),
|
||||
"updated_at": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.')
|
||||
}).describe('Need in a list: its identity, current version, target category fields, and readiness. Read the need for the requirements and the recommendations.')).max(needListItemsMax).describe('Needs of the page.'),
|
||||
"page": zod.object({
|
||||
"has_more": zod.boolean().describe('Whether another page follows this one.'),
|
||||
"next_cursor": zod.string().min(1).max(needListPageNextCursorMax).regex(needListPageNextCursorRegExp).nullable().describe('Opaque cursor of the next page, or null on the last page. Clients must not parse, build, or store it beyond the current listing.')
|
||||
}).describe('Cursor pagination state of a list response. Lists are ordered by a stable server-defined key. To read the next page, repeat the request with the same filters and `cursor` set to `next_cursor`.')
|
||||
}).describe('One page of the needs of an organization, newest first by creation time.')
|
||||
|
||||
export type NeedList = zod.input<typeof NeedList>;
|
||||
export type NeedListOutput = zod.output<typeof NeedList>;
|
||||
@@ -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 needLocationValueOneMax = 100;
|
||||
|
||||
|
||||
export const needLocationValueOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needLocationSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needLocationSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needLocationSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const NeedLocation = zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.union([zod.string().min(1).max(needLocationValueOneMax).regex(needLocationValueOneRegExp).describe('Place of work for the office or hybrid format, for example a city, as free text. It describes the employer\'s office, never a candidate\'s address. 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_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needLocationSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needLocationSourceOneExtractionVersionOneMax).regex(needLocationSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Place of work with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`. Readiness requires a confirmed place only when the confirmed work formats include `office` or `hybrid`.')
|
||||
|
||||
export type NeedLocation = zod.input<typeof NeedLocation>;
|
||||
export type NeedLocationOutput = zod.output<typeof NeedLocation>;
|
||||
@@ -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 needLocationInputValueMax = 100;
|
||||
|
||||
|
||||
export const needLocationInputValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const NeedLocationInput = zod.object({
|
||||
"value": zod.string().min(1).max(needLocationInputValueMax).regex(needLocationInputValueRegExp).describe('Place of work for the office or hybrid format, for example a city, as free text. It describes the employer\'s office, never a candidate\'s address. Plain text without line breaks; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the place of work in a request; see NeedUpdate for the rules of `status`.')
|
||||
|
||||
export type NeedLocationInput = zod.input<typeof NeedLocationInput>;
|
||||
export type NeedLocationInputOutput = zod.output<typeof NeedLocationInput>;
|
||||
@@ -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 NeedLocationNameMax = 100;
|
||||
|
||||
|
||||
export const NeedLocationNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const NeedLocationName = zod.string().min(1).max(NeedLocationNameMax).regex(NeedLocationNameRegExp).describe('Place of work for the office or hybrid format, for example a city, as free text. It describes the employer\'s office, never a candidate\'s address. Plain text without line breaks; clients show it as text, never as HTML.')
|
||||
|
||||
export type NeedLocationName = zod.input<typeof NeedLocationName>;
|
||||
export type NeedLocationNameOutput = zod.output<typeof NeedLocationName>;
|
||||
@@ -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 needMissingFieldQuestionMax = 300;
|
||||
|
||||
|
||||
export const NeedMissingField = zod.object({
|
||||
"field": zod.enum(['specialization', 'grade', 'required_skills', 'desired_skills', 'tasks', 'domain', 'work_formats', 'location', 'salary']).describe('Name of a need field, equal to its property name in NeedRequirementSet and in the request bodies. Adding a value is a contract change.'),
|
||||
"reason": zod.enum(['unknown', 'unconfirmed']).describe('Why a critical field is missing: `unknown`, the field has no value, or `unconfirmed`, it has only an extracted value or, for required skills, only extracted items that wait for confirmation.'),
|
||||
"question": zod.string().min(1).max(needMissingFieldQuestionMax).describe('Specific Russian question about the missing value, for example which grade is needed. Plain text; the client shows it as text, never as HTML.')
|
||||
}).describe('One critical field that has no confirmed value, with a specific question that the client shows next to the field.')
|
||||
|
||||
export type NeedMissingField = zod.input<typeof NeedMissingField>;
|
||||
export type NeedMissingFieldOutput = zod.output<typeof NeedMissingField>;
|
||||
@@ -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 NeedMissingReason = zod.enum(['unknown', 'unconfirmed']).describe('Why a critical field is missing: `unknown`, the field has no value, or `unconfirmed`, it has only an extracted value or, for required skills, only extracted items that wait for confirmation.')
|
||||
|
||||
export type NeedMissingReason = zod.input<typeof NeedMissingReason>;
|
||||
export type NeedMissingReasonOutput = zod.output<typeof NeedMissingReason>;
|
||||
@@ -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 needMoneyFitShareMin = 0;
|
||||
export const needMoneyFitShareMax = 1;
|
||||
|
||||
|
||||
export const NeedMoneyFit = zod.object({
|
||||
"status": zod.enum(['computed', 'insufficient_data', 'no_salary', 'withheld']).describe('How the salary component of a recommendation was obtained.\n\n- computed: at least five available candidates of the category have a known minimum comparable with the confirmed range; `share` is given.\n- insufficient_data: fewer than five such candidates; the policy uses the neutral value 0.5 and `share` is null.\n- no_salary: the need has no confirmed salary range; the policy uses the neutral value 0.5 and `share` is null.\n- withheld: the organization changed salary ranges five times within seven days, so salary aggregates are withheld for seven days (PRD FR13, planned in TASK-211); the policy uses the neutral value 0.5 and `share` is null.\n\nAn unknown candidate minimum never counts as zero.'),
|
||||
"share": zod.number().min(needMoneyFitShareMin).max(needMoneyFitShareMax).nullable().describe('Share of those candidates whose minimum is not above the upper bound of the range, rounded down to a multiple of 0.25 (one of 0, 0.25, 0.5, 0.75, 1), or null unless `status` is `computed`. The score and the ranking use this rounded value, never the exact share. A quarter step gives five levels: each probe of a new upper bound tells at most which quarter of the group accepts it, and in the smallest allowed group of five candidates a single minimum often does not move the value, while the share still separates a range that most candidates accept from one that few accept.')
|
||||
}).describe('Salary component of a recommendation. It is an aggregate over at least five candidates and never reveals a minimum of any candidate.')
|
||||
|
||||
export type NeedMoneyFit = zod.input<typeof NeedMoneyFit>;
|
||||
export type NeedMoneyFitOutput = zod.output<typeof NeedMoneyFit>;
|
||||
@@ -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 NeedMoneyStatus = zod.enum(['computed', 'insufficient_data', 'no_salary', 'withheld']).describe('How the salary component of a recommendation was obtained.\n\n- computed: at least five available candidates of the category have a known minimum comparable with the confirmed range; `share` is given.\n- insufficient_data: fewer than five such candidates; the policy uses the neutral value 0.5 and `share` is null.\n- no_salary: the need has no confirmed salary range; the policy uses the neutral value 0.5 and `share` is null.\n- withheld: the organization changed salary ranges five times within seven days, so salary aggregates are withheld for seven days (PRD FR13, planned in TASK-211); the policy uses the neutral value 0.5 and `share` is null.\n\nAn unknown candidate minimum never counts as zero.')
|
||||
|
||||
export type NeedMoneyStatus = zod.input<typeof NeedMoneyStatus>;
|
||||
export type NeedMoneyStatusOutput = zod.output<typeof NeedMoneyStatus>;
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const needReadinessReportMissingFieldsItemQuestionMax = 300;
|
||||
|
||||
export const needReadinessReportMissingFieldsMax = 9;
|
||||
|
||||
|
||||
export const NeedReadinessReport = zod.object({
|
||||
"status": zod.enum(['complete', 'incomplete']).describe('`complete` when every critical field has a confirmed value, otherwise `incomplete`.'),
|
||||
"missing_fields": zod.array(zod.object({
|
||||
"field": zod.enum(['specialization', 'grade', 'required_skills', 'desired_skills', 'tasks', 'domain', 'work_formats', 'location', 'salary']).describe('Name of a need field, equal to its property name in NeedRequirementSet and in the request bodies. Adding a value is a contract change.'),
|
||||
"reason": zod.enum(['unknown', 'unconfirmed']).describe('Why a critical field is missing: `unknown`, the field has no value, or `unconfirmed`, it has only an extracted value or, for required skills, only extracted items that wait for confirmation.'),
|
||||
"question": zod.string().min(1).max(needReadinessReportMissingFieldsItemQuestionMax).describe('Specific Russian question about the missing value, for example which grade is needed. Plain text; the client shows it as text, never as HTML.')
|
||||
}).describe('One critical field that has no confirmed value, with a specific question that the client shows next to the field.')).max(needReadinessReportMissingFieldsMax).describe('Critical fields without a confirmed value, each at most once, in the order of NeedFieldName. Empty exactly when `status` is `complete`.')
|
||||
}).describe('Completeness of the critical fields, computed by the server for the current version. The critical fields are `specialization`, `grade`, `required_skills` (at least one confirmed skill), `work_formats`, `salary`, and `location` when the confirmed work formats include `office` or `hybrid`. An incomplete need is still a valid saved need; each later operation, such as search or an invitation, states which readiness it requires.')
|
||||
|
||||
export type NeedReadinessReport = zod.input<typeof NeedReadinessReport>;
|
||||
export type NeedReadinessReportOutput = zod.output<typeof NeedReadinessReport>;
|
||||
@@ -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 NeedReadinessStatus = zod.enum(['complete', 'incomplete']).describe('`complete` when every critical field has a confirmed value, otherwise `incomplete`.')
|
||||
|
||||
export type NeedReadinessStatus = zod.input<typeof NeedReadinessStatus>;
|
||||
export type NeedReadinessStatusOutput = zod.output<typeof NeedReadinessStatus>;
|
||||
@@ -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 NeedRecommendationStatus = zod.enum(['computed', 'pending', 'not_available']).describe('State of the category recommendations of the current requirements version.\n\n- computed: `categories` holds the recommendations computed from the confirmed requirements of `requirements_version`.\n- pending: the computation for the current requirements version has not finished yet; `categories` is empty. Read the need again later.\n- not_available: the current requirements have no confirmed required or desired skill to compute from; `categories` is empty.')
|
||||
|
||||
export type NeedRecommendationStatus = zod.input<typeof NeedRecommendationStatus>;
|
||||
export type NeedRecommendationStatusOutput = zod.output<typeof NeedRecommendationStatus>;
|
||||
@@ -0,0 +1,219 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const needRequirementSetSpecializationSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementSetSpecializationSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementSetSpecializationSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementSetGradeSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementSetGradeSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementSetGradeSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementSetRequiredSkillsItemNameMax = 100;
|
||||
|
||||
|
||||
export const needRequirementSetRequiredSkillsItemNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needRequirementSetRequiredSkillsItemTaxonomyCodeOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementSetRequiredSkillsItemTaxonomyCodeOneRegExp = new RegExp('^[a-z0-9][a-z0-9_.+#-]*$');
|
||||
export const needRequirementSetRequiredSkillsItemSourceQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementSetRequiredSkillsItemSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementSetRequiredSkillsItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementSetRequiredSkillsMax = 30;
|
||||
|
||||
export const needRequirementSetDesiredSkillsItemNameMax = 100;
|
||||
|
||||
|
||||
export const needRequirementSetDesiredSkillsItemNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needRequirementSetDesiredSkillsItemTaxonomyCodeOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementSetDesiredSkillsItemTaxonomyCodeOneRegExp = new RegExp('^[a-z0-9][a-z0-9_.+#-]*$');
|
||||
export const needRequirementSetDesiredSkillsItemSourceQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementSetDesiredSkillsItemSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementSetDesiredSkillsItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementSetDesiredSkillsMax = 30;
|
||||
|
||||
export const needRequirementSetTasksItemTextMax = 300;
|
||||
|
||||
|
||||
export const needRequirementSetTasksItemTextRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needRequirementSetTasksItemSourceQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementSetTasksItemSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementSetTasksItemSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementSetTasksMax = 20;
|
||||
|
||||
export const needRequirementSetDomainValueOneMax = 100;
|
||||
|
||||
|
||||
export const needRequirementSetDomainValueOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needRequirementSetDomainSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementSetDomainSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementSetDomainSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementSetWorkFormatsValueMax = 3;
|
||||
|
||||
export const needRequirementSetWorkFormatsSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementSetWorkFormatsSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementSetWorkFormatsSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementSetLocationValueOneMax = 100;
|
||||
|
||||
|
||||
export const needRequirementSetLocationValueOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needRequirementSetLocationSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementSetLocationSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementSetLocationSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needRequirementSetSalaryValueOneSalaryFromMin = 1000;
|
||||
export const needRequirementSetSalaryValueOneSalaryFromMax = 100000000;
|
||||
export const needRequirementSetSalaryValueOneSalaryFromMultipleOf = 1000;
|
||||
|
||||
export const needRequirementSetSalaryValueOneSalaryToMin = 1000;
|
||||
export const needRequirementSetSalaryValueOneSalaryToMax = 100000000;
|
||||
export const needRequirementSetSalaryValueOneSalaryToMultipleOf = 1000;
|
||||
|
||||
export const needRequirementSetSalarySourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needRequirementSetSalarySourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needRequirementSetSalarySourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const NeedRequirementSet = zod.object({
|
||||
"specialization": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.union([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.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementSetSpecializationSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementSetSpecializationSourceOneExtractionVersionOneMax).regex(needRequirementSetSpecializationSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Target specialization of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`.'),
|
||||
"grade": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": 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()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementSetGradeSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementSetGradeSourceOneExtractionVersionOneMax).regex(needRequirementSetGradeSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Target grade of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`; a text that names no grade leaves the grade unknown instead of assuming one.'),
|
||||
"required_skills": zod.array(zod.object({
|
||||
"name": zod.string().min(1).max(needRequirementSetRequiredSkillsItemNameMax).regex(needRequirementSetRequiredSkillsItemNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.'),
|
||||
"taxonomy_code": zod.union([zod.string().min(1).max(needRequirementSetRequiredSkillsItemTaxonomyCodeOneMax).regex(needRequirementSetRequiredSkillsItemTaxonomyCodeOneRegExp).describe('Code of a skill in the platform skill taxonomy, for example `postgresql`. The server assigns it from the taxonomy; clients never send it and never derive it from the name.'),zod.null()]),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementSetRequiredSkillsItemSourceQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementSetRequiredSkillsItemSourceExtractionVersionOneMax).regex(needRequirementSetRequiredSkillsItemSourceExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.')
|
||||
}).describe('One required or desired skill of the need. `taxonomy_code` is null for a skill that the platform taxonomy does not know: the server keeps the name as given, never maps it to a guessed code, and counts it as not covered in category recommendations.')).max(needRequirementSetRequiredSkillsMax).describe('Required skills; each has weight 2 in skill coverage. Only confirmed skills count.'),
|
||||
"desired_skills": zod.array(zod.object({
|
||||
"name": zod.string().min(1).max(needRequirementSetDesiredSkillsItemNameMax).regex(needRequirementSetDesiredSkillsItemNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.'),
|
||||
"taxonomy_code": zod.union([zod.string().min(1).max(needRequirementSetDesiredSkillsItemTaxonomyCodeOneMax).regex(needRequirementSetDesiredSkillsItemTaxonomyCodeOneRegExp).describe('Code of a skill in the platform skill taxonomy, for example `postgresql`. The server assigns it from the taxonomy; clients never send it and never derive it from the name.'),zod.null()]),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementSetDesiredSkillsItemSourceQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementSetDesiredSkillsItemSourceExtractionVersionOneMax).regex(needRequirementSetDesiredSkillsItemSourceExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.')
|
||||
}).describe('One required or desired skill of the need. `taxonomy_code` is null for a skill that the platform taxonomy does not know: the server keeps the name as given, never maps it to a guessed code, and counts it as not covered in category recommendations.')).max(needRequirementSetDesiredSkillsMax).describe('Desired skills; each has weight 1 in skill coverage. Only confirmed skills count.'),
|
||||
"tasks": zod.array(zod.object({
|
||||
"text": zod.string().min(1).max(needRequirementSetTasksItemTextMax).regex(needRequirementSetTasksItemTextRegExp).describe('One work task of the team, for example "Move the payout service to an event model". 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementSetTasksItemSourceQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementSetTasksItemSourceExtractionVersionOneMax).regex(needRequirementSetTasksItemSourceExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.')
|
||||
}).describe('One work task of the team with its confirmation state and provenance.')).max(needRequirementSetTasksMax).describe('Work tasks of the team in the order given.'),
|
||||
"domain": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.union([zod.string().min(1).max(needRequirementSetDomainValueOneMax).regex(needRequirementSetDomainValueOneRegExp).describe('Business domain of the work, for example payments or logistics, as free text. 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_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementSetDomainSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementSetDomainSourceOneExtractionVersionOneMax).regex(needRequirementSetDomainSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Business domain of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`.'),
|
||||
"work_formats": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(needRequirementSetWorkFormatsValueMax).nullable(),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementSetWorkFormatsSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementSetWorkFormatsSourceOneExtractionVersionOneMax).regex(needRequirementSetWorkFormatsSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Work formats that the employer offers, with their confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`; a known value lists one to three formats.'),
|
||||
"location": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.union([zod.string().min(1).max(needRequirementSetLocationValueOneMax).regex(needRequirementSetLocationValueOneRegExp).describe('Place of work for the office or hybrid format, for example a city, as free text. It describes the employer\'s office, never a candidate\'s address. 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_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementSetLocationSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementSetLocationSourceOneExtractionVersionOneMax).regex(needRequirementSetLocationSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Place of work with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`. Readiness requires a confirmed place only when the confirmed work formats include `office` or `hybrid`.'),
|
||||
"salary": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.union([zod.object({
|
||||
"salary_from": zod.int().min(needRequirementSetSalaryValueOneSalaryFromMin).max(needRequirementSetSalaryValueOneSalaryFromMax).multipleOf(needRequirementSetSalaryValueOneSalaryFromMultipleOf).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.'),
|
||||
"salary_to": zod.int().min(needRequirementSetSalaryValueOneSalaryToMin).max(needRequirementSetSalaryValueOneSalaryToMax).multipleOf(needRequirementSetSalaryValueOneSalaryToMultipleOf).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('Salary range `[A; B]` in whole rubles with its base: the currency, the pay period, and the tax basis (PRD FR13). The schema requires every field, bounds that are positive multiples of 1000, and the known currency, period, and basis. The server checks the cross-field rules in integer arithmetic: `salary_from < salary_to`, and a width `(B - A) / ((A + B) / 2)` from 10% to 40% inclusive, that is `20 * (B - A) >= A + B` and `5 * (B - A) <= A + B`. A violation answers 400 validation_failed with the pointer of `salary_to` in the request, for example `/salary/value/salary_to`. For example, `[95000; 105000]` has a width of exactly 10% and `[80000; 120000]` exactly 40%; both are accepted. The rules are the same for a need and an invitation.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needRequirementSetSalarySourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needRequirementSetSalarySourceOneExtractionVersionOneMax).regex(needRequirementSetSalarySourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Salary range that the employer offers, with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`. A text without a salary leaves it unknown; the server never substitutes zero, a market estimate, or a range from another need.')
|
||||
}).describe('Requirements of one need version, each with its confirmation state and provenance. Read-only; requests change them through the fields of NeedCreate and NeedUpdate.')
|
||||
|
||||
export type NeedRequirementSet = zod.input<typeof NeedRequirementSet>;
|
||||
export type NeedRequirementSetOutput = zod.output<typeof NeedRequirementSet>;
|
||||
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const needSalaryValueOneSalaryFromMin = 1000;
|
||||
export const needSalaryValueOneSalaryFromMax = 100000000;
|
||||
export const needSalaryValueOneSalaryFromMultipleOf = 1000;
|
||||
|
||||
export const needSalaryValueOneSalaryToMin = 1000;
|
||||
export const needSalaryValueOneSalaryToMax = 100000000;
|
||||
export const needSalaryValueOneSalaryToMultipleOf = 1000;
|
||||
|
||||
export const needSalarySourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needSalarySourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needSalarySourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const NeedSalary = zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.union([zod.object({
|
||||
"salary_from": zod.int().min(needSalaryValueOneSalaryFromMin).max(needSalaryValueOneSalaryFromMax).multipleOf(needSalaryValueOneSalaryFromMultipleOf).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.'),
|
||||
"salary_to": zod.int().min(needSalaryValueOneSalaryToMin).max(needSalaryValueOneSalaryToMax).multipleOf(needSalaryValueOneSalaryToMultipleOf).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('Salary range `[A; B]` in whole rubles with its base: the currency, the pay period, and the tax basis (PRD FR13). The schema requires every field, bounds that are positive multiples of 1000, and the known currency, period, and basis. The server checks the cross-field rules in integer arithmetic: `salary_from < salary_to`, and a width `(B - A) / ((A + B) / 2)` from 10% to 40% inclusive, that is `20 * (B - A) >= A + B` and `5 * (B - A) <= A + B`. A violation answers 400 validation_failed with the pointer of `salary_to` in the request, for example `/salary/value/salary_to`. For example, `[95000; 105000]` has a width of exactly 10% and `[80000; 120000]` exactly 40%; both are accepted. The rules are the same for a need and an invitation.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needSalarySourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needSalarySourceOneExtractionVersionOneMax).regex(needSalarySourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Salary range that the employer offers, with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`. A text without a salary leaves it unknown; the server never substitutes zero, a market estimate, or a range from another need.')
|
||||
|
||||
export type NeedSalary = zod.input<typeof NeedSalary>;
|
||||
export type NeedSalaryOutput = zod.output<typeof NeedSalary>;
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const needSalaryInputValueSalaryFromMin = 1000;
|
||||
export const needSalaryInputValueSalaryFromMax = 100000000;
|
||||
export const needSalaryInputValueSalaryFromMultipleOf = 1000;
|
||||
|
||||
export const needSalaryInputValueSalaryToMin = 1000;
|
||||
export const needSalaryInputValueSalaryToMax = 100000000;
|
||||
export const needSalaryInputValueSalaryToMultipleOf = 1000;
|
||||
|
||||
|
||||
export const NeedSalaryInput = zod.object({
|
||||
"value": zod.object({
|
||||
"salary_from": zod.int().min(needSalaryInputValueSalaryFromMin).max(needSalaryInputValueSalaryFromMax).multipleOf(needSalaryInputValueSalaryFromMultipleOf).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.'),
|
||||
"salary_to": zod.int().min(needSalaryInputValueSalaryToMin).max(needSalaryInputValueSalaryToMax).multipleOf(needSalaryInputValueSalaryToMultipleOf).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('Salary range `[A; B]` in whole rubles with its base: the currency, the pay period, and the tax basis (PRD FR13). The schema requires every field, bounds that are positive multiples of 1000, and the known currency, period, and basis. The server checks the cross-field rules in integer arithmetic: `salary_from < salary_to`, and a width `(B - A) / ((A + B) / 2)` from 10% to 40% inclusive, that is `20 * (B - A) >= A + B` and `5 * (B - A) <= A + B`. A violation answers 400 validation_failed with the pointer of `salary_to` in the request, for example `/salary/value/salary_to`. For example, `[95000; 105000]` has a width of exactly 10% and `[80000; 120000]` exactly 40%; both are accepted. The rules are the same for a need and an invitation.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the salary range in a request; see NeedUpdate for the rules of `status` and SalaryRange for the rules of the range, whose pointers are under `/salary/value`.')
|
||||
|
||||
export type NeedSalaryInput = zod.input<typeof NeedSalaryInput>;
|
||||
export type NeedSalaryInputOutput = zod.output<typeof NeedSalaryInput>;
|
||||
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const needSkillNameMax = 100;
|
||||
|
||||
|
||||
export const needSkillNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needSkillTaxonomyCodeOneMax = 64;
|
||||
|
||||
|
||||
export const needSkillTaxonomyCodeOneRegExp = new RegExp('^[a-z0-9][a-z0-9_.+#-]*$');
|
||||
export const needSkillSourceQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needSkillSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needSkillSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const NeedSkill = zod.object({
|
||||
"name": zod.string().min(1).max(needSkillNameMax).regex(needSkillNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.'),
|
||||
"taxonomy_code": zod.union([zod.string().min(1).max(needSkillTaxonomyCodeOneMax).regex(needSkillTaxonomyCodeOneRegExp).describe('Code of a skill in the platform skill taxonomy, for example `postgresql`. The server assigns it from the taxonomy; clients never send it and never derive it from the name.'),zod.null()]),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needSkillSourceQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needSkillSourceExtractionVersionOneMax).regex(needSkillSourceExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.')
|
||||
}).describe('One required or desired skill of the need. `taxonomy_code` is null for a skill that the platform taxonomy does not know: the server keeps the name as given, never maps it to a guessed code, and counts it as not covered in category recommendations.')
|
||||
|
||||
export type NeedSkill = zod.input<typeof NeedSkill>;
|
||||
export type NeedSkillOutput = zod.output<typeof NeedSkill>;
|
||||
@@ -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 needSkillInputNameMax = 100;
|
||||
|
||||
|
||||
export const needSkillInputNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const NeedSkillInput = zod.object({
|
||||
"name": zod.string().min(1).max(needSkillInputNameMax).regex(needSkillInputNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('One skill of a list in a request. A name that equals, without regard to letter case, a skill of the current version in either skill list refers to that skill and keeps its origin, quote, and taxonomy code; this is how an extracted skill is confirmed or moved between the required and desired lists. Any other name is a new manual skill. `status` follows the rules of NeedUpdate: `extracted` for a name that is not a stored suggestion answers 400 validation_failed with the pointer of that `status`, for example `/required_skills/2/status`. A name repeated within or across the two skill lists answers 400 with the pointer of the later `name`.')
|
||||
|
||||
export type NeedSkillInput = zod.input<typeof NeedSkillInput>;
|
||||
export type NeedSkillInputOutput = zod.output<typeof NeedSkillInput>;
|
||||
@@ -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 needSkillOverlapShareMin = 0;
|
||||
export const needSkillOverlapShareMax = 1;
|
||||
|
||||
export const needSkillOverlapCoveredSkillsItemMax = 100;
|
||||
|
||||
|
||||
export const needSkillOverlapCoveredSkillsItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needSkillOverlapCoveredSkillsMax = 60;
|
||||
|
||||
export const needSkillOverlapUncoveredSkillsItemMax = 100;
|
||||
|
||||
|
||||
export const needSkillOverlapUncoveredSkillsItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needSkillOverlapUncoveredSkillsMax = 60;
|
||||
|
||||
|
||||
export const NeedSkillOverlap = zod.object({
|
||||
"share": zod.number().min(needSkillOverlapShareMin).max(needSkillOverlapShareMax).describe('Weighted share from 0 to 1, rounded to two decimals.'),
|
||||
"covered_skills": zod.array(zod.string().min(1).max(needSkillOverlapCoveredSkillsItemMax).regex(needSkillOverlapCoveredSkillsItemRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.')).max(needSkillOverlapCoveredSkillsMax).describe('Confirmed skills of the need that the category covers.'),
|
||||
"uncovered_skills": zod.array(zod.string().min(1).max(needSkillOverlapUncoveredSkillsItemMax).regex(needSkillOverlapUncoveredSkillsItemRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.')).max(needSkillOverlapUncoveredSkillsMax).describe('Confirmed skills of the need that the category does not cover, including skills without a taxonomy code.')
|
||||
}).describe('Skill coverage of a category: the weighted share of the confirmed skills of the need that the category taxonomy covers, with weight 2 for a required and 1 for a desired skill.')
|
||||
|
||||
export type NeedSkillOverlap = zod.input<typeof NeedSkillOverlap>;
|
||||
export type NeedSkillOverlapOutput = zod.output<typeof NeedSkillOverlap>;
|
||||
@@ -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 NeedSourceQuoteMax = 300;
|
||||
|
||||
|
||||
export const NeedSourceQuote = zod.string().min(1).max(NeedSourceQuoteMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
|
||||
export type NeedSourceQuote = zod.input<typeof NeedSourceQuote>;
|
||||
export type NeedSourceQuoteOutput = zod.output<typeof NeedSourceQuote>;
|
||||
@@ -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 NeedSourceTextMax = 10000;
|
||||
|
||||
|
||||
export const NeedSourceText = zod.string().min(1).max(NeedSourceTextMax).describe('Free description of the team\'s tasks as the employer wrote or pasted it. The server extracts proposed requirements from it; the text itself is never a requirement. It may contain line breaks. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of candidates. The server stores it as written: it may contain requirements that discriminate by a protected characteristic, and the extractor never turns such a requirement into a need field. Exclusions, the requirements that a candidate must not meet, are planned as a separate additive field with the Labor Code article 64 check (TASK-182).')
|
||||
|
||||
export type NeedSourceText = zod.input<typeof NeedSourceText>;
|
||||
export type NeedSourceTextOutput = zod.output<typeof NeedSourceText>;
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const needSpecializationSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needSpecializationSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needSpecializationSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const NeedSpecialization = zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.union([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.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needSpecializationSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needSpecializationSourceOneExtractionVersionOneMax).regex(needSpecializationSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Target specialization of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`.')
|
||||
|
||||
export type NeedSpecialization = zod.input<typeof NeedSpecialization>;
|
||||
export type NeedSpecializationOutput = zod.output<typeof NeedSpecialization>;
|
||||
@@ -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 NeedSpecializationInput = zod.object({
|
||||
"value": 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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the specialization in a request; see NeedUpdate for the rules of `status`.')
|
||||
|
||||
export type NeedSpecializationInput = zod.input<typeof NeedSpecializationInput>;
|
||||
export type NeedSpecializationInputOutput = zod.output<typeof NeedSpecializationInput>;
|
||||
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const needSummaryTitleMax = 200;
|
||||
|
||||
|
||||
export const needSummaryTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const needSummarySpecializationSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needSummarySpecializationSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needSummarySpecializationSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needSummaryGradeSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needSummaryGradeSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needSummaryGradeSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const needSummaryReadinessMissingFieldsItemQuestionMax = 300;
|
||||
|
||||
export const needSummaryReadinessMissingFieldsMax = 9;
|
||||
|
||||
|
||||
export const NeedSummary = zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the need.'),
|
||||
"vacancy_id": zod.uuid().nullable().describe('Linked vacancy, or null.'),
|
||||
"title": zod.string().min(1).max(needSummaryTitleMax).regex(needSummaryTitleRegExp).describe('Short name of the need inside the organization, for example "Backend for the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"version": zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),
|
||||
"specialization": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.union([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.'),zod.null()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needSummarySpecializationSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needSummarySpecializationSourceOneExtractionVersionOneMax).regex(needSummarySpecializationSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Target specialization of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`.'),
|
||||
"grade": zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": 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()]),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needSummaryGradeSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needSummaryGradeSourceOneExtractionVersionOneMax).regex(needSummaryGradeSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Target grade of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`; a text that names no grade leaves the grade unknown instead of assuming one.'),
|
||||
"readiness": zod.object({
|
||||
"status": zod.enum(['complete', 'incomplete']).describe('`complete` when every critical field has a confirmed value, otherwise `incomplete`.'),
|
||||
"missing_fields": zod.array(zod.object({
|
||||
"field": zod.enum(['specialization', 'grade', 'required_skills', 'desired_skills', 'tasks', 'domain', 'work_formats', 'location', 'salary']).describe('Name of a need field, equal to its property name in NeedRequirementSet and in the request bodies. Adding a value is a contract change.'),
|
||||
"reason": zod.enum(['unknown', 'unconfirmed']).describe('Why a critical field is missing: `unknown`, the field has no value, or `unconfirmed`, it has only an extracted value or, for required skills, only extracted items that wait for confirmation.'),
|
||||
"question": zod.string().min(1).max(needSummaryReadinessMissingFieldsItemQuestionMax).describe('Specific Russian question about the missing value, for example which grade is needed. Plain text; the client shows it as text, never as HTML.')
|
||||
}).describe('One critical field that has no confirmed value, with a specific question that the client shows next to the field.')).max(needSummaryReadinessMissingFieldsMax).describe('Critical fields without a confirmed value, each at most once, in the order of NeedFieldName. Empty exactly when `status` is `complete`.')
|
||||
}).describe('Completeness of the critical fields, computed by the server for the current version. The critical fields are `specialization`, `grade`, `required_skills` (at least one confirmed skill), `work_formats`, `salary`, and `location` when the confirmed work formats include `office` or `hybrid`. An incomplete need is still a valid saved need; each later operation, such as search or an invitation, states which readiness it requires.'),
|
||||
"created_at": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'),
|
||||
"updated_at": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.')
|
||||
}).describe('Need in a list: its identity, current version, target category fields, and readiness. Read the need for the requirements and the recommendations.')
|
||||
|
||||
export type NeedSummary = zod.input<typeof NeedSummary>;
|
||||
export type NeedSummaryOutput = zod.output<typeof NeedSummary>;
|
||||
@@ -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 NeedSupplyBand = zod.enum(['fewer_than_5', 'from_5_to_29', '30_or_more']).describe('Number of available candidates of the category in the allowed detail: `fewer_than_5`, `from_5_to_29`, or `30_or_more`. Smaller groups are never counted exactly.')
|
||||
|
||||
export type NeedSupplyBand = zod.input<typeof NeedSupplyBand>;
|
||||
export type NeedSupplyBandOutput = zod.output<typeof NeedSupplyBand>;
|
||||
@@ -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 needTaskTextMax = 300;
|
||||
|
||||
|
||||
export const needTaskTextRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needTaskSourceQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needTaskSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needTaskSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const NeedTask = zod.object({
|
||||
"text": zod.string().min(1).max(needTaskTextMax).regex(needTaskTextRegExp).describe('One work task of the team, for example "Move the payout service to an event model". 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.'),
|
||||
"source": zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needTaskSourceQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needTaskSourceExtractionVersionOneMax).regex(needTaskSourceExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.')
|
||||
}).describe('One work task of the team with its confirmation state and provenance.')
|
||||
|
||||
export type NeedTask = zod.input<typeof NeedTask>;
|
||||
export type NeedTaskOutput = zod.output<typeof NeedTask>;
|
||||
@@ -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 needTaskInputTextMax = 300;
|
||||
|
||||
|
||||
export const needTaskInputTextRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const NeedTaskInput = zod.object({
|
||||
"text": zod.string().min(1).max(needTaskInputTextMax).regex(needTaskInputTextRegExp).describe('One work task of the team, for example "Move the payout service to an event model". 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('One task of the list in a request. A text equal to a task of the current version refers to that task and keeps its origin and quote; any other text is a new manual task. `status` and repeated texts follow the rules of NeedSkillInput.')
|
||||
|
||||
export type NeedTaskInput = zod.input<typeof NeedTaskInput>;
|
||||
export type NeedTaskInputOutput = zod.output<typeof NeedTaskInput>;
|
||||
@@ -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 NeedTaskTextMax = 300;
|
||||
|
||||
|
||||
export const NeedTaskTextRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const NeedTaskText = zod.string().min(1).max(NeedTaskTextMax).regex(NeedTaskTextRegExp).describe('One work task of the team, for example "Move the payout service to an event model". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
|
||||
export type NeedTaskText = zod.input<typeof NeedTaskText>;
|
||||
export type NeedTaskTextOutput = zod.output<typeof NeedTaskText>;
|
||||
@@ -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 NeedTitleMax = 200;
|
||||
|
||||
|
||||
export const NeedTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const NeedTitle = zod.string().min(1).max(NeedTitleMax).regex(NeedTitleRegExp).describe('Short name of the need inside the organization, for example "Backend for the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
|
||||
export type NeedTitle = zod.input<typeof NeedTitle>;
|
||||
export type NeedTitleOutput = zod.output<typeof NeedTitle>;
|
||||
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
|
||||
export const needUpdateTitleMax = 200;
|
||||
|
||||
|
||||
export const needUpdateTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needUpdateSourceTextOneMax = 10000;
|
||||
|
||||
export const needUpdateRequiredSkillsItemNameMax = 100;
|
||||
|
||||
|
||||
export const needUpdateRequiredSkillsItemNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needUpdateRequiredSkillsMax = 30;
|
||||
|
||||
export const needUpdateDesiredSkillsItemNameMax = 100;
|
||||
|
||||
|
||||
export const needUpdateDesiredSkillsItemNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needUpdateDesiredSkillsMax = 30;
|
||||
|
||||
export const needUpdateTasksItemTextMax = 300;
|
||||
|
||||
|
||||
export const needUpdateTasksItemTextRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needUpdateTasksMax = 20;
|
||||
|
||||
export const needUpdateDomainOneValueMax = 100;
|
||||
|
||||
|
||||
export const needUpdateDomainOneValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needUpdateWorkFormatsOneValueMax = 3;
|
||||
|
||||
export const needUpdateLocationOneValueMax = 100;
|
||||
|
||||
|
||||
export const needUpdateLocationOneValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const needUpdateSalaryOneValueSalaryFromMin = 1000;
|
||||
export const needUpdateSalaryOneValueSalaryFromMax = 100000000;
|
||||
export const needUpdateSalaryOneValueSalaryFromMultipleOf = 1000;
|
||||
|
||||
export const needUpdateSalaryOneValueSalaryToMin = 1000;
|
||||
export const needUpdateSalaryOneValueSalaryToMax = 100000000;
|
||||
export const needUpdateSalaryOneValueSalaryToMultipleOf = 1000;
|
||||
|
||||
|
||||
export const NeedUpdate = zod.object({
|
||||
"expected_version": zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),
|
||||
"title": zod.string().min(1).max(needUpdateTitleMax).regex(needUpdateTitleRegExp).exactOptional().describe('Short name of the need inside the organization, for example "Backend for the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"vacancy_id": zod.uuid().nullish().describe('Vacancy of the same organization to link, or null to unlink.'),
|
||||
"source_text": zod.union([zod.string().min(1).max(needUpdateSourceTextOneMax).describe('Free description of the team\'s tasks as the employer wrote or pasted it. The server extracts proposed requirements from it; the text itself is never a requirement. It may contain line breaks. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of candidates. The server stores it as written: it may contain requirements that discriminate by a protected characteristic, and the extractor never turns such a requirement into a need field. Exclusions, the requirements that a candidate must not meet, are planned as a separate additive field with the Labor Code article 64 check (TASK-182).'),zod.null()]).exactOptional(),
|
||||
"specialization": zod.union([zod.object({
|
||||
"value": 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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the specialization in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"grade": zod.union([zod.object({
|
||||
"value": 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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the grade in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"required_skills": zod.array(zod.object({
|
||||
"name": zod.string().min(1).max(needUpdateRequiredSkillsItemNameMax).regex(needUpdateRequiredSkillsItemNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('One skill of a list in a request. A name that equals, without regard to letter case, a skill of the current version in either skill list refers to that skill and keeps its origin, quote, and taxonomy code; this is how an extracted skill is confirmed or moved between the required and desired lists. Any other name is a new manual skill. `status` follows the rules of NeedUpdate: `extracted` for a name that is not a stored suggestion answers 400 validation_failed with the pointer of that `status`, for example `/required_skills/2/status`. A name repeated within or across the two skill lists answers 400 with the pointer of the later `name`.')).max(needUpdateRequiredSkillsMax).exactOptional(),
|
||||
"desired_skills": zod.array(zod.object({
|
||||
"name": zod.string().min(1).max(needUpdateDesiredSkillsItemNameMax).regex(needUpdateDesiredSkillsItemNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('One skill of a list in a request. A name that equals, without regard to letter case, a skill of the current version in either skill list refers to that skill and keeps its origin, quote, and taxonomy code; this is how an extracted skill is confirmed or moved between the required and desired lists. Any other name is a new manual skill. `status` follows the rules of NeedUpdate: `extracted` for a name that is not a stored suggestion answers 400 validation_failed with the pointer of that `status`, for example `/required_skills/2/status`. A name repeated within or across the two skill lists answers 400 with the pointer of the later `name`.')).max(needUpdateDesiredSkillsMax).exactOptional(),
|
||||
"tasks": zod.array(zod.object({
|
||||
"text": zod.string().min(1).max(needUpdateTasksItemTextMax).regex(needUpdateTasksItemTextRegExp).describe('One work task of the team, for example "Move the payout service to an event model". 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('One task of the list in a request. A text equal to a task of the current version refers to that task and keeps its origin and quote; any other text is a new manual task. `status` and repeated texts follow the rules of NeedSkillInput.')).max(needUpdateTasksMax).exactOptional(),
|
||||
"domain": zod.union([zod.object({
|
||||
"value": zod.string().min(1).max(needUpdateDomainOneValueMax).regex(needUpdateDomainOneValueRegExp).describe('Business domain of the work, for example payments or logistics, as free text. Plain text without line breaks; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the domain in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"work_formats": zod.union([zod.object({
|
||||
"value": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(needUpdateWorkFormatsOneValueMax),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the work formats in a request; see NeedUpdate for the rules of `status`. Formats are compared as a set.'),zod.null()]).exactOptional(),
|
||||
"location": zod.union([zod.object({
|
||||
"value": zod.string().min(1).max(needUpdateLocationOneValueMax).regex(needUpdateLocationOneValueRegExp).describe('Place of work for the office or hybrid format, for example a city, as free text. It describes the employer\'s office, never a candidate\'s address. Plain text without line breaks; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the place of work in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"salary": zod.union([zod.object({
|
||||
"value": zod.object({
|
||||
"salary_from": zod.int().min(needUpdateSalaryOneValueSalaryFromMin).max(needUpdateSalaryOneValueSalaryFromMax).multipleOf(needUpdateSalaryOneValueSalaryFromMultipleOf).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.'),
|
||||
"salary_to": zod.int().min(needUpdateSalaryOneValueSalaryToMin).max(needUpdateSalaryOneValueSalaryToMax).multipleOf(needUpdateSalaryOneValueSalaryToMultipleOf).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('Salary range `[A; B]` in whole rubles with its base: the currency, the pay period, and the tax basis (PRD FR13). The schema requires every field, bounds that are positive multiples of 1000, and the known currency, period, and basis. The server checks the cross-field rules in integer arithmetic: `salary_from < salary_to`, and a width `(B - A) / ((A + B) / 2)` from 10% to 40% inclusive, that is `20 * (B - A) >= A + B` and `5 * (B - A) <= A + B`. A violation answers 400 validation_failed with the pointer of `salary_to` in the request, for example `/salary/value/salary_to`. For example, `[95000; 105000]` has a width of exactly 10% and `[80000; 120000]` exactly 40%; both are accepted. The rules are the same for a need and an invitation.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the salary range in a request; see NeedUpdate for the rules of `status` and SalaryRange for the rules of the range, whose pointers are under `/salary/value`.'),zod.null()]).exactOptional()
|
||||
}).describe('Change of a need over the version the client read. Each field present in the body replaces that field as a whole; an absent field stays unchanged. Nested objects and lists are not merged: a field decision and each list are replaced entirely, and a stored item missing from a sent list is deleted. A nullable field sent as null becomes unknown, or unlinked for `vacancy_id`; a skill or task list sent empty deletes every item; a list sent as null fails validation. A field decision `{value, status}` and a list item follow the same rules: `confirmed` with the stored value confirms it and keeps its origin and quote, and `confirmed` with another value sets a confirmed manual value; `extracted` keeps a stored suggestion unconfirmed and is allowed only with exactly the stored suggested value, otherwise it answers 400 with the pointer of that `status`, such as `/grade/status` or `/required_skills/0/status`. A client that sends back an unchanged form therefore confirms nothing by accident: it sends each suggestion with `extracted`, or leaves the field out. Sending a different `source_text` extracts again: new suggestions replace only the `extracted` values and items of fields not named in this body; confirmed values are never overwritten, a suggested skill whose name is already in either skill list is skipped, and a suggestion that a member deleted is not proposed again for this need. Unknown fields are rejected, so a request cannot set membership, a role, a provenance, readiness, a recommendation or its score, or a candidate\'s salary minimum.')
|
||||
|
||||
export type NeedUpdate = zod.input<typeof NeedUpdate>;
|
||||
export type NeedUpdateOutput = zod.output<typeof NeedUpdate>;
|
||||
@@ -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 NeedValueOrigin = zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\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 NeedValueOrigin = zod.input<typeof NeedValueOrigin>;
|
||||
export type NeedValueOriginOutput = zod.output<typeof NeedValueOrigin>;
|
||||
@@ -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 needValueSourceQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needValueSourceExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needValueSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const NeedValueSource = zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needValueSourceQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needValueSourceExtractionVersionOneMax).regex(needValueSourceExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.')
|
||||
|
||||
export type NeedValueSource = zod.input<typeof NeedValueSource>;
|
||||
export type NeedValueSourceOutput = zod.output<typeof NeedValueSource>;
|
||||
@@ -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 NeedValueStatus = zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.')
|
||||
|
||||
export type NeedValueStatus = zod.input<typeof NeedValueStatus>;
|
||||
export type NeedValueStatusOutput = zod.output<typeof NeedValueStatus>;
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
|
||||
|
||||
export const NeedVersion = zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.')
|
||||
|
||||
export type NeedVersion = zod.input<typeof NeedVersion>;
|
||||
export type NeedVersionOutput = zod.output<typeof NeedVersion>;
|
||||
@@ -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 NeedVersionLabelMax = 64;
|
||||
|
||||
|
||||
export const NeedVersionLabelRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const NeedVersionLabel = zod.string().min(1).max(NeedVersionLabelMax).regex(NeedVersionLabelRegExp).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.')
|
||||
|
||||
export type NeedVersionLabel = zod.input<typeof NeedVersionLabel>;
|
||||
export type NeedVersionLabelOutput = zod.output<typeof NeedVersionLabel>;
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const needWorkFormatsValueMax = 3;
|
||||
|
||||
export const needWorkFormatsSourceOneQuoteOneMax = 300;
|
||||
|
||||
|
||||
export const needWorkFormatsSourceOneExtractionVersionOneMax = 64;
|
||||
|
||||
|
||||
export const needWorkFormatsSourceOneExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const NeedWorkFormats = zod.object({
|
||||
"status": zod.enum(['confirmed', 'extracted', 'unknown']).describe('Confirmation state of one need field.\n\n- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.\n- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.\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 Senior grade, the remote format, or a zero salary.'),
|
||||
"value": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(needWorkFormatsValueMax).nullable(),
|
||||
"source": zod.union([zod.object({
|
||||
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
||||
"quote": zod.union([zod.string().min(1).max(needWorkFormatsSourceOneQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
||||
"extracted_in_version": zod.union([zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
||||
"extraction_version": zod.union([zod.string().min(1).max(needWorkFormatsSourceOneExtractionVersionOneMax).regex(needWorkFormatsSourceOneExtractionVersionOneRegExp).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.')
|
||||
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.'),zod.null()])
|
||||
}).describe('Work formats that the employer offers, with their confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`; a known value lists one to three formats.')
|
||||
|
||||
export type NeedWorkFormats = zod.input<typeof NeedWorkFormats>;
|
||||
export type NeedWorkFormatsOutput = zod.output<typeof NeedWorkFormats>;
|
||||
@@ -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 needWorkFormatsInputValueMax = 3;
|
||||
|
||||
|
||||
export const NeedWorkFormatsInput = zod.object({
|
||||
"value": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(needWorkFormatsInputValueMax),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the work formats in a request; see NeedUpdate for the rules of `status`. Formats are compared as a set.')
|
||||
|
||||
export type NeedWorkFormatsInput = zod.input<typeof NeedWorkFormatsInput>;
|
||||
export type NeedWorkFormatsInputOutput = zod.output<typeof NeedWorkFormatsInput>;
|
||||
File renamed without changes.
@@ -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 RubAmountMin = 1000;
|
||||
export const RubAmountMax = 100000000;
|
||||
export const RubAmountMultipleOf = 1000;
|
||||
|
||||
|
||||
export const RubAmount = zod.int().min(RubAmountMin).max(RubAmountMax).multipleOf(RubAmountMultipleOf).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.')
|
||||
|
||||
export type RubAmount = zod.input<typeof RubAmount>;
|
||||
export type RubAmountOutput = zod.output<typeof RubAmount>;
|
||||
@@ -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 SalaryPeriod = zod.enum(['month']).describe('Pay period of a salary amount. The MVP uses only `month`; adding a value is a contract change.')
|
||||
|
||||
export type SalaryPeriod = zod.input<typeof SalaryPeriod>;
|
||||
export type SalaryPeriodOutput = zod.output<typeof SalaryPeriod>;
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const salaryRangeSalaryFromMin = 1000;
|
||||
export const salaryRangeSalaryFromMax = 100000000;
|
||||
export const salaryRangeSalaryFromMultipleOf = 1000;
|
||||
|
||||
export const salaryRangeSalaryToMin = 1000;
|
||||
export const salaryRangeSalaryToMax = 100000000;
|
||||
export const salaryRangeSalaryToMultipleOf = 1000;
|
||||
|
||||
|
||||
export const SalaryRange = zod.object({
|
||||
"salary_from": zod.int().min(salaryRangeSalaryFromMin).max(salaryRangeSalaryFromMax).multipleOf(salaryRangeSalaryFromMultipleOf).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.'),
|
||||
"salary_to": zod.int().min(salaryRangeSalaryToMin).max(salaryRangeSalaryToMax).multipleOf(salaryRangeSalaryToMultipleOf).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('Salary range `[A; B]` in whole rubles with its base: the currency, the pay period, and the tax basis (PRD FR13). The schema requires every field, bounds that are positive multiples of 1000, and the known currency, period, and basis. The server checks the cross-field rules in integer arithmetic: `salary_from < salary_to`, and a width `(B - A) / ((A + B) / 2)` from 10% to 40% inclusive, that is `20 * (B - A) >= A + B` and `5 * (B - A) <= A + B`. A violation answers 400 validation_failed with the pointer of `salary_to` in the request, for example `/salary/value/salary_to`. For example, `[95000; 105000]` has a width of exactly 10% and `[80000; 120000]` exactly 40%; both are accepted. The rules are the same for a need and an invitation.')
|
||||
|
||||
export type SalaryRange = zod.input<typeof SalaryRange>;
|
||||
export type SalaryRangeOutput = zod.output<typeof SalaryRange>;
|
||||
@@ -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 SalaryTaxBasis = 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.')
|
||||
|
||||
export type SalaryTaxBasis = zod.input<typeof SalaryTaxBasis>;
|
||||
export type SalaryTaxBasisOutput = zod.output<typeof SalaryTaxBasis>;
|
||||
@@ -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 SkillNameMax = 100;
|
||||
|
||||
|
||||
export const SkillNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const SkillName = zod.string().min(1).max(SkillNameMax).regex(SkillNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.')
|
||||
|
||||
export type SkillName = zod.input<typeof SkillName>;
|
||||
export type SkillNameOutput = zod.output<typeof SkillName>;
|
||||
@@ -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 SkillTaxonomyCodeMax = 64;
|
||||
|
||||
|
||||
export const SkillTaxonomyCodeRegExp = new RegExp('^[a-z0-9][a-z0-9_.+#-]*$');
|
||||
|
||||
export const SkillTaxonomyCode = zod.string().min(1).max(SkillTaxonomyCodeMax).regex(SkillTaxonomyCodeRegExp).describe('Code of a skill in the platform skill taxonomy, for example `postgresql`. The server assigns it from the taxonomy; clients never send it and never derive it from the name.')
|
||||
|
||||
export type SkillTaxonomyCode = zod.input<typeof SkillTaxonomyCode>;
|
||||
export type SkillTaxonomyCodeOutput = zod.output<typeof SkillTaxonomyCode>;
|
||||
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
|
||||
export const updateOrganizationNeedBodyTitleMax = 200;
|
||||
|
||||
|
||||
export const updateOrganizationNeedBodyTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const updateOrganizationNeedBodySourceTextOneMax = 10000;
|
||||
|
||||
export const updateOrganizationNeedBodyRequiredSkillsItemNameMax = 100;
|
||||
|
||||
|
||||
export const updateOrganizationNeedBodyRequiredSkillsItemNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const updateOrganizationNeedBodyRequiredSkillsMax = 30;
|
||||
|
||||
export const updateOrganizationNeedBodyDesiredSkillsItemNameMax = 100;
|
||||
|
||||
|
||||
export const updateOrganizationNeedBodyDesiredSkillsItemNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const updateOrganizationNeedBodyDesiredSkillsMax = 30;
|
||||
|
||||
export const updateOrganizationNeedBodyTasksItemTextMax = 300;
|
||||
|
||||
|
||||
export const updateOrganizationNeedBodyTasksItemTextRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const updateOrganizationNeedBodyTasksMax = 20;
|
||||
|
||||
export const updateOrganizationNeedBodyDomainOneValueMax = 100;
|
||||
|
||||
|
||||
export const updateOrganizationNeedBodyDomainOneValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const updateOrganizationNeedBodyWorkFormatsOneValueMax = 3;
|
||||
|
||||
export const updateOrganizationNeedBodyLocationOneValueMax = 100;
|
||||
|
||||
|
||||
export const updateOrganizationNeedBodyLocationOneValueRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const updateOrganizationNeedBodySalaryOneValueSalaryFromMin = 1000;
|
||||
export const updateOrganizationNeedBodySalaryOneValueSalaryFromMax = 100000000;
|
||||
export const updateOrganizationNeedBodySalaryOneValueSalaryFromMultipleOf = 1000;
|
||||
|
||||
export const updateOrganizationNeedBodySalaryOneValueSalaryToMin = 1000;
|
||||
export const updateOrganizationNeedBodySalaryOneValueSalaryToMax = 100000000;
|
||||
export const updateOrganizationNeedBodySalaryOneValueSalaryToMultipleOf = 1000;
|
||||
|
||||
|
||||
export const UpdateOrganizationNeedBody = zod.object({
|
||||
"expected_version": zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.'),
|
||||
"title": zod.string().min(1).max(updateOrganizationNeedBodyTitleMax).regex(updateOrganizationNeedBodyTitleRegExp).exactOptional().describe('Short name of the need inside the organization, for example "Backend for the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"vacancy_id": zod.uuid().nullish().describe('Vacancy of the same organization to link, or null to unlink.'),
|
||||
"source_text": zod.union([zod.string().min(1).max(updateOrganizationNeedBodySourceTextOneMax).describe('Free description of the team\'s tasks as the employer wrote or pasted it. The server extracts proposed requirements from it; the text itself is never a requirement. It may contain line breaks. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of candidates. The server stores it as written: it may contain requirements that discriminate by a protected characteristic, and the extractor never turns such a requirement into a need field. Exclusions, the requirements that a candidate must not meet, are planned as a separate additive field with the Labor Code article 64 check (TASK-182).'),zod.null()]).exactOptional(),
|
||||
"specialization": zod.union([zod.object({
|
||||
"value": 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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the specialization in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"grade": zod.union([zod.object({
|
||||
"value": 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.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the grade in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"required_skills": zod.array(zod.object({
|
||||
"name": zod.string().min(1).max(updateOrganizationNeedBodyRequiredSkillsItemNameMax).regex(updateOrganizationNeedBodyRequiredSkillsItemNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('One skill of a list in a request. A name that equals, without regard to letter case, a skill of the current version in either skill list refers to that skill and keeps its origin, quote, and taxonomy code; this is how an extracted skill is confirmed or moved between the required and desired lists. Any other name is a new manual skill. `status` follows the rules of NeedUpdate: `extracted` for a name that is not a stored suggestion answers 400 validation_failed with the pointer of that `status`, for example `/required_skills/2/status`. A name repeated within or across the two skill lists answers 400 with the pointer of the later `name`.')).max(updateOrganizationNeedBodyRequiredSkillsMax).exactOptional(),
|
||||
"desired_skills": zod.array(zod.object({
|
||||
"name": zod.string().min(1).max(updateOrganizationNeedBodyDesiredSkillsItemNameMax).regex(updateOrganizationNeedBodyDesiredSkillsItemNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('One skill of a list in a request. A name that equals, without regard to letter case, a skill of the current version in either skill list refers to that skill and keeps its origin, quote, and taxonomy code; this is how an extracted skill is confirmed or moved between the required and desired lists. Any other name is a new manual skill. `status` follows the rules of NeedUpdate: `extracted` for a name that is not a stored suggestion answers 400 validation_failed with the pointer of that `status`, for example `/required_skills/2/status`. A name repeated within or across the two skill lists answers 400 with the pointer of the later `name`.')).max(updateOrganizationNeedBodyDesiredSkillsMax).exactOptional(),
|
||||
"tasks": zod.array(zod.object({
|
||||
"text": zod.string().min(1).max(updateOrganizationNeedBodyTasksItemTextMax).regex(updateOrganizationNeedBodyTasksItemTextRegExp).describe('One work task of the team, for example "Move the payout service to an event model". 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 list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('One task of the list in a request. A text equal to a task of the current version refers to that task and keeps its origin and quote; any other text is a new manual task. `status` and repeated texts follow the rules of NeedSkillInput.')).max(updateOrganizationNeedBodyTasksMax).exactOptional(),
|
||||
"domain": zod.union([zod.object({
|
||||
"value": zod.string().min(1).max(updateOrganizationNeedBodyDomainOneValueMax).regex(updateOrganizationNeedBodyDomainOneValueRegExp).describe('Business domain of the work, for example payments or logistics, as free text. Plain text without line breaks; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the domain in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"work_formats": zod.union([zod.object({
|
||||
"value": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(updateOrganizationNeedBodyWorkFormatsOneValueMax),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the work formats in a request; see NeedUpdate for the rules of `status`. Formats are compared as a set.'),zod.null()]).exactOptional(),
|
||||
"location": zod.union([zod.object({
|
||||
"value": zod.string().min(1).max(updateOrganizationNeedBodyLocationOneValueMax).regex(updateOrganizationNeedBodyLocationOneValueRegExp).describe('Place of work for the office or hybrid format, for example a city, as free text. It describes the employer\'s office, never a candidate\'s address. Plain text without line breaks; clients show it as text, never as HTML.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the place of work in a request; see NeedUpdate for the rules of `status`.'),zod.null()]).exactOptional(),
|
||||
"salary": zod.union([zod.object({
|
||||
"value": zod.object({
|
||||
"salary_from": zod.int().min(updateOrganizationNeedBodySalaryOneValueSalaryFromMin).max(updateOrganizationNeedBodySalaryOneValueSalaryFromMax).multipleOf(updateOrganizationNeedBodySalaryOneValueSalaryFromMultipleOf).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.'),
|
||||
"salary_to": zod.int().min(updateOrganizationNeedBodySalaryOneValueSalaryToMin).max(updateOrganizationNeedBodySalaryOneValueSalaryToMax).multipleOf(updateOrganizationNeedBodySalaryOneValueSalaryToMultipleOf).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('Salary range `[A; B]` in whole rubles with its base: the currency, the pay period, and the tax basis (PRD FR13). The schema requires every field, bounds that are positive multiples of 1000, and the known currency, period, and basis. The server checks the cross-field rules in integer arithmetic: `salary_from < salary_to`, and a width `(B - A) / ((A + B) / 2)` from 10% to 40% inclusive, that is `20 * (B - A) >= A + B` and `5 * (B - A) <= A + B`. A violation answers 400 validation_failed with the pointer of `salary_to` in the request, for example `/salary/value/salary_to`. For example, `[95000; 105000]` has a width of exactly 10% and `[80000; 120000]` exactly 40%; both are accepted. The rules are the same for a need and an invitation.'),
|
||||
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A 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. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.')
|
||||
}).describe('Decision about the salary range in a request; see NeedUpdate for the rules of `status` and SalaryRange for the rules of the range, whose pointers are under `/salary/value`.'),zod.null()]).exactOptional()
|
||||
}).describe('Change of a need over the version the client read. Each field present in the body replaces that field as a whole; an absent field stays unchanged. Nested objects and lists are not merged: a field decision and each list are replaced entirely, and a stored item missing from a sent list is deleted. A nullable field sent as null becomes unknown, or unlinked for `vacancy_id`; a skill or task list sent empty deletes every item; a list sent as null fails validation. A field decision `{value, status}` and a list item follow the same rules: `confirmed` with the stored value confirms it and keeps its origin and quote, and `confirmed` with another value sets a confirmed manual value; `extracted` keeps a stored suggestion unconfirmed and is allowed only with exactly the stored suggested value, otherwise it answers 400 with the pointer of that `status`, such as `/grade/status` or `/required_skills/0/status`. A client that sends back an unchanged form therefore confirms nothing by accident: it sends each suggestion with `extracted`, or leaves the field out. Sending a different `source_text` extracts again: new suggestions replace only the `extracted` values and items of fields not named in this body; confirmed values are never overwritten, a suggested skill whose name is already in either skill list is skipped, and a suggestion that a member deleted is not proposed again for this need. Unknown fields are rejected, so a request cannot set membership, a role, a provenance, readiness, a recommendation or its score, or a candidate\'s salary minimum.')
|
||||
|
||||
export type UpdateOrganizationNeedBody = zod.input<typeof UpdateOrganizationNeedBody>;
|
||||
export type UpdateOrganizationNeedBodyOutput = zod.output<typeof UpdateOrganizationNeedBody>;
|
||||
File renamed without changes.
Reference in new issue
Block a user