feat(api): add invitation, terms version, acceptance, and contact grant contract
This commit is contained in:
1 parent
b856d4ff54
commit
d2c6f1375a
140 files changed
+39767
-303
No files matched your search
@@ -3,5 +3,6 @@ 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 { getInvitationMock } from './invitation/invitation.msw'
|
||||
export { getNeedMock } from './need/need.msw'
|
||||
export { getSupportMock } from './support/support.msw'
|
||||
@@ -3,5 +3,6 @@ export * from './candidate/candidate';
|
||||
export * from './catalog/catalog';
|
||||
export * from './health/health';
|
||||
export * from './identity/identity';
|
||||
export * from './invitation/invitation';
|
||||
export * from './need/need';
|
||||
export * from './support/support';
|
||||
@@ -0,0 +1,337 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import {
|
||||
faker
|
||||
} from '@faker-js/faker';
|
||||
|
||||
import {
|
||||
fakeFromPattern
|
||||
} from '../../mock-pattern';
|
||||
|
||||
import {
|
||||
HttpResponse,
|
||||
http
|
||||
} from 'msw';
|
||||
import type {
|
||||
RequestHandlerOptions
|
||||
} from 'msw';
|
||||
|
||||
import type {
|
||||
CandidateInvitation,
|
||||
CandidateInvitationList,
|
||||
ContactConsentOffer,
|
||||
ContactDisclosure,
|
||||
ContactGrant,
|
||||
InvitationDeclineRecord,
|
||||
InvitationNeedReference,
|
||||
InvitationPackageItemNotProvided,
|
||||
InvitationPackageItemProvided,
|
||||
OrganizationInvitation,
|
||||
OrganizationInvitationList
|
||||
} from '../../schemas';
|
||||
|
||||
|
||||
export const getListOrganizationInvitationsResponseInvitationNeedReferenceMock = (overrideResponse: Partial<InvitationNeedReference> = {}): InvitationNeedReference => ({...{need_id: faker.string.uuid(), requirements_version: faker.number.int({min: 1})}, ...overrideResponse});
|
||||
|
||||
export const getListOrganizationInvitationsResponseMock = (overrideResponse: Partial<Extract<OrganizationInvitationList, object>> = {}): OrganizationInvitationList => ({items: Array.from({ length: faker.number.int({min: 1, max: 100}) }, (_, i) => i + 1).map(() => ({id: faker.string.uuid(), candidate_handle: fakeFromPattern("^[A-Za-z0-9_-]+$", {minLength: 1, maxLength: 128}), need: faker.helpers.arrayElement([{...getListOrganizationInvitationsResponseInvitationNeedReferenceMock()},null,]), state: faker.helpers.arrayElement(['draft','delivered','viewed','counter','accepted','interview_scheduled','interviewed','negotiation','terms_agreed','no_deal','declined','expired','withdrawn','cancelled_by_candidate'] as const), expiry_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['invitation_timeout','negotiation_timeout'] as const),null,]), version: faker.number.int({min: 1}), terms_version: faker.number.int({min: 1}), role_title: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}), salary: {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(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, response_deadline_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), contact_access: {status: faker.helpers.arrayElement(['not_granted','available','closed'] as const), fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const)}, 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([fakeFromPattern("^[A-Za-z0-9_-]+$", {minLength: 1, maxLength: 512}), null])}, ...overrideResponse})
|
||||
|
||||
export const getCreateOrganizationInvitationResponseInvitationNeedReferenceMock = (overrideResponse: Partial<InvitationNeedReference> = {}): InvitationNeedReference => ({...{need_id: faker.string.uuid(), requirements_version: faker.number.int({min: 1})}, ...overrideResponse});
|
||||
|
||||
export const getCreateOrganizationInvitationResponseInvitationPackageItemProvidedMock = (overrideResponse: Partial<InvitationPackageItemProvided> = {}): InvitationPackageItemProvided => ({...{status: faker.helpers.arrayElement(['provided'] as const), description: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300})}, ...overrideResponse});
|
||||
|
||||
export const getCreateOrganizationInvitationResponseInvitationPackageItemNotProvidedMock = (overrideResponse: Partial<InvitationPackageItemNotProvided> = {}): InvitationPackageItemNotProvided => ({...{status: faker.helpers.arrayElement(['not_provided'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getCreateOrganizationInvitationResponseMock = (overrideResponse: Partial<Extract<OrganizationInvitation, object>> = {}): OrganizationInvitation => ({id: faker.string.uuid(), organization_id: faker.string.uuid(), candidate_handle: fakeFromPattern("^[A-Za-z0-9_-]+$", {minLength: 1, maxLength: 128}), need: faker.helpers.arrayElement([{...getCreateOrganizationInvitationResponseInvitationNeedReferenceMock()},null,]), state: faker.helpers.arrayElement(['draft','delivered','viewed','counter','accepted','interview_scheduled','interviewed','negotiation','terms_agreed','no_deal','declined','expired','withdrawn','cancelled_by_candidate'] as const), expiry_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['invitation_timeout','negotiation_timeout'] as const),null,]), version: faker.number.int({min: 1}), terms_version: faker.number.int({min: 1}), terms: {role_title: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), offer_type: faker.helpers.arrayElement(['full_time','part_time','contract','internship'] as const), tasks: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}))), team: fakeFromPattern("\\S", {minLength: 1, maxLength: 1000}), tech_stack: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}))), work_formats: faker.helpers.arrayElements(['remote','office','hybrid'] as const), location: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}),null,]), communication_method: {channel: faker.helpers.arrayElement(['email','phone','telegram','video_call'] as const), details: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}),null,])}, salary: {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(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, package: {bonus: faker.helpers.arrayElement([{...getCreateOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getCreateOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), equipment: faker.helpers.arrayElement([{...getCreateOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getCreateOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), training: faker.helpers.arrayElement([{...getCreateOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getCreateOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), health_insurance: faker.helpers.arrayElement([{...getCreateOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getCreateOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},])}}, response_period_days: faker.helpers.arrayElement([3,7,14] as const), response_deadline_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), salary_raise_used: faker.datatype.boolean(), salary_fit: faker.helpers.arrayElement(['within_range','up_to_10_percent_above','above','withheld','not_available'] as const), contact_access: {status: faker.helpers.arrayElement(['not_granted','available','closed'] as const), fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const)}, created_at: faker.date.past().toISOString().slice(0, 19) + 'Z', updated_at: faker.date.past().toISOString().slice(0, 19) + 'Z', delivered_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), viewed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), responded_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), ...overrideResponse})
|
||||
|
||||
export const getGetOrganizationInvitationResponseInvitationNeedReferenceMock = (overrideResponse: Partial<InvitationNeedReference> = {}): InvitationNeedReference => ({...{need_id: faker.string.uuid(), requirements_version: faker.number.int({min: 1})}, ...overrideResponse});
|
||||
|
||||
export const getGetOrganizationInvitationResponseInvitationPackageItemProvidedMock = (overrideResponse: Partial<InvitationPackageItemProvided> = {}): InvitationPackageItemProvided => ({...{status: faker.helpers.arrayElement(['provided'] as const), description: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300})}, ...overrideResponse});
|
||||
|
||||
export const getGetOrganizationInvitationResponseInvitationPackageItemNotProvidedMock = (overrideResponse: Partial<InvitationPackageItemNotProvided> = {}): InvitationPackageItemNotProvided => ({...{status: faker.helpers.arrayElement(['not_provided'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getGetOrganizationInvitationResponseMock = (overrideResponse: Partial<Extract<OrganizationInvitation, object>> = {}): OrganizationInvitation => ({id: faker.string.uuid(), organization_id: faker.string.uuid(), candidate_handle: fakeFromPattern("^[A-Za-z0-9_-]+$", {minLength: 1, maxLength: 128}), need: faker.helpers.arrayElement([{...getGetOrganizationInvitationResponseInvitationNeedReferenceMock()},null,]), state: faker.helpers.arrayElement(['draft','delivered','viewed','counter','accepted','interview_scheduled','interviewed','negotiation','terms_agreed','no_deal','declined','expired','withdrawn','cancelled_by_candidate'] as const), expiry_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['invitation_timeout','negotiation_timeout'] as const),null,]), version: faker.number.int({min: 1}), terms_version: faker.number.int({min: 1}), terms: {role_title: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), offer_type: faker.helpers.arrayElement(['full_time','part_time','contract','internship'] as const), tasks: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}))), team: fakeFromPattern("\\S", {minLength: 1, maxLength: 1000}), tech_stack: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}))), work_formats: faker.helpers.arrayElements(['remote','office','hybrid'] as const), location: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}),null,]), communication_method: {channel: faker.helpers.arrayElement(['email','phone','telegram','video_call'] as const), details: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}),null,])}, salary: {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(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, package: {bonus: faker.helpers.arrayElement([{...getGetOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getGetOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), equipment: faker.helpers.arrayElement([{...getGetOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getGetOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), training: faker.helpers.arrayElement([{...getGetOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getGetOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), health_insurance: faker.helpers.arrayElement([{...getGetOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getGetOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},])}}, response_period_days: faker.helpers.arrayElement([3,7,14] as const), response_deadline_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), salary_raise_used: faker.datatype.boolean(), salary_fit: faker.helpers.arrayElement(['within_range','up_to_10_percent_above','above','withheld','not_available'] as const), contact_access: {status: faker.helpers.arrayElement(['not_granted','available','closed'] as const), fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const)}, created_at: faker.date.past().toISOString().slice(0, 19) + 'Z', updated_at: faker.date.past().toISOString().slice(0, 19) + 'Z', delivered_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), viewed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), responded_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), ...overrideResponse})
|
||||
|
||||
export const getUpdateOrganizationInvitationResponseInvitationNeedReferenceMock = (overrideResponse: Partial<InvitationNeedReference> = {}): InvitationNeedReference => ({...{need_id: faker.string.uuid(), requirements_version: faker.number.int({min: 1})}, ...overrideResponse});
|
||||
|
||||
export const getUpdateOrganizationInvitationResponseInvitationPackageItemProvidedMock = (overrideResponse: Partial<InvitationPackageItemProvided> = {}): InvitationPackageItemProvided => ({...{status: faker.helpers.arrayElement(['provided'] as const), description: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300})}, ...overrideResponse});
|
||||
|
||||
export const getUpdateOrganizationInvitationResponseInvitationPackageItemNotProvidedMock = (overrideResponse: Partial<InvitationPackageItemNotProvided> = {}): InvitationPackageItemNotProvided => ({...{status: faker.helpers.arrayElement(['not_provided'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getUpdateOrganizationInvitationResponseMock = (overrideResponse: Partial<Extract<OrganizationInvitation, object>> = {}): OrganizationInvitation => ({id: faker.string.uuid(), organization_id: faker.string.uuid(), candidate_handle: fakeFromPattern("^[A-Za-z0-9_-]+$", {minLength: 1, maxLength: 128}), need: faker.helpers.arrayElement([{...getUpdateOrganizationInvitationResponseInvitationNeedReferenceMock()},null,]), state: faker.helpers.arrayElement(['draft','delivered','viewed','counter','accepted','interview_scheduled','interviewed','negotiation','terms_agreed','no_deal','declined','expired','withdrawn','cancelled_by_candidate'] as const), expiry_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['invitation_timeout','negotiation_timeout'] as const),null,]), version: faker.number.int({min: 1}), terms_version: faker.number.int({min: 1}), terms: {role_title: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), offer_type: faker.helpers.arrayElement(['full_time','part_time','contract','internship'] as const), tasks: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}))), team: fakeFromPattern("\\S", {minLength: 1, maxLength: 1000}), tech_stack: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}))), work_formats: faker.helpers.arrayElements(['remote','office','hybrid'] as const), location: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}),null,]), communication_method: {channel: faker.helpers.arrayElement(['email','phone','telegram','video_call'] as const), details: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}),null,])}, salary: {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(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, package: {bonus: faker.helpers.arrayElement([{...getUpdateOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getUpdateOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), equipment: faker.helpers.arrayElement([{...getUpdateOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getUpdateOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), training: faker.helpers.arrayElement([{...getUpdateOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getUpdateOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), health_insurance: faker.helpers.arrayElement([{...getUpdateOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getUpdateOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},])}}, response_period_days: faker.helpers.arrayElement([3,7,14] as const), response_deadline_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), salary_raise_used: faker.datatype.boolean(), salary_fit: faker.helpers.arrayElement(['within_range','up_to_10_percent_above','above','withheld','not_available'] as const), contact_access: {status: faker.helpers.arrayElement(['not_granted','available','closed'] as const), fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const)}, created_at: faker.date.past().toISOString().slice(0, 19) + 'Z', updated_at: faker.date.past().toISOString().slice(0, 19) + 'Z', delivered_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), viewed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), responded_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), ...overrideResponse})
|
||||
|
||||
export const getSendOrganizationInvitationResponseInvitationNeedReferenceMock = (overrideResponse: Partial<InvitationNeedReference> = {}): InvitationNeedReference => ({...{need_id: faker.string.uuid(), requirements_version: faker.number.int({min: 1})}, ...overrideResponse});
|
||||
|
||||
export const getSendOrganizationInvitationResponseInvitationPackageItemProvidedMock = (overrideResponse: Partial<InvitationPackageItemProvided> = {}): InvitationPackageItemProvided => ({...{status: faker.helpers.arrayElement(['provided'] as const), description: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300})}, ...overrideResponse});
|
||||
|
||||
export const getSendOrganizationInvitationResponseInvitationPackageItemNotProvidedMock = (overrideResponse: Partial<InvitationPackageItemNotProvided> = {}): InvitationPackageItemNotProvided => ({...{status: faker.helpers.arrayElement(['not_provided'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getSendOrganizationInvitationResponseMock = (overrideResponse: Partial<Extract<OrganizationInvitation, object>> = {}): OrganizationInvitation => ({id: faker.string.uuid(), organization_id: faker.string.uuid(), candidate_handle: fakeFromPattern("^[A-Za-z0-9_-]+$", {minLength: 1, maxLength: 128}), need: faker.helpers.arrayElement([{...getSendOrganizationInvitationResponseInvitationNeedReferenceMock()},null,]), state: faker.helpers.arrayElement(['draft','delivered','viewed','counter','accepted','interview_scheduled','interviewed','negotiation','terms_agreed','no_deal','declined','expired','withdrawn','cancelled_by_candidate'] as const), expiry_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['invitation_timeout','negotiation_timeout'] as const),null,]), version: faker.number.int({min: 1}), terms_version: faker.number.int({min: 1}), terms: {role_title: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), offer_type: faker.helpers.arrayElement(['full_time','part_time','contract','internship'] as const), tasks: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}))), team: fakeFromPattern("\\S", {minLength: 1, maxLength: 1000}), tech_stack: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}))), work_formats: faker.helpers.arrayElements(['remote','office','hybrid'] as const), location: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}),null,]), communication_method: {channel: faker.helpers.arrayElement(['email','phone','telegram','video_call'] as const), details: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}),null,])}, salary: {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(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, package: {bonus: faker.helpers.arrayElement([{...getSendOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getSendOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), equipment: faker.helpers.arrayElement([{...getSendOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getSendOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), training: faker.helpers.arrayElement([{...getSendOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getSendOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), health_insurance: faker.helpers.arrayElement([{...getSendOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getSendOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},])}}, response_period_days: faker.helpers.arrayElement([3,7,14] as const), response_deadline_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), salary_raise_used: faker.datatype.boolean(), salary_fit: faker.helpers.arrayElement(['within_range','up_to_10_percent_above','above','withheld','not_available'] as const), contact_access: {status: faker.helpers.arrayElement(['not_granted','available','closed'] as const), fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const)}, created_at: faker.date.past().toISOString().slice(0, 19) + 'Z', updated_at: faker.date.past().toISOString().slice(0, 19) + 'Z', delivered_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), viewed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), responded_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), ...overrideResponse})
|
||||
|
||||
export const getRaiseOrganizationInvitationSalaryResponseInvitationNeedReferenceMock = (overrideResponse: Partial<InvitationNeedReference> = {}): InvitationNeedReference => ({...{need_id: faker.string.uuid(), requirements_version: faker.number.int({min: 1})}, ...overrideResponse});
|
||||
|
||||
export const getRaiseOrganizationInvitationSalaryResponseInvitationPackageItemProvidedMock = (overrideResponse: Partial<InvitationPackageItemProvided> = {}): InvitationPackageItemProvided => ({...{status: faker.helpers.arrayElement(['provided'] as const), description: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300})}, ...overrideResponse});
|
||||
|
||||
export const getRaiseOrganizationInvitationSalaryResponseInvitationPackageItemNotProvidedMock = (overrideResponse: Partial<InvitationPackageItemNotProvided> = {}): InvitationPackageItemNotProvided => ({...{status: faker.helpers.arrayElement(['not_provided'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getRaiseOrganizationInvitationSalaryResponseMock = (overrideResponse: Partial<Extract<OrganizationInvitation, object>> = {}): OrganizationInvitation => ({id: faker.string.uuid(), organization_id: faker.string.uuid(), candidate_handle: fakeFromPattern("^[A-Za-z0-9_-]+$", {minLength: 1, maxLength: 128}), need: faker.helpers.arrayElement([{...getRaiseOrganizationInvitationSalaryResponseInvitationNeedReferenceMock()},null,]), state: faker.helpers.arrayElement(['draft','delivered','viewed','counter','accepted','interview_scheduled','interviewed','negotiation','terms_agreed','no_deal','declined','expired','withdrawn','cancelled_by_candidate'] as const), expiry_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['invitation_timeout','negotiation_timeout'] as const),null,]), version: faker.number.int({min: 1}), terms_version: faker.number.int({min: 1}), terms: {role_title: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), offer_type: faker.helpers.arrayElement(['full_time','part_time','contract','internship'] as const), tasks: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}))), team: fakeFromPattern("\\S", {minLength: 1, maxLength: 1000}), tech_stack: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}))), work_formats: faker.helpers.arrayElements(['remote','office','hybrid'] as const), location: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}),null,]), communication_method: {channel: faker.helpers.arrayElement(['email','phone','telegram','video_call'] as const), details: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}),null,])}, salary: {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(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, package: {bonus: faker.helpers.arrayElement([{...getRaiseOrganizationInvitationSalaryResponseInvitationPackageItemProvidedMock()},{...getRaiseOrganizationInvitationSalaryResponseInvitationPackageItemNotProvidedMock()},]), equipment: faker.helpers.arrayElement([{...getRaiseOrganizationInvitationSalaryResponseInvitationPackageItemProvidedMock()},{...getRaiseOrganizationInvitationSalaryResponseInvitationPackageItemNotProvidedMock()},]), training: faker.helpers.arrayElement([{...getRaiseOrganizationInvitationSalaryResponseInvitationPackageItemProvidedMock()},{...getRaiseOrganizationInvitationSalaryResponseInvitationPackageItemNotProvidedMock()},]), health_insurance: faker.helpers.arrayElement([{...getRaiseOrganizationInvitationSalaryResponseInvitationPackageItemProvidedMock()},{...getRaiseOrganizationInvitationSalaryResponseInvitationPackageItemNotProvidedMock()},])}}, response_period_days: faker.helpers.arrayElement([3,7,14] as const), response_deadline_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), salary_raise_used: faker.datatype.boolean(), salary_fit: faker.helpers.arrayElement(['within_range','up_to_10_percent_above','above','withheld','not_available'] as const), contact_access: {status: faker.helpers.arrayElement(['not_granted','available','closed'] as const), fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const)}, created_at: faker.date.past().toISOString().slice(0, 19) + 'Z', updated_at: faker.date.past().toISOString().slice(0, 19) + 'Z', delivered_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), viewed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), responded_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), ...overrideResponse})
|
||||
|
||||
export const getWithdrawOrganizationInvitationResponseInvitationNeedReferenceMock = (overrideResponse: Partial<InvitationNeedReference> = {}): InvitationNeedReference => ({...{need_id: faker.string.uuid(), requirements_version: faker.number.int({min: 1})}, ...overrideResponse});
|
||||
|
||||
export const getWithdrawOrganizationInvitationResponseInvitationPackageItemProvidedMock = (overrideResponse: Partial<InvitationPackageItemProvided> = {}): InvitationPackageItemProvided => ({...{status: faker.helpers.arrayElement(['provided'] as const), description: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300})}, ...overrideResponse});
|
||||
|
||||
export const getWithdrawOrganizationInvitationResponseInvitationPackageItemNotProvidedMock = (overrideResponse: Partial<InvitationPackageItemNotProvided> = {}): InvitationPackageItemNotProvided => ({...{status: faker.helpers.arrayElement(['not_provided'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getWithdrawOrganizationInvitationResponseMock = (overrideResponse: Partial<Extract<OrganizationInvitation, object>> = {}): OrganizationInvitation => ({id: faker.string.uuid(), organization_id: faker.string.uuid(), candidate_handle: fakeFromPattern("^[A-Za-z0-9_-]+$", {minLength: 1, maxLength: 128}), need: faker.helpers.arrayElement([{...getWithdrawOrganizationInvitationResponseInvitationNeedReferenceMock()},null,]), state: faker.helpers.arrayElement(['draft','delivered','viewed','counter','accepted','interview_scheduled','interviewed','negotiation','terms_agreed','no_deal','declined','expired','withdrawn','cancelled_by_candidate'] as const), expiry_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['invitation_timeout','negotiation_timeout'] as const),null,]), version: faker.number.int({min: 1}), terms_version: faker.number.int({min: 1}), terms: {role_title: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), offer_type: faker.helpers.arrayElement(['full_time','part_time','contract','internship'] as const), tasks: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}))), team: fakeFromPattern("\\S", {minLength: 1, maxLength: 1000}), tech_stack: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}))), work_formats: faker.helpers.arrayElements(['remote','office','hybrid'] as const), location: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}),null,]), communication_method: {channel: faker.helpers.arrayElement(['email','phone','telegram','video_call'] as const), details: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}),null,])}, salary: {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(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, package: {bonus: faker.helpers.arrayElement([{...getWithdrawOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getWithdrawOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), equipment: faker.helpers.arrayElement([{...getWithdrawOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getWithdrawOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), training: faker.helpers.arrayElement([{...getWithdrawOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getWithdrawOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},]), health_insurance: faker.helpers.arrayElement([{...getWithdrawOrganizationInvitationResponseInvitationPackageItemProvidedMock()},{...getWithdrawOrganizationInvitationResponseInvitationPackageItemNotProvidedMock()},])}}, response_period_days: faker.helpers.arrayElement([3,7,14] as const), response_deadline_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), salary_raise_used: faker.datatype.boolean(), salary_fit: faker.helpers.arrayElement(['within_range','up_to_10_percent_above','above','withheld','not_available'] as const), contact_access: {status: faker.helpers.arrayElement(['not_granted','available','closed'] as const), fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const)}, created_at: faker.date.past().toISOString().slice(0, 19) + 'Z', updated_at: faker.date.past().toISOString().slice(0, 19) + 'Z', delivered_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), viewed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), responded_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), ...overrideResponse})
|
||||
|
||||
export const getGetOrganizationInvitationContactsResponseMock = (overrideResponse: Partial<Extract<ContactDisclosure, object>> = {}): ContactDisclosure => ({invitation_id: faker.string.uuid(), grant_id: faker.string.uuid(), fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const), granted_at: faker.date.past().toISOString().slice(0, 19) + 'Z', full_name: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}),null,]), email: faker.helpers.arrayElement([faker.internet.email(),null,]), phone: faker.helpers.arrayElement([fakeFromPattern("^\\+[1-9][0-9]{6,14}$", {minLength: 8, maxLength: 16}),null,]), telegram: faker.helpers.arrayElement([fakeFromPattern("^@[A-Za-z0-9_]{5,32}$", {minLength: 6, maxLength: 33}),null,]), ...overrideResponse})
|
||||
|
||||
export const getListMyInvitationsResponseMock = (overrideResponse: Partial<Extract<CandidateInvitationList, object>> = {}): CandidateInvitationList => ({items: Array.from({ length: faker.number.int({min: 1, max: 100}) }, (_, i) => i + 1).map(() => ({id: faker.string.uuid(), organization: {id: faker.string.uuid(), name: faker.string.alpha({length: {min: 1, max: 200}})}, state: faker.helpers.arrayElement(['draft','delivered','viewed','counter','accepted','interview_scheduled','interviewed','negotiation','terms_agreed','no_deal','declined','expired','withdrawn','cancelled_by_candidate'] as const), expiry_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['invitation_timeout','negotiation_timeout'] as const),null,]), version: faker.number.int({min: 1}), terms_version: faker.number.int({min: 1}), role_title: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}), salary: {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(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, work_formats: faker.helpers.arrayElements(['remote','office','hybrid'] as const), response_deadline_at: faker.date.past().toISOString().slice(0, 19) + 'Z', delivered_at: faker.date.past().toISOString().slice(0, 19) + 'Z', viewed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), updated_at: faker.date.past().toISOString().slice(0, 19) + 'Z'})), page: {has_more: faker.datatype.boolean(), next_cursor: faker.helpers.arrayElement([fakeFromPattern("^[A-Za-z0-9_-]+$", {minLength: 1, maxLength: 512}), null])}, ...overrideResponse})
|
||||
|
||||
export const getGetMyInvitationResponseInvitationPackageItemProvidedMock = (overrideResponse: Partial<InvitationPackageItemProvided> = {}): InvitationPackageItemProvided => ({...{status: faker.helpers.arrayElement(['provided'] as const), description: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300})}, ...overrideResponse});
|
||||
|
||||
export const getGetMyInvitationResponseInvitationPackageItemNotProvidedMock = (overrideResponse: Partial<InvitationPackageItemNotProvided> = {}): InvitationPackageItemNotProvided => ({...{status: faker.helpers.arrayElement(['not_provided'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getGetMyInvitationResponseContactConsentOfferMock = (overrideResponse: Partial<ContactConsentOffer> = {}): ContactConsentOffer => ({...{text: {text_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), text: faker.string.alpha({length: {min: 1, max: 100000}})}, available_fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getGetMyInvitationResponseInvitationDeclineRecordMock = (overrideResponse: Partial<InvitationDeclineRecord> = {}): InvitationDeclineRecord => ({...{reason: faker.helpers.arrayElement(['salary','tasks','stack','work_format','package','company','not_looking','other_offer','other'] as const), comment: faker.helpers.arrayElement([fakeFromPattern("\\S", {minLength: 1, maxLength: 500}),null,]), declined_at: faker.date.past().toISOString().slice(0, 19) + 'Z'}, ...overrideResponse});
|
||||
|
||||
export const getGetMyInvitationResponseContactGrantMock = (overrideResponse: Partial<ContactGrant> = {}): ContactGrant => ({...{id: faker.string.uuid(), fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const), status: faker.helpers.arrayElement(['active','revoked'] as const), readable: faker.datatype.boolean(), blocked_by: faker.helpers.arrayElement([faker.helpers.arrayElement(['visibility'] as const),null,]), terms_version: faker.number.int({min: 1}), consent_text_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), granted_at: faker.date.past().toISOString().slice(0, 19) + 'Z', revoked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), revocation_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['consent_revoked','participation_cancelled','visibility_closed'] as const),null,])}, ...overrideResponse});
|
||||
|
||||
export const getGetMyInvitationResponseMock = (overrideResponse: Partial<Extract<CandidateInvitation, object>> = {}): CandidateInvitation => ({id: faker.string.uuid(), organization: {id: faker.string.uuid(), name: faker.string.alpha({length: {min: 1, max: 200}})}, state: faker.helpers.arrayElement(['draft','delivered','viewed','counter','accepted','interview_scheduled','interviewed','negotiation','terms_agreed','no_deal','declined','expired','withdrawn','cancelled_by_candidate'] as const), expiry_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['invitation_timeout','negotiation_timeout'] as const),null,]), version: faker.number.int({min: 1}), terms_version: faker.number.int({min: 1}), terms: {role_title: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), offer_type: faker.helpers.arrayElement(['full_time','part_time','contract','internship'] as const), tasks: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}))), team: fakeFromPattern("\\S", {minLength: 1, maxLength: 1000}), tech_stack: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}))), work_formats: faker.helpers.arrayElements(['remote','office','hybrid'] as const), location: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}),null,]), communication_method: {channel: faker.helpers.arrayElement(['email','phone','telegram','video_call'] as const), details: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}),null,])}, salary: {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(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, package: {bonus: faker.helpers.arrayElement([{...getGetMyInvitationResponseInvitationPackageItemProvidedMock()},{...getGetMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), equipment: faker.helpers.arrayElement([{...getGetMyInvitationResponseInvitationPackageItemProvidedMock()},{...getGetMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), training: faker.helpers.arrayElement([{...getGetMyInvitationResponseInvitationPackageItemProvidedMock()},{...getGetMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), health_insurance: faker.helpers.arrayElement([{...getGetMyInvitationResponseInvitationPackageItemProvidedMock()},{...getGetMyInvitationResponseInvitationPackageItemNotProvidedMock()},])}}, response_deadline_at: faker.date.past().toISOString().slice(0, 19) + 'Z', delivered_at: faker.date.past().toISOString().slice(0, 19) + 'Z', viewed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), responded_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), updated_at: faker.date.past().toISOString().slice(0, 19) + 'Z', contact_consent: faker.helpers.arrayElement([{...getGetMyInvitationResponseContactConsentOfferMock()},null,]), decline: faker.helpers.arrayElement([{...getGetMyInvitationResponseInvitationDeclineRecordMock()},null,]), contact_grant: faker.helpers.arrayElement([{...getGetMyInvitationResponseContactGrantMock()},null,]), ...overrideResponse})
|
||||
|
||||
export const getViewMyInvitationResponseInvitationPackageItemProvidedMock = (overrideResponse: Partial<InvitationPackageItemProvided> = {}): InvitationPackageItemProvided => ({...{status: faker.helpers.arrayElement(['provided'] as const), description: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300})}, ...overrideResponse});
|
||||
|
||||
export const getViewMyInvitationResponseInvitationPackageItemNotProvidedMock = (overrideResponse: Partial<InvitationPackageItemNotProvided> = {}): InvitationPackageItemNotProvided => ({...{status: faker.helpers.arrayElement(['not_provided'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getViewMyInvitationResponseContactConsentOfferMock = (overrideResponse: Partial<ContactConsentOffer> = {}): ContactConsentOffer => ({...{text: {text_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), text: faker.string.alpha({length: {min: 1, max: 100000}})}, available_fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getViewMyInvitationResponseInvitationDeclineRecordMock = (overrideResponse: Partial<InvitationDeclineRecord> = {}): InvitationDeclineRecord => ({...{reason: faker.helpers.arrayElement(['salary','tasks','stack','work_format','package','company','not_looking','other_offer','other'] as const), comment: faker.helpers.arrayElement([fakeFromPattern("\\S", {minLength: 1, maxLength: 500}),null,]), declined_at: faker.date.past().toISOString().slice(0, 19) + 'Z'}, ...overrideResponse});
|
||||
|
||||
export const getViewMyInvitationResponseContactGrantMock = (overrideResponse: Partial<ContactGrant> = {}): ContactGrant => ({...{id: faker.string.uuid(), fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const), status: faker.helpers.arrayElement(['active','revoked'] as const), readable: faker.datatype.boolean(), blocked_by: faker.helpers.arrayElement([faker.helpers.arrayElement(['visibility'] as const),null,]), terms_version: faker.number.int({min: 1}), consent_text_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), granted_at: faker.date.past().toISOString().slice(0, 19) + 'Z', revoked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), revocation_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['consent_revoked','participation_cancelled','visibility_closed'] as const),null,])}, ...overrideResponse});
|
||||
|
||||
export const getViewMyInvitationResponseMock = (overrideResponse: Partial<Extract<CandidateInvitation, object>> = {}): CandidateInvitation => ({id: faker.string.uuid(), organization: {id: faker.string.uuid(), name: faker.string.alpha({length: {min: 1, max: 200}})}, state: faker.helpers.arrayElement(['draft','delivered','viewed','counter','accepted','interview_scheduled','interviewed','negotiation','terms_agreed','no_deal','declined','expired','withdrawn','cancelled_by_candidate'] as const), expiry_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['invitation_timeout','negotiation_timeout'] as const),null,]), version: faker.number.int({min: 1}), terms_version: faker.number.int({min: 1}), terms: {role_title: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), offer_type: faker.helpers.arrayElement(['full_time','part_time','contract','internship'] as const), tasks: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}))), team: fakeFromPattern("\\S", {minLength: 1, maxLength: 1000}), tech_stack: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}))), work_formats: faker.helpers.arrayElements(['remote','office','hybrid'] as const), location: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}),null,]), communication_method: {channel: faker.helpers.arrayElement(['email','phone','telegram','video_call'] as const), details: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}),null,])}, salary: {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(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, package: {bonus: faker.helpers.arrayElement([{...getViewMyInvitationResponseInvitationPackageItemProvidedMock()},{...getViewMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), equipment: faker.helpers.arrayElement([{...getViewMyInvitationResponseInvitationPackageItemProvidedMock()},{...getViewMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), training: faker.helpers.arrayElement([{...getViewMyInvitationResponseInvitationPackageItemProvidedMock()},{...getViewMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), health_insurance: faker.helpers.arrayElement([{...getViewMyInvitationResponseInvitationPackageItemProvidedMock()},{...getViewMyInvitationResponseInvitationPackageItemNotProvidedMock()},])}}, response_deadline_at: faker.date.past().toISOString().slice(0, 19) + 'Z', delivered_at: faker.date.past().toISOString().slice(0, 19) + 'Z', viewed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), responded_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), updated_at: faker.date.past().toISOString().slice(0, 19) + 'Z', contact_consent: faker.helpers.arrayElement([{...getViewMyInvitationResponseContactConsentOfferMock()},null,]), decline: faker.helpers.arrayElement([{...getViewMyInvitationResponseInvitationDeclineRecordMock()},null,]), contact_grant: faker.helpers.arrayElement([{...getViewMyInvitationResponseContactGrantMock()},null,]), ...overrideResponse})
|
||||
|
||||
export const getAcceptMyInvitationResponseInvitationPackageItemProvidedMock = (overrideResponse: Partial<InvitationPackageItemProvided> = {}): InvitationPackageItemProvided => ({...{status: faker.helpers.arrayElement(['provided'] as const), description: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300})}, ...overrideResponse});
|
||||
|
||||
export const getAcceptMyInvitationResponseInvitationPackageItemNotProvidedMock = (overrideResponse: Partial<InvitationPackageItemNotProvided> = {}): InvitationPackageItemNotProvided => ({...{status: faker.helpers.arrayElement(['not_provided'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getAcceptMyInvitationResponseContactConsentOfferMock = (overrideResponse: Partial<ContactConsentOffer> = {}): ContactConsentOffer => ({...{text: {text_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), text: faker.string.alpha({length: {min: 1, max: 100000}})}, available_fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getAcceptMyInvitationResponseInvitationDeclineRecordMock = (overrideResponse: Partial<InvitationDeclineRecord> = {}): InvitationDeclineRecord => ({...{reason: faker.helpers.arrayElement(['salary','tasks','stack','work_format','package','company','not_looking','other_offer','other'] as const), comment: faker.helpers.arrayElement([fakeFromPattern("\\S", {minLength: 1, maxLength: 500}),null,]), declined_at: faker.date.past().toISOString().slice(0, 19) + 'Z'}, ...overrideResponse});
|
||||
|
||||
export const getAcceptMyInvitationResponseContactGrantMock = (overrideResponse: Partial<ContactGrant> = {}): ContactGrant => ({...{id: faker.string.uuid(), fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const), status: faker.helpers.arrayElement(['active','revoked'] as const), readable: faker.datatype.boolean(), blocked_by: faker.helpers.arrayElement([faker.helpers.arrayElement(['visibility'] as const),null,]), terms_version: faker.number.int({min: 1}), consent_text_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), granted_at: faker.date.past().toISOString().slice(0, 19) + 'Z', revoked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), revocation_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['consent_revoked','participation_cancelled','visibility_closed'] as const),null,])}, ...overrideResponse});
|
||||
|
||||
export const getAcceptMyInvitationResponseMock = (overrideResponse: Partial<Extract<CandidateInvitation, object>> = {}): CandidateInvitation => ({id: faker.string.uuid(), organization: {id: faker.string.uuid(), name: faker.string.alpha({length: {min: 1, max: 200}})}, state: faker.helpers.arrayElement(['draft','delivered','viewed','counter','accepted','interview_scheduled','interviewed','negotiation','terms_agreed','no_deal','declined','expired','withdrawn','cancelled_by_candidate'] as const), expiry_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['invitation_timeout','negotiation_timeout'] as const),null,]), version: faker.number.int({min: 1}), terms_version: faker.number.int({min: 1}), terms: {role_title: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), offer_type: faker.helpers.arrayElement(['full_time','part_time','contract','internship'] as const), tasks: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}))), team: fakeFromPattern("\\S", {minLength: 1, maxLength: 1000}), tech_stack: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}))), work_formats: faker.helpers.arrayElements(['remote','office','hybrid'] as const), location: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}),null,]), communication_method: {channel: faker.helpers.arrayElement(['email','phone','telegram','video_call'] as const), details: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}),null,])}, salary: {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(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, package: {bonus: faker.helpers.arrayElement([{...getAcceptMyInvitationResponseInvitationPackageItemProvidedMock()},{...getAcceptMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), equipment: faker.helpers.arrayElement([{...getAcceptMyInvitationResponseInvitationPackageItemProvidedMock()},{...getAcceptMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), training: faker.helpers.arrayElement([{...getAcceptMyInvitationResponseInvitationPackageItemProvidedMock()},{...getAcceptMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), health_insurance: faker.helpers.arrayElement([{...getAcceptMyInvitationResponseInvitationPackageItemProvidedMock()},{...getAcceptMyInvitationResponseInvitationPackageItemNotProvidedMock()},])}}, response_deadline_at: faker.date.past().toISOString().slice(0, 19) + 'Z', delivered_at: faker.date.past().toISOString().slice(0, 19) + 'Z', viewed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), responded_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), updated_at: faker.date.past().toISOString().slice(0, 19) + 'Z', contact_consent: faker.helpers.arrayElement([{...getAcceptMyInvitationResponseContactConsentOfferMock()},null,]), decline: faker.helpers.arrayElement([{...getAcceptMyInvitationResponseInvitationDeclineRecordMock()},null,]), contact_grant: faker.helpers.arrayElement([{...getAcceptMyInvitationResponseContactGrantMock()},null,]), ...overrideResponse})
|
||||
|
||||
export const getDeclineMyInvitationResponseInvitationPackageItemProvidedMock = (overrideResponse: Partial<InvitationPackageItemProvided> = {}): InvitationPackageItemProvided => ({...{status: faker.helpers.arrayElement(['provided'] as const), description: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300})}, ...overrideResponse});
|
||||
|
||||
export const getDeclineMyInvitationResponseInvitationPackageItemNotProvidedMock = (overrideResponse: Partial<InvitationPackageItemNotProvided> = {}): InvitationPackageItemNotProvided => ({...{status: faker.helpers.arrayElement(['not_provided'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getDeclineMyInvitationResponseContactConsentOfferMock = (overrideResponse: Partial<ContactConsentOffer> = {}): ContactConsentOffer => ({...{text: {text_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), text: faker.string.alpha({length: {min: 1, max: 100000}})}, available_fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getDeclineMyInvitationResponseInvitationDeclineRecordMock = (overrideResponse: Partial<InvitationDeclineRecord> = {}): InvitationDeclineRecord => ({...{reason: faker.helpers.arrayElement(['salary','tasks','stack','work_format','package','company','not_looking','other_offer','other'] as const), comment: faker.helpers.arrayElement([fakeFromPattern("\\S", {minLength: 1, maxLength: 500}),null,]), declined_at: faker.date.past().toISOString().slice(0, 19) + 'Z'}, ...overrideResponse});
|
||||
|
||||
export const getDeclineMyInvitationResponseContactGrantMock = (overrideResponse: Partial<ContactGrant> = {}): ContactGrant => ({...{id: faker.string.uuid(), fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const), status: faker.helpers.arrayElement(['active','revoked'] as const), readable: faker.datatype.boolean(), blocked_by: faker.helpers.arrayElement([faker.helpers.arrayElement(['visibility'] as const),null,]), terms_version: faker.number.int({min: 1}), consent_text_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), granted_at: faker.date.past().toISOString().slice(0, 19) + 'Z', revoked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), revocation_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['consent_revoked','participation_cancelled','visibility_closed'] as const),null,])}, ...overrideResponse});
|
||||
|
||||
export const getDeclineMyInvitationResponseMock = (overrideResponse: Partial<Extract<CandidateInvitation, object>> = {}): CandidateInvitation => ({id: faker.string.uuid(), organization: {id: faker.string.uuid(), name: faker.string.alpha({length: {min: 1, max: 200}})}, state: faker.helpers.arrayElement(['draft','delivered','viewed','counter','accepted','interview_scheduled','interviewed','negotiation','terms_agreed','no_deal','declined','expired','withdrawn','cancelled_by_candidate'] as const), expiry_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['invitation_timeout','negotiation_timeout'] as const),null,]), version: faker.number.int({min: 1}), terms_version: faker.number.int({min: 1}), terms: {role_title: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), offer_type: faker.helpers.arrayElement(['full_time','part_time','contract','internship'] as const), tasks: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}))), team: fakeFromPattern("\\S", {minLength: 1, maxLength: 1000}), tech_stack: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}))), work_formats: faker.helpers.arrayElements(['remote','office','hybrid'] as const), location: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}),null,]), communication_method: {channel: faker.helpers.arrayElement(['email','phone','telegram','video_call'] as const), details: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}),null,])}, salary: {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(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, package: {bonus: faker.helpers.arrayElement([{...getDeclineMyInvitationResponseInvitationPackageItemProvidedMock()},{...getDeclineMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), equipment: faker.helpers.arrayElement([{...getDeclineMyInvitationResponseInvitationPackageItemProvidedMock()},{...getDeclineMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), training: faker.helpers.arrayElement([{...getDeclineMyInvitationResponseInvitationPackageItemProvidedMock()},{...getDeclineMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), health_insurance: faker.helpers.arrayElement([{...getDeclineMyInvitationResponseInvitationPackageItemProvidedMock()},{...getDeclineMyInvitationResponseInvitationPackageItemNotProvidedMock()},])}}, response_deadline_at: faker.date.past().toISOString().slice(0, 19) + 'Z', delivered_at: faker.date.past().toISOString().slice(0, 19) + 'Z', viewed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), responded_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), updated_at: faker.date.past().toISOString().slice(0, 19) + 'Z', contact_consent: faker.helpers.arrayElement([{...getDeclineMyInvitationResponseContactConsentOfferMock()},null,]), decline: faker.helpers.arrayElement([{...getDeclineMyInvitationResponseInvitationDeclineRecordMock()},null,]), contact_grant: faker.helpers.arrayElement([{...getDeclineMyInvitationResponseContactGrantMock()},null,]), ...overrideResponse})
|
||||
|
||||
export const getCancelMyInvitationResponseInvitationPackageItemProvidedMock = (overrideResponse: Partial<InvitationPackageItemProvided> = {}): InvitationPackageItemProvided => ({...{status: faker.helpers.arrayElement(['provided'] as const), description: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300})}, ...overrideResponse});
|
||||
|
||||
export const getCancelMyInvitationResponseInvitationPackageItemNotProvidedMock = (overrideResponse: Partial<InvitationPackageItemNotProvided> = {}): InvitationPackageItemNotProvided => ({...{status: faker.helpers.arrayElement(['not_provided'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getCancelMyInvitationResponseContactConsentOfferMock = (overrideResponse: Partial<ContactConsentOffer> = {}): ContactConsentOffer => ({...{text: {text_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), text: faker.string.alpha({length: {min: 1, max: 100000}})}, available_fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const)}, ...overrideResponse});
|
||||
|
||||
export const getCancelMyInvitationResponseInvitationDeclineRecordMock = (overrideResponse: Partial<InvitationDeclineRecord> = {}): InvitationDeclineRecord => ({...{reason: faker.helpers.arrayElement(['salary','tasks','stack','work_format','package','company','not_looking','other_offer','other'] as const), comment: faker.helpers.arrayElement([fakeFromPattern("\\S", {minLength: 1, maxLength: 500}),null,]), declined_at: faker.date.past().toISOString().slice(0, 19) + 'Z'}, ...overrideResponse});
|
||||
|
||||
export const getCancelMyInvitationResponseContactGrantMock = (overrideResponse: Partial<ContactGrant> = {}): ContactGrant => ({...{id: faker.string.uuid(), fields: faker.helpers.arrayElements(['full_name','email','phone','telegram'] as const), status: faker.helpers.arrayElement(['active','revoked'] as const), readable: faker.datatype.boolean(), blocked_by: faker.helpers.arrayElement([faker.helpers.arrayElement(['visibility'] as const),null,]), terms_version: faker.number.int({min: 1}), consent_text_version: fakeFromPattern("^[A-Za-z0-9._-]+$", {minLength: 1, maxLength: 64}), granted_at: faker.date.past().toISOString().slice(0, 19) + 'Z', revoked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), revocation_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['consent_revoked','participation_cancelled','visibility_closed'] as const),null,])}, ...overrideResponse});
|
||||
|
||||
export const getCancelMyInvitationResponseMock = (overrideResponse: Partial<Extract<CandidateInvitation, object>> = {}): CandidateInvitation => ({id: faker.string.uuid(), organization: {id: faker.string.uuid(), name: faker.string.alpha({length: {min: 1, max: 200}})}, state: faker.helpers.arrayElement(['draft','delivered','viewed','counter','accepted','interview_scheduled','interviewed','negotiation','terms_agreed','no_deal','declined','expired','withdrawn','cancelled_by_candidate'] as const), expiry_reason: faker.helpers.arrayElement([faker.helpers.arrayElement(['invitation_timeout','negotiation_timeout'] as const),null,]), version: faker.number.int({min: 1}), terms_version: faker.number.int({min: 1}), terms: {role_title: fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 200}), specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), offer_type: faker.helpers.arrayElement(['full_time','part_time','contract','internship'] as const), tasks: Array.from({ length: faker.number.int({min: 1, max: 20}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}))), team: fakeFromPattern("\\S", {minLength: 1, maxLength: 1000}), tech_stack: Array.from({ length: faker.number.int({min: 1, max: 30}) }, (_, i) => i + 1).map(() => (fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}))), work_formats: faker.helpers.arrayElements(['remote','office','hybrid'] as const), location: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 100}),null,]), communication_method: {channel: faker.helpers.arrayElement(['email','phone','telegram','video_call'] as const), details: faker.helpers.arrayElement([fakeFromPattern("^\\S(?:.*\\S)?$", {minLength: 1, maxLength: 300}),null,])}, salary: {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(['RUB'] as const), period: faker.helpers.arrayElement(['month'] as const), tax_basis: faker.helpers.arrayElement(['net','gross'] as const)}, package: {bonus: faker.helpers.arrayElement([{...getCancelMyInvitationResponseInvitationPackageItemProvidedMock()},{...getCancelMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), equipment: faker.helpers.arrayElement([{...getCancelMyInvitationResponseInvitationPackageItemProvidedMock()},{...getCancelMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), training: faker.helpers.arrayElement([{...getCancelMyInvitationResponseInvitationPackageItemProvidedMock()},{...getCancelMyInvitationResponseInvitationPackageItemNotProvidedMock()},]), health_insurance: faker.helpers.arrayElement([{...getCancelMyInvitationResponseInvitationPackageItemProvidedMock()},{...getCancelMyInvitationResponseInvitationPackageItemNotProvidedMock()},])}}, response_deadline_at: faker.date.past().toISOString().slice(0, 19) + 'Z', delivered_at: faker.date.past().toISOString().slice(0, 19) + 'Z', viewed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), responded_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), updated_at: faker.date.past().toISOString().slice(0, 19) + 'Z', contact_consent: faker.helpers.arrayElement([{...getCancelMyInvitationResponseContactConsentOfferMock()},null,]), decline: faker.helpers.arrayElement([{...getCancelMyInvitationResponseInvitationDeclineRecordMock()},null,]), contact_grant: faker.helpers.arrayElement([{...getCancelMyInvitationResponseContactGrantMock()},null,]), ...overrideResponse})
|
||||
|
||||
|
||||
export const getListOrganizationInvitationsMockHandler = (overrideResponse?: OrganizationInvitationList | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<OrganizationInvitationList> | OrganizationInvitationList), options?: RequestHandlerOptions) => {
|
||||
return http.get('*/api/v1/organizations/:orgId/invitations', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getListOrganizationInvitationsResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getCreateOrganizationInvitationMockHandler = (overrideResponse?: OrganizationInvitation | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<OrganizationInvitation> | OrganizationInvitation), options?: RequestHandlerOptions) => {
|
||||
return http.post('*/api/v1/organizations/:orgId/invitations', async (info: Parameters<Parameters<typeof http.post>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getCreateOrganizationInvitationResponseMock(),
|
||||
{ status: 201
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getGetOrganizationInvitationMockHandler = (overrideResponse?: OrganizationInvitation | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<OrganizationInvitation> | OrganizationInvitation), options?: RequestHandlerOptions) => {
|
||||
return http.get('*/api/v1/organizations/:orgId/invitations/:invitationId', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getGetOrganizationInvitationResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getUpdateOrganizationInvitationMockHandler = (overrideResponse?: OrganizationInvitation | ((info: Parameters<Parameters<typeof http.patch>[1]>[0]) => Promise<OrganizationInvitation> | OrganizationInvitation), options?: RequestHandlerOptions) => {
|
||||
return http.patch('*/api/v1/organizations/:orgId/invitations/:invitationId', async (info: Parameters<Parameters<typeof http.patch>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getUpdateOrganizationInvitationResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getSendOrganizationInvitationMockHandler = (overrideResponse?: OrganizationInvitation | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<OrganizationInvitation> | OrganizationInvitation), options?: RequestHandlerOptions) => {
|
||||
return http.post('*/api/v1/organizations/:orgId/invitations/:invitationId/send', async (info: Parameters<Parameters<typeof http.post>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getSendOrganizationInvitationResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getRaiseOrganizationInvitationSalaryMockHandler = (overrideResponse?: OrganizationInvitation | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<OrganizationInvitation> | OrganizationInvitation), options?: RequestHandlerOptions) => {
|
||||
return http.post('*/api/v1/organizations/:orgId/invitations/:invitationId/salary-raise', async (info: Parameters<Parameters<typeof http.post>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getRaiseOrganizationInvitationSalaryResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getWithdrawOrganizationInvitationMockHandler = (overrideResponse?: OrganizationInvitation | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<OrganizationInvitation> | OrganizationInvitation), options?: RequestHandlerOptions) => {
|
||||
return http.post('*/api/v1/organizations/:orgId/invitations/:invitationId/withdraw', async (info: Parameters<Parameters<typeof http.post>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getWithdrawOrganizationInvitationResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getGetOrganizationInvitationContactsMockHandler = (overrideResponse?: ContactDisclosure | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<ContactDisclosure> | ContactDisclosure), options?: RequestHandlerOptions) => {
|
||||
return http.get('*/api/v1/organizations/:orgId/invitations/:invitationId/contacts', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getGetOrganizationInvitationContactsResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getListMyInvitationsMockHandler = (overrideResponse?: CandidateInvitationList | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<CandidateInvitationList> | CandidateInvitationList), options?: RequestHandlerOptions) => {
|
||||
return http.get('*/api/v1/me/invitations', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getListMyInvitationsResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getGetMyInvitationMockHandler = (overrideResponse?: CandidateInvitation | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<CandidateInvitation> | CandidateInvitation), options?: RequestHandlerOptions) => {
|
||||
return http.get('*/api/v1/me/invitations/:invitationId', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getGetMyInvitationResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getViewMyInvitationMockHandler = (overrideResponse?: CandidateInvitation | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<CandidateInvitation> | CandidateInvitation), options?: RequestHandlerOptions) => {
|
||||
return http.post('*/api/v1/me/invitations/:invitationId/view', async (info: Parameters<Parameters<typeof http.post>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getViewMyInvitationResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getAcceptMyInvitationMockHandler = (overrideResponse?: CandidateInvitation | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<CandidateInvitation> | CandidateInvitation), options?: RequestHandlerOptions) => {
|
||||
return http.post('*/api/v1/me/invitations/:invitationId/accept', async (info: Parameters<Parameters<typeof http.post>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getAcceptMyInvitationResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getDeclineMyInvitationMockHandler = (overrideResponse?: CandidateInvitation | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<CandidateInvitation> | CandidateInvitation), options?: RequestHandlerOptions) => {
|
||||
return http.post('*/api/v1/me/invitations/:invitationId/decline', async (info: Parameters<Parameters<typeof http.post>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getDeclineMyInvitationResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getCancelMyInvitationMockHandler = (overrideResponse?: CandidateInvitation | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<CandidateInvitation> | CandidateInvitation), options?: RequestHandlerOptions) => {
|
||||
return http.post('*/api/v1/me/invitations/:invitationId/cancel', async (info: Parameters<Parameters<typeof http.post>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getCancelMyInvitationResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
export const getInvitationMock = () => [
|
||||
getListOrganizationInvitationsMockHandler(),
|
||||
getCreateOrganizationInvitationMockHandler(),
|
||||
getGetOrganizationInvitationMockHandler(),
|
||||
getUpdateOrganizationInvitationMockHandler(),
|
||||
getSendOrganizationInvitationMockHandler(),
|
||||
getRaiseOrganizationInvitationSalaryMockHandler(),
|
||||
getWithdrawOrganizationInvitationMockHandler(),
|
||||
getGetOrganizationInvitationContactsMockHandler(),
|
||||
getListMyInvitationsMockHandler(),
|
||||
getGetMyInvitationMockHandler(),
|
||||
getViewMyInvitationMockHandler(),
|
||||
getAcceptMyInvitationMockHandler(),
|
||||
getDeclineMyInvitationMockHandler(),
|
||||
getCancelMyInvitationMockHandler()
|
||||
]
|
||||
File diff suppressed because it is too large.
Load diff
@@ -188,9 +188,9 @@ export const getCreateMySupportCaseUrl = () => {
|
||||
* | `anticheat_appeal` | candidate | required; `assessment_attempt` of the caller with an anti-cheat review decision | none |
|
||||
* | `manual_assessment` | candidate | optional; a prior `assessment_attempt` of the caller in the same specialization | required `assessment_target` |
|
||||
*
|
||||
* An organization is visible to a candidate when it sent the candidate an invitation or when the organization contract (TASK-077) shows the candidate its profile, and to an employer account when the account has an active membership in it. Invitations are not in the contract yet, so until they are, every `invitation` reference answers 404 not_found; anti-cheat review decisions are not either, so until TASK-173 every anti-cheat appeal answers 409 state_conflict. The schema rejects an object type that the case type does not accept, for example an organization in a grade appeal.
|
||||
* An organization is visible to a candidate when it sent the candidate an invitation or when the organization contract (TASK-077) shows the candidate its profile, and to an employer account when the account has an active membership in it. Invitations are in the contract (TASK-196) but not implemented yet, so until they are, every `invitation` reference answers 404 not_found; anti-cheat review decisions are not either, so until TASK-173 every anti-cheat appeal answers 409 state_conflict. The schema rejects an object type that the case type does not accept, for example an organization in a grade appeal.
|
||||
*
|
||||
* Ownership of the reference: the server checks the object against the session account on every create. An unknown object and an object of someone else, such as another candidate's attempt, another account's case, or an invitation addressed to another person, both answer 404 not_found, so a reference never reveals whether a foreign object exists. An own case that a grade appeal cannot dispute, because it is not a manual assessment, is not resolved yet, or was resolved with another outcome, answers 409 state_conflict. An identifier that is not a UUID fails validation with the whole-body pointer, because the decoder does not record the path inside the selected variant. The case stores only the type and the identifier of the object.
|
||||
* Ownership of the reference: the server checks the object against the session account on every create. An unknown object and an object of someone else, such as another candidate's attempt, another account's case, or an invitation addressed to another person, both answer 404 not_found, so a reference never reveals whether a foreign object exists. An own case that a grade appeal cannot dispute, because it is not a manual assessment, is not resolved yet, or was resolved with another outcome, answers 409 state_conflict. An identifier that is not a UUID fails validation with the pointer `/object/id`. The case stores only the type and the identifier of the object.
|
||||
*
|
||||
* Limits: an attempt and a resolved manual assessment each accept at most one grade appeal, and an attempt at most one anti-cheat appeal, in any status; a disagreement with the decision goes into a support case that references the appeal as `support_case`. A specialization accepts one open manual assessment, and an object accepts one open complaint; open means not `resolved` or `closed`. A second one answers 409 state_conflict. A grade appeal of an attempt that is still active also answers 409. Every create that passed authentication, validation, and the account scenario counts against a per-account limit from the product policy, including replays, 404, and 409, so the limit also bounds probing of references; over the limit the server answers 429 with Retry-After and creates nothing.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,464 @@
|
||||
import { describe, expect, expectTypeOf, it } from "vitest";
|
||||
import {
|
||||
acceptMyInvitation,
|
||||
createOrganizationInvitation,
|
||||
getMyInvitation,
|
||||
getOrganizationInvitation,
|
||||
getOrganizationInvitationContacts,
|
||||
viewMyInvitation,
|
||||
} from "./endpoints/invitation/invitation";
|
||||
import {
|
||||
AcceptMyInvitationBody,
|
||||
CandidateInvitation,
|
||||
type CandidateInvitationSummary,
|
||||
ContactGrant,
|
||||
ContactDisclosure,
|
||||
CreateOrganizationInvitationBody,
|
||||
DeclineMyInvitationBody,
|
||||
InvitationAcceptance,
|
||||
type InvitationDeclineRequest,
|
||||
InvitationPackageItem,
|
||||
InvitationTerms,
|
||||
OrganizationInvitation,
|
||||
OrganizationInvitationCreate,
|
||||
type OrganizationInvitationSummary,
|
||||
type OrganizationInvitationUpdate,
|
||||
SalaryRange,
|
||||
} from "./schemas";
|
||||
|
||||
// These tests pin the generated invitation contract that the FSD adapters
|
||||
// consume. They fail when regeneration drops a required term, lets a package
|
||||
// condition default to "not provided" by omission, accepts an acceptance
|
||||
// without the terms version or with an implicit C4 choice, or adds a field
|
||||
// that would carry a candidate's contact, the hidden salary minimum, or the
|
||||
// reason of a decline into a DTO that the organization reads before a grant.
|
||||
|
||||
const salary = {
|
||||
salary_from: 200000,
|
||||
salary_to: 260000,
|
||||
currency: "RUB",
|
||||
period: "month",
|
||||
tax_basis: "net",
|
||||
} as const;
|
||||
|
||||
const terms = {
|
||||
role_title: "Middle Go-разработчик в команду платежей",
|
||||
specialization: "backend",
|
||||
grade: "middle",
|
||||
offer_type: "full_time",
|
||||
tasks: ["Развивать сервис выплат на Go"],
|
||||
team: "Команда платежей: пять бэкенд-разработчиков и QA-инженер.",
|
||||
tech_stack: ["Go", "PostgreSQL", "Kafka"],
|
||||
work_formats: ["remote", "hybrid"],
|
||||
location: "Москва",
|
||||
communication_method: { channel: "email", details: null },
|
||||
salary,
|
||||
package: {
|
||||
bonus: { status: "provided", description: "Годовой бонус до 15% оклада" },
|
||||
equipment: { status: "provided", description: "Ноутбук и монитор" },
|
||||
training: { status: "not_provided" },
|
||||
health_insurance: { status: "not_provided" },
|
||||
},
|
||||
} as const;
|
||||
|
||||
const draft = {
|
||||
candidate_handle: "cand_7Qm2xVb9Lr4Kp0Zt",
|
||||
need: { need_id: "01928f7a-2b3c-7d4e-9f5a-6b7c8d9e0f12", requirements_version: 3 },
|
||||
response_period_days: 7,
|
||||
terms,
|
||||
} as const;
|
||||
|
||||
function without<T extends object, K extends keyof T>(value: T, key: K): Omit<T, K> {
|
||||
const copy: Partial<T> = { ...value };
|
||||
delete copy[key];
|
||||
return copy as Omit<T, K>;
|
||||
}
|
||||
|
||||
const createSchemas = [
|
||||
["OrganizationInvitationCreate", OrganizationInvitationCreate],
|
||||
["CreateOrganizationInvitationBody", CreateOrganizationInvitationBody],
|
||||
] as const;
|
||||
|
||||
describe.each(createSchemas)("generated %s", (_name, schema) => {
|
||||
it("accepts a complete draft from a need", () => {
|
||||
expect(schema.parse(draft)).toEqual(draft);
|
||||
});
|
||||
|
||||
it("accepts a direct draft without a need or a response period", () => {
|
||||
const direct = { candidate_handle: draft.candidate_handle, terms };
|
||||
|
||||
expect(schema.parse(direct)).toEqual(direct);
|
||||
});
|
||||
|
||||
it.each([
|
||||
["the communication method", "communication_method"],
|
||||
["the salary range", "salary"],
|
||||
["the package", "package"],
|
||||
["the tasks", "tasks"],
|
||||
["the team", "team"],
|
||||
["the technology stack", "tech_stack"],
|
||||
["the offer type", "offer_type"],
|
||||
["the place of work", "location"],
|
||||
] as const)("rejects terms without %s", (_case, field) => {
|
||||
const result = schema.safeParse({ ...draft, terms: without(terms, field) });
|
||||
|
||||
expect(result.success).toBe(false);
|
||||
expect(result.error?.issues).toEqual([expect.objectContaining({ path: ["terms", field] })]);
|
||||
});
|
||||
|
||||
it("rejects a salary range without its tax basis", () => {
|
||||
const result = schema.safeParse({
|
||||
...draft,
|
||||
terms: { ...terms, salary: without(salary, "tax_basis") },
|
||||
});
|
||||
|
||||
expect(result.success).toBe(false);
|
||||
expect(result.error?.issues).toEqual([
|
||||
expect.objectContaining({ path: ["terms", "salary", "tax_basis"] }),
|
||||
]);
|
||||
});
|
||||
|
||||
it("rejects a package condition left out instead of not provided", () => {
|
||||
const result = schema.safeParse({
|
||||
...draft,
|
||||
terms: { ...terms, package: without(terms.package, "training") },
|
||||
});
|
||||
|
||||
expect(result.success).toBe(false);
|
||||
expect(result.error?.issues).toEqual([
|
||||
expect.objectContaining({ path: ["terms", "package", "training"] }),
|
||||
]);
|
||||
});
|
||||
|
||||
it.each([
|
||||
["a zero lower bound", { salary_from: 0 }, "salary_from"],
|
||||
["a bound that is not a multiple of 1000", { salary_to: 260500 }, "salary_to"],
|
||||
["another currency", { currency: "USD" }, "currency"],
|
||||
["an unknown tax basis", { tax_basis: "net_or_gross" }, "tax_basis"],
|
||||
])("rejects a salary with %s", (_case, change, field) => {
|
||||
const range = { ...salary, ...change };
|
||||
|
||||
expect(schema.safeParse({ ...draft, terms: { ...terms, salary: range } }).success).toBe(false);
|
||||
expect(SalaryRange.safeParse(range).error?.issues).toEqual([
|
||||
expect.objectContaining({ path: [field] }),
|
||||
]);
|
||||
});
|
||||
|
||||
it("leaves the cross-field salary and place rules to the server", () => {
|
||||
// A < B, the 10-40% width, and a place for office or hybrid compare
|
||||
// fields; the server answers 400 with /terms/salary/salary_to or
|
||||
// /terms/location.
|
||||
for (const [from, to] of [
|
||||
[260000, 200000],
|
||||
[100000, 200000],
|
||||
]) {
|
||||
const range = { ...salary, salary_from: from, salary_to: to };
|
||||
|
||||
expect(schema.safeParse({ ...draft, terms: { ...terms, salary: range } }).success).toBe(true);
|
||||
}
|
||||
expect(
|
||||
schema.safeParse({ ...draft, terms: { ...terms, work_formats: ["office"], location: null } })
|
||||
.success,
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("rejects a response period outside 3, 7, and 14 days", () => {
|
||||
for (const days of [3, 7, 14]) {
|
||||
expect(schema.safeParse({ ...draft, response_period_days: days }).success).toBe(true);
|
||||
}
|
||||
expect(schema.safeParse({ ...draft, response_period_days: 10 }).success).toBe(false);
|
||||
});
|
||||
|
||||
it("never carries a candidate's contact, minimum, or state in the parsed body", () => {
|
||||
const parsed = schema.parse({
|
||||
...draft,
|
||||
candidate_email: "candidate@example.com",
|
||||
salary_minimum: 230000,
|
||||
state: "accepted",
|
||||
salary_fit: "within_range",
|
||||
terms: { ...terms, salary: { ...salary, candidate_minimum: 230000 } },
|
||||
});
|
||||
|
||||
// Generated Zod strips unknown keys; the server rejects them with 400.
|
||||
expect(parsed).not.toHaveProperty("candidate_email");
|
||||
expect(parsed).not.toHaveProperty("salary_minimum");
|
||||
expect(parsed).not.toHaveProperty("state");
|
||||
expect(parsed).not.toHaveProperty("salary_fit");
|
||||
expect(parsed.terms.salary).not.toHaveProperty("candidate_minimum");
|
||||
});
|
||||
});
|
||||
|
||||
describe("generated InvitationPackageItem", () => {
|
||||
it("accepts a provided condition and an explicit not provided", () => {
|
||||
expect(InvitationPackageItem.parse({ status: "provided", description: "ДМС" })).toEqual({
|
||||
status: "provided",
|
||||
description: "ДМС",
|
||||
});
|
||||
expect(InvitationPackageItem.parse({ status: "not_provided" })).toEqual({
|
||||
status: "not_provided",
|
||||
});
|
||||
});
|
||||
|
||||
it("strips a description from not provided, which only the server rejects", () => {
|
||||
// Generated Zod is not strict: the not_provided variant matches and the
|
||||
// extra key is dropped. The server answers 400 /terms/package/<field>.
|
||||
expect(InvitationPackageItem.parse({ status: "not_provided", description: "Курсы" })).toEqual({
|
||||
status: "not_provided",
|
||||
});
|
||||
});
|
||||
|
||||
it.each([
|
||||
["a provided condition without a description", { status: "provided" }],
|
||||
["a description without a status", { description: "ДМС" }],
|
||||
["an unknown status", { status: "unknown" }],
|
||||
["a bare text", "ДМС"],
|
||||
["null", null],
|
||||
])("rejects %s", (_case, item) => {
|
||||
expect(InvitationPackageItem.safeParse(item).success).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
const acceptance = {
|
||||
expected_version: 5,
|
||||
terms_version: 3,
|
||||
consent_c4: { text_version: "c4-2026-10-01", accepted: true, fields: ["email"] },
|
||||
} as const;
|
||||
|
||||
const acceptSchemas = [
|
||||
["InvitationAcceptance", InvitationAcceptance],
|
||||
["AcceptMyInvitationBody", AcceptMyInvitationBody],
|
||||
] as const;
|
||||
|
||||
describe.each(acceptSchemas)("generated %s", (_name, schema) => {
|
||||
it("accepts the current terms version with the email address only", () => {
|
||||
expect(schema.parse(acceptance)).toEqual(acceptance);
|
||||
});
|
||||
|
||||
it.each([
|
||||
["terms_version", without(acceptance, "terms_version"), ["terms_version"]],
|
||||
["expected_version", without(acceptance, "expected_version"), ["expected_version"]],
|
||||
["consent_c4", without(acceptance, "consent_c4"), ["consent_c4"]],
|
||||
[
|
||||
"the field choice",
|
||||
{ ...acceptance, consent_c4: without(acceptance.consent_c4, "fields") },
|
||||
["consent_c4", "fields"],
|
||||
],
|
||||
] as const)("requires %s", (_case, body, path) => {
|
||||
const result = schema.safeParse(body);
|
||||
|
||||
expect(result.success).toBe(false);
|
||||
expect(result.error?.issues).toEqual([expect.objectContaining({ path })]);
|
||||
});
|
||||
|
||||
it.each([
|
||||
["an empty field choice", { fields: [] }],
|
||||
["an unknown field kind", { fields: ["passport"] }],
|
||||
["consent not given", { accepted: false }],
|
||||
])("rejects a consent with %s", (_case, change) => {
|
||||
const result = schema.safeParse({
|
||||
...acceptance,
|
||||
consent_c4: { ...acceptance.consent_c4, ...change },
|
||||
});
|
||||
|
||||
expect(result.success).toBe(false);
|
||||
});
|
||||
|
||||
it.each([0, 1.5, "3"])("rejects the terms version %s", (version) => {
|
||||
expect(schema.safeParse({ ...acceptance, terms_version: version }).success).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("generated DeclineMyInvitationBody", () => {
|
||||
it("accepts the neutral reason other without a comment", () => {
|
||||
const body = { expected_version: 4, reason: "other" };
|
||||
|
||||
expect(DeclineMyInvitationBody.parse(body)).toEqual(body);
|
||||
});
|
||||
|
||||
it.each([
|
||||
["a missing reason", { expected_version: 4 }],
|
||||
["an unknown reason", { expected_version: 4, reason: "too_old" }],
|
||||
["a blank comment", { expected_version: 4, reason: "other", comment: " " }],
|
||||
[
|
||||
"a comment over 500 characters",
|
||||
{ expected_version: 4, reason: "other", comment: "а".repeat(501) },
|
||||
],
|
||||
])("rejects %s", (_case, body) => {
|
||||
expect(DeclineMyInvitationBody.safeParse(body).success).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
const parsedTerms = InvitationTerms.parse(terms);
|
||||
|
||||
it("parses an accepted invitation of the organization without contact values", () => {
|
||||
const parsed = OrganizationInvitation.parse({
|
||||
id: "01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f",
|
||||
organization_id: "01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01",
|
||||
candidate_handle: "cand_7Qm2xVb9Lr4Kp0Zt",
|
||||
need: null,
|
||||
state: "accepted",
|
||||
expiry_reason: null,
|
||||
version: 6,
|
||||
terms_version: 3,
|
||||
terms: parsedTerms,
|
||||
response_period_days: 7,
|
||||
response_deadline_at: "2026-10-13T09:30:00Z",
|
||||
salary_raise_used: true,
|
||||
salary_fit: "within_range",
|
||||
contact_access: { status: "available", fields: ["email"] },
|
||||
created_at: "2026-10-06T09:00:00Z",
|
||||
updated_at: "2026-10-06T15:00:00Z",
|
||||
delivered_at: "2026-10-06T09:30:00Z",
|
||||
viewed_at: "2026-10-06T12:00:00Z",
|
||||
responded_at: "2026-10-06T15:00:00Z",
|
||||
});
|
||||
|
||||
expect(parsed.contact_access.fields).toEqual(["email"]);
|
||||
expect(parsed).not.toHaveProperty("email");
|
||||
expect(
|
||||
OrganizationInvitation.safeParse({ ...parsed, salary_fit: "exactly_230000" }).success,
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("parses an expired invitation of the candidate with its reason", () => {
|
||||
const parsed = CandidateInvitation.parse({
|
||||
id: "01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f",
|
||||
organization: { id: "01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01", name: "ООО Пример Платежи" },
|
||||
state: "expired",
|
||||
expiry_reason: "invitation_timeout",
|
||||
version: 3,
|
||||
terms_version: 1,
|
||||
terms: parsedTerms,
|
||||
response_deadline_at: "2026-10-13T09:30:00Z",
|
||||
delivered_at: "2026-10-06T09:30:00Z",
|
||||
viewed_at: null,
|
||||
responded_at: null,
|
||||
updated_at: "2026-10-13T09:30:00Z",
|
||||
contact_consent: null,
|
||||
decline: null,
|
||||
contact_grant: null,
|
||||
});
|
||||
|
||||
expect(parsed.expiry_reason).toBe("invitation_timeout");
|
||||
expect(CandidateInvitation.safeParse({ ...parsed, expiry_reason: "deadline" }).success).toBe(
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps contact values in a separate disclosure with null for fields not granted", () => {
|
||||
const parsed = ContactDisclosure.parse({
|
||||
invitation_id: "01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f",
|
||||
grant_id: "01928f7a-8b9c-7d0e-9f1a-2b3c4d5e6f70",
|
||||
fields: ["email"],
|
||||
granted_at: "2026-10-06T15:00:00Z",
|
||||
full_name: null,
|
||||
email: "candidate@example.com",
|
||||
phone: null,
|
||||
telegram: null,
|
||||
});
|
||||
|
||||
expect(parsed.phone).toBeNull();
|
||||
expect(ContactDisclosure.safeParse({ ...parsed, phone: "8 900 000-00-00" }).success).toBe(false);
|
||||
});
|
||||
|
||||
it("parses a grant that is active but blocked by the visibility of the profile", () => {
|
||||
const parsed = ContactGrant.parse({
|
||||
id: "01928f7a-8b9c-7d0e-9f1a-2b3c4d5e6f70",
|
||||
fields: ["email"],
|
||||
status: "active",
|
||||
readable: false,
|
||||
blocked_by: "visibility",
|
||||
terms_version: 3,
|
||||
consent_text_version: "c4-2026-10-01",
|
||||
granted_at: "2026-10-06T15:00:00Z",
|
||||
revoked_at: null,
|
||||
revocation_reason: null,
|
||||
});
|
||||
|
||||
expect(parsed.readable).toBe(false);
|
||||
expect(ContactGrant.safeParse({ ...parsed, blocked_by: "hidden_from_company" }).success).toBe(
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
type ContactOrMinimumKey =
|
||||
| "email"
|
||||
| "phone"
|
||||
| "telegram"
|
||||
| "full_name"
|
||||
| "contacts"
|
||||
| "salary_minimum"
|
||||
| "candidate_minimum"
|
||||
| "minimum"
|
||||
| "candidate_id"
|
||||
| "profile_id";
|
||||
|
||||
type ClientSetKey =
|
||||
| "state"
|
||||
| "version"
|
||||
| "terms_version"
|
||||
| "salary_fit"
|
||||
| "contact_access"
|
||||
| "contact_grant"
|
||||
| "organization_id";
|
||||
|
||||
it("exposes invitation DTOs without contacts, the hidden minimum, or a decline reason", () => {
|
||||
expectTypeOf<Extract<keyof OrganizationInvitation, ContactOrMinimumKey>>().toEqualTypeOf<never>();
|
||||
expectTypeOf<
|
||||
Extract<keyof OrganizationInvitationSummary, ContactOrMinimumKey>
|
||||
>().toEqualTypeOf<never>();
|
||||
expectTypeOf<Extract<keyof CandidateInvitation, ContactOrMinimumKey>>().toEqualTypeOf<never>();
|
||||
expectTypeOf<
|
||||
Extract<keyof CandidateInvitationSummary, ContactOrMinimumKey>
|
||||
>().toEqualTypeOf<never>();
|
||||
expectTypeOf<Extract<keyof InvitationTerms, ContactOrMinimumKey>>().toEqualTypeOf<never>();
|
||||
expectTypeOf<
|
||||
Extract<keyof InvitationTerms["salary"], ContactOrMinimumKey>
|
||||
>().toEqualTypeOf<never>();
|
||||
// The organization never reads the reason or the comment of a decline.
|
||||
expectTypeOf<
|
||||
Extract<keyof OrganizationInvitation, "decline" | "reason" | "comment">
|
||||
>().toEqualTypeOf<never>();
|
||||
// Contact values travel only in the separate disclosure.
|
||||
expectTypeOf<Extract<keyof ContactDisclosure, "email" | "phone">>().toEqualTypeOf<
|
||||
"email" | "phone"
|
||||
>();
|
||||
expectTypeOf(getOrganizationInvitation).returns.resolves.toEqualTypeOf<OrganizationInvitation>();
|
||||
expectTypeOf(getMyInvitation).returns.resolves.toEqualTypeOf<CandidateInvitation>();
|
||||
// The view is an explicit command without a body, a key, or a version.
|
||||
expectTypeOf(viewMyInvitation).parameters.toEqualTypeOf<
|
||||
[invitationId: string, options?: Parameters<typeof getMyInvitation>[1]]
|
||||
>();
|
||||
expectTypeOf(viewMyInvitation).returns.resolves.toEqualTypeOf<CandidateInvitation>();
|
||||
expectTypeOf(
|
||||
getOrganizationInvitationContacts,
|
||||
).returns.resolves.toEqualTypeOf<ContactDisclosure>();
|
||||
});
|
||||
|
||||
it("exposes request DTOs without client-set state, contacts, or a hidden C4 default", () => {
|
||||
expectTypeOf<
|
||||
Extract<keyof OrganizationInvitationCreate, ClientSetKey | ContactOrMinimumKey>
|
||||
>().toEqualTypeOf<never>();
|
||||
expectTypeOf<
|
||||
Extract<keyof OrganizationInvitationUpdate, ClientSetKey | ContactOrMinimumKey>
|
||||
>().toEqualTypeOf<never>();
|
||||
expectTypeOf<
|
||||
Extract<
|
||||
keyof InvitationAcceptance,
|
||||
Exclude<ClientSetKey, "terms_version"> | ContactOrMinimumKey
|
||||
>
|
||||
>().toEqualTypeOf<never>();
|
||||
expectTypeOf<
|
||||
Extract<keyof InvitationDeclineRequest, ClientSetKey | ContactOrMinimumKey>
|
||||
>().toEqualTypeOf<never>();
|
||||
// The acceptance names the terms version and the field choice explicitly.
|
||||
expectTypeOf<InvitationAcceptance["terms_version"]>().toEqualTypeOf<number>();
|
||||
expectTypeOf<InvitationAcceptance["consent_c4"]["fields"]>().toEqualTypeOf<
|
||||
("full_name" | "email" | "phone" | "telegram")[]
|
||||
>();
|
||||
expectTypeOf<InvitationAcceptance["consent_c4"]["accepted"]>().toEqualTypeOf<true>();
|
||||
expectTypeOf(createOrganizationInvitation)
|
||||
.parameter(1)
|
||||
.toEqualTypeOf<OrganizationInvitationCreate>();
|
||||
expectTypeOf(acceptMyInvitation).parameter(1).toEqualTypeOf<InvitationAcceptance>();
|
||||
});
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -10,9 +10,7 @@ export * from './accountScenario.zod';
|
||||
export * from './confirmEmailBody.zod';
|
||||
export * from './consentPurpose.zod';
|
||||
export * from './consentText.zod';
|
||||
export * from './consentTextVersion.zod';
|
||||
export * from './csrfToken.zod';
|
||||
export * from './emailAddress.zod';
|
||||
export * from './emailVerificationRequest.zod';
|
||||
export * from './emailVerificationResendRequest.zod';
|
||||
export * from './emailVerificationResult.zod';
|
||||
|
||||
@@ -5,12 +5,23 @@
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export * from './consentTextVersion.zod';
|
||||
export * from './currencyCode.zod';
|
||||
export * from './emailAddress.zod';
|
||||
export * from './gradeCode.zod';
|
||||
export * from './needLocationName.zod';
|
||||
export * from './needTaskText.zod';
|
||||
export * from './needVersion.zod';
|
||||
export * from './pageInfo.zod';
|
||||
export * from './problem.zod';
|
||||
export * from './problemCode.zod';
|
||||
export * from './problemFieldError.zod';
|
||||
export * from './problemFieldLocation.zod';
|
||||
export * from './rubAmount.zod';
|
||||
export * from './salaryPeriod.zod';
|
||||
export * from './salaryRange.zod';
|
||||
export * from './salaryTaxBasis.zod';
|
||||
export * from './skillName.zod';
|
||||
export * from './specializationCode.zod';
|
||||
export * from './taskLanguage.zod';
|
||||
export * from './timestamp.zod';
|
||||
@@ -20,5 +31,6 @@ export * from './candidate';
|
||||
export * from './catalog';
|
||||
export * from './health';
|
||||
export * from './identity';
|
||||
export * from './invitation';
|
||||
export * from './need';
|
||||
export * from './support';
|
||||
@@ -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 acceptMyInvitationBodyConsentC4TextVersionMax = 64;
|
||||
|
||||
|
||||
export const acceptMyInvitationBodyConsentC4TextVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const acceptMyInvitationBodyConsentC4FieldsMax = 4;
|
||||
|
||||
|
||||
export const AcceptMyInvitationBody = zod.object({
|
||||
"expected_version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.'),
|
||||
"terms_version": zod.int().min(1).describe('Version of the terms of an invitation. The terms of a version are an immutable snapshot: every committed change of the terms, in the draft or by the one raise of the upper salary bound after sending, creates the next terms version, and a change of anything else keeps it. An acceptance names the terms version it accepts, and the consent C4 and the contact grant record it.').describe('Terms version that the candidate read and accepts. A version that is not the current one answers 412 version_conflict.'),
|
||||
"consent_c4": zod.object({
|
||||
"text_version": zod.string().min(1).max(acceptMyInvitationBodyConsentC4TextVersionMax).regex(acceptMyInvitationBodyConsentC4TextVersionRegExp).describe('Identifier of the published consent text that the user saw and accepted. The server stores the acceptance with this version and the hash of its text; the client never sends or receives the hash.'),
|
||||
"accepted": zod.literal(true).describe('Explicit consent. Only true is valid.'),
|
||||
"fields": zod.array(zod.enum(['full_name', 'email', 'phone', 'telegram']).describe('Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.\n\n- full_name: the full name from the profile.\n- email: the contact email address from the profile.\n- phone: the contact phone number from the profile.\n- telegram: the Telegram username from the profile.\n\nThe value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.')).min(1).max(acceptMyInvitationBodyConsentC4FieldsMax).describe('Contact fields the organization may read after the acceptance. The grant covers exactly these fields and no other.')
|
||||
}).describe('Consent C4 given in an acceptance: the text version the candidate saw, an explicit `accepted`, and the contact fields the candidate selected. At least one field is required, so a hidden default or an empty choice never creates a grant. A text version that is not the currently published one answers 400 validation_failed with the pointer `/consent_c4/text_version`, and a field that the profile does not hold answers 400 with the pointer of that item, such as `/consent_c4/fields/1`. C4 is given only here, never at registration. The permission to pass the selected data on to the organization\'s ATS (PRD C4 and FR19) is planned as an additive optional flag that defaults to no transfer.')
|
||||
}).describe('Acceptance of the current terms with the consent C4. The client sends the `version` and the `terms_version` it read and the contact fields the candidate selected; nothing is preselected or defaulted. Unknown fields are rejected, so a request cannot carry contact values, a grant, or another consent.')
|
||||
|
||||
export type AcceptMyInvitationBody = zod.input<typeof AcceptMyInvitationBody>;
|
||||
export type AcceptMyInvitationBodyOutput = zod.output<typeof AcceptMyInvitationBody>;
|
||||
@@ -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 acceptMyInvitationHeadersIdempotencyKeyMax = 255;
|
||||
|
||||
|
||||
export const acceptMyInvitationHeadersIdempotencyKeyRegExp = new RegExp('^[A-Za-z0-9._:-]+$');
|
||||
|
||||
export const AcceptMyInvitationHeaders = zod.object({
|
||||
"Idempotency-Key": zod.string().min(1).max(acceptMyInvitationHeadersIdempotencyKeyMax).regex(acceptMyInvitationHeadersIdempotencyKeyRegExp)
|
||||
})
|
||||
|
||||
export type AcceptMyInvitationHeaders = zod.input<typeof AcceptMyInvitationHeaders>;
|
||||
export type AcceptMyInvitationHeadersOutput = zod.output<typeof AcceptMyInvitationHeaders>;
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
|
||||
|
||||
export const CancelMyInvitationBody = zod.object({
|
||||
"expected_version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.')
|
||||
}).describe('Command without parameters over the invitation version the client read: send, withdraw, or cancel. Unknown fields are rejected.')
|
||||
|
||||
export type CancelMyInvitationBody = zod.input<typeof CancelMyInvitationBody>;
|
||||
export type CancelMyInvitationBodyOutput = zod.output<typeof CancelMyInvitationBody>;
|
||||
@@ -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 cancelMyInvitationHeadersIdempotencyKeyMax = 255;
|
||||
|
||||
|
||||
export const cancelMyInvitationHeadersIdempotencyKeyRegExp = new RegExp('^[A-Za-z0-9._:-]+$');
|
||||
|
||||
export const CancelMyInvitationHeaders = zod.object({
|
||||
"Idempotency-Key": zod.string().min(1).max(cancelMyInvitationHeadersIdempotencyKeyMax).regex(cancelMyInvitationHeadersIdempotencyKeyRegExp)
|
||||
})
|
||||
|
||||
export type CancelMyInvitationHeaders = zod.input<typeof CancelMyInvitationHeaders>;
|
||||
export type CancelMyInvitationHeadersOutput = zod.output<typeof CancelMyInvitationHeaders>;
|
||||
@@ -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 CandidateHandleMax = 128;
|
||||
|
||||
|
||||
export const CandidateHandleRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
|
||||
export const CandidateHandle = zod.string().min(1).max(CandidateHandleMax).regex(CandidateHandleRegExp).describe('Opaque reference to a candidate as one organization sees it, taken from a search result card of that organization. It is not the candidate\'s account or profile identifier, it never contains an email address or a phone number, and it means nothing to another organization. The server resolves it only for the organization in the path. Clients never parse it. It is shared by the invitations of FR12 and the search results of FR11 (TASK-185), which issue it.')
|
||||
|
||||
export type CandidateHandle = zod.input<typeof CandidateHandle>;
|
||||
export type CandidateHandleOutput = zod.output<typeof CandidateHandle>;
|
||||
@@ -0,0 +1,177 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const candidateInvitationOrganizationNameMax = 200;
|
||||
|
||||
|
||||
|
||||
export const candidateInvitationTermsRoleTitleMax = 200;
|
||||
|
||||
|
||||
export const candidateInvitationTermsRoleTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateInvitationTermsTasksItemMax = 300;
|
||||
|
||||
|
||||
export const candidateInvitationTermsTasksItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateInvitationTermsTasksMax = 20;
|
||||
|
||||
export const candidateInvitationTermsTeamMax = 1000;
|
||||
|
||||
|
||||
export const candidateInvitationTermsTeamRegExp = new RegExp('\\S');
|
||||
export const candidateInvitationTermsTechStackItemMax = 100;
|
||||
|
||||
|
||||
export const candidateInvitationTermsTechStackItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateInvitationTermsTechStackMax = 30;
|
||||
|
||||
export const candidateInvitationTermsWorkFormatsMax = 3;
|
||||
|
||||
export const candidateInvitationTermsLocationOneMax = 100;
|
||||
|
||||
|
||||
export const candidateInvitationTermsLocationOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateInvitationTermsCommunicationMethodDetailsOneMax = 300;
|
||||
|
||||
|
||||
export const candidateInvitationTermsCommunicationMethodDetailsOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateInvitationTermsSalarySalaryFromMin = 1000;
|
||||
export const candidateInvitationTermsSalarySalaryFromMax = 100000000;
|
||||
export const candidateInvitationTermsSalarySalaryFromMultipleOf = 1000;
|
||||
|
||||
export const candidateInvitationTermsSalarySalaryToMin = 1000;
|
||||
export const candidateInvitationTermsSalarySalaryToMax = 100000000;
|
||||
export const candidateInvitationTermsSalarySalaryToMultipleOf = 1000;
|
||||
|
||||
export const candidateInvitationTermsPackageBonusOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const candidateInvitationTermsPackageBonusOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateInvitationTermsPackageEquipmentOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const candidateInvitationTermsPackageEquipmentOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateInvitationTermsPackageTrainingOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const candidateInvitationTermsPackageTrainingOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateInvitationTermsPackageHealthInsuranceOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const candidateInvitationTermsPackageHealthInsuranceOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateInvitationContactConsentOneTextTextVersionMax = 64;
|
||||
|
||||
|
||||
export const candidateInvitationContactConsentOneTextTextVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const candidateInvitationContactConsentOneTextTextMax = 100000;
|
||||
|
||||
export const candidateInvitationContactConsentOneAvailableFieldsMax = 4;
|
||||
|
||||
export const candidateInvitationDeclineOneCommentOneMax = 500;
|
||||
|
||||
|
||||
export const candidateInvitationDeclineOneCommentOneRegExp = new RegExp('\\S');
|
||||
export const candidateInvitationContactGrantOneFieldsMax = 4;
|
||||
|
||||
|
||||
export const candidateInvitationContactGrantOneConsentTextVersionOneMax = 64;
|
||||
|
||||
|
||||
export const candidateInvitationContactGrantOneConsentTextVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const CandidateInvitation = zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the invitation.'),
|
||||
"organization": zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the organization.'),
|
||||
"name": zod.string().min(1).max(candidateInvitationOrganizationNameMax).describe('Public name of the organization. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('Organization that sent the invitation, as the candidate sees it before deciding. The organization contract (TASK-077) adds the public card; this object only names it.'),
|
||||
"state": zod.enum(['draft', 'delivered', 'viewed', 'counter', 'accepted', 'interview_scheduled', 'interviewed', 'negotiation', 'terms_agreed', 'no_deal', 'declined', 'expired', 'withdrawn', 'cancelled_by_candidate']).describe('State of an invitation (PRD FR12). The internal sending step is never visible: a successful send already answers with `delivered`.\n\n- draft: the organization prepares the terms. The candidate does not see the invitation.\n- delivered: the invitation is in the candidate\'s inbox and the response deadline runs.\n- viewed: the candidate opened the terms; ViewMyInvitation records it. The deadline is unchanged.\n- counter: planned; the candidate sent the one counter offer. No MVP operation produces it.\n- accepted: the candidate accepted the current terms version and gave the consent C4; the contact grant exists.\n- interview_scheduled, interviewed, negotiation, terms_agreed, no_deal: planned stages after an acceptance (interview and the sealed final of FR13). No MVP operation produces them.\n- declined: terminal; the candidate declined with a structured reason. No access arises.\n- expired: terminal; a server deadline passed, see `expiry_reason`. No access arises.\n- withdrawn: terminal; the organization withdrew the invitation. A grant that already exists is not revoked by it.\n- cancelled_by_candidate: terminal; the candidate cancelled the participation. The grant of this invitation is revoked.\n\nPlanned states are listed now so that generated clients accept them when their operations arrive. Adding another value is a contract change.'),
|
||||
"expiry_reason": zod.union([zod.enum(['invitation_timeout', 'negotiation_timeout']).describe('Why an invitation expired. Set exactly when the state is `expired`, null otherwise.\n\n- invitation_timeout: the candidate did not answer by `response_deadline_at`. No grant is created.\n- negotiation_timeout: planned; the sealed final of FR13 closed without both bids. No MVP operation produces it.'),zod.null()]),
|
||||
"version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.'),
|
||||
"terms_version": zod.int().min(1).describe('Version of the terms of an invitation. The terms of a version are an immutable snapshot: every committed change of the terms, in the draft or by the one raise of the upper salary bound after sending, creates the next terms version, and a change of anything else keeps it. An acceptance names the terms version it accepts, and the consent C4 and the contact grant record it.'),
|
||||
"terms": zod.object({
|
||||
"role_title": zod.string().min(1).max(candidateInvitationTermsRoleTitleMax).regex(candidateInvitationTermsRoleTitleRegExp).describe('Name of the offered role, for example "Middle Go developer in the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"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.'),
|
||||
"offer_type": zod.enum(['full_time', 'part_time', 'contract', 'internship']).describe('Type of the offer.\n\n- full_time: employment with a full working week.\n- part_time: employment with a part-time working week.\n- contract: a fixed-term or project contract outside employment.\n- internship: an internship.\n\nAdding a value is a contract change.'),
|
||||
"tasks": zod.array(zod.string().min(1).max(candidateInvitationTermsTasksItemMax).regex(candidateInvitationTermsTasksItemRegExp).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.')).min(1).max(candidateInvitationTermsTasksMax).describe('Work tasks of the role in the order given.'),
|
||||
"team": zod.string().min(1).max(candidateInvitationTermsTeamMax).regex(candidateInvitationTermsTeamRegExp).describe('Description of the team the candidate would join, such as its size, roles, and way of working. It may contain line breaks and has at least one character that is not white space. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of employees or candidates.'),
|
||||
"tech_stack": zod.array(zod.string().min(1).max(candidateInvitationTermsTechStackItemMax).regex(candidateInvitationTermsTechStackItemRegExp).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.')).min(1).max(candidateInvitationTermsTechStackMax).describe('Technologies of the role. The server compares names without regard to letter case.'),
|
||||
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(candidateInvitationTermsWorkFormatsMax).describe('Work formats the organization offers; the candidate may choose any of them.'),
|
||||
"location": zod.union([zod.string().min(1).max(candidateInvitationTermsLocationOneMax).regex(candidateInvitationTermsLocationOneRegExp).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()]).describe('Place of work for the `office` or `hybrid` format, or null when the only format is `remote`. It is required with either of those formats.'),
|
||||
"communication_method": zod.object({
|
||||
"channel": zod.enum(['email', 'phone', 'telegram', 'video_call']).describe('Channel through which the organization will contact the candidate after an acceptance.\n\n- email: a letter to the email address the candidate disclosed.\n- phone: a call or a text to the phone number the candidate disclosed.\n- telegram: a message to the Telegram username the candidate disclosed.\n- video_call: an invitation to a video call, sent through one of the disclosed contacts.\n\nThe channel describes the organization\'s plan; the candidate decides which contacts to disclose, and the server never requires that the disclosed fields include the channel.'),
|
||||
"details": zod.union([zod.string().min(1).max(candidateInvitationTermsCommunicationMethodDetailsOneMax).regex(candidateInvitationTermsCommunicationMethodDetailsOneRegExp).describe('Short note on the communication method, for example "A 30-minute call with the team lead within three working days". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Optional short note, for example the first step or the expected time of the first contact, or null. Plain text without line breaks; it never contains a link or a contact of an employee.')
|
||||
}).describe('How the organization will contact the candidate after an acceptance. It is part of the terms, so the candidate sees it before choosing which contacts to disclose. An invitation without it cannot exist, because the terms require it.'),
|
||||
"salary": zod.object({
|
||||
"salary_from": zod.int().min(candidateInvitationTermsSalarySalaryFromMin).max(candidateInvitationTermsSalarySalaryFromMax).multipleOf(candidateInvitationTermsSalarySalaryFromMultipleOf).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(candidateInvitationTermsSalarySalaryToMin).max(candidateInvitationTermsSalarySalaryToMax).multipleOf(candidateInvitationTermsSalarySalaryToMultipleOf).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.'),
|
||||
"package": zod.object({
|
||||
"bonus": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(candidateInvitationTermsPackageBonusOneDescriptionMax).regex(candidateInvitationTermsPackageBonusOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"equipment": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(candidateInvitationTermsPackageEquipmentOneDescriptionMax).regex(candidateInvitationTermsPackageEquipmentOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"training": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(candidateInvitationTermsPackageTrainingOneDescriptionMax).regex(candidateInvitationTermsPackageTrainingOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"health_insurance": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(candidateInvitationTermsPackageHealthInsuranceOneDescriptionMax).regex(candidateInvitationTermsPackageHealthInsuranceOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.')
|
||||
}).describe('Required section of the package (PRD FR12): the bonus, the equipment, the training, and the voluntary health insurance (ДМС). Every field is required and is either provided with a description or explicitly not provided. The work format of the package is the required `work_formats` term, which has no "not provided" variant. Adding a required condition is a breaking change; an optional one is additive.')
|
||||
}).describe('Terms of an invitation: everything the candidate sees before deciding and before any contact is disclosed. The same schema is the request field of a draft and the stored snapshot of a terms version, so a response can be sent back unchanged. Every field is required; a field that may have no value says so with an explicit variant (`location` null for a remote role, a package item `not_provided`). The terms never contain data of the candidate: no contact, no salary minimum, and no indicator derived from it. The server checks the cross-field rules after the schema and answers 400 validation_failed with the pointer of the field: the salary rules of SalaryRange with `/terms/salary/salary_to`, a missing place of work for the `office` or `hybrid` format with `/terms/location`, and a repeated technology in `tech_stack` with the pointer of the later item.'),
|
||||
"response_deadline_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.'),
|
||||
"delivered_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.'),
|
||||
"viewed_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('Moment of the first view recorded by ViewMyInvitation, or null when the candidate has not opened the terms.'),
|
||||
"responded_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()]),
|
||||
"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.'),
|
||||
"contact_consent": zod.union([zod.object({
|
||||
"text": zod.object({
|
||||
"text_version": zod.string().min(1).max(candidateInvitationContactConsentOneTextTextVersionMax).regex(candidateInvitationContactConsentOneTextTextVersionRegExp).describe('Identifier of the published consent text that the user saw and accepted. The server stores the acceptance with this version and the hash of its text; the client never sends or receives the hash.'),
|
||||
"text": zod.string().min(1).max(candidateInvitationContactConsentOneTextTextMax).describe('Full consent text in plain UTF-8 with the name of the organization; paragraphs are separated by an empty line. The client shows it as text, never as HTML, next to the field choice.')
|
||||
}).describe('Currently published text of the consent C4 for this invitation. The server stores an acceptance with `text_version` and the hash of exactly this text, together with the organization, the selected fields, the invitation, and its terms version (the ledger of TASK-062).'),
|
||||
"available_fields": zod.array(zod.enum(['full_name', 'email', 'phone', 'telegram']).describe('Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.\n\n- full_name: the full name from the profile.\n- email: the contact email address from the profile.\n- phone: the contact phone number from the profile.\n- telegram: the Telegram username from the profile.\n\nThe value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.')).min(1).max(candidateInvitationContactConsentOneAvailableFieldsMax).describe('Kinds of contact that the profile holds and that an acceptance may select. A kind outside this list answers 400 in an acceptance.')
|
||||
}).describe('What the candidate can consent to in an acceptance: the consent text and the kinds of contact that the candidate\'s profile holds now. It holds kinds only, never contact values, and nothing is preselected.'),zod.null()]).describe('Text and choice of the consent C4 for an acceptance, or null when an acceptance is impossible now: the state does not allow it, the deadline has passed, or the profile holds no contact to disclose. In the last case the client tells the candidate to add a contact to the profile first, because a grant must cover at least one field.'),
|
||||
"decline": zod.union([zod.object({
|
||||
"reason": zod.enum(['salary', 'tasks', 'stack', 'work_format', 'package', 'company', 'not_looking', 'other_offer', 'other']).describe('Structured reason of a decline. Every reason is neutral and none requires a comment.\n\n- salary: the salary range does not fit.\n- tasks: the role or the tasks do not fit.\n- stack: the technologies do not fit.\n- work_format: the work format or the place of work does not fit.\n- package: the package does not fit.\n- company: the company or its domain does not fit.\n- not_looking: the candidate is not looking for a job now.\n- other_offer: the candidate accepted another offer.\n- other: another reason ("Другое"); a comment stays optional.\n\nThe organization never sees the reason of an individual decline: a reason such as `salary` would tell it that the hidden minimum is above the range. Reasons feed only the aggregates of FR12 with a minimum group size (planned). Adding a value is a contract change.'),
|
||||
"comment": zod.union([zod.string().min(1).max(candidateInvitationDeclineOneCommentOneMax).regex(candidateInvitationDeclineOneCommentOneRegExp).describe('Optional comment of the candidate on the offer. It may contain line breaks and has at least one character that is not white space. It is never shown to the organization, never published, and never written to logs or notifications; only the candidate reads it back. Plain text; clients show it as text, never as HTML.'),zod.null()]),
|
||||
"declined_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('The candidate\'s own decline, as the candidate reads it back.'),zod.null()]).describe('The candidate\'s decline, or null unless `state` is `declined`.'),
|
||||
"contact_grant": zod.union([zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the grant.'),
|
||||
"fields": zod.array(zod.enum(['full_name', 'email', 'phone', 'telegram']).describe('Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.\n\n- full_name: the full name from the profile.\n- email: the contact email address from the profile.\n- phone: the contact phone number from the profile.\n- telegram: the Telegram username from the profile.\n\nThe value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.')).min(1).max(candidateInvitationContactGrantOneFieldsMax).describe('Contact fields that the grant covers.'),
|
||||
"status": zod.enum(['active', 'revoked']).describe('State of a contact grant.\n\n- active: the grant exists. Each read by the organization still checks the consent C4, the grant, and the current visibility of the profile.\n- revoked: the grant is closed for good; the organization reads no contact through it. A later publication of the profile or a new acceptance never reopens it; only a new explicit C4 creates a new grant.'),
|
||||
"readable": zod.boolean().describe('Whether the organization can read the covered fields now: true only for an active grant whose current consent and visibility allow the read. The organization sees the same fact as `contact_access.status` `available`, without the reason.'),
|
||||
"blocked_by": zod.union([zod.enum(['visibility']).describe('Why an active grant does not allow a read now, shown only to the candidate.\n\n- visibility: the profile was not published (C2) or was hidden from the organization when the candidate accepted, and it still is. The acceptance never publishes the profile or lifts the hiding by itself (PRD FR12); the grant becomes readable once the candidate publishes the profile or unhides it for the organization.'),zod.null()]).describe('Why an active grant is not readable now, or null when it is readable or revoked; a revoked grant has `revocation_reason` instead.'),
|
||||
"terms_version": zod.int().min(1).describe('Version of the terms of an invitation. The terms of a version are an immutable snapshot: every committed change of the terms, in the draft or by the one raise of the upper salary bound after sending, creates the next terms version, and a change of anything else keeps it. An acceptance names the terms version it accepts, and the consent C4 and the contact grant record it.').describe('Terms version of the invitation that the acceptance accepted.'),
|
||||
"consent_text_version": zod.string().min(1).max(candidateInvitationContactGrantOneConsentTextVersionOneMax).regex(candidateInvitationContactGrantOneConsentTextVersionOneRegExp).describe('Identifier of the published consent text that the user saw and accepted. The server stores the acceptance with this version and the hash of its text; the client never sends or receives the hash.').describe('Version of the consent C4 text that the candidate accepted.'),
|
||||
"granted_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.'),
|
||||
"revoked_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('Moment of the revocation, or null while the grant is active.'),
|
||||
"revocation_reason": zod.union([zod.enum(['consent_revoked', 'participation_cancelled', 'visibility_closed']).describe('Why a contact grant was revoked, shown only to the candidate.\n\n- consent_revoked: the candidate revoked the consent C4 for the organization; every grant under it is closed.\n- participation_cancelled: the candidate cancelled the participation in this invitation; only the grant of this invitation is closed.\n- visibility_closed: the candidate revoked the publication C2 or hid the profile from the organization after the grant existed. A grant created while the visibility already did not allow a read stays active with `blocked_by` `visibility` instead.\n\nThe withdrawal of an invitation by the organization, a no deal, and a negotiation timeout never revoke a grant.'),zod.null()]).describe('Reason of the revocation, or null while the grant is active.')
|
||||
}).describe('Contact grant as the candidate reads it: which fields one organization may read, from which invitation and terms version, and whether it is still active. It holds kinds only, never contact values. A grant is stored apart from the invitation state, so a later change of the state does not change it unless the state is a cancellation by the candidate.'),zod.null()]).describe('Contact grant that the acceptance of this invitation created, or null when the invitation was never accepted. It stays after a revocation, with its status and reason.')
|
||||
}).describe('Invitation as the addressed candidate reads it: the organization, the current terms with their version, the state and the deadline, the text and the choice of the consent C4 while an acceptance is possible, the candidate\'s own decline, and the contact grant that the acceptance created. It has no candidate handle, no need, no salary indicator, and no contact value: the candidate\'s own contacts and salary minimum stay in the profile.')
|
||||
|
||||
export type CandidateInvitation = zod.input<typeof CandidateInvitation>;
|
||||
export type CandidateInvitationOutput = zod.output<typeof CandidateInvitation>;
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const candidateInvitationListItemsItemOrganizationNameMax = 200;
|
||||
|
||||
|
||||
|
||||
export const candidateInvitationListItemsItemRoleTitleMax = 200;
|
||||
|
||||
|
||||
export const candidateInvitationListItemsItemRoleTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateInvitationListItemsItemSalarySalaryFromMin = 1000;
|
||||
export const candidateInvitationListItemsItemSalarySalaryFromMax = 100000000;
|
||||
export const candidateInvitationListItemsItemSalarySalaryFromMultipleOf = 1000;
|
||||
|
||||
export const candidateInvitationListItemsItemSalarySalaryToMin = 1000;
|
||||
export const candidateInvitationListItemsItemSalarySalaryToMax = 100000000;
|
||||
export const candidateInvitationListItemsItemSalarySalaryToMultipleOf = 1000;
|
||||
|
||||
export const candidateInvitationListItemsItemWorkFormatsMax = 3;
|
||||
|
||||
export const candidateInvitationListItemsMax = 100;
|
||||
|
||||
export const candidateInvitationListPageNextCursorMax = 512;
|
||||
|
||||
|
||||
export const candidateInvitationListPageNextCursorRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
|
||||
export const CandidateInvitationList = zod.object({
|
||||
"items": zod.array(zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the invitation.'),
|
||||
"organization": zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the organization.'),
|
||||
"name": zod.string().min(1).max(candidateInvitationListItemsItemOrganizationNameMax).describe('Public name of the organization. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('Organization that sent the invitation, as the candidate sees it before deciding. The organization contract (TASK-077) adds the public card; this object only names it.'),
|
||||
"state": zod.enum(['draft', 'delivered', 'viewed', 'counter', 'accepted', 'interview_scheduled', 'interviewed', 'negotiation', 'terms_agreed', 'no_deal', 'declined', 'expired', 'withdrawn', 'cancelled_by_candidate']).describe('State of an invitation (PRD FR12). The internal sending step is never visible: a successful send already answers with `delivered`.\n\n- draft: the organization prepares the terms. The candidate does not see the invitation.\n- delivered: the invitation is in the candidate\'s inbox and the response deadline runs.\n- viewed: the candidate opened the terms; ViewMyInvitation records it. The deadline is unchanged.\n- counter: planned; the candidate sent the one counter offer. No MVP operation produces it.\n- accepted: the candidate accepted the current terms version and gave the consent C4; the contact grant exists.\n- interview_scheduled, interviewed, negotiation, terms_agreed, no_deal: planned stages after an acceptance (interview and the sealed final of FR13). No MVP operation produces them.\n- declined: terminal; the candidate declined with a structured reason. No access arises.\n- expired: terminal; a server deadline passed, see `expiry_reason`. No access arises.\n- withdrawn: terminal; the organization withdrew the invitation. A grant that already exists is not revoked by it.\n- cancelled_by_candidate: terminal; the candidate cancelled the participation. The grant of this invitation is revoked.\n\nPlanned states are listed now so that generated clients accept them when their operations arrive. Adding another value is a contract change.'),
|
||||
"expiry_reason": zod.union([zod.enum(['invitation_timeout', 'negotiation_timeout']).describe('Why an invitation expired. Set exactly when the state is `expired`, null otherwise.\n\n- invitation_timeout: the candidate did not answer by `response_deadline_at`. No grant is created.\n- negotiation_timeout: planned; the sealed final of FR13 closed without both bids. No MVP operation produces it.'),zod.null()]),
|
||||
"version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.'),
|
||||
"terms_version": zod.int().min(1).describe('Version of the terms of an invitation. The terms of a version are an immutable snapshot: every committed change of the terms, in the draft or by the one raise of the upper salary bound after sending, creates the next terms version, and a change of anything else keeps it. An acceptance names the terms version it accepts, and the consent C4 and the contact grant record it.'),
|
||||
"role_title": zod.string().min(1).max(candidateInvitationListItemsItemRoleTitleMax).regex(candidateInvitationListItemsItemRoleTitleRegExp).describe('Name of the offered role, for example "Middle Go developer in the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"salary": zod.object({
|
||||
"salary_from": zod.int().min(candidateInvitationListItemsItemSalarySalaryFromMin).max(candidateInvitationListItemsItemSalarySalaryFromMax).multipleOf(candidateInvitationListItemsItemSalarySalaryFromMultipleOf).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(candidateInvitationListItemsItemSalarySalaryToMin).max(candidateInvitationListItemsItemSalarySalaryToMax).multipleOf(candidateInvitationListItemsItemSalarySalaryToMultipleOf).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.'),
|
||||
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(candidateInvitationListItemsItemWorkFormatsMax),
|
||||
"response_deadline_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.'),
|
||||
"delivered_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.'),
|
||||
"viewed_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()]),
|
||||
"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('Invitation in the candidate\'s inbox: the organization, the state, the versions, the role, the salary range, and the deadline. Listing never records a view; GetMyInvitation returns the full terms, and ViewMyInvitation records the view.')).max(candidateInvitationListItemsMax).describe('Invitations of the page.'),
|
||||
"page": zod.object({
|
||||
"has_more": zod.boolean().describe('Whether another page follows this one.'),
|
||||
"next_cursor": zod.string().min(1).max(candidateInvitationListPageNextCursorMax).regex(candidateInvitationListPageNextCursorRegExp).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 candidate\'s invitations, newest first by delivery time.')
|
||||
|
||||
export type CandidateInvitationList = zod.input<typeof CandidateInvitationList>;
|
||||
export type CandidateInvitationListOutput = zod.output<typeof CandidateInvitationList>;
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const candidateInvitationSummaryOrganizationNameMax = 200;
|
||||
|
||||
|
||||
|
||||
export const candidateInvitationSummaryRoleTitleMax = 200;
|
||||
|
||||
|
||||
export const candidateInvitationSummaryRoleTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const candidateInvitationSummarySalarySalaryFromMin = 1000;
|
||||
export const candidateInvitationSummarySalarySalaryFromMax = 100000000;
|
||||
export const candidateInvitationSummarySalarySalaryFromMultipleOf = 1000;
|
||||
|
||||
export const candidateInvitationSummarySalarySalaryToMin = 1000;
|
||||
export const candidateInvitationSummarySalarySalaryToMax = 100000000;
|
||||
export const candidateInvitationSummarySalarySalaryToMultipleOf = 1000;
|
||||
|
||||
export const candidateInvitationSummaryWorkFormatsMax = 3;
|
||||
|
||||
|
||||
export const CandidateInvitationSummary = zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the invitation.'),
|
||||
"organization": zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the organization.'),
|
||||
"name": zod.string().min(1).max(candidateInvitationSummaryOrganizationNameMax).describe('Public name of the organization. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('Organization that sent the invitation, as the candidate sees it before deciding. The organization contract (TASK-077) adds the public card; this object only names it.'),
|
||||
"state": zod.enum(['draft', 'delivered', 'viewed', 'counter', 'accepted', 'interview_scheduled', 'interviewed', 'negotiation', 'terms_agreed', 'no_deal', 'declined', 'expired', 'withdrawn', 'cancelled_by_candidate']).describe('State of an invitation (PRD FR12). The internal sending step is never visible: a successful send already answers with `delivered`.\n\n- draft: the organization prepares the terms. The candidate does not see the invitation.\n- delivered: the invitation is in the candidate\'s inbox and the response deadline runs.\n- viewed: the candidate opened the terms; ViewMyInvitation records it. The deadline is unchanged.\n- counter: planned; the candidate sent the one counter offer. No MVP operation produces it.\n- accepted: the candidate accepted the current terms version and gave the consent C4; the contact grant exists.\n- interview_scheduled, interviewed, negotiation, terms_agreed, no_deal: planned stages after an acceptance (interview and the sealed final of FR13). No MVP operation produces them.\n- declined: terminal; the candidate declined with a structured reason. No access arises.\n- expired: terminal; a server deadline passed, see `expiry_reason`. No access arises.\n- withdrawn: terminal; the organization withdrew the invitation. A grant that already exists is not revoked by it.\n- cancelled_by_candidate: terminal; the candidate cancelled the participation. The grant of this invitation is revoked.\n\nPlanned states are listed now so that generated clients accept them when their operations arrive. Adding another value is a contract change.'),
|
||||
"expiry_reason": zod.union([zod.enum(['invitation_timeout', 'negotiation_timeout']).describe('Why an invitation expired. Set exactly when the state is `expired`, null otherwise.\n\n- invitation_timeout: the candidate did not answer by `response_deadline_at`. No grant is created.\n- negotiation_timeout: planned; the sealed final of FR13 closed without both bids. No MVP operation produces it.'),zod.null()]),
|
||||
"version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.'),
|
||||
"terms_version": zod.int().min(1).describe('Version of the terms of an invitation. The terms of a version are an immutable snapshot: every committed change of the terms, in the draft or by the one raise of the upper salary bound after sending, creates the next terms version, and a change of anything else keeps it. An acceptance names the terms version it accepts, and the consent C4 and the contact grant record it.'),
|
||||
"role_title": zod.string().min(1).max(candidateInvitationSummaryRoleTitleMax).regex(candidateInvitationSummaryRoleTitleRegExp).describe('Name of the offered role, for example "Middle Go developer in the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"salary": zod.object({
|
||||
"salary_from": zod.int().min(candidateInvitationSummarySalarySalaryFromMin).max(candidateInvitationSummarySalarySalaryFromMax).multipleOf(candidateInvitationSummarySalarySalaryFromMultipleOf).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(candidateInvitationSummarySalarySalaryToMin).max(candidateInvitationSummarySalarySalaryToMax).multipleOf(candidateInvitationSummarySalarySalaryToMultipleOf).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.'),
|
||||
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(candidateInvitationSummaryWorkFormatsMax),
|
||||
"response_deadline_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.'),
|
||||
"delivered_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.'),
|
||||
"viewed_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()]),
|
||||
"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('Invitation in the candidate\'s inbox: the organization, the state, the versions, the role, the salary range, and the deadline. Listing never records a view; GetMyInvitation returns the full terms, and ViewMyInvitation records the view.')
|
||||
|
||||
export type CandidateInvitationSummary = zod.input<typeof CandidateInvitationSummary>;
|
||||
export type CandidateInvitationSummaryOutput = zod.output<typeof CandidateInvitationSummary>;
|
||||
@@ -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 ContactAccessBlock = zod.enum(['visibility']).describe('Why an active grant does not allow a read now, shown only to the candidate.\n\n- visibility: the profile was not published (C2) or was hidden from the organization when the candidate accepted, and it still is. The acceptance never publishes the profile or lifts the hiding by itself (PRD FR12); the grant becomes readable once the candidate publishes the profile or unhides it for the organization.')
|
||||
|
||||
export type ContactAccessBlock = zod.input<typeof ContactAccessBlock>;
|
||||
export type ContactAccessBlockOutput = zod.output<typeof ContactAccessBlock>;
|
||||
@@ -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 contactConsentAcceptanceTextVersionMax = 64;
|
||||
|
||||
|
||||
export const contactConsentAcceptanceTextVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const contactConsentAcceptanceFieldsMax = 4;
|
||||
|
||||
|
||||
export const ContactConsentAcceptance = zod.object({
|
||||
"text_version": zod.string().min(1).max(contactConsentAcceptanceTextVersionMax).regex(contactConsentAcceptanceTextVersionRegExp).describe('Identifier of the published consent text that the user saw and accepted. The server stores the acceptance with this version and the hash of its text; the client never sends or receives the hash.'),
|
||||
"accepted": zod.literal(true).describe('Explicit consent. Only true is valid.'),
|
||||
"fields": zod.array(zod.enum(['full_name', 'email', 'phone', 'telegram']).describe('Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.\n\n- full_name: the full name from the profile.\n- email: the contact email address from the profile.\n- phone: the contact phone number from the profile.\n- telegram: the Telegram username from the profile.\n\nThe value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.')).min(1).max(contactConsentAcceptanceFieldsMax).describe('Contact fields the organization may read after the acceptance. The grant covers exactly these fields and no other.')
|
||||
}).describe('Consent C4 given in an acceptance: the text version the candidate saw, an explicit `accepted`, and the contact fields the candidate selected. At least one field is required, so a hidden default or an empty choice never creates a grant. A text version that is not the currently published one answers 400 validation_failed with the pointer `/consent_c4/text_version`, and a field that the profile does not hold answers 400 with the pointer of that item, such as `/consent_c4/fields/1`. C4 is given only here, never at registration. The permission to pass the selected data on to the organization\'s ATS (PRD C4 and FR19) is planned as an additive optional flag that defaults to no transfer.')
|
||||
|
||||
export type ContactConsentAcceptance = zod.input<typeof ContactConsentAcceptance>;
|
||||
export type ContactConsentAcceptanceOutput = zod.output<typeof ContactConsentAcceptance>;
|
||||
@@ -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 contactConsentOfferTextTextVersionMax = 64;
|
||||
|
||||
|
||||
export const contactConsentOfferTextTextVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const contactConsentOfferTextTextMax = 100000;
|
||||
|
||||
export const contactConsentOfferAvailableFieldsMax = 4;
|
||||
|
||||
|
||||
export const ContactConsentOffer = zod.object({
|
||||
"text": zod.object({
|
||||
"text_version": zod.string().min(1).max(contactConsentOfferTextTextVersionMax).regex(contactConsentOfferTextTextVersionRegExp).describe('Identifier of the published consent text that the user saw and accepted. The server stores the acceptance with this version and the hash of its text; the client never sends or receives the hash.'),
|
||||
"text": zod.string().min(1).max(contactConsentOfferTextTextMax).describe('Full consent text in plain UTF-8 with the name of the organization; paragraphs are separated by an empty line. The client shows it as text, never as HTML, next to the field choice.')
|
||||
}).describe('Currently published text of the consent C4 for this invitation. The server stores an acceptance with `text_version` and the hash of exactly this text, together with the organization, the selected fields, the invitation, and its terms version (the ledger of TASK-062).'),
|
||||
"available_fields": zod.array(zod.enum(['full_name', 'email', 'phone', 'telegram']).describe('Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.\n\n- full_name: the full name from the profile.\n- email: the contact email address from the profile.\n- phone: the contact phone number from the profile.\n- telegram: the Telegram username from the profile.\n\nThe value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.')).min(1).max(contactConsentOfferAvailableFieldsMax).describe('Kinds of contact that the profile holds and that an acceptance may select. A kind outside this list answers 400 in an acceptance.')
|
||||
}).describe('What the candidate can consent to in an acceptance: the consent text and the kinds of contact that the candidate\'s profile holds now. It holds kinds only, never contact values, and nothing is preselected.')
|
||||
|
||||
export type ContactConsentOffer = zod.input<typeof ContactConsentOffer>;
|
||||
export type ContactConsentOfferOutput = zod.output<typeof ContactConsentOffer>;
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const contactConsentTextTextVersionMax = 64;
|
||||
|
||||
|
||||
export const contactConsentTextTextVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const contactConsentTextTextMax = 100000;
|
||||
|
||||
|
||||
export const ContactConsentText = zod.object({
|
||||
"text_version": zod.string().min(1).max(contactConsentTextTextVersionMax).regex(contactConsentTextTextVersionRegExp).describe('Identifier of the published consent text that the user saw and accepted. The server stores the acceptance with this version and the hash of its text; the client never sends or receives the hash.'),
|
||||
"text": zod.string().min(1).max(contactConsentTextTextMax).describe('Full consent text in plain UTF-8 with the name of the organization; paragraphs are separated by an empty line. The client shows it as text, never as HTML, next to the field choice.')
|
||||
}).describe('Currently published text of the consent C4 for this invitation. The server stores an acceptance with `text_version` and the hash of exactly this text, together with the organization, the selected fields, the invitation, and its terms version (the ledger of TASK-062).')
|
||||
|
||||
export type ContactConsentText = zod.input<typeof ContactConsentText>;
|
||||
export type ContactConsentTextOutput = zod.output<typeof ContactConsentText>;
|
||||
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const contactDisclosureFieldsMax = 4;
|
||||
|
||||
export const contactDisclosureFullNameOneMax = 200;
|
||||
|
||||
|
||||
export const contactDisclosureFullNameOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const contactDisclosureEmailOneMin = 3;
|
||||
export const contactDisclosureEmailOneMax = 254;
|
||||
|
||||
export const contactDisclosurePhoneOneMin = 8;
|
||||
export const contactDisclosurePhoneOneMax = 16;
|
||||
|
||||
|
||||
export const contactDisclosurePhoneOneRegExp = new RegExp('^\\+[1-9][0-9]{6,14}$');
|
||||
export const contactDisclosureTelegramOneMin = 6;
|
||||
export const contactDisclosureTelegramOneMax = 33;
|
||||
|
||||
|
||||
export const contactDisclosureTelegramOneRegExp = new RegExp('^@[A-Za-z0-9_]{5,32}$');
|
||||
|
||||
export const ContactDisclosure = zod.object({
|
||||
"invitation_id": zod.uuid().describe('Invitation whose acceptance created the grant.'),
|
||||
"grant_id": zod.uuid().describe('Grant that allows the read.'),
|
||||
"fields": zod.array(zod.enum(['full_name', 'email', 'phone', 'telegram']).describe('Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.\n\n- full_name: the full name from the profile.\n- email: the contact email address from the profile.\n- phone: the contact phone number from the profile.\n- telegram: the Telegram username from the profile.\n\nThe value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.')).min(1).max(contactDisclosureFieldsMax).describe('Contact fields that the grant covers.'),
|
||||
"granted_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.'),
|
||||
"full_name": zod.union([zod.string().min(1).max(contactDisclosureFullNameOneMax).regex(contactDisclosureFullNameOneRegExp).describe('Full name as the candidate wrote it in the profile. Plain text without line breaks; clients show it as text, never as HTML.'),zod.null()]),
|
||||
"email": zod.union([zod.email().min(contactDisclosureEmailOneMin).max(contactDisclosureEmailOneMax).describe('Account email address. The server compares addresses without regard to letter case and never reveals in a response whether an address belongs to an account.'),zod.null()]),
|
||||
"phone": zod.union([zod.string().min(contactDisclosurePhoneOneMin).max(contactDisclosurePhoneOneMax).regex(contactDisclosurePhoneOneRegExp).describe('Phone number in the E.164 format, for example +70000000000.'),zod.null()]),
|
||||
"telegram": zod.union([zod.string().min(contactDisclosureTelegramOneMin).max(contactDisclosureTelegramOneMax).regex(contactDisclosureTelegramOneRegExp).describe('Telegram username with the leading @.'),zod.null()])
|
||||
}).describe('Contacts of the candidate that the organization may read through an active grant of this invitation. This is the only response that carries contact values, and it is separate from the terms and from the invitation. Each field the grant does not cover is null, and so is a covered field that the profile no longer holds. The response is never cached or stored by the server for later reads, so a revocation closes the next read at once. The value formats depend on the profile contract (FR02, TASK-066), which must store the same formats; see ContactFieldKind.')
|
||||
|
||||
export type ContactDisclosure = zod.input<typeof ContactDisclosure>;
|
||||
export type ContactDisclosureOutput = zod.output<typeof ContactDisclosure>;
|
||||
@@ -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 ContactFieldKind = zod.enum(['full_name', 'email', 'phone', 'telegram']).describe('Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.\n\n- full_name: the full name from the profile.\n- email: the contact email address from the profile.\n- phone: the contact phone number from the profile.\n- telegram: the Telegram username from the profile.\n\nThe value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.')
|
||||
|
||||
export type ContactFieldKind = zod.input<typeof ContactFieldKind>;
|
||||
export type ContactFieldKindOutput = zod.output<typeof ContactFieldKind>;
|
||||
@@ -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 ContactFullNameMax = 200;
|
||||
|
||||
|
||||
export const ContactFullNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const ContactFullName = zod.string().min(1).max(ContactFullNameMax).regex(ContactFullNameRegExp).describe('Full name as the candidate wrote it in the profile. Plain text without line breaks; clients show it as text, never as HTML.')
|
||||
|
||||
export type ContactFullName = zod.input<typeof ContactFullName>;
|
||||
export type ContactFullNameOutput = zod.output<typeof ContactFullName>;
|
||||
@@ -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 contactGrantFieldsMax = 4;
|
||||
|
||||
|
||||
export const contactGrantConsentTextVersionOneMax = 64;
|
||||
|
||||
|
||||
export const contactGrantConsentTextVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
|
||||
export const ContactGrant = zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the grant.'),
|
||||
"fields": zod.array(zod.enum(['full_name', 'email', 'phone', 'telegram']).describe('Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.\n\n- full_name: the full name from the profile.\n- email: the contact email address from the profile.\n- phone: the contact phone number from the profile.\n- telegram: the Telegram username from the profile.\n\nThe value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.')).min(1).max(contactGrantFieldsMax).describe('Contact fields that the grant covers.'),
|
||||
"status": zod.enum(['active', 'revoked']).describe('State of a contact grant.\n\n- active: the grant exists. Each read by the organization still checks the consent C4, the grant, and the current visibility of the profile.\n- revoked: the grant is closed for good; the organization reads no contact through it. A later publication of the profile or a new acceptance never reopens it; only a new explicit C4 creates a new grant.'),
|
||||
"readable": zod.boolean().describe('Whether the organization can read the covered fields now: true only for an active grant whose current consent and visibility allow the read. The organization sees the same fact as `contact_access.status` `available`, without the reason.'),
|
||||
"blocked_by": zod.union([zod.enum(['visibility']).describe('Why an active grant does not allow a read now, shown only to the candidate.\n\n- visibility: the profile was not published (C2) or was hidden from the organization when the candidate accepted, and it still is. The acceptance never publishes the profile or lifts the hiding by itself (PRD FR12); the grant becomes readable once the candidate publishes the profile or unhides it for the organization.'),zod.null()]).describe('Why an active grant is not readable now, or null when it is readable or revoked; a revoked grant has `revocation_reason` instead.'),
|
||||
"terms_version": zod.int().min(1).describe('Version of the terms of an invitation. The terms of a version are an immutable snapshot: every committed change of the terms, in the draft or by the one raise of the upper salary bound after sending, creates the next terms version, and a change of anything else keeps it. An acceptance names the terms version it accepts, and the consent C4 and the contact grant record it.').describe('Terms version of the invitation that the acceptance accepted.'),
|
||||
"consent_text_version": zod.string().min(1).max(contactGrantConsentTextVersionOneMax).regex(contactGrantConsentTextVersionOneRegExp).describe('Identifier of the published consent text that the user saw and accepted. The server stores the acceptance with this version and the hash of its text; the client never sends or receives the hash.').describe('Version of the consent C4 text that the candidate accepted.'),
|
||||
"granted_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.'),
|
||||
"revoked_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('Moment of the revocation, or null while the grant is active.'),
|
||||
"revocation_reason": zod.union([zod.enum(['consent_revoked', 'participation_cancelled', 'visibility_closed']).describe('Why a contact grant was revoked, shown only to the candidate.\n\n- consent_revoked: the candidate revoked the consent C4 for the organization; every grant under it is closed.\n- participation_cancelled: the candidate cancelled the participation in this invitation; only the grant of this invitation is closed.\n- visibility_closed: the candidate revoked the publication C2 or hid the profile from the organization after the grant existed. A grant created while the visibility already did not allow a read stays active with `blocked_by` `visibility` instead.\n\nThe withdrawal of an invitation by the organization, a no deal, and a negotiation timeout never revoke a grant.'),zod.null()]).describe('Reason of the revocation, or null while the grant is active.')
|
||||
}).describe('Contact grant as the candidate reads it: which fields one organization may read, from which invitation and terms version, and whether it is still active. It holds kinds only, never contact values. A grant is stored apart from the invitation state, so a later change of the state does not change it unless the state is a cancellation by the candidate.')
|
||||
|
||||
export type ContactGrant = zod.input<typeof ContactGrant>;
|
||||
export type ContactGrantOutput = zod.output<typeof ContactGrant>;
|
||||
@@ -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 ContactGrantState = zod.enum(['active', 'revoked']).describe('State of a contact grant.\n\n- active: the grant exists. Each read by the organization still checks the consent C4, the grant, and the current visibility of the profile.\n- revoked: the grant is closed for good; the organization reads no contact through it. A later publication of the profile or a new acceptance never reopens it; only a new explicit C4 creates a new grant.')
|
||||
|
||||
export type ContactGrantState = zod.input<typeof ContactGrantState>;
|
||||
export type ContactGrantStateOutput = zod.output<typeof ContactGrantState>;
|
||||
@@ -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 ContactPhoneNumberMin = 8;
|
||||
export const ContactPhoneNumberMax = 16;
|
||||
|
||||
|
||||
export const ContactPhoneNumberRegExp = new RegExp('^\\+[1-9][0-9]{6,14}$');
|
||||
|
||||
export const ContactPhoneNumber = zod.string().min(ContactPhoneNumberMin).max(ContactPhoneNumberMax).regex(ContactPhoneNumberRegExp).describe('Phone number in the E.164 format, for example +70000000000.')
|
||||
|
||||
export type ContactPhoneNumber = zod.input<typeof ContactPhoneNumber>;
|
||||
export type ContactPhoneNumberOutput = zod.output<typeof ContactPhoneNumber>;
|
||||
@@ -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 ContactRevocationReason = zod.enum(['consent_revoked', 'participation_cancelled', 'visibility_closed']).describe('Why a contact grant was revoked, shown only to the candidate.\n\n- consent_revoked: the candidate revoked the consent C4 for the organization; every grant under it is closed.\n- participation_cancelled: the candidate cancelled the participation in this invitation; only the grant of this invitation is closed.\n- visibility_closed: the candidate revoked the publication C2 or hid the profile from the organization after the grant existed. A grant created while the visibility already did not allow a read stays active with `blocked_by` `visibility` instead.\n\nThe withdrawal of an invitation by the organization, a no deal, and a negotiation timeout never revoke a grant.')
|
||||
|
||||
export type ContactRevocationReason = zod.input<typeof ContactRevocationReason>;
|
||||
export type ContactRevocationReasonOutput = zod.output<typeof ContactRevocationReason>;
|
||||
@@ -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 ContactTelegramUsernameMin = 6;
|
||||
export const ContactTelegramUsernameMax = 33;
|
||||
|
||||
|
||||
export const ContactTelegramUsernameRegExp = new RegExp('^@[A-Za-z0-9_]{5,32}$');
|
||||
|
||||
export const ContactTelegramUsername = zod.string().min(ContactTelegramUsernameMin).max(ContactTelegramUsernameMax).regex(ContactTelegramUsernameRegExp).describe('Telegram username with the leading @.')
|
||||
|
||||
export type ContactTelegramUsername = zod.input<typeof ContactTelegramUsername>;
|
||||
export type ContactTelegramUsernameOutput = zod.output<typeof ContactTelegramUsername>;
|
||||
@@ -0,0 +1,127 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const createOrganizationInvitationBodyCandidateHandleMax = 128;
|
||||
|
||||
|
||||
export const createOrganizationInvitationBodyCandidateHandleRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
|
||||
export const createOrganizationInvitationBodyTermsRoleTitleMax = 200;
|
||||
|
||||
|
||||
export const createOrganizationInvitationBodyTermsRoleTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const createOrganizationInvitationBodyTermsTasksItemMax = 300;
|
||||
|
||||
|
||||
export const createOrganizationInvitationBodyTermsTasksItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const createOrganizationInvitationBodyTermsTasksMax = 20;
|
||||
|
||||
export const createOrganizationInvitationBodyTermsTeamMax = 1000;
|
||||
|
||||
|
||||
export const createOrganizationInvitationBodyTermsTeamRegExp = new RegExp('\\S');
|
||||
export const createOrganizationInvitationBodyTermsTechStackItemMax = 100;
|
||||
|
||||
|
||||
export const createOrganizationInvitationBodyTermsTechStackItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const createOrganizationInvitationBodyTermsTechStackMax = 30;
|
||||
|
||||
export const createOrganizationInvitationBodyTermsWorkFormatsMax = 3;
|
||||
|
||||
export const createOrganizationInvitationBodyTermsLocationOneMax = 100;
|
||||
|
||||
|
||||
export const createOrganizationInvitationBodyTermsLocationOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const createOrganizationInvitationBodyTermsCommunicationMethodDetailsOneMax = 300;
|
||||
|
||||
|
||||
export const createOrganizationInvitationBodyTermsCommunicationMethodDetailsOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const createOrganizationInvitationBodyTermsSalarySalaryFromMin = 1000;
|
||||
export const createOrganizationInvitationBodyTermsSalarySalaryFromMax = 100000000;
|
||||
export const createOrganizationInvitationBodyTermsSalarySalaryFromMultipleOf = 1000;
|
||||
|
||||
export const createOrganizationInvitationBodyTermsSalarySalaryToMin = 1000;
|
||||
export const createOrganizationInvitationBodyTermsSalarySalaryToMax = 100000000;
|
||||
export const createOrganizationInvitationBodyTermsSalarySalaryToMultipleOf = 1000;
|
||||
|
||||
export const createOrganizationInvitationBodyTermsPackageBonusOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const createOrganizationInvitationBodyTermsPackageBonusOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const createOrganizationInvitationBodyTermsPackageEquipmentOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const createOrganizationInvitationBodyTermsPackageEquipmentOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const createOrganizationInvitationBodyTermsPackageTrainingOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const createOrganizationInvitationBodyTermsPackageTrainingOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const createOrganizationInvitationBodyTermsPackageHealthInsuranceOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const createOrganizationInvitationBodyTermsPackageHealthInsuranceOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const CreateOrganizationInvitationBody = zod.object({
|
||||
"candidate_handle": zod.string().min(1).max(createOrganizationInvitationBodyCandidateHandleMax).regex(createOrganizationInvitationBodyCandidateHandleRegExp).describe('Opaque reference to a candidate as one organization sees it, taken from a search result card of that organization. It is not the candidate\'s account or profile identifier, it never contains an email address or a phone number, and it means nothing to another organization. The server resolves it only for the organization in the path. Clients never parse it. It is shared by the invitations of FR12 and the search results of FR11 (TASK-185), which issue it.'),
|
||||
"need": zod.union([zod.object({
|
||||
"need_id": zod.uuid().describe('Identifier of a need of the organization in the path.'),
|
||||
"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('`requirements_version` of the need that the invitation refers to; it must be a version that the need has had.')
|
||||
}).describe('Need of the same organization that the invitation was built from, with the requirements version used. A direct invitation has no need. The link is informational: the invitation keeps its own terms, which may differ from the need, and a later change of the need never changes them.'),zod.null()]).exactOptional().describe('Need of the organization the invitation is built from, or null or absent for a direct invitation.'),
|
||||
"response_period_days": zod.union([zod.literal(3),zod.literal(7),zod.literal(14)]).describe('Days the candidate has to answer, chosen by the organization in the draft from the product policy: 3, 7, or 14. The deadline starts at the first delivery and is never reset by an email, a view, or a counter offer.').exactOptional().describe('Days to answer; absent means 7, the default of the product policy.'),
|
||||
"terms": zod.object({
|
||||
"role_title": zod.string().min(1).max(createOrganizationInvitationBodyTermsRoleTitleMax).regex(createOrganizationInvitationBodyTermsRoleTitleRegExp).describe('Name of the offered role, for example "Middle Go developer in the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"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.'),
|
||||
"offer_type": zod.enum(['full_time', 'part_time', 'contract', 'internship']).describe('Type of the offer.\n\n- full_time: employment with a full working week.\n- part_time: employment with a part-time working week.\n- contract: a fixed-term or project contract outside employment.\n- internship: an internship.\n\nAdding a value is a contract change.'),
|
||||
"tasks": zod.array(zod.string().min(1).max(createOrganizationInvitationBodyTermsTasksItemMax).regex(createOrganizationInvitationBodyTermsTasksItemRegExp).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.')).min(1).max(createOrganizationInvitationBodyTermsTasksMax).describe('Work tasks of the role in the order given.'),
|
||||
"team": zod.string().min(1).max(createOrganizationInvitationBodyTermsTeamMax).regex(createOrganizationInvitationBodyTermsTeamRegExp).describe('Description of the team the candidate would join, such as its size, roles, and way of working. It may contain line breaks and has at least one character that is not white space. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of employees or candidates.'),
|
||||
"tech_stack": zod.array(zod.string().min(1).max(createOrganizationInvitationBodyTermsTechStackItemMax).regex(createOrganizationInvitationBodyTermsTechStackItemRegExp).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.')).min(1).max(createOrganizationInvitationBodyTermsTechStackMax).describe('Technologies of the role. The server compares names without regard to letter case.'),
|
||||
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(createOrganizationInvitationBodyTermsWorkFormatsMax).describe('Work formats the organization offers; the candidate may choose any of them.'),
|
||||
"location": zod.union([zod.string().min(1).max(createOrganizationInvitationBodyTermsLocationOneMax).regex(createOrganizationInvitationBodyTermsLocationOneRegExp).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()]).describe('Place of work for the `office` or `hybrid` format, or null when the only format is `remote`. It is required with either of those formats.'),
|
||||
"communication_method": zod.object({
|
||||
"channel": zod.enum(['email', 'phone', 'telegram', 'video_call']).describe('Channel through which the organization will contact the candidate after an acceptance.\n\n- email: a letter to the email address the candidate disclosed.\n- phone: a call or a text to the phone number the candidate disclosed.\n- telegram: a message to the Telegram username the candidate disclosed.\n- video_call: an invitation to a video call, sent through one of the disclosed contacts.\n\nThe channel describes the organization\'s plan; the candidate decides which contacts to disclose, and the server never requires that the disclosed fields include the channel.'),
|
||||
"details": zod.union([zod.string().min(1).max(createOrganizationInvitationBodyTermsCommunicationMethodDetailsOneMax).regex(createOrganizationInvitationBodyTermsCommunicationMethodDetailsOneRegExp).describe('Short note on the communication method, for example "A 30-minute call with the team lead within three working days". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Optional short note, for example the first step or the expected time of the first contact, or null. Plain text without line breaks; it never contains a link or a contact of an employee.')
|
||||
}).describe('How the organization will contact the candidate after an acceptance. It is part of the terms, so the candidate sees it before choosing which contacts to disclose. An invitation without it cannot exist, because the terms require it.'),
|
||||
"salary": zod.object({
|
||||
"salary_from": zod.int().min(createOrganizationInvitationBodyTermsSalarySalaryFromMin).max(createOrganizationInvitationBodyTermsSalarySalaryFromMax).multipleOf(createOrganizationInvitationBodyTermsSalarySalaryFromMultipleOf).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(createOrganizationInvitationBodyTermsSalarySalaryToMin).max(createOrganizationInvitationBodyTermsSalarySalaryToMax).multipleOf(createOrganizationInvitationBodyTermsSalarySalaryToMultipleOf).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.'),
|
||||
"package": zod.object({
|
||||
"bonus": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(createOrganizationInvitationBodyTermsPackageBonusOneDescriptionMax).regex(createOrganizationInvitationBodyTermsPackageBonusOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"equipment": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(createOrganizationInvitationBodyTermsPackageEquipmentOneDescriptionMax).regex(createOrganizationInvitationBodyTermsPackageEquipmentOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"training": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(createOrganizationInvitationBodyTermsPackageTrainingOneDescriptionMax).regex(createOrganizationInvitationBodyTermsPackageTrainingOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"health_insurance": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(createOrganizationInvitationBodyTermsPackageHealthInsuranceOneDescriptionMax).regex(createOrganizationInvitationBodyTermsPackageHealthInsuranceOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.')
|
||||
}).describe('Required section of the package (PRD FR12): the bonus, the equipment, the training, and the voluntary health insurance (ДМС). Every field is required and is either provided with a description or explicitly not provided. The work format of the package is the required `work_formats` term, which has no "not provided" variant. Adding a required condition is a breaking change; an optional one is additive.')
|
||||
}).describe('Terms of an invitation: everything the candidate sees before deciding and before any contact is disclosed. The same schema is the request field of a draft and the stored snapshot of a terms version, so a response can be sent back unchanged. Every field is required; a field that may have no value says so with an explicit variant (`location` null for a remote role, a package item `not_provided`). The terms never contain data of the candidate: no contact, no salary minimum, and no indicator derived from it. The server checks the cross-field rules after the schema and answers 400 validation_failed with the pointer of the field: the salary rules of SalaryRange with `/terms/salary/salary_to`, a missing place of work for the `office` or `hybrid` format with `/terms/location`, and a repeated technology in `tech_stack` with the pointer of the later item.')
|
||||
}).describe('New draft for one candidate. The candidate is named only by the handle from a search result of this organization, never by an email address, a phone number, or an account identifier. The terms are complete from the start, so a draft without the tax basis or the communication method cannot exist. Unknown fields are rejected, so a request cannot set the state, a version, a deadline, the salary indicator, contact access, or a candidate\'s minimum or contact.')
|
||||
|
||||
export type CreateOrganizationInvitationBody = zod.input<typeof CreateOrganizationInvitationBody>;
|
||||
export type CreateOrganizationInvitationBodyOutput = zod.output<typeof CreateOrganizationInvitationBody>;
|
||||
@@ -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 createOrganizationInvitationHeadersIdempotencyKeyMax = 255;
|
||||
|
||||
|
||||
export const createOrganizationInvitationHeadersIdempotencyKeyRegExp = new RegExp('^[A-Za-z0-9._:-]+$');
|
||||
|
||||
export const CreateOrganizationInvitationHeaders = zod.object({
|
||||
"Idempotency-Key": zod.string().min(1).max(createOrganizationInvitationHeadersIdempotencyKeyMax).regex(createOrganizationInvitationHeadersIdempotencyKeyRegExp)
|
||||
})
|
||||
|
||||
export type CreateOrganizationInvitationHeaders = zod.input<typeof CreateOrganizationInvitationHeaders>;
|
||||
export type CreateOrganizationInvitationHeadersOutput = zod.output<typeof CreateOrganizationInvitationHeaders>;
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
|
||||
export const declineMyInvitationBodyCommentOneMax = 500;
|
||||
|
||||
|
||||
export const declineMyInvitationBodyCommentOneRegExp = new RegExp('\\S');
|
||||
|
||||
export const DeclineMyInvitationBody = zod.object({
|
||||
"expected_version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.'),
|
||||
"reason": zod.enum(['salary', 'tasks', 'stack', 'work_format', 'package', 'company', 'not_looking', 'other_offer', 'other']).describe('Structured reason of a decline. Every reason is neutral and none requires a comment.\n\n- salary: the salary range does not fit.\n- tasks: the role or the tasks do not fit.\n- stack: the technologies do not fit.\n- work_format: the work format or the place of work does not fit.\n- package: the package does not fit.\n- company: the company or its domain does not fit.\n- not_looking: the candidate is not looking for a job now.\n- other_offer: the candidate accepted another offer.\n- other: another reason ("Другое"); a comment stays optional.\n\nThe organization never sees the reason of an individual decline: a reason such as `salary` would tell it that the hidden minimum is above the range. Reasons feed only the aggregates of FR12 with a minimum group size (planned). Adding a value is a contract change.'),
|
||||
"comment": zod.union([zod.string().min(1).max(declineMyInvitationBodyCommentOneMax).regex(declineMyInvitationBodyCommentOneRegExp).describe('Optional comment of the candidate on the offer. It may contain line breaks and has at least one character that is not white space. It is never shown to the organization, never published, and never written to logs or notifications; only the candidate reads it back. Plain text; clients show it as text, never as HTML.'),zod.null()]).exactOptional().describe('Optional comment for any reason, including `other`; absent or null means none.')
|
||||
}).describe('Structured decline: a reason and an optional comment. Unknown fields are rejected.')
|
||||
|
||||
export type DeclineMyInvitationBody = zod.input<typeof DeclineMyInvitationBody>;
|
||||
export type DeclineMyInvitationBodyOutput = zod.output<typeof DeclineMyInvitationBody>;
|
||||
@@ -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 declineMyInvitationHeadersIdempotencyKeyMax = 255;
|
||||
|
||||
|
||||
export const declineMyInvitationHeadersIdempotencyKeyRegExp = new RegExp('^[A-Za-z0-9._:-]+$');
|
||||
|
||||
export const DeclineMyInvitationHeaders = zod.object({
|
||||
"Idempotency-Key": zod.string().min(1).max(declineMyInvitationHeadersIdempotencyKeyMax).regex(declineMyInvitationHeadersIdempotencyKeyRegExp)
|
||||
})
|
||||
|
||||
export type DeclineMyInvitationHeaders = zod.input<typeof DeclineMyInvitationHeaders>;
|
||||
export type DeclineMyInvitationHeadersOutput = zod.output<typeof DeclineMyInvitationHeaders>;
|
||||
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export * from './acceptMyInvitationBody.zod';
|
||||
export * from './acceptMyInvitationHeaders.zod';
|
||||
export * from './cancelMyInvitationBody.zod';
|
||||
export * from './cancelMyInvitationHeaders.zod';
|
||||
export * from './candidateHandle.zod';
|
||||
export * from './candidateInvitation.zod';
|
||||
export * from './candidateInvitationList.zod';
|
||||
export * from './candidateInvitationSummary.zod';
|
||||
export * from './contactAccessBlock.zod';
|
||||
export * from './contactConsentAcceptance.zod';
|
||||
export * from './contactConsentOffer.zod';
|
||||
export * from './contactConsentText.zod';
|
||||
export * from './contactDisclosure.zod';
|
||||
export * from './contactFieldKind.zod';
|
||||
export * from './contactFullName.zod';
|
||||
export * from './contactGrant.zod';
|
||||
export * from './contactGrantState.zod';
|
||||
export * from './contactPhoneNumber.zod';
|
||||
export * from './contactRevocationReason.zod';
|
||||
export * from './contactTelegramUsername.zod';
|
||||
export * from './createOrganizationInvitationBody.zod';
|
||||
export * from './createOrganizationInvitationHeaders.zod';
|
||||
export * from './declineMyInvitationBody.zod';
|
||||
export * from './declineMyInvitationHeaders.zod';
|
||||
export * from './invitationAcceptance.zod';
|
||||
export * from './invitationCommand.zod';
|
||||
export * from './invitationCommunicationChannel.zod';
|
||||
export * from './invitationCommunicationMethod.zod';
|
||||
export * from './invitationCommunicationNote.zod';
|
||||
export * from './invitationContactAccess.zod';
|
||||
export * from './invitationContactAccessState.zod';
|
||||
export * from './invitationDeclineComment.zod';
|
||||
export * from './invitationDeclineReason.zod';
|
||||
export * from './invitationDeclineRecord.zod';
|
||||
export * from './invitationDeclineRequest.zod';
|
||||
export * from './invitationExpiryReason.zod';
|
||||
export * from './invitationNeedReference.zod';
|
||||
export * from './invitationOfferType.zod';
|
||||
export * from './invitationOrganization.zod';
|
||||
export * from './invitationPackage.zod';
|
||||
export * from './invitationPackageItem.zod';
|
||||
export * from './invitationPackageItemNotProvided.zod';
|
||||
export * from './invitationPackageItemProvided.zod';
|
||||
export * from './invitationPackageItemText.zod';
|
||||
export * from './invitationResponsePeriod.zod';
|
||||
export * from './invitationRoleTitle.zod';
|
||||
export * from './invitationSalaryFit.zod';
|
||||
export * from './invitationSalaryRaise.zod';
|
||||
export * from './invitationState.zod';
|
||||
export * from './invitationTeamDescription.zod';
|
||||
export * from './invitationTerms.zod';
|
||||
export * from './invitationTermsVersion.zod';
|
||||
export * from './invitationVersion.zod';
|
||||
export * from './listMyInvitationsParams.zod';
|
||||
export * from './listOrganizationInvitationsParams.zod';
|
||||
export * from './organizationInvitation.zod';
|
||||
export * from './organizationInvitationCreate.zod';
|
||||
export * from './organizationInvitationList.zod';
|
||||
export * from './organizationInvitationSummary.zod';
|
||||
export * from './organizationInvitationUpdate.zod';
|
||||
export * from './raiseOrganizationInvitationSalaryBody.zod';
|
||||
export * from './raiseOrganizationInvitationSalaryHeaders.zod';
|
||||
export * from './sendOrganizationInvitationBody.zod';
|
||||
export * from './sendOrganizationInvitationHeaders.zod';
|
||||
export * from './updateOrganizationInvitationBody.zod';
|
||||
export * from './withdrawOrganizationInvitationBody.zod';
|
||||
export * from './withdrawOrganizationInvitationHeaders.zod';
|
||||
@@ -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 invitationAcceptanceConsentC4TextVersionMax = 64;
|
||||
|
||||
|
||||
export const invitationAcceptanceConsentC4TextVersionRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
||||
export const invitationAcceptanceConsentC4FieldsMax = 4;
|
||||
|
||||
|
||||
export const InvitationAcceptance = zod.object({
|
||||
"expected_version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.'),
|
||||
"terms_version": zod.int().min(1).describe('Version of the terms of an invitation. The terms of a version are an immutable snapshot: every committed change of the terms, in the draft or by the one raise of the upper salary bound after sending, creates the next terms version, and a change of anything else keeps it. An acceptance names the terms version it accepts, and the consent C4 and the contact grant record it.').describe('Terms version that the candidate read and accepts. A version that is not the current one answers 412 version_conflict.'),
|
||||
"consent_c4": zod.object({
|
||||
"text_version": zod.string().min(1).max(invitationAcceptanceConsentC4TextVersionMax).regex(invitationAcceptanceConsentC4TextVersionRegExp).describe('Identifier of the published consent text that the user saw and accepted. The server stores the acceptance with this version and the hash of its text; the client never sends or receives the hash.'),
|
||||
"accepted": zod.literal(true).describe('Explicit consent. Only true is valid.'),
|
||||
"fields": zod.array(zod.enum(['full_name', 'email', 'phone', 'telegram']).describe('Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.\n\n- full_name: the full name from the profile.\n- email: the contact email address from the profile.\n- phone: the contact phone number from the profile.\n- telegram: the Telegram username from the profile.\n\nThe value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.')).min(1).max(invitationAcceptanceConsentC4FieldsMax).describe('Contact fields the organization may read after the acceptance. The grant covers exactly these fields and no other.')
|
||||
}).describe('Consent C4 given in an acceptance: the text version the candidate saw, an explicit `accepted`, and the contact fields the candidate selected. At least one field is required, so a hidden default or an empty choice never creates a grant. A text version that is not the currently published one answers 400 validation_failed with the pointer `/consent_c4/text_version`, and a field that the profile does not hold answers 400 with the pointer of that item, such as `/consent_c4/fields/1`. C4 is given only here, never at registration. The permission to pass the selected data on to the organization\'s ATS (PRD C4 and FR19) is planned as an additive optional flag that defaults to no transfer.')
|
||||
}).describe('Acceptance of the current terms with the consent C4. The client sends the `version` and the `terms_version` it read and the contact fields the candidate selected; nothing is preselected or defaulted. Unknown fields are rejected, so a request cannot carry contact values, a grant, or another consent.')
|
||||
|
||||
export type InvitationAcceptance = zod.input<typeof InvitationAcceptance>;
|
||||
export type InvitationAcceptanceOutput = zod.output<typeof InvitationAcceptance>;
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
|
||||
|
||||
export const InvitationCommand = zod.object({
|
||||
"expected_version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.')
|
||||
}).describe('Command without parameters over the invitation version the client read: send, withdraw, or cancel. Unknown fields are rejected.')
|
||||
|
||||
export type InvitationCommand = zod.input<typeof InvitationCommand>;
|
||||
export type InvitationCommandOutput = zod.output<typeof InvitationCommand>;
|
||||
@@ -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 InvitationCommunicationChannel = zod.enum(['email', 'phone', 'telegram', 'video_call']).describe('Channel through which the organization will contact the candidate after an acceptance.\n\n- email: a letter to the email address the candidate disclosed.\n- phone: a call or a text to the phone number the candidate disclosed.\n- telegram: a message to the Telegram username the candidate disclosed.\n- video_call: an invitation to a video call, sent through one of the disclosed contacts.\n\nThe channel describes the organization\'s plan; the candidate decides which contacts to disclose, and the server never requires that the disclosed fields include the channel.')
|
||||
|
||||
export type InvitationCommunicationChannel = zod.input<typeof InvitationCommunicationChannel>;
|
||||
export type InvitationCommunicationChannelOutput = zod.output<typeof InvitationCommunicationChannel>;
|
||||
@@ -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 invitationCommunicationMethodDetailsOneMax = 300;
|
||||
|
||||
|
||||
export const invitationCommunicationMethodDetailsOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const InvitationCommunicationMethod = zod.object({
|
||||
"channel": zod.enum(['email', 'phone', 'telegram', 'video_call']).describe('Channel through which the organization will contact the candidate after an acceptance.\n\n- email: a letter to the email address the candidate disclosed.\n- phone: a call or a text to the phone number the candidate disclosed.\n- telegram: a message to the Telegram username the candidate disclosed.\n- video_call: an invitation to a video call, sent through one of the disclosed contacts.\n\nThe channel describes the organization\'s plan; the candidate decides which contacts to disclose, and the server never requires that the disclosed fields include the channel.'),
|
||||
"details": zod.union([zod.string().min(1).max(invitationCommunicationMethodDetailsOneMax).regex(invitationCommunicationMethodDetailsOneRegExp).describe('Short note on the communication method, for example "A 30-minute call with the team lead within three working days". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Optional short note, for example the first step or the expected time of the first contact, or null. Plain text without line breaks; it never contains a link or a contact of an employee.')
|
||||
}).describe('How the organization will contact the candidate after an acceptance. It is part of the terms, so the candidate sees it before choosing which contacts to disclose. An invitation without it cannot exist, because the terms require it.')
|
||||
|
||||
export type InvitationCommunicationMethod = zod.input<typeof InvitationCommunicationMethod>;
|
||||
export type InvitationCommunicationMethodOutput = zod.output<typeof InvitationCommunicationMethod>;
|
||||
@@ -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 InvitationCommunicationNoteMax = 300;
|
||||
|
||||
|
||||
export const InvitationCommunicationNoteRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const InvitationCommunicationNote = zod.string().min(1).max(InvitationCommunicationNoteMax).regex(InvitationCommunicationNoteRegExp).describe('Short note on the communication method, for example "A 30-minute call with the team lead within three working days". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
|
||||
export type InvitationCommunicationNote = zod.input<typeof InvitationCommunicationNote>;
|
||||
export type InvitationCommunicationNoteOutput = zod.output<typeof InvitationCommunicationNote>;
|
||||
@@ -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 invitationContactAccessFieldsMax = 4;
|
||||
|
||||
|
||||
export const InvitationContactAccess = zod.object({
|
||||
"status": zod.enum(['not_granted', 'available', 'closed']).describe('Whether the organization may read the candidate\'s contacts through GetOrganizationInvitationContacts now.\n\n- not_granted: the candidate has not accepted this invitation, so no grant exists.\n- available: a grant from this invitation is active and the current consent and visibility allow the read.\n- closed: a grant from this invitation exists but does not allow the read now: it was revoked (the candidate revoked C4, cancelled the participation, or revoked the publication C2 or hid the profile after the acceptance), or it was created while the visibility already did not allow the read. The organization is not told which. A revoked grant never becomes `available` again; a grant blocked from the start becomes `available` once the candidate\'s visibility allows the read, which only follows the candidate\'s own choice to publish the profile or unhide it for the organization. Since every visibility change after a grant exists revokes the grant, a later toggle is never visible to the organization.'),
|
||||
"fields": zod.array(zod.enum(['full_name', 'email', 'phone', 'telegram']).describe('Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.\n\n- full_name: the full name from the profile.\n- email: the contact email address from the profile.\n- phone: the contact phone number from the profile.\n- telegram: the Telegram username from the profile.\n\nThe value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.')).max(invitationContactAccessFieldsMax).describe('Kinds of contact that the read returns while `status` is `available`; empty otherwise.')
|
||||
}).describe('Contact access of the organization through this invitation, without any contact value. The values come only from GetOrganizationInvitationContacts.')
|
||||
|
||||
export type InvitationContactAccess = zod.input<typeof InvitationContactAccess>;
|
||||
export type InvitationContactAccessOutput = zod.output<typeof InvitationContactAccess>;
|
||||
@@ -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 InvitationContactAccessState = zod.enum(['not_granted', 'available', 'closed']).describe('Whether the organization may read the candidate\'s contacts through GetOrganizationInvitationContacts now.\n\n- not_granted: the candidate has not accepted this invitation, so no grant exists.\n- available: a grant from this invitation is active and the current consent and visibility allow the read.\n- closed: a grant from this invitation exists but does not allow the read now: it was revoked (the candidate revoked C4, cancelled the participation, or revoked the publication C2 or hid the profile after the acceptance), or it was created while the visibility already did not allow the read. The organization is not told which. A revoked grant never becomes `available` again; a grant blocked from the start becomes `available` once the candidate\'s visibility allows the read, which only follows the candidate\'s own choice to publish the profile or unhide it for the organization. Since every visibility change after a grant exists revokes the grant, a later toggle is never visible to the organization.')
|
||||
|
||||
export type InvitationContactAccessState = zod.input<typeof InvitationContactAccessState>;
|
||||
export type InvitationContactAccessStateOutput = zod.output<typeof InvitationContactAccessState>;
|
||||
@@ -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 InvitationDeclineCommentMax = 500;
|
||||
|
||||
|
||||
export const InvitationDeclineCommentRegExp = new RegExp('\\S');
|
||||
|
||||
export const InvitationDeclineComment = zod.string().min(1).max(InvitationDeclineCommentMax).regex(InvitationDeclineCommentRegExp).describe('Optional comment of the candidate on the offer. It may contain line breaks and has at least one character that is not white space. It is never shown to the organization, never published, and never written to logs or notifications; only the candidate reads it back. Plain text; clients show it as text, never as HTML.')
|
||||
|
||||
export type InvitationDeclineComment = zod.input<typeof InvitationDeclineComment>;
|
||||
export type InvitationDeclineCommentOutput = zod.output<typeof InvitationDeclineComment>;
|
||||
@@ -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 InvitationDeclineReason = zod.enum(['salary', 'tasks', 'stack', 'work_format', 'package', 'company', 'not_looking', 'other_offer', 'other']).describe('Structured reason of a decline. Every reason is neutral and none requires a comment.\n\n- salary: the salary range does not fit.\n- tasks: the role or the tasks do not fit.\n- stack: the technologies do not fit.\n- work_format: the work format or the place of work does not fit.\n- package: the package does not fit.\n- company: the company or its domain does not fit.\n- not_looking: the candidate is not looking for a job now.\n- other_offer: the candidate accepted another offer.\n- other: another reason ("Другое"); a comment stays optional.\n\nThe organization never sees the reason of an individual decline: a reason such as `salary` would tell it that the hidden minimum is above the range. Reasons feed only the aggregates of FR12 with a minimum group size (planned). Adding a value is a contract change.')
|
||||
|
||||
export type InvitationDeclineReason = zod.input<typeof InvitationDeclineReason>;
|
||||
export type InvitationDeclineReasonOutput = zod.output<typeof InvitationDeclineReason>;
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const invitationDeclineRecordCommentOneMax = 500;
|
||||
|
||||
|
||||
export const invitationDeclineRecordCommentOneRegExp = new RegExp('\\S');
|
||||
|
||||
export const InvitationDeclineRecord = zod.object({
|
||||
"reason": zod.enum(['salary', 'tasks', 'stack', 'work_format', 'package', 'company', 'not_looking', 'other_offer', 'other']).describe('Structured reason of a decline. Every reason is neutral and none requires a comment.\n\n- salary: the salary range does not fit.\n- tasks: the role or the tasks do not fit.\n- stack: the technologies do not fit.\n- work_format: the work format or the place of work does not fit.\n- package: the package does not fit.\n- company: the company or its domain does not fit.\n- not_looking: the candidate is not looking for a job now.\n- other_offer: the candidate accepted another offer.\n- other: another reason ("Другое"); a comment stays optional.\n\nThe organization never sees the reason of an individual decline: a reason such as `salary` would tell it that the hidden minimum is above the range. Reasons feed only the aggregates of FR12 with a minimum group size (planned). Adding a value is a contract change.'),
|
||||
"comment": zod.union([zod.string().min(1).max(invitationDeclineRecordCommentOneMax).regex(invitationDeclineRecordCommentOneRegExp).describe('Optional comment of the candidate on the offer. It may contain line breaks and has at least one character that is not white space. It is never shown to the organization, never published, and never written to logs or notifications; only the candidate reads it back. Plain text; clients show it as text, never as HTML.'),zod.null()]),
|
||||
"declined_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('The candidate\'s own decline, as the candidate reads it back.')
|
||||
|
||||
export type InvitationDeclineRecord = zod.input<typeof InvitationDeclineRecord>;
|
||||
export type InvitationDeclineRecordOutput = zod.output<typeof InvitationDeclineRecord>;
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
|
||||
export const invitationDeclineRequestCommentOneMax = 500;
|
||||
|
||||
|
||||
export const invitationDeclineRequestCommentOneRegExp = new RegExp('\\S');
|
||||
|
||||
export const InvitationDeclineRequest = zod.object({
|
||||
"expected_version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.'),
|
||||
"reason": zod.enum(['salary', 'tasks', 'stack', 'work_format', 'package', 'company', 'not_looking', 'other_offer', 'other']).describe('Structured reason of a decline. Every reason is neutral and none requires a comment.\n\n- salary: the salary range does not fit.\n- tasks: the role or the tasks do not fit.\n- stack: the technologies do not fit.\n- work_format: the work format or the place of work does not fit.\n- package: the package does not fit.\n- company: the company or its domain does not fit.\n- not_looking: the candidate is not looking for a job now.\n- other_offer: the candidate accepted another offer.\n- other: another reason ("Другое"); a comment stays optional.\n\nThe organization never sees the reason of an individual decline: a reason such as `salary` would tell it that the hidden minimum is above the range. Reasons feed only the aggregates of FR12 with a minimum group size (planned). Adding a value is a contract change.'),
|
||||
"comment": zod.union([zod.string().min(1).max(invitationDeclineRequestCommentOneMax).regex(invitationDeclineRequestCommentOneRegExp).describe('Optional comment of the candidate on the offer. It may contain line breaks and has at least one character that is not white space. It is never shown to the organization, never published, and never written to logs or notifications; only the candidate reads it back. Plain text; clients show it as text, never as HTML.'),zod.null()]).exactOptional().describe('Optional comment for any reason, including `other`; absent or null means none.')
|
||||
}).describe('Structured decline: a reason and an optional comment. Unknown fields are rejected.')
|
||||
|
||||
export type InvitationDeclineRequest = zod.input<typeof InvitationDeclineRequest>;
|
||||
export type InvitationDeclineRequestOutput = zod.output<typeof InvitationDeclineRequest>;
|
||||
@@ -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 InvitationExpiryReason = zod.enum(['invitation_timeout', 'negotiation_timeout']).describe('Why an invitation expired. Set exactly when the state is `expired`, null otherwise.\n\n- invitation_timeout: the candidate did not answer by `response_deadline_at`. No grant is created.\n- negotiation_timeout: planned; the sealed final of FR13 closed without both bids. No MVP operation produces it.')
|
||||
|
||||
export type InvitationExpiryReason = zod.input<typeof InvitationExpiryReason>;
|
||||
export type InvitationExpiryReasonOutput = zod.output<typeof InvitationExpiryReason>;
|
||||
@@ -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 InvitationNeedReference = zod.object({
|
||||
"need_id": zod.uuid().describe('Identifier of a need of the organization in the path.'),
|
||||
"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('`requirements_version` of the need that the invitation refers to; it must be a version that the need has had.')
|
||||
}).describe('Need of the same organization that the invitation was built from, with the requirements version used. A direct invitation has no need. The link is informational: the invitation keeps its own terms, which may differ from the need, and a later change of the need never changes them.')
|
||||
|
||||
export type InvitationNeedReference = zod.input<typeof InvitationNeedReference>;
|
||||
export type InvitationNeedReferenceOutput = zod.output<typeof InvitationNeedReference>;
|
||||
@@ -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 InvitationOfferType = zod.enum(['full_time', 'part_time', 'contract', 'internship']).describe('Type of the offer.\n\n- full_time: employment with a full working week.\n- part_time: employment with a part-time working week.\n- contract: a fixed-term or project contract outside employment.\n- internship: an internship.\n\nAdding a value is a contract change.')
|
||||
|
||||
export type InvitationOfferType = zod.input<typeof InvitationOfferType>;
|
||||
export type InvitationOfferTypeOutput = zod.output<typeof InvitationOfferType>;
|
||||
@@ -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 invitationOrganizationNameMax = 200;
|
||||
|
||||
|
||||
export const InvitationOrganization = zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the organization.'),
|
||||
"name": zod.string().min(1).max(invitationOrganizationNameMax).describe('Public name of the organization. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('Organization that sent the invitation, as the candidate sees it before deciding. The organization contract (TASK-077) adds the public card; this object only names it.')
|
||||
|
||||
export type InvitationOrganization = zod.input<typeof InvitationOrganization>;
|
||||
export type InvitationOrganizationOutput = zod.output<typeof InvitationOrganization>;
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const invitationPackageBonusOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const invitationPackageBonusOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const invitationPackageEquipmentOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const invitationPackageEquipmentOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const invitationPackageTrainingOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const invitationPackageTrainingOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const invitationPackageHealthInsuranceOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const invitationPackageHealthInsuranceOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const InvitationPackage = zod.object({
|
||||
"bonus": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(invitationPackageBonusOneDescriptionMax).regex(invitationPackageBonusOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"equipment": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(invitationPackageEquipmentOneDescriptionMax).regex(invitationPackageEquipmentOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"training": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(invitationPackageTrainingOneDescriptionMax).regex(invitationPackageTrainingOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"health_insurance": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(invitationPackageHealthInsuranceOneDescriptionMax).regex(invitationPackageHealthInsuranceOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.')
|
||||
}).describe('Required section of the package (PRD FR12): the bonus, the equipment, the training, and the voluntary health insurance (ДМС). Every field is required and is either provided with a description or explicitly not provided. The work format of the package is the required `work_formats` term, which has no "not provided" variant. Adding a required condition is a breaking change; an optional one is additive.')
|
||||
|
||||
export type InvitationPackage = zod.input<typeof InvitationPackage>;
|
||||
export type InvitationPackageOutput = zod.output<typeof InvitationPackage>;
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const invitationPackageItemOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const invitationPackageItemOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const InvitationPackageItem = zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(invitationPackageItemOneDescriptionMax).regex(invitationPackageItemOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.')
|
||||
|
||||
export type InvitationPackageItem = zod.input<typeof InvitationPackageItem>;
|
||||
export type InvitationPackageItemOutput = zod.output<typeof InvitationPackageItem>;
|
||||
@@ -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 InvitationPackageItemNotProvided = zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')
|
||||
|
||||
export type InvitationPackageItemNotProvided = zod.input<typeof InvitationPackageItemNotProvided>;
|
||||
export type InvitationPackageItemNotProvidedOutput = zod.output<typeof InvitationPackageItemNotProvided>;
|
||||
@@ -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 invitationPackageItemProvidedDescriptionMax = 300;
|
||||
|
||||
|
||||
export const invitationPackageItemProvidedDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const InvitationPackageItemProvided = zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(invitationPackageItemProvidedDescriptionMax).regex(invitationPackageItemProvidedDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.')
|
||||
|
||||
export type InvitationPackageItemProvided = zod.input<typeof InvitationPackageItemProvided>;
|
||||
export type InvitationPackageItemProvidedOutput = zod.output<typeof InvitationPackageItemProvided>;
|
||||
@@ -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 InvitationPackageItemTextMax = 300;
|
||||
|
||||
|
||||
export const InvitationPackageItemTextRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const InvitationPackageItemText = zod.string().min(1).max(InvitationPackageItemTextMax).regex(InvitationPackageItemTextRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
|
||||
export type InvitationPackageItemText = zod.input<typeof InvitationPackageItemText>;
|
||||
export type InvitationPackageItemTextOutput = zod.output<typeof InvitationPackageItemText>;
|
||||
@@ -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 InvitationResponsePeriod = zod.union([zod.literal(3),zod.literal(7),zod.literal(14)]).describe('Days the candidate has to answer, chosen by the organization in the draft from the product policy: 3, 7, or 14. The deadline starts at the first delivery and is never reset by an email, a view, or a counter offer.')
|
||||
|
||||
export type InvitationResponsePeriod = zod.input<typeof InvitationResponsePeriod>;
|
||||
export type InvitationResponsePeriodOutput = zod.output<typeof InvitationResponsePeriod>;
|
||||
@@ -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 InvitationRoleTitleMax = 200;
|
||||
|
||||
|
||||
export const InvitationRoleTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const InvitationRoleTitle = zod.string().min(1).max(InvitationRoleTitleMax).regex(InvitationRoleTitleRegExp).describe('Name of the offered role, for example "Middle Go developer in 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 InvitationRoleTitle = zod.input<typeof InvitationRoleTitle>;
|
||||
export type InvitationRoleTitleOutput = zod.output<typeof InvitationRoleTitle>;
|
||||
@@ -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 InvitationSalaryFit = zod.enum(['within_range', 'up_to_10_percent_above', 'above', 'withheld', 'not_available']).describe('Coarse indicator for the organization of how the salary range relates to the candidate\'s hidden minimum (PRD FR13). It is the only information about the minimum that the organization receives; the exact minimum never appears in any response, log, or problem. The server compares the upper bound `B` with the lowest minimum the candidate set for the offered work formats, in integer arithmetic and only in the same tax basis.\n\n- within_range: the minimum is not above `B`.\n- up_to_10_percent_above: the minimum is above `B` by at most 10%, that is `10 * minimum <= 11 * B`.\n- above: the minimum is more than 10% above `B`.\n- withheld: the organization made five indicator-relevant settings within seven days, so the indicator is off for seven days from the fifth (the limit of TASK-211). The response to the fifth setting already carries `withheld`, and so does every draft and invitation of the organization, existing ones included, until the period ends.\n- not_available: the candidate set no minimum for the offered formats, or set it in the other tax basis.\n\nEvery change that can move this indicator is an indicator-relevant setting: the range set on creation, and in a draft a change of either bound, of the tax basis, or of `work_formats`, since the minimum depends on the format. Each counts against the organization-wide limit of three settings a day (429) and against the withheld counter of five settings within seven days, together with the ranges of needs. The one raise of the upper bound of a sent invitation counts against the withheld counter but not against the daily limit, because FR13 gives it its own once-only rule. Switching the tax basis turns `not_available` into a band or back and so tells the organization the basis of the minimum; this is accepted, and the switch counts against the limit like any other setting.\n\nThe server never rejects or changes a range because of the minimum: a rejection would itself reveal it.')
|
||||
|
||||
export type InvitationSalaryFit = zod.input<typeof InvitationSalaryFit>;
|
||||
export type InvitationSalaryFitOutput = zod.output<typeof InvitationSalaryFit>;
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
|
||||
export const invitationSalaryRaiseSalaryToOneMin = 1000;
|
||||
export const invitationSalaryRaiseSalaryToOneMax = 100000000;
|
||||
export const invitationSalaryRaiseSalaryToOneMultipleOf = 1000;
|
||||
|
||||
|
||||
export const InvitationSalaryRaise = zod.object({
|
||||
"expected_version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.'),
|
||||
"salary_to": zod.int().min(invitationSalaryRaiseSalaryToOneMin).max(invitationSalaryRaiseSalaryToOneMax).multipleOf(invitationSalaryRaiseSalaryToOneMultipleOf).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.').describe('New upper bound, above the current one, with a width of the range from 10% to 40% of its midpoint.')
|
||||
}).describe('The one raise of the upper salary bound of a sent invitation (PRD FR13). Only `salary_to` changes; the lower bound, the currency, the period, and the tax basis stay fixed. Unknown fields are rejected, so the request cannot lower the lower bound or change the basis.')
|
||||
|
||||
export type InvitationSalaryRaise = zod.input<typeof InvitationSalaryRaise>;
|
||||
export type InvitationSalaryRaiseOutput = zod.output<typeof InvitationSalaryRaise>;
|
||||
@@ -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 InvitationState = zod.enum(['draft', 'delivered', 'viewed', 'counter', 'accepted', 'interview_scheduled', 'interviewed', 'negotiation', 'terms_agreed', 'no_deal', 'declined', 'expired', 'withdrawn', 'cancelled_by_candidate']).describe('State of an invitation (PRD FR12). The internal sending step is never visible: a successful send already answers with `delivered`.\n\n- draft: the organization prepares the terms. The candidate does not see the invitation.\n- delivered: the invitation is in the candidate\'s inbox and the response deadline runs.\n- viewed: the candidate opened the terms; ViewMyInvitation records it. The deadline is unchanged.\n- counter: planned; the candidate sent the one counter offer. No MVP operation produces it.\n- accepted: the candidate accepted the current terms version and gave the consent C4; the contact grant exists.\n- interview_scheduled, interviewed, negotiation, terms_agreed, no_deal: planned stages after an acceptance (interview and the sealed final of FR13). No MVP operation produces them.\n- declined: terminal; the candidate declined with a structured reason. No access arises.\n- expired: terminal; a server deadline passed, see `expiry_reason`. No access arises.\n- withdrawn: terminal; the organization withdrew the invitation. A grant that already exists is not revoked by it.\n- cancelled_by_candidate: terminal; the candidate cancelled the participation. The grant of this invitation is revoked.\n\nPlanned states are listed now so that generated clients accept them when their operations arrive. Adding another value is a contract change.')
|
||||
|
||||
export type InvitationState = zod.input<typeof InvitationState>;
|
||||
export type InvitationStateOutput = zod.output<typeof InvitationState>;
|
||||
@@ -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 InvitationTeamDescriptionMax = 1000;
|
||||
|
||||
|
||||
export const InvitationTeamDescriptionRegExp = new RegExp('\\S');
|
||||
|
||||
export const InvitationTeamDescription = zod.string().min(1).max(InvitationTeamDescriptionMax).regex(InvitationTeamDescriptionRegExp).describe('Description of the team the candidate would join, such as its size, roles, and way of working. It may contain line breaks and has at least one character that is not white space. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of employees or candidates.')
|
||||
|
||||
export type InvitationTeamDescription = zod.input<typeof InvitationTeamDescription>;
|
||||
export type InvitationTeamDescriptionOutput = zod.output<typeof InvitationTeamDescription>;
|
||||
@@ -0,0 +1,114 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const invitationTermsRoleTitleMax = 200;
|
||||
|
||||
|
||||
export const invitationTermsRoleTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const invitationTermsTasksItemMax = 300;
|
||||
|
||||
|
||||
export const invitationTermsTasksItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const invitationTermsTasksMax = 20;
|
||||
|
||||
export const invitationTermsTeamMax = 1000;
|
||||
|
||||
|
||||
export const invitationTermsTeamRegExp = new RegExp('\\S');
|
||||
export const invitationTermsTechStackItemMax = 100;
|
||||
|
||||
|
||||
export const invitationTermsTechStackItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const invitationTermsTechStackMax = 30;
|
||||
|
||||
export const invitationTermsWorkFormatsMax = 3;
|
||||
|
||||
export const invitationTermsLocationOneMax = 100;
|
||||
|
||||
|
||||
export const invitationTermsLocationOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const invitationTermsCommunicationMethodDetailsOneMax = 300;
|
||||
|
||||
|
||||
export const invitationTermsCommunicationMethodDetailsOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const invitationTermsSalarySalaryFromMin = 1000;
|
||||
export const invitationTermsSalarySalaryFromMax = 100000000;
|
||||
export const invitationTermsSalarySalaryFromMultipleOf = 1000;
|
||||
|
||||
export const invitationTermsSalarySalaryToMin = 1000;
|
||||
export const invitationTermsSalarySalaryToMax = 100000000;
|
||||
export const invitationTermsSalarySalaryToMultipleOf = 1000;
|
||||
|
||||
export const invitationTermsPackageBonusOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const invitationTermsPackageBonusOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const invitationTermsPackageEquipmentOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const invitationTermsPackageEquipmentOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const invitationTermsPackageTrainingOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const invitationTermsPackageTrainingOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const invitationTermsPackageHealthInsuranceOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const invitationTermsPackageHealthInsuranceOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const InvitationTerms = zod.object({
|
||||
"role_title": zod.string().min(1).max(invitationTermsRoleTitleMax).regex(invitationTermsRoleTitleRegExp).describe('Name of the offered role, for example "Middle Go developer in the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"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.'),
|
||||
"offer_type": zod.enum(['full_time', 'part_time', 'contract', 'internship']).describe('Type of the offer.\n\n- full_time: employment with a full working week.\n- part_time: employment with a part-time working week.\n- contract: a fixed-term or project contract outside employment.\n- internship: an internship.\n\nAdding a value is a contract change.'),
|
||||
"tasks": zod.array(zod.string().min(1).max(invitationTermsTasksItemMax).regex(invitationTermsTasksItemRegExp).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.')).min(1).max(invitationTermsTasksMax).describe('Work tasks of the role in the order given.'),
|
||||
"team": zod.string().min(1).max(invitationTermsTeamMax).regex(invitationTermsTeamRegExp).describe('Description of the team the candidate would join, such as its size, roles, and way of working. It may contain line breaks and has at least one character that is not white space. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of employees or candidates.'),
|
||||
"tech_stack": zod.array(zod.string().min(1).max(invitationTermsTechStackItemMax).regex(invitationTermsTechStackItemRegExp).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.')).min(1).max(invitationTermsTechStackMax).describe('Technologies of the role. The server compares names without regard to letter case.'),
|
||||
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(invitationTermsWorkFormatsMax).describe('Work formats the organization offers; the candidate may choose any of them.'),
|
||||
"location": zod.union([zod.string().min(1).max(invitationTermsLocationOneMax).regex(invitationTermsLocationOneRegExp).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()]).describe('Place of work for the `office` or `hybrid` format, or null when the only format is `remote`. It is required with either of those formats.'),
|
||||
"communication_method": zod.object({
|
||||
"channel": zod.enum(['email', 'phone', 'telegram', 'video_call']).describe('Channel through which the organization will contact the candidate after an acceptance.\n\n- email: a letter to the email address the candidate disclosed.\n- phone: a call or a text to the phone number the candidate disclosed.\n- telegram: a message to the Telegram username the candidate disclosed.\n- video_call: an invitation to a video call, sent through one of the disclosed contacts.\n\nThe channel describes the organization\'s plan; the candidate decides which contacts to disclose, and the server never requires that the disclosed fields include the channel.'),
|
||||
"details": zod.union([zod.string().min(1).max(invitationTermsCommunicationMethodDetailsOneMax).regex(invitationTermsCommunicationMethodDetailsOneRegExp).describe('Short note on the communication method, for example "A 30-minute call with the team lead within three working days". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Optional short note, for example the first step or the expected time of the first contact, or null. Plain text without line breaks; it never contains a link or a contact of an employee.')
|
||||
}).describe('How the organization will contact the candidate after an acceptance. It is part of the terms, so the candidate sees it before choosing which contacts to disclose. An invitation without it cannot exist, because the terms require it.'),
|
||||
"salary": zod.object({
|
||||
"salary_from": zod.int().min(invitationTermsSalarySalaryFromMin).max(invitationTermsSalarySalaryFromMax).multipleOf(invitationTermsSalarySalaryFromMultipleOf).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(invitationTermsSalarySalaryToMin).max(invitationTermsSalarySalaryToMax).multipleOf(invitationTermsSalarySalaryToMultipleOf).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.'),
|
||||
"package": zod.object({
|
||||
"bonus": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(invitationTermsPackageBonusOneDescriptionMax).regex(invitationTermsPackageBonusOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"equipment": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(invitationTermsPackageEquipmentOneDescriptionMax).regex(invitationTermsPackageEquipmentOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"training": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(invitationTermsPackageTrainingOneDescriptionMax).regex(invitationTermsPackageTrainingOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"health_insurance": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(invitationTermsPackageHealthInsuranceOneDescriptionMax).regex(invitationTermsPackageHealthInsuranceOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.')
|
||||
}).describe('Required section of the package (PRD FR12): the bonus, the equipment, the training, and the voluntary health insurance (ДМС). Every field is required and is either provided with a description or explicitly not provided. The work format of the package is the required `work_formats` term, which has no "not provided" variant. Adding a required condition is a breaking change; an optional one is additive.')
|
||||
}).describe('Terms of an invitation: everything the candidate sees before deciding and before any contact is disclosed. The same schema is the request field of a draft and the stored snapshot of a terms version, so a response can be sent back unchanged. Every field is required; a field that may have no value says so with an explicit variant (`location` null for a remote role, a package item `not_provided`). The terms never contain data of the candidate: no contact, no salary minimum, and no indicator derived from it. The server checks the cross-field rules after the schema and answers 400 validation_failed with the pointer of the field: the salary rules of SalaryRange with `/terms/salary/salary_to`, a missing place of work for the `office` or `hybrid` format with `/terms/location`, and a repeated technology in `tech_stack` with the pointer of the later item.')
|
||||
|
||||
export type InvitationTerms = zod.input<typeof InvitationTerms>;
|
||||
export type InvitationTermsOutput = zod.output<typeof InvitationTerms>;
|
||||
@@ -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 InvitationTermsVersion = zod.int().min(1).describe('Version of the terms of an invitation. The terms of a version are an immutable snapshot: every committed change of the terms, in the draft or by the one raise of the upper salary bound after sending, creates the next terms version, and a change of anything else keeps it. An acceptance names the terms version it accepts, and the consent C4 and the contact grant record it.')
|
||||
|
||||
export type InvitationTermsVersion = zod.input<typeof InvitationTermsVersion>;
|
||||
export type InvitationTermsVersionOutput = zod.output<typeof InvitationTermsVersion>;
|
||||
@@ -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 InvitationVersion = zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.')
|
||||
|
||||
export type InvitationVersion = zod.input<typeof InvitationVersion>;
|
||||
export type InvitationVersionOutput = zod.output<typeof InvitationVersion>;
|
||||
@@ -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 listMyInvitationsParamsLimitDefault = 20;
|
||||
export const listMyInvitationsParamsLimitMax = 100;
|
||||
|
||||
export const listMyInvitationsParamsCursorMax = 512;
|
||||
|
||||
|
||||
export const listMyInvitationsParamsCursorRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
|
||||
export const ListMyInvitationsParams = zod.object({
|
||||
"limit": zod.int().min(1).max(listMyInvitationsParamsLimitMax).default(listMyInvitationsParamsLimitDefault),
|
||||
"cursor": zod.string().min(1).max(listMyInvitationsParamsCursorMax).regex(listMyInvitationsParamsCursorRegExp).exactOptional()
|
||||
})
|
||||
|
||||
export type ListMyInvitationsParams = zod.input<typeof ListMyInvitationsParams>;
|
||||
export type ListMyInvitationsParamsOutput = zod.output<typeof ListMyInvitationsParams>;
|
||||
@@ -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 listOrganizationInvitationsParamsLimitDefault = 20;
|
||||
export const listOrganizationInvitationsParamsLimitMax = 100;
|
||||
|
||||
export const listOrganizationInvitationsParamsCursorMax = 512;
|
||||
|
||||
|
||||
export const listOrganizationInvitationsParamsCursorRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
|
||||
export const ListOrganizationInvitationsParams = zod.object({
|
||||
"limit": zod.int().min(1).max(listOrganizationInvitationsParamsLimitMax).default(listOrganizationInvitationsParamsLimitDefault),
|
||||
"cursor": zod.string().min(1).max(listOrganizationInvitationsParamsCursorMax).regex(listOrganizationInvitationsParamsCursorRegExp).exactOptional()
|
||||
})
|
||||
|
||||
export type ListOrganizationInvitationsParams = zod.input<typeof ListOrganizationInvitationsParams>;
|
||||
export type ListOrganizationInvitationsParamsOutput = zod.output<typeof ListOrganizationInvitationsParams>;
|
||||
@@ -0,0 +1,149 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const organizationInvitationCandidateHandleMax = 128;
|
||||
|
||||
|
||||
export const organizationInvitationCandidateHandleRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
|
||||
|
||||
|
||||
export const organizationInvitationTermsRoleTitleMax = 200;
|
||||
|
||||
|
||||
export const organizationInvitationTermsRoleTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationTermsTasksItemMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationTermsTasksItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationTermsTasksMax = 20;
|
||||
|
||||
export const organizationInvitationTermsTeamMax = 1000;
|
||||
|
||||
|
||||
export const organizationInvitationTermsTeamRegExp = new RegExp('\\S');
|
||||
export const organizationInvitationTermsTechStackItemMax = 100;
|
||||
|
||||
|
||||
export const organizationInvitationTermsTechStackItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationTermsTechStackMax = 30;
|
||||
|
||||
export const organizationInvitationTermsWorkFormatsMax = 3;
|
||||
|
||||
export const organizationInvitationTermsLocationOneMax = 100;
|
||||
|
||||
|
||||
export const organizationInvitationTermsLocationOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationTermsCommunicationMethodDetailsOneMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationTermsCommunicationMethodDetailsOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationTermsSalarySalaryFromMin = 1000;
|
||||
export const organizationInvitationTermsSalarySalaryFromMax = 100000000;
|
||||
export const organizationInvitationTermsSalarySalaryFromMultipleOf = 1000;
|
||||
|
||||
export const organizationInvitationTermsSalarySalaryToMin = 1000;
|
||||
export const organizationInvitationTermsSalarySalaryToMax = 100000000;
|
||||
export const organizationInvitationTermsSalarySalaryToMultipleOf = 1000;
|
||||
|
||||
export const organizationInvitationTermsPackageBonusOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationTermsPackageBonusOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationTermsPackageEquipmentOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationTermsPackageEquipmentOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationTermsPackageTrainingOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationTermsPackageTrainingOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationTermsPackageHealthInsuranceOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationTermsPackageHealthInsuranceOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationContactAccessFieldsMax = 4;
|
||||
|
||||
|
||||
export const OrganizationInvitation = zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the invitation.'),
|
||||
"organization_id": zod.uuid().describe('Organization that owns the invitation, equal to `org_id` of the path. It never changes.'),
|
||||
"candidate_handle": zod.string().min(1).max(organizationInvitationCandidateHandleMax).regex(organizationInvitationCandidateHandleRegExp).describe('Opaque reference to a candidate as one organization sees it, taken from a search result card of that organization. It is not the candidate\'s account or profile identifier, it never contains an email address or a phone number, and it means nothing to another organization. The server resolves it only for the organization in the path. Clients never parse it. It is shared by the invitations of FR12 and the search results of FR11 (TASK-185), which issue it.'),
|
||||
"need": zod.union([zod.object({
|
||||
"need_id": zod.uuid().describe('Identifier of a need of the organization in the path.'),
|
||||
"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('`requirements_version` of the need that the invitation refers to; it must be a version that the need has had.')
|
||||
}).describe('Need of the same organization that the invitation was built from, with the requirements version used. A direct invitation has no need. The link is informational: the invitation keeps its own terms, which may differ from the need, and a later change of the need never changes them.'),zod.null()]).describe('Need the invitation was built from, or null for a direct invitation.'),
|
||||
"state": zod.enum(['draft', 'delivered', 'viewed', 'counter', 'accepted', 'interview_scheduled', 'interviewed', 'negotiation', 'terms_agreed', 'no_deal', 'declined', 'expired', 'withdrawn', 'cancelled_by_candidate']).describe('State of an invitation (PRD FR12). The internal sending step is never visible: a successful send already answers with `delivered`.\n\n- draft: the organization prepares the terms. The candidate does not see the invitation.\n- delivered: the invitation is in the candidate\'s inbox and the response deadline runs.\n- viewed: the candidate opened the terms; ViewMyInvitation records it. The deadline is unchanged.\n- counter: planned; the candidate sent the one counter offer. No MVP operation produces it.\n- accepted: the candidate accepted the current terms version and gave the consent C4; the contact grant exists.\n- interview_scheduled, interviewed, negotiation, terms_agreed, no_deal: planned stages after an acceptance (interview and the sealed final of FR13). No MVP operation produces them.\n- declined: terminal; the candidate declined with a structured reason. No access arises.\n- expired: terminal; a server deadline passed, see `expiry_reason`. No access arises.\n- withdrawn: terminal; the organization withdrew the invitation. A grant that already exists is not revoked by it.\n- cancelled_by_candidate: terminal; the candidate cancelled the participation. The grant of this invitation is revoked.\n\nPlanned states are listed now so that generated clients accept them when their operations arrive. Adding another value is a contract change.'),
|
||||
"expiry_reason": zod.union([zod.enum(['invitation_timeout', 'negotiation_timeout']).describe('Why an invitation expired. Set exactly when the state is `expired`, null otherwise.\n\n- invitation_timeout: the candidate did not answer by `response_deadline_at`. No grant is created.\n- negotiation_timeout: planned; the sealed final of FR13 closed without both bids. No MVP operation produces it.'),zod.null()]).describe('Reason of an expiry, or null unless `state` is `expired`.'),
|
||||
"version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.'),
|
||||
"terms_version": zod.int().min(1).describe('Version of the terms of an invitation. The terms of a version are an immutable snapshot: every committed change of the terms, in the draft or by the one raise of the upper salary bound after sending, creates the next terms version, and a change of anything else keeps it. An acceptance names the terms version it accepts, and the consent C4 and the contact grant record it.'),
|
||||
"terms": zod.object({
|
||||
"role_title": zod.string().min(1).max(organizationInvitationTermsRoleTitleMax).regex(organizationInvitationTermsRoleTitleRegExp).describe('Name of the offered role, for example "Middle Go developer in the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"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.'),
|
||||
"offer_type": zod.enum(['full_time', 'part_time', 'contract', 'internship']).describe('Type of the offer.\n\n- full_time: employment with a full working week.\n- part_time: employment with a part-time working week.\n- contract: a fixed-term or project contract outside employment.\n- internship: an internship.\n\nAdding a value is a contract change.'),
|
||||
"tasks": zod.array(zod.string().min(1).max(organizationInvitationTermsTasksItemMax).regex(organizationInvitationTermsTasksItemRegExp).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.')).min(1).max(organizationInvitationTermsTasksMax).describe('Work tasks of the role in the order given.'),
|
||||
"team": zod.string().min(1).max(organizationInvitationTermsTeamMax).regex(organizationInvitationTermsTeamRegExp).describe('Description of the team the candidate would join, such as its size, roles, and way of working. It may contain line breaks and has at least one character that is not white space. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of employees or candidates.'),
|
||||
"tech_stack": zod.array(zod.string().min(1).max(organizationInvitationTermsTechStackItemMax).regex(organizationInvitationTermsTechStackItemRegExp).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.')).min(1).max(organizationInvitationTermsTechStackMax).describe('Technologies of the role. The server compares names without regard to letter case.'),
|
||||
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(organizationInvitationTermsWorkFormatsMax).describe('Work formats the organization offers; the candidate may choose any of them.'),
|
||||
"location": zod.union([zod.string().min(1).max(organizationInvitationTermsLocationOneMax).regex(organizationInvitationTermsLocationOneRegExp).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()]).describe('Place of work for the `office` or `hybrid` format, or null when the only format is `remote`. It is required with either of those formats.'),
|
||||
"communication_method": zod.object({
|
||||
"channel": zod.enum(['email', 'phone', 'telegram', 'video_call']).describe('Channel through which the organization will contact the candidate after an acceptance.\n\n- email: a letter to the email address the candidate disclosed.\n- phone: a call or a text to the phone number the candidate disclosed.\n- telegram: a message to the Telegram username the candidate disclosed.\n- video_call: an invitation to a video call, sent through one of the disclosed contacts.\n\nThe channel describes the organization\'s plan; the candidate decides which contacts to disclose, and the server never requires that the disclosed fields include the channel.'),
|
||||
"details": zod.union([zod.string().min(1).max(organizationInvitationTermsCommunicationMethodDetailsOneMax).regex(organizationInvitationTermsCommunicationMethodDetailsOneRegExp).describe('Short note on the communication method, for example "A 30-minute call with the team lead within three working days". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Optional short note, for example the first step or the expected time of the first contact, or null. Plain text without line breaks; it never contains a link or a contact of an employee.')
|
||||
}).describe('How the organization will contact the candidate after an acceptance. It is part of the terms, so the candidate sees it before choosing which contacts to disclose. An invitation without it cannot exist, because the terms require it.'),
|
||||
"salary": zod.object({
|
||||
"salary_from": zod.int().min(organizationInvitationTermsSalarySalaryFromMin).max(organizationInvitationTermsSalarySalaryFromMax).multipleOf(organizationInvitationTermsSalarySalaryFromMultipleOf).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(organizationInvitationTermsSalarySalaryToMin).max(organizationInvitationTermsSalarySalaryToMax).multipleOf(organizationInvitationTermsSalarySalaryToMultipleOf).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.'),
|
||||
"package": zod.object({
|
||||
"bonus": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(organizationInvitationTermsPackageBonusOneDescriptionMax).regex(organizationInvitationTermsPackageBonusOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"equipment": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(organizationInvitationTermsPackageEquipmentOneDescriptionMax).regex(organizationInvitationTermsPackageEquipmentOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"training": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(organizationInvitationTermsPackageTrainingOneDescriptionMax).regex(organizationInvitationTermsPackageTrainingOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"health_insurance": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(organizationInvitationTermsPackageHealthInsuranceOneDescriptionMax).regex(organizationInvitationTermsPackageHealthInsuranceOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.')
|
||||
}).describe('Required section of the package (PRD FR12): the bonus, the equipment, the training, and the voluntary health insurance (ДМС). Every field is required and is either provided with a description or explicitly not provided. The work format of the package is the required `work_formats` term, which has no "not provided" variant. Adding a required condition is a breaking change; an optional one is additive.')
|
||||
}).describe('Terms of an invitation: everything the candidate sees before deciding and before any contact is disclosed. The same schema is the request field of a draft and the stored snapshot of a terms version, so a response can be sent back unchanged. Every field is required; a field that may have no value says so with an explicit variant (`location` null for a remote role, a package item `not_provided`). The terms never contain data of the candidate: no contact, no salary minimum, and no indicator derived from it. The server checks the cross-field rules after the schema and answers 400 validation_failed with the pointer of the field: the salary rules of SalaryRange with `/terms/salary/salary_to`, a missing place of work for the `office` or `hybrid` format with `/terms/location`, and a repeated technology in `tech_stack` with the pointer of the later item.'),
|
||||
"response_period_days": zod.union([zod.literal(3),zod.literal(7),zod.literal(14)]).describe('Days the candidate has to answer, chosen by the organization in the draft from the product policy: 3, 7, or 14. The deadline starts at the first delivery and is never reset by an email, a view, or a counter offer.'),
|
||||
"response_deadline_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('Moment when the candidate\'s time to answer ends, set at the first delivery to `delivered_at` plus `response_period_days`, or null for a draft. A command received at this moment or later is late. After an acceptance the deadline no longer applies.'),
|
||||
"salary_raise_used": zod.boolean().describe('Whether the one raise of the upper salary bound after sending (PRD FR13) has been used. It counts the whole history of the invitation.'),
|
||||
"salary_fit": zod.enum(['within_range', 'up_to_10_percent_above', 'above', 'withheld', 'not_available']).describe('Coarse indicator for the organization of how the salary range relates to the candidate\'s hidden minimum (PRD FR13). It is the only information about the minimum that the organization receives; the exact minimum never appears in any response, log, or problem. The server compares the upper bound `B` with the lowest minimum the candidate set for the offered work formats, in integer arithmetic and only in the same tax basis.\n\n- within_range: the minimum is not above `B`.\n- up_to_10_percent_above: the minimum is above `B` by at most 10%, that is `10 * minimum <= 11 * B`.\n- above: the minimum is more than 10% above `B`.\n- withheld: the organization made five indicator-relevant settings within seven days, so the indicator is off for seven days from the fifth (the limit of TASK-211). The response to the fifth setting already carries `withheld`, and so does every draft and invitation of the organization, existing ones included, until the period ends.\n- not_available: the candidate set no minimum for the offered formats, or set it in the other tax basis.\n\nEvery change that can move this indicator is an indicator-relevant setting: the range set on creation, and in a draft a change of either bound, of the tax basis, or of `work_formats`, since the minimum depends on the format. Each counts against the organization-wide limit of three settings a day (429) and against the withheld counter of five settings within seven days, together with the ranges of needs. The one raise of the upper bound of a sent invitation counts against the withheld counter but not against the daily limit, because FR13 gives it its own once-only rule. Switching the tax basis turns `not_available` into a band or back and so tells the organization the basis of the minimum; this is accepted, and the switch counts against the limit like any other setting.\n\nThe server never rejects or changes a range because of the minimum: a rejection would itself reveal it.'),
|
||||
"contact_access": zod.object({
|
||||
"status": zod.enum(['not_granted', 'available', 'closed']).describe('Whether the organization may read the candidate\'s contacts through GetOrganizationInvitationContacts now.\n\n- not_granted: the candidate has not accepted this invitation, so no grant exists.\n- available: a grant from this invitation is active and the current consent and visibility allow the read.\n- closed: a grant from this invitation exists but does not allow the read now: it was revoked (the candidate revoked C4, cancelled the participation, or revoked the publication C2 or hid the profile after the acceptance), or it was created while the visibility already did not allow the read. The organization is not told which. A revoked grant never becomes `available` again; a grant blocked from the start becomes `available` once the candidate\'s visibility allows the read, which only follows the candidate\'s own choice to publish the profile or unhide it for the organization. Since every visibility change after a grant exists revokes the grant, a later toggle is never visible to the organization.'),
|
||||
"fields": zod.array(zod.enum(['full_name', 'email', 'phone', 'telegram']).describe('Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.\n\n- full_name: the full name from the profile.\n- email: the contact email address from the profile.\n- phone: the contact phone number from the profile.\n- telegram: the Telegram username from the profile.\n\nThe value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.')).max(organizationInvitationContactAccessFieldsMax).describe('Kinds of contact that the read returns while `status` is `available`; empty otherwise.')
|
||||
}).describe('Contact access of the organization through this invitation, without any contact value. The values come only from GetOrganizationInvitationContacts.'),
|
||||
"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.'),
|
||||
"delivered_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('Moment of delivery to the candidate\'s inbox, or null for a draft.'),
|
||||
"viewed_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('Moment when the candidate first opened the terms, or null.'),
|
||||
"responded_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('Moment of the candidate\'s acceptance or decline, or null.')
|
||||
}).describe('Invitation as the organization reads it: the candidate handle, the current terms version, the state, the coarse salary indicator, and the contact access without contact values. It never contains the candidate\'s name, email address, phone number, or other contact, the exact salary minimum, or the reason and comment of a decline.')
|
||||
|
||||
export type OrganizationInvitation = zod.input<typeof OrganizationInvitation>;
|
||||
export type OrganizationInvitationOutput = zod.output<typeof OrganizationInvitation>;
|
||||
@@ -0,0 +1,127 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const organizationInvitationCreateCandidateHandleMax = 128;
|
||||
|
||||
|
||||
export const organizationInvitationCreateCandidateHandleRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
|
||||
export const organizationInvitationCreateTermsRoleTitleMax = 200;
|
||||
|
||||
|
||||
export const organizationInvitationCreateTermsRoleTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationCreateTermsTasksItemMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationCreateTermsTasksItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationCreateTermsTasksMax = 20;
|
||||
|
||||
export const organizationInvitationCreateTermsTeamMax = 1000;
|
||||
|
||||
|
||||
export const organizationInvitationCreateTermsTeamRegExp = new RegExp('\\S');
|
||||
export const organizationInvitationCreateTermsTechStackItemMax = 100;
|
||||
|
||||
|
||||
export const organizationInvitationCreateTermsTechStackItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationCreateTermsTechStackMax = 30;
|
||||
|
||||
export const organizationInvitationCreateTermsWorkFormatsMax = 3;
|
||||
|
||||
export const organizationInvitationCreateTermsLocationOneMax = 100;
|
||||
|
||||
|
||||
export const organizationInvitationCreateTermsLocationOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationCreateTermsCommunicationMethodDetailsOneMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationCreateTermsCommunicationMethodDetailsOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationCreateTermsSalarySalaryFromMin = 1000;
|
||||
export const organizationInvitationCreateTermsSalarySalaryFromMax = 100000000;
|
||||
export const organizationInvitationCreateTermsSalarySalaryFromMultipleOf = 1000;
|
||||
|
||||
export const organizationInvitationCreateTermsSalarySalaryToMin = 1000;
|
||||
export const organizationInvitationCreateTermsSalarySalaryToMax = 100000000;
|
||||
export const organizationInvitationCreateTermsSalarySalaryToMultipleOf = 1000;
|
||||
|
||||
export const organizationInvitationCreateTermsPackageBonusOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationCreateTermsPackageBonusOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationCreateTermsPackageEquipmentOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationCreateTermsPackageEquipmentOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationCreateTermsPackageTrainingOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationCreateTermsPackageTrainingOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationCreateTermsPackageHealthInsuranceOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationCreateTermsPackageHealthInsuranceOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const OrganizationInvitationCreate = zod.object({
|
||||
"candidate_handle": zod.string().min(1).max(organizationInvitationCreateCandidateHandleMax).regex(organizationInvitationCreateCandidateHandleRegExp).describe('Opaque reference to a candidate as one organization sees it, taken from a search result card of that organization. It is not the candidate\'s account or profile identifier, it never contains an email address or a phone number, and it means nothing to another organization. The server resolves it only for the organization in the path. Clients never parse it. It is shared by the invitations of FR12 and the search results of FR11 (TASK-185), which issue it.'),
|
||||
"need": zod.union([zod.object({
|
||||
"need_id": zod.uuid().describe('Identifier of a need of the organization in the path.'),
|
||||
"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('`requirements_version` of the need that the invitation refers to; it must be a version that the need has had.')
|
||||
}).describe('Need of the same organization that the invitation was built from, with the requirements version used. A direct invitation has no need. The link is informational: the invitation keeps its own terms, which may differ from the need, and a later change of the need never changes them.'),zod.null()]).exactOptional().describe('Need of the organization the invitation is built from, or null or absent for a direct invitation.'),
|
||||
"response_period_days": zod.union([zod.literal(3),zod.literal(7),zod.literal(14)]).describe('Days the candidate has to answer, chosen by the organization in the draft from the product policy: 3, 7, or 14. The deadline starts at the first delivery and is never reset by an email, a view, or a counter offer.').exactOptional().describe('Days to answer; absent means 7, the default of the product policy.'),
|
||||
"terms": zod.object({
|
||||
"role_title": zod.string().min(1).max(organizationInvitationCreateTermsRoleTitleMax).regex(organizationInvitationCreateTermsRoleTitleRegExp).describe('Name of the offered role, for example "Middle Go developer in the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"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.'),
|
||||
"offer_type": zod.enum(['full_time', 'part_time', 'contract', 'internship']).describe('Type of the offer.\n\n- full_time: employment with a full working week.\n- part_time: employment with a part-time working week.\n- contract: a fixed-term or project contract outside employment.\n- internship: an internship.\n\nAdding a value is a contract change.'),
|
||||
"tasks": zod.array(zod.string().min(1).max(organizationInvitationCreateTermsTasksItemMax).regex(organizationInvitationCreateTermsTasksItemRegExp).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.')).min(1).max(organizationInvitationCreateTermsTasksMax).describe('Work tasks of the role in the order given.'),
|
||||
"team": zod.string().min(1).max(organizationInvitationCreateTermsTeamMax).regex(organizationInvitationCreateTermsTeamRegExp).describe('Description of the team the candidate would join, such as its size, roles, and way of working. It may contain line breaks and has at least one character that is not white space. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of employees or candidates.'),
|
||||
"tech_stack": zod.array(zod.string().min(1).max(organizationInvitationCreateTermsTechStackItemMax).regex(organizationInvitationCreateTermsTechStackItemRegExp).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.')).min(1).max(organizationInvitationCreateTermsTechStackMax).describe('Technologies of the role. The server compares names without regard to letter case.'),
|
||||
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(organizationInvitationCreateTermsWorkFormatsMax).describe('Work formats the organization offers; the candidate may choose any of them.'),
|
||||
"location": zod.union([zod.string().min(1).max(organizationInvitationCreateTermsLocationOneMax).regex(organizationInvitationCreateTermsLocationOneRegExp).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()]).describe('Place of work for the `office` or `hybrid` format, or null when the only format is `remote`. It is required with either of those formats.'),
|
||||
"communication_method": zod.object({
|
||||
"channel": zod.enum(['email', 'phone', 'telegram', 'video_call']).describe('Channel through which the organization will contact the candidate after an acceptance.\n\n- email: a letter to the email address the candidate disclosed.\n- phone: a call or a text to the phone number the candidate disclosed.\n- telegram: a message to the Telegram username the candidate disclosed.\n- video_call: an invitation to a video call, sent through one of the disclosed contacts.\n\nThe channel describes the organization\'s plan; the candidate decides which contacts to disclose, and the server never requires that the disclosed fields include the channel.'),
|
||||
"details": zod.union([zod.string().min(1).max(organizationInvitationCreateTermsCommunicationMethodDetailsOneMax).regex(organizationInvitationCreateTermsCommunicationMethodDetailsOneRegExp).describe('Short note on the communication method, for example "A 30-minute call with the team lead within three working days". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Optional short note, for example the first step or the expected time of the first contact, or null. Plain text without line breaks; it never contains a link or a contact of an employee.')
|
||||
}).describe('How the organization will contact the candidate after an acceptance. It is part of the terms, so the candidate sees it before choosing which contacts to disclose. An invitation without it cannot exist, because the terms require it.'),
|
||||
"salary": zod.object({
|
||||
"salary_from": zod.int().min(organizationInvitationCreateTermsSalarySalaryFromMin).max(organizationInvitationCreateTermsSalarySalaryFromMax).multipleOf(organizationInvitationCreateTermsSalarySalaryFromMultipleOf).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(organizationInvitationCreateTermsSalarySalaryToMin).max(organizationInvitationCreateTermsSalarySalaryToMax).multipleOf(organizationInvitationCreateTermsSalarySalaryToMultipleOf).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.'),
|
||||
"package": zod.object({
|
||||
"bonus": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(organizationInvitationCreateTermsPackageBonusOneDescriptionMax).regex(organizationInvitationCreateTermsPackageBonusOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"equipment": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(organizationInvitationCreateTermsPackageEquipmentOneDescriptionMax).regex(organizationInvitationCreateTermsPackageEquipmentOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"training": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(organizationInvitationCreateTermsPackageTrainingOneDescriptionMax).regex(organizationInvitationCreateTermsPackageTrainingOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"health_insurance": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(organizationInvitationCreateTermsPackageHealthInsuranceOneDescriptionMax).regex(organizationInvitationCreateTermsPackageHealthInsuranceOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.')
|
||||
}).describe('Required section of the package (PRD FR12): the bonus, the equipment, the training, and the voluntary health insurance (ДМС). Every field is required and is either provided with a description or explicitly not provided. The work format of the package is the required `work_formats` term, which has no "not provided" variant. Adding a required condition is a breaking change; an optional one is additive.')
|
||||
}).describe('Terms of an invitation: everything the candidate sees before deciding and before any contact is disclosed. The same schema is the request field of a draft and the stored snapshot of a terms version, so a response can be sent back unchanged. Every field is required; a field that may have no value says so with an explicit variant (`location` null for a remote role, a package item `not_provided`). The terms never contain data of the candidate: no contact, no salary minimum, and no indicator derived from it. The server checks the cross-field rules after the schema and answers 400 validation_failed with the pointer of the field: the salary rules of SalaryRange with `/terms/salary/salary_to`, a missing place of work for the `office` or `hybrid` format with `/terms/location`, and a repeated technology in `tech_stack` with the pointer of the later item.')
|
||||
}).describe('New draft for one candidate. The candidate is named only by the handle from a search result of this organization, never by an email address, a phone number, or an account identifier. The terms are complete from the start, so a draft without the tax basis or the communication method cannot exist. Unknown fields are rejected, so a request cannot set the state, a version, a deadline, the salary indicator, contact access, or a candidate\'s minimum or contact.')
|
||||
|
||||
export type OrganizationInvitationCreate = zod.input<typeof OrganizationInvitationCreate>;
|
||||
export type OrganizationInvitationCreateOutput = zod.output<typeof OrganizationInvitationCreate>;
|
||||
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const organizationInvitationListItemsItemCandidateHandleMax = 128;
|
||||
|
||||
|
||||
export const organizationInvitationListItemsItemCandidateHandleRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
|
||||
|
||||
|
||||
export const organizationInvitationListItemsItemRoleTitleMax = 200;
|
||||
|
||||
|
||||
export const organizationInvitationListItemsItemRoleTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationListItemsItemSalarySalaryFromMin = 1000;
|
||||
export const organizationInvitationListItemsItemSalarySalaryFromMax = 100000000;
|
||||
export const organizationInvitationListItemsItemSalarySalaryFromMultipleOf = 1000;
|
||||
|
||||
export const organizationInvitationListItemsItemSalarySalaryToMin = 1000;
|
||||
export const organizationInvitationListItemsItemSalarySalaryToMax = 100000000;
|
||||
export const organizationInvitationListItemsItemSalarySalaryToMultipleOf = 1000;
|
||||
|
||||
export const organizationInvitationListItemsItemContactAccessFieldsMax = 4;
|
||||
|
||||
export const organizationInvitationListItemsMax = 100;
|
||||
|
||||
export const organizationInvitationListPageNextCursorMax = 512;
|
||||
|
||||
|
||||
export const organizationInvitationListPageNextCursorRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
|
||||
export const OrganizationInvitationList = zod.object({
|
||||
"items": zod.array(zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the invitation.'),
|
||||
"candidate_handle": zod.string().min(1).max(organizationInvitationListItemsItemCandidateHandleMax).regex(organizationInvitationListItemsItemCandidateHandleRegExp).describe('Opaque reference to a candidate as one organization sees it, taken from a search result card of that organization. It is not the candidate\'s account or profile identifier, it never contains an email address or a phone number, and it means nothing to another organization. The server resolves it only for the organization in the path. Clients never parse it. It is shared by the invitations of FR12 and the search results of FR11 (TASK-185), which issue it.'),
|
||||
"need": zod.union([zod.object({
|
||||
"need_id": zod.uuid().describe('Identifier of a need of the organization in the path.'),
|
||||
"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('`requirements_version` of the need that the invitation refers to; it must be a version that the need has had.')
|
||||
}).describe('Need of the same organization that the invitation was built from, with the requirements version used. A direct invitation has no need. The link is informational: the invitation keeps its own terms, which may differ from the need, and a later change of the need never changes them.'),zod.null()]),
|
||||
"state": zod.enum(['draft', 'delivered', 'viewed', 'counter', 'accepted', 'interview_scheduled', 'interviewed', 'negotiation', 'terms_agreed', 'no_deal', 'declined', 'expired', 'withdrawn', 'cancelled_by_candidate']).describe('State of an invitation (PRD FR12). The internal sending step is never visible: a successful send already answers with `delivered`.\n\n- draft: the organization prepares the terms. The candidate does not see the invitation.\n- delivered: the invitation is in the candidate\'s inbox and the response deadline runs.\n- viewed: the candidate opened the terms; ViewMyInvitation records it. The deadline is unchanged.\n- counter: planned; the candidate sent the one counter offer. No MVP operation produces it.\n- accepted: the candidate accepted the current terms version and gave the consent C4; the contact grant exists.\n- interview_scheduled, interviewed, negotiation, terms_agreed, no_deal: planned stages after an acceptance (interview and the sealed final of FR13). No MVP operation produces them.\n- declined: terminal; the candidate declined with a structured reason. No access arises.\n- expired: terminal; a server deadline passed, see `expiry_reason`. No access arises.\n- withdrawn: terminal; the organization withdrew the invitation. A grant that already exists is not revoked by it.\n- cancelled_by_candidate: terminal; the candidate cancelled the participation. The grant of this invitation is revoked.\n\nPlanned states are listed now so that generated clients accept them when their operations arrive. Adding another value is a contract change.'),
|
||||
"expiry_reason": zod.union([zod.enum(['invitation_timeout', 'negotiation_timeout']).describe('Why an invitation expired. Set exactly when the state is `expired`, null otherwise.\n\n- invitation_timeout: the candidate did not answer by `response_deadline_at`. No grant is created.\n- negotiation_timeout: planned; the sealed final of FR13 closed without both bids. No MVP operation produces it.'),zod.null()]),
|
||||
"version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.'),
|
||||
"terms_version": zod.int().min(1).describe('Version of the terms of an invitation. The terms of a version are an immutable snapshot: every committed change of the terms, in the draft or by the one raise of the upper salary bound after sending, creates the next terms version, and a change of anything else keeps it. An acceptance names the terms version it accepts, and the consent C4 and the contact grant record it.'),
|
||||
"role_title": zod.string().min(1).max(organizationInvitationListItemsItemRoleTitleMax).regex(organizationInvitationListItemsItemRoleTitleRegExp).describe('Name of the offered role, for example "Middle Go developer in the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"salary": zod.object({
|
||||
"salary_from": zod.int().min(organizationInvitationListItemsItemSalarySalaryFromMin).max(organizationInvitationListItemsItemSalarySalaryFromMax).multipleOf(organizationInvitationListItemsItemSalarySalaryFromMultipleOf).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(organizationInvitationListItemsItemSalarySalaryToMin).max(organizationInvitationListItemsItemSalarySalaryToMax).multipleOf(organizationInvitationListItemsItemSalarySalaryToMultipleOf).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.'),
|
||||
"response_deadline_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()]),
|
||||
"contact_access": zod.object({
|
||||
"status": zod.enum(['not_granted', 'available', 'closed']).describe('Whether the organization may read the candidate\'s contacts through GetOrganizationInvitationContacts now.\n\n- not_granted: the candidate has not accepted this invitation, so no grant exists.\n- available: a grant from this invitation is active and the current consent and visibility allow the read.\n- closed: a grant from this invitation exists but does not allow the read now: it was revoked (the candidate revoked C4, cancelled the participation, or revoked the publication C2 or hid the profile after the acceptance), or it was created while the visibility already did not allow the read. The organization is not told which. A revoked grant never becomes `available` again; a grant blocked from the start becomes `available` once the candidate\'s visibility allows the read, which only follows the candidate\'s own choice to publish the profile or unhide it for the organization. Since every visibility change after a grant exists revokes the grant, a later toggle is never visible to the organization.'),
|
||||
"fields": zod.array(zod.enum(['full_name', 'email', 'phone', 'telegram']).describe('Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.\n\n- full_name: the full name from the profile.\n- email: the contact email address from the profile.\n- phone: the contact phone number from the profile.\n- telegram: the Telegram username from the profile.\n\nThe value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.')).max(organizationInvitationListItemsItemContactAccessFieldsMax).describe('Kinds of contact that the read returns while `status` is `available`; empty otherwise.')
|
||||
}).describe('Contact access of the organization through this invitation, without any contact value. The values come only from GetOrganizationInvitationContacts.'),
|
||||
"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('Invitation in the organization\'s list: its identity, state, versions, role, salary range, deadline, and contact access. Read the invitation for the full terms and the salary indicator.')).max(organizationInvitationListItemsMax).describe('Invitations of the page.'),
|
||||
"page": zod.object({
|
||||
"has_more": zod.boolean().describe('Whether another page follows this one.'),
|
||||
"next_cursor": zod.string().min(1).max(organizationInvitationListPageNextCursorMax).regex(organizationInvitationListPageNextCursorRegExp).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 invitations of an organization, newest first by creation time.')
|
||||
|
||||
export type OrganizationInvitationList = zod.input<typeof OrganizationInvitationList>;
|
||||
export type OrganizationInvitationListOutput = zod.output<typeof OrganizationInvitationList>;
|
||||
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const organizationInvitationSummaryCandidateHandleMax = 128;
|
||||
|
||||
|
||||
export const organizationInvitationSummaryCandidateHandleRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
|
||||
|
||||
|
||||
export const organizationInvitationSummaryRoleTitleMax = 200;
|
||||
|
||||
|
||||
export const organizationInvitationSummaryRoleTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationSummarySalarySalaryFromMin = 1000;
|
||||
export const organizationInvitationSummarySalarySalaryFromMax = 100000000;
|
||||
export const organizationInvitationSummarySalarySalaryFromMultipleOf = 1000;
|
||||
|
||||
export const organizationInvitationSummarySalarySalaryToMin = 1000;
|
||||
export const organizationInvitationSummarySalarySalaryToMax = 100000000;
|
||||
export const organizationInvitationSummarySalarySalaryToMultipleOf = 1000;
|
||||
|
||||
export const organizationInvitationSummaryContactAccessFieldsMax = 4;
|
||||
|
||||
|
||||
export const OrganizationInvitationSummary = zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the invitation.'),
|
||||
"candidate_handle": zod.string().min(1).max(organizationInvitationSummaryCandidateHandleMax).regex(organizationInvitationSummaryCandidateHandleRegExp).describe('Opaque reference to a candidate as one organization sees it, taken from a search result card of that organization. It is not the candidate\'s account or profile identifier, it never contains an email address or a phone number, and it means nothing to another organization. The server resolves it only for the organization in the path. Clients never parse it. It is shared by the invitations of FR12 and the search results of FR11 (TASK-185), which issue it.'),
|
||||
"need": zod.union([zod.object({
|
||||
"need_id": zod.uuid().describe('Identifier of a need of the organization in the path.'),
|
||||
"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('`requirements_version` of the need that the invitation refers to; it must be a version that the need has had.')
|
||||
}).describe('Need of the same organization that the invitation was built from, with the requirements version used. A direct invitation has no need. The link is informational: the invitation keeps its own terms, which may differ from the need, and a later change of the need never changes them.'),zod.null()]),
|
||||
"state": zod.enum(['draft', 'delivered', 'viewed', 'counter', 'accepted', 'interview_scheduled', 'interviewed', 'negotiation', 'terms_agreed', 'no_deal', 'declined', 'expired', 'withdrawn', 'cancelled_by_candidate']).describe('State of an invitation (PRD FR12). The internal sending step is never visible: a successful send already answers with `delivered`.\n\n- draft: the organization prepares the terms. The candidate does not see the invitation.\n- delivered: the invitation is in the candidate\'s inbox and the response deadline runs.\n- viewed: the candidate opened the terms; ViewMyInvitation records it. The deadline is unchanged.\n- counter: planned; the candidate sent the one counter offer. No MVP operation produces it.\n- accepted: the candidate accepted the current terms version and gave the consent C4; the contact grant exists.\n- interview_scheduled, interviewed, negotiation, terms_agreed, no_deal: planned stages after an acceptance (interview and the sealed final of FR13). No MVP operation produces them.\n- declined: terminal; the candidate declined with a structured reason. No access arises.\n- expired: terminal; a server deadline passed, see `expiry_reason`. No access arises.\n- withdrawn: terminal; the organization withdrew the invitation. A grant that already exists is not revoked by it.\n- cancelled_by_candidate: terminal; the candidate cancelled the participation. The grant of this invitation is revoked.\n\nPlanned states are listed now so that generated clients accept them when their operations arrive. Adding another value is a contract change.'),
|
||||
"expiry_reason": zod.union([zod.enum(['invitation_timeout', 'negotiation_timeout']).describe('Why an invitation expired. Set exactly when the state is `expired`, null otherwise.\n\n- invitation_timeout: the candidate did not answer by `response_deadline_at`. No grant is created.\n- negotiation_timeout: planned; the sealed final of FR13 closed without both bids. No MVP operation produces it.'),zod.null()]),
|
||||
"version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.'),
|
||||
"terms_version": zod.int().min(1).describe('Version of the terms of an invitation. The terms of a version are an immutable snapshot: every committed change of the terms, in the draft or by the one raise of the upper salary bound after sending, creates the next terms version, and a change of anything else keeps it. An acceptance names the terms version it accepts, and the consent C4 and the contact grant record it.'),
|
||||
"role_title": zod.string().min(1).max(organizationInvitationSummaryRoleTitleMax).regex(organizationInvitationSummaryRoleTitleRegExp).describe('Name of the offered role, for example "Middle Go developer in the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"salary": zod.object({
|
||||
"salary_from": zod.int().min(organizationInvitationSummarySalarySalaryFromMin).max(organizationInvitationSummarySalarySalaryFromMax).multipleOf(organizationInvitationSummarySalarySalaryFromMultipleOf).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(organizationInvitationSummarySalarySalaryToMin).max(organizationInvitationSummarySalarySalaryToMax).multipleOf(organizationInvitationSummarySalarySalaryToMultipleOf).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.'),
|
||||
"response_deadline_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()]),
|
||||
"contact_access": zod.object({
|
||||
"status": zod.enum(['not_granted', 'available', 'closed']).describe('Whether the organization may read the candidate\'s contacts through GetOrganizationInvitationContacts now.\n\n- not_granted: the candidate has not accepted this invitation, so no grant exists.\n- available: a grant from this invitation is active and the current consent and visibility allow the read.\n- closed: a grant from this invitation exists but does not allow the read now: it was revoked (the candidate revoked C4, cancelled the participation, or revoked the publication C2 or hid the profile after the acceptance), or it was created while the visibility already did not allow the read. The organization is not told which. A revoked grant never becomes `available` again; a grant blocked from the start becomes `available` once the candidate\'s visibility allows the read, which only follows the candidate\'s own choice to publish the profile or unhide it for the organization. Since every visibility change after a grant exists revokes the grant, a later toggle is never visible to the organization.'),
|
||||
"fields": zod.array(zod.enum(['full_name', 'email', 'phone', 'telegram']).describe('Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.\n\n- full_name: the full name from the profile.\n- email: the contact email address from the profile.\n- phone: the contact phone number from the profile.\n- telegram: the Telegram username from the profile.\n\nThe value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.')).max(organizationInvitationSummaryContactAccessFieldsMax).describe('Kinds of contact that the read returns while `status` is `available`; empty otherwise.')
|
||||
}).describe('Contact access of the organization through this invitation, without any contact value. The values come only from GetOrganizationInvitationContacts.'),
|
||||
"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('Invitation in the organization\'s list: its identity, state, versions, role, salary range, deadline, and contact access. Read the invitation for the full terms and the salary indicator.')
|
||||
|
||||
export type OrganizationInvitationSummary = zod.input<typeof OrganizationInvitationSummary>;
|
||||
export type OrganizationInvitationSummaryOutput = zod.output<typeof OrganizationInvitationSummary>;
|
||||
@@ -0,0 +1,124 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
|
||||
|
||||
export const organizationInvitationUpdateTermsRoleTitleMax = 200;
|
||||
|
||||
|
||||
export const organizationInvitationUpdateTermsRoleTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationUpdateTermsTasksItemMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationUpdateTermsTasksItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationUpdateTermsTasksMax = 20;
|
||||
|
||||
export const organizationInvitationUpdateTermsTeamMax = 1000;
|
||||
|
||||
|
||||
export const organizationInvitationUpdateTermsTeamRegExp = new RegExp('\\S');
|
||||
export const organizationInvitationUpdateTermsTechStackItemMax = 100;
|
||||
|
||||
|
||||
export const organizationInvitationUpdateTermsTechStackItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationUpdateTermsTechStackMax = 30;
|
||||
|
||||
export const organizationInvitationUpdateTermsWorkFormatsMax = 3;
|
||||
|
||||
export const organizationInvitationUpdateTermsLocationOneMax = 100;
|
||||
|
||||
|
||||
export const organizationInvitationUpdateTermsLocationOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationUpdateTermsCommunicationMethodDetailsOneMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationUpdateTermsCommunicationMethodDetailsOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationUpdateTermsSalarySalaryFromMin = 1000;
|
||||
export const organizationInvitationUpdateTermsSalarySalaryFromMax = 100000000;
|
||||
export const organizationInvitationUpdateTermsSalarySalaryFromMultipleOf = 1000;
|
||||
|
||||
export const organizationInvitationUpdateTermsSalarySalaryToMin = 1000;
|
||||
export const organizationInvitationUpdateTermsSalarySalaryToMax = 100000000;
|
||||
export const organizationInvitationUpdateTermsSalarySalaryToMultipleOf = 1000;
|
||||
|
||||
export const organizationInvitationUpdateTermsPackageBonusOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationUpdateTermsPackageBonusOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationUpdateTermsPackageEquipmentOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationUpdateTermsPackageEquipmentOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationUpdateTermsPackageTrainingOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationUpdateTermsPackageTrainingOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const organizationInvitationUpdateTermsPackageHealthInsuranceOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const organizationInvitationUpdateTermsPackageHealthInsuranceOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const OrganizationInvitationUpdate = zod.object({
|
||||
"expected_version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.'),
|
||||
"need": zod.union([zod.object({
|
||||
"need_id": zod.uuid().describe('Identifier of a need of the organization in the path.'),
|
||||
"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('`requirements_version` of the need that the invitation refers to; it must be a version that the need has had.')
|
||||
}).describe('Need of the same organization that the invitation was built from, with the requirements version used. A direct invitation has no need. The link is informational: the invitation keeps its own terms, which may differ from the need, and a later change of the need never changes them.'),zod.null()]).exactOptional(),
|
||||
"response_period_days": zod.union([zod.literal(3),zod.literal(7),zod.literal(14)]).exactOptional().describe('Days the candidate has to answer, chosen by the organization in the draft from the product policy: 3, 7, or 14. The deadline starts at the first delivery and is never reset by an email, a view, or a counter offer.'),
|
||||
"terms": zod.object({
|
||||
"role_title": zod.string().min(1).max(organizationInvitationUpdateTermsRoleTitleMax).regex(organizationInvitationUpdateTermsRoleTitleRegExp).describe('Name of the offered role, for example "Middle Go developer in the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"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.'),
|
||||
"offer_type": zod.enum(['full_time', 'part_time', 'contract', 'internship']).describe('Type of the offer.\n\n- full_time: employment with a full working week.\n- part_time: employment with a part-time working week.\n- contract: a fixed-term or project contract outside employment.\n- internship: an internship.\n\nAdding a value is a contract change.'),
|
||||
"tasks": zod.array(zod.string().min(1).max(organizationInvitationUpdateTermsTasksItemMax).regex(organizationInvitationUpdateTermsTasksItemRegExp).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.')).min(1).max(organizationInvitationUpdateTermsTasksMax).describe('Work tasks of the role in the order given.'),
|
||||
"team": zod.string().min(1).max(organizationInvitationUpdateTermsTeamMax).regex(organizationInvitationUpdateTermsTeamRegExp).describe('Description of the team the candidate would join, such as its size, roles, and way of working. It may contain line breaks and has at least one character that is not white space. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of employees or candidates.'),
|
||||
"tech_stack": zod.array(zod.string().min(1).max(organizationInvitationUpdateTermsTechStackItemMax).regex(organizationInvitationUpdateTermsTechStackItemRegExp).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.')).min(1).max(organizationInvitationUpdateTermsTechStackMax).describe('Technologies of the role. The server compares names without regard to letter case.'),
|
||||
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(organizationInvitationUpdateTermsWorkFormatsMax).describe('Work formats the organization offers; the candidate may choose any of them.'),
|
||||
"location": zod.union([zod.string().min(1).max(organizationInvitationUpdateTermsLocationOneMax).regex(organizationInvitationUpdateTermsLocationOneRegExp).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()]).describe('Place of work for the `office` or `hybrid` format, or null when the only format is `remote`. It is required with either of those formats.'),
|
||||
"communication_method": zod.object({
|
||||
"channel": zod.enum(['email', 'phone', 'telegram', 'video_call']).describe('Channel through which the organization will contact the candidate after an acceptance.\n\n- email: a letter to the email address the candidate disclosed.\n- phone: a call or a text to the phone number the candidate disclosed.\n- telegram: a message to the Telegram username the candidate disclosed.\n- video_call: an invitation to a video call, sent through one of the disclosed contacts.\n\nThe channel describes the organization\'s plan; the candidate decides which contacts to disclose, and the server never requires that the disclosed fields include the channel.'),
|
||||
"details": zod.union([zod.string().min(1).max(organizationInvitationUpdateTermsCommunicationMethodDetailsOneMax).regex(organizationInvitationUpdateTermsCommunicationMethodDetailsOneRegExp).describe('Short note on the communication method, for example "A 30-minute call with the team lead within three working days". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Optional short note, for example the first step or the expected time of the first contact, or null. Plain text without line breaks; it never contains a link or a contact of an employee.')
|
||||
}).describe('How the organization will contact the candidate after an acceptance. It is part of the terms, so the candidate sees it before choosing which contacts to disclose. An invitation without it cannot exist, because the terms require it.'),
|
||||
"salary": zod.object({
|
||||
"salary_from": zod.int().min(organizationInvitationUpdateTermsSalarySalaryFromMin).max(organizationInvitationUpdateTermsSalarySalaryFromMax).multipleOf(organizationInvitationUpdateTermsSalarySalaryFromMultipleOf).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(organizationInvitationUpdateTermsSalarySalaryToMin).max(organizationInvitationUpdateTermsSalarySalaryToMax).multipleOf(organizationInvitationUpdateTermsSalarySalaryToMultipleOf).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.'),
|
||||
"package": zod.object({
|
||||
"bonus": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(organizationInvitationUpdateTermsPackageBonusOneDescriptionMax).regex(organizationInvitationUpdateTermsPackageBonusOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"equipment": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(organizationInvitationUpdateTermsPackageEquipmentOneDescriptionMax).regex(organizationInvitationUpdateTermsPackageEquipmentOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"training": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(organizationInvitationUpdateTermsPackageTrainingOneDescriptionMax).regex(organizationInvitationUpdateTermsPackageTrainingOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"health_insurance": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(organizationInvitationUpdateTermsPackageHealthInsuranceOneDescriptionMax).regex(organizationInvitationUpdateTermsPackageHealthInsuranceOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.')
|
||||
}).describe('Required section of the package (PRD FR12): the bonus, the equipment, the training, and the voluntary health insurance (ДМС). Every field is required and is either provided with a description or explicitly not provided. The work format of the package is the required `work_formats` term, which has no "not provided" variant. Adding a required condition is a breaking change; an optional one is additive.')
|
||||
}).exactOptional().describe('Terms of an invitation: everything the candidate sees before deciding and before any contact is disclosed. The same schema is the request field of a draft and the stored snapshot of a terms version, so a response can be sent back unchanged. Every field is required; a field that may have no value says so with an explicit variant (`location` null for a remote role, a package item `not_provided`). The terms never contain data of the candidate: no contact, no salary minimum, and no indicator derived from it. The server checks the cross-field rules after the schema and answers 400 validation_failed with the pointer of the field: the salary rules of SalaryRange with `/terms/salary/salary_to`, a missing place of work for the `office` or `hybrid` format with `/terms/location`, and a repeated technology in `tech_stack` with the pointer of the later item.')
|
||||
}).describe('Change of a draft over the version the client read. Each field present replaces that field as a whole and an absent field stays unchanged; `terms` is always replaced completely, never merged, and a change of the terms creates the next terms version. `need` sent as null unlinks the need. The candidate cannot change: a draft for another candidate is a new draft. Unknown fields are rejected.')
|
||||
|
||||
export type OrganizationInvitationUpdate = zod.input<typeof OrganizationInvitationUpdate>;
|
||||
export type OrganizationInvitationUpdateOutput = zod.output<typeof OrganizationInvitationUpdate>;
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
|
||||
export const raiseOrganizationInvitationSalaryBodySalaryToOneMin = 1000;
|
||||
export const raiseOrganizationInvitationSalaryBodySalaryToOneMax = 100000000;
|
||||
export const raiseOrganizationInvitationSalaryBodySalaryToOneMultipleOf = 1000;
|
||||
|
||||
|
||||
export const RaiseOrganizationInvitationSalaryBody = zod.object({
|
||||
"expected_version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.'),
|
||||
"salary_to": zod.int().min(raiseOrganizationInvitationSalaryBodySalaryToOneMin).max(raiseOrganizationInvitationSalaryBodySalaryToOneMax).multipleOf(raiseOrganizationInvitationSalaryBodySalaryToOneMultipleOf).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.').describe('New upper bound, above the current one, with a width of the range from 10% to 40% of its midpoint.')
|
||||
}).describe('The one raise of the upper salary bound of a sent invitation (PRD FR13). Only `salary_to` changes; the lower bound, the currency, the period, and the tax basis stay fixed. Unknown fields are rejected, so the request cannot lower the lower bound or change the basis.')
|
||||
|
||||
export type RaiseOrganizationInvitationSalaryBody = zod.input<typeof RaiseOrganizationInvitationSalaryBody>;
|
||||
export type RaiseOrganizationInvitationSalaryBodyOutput = zod.output<typeof RaiseOrganizationInvitationSalaryBody>;
|
||||
+19
@@ -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 raiseOrganizationInvitationSalaryHeadersIdempotencyKeyMax = 255;
|
||||
|
||||
|
||||
export const raiseOrganizationInvitationSalaryHeadersIdempotencyKeyRegExp = new RegExp('^[A-Za-z0-9._:-]+$');
|
||||
|
||||
export const RaiseOrganizationInvitationSalaryHeaders = zod.object({
|
||||
"Idempotency-Key": zod.string().min(1).max(raiseOrganizationInvitationSalaryHeadersIdempotencyKeyMax).regex(raiseOrganizationInvitationSalaryHeadersIdempotencyKeyRegExp)
|
||||
})
|
||||
|
||||
export type RaiseOrganizationInvitationSalaryHeaders = zod.input<typeof RaiseOrganizationInvitationSalaryHeaders>;
|
||||
export type RaiseOrganizationInvitationSalaryHeadersOutput = zod.output<typeof RaiseOrganizationInvitationSalaryHeaders>;
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
|
||||
|
||||
export const SendOrganizationInvitationBody = zod.object({
|
||||
"expected_version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.')
|
||||
}).describe('Command without parameters over the invitation version the client read: send, withdraw, or cancel. Unknown fields are rejected.')
|
||||
|
||||
export type SendOrganizationInvitationBody = zod.input<typeof SendOrganizationInvitationBody>;
|
||||
export type SendOrganizationInvitationBodyOutput = zod.output<typeof SendOrganizationInvitationBody>;
|
||||
@@ -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 sendOrganizationInvitationHeadersIdempotencyKeyMax = 255;
|
||||
|
||||
|
||||
export const sendOrganizationInvitationHeadersIdempotencyKeyRegExp = new RegExp('^[A-Za-z0-9._:-]+$');
|
||||
|
||||
export const SendOrganizationInvitationHeaders = zod.object({
|
||||
"Idempotency-Key": zod.string().min(1).max(sendOrganizationInvitationHeadersIdempotencyKeyMax).regex(sendOrganizationInvitationHeadersIdempotencyKeyRegExp)
|
||||
})
|
||||
|
||||
export type SendOrganizationInvitationHeaders = zod.input<typeof SendOrganizationInvitationHeaders>;
|
||||
export type SendOrganizationInvitationHeadersOutput = zod.output<typeof SendOrganizationInvitationHeaders>;
|
||||
@@ -0,0 +1,124 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsRoleTitleMax = 200;
|
||||
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsRoleTitleRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const updateOrganizationInvitationBodyTermsTasksItemMax = 300;
|
||||
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsTasksItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const updateOrganizationInvitationBodyTermsTasksMax = 20;
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsTeamMax = 1000;
|
||||
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsTeamRegExp = new RegExp('\\S');
|
||||
export const updateOrganizationInvitationBodyTermsTechStackItemMax = 100;
|
||||
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsTechStackItemRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const updateOrganizationInvitationBodyTermsTechStackMax = 30;
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsWorkFormatsMax = 3;
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsLocationOneMax = 100;
|
||||
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsLocationOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const updateOrganizationInvitationBodyTermsCommunicationMethodDetailsOneMax = 300;
|
||||
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsCommunicationMethodDetailsOneRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const updateOrganizationInvitationBodyTermsSalarySalaryFromMin = 1000;
|
||||
export const updateOrganizationInvitationBodyTermsSalarySalaryFromMax = 100000000;
|
||||
export const updateOrganizationInvitationBodyTermsSalarySalaryFromMultipleOf = 1000;
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsSalarySalaryToMin = 1000;
|
||||
export const updateOrganizationInvitationBodyTermsSalarySalaryToMax = 100000000;
|
||||
export const updateOrganizationInvitationBodyTermsSalarySalaryToMultipleOf = 1000;
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsPackageBonusOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsPackageBonusOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const updateOrganizationInvitationBodyTermsPackageEquipmentOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsPackageEquipmentOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const updateOrganizationInvitationBodyTermsPackageTrainingOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsPackageTrainingOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
export const updateOrganizationInvitationBodyTermsPackageHealthInsuranceOneDescriptionMax = 300;
|
||||
|
||||
|
||||
export const updateOrganizationInvitationBodyTermsPackageHealthInsuranceOneDescriptionRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
||||
|
||||
export const UpdateOrganizationInvitationBody = zod.object({
|
||||
"expected_version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.'),
|
||||
"need": zod.union([zod.object({
|
||||
"need_id": zod.uuid().describe('Identifier of a need of the organization in the path.'),
|
||||
"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('`requirements_version` of the need that the invitation refers to; it must be a version that the need has had.')
|
||||
}).describe('Need of the same organization that the invitation was built from, with the requirements version used. A direct invitation has no need. The link is informational: the invitation keeps its own terms, which may differ from the need, and a later change of the need never changes them.'),zod.null()]).exactOptional(),
|
||||
"response_period_days": zod.union([zod.literal(3),zod.literal(7),zod.literal(14)]).exactOptional().describe('Days the candidate has to answer, chosen by the organization in the draft from the product policy: 3, 7, or 14. The deadline starts at the first delivery and is never reset by an email, a view, or a counter offer.'),
|
||||
"terms": zod.object({
|
||||
"role_title": zod.string().min(1).max(updateOrganizationInvitationBodyTermsRoleTitleMax).regex(updateOrganizationInvitationBodyTermsRoleTitleRegExp).describe('Name of the offered role, for example "Middle Go developer in the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),
|
||||
"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.'),
|
||||
"offer_type": zod.enum(['full_time', 'part_time', 'contract', 'internship']).describe('Type of the offer.\n\n- full_time: employment with a full working week.\n- part_time: employment with a part-time working week.\n- contract: a fixed-term or project contract outside employment.\n- internship: an internship.\n\nAdding a value is a contract change.'),
|
||||
"tasks": zod.array(zod.string().min(1).max(updateOrganizationInvitationBodyTermsTasksItemMax).regex(updateOrganizationInvitationBodyTermsTasksItemRegExp).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.')).min(1).max(updateOrganizationInvitationBodyTermsTasksMax).describe('Work tasks of the role in the order given.'),
|
||||
"team": zod.string().min(1).max(updateOrganizationInvitationBodyTermsTeamMax).regex(updateOrganizationInvitationBodyTermsTeamRegExp).describe('Description of the team the candidate would join, such as its size, roles, and way of working. It may contain line breaks and has at least one character that is not white space. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of employees or candidates.'),
|
||||
"tech_stack": zod.array(zod.string().min(1).max(updateOrganizationInvitationBodyTermsTechStackItemMax).regex(updateOrganizationInvitationBodyTermsTechStackItemRegExp).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.')).min(1).max(updateOrganizationInvitationBodyTermsTechStackMax).describe('Technologies of the role. The server compares names without regard to letter case.'),
|
||||
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(updateOrganizationInvitationBodyTermsWorkFormatsMax).describe('Work formats the organization offers; the candidate may choose any of them.'),
|
||||
"location": zod.union([zod.string().min(1).max(updateOrganizationInvitationBodyTermsLocationOneMax).regex(updateOrganizationInvitationBodyTermsLocationOneRegExp).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()]).describe('Place of work for the `office` or `hybrid` format, or null when the only format is `remote`. It is required with either of those formats.'),
|
||||
"communication_method": zod.object({
|
||||
"channel": zod.enum(['email', 'phone', 'telegram', 'video_call']).describe('Channel through which the organization will contact the candidate after an acceptance.\n\n- email: a letter to the email address the candidate disclosed.\n- phone: a call or a text to the phone number the candidate disclosed.\n- telegram: a message to the Telegram username the candidate disclosed.\n- video_call: an invitation to a video call, sent through one of the disclosed contacts.\n\nThe channel describes the organization\'s plan; the candidate decides which contacts to disclose, and the server never requires that the disclosed fields include the channel.'),
|
||||
"details": zod.union([zod.string().min(1).max(updateOrganizationInvitationBodyTermsCommunicationMethodDetailsOneMax).regex(updateOrganizationInvitationBodyTermsCommunicationMethodDetailsOneRegExp).describe('Short note on the communication method, for example "A 30-minute call with the team lead within three working days". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Optional short note, for example the first step or the expected time of the first contact, or null. Plain text without line breaks; it never contains a link or a contact of an employee.')
|
||||
}).describe('How the organization will contact the candidate after an acceptance. It is part of the terms, so the candidate sees it before choosing which contacts to disclose. An invitation without it cannot exist, because the terms require it.'),
|
||||
"salary": zod.object({
|
||||
"salary_from": zod.int().min(updateOrganizationInvitationBodyTermsSalarySalaryFromMin).max(updateOrganizationInvitationBodyTermsSalarySalaryFromMax).multipleOf(updateOrganizationInvitationBodyTermsSalarySalaryFromMultipleOf).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(updateOrganizationInvitationBodyTermsSalarySalaryToMin).max(updateOrganizationInvitationBodyTermsSalarySalaryToMax).multipleOf(updateOrganizationInvitationBodyTermsSalarySalaryToMultipleOf).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.'),
|
||||
"package": zod.object({
|
||||
"bonus": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(updateOrganizationInvitationBodyTermsPackageBonusOneDescriptionMax).regex(updateOrganizationInvitationBodyTermsPackageBonusOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"equipment": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(updateOrganizationInvitationBodyTermsPackageEquipmentOneDescriptionMax).regex(updateOrganizationInvitationBodyTermsPackageEquipmentOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"training": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(updateOrganizationInvitationBodyTermsPackageTrainingOneDescriptionMax).regex(updateOrganizationInvitationBodyTermsPackageTrainingOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.'),
|
||||
"health_insurance": zod.union([zod.object({
|
||||
"status": zod.enum(['provided']),
|
||||
"description": zod.string().min(1).max(updateOrganizationInvitationBodyTermsPackageHealthInsuranceOneDescriptionMax).regex(updateOrganizationInvitationBodyTermsPackageHealthInsuranceOneDescriptionRegExp).describe('Short description of a condition, for example "Quarterly bonus up to 20% of the salary". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.')
|
||||
}).describe('The condition is part of the offer, with its description.'),zod.object({
|
||||
"status": zod.enum(['not_provided'])
|
||||
}).describe('The organization states explicitly that the offer does not include the condition ("Не предусмотрено" in the interface). It has no description.')]).describe('One required condition of the package, selected by `status`: `provided` with a description, or `not_provided` without one. Not providing a condition is an explicit choice: the field is required in the package, so an absent field fails validation instead of meaning "not provided": it answers 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a description answers `required` with the pointer of the description, and a `not_provided` item with a description answers `invalid` with the pointer of the item. ogen selects the variant by the value of `status`.')
|
||||
}).describe('Required section of the package (PRD FR12): the bonus, the equipment, the training, and the voluntary health insurance (ДМС). Every field is required and is either provided with a description or explicitly not provided. The work format of the package is the required `work_formats` term, which has no "not provided" variant. Adding a required condition is a breaking change; an optional one is additive.')
|
||||
}).exactOptional().describe('Terms of an invitation: everything the candidate sees before deciding and before any contact is disclosed. The same schema is the request field of a draft and the stored snapshot of a terms version, so a response can be sent back unchanged. Every field is required; a field that may have no value says so with an explicit variant (`location` null for a remote role, a package item `not_provided`). The terms never contain data of the candidate: no contact, no salary minimum, and no indicator derived from it. The server checks the cross-field rules after the schema and answers 400 validation_failed with the pointer of the field: the salary rules of SalaryRange with `/terms/salary/salary_to`, a missing place of work for the `office` or `hybrid` format with `/terms/location`, and a repeated technology in `tech_stack` with the pointer of the later item.')
|
||||
}).describe('Change of a draft over the version the client read. Each field present replaces that field as a whole and an absent field stays unchanged; `terms` is always replaced completely, never merged, and a change of the terms creates the next terms version. `need` sent as null unlinks the need. The candidate cannot change: a draft for another candidate is a new draft. Unknown fields are rejected.')
|
||||
|
||||
export type UpdateOrganizationInvitationBody = zod.input<typeof UpdateOrganizationInvitationBody>;
|
||||
export type UpdateOrganizationInvitationBodyOutput = zod.output<typeof UpdateOrganizationInvitationBody>;
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
|
||||
|
||||
export const WithdrawOrganizationInvitationBody = zod.object({
|
||||
"expected_version": zod.int().min(1).describe('Version of an invitation. Creation makes version 1, and every committed change advances it by exactly one: a change of the draft, a send, the first view, an answer, a salary raise, a withdrawal, a cancellation, and an expiry made by the server. Every command carries the version the client read as `expected_version`; a stale value answers 412 version_conflict and changes nothing.')
|
||||
}).describe('Command without parameters over the invitation version the client read: send, withdraw, or cancel. Unknown fields are rejected.')
|
||||
|
||||
export type WithdrawOrganizationInvitationBody = zod.input<typeof WithdrawOrganizationInvitationBody>;
|
||||
export type WithdrawOrganizationInvitationBodyOutput = zod.output<typeof WithdrawOrganizationInvitationBody>;
|
||||
+19
@@ -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 withdrawOrganizationInvitationHeadersIdempotencyKeyMax = 255;
|
||||
|
||||
|
||||
export const withdrawOrganizationInvitationHeadersIdempotencyKeyRegExp = new RegExp('^[A-Za-z0-9._:-]+$');
|
||||
|
||||
export const WithdrawOrganizationInvitationHeaders = zod.object({
|
||||
"Idempotency-Key": zod.string().min(1).max(withdrawOrganizationInvitationHeadersIdempotencyKeyMax).regex(withdrawOrganizationInvitationHeadersIdempotencyKeyRegExp)
|
||||
})
|
||||
|
||||
export type WithdrawOrganizationInvitationHeaders = zod.input<typeof WithdrawOrganizationInvitationHeaders>;
|
||||
export type WithdrawOrganizationInvitationHeadersOutput = zod.output<typeof WithdrawOrganizationInvitationHeaders>;
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
export * from './createOrganizationNeedBody.zod';
|
||||
export * from './createOrganizationNeedHeaders.zod';
|
||||
export * from './currencyCode.zod';
|
||||
export * from './listOrganizationNeedsParams.zod';
|
||||
export * from './need.zod';
|
||||
export * from './needCategoryRecommendation.zod';
|
||||
@@ -23,7 +22,6 @@ 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';
|
||||
@@ -45,20 +43,13 @@ 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 './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';
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -31,7 +31,7 @@ export const CreateMySupportCaseBody = zod.union([zod.object({
|
||||
"type": zod.enum(['support']),
|
||||
"description": zod.string().min(1).max(createMySupportCaseBodyOneDescriptionMax).regex(createMySupportCaseBodyOneDescriptionRegExp).describe('What the user asks or reports, as the user wrote it. It must contain at least one character that is not whitespace, so an empty or blank text fails validation with the pointer `/description`; it may contain line breaks. The pattern `\\S` uses the ECMAScript white space set in both generated validators: ogen converts it to that set for Go, so a text made only of spaces such as U+00A0, U+2003, or U+3000 fails in the server schema and in Zod alike. ECMAScript white space omits U+0085 (NEL), which Go `unicode.IsSpace` includes; the server therefore also rejects a text whose every character is `unicode.IsSpace` or U+FEFF, with the same 400 and the pointer `/description`, while generated Zod accepts a text of NEL. Plain text; clients show it as text, never as HTML. The server stores it as written, shows it only to the author and to the staff of the queue, and never writes it to logs or notifications. Users should not put passwords or other people\'s contact data into it. Generated Zod validators count UTF-16 code units, so the server stays authoritative for the length.'),
|
||||
"object": zod.object({
|
||||
"type": zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are not in the contract yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'),
|
||||
"type": zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are in the contract (TASK-196) but not implemented yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'),
|
||||
"id": zod.uuid().describe('Identifier of the object.')
|
||||
}).exactOptional().describe('Typed reference to an object that the case is about. The server checks on creation that the caller may see the object; an unknown object and an object of someone else both answer 404 not_found, so a reference never reveals whether another person\'s object exists. The case keeps only the type and the identifier, never a copy of the object.'),
|
||||
"assessment_target": zod.object({
|
||||
|
||||
@@ -34,7 +34,7 @@ export const SupportCase = zod.object({
|
||||
"status": zod.enum(['submitted', 'in_review', 'waiting_for_user', 'waiting_expert', 'resolved', 'closed']).describe('Processing status of a case. Only the server changes it; no request field sets it. Adding a value is a contract change: generated clients reject an unknown value.\n\n- submitted: the case was accepted and waits in its queue.\n- in_review: support or a moderator works on it.\n- waiting_for_user: support asked the author for more detail. Not set yet: it starts with the planned operation that lets the author reply, and until then no case has this status.\n- waiting_expert: a grade appeal, an anti-cheat appeal, or a manual assessment waits for a subject expert. The server sets it in the same transaction as the creation of such a case. The case stays here until a person decides; it is never resolved by the passing of time.\n- resolved: terminal; a decision was made and `decision` holds its outcome and public reason.\n- closed: terminal; the case ended without a decision on the merits, for example as a duplicate of another case. The last history event says why.'),
|
||||
"description": zod.string().min(1).max(supportCaseDescriptionMax).regex(supportCaseDescriptionRegExp).describe('What the user asks or reports, as the user wrote it. It must contain at least one character that is not whitespace, so an empty or blank text fails validation with the pointer `/description`; it may contain line breaks. The pattern `\\S` uses the ECMAScript white space set in both generated validators: ogen converts it to that set for Go, so a text made only of spaces such as U+00A0, U+2003, or U+3000 fails in the server schema and in Zod alike. ECMAScript white space omits U+0085 (NEL), which Go `unicode.IsSpace` includes; the server therefore also rejects a text whose every character is `unicode.IsSpace` or U+FEFF, with the same 400 and the pointer `/description`, while generated Zod accepts a text of NEL. Plain text; clients show it as text, never as HTML. The server stores it as written, shows it only to the author and to the staff of the queue, and never writes it to logs or notifications. Users should not put passwords or other people\'s contact data into it. Generated Zod validators count UTF-16 code units, so the server stays authoritative for the length.'),
|
||||
"object": zod.union([zod.object({
|
||||
"type": zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are not in the contract yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'),
|
||||
"type": zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are in the contract (TASK-196) but not implemented yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'),
|
||||
"id": zod.uuid().describe('Identifier of the object.')
|
||||
}).describe('Typed reference to an object that the case is about. The server checks on creation that the caller may see the object; an unknown object and an object of someone else both answer 404 not_found, so a reference never reveals whether another person\'s object exists. The case keeps only the type and the identifier, never a copy of the object.'),zod.null()]).describe('Object that the case is about, as sent on creation, or null when the case has none.'),
|
||||
"assessment_target": zod.union([zod.object({
|
||||
|
||||
@@ -31,7 +31,7 @@ export const SupportCaseCreate = zod.union([zod.object({
|
||||
"type": zod.enum(['support']),
|
||||
"description": zod.string().min(1).max(supportCaseCreateOneDescriptionMax).regex(supportCaseCreateOneDescriptionRegExp).describe('What the user asks or reports, as the user wrote it. It must contain at least one character that is not whitespace, so an empty or blank text fails validation with the pointer `/description`; it may contain line breaks. The pattern `\\S` uses the ECMAScript white space set in both generated validators: ogen converts it to that set for Go, so a text made only of spaces such as U+00A0, U+2003, or U+3000 fails in the server schema and in Zod alike. ECMAScript white space omits U+0085 (NEL), which Go `unicode.IsSpace` includes; the server therefore also rejects a text whose every character is `unicode.IsSpace` or U+FEFF, with the same 400 and the pointer `/description`, while generated Zod accepts a text of NEL. Plain text; clients show it as text, never as HTML. The server stores it as written, shows it only to the author and to the staff of the queue, and never writes it to logs or notifications. Users should not put passwords or other people\'s contact data into it. Generated Zod validators count UTF-16 code units, so the server stays authoritative for the length.'),
|
||||
"object": zod.object({
|
||||
"type": zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are not in the contract yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'),
|
||||
"type": zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are in the contract (TASK-196) but not implemented yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'),
|
||||
"id": zod.uuid().describe('Identifier of the object.')
|
||||
}).exactOptional().describe('Typed reference to an object that the case is about. The server checks on creation that the caller may see the object; an unknown object and an object of someone else both answer 404 not_found, so a reference never reveals whether another person\'s object exists. The case keeps only the type and the identifier, never a copy of the object.'),
|
||||
"assessment_target": zod.object({
|
||||
|
||||
@@ -15,7 +15,7 @@ export const SupportCaseCreateSupport = zod.object({
|
||||
"type": zod.enum(['support']),
|
||||
"description": zod.string().min(1).max(supportCaseCreateSupportDescriptionMax).regex(supportCaseCreateSupportDescriptionRegExp).describe('What the user asks or reports, as the user wrote it. It must contain at least one character that is not whitespace, so an empty or blank text fails validation with the pointer `/description`; it may contain line breaks. The pattern `\\S` uses the ECMAScript white space set in both generated validators: ogen converts it to that set for Go, so a text made only of spaces such as U+00A0, U+2003, or U+3000 fails in the server schema and in Zod alike. ECMAScript white space omits U+0085 (NEL), which Go `unicode.IsSpace` includes; the server therefore also rejects a text whose every character is `unicode.IsSpace` or U+FEFF, with the same 400 and the pointer `/description`, while generated Zod accepts a text of NEL. Plain text; clients show it as text, never as HTML. The server stores it as written, shows it only to the author and to the staff of the queue, and never writes it to logs or notifications. Users should not put passwords or other people\'s contact data into it. Generated Zod validators count UTF-16 code units, so the server stays authoritative for the length.'),
|
||||
"object": zod.object({
|
||||
"type": zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are not in the contract yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'),
|
||||
"type": zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are in the contract (TASK-196) but not implemented yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'),
|
||||
"id": zod.uuid().describe('Identifier of the object.')
|
||||
}).exactOptional().describe('Typed reference to an object that the case is about. The server checks on creation that the caller may see the object; an unknown object and an object of someone else both answer 404 not_found, so a reference never reveals whether another person\'s object exists. The case keeps only the type and the identifier, never a copy of the object.'),
|
||||
"assessment_target": zod.object({
|
||||
|
||||
@@ -28,7 +28,7 @@ export const SupportCaseList = zod.object({
|
||||
"type": zod.enum(['support', 'complaint', 'grade_appeal', 'anticheat_appeal', 'manual_assessment']).describe('Kind of the case. It fixes the allowed object reference, the type-specific fields, the response target, and the queue that handles the case.\n\n- support: a question or a problem, for example an assessment that is not available or a failed sandbox run. Candidate and employer accounts.\n- complaint: a complaint about an organization or an offer, including a breach of the salary terms or a disclosure of personal data (PRD FR18). Candidate accounts.\n- grade_appeal: an appeal of a category the caller received: the result of one own assessment attempt, or the outcome of one own resolved manual assessment case. An expert reviews it, and the original result stays in the history. Candidate accounts.\n- anticheat_appeal: an appeal of an anti-cheat review decision on one own assessment attempt. Candidate accounts.\n- manual_assessment: a request for a manual assessment of a category by a subject expert with the same rubric, the alternative to automated categorization (consent C3). Candidate accounts.'),
|
||||
"status": zod.enum(['submitted', 'in_review', 'waiting_for_user', 'waiting_expert', 'resolved', 'closed']).describe('Processing status of a case. Only the server changes it; no request field sets it. Adding a value is a contract change: generated clients reject an unknown value.\n\n- submitted: the case was accepted and waits in its queue.\n- in_review: support or a moderator works on it.\n- waiting_for_user: support asked the author for more detail. Not set yet: it starts with the planned operation that lets the author reply, and until then no case has this status.\n- waiting_expert: a grade appeal, an anti-cheat appeal, or a manual assessment waits for a subject expert. The server sets it in the same transaction as the creation of such a case. The case stays here until a person decides; it is never resolved by the passing of time.\n- resolved: terminal; a decision was made and `decision` holds its outcome and public reason.\n- closed: terminal; the case ended without a decision on the merits, for example as a duplicate of another case. The last history event says why.'),
|
||||
"object": zod.union([zod.object({
|
||||
"type": zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are not in the contract yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'),
|
||||
"type": zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are in the contract (TASK-196) but not implemented yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'),
|
||||
"id": zod.uuid().describe('Identifier of the object.')
|
||||
}).describe('Typed reference to an object that the case is about. The server checks on creation that the caller may see the object; an unknown object and an object of someone else both answer 404 not_found, so a reference never reveals whether another person\'s object exists. The case keeps only the type and the identifier, never a copy of the object.'),zod.null()]).describe('Object that the case is about, or null.'),
|
||||
"assessment_target": zod.union([zod.object({
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const SupportCaseObjectReference = zod.object({
|
||||
"type": zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are not in the contract yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'),
|
||||
"type": zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are in the contract (TASK-196) but not implemented yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'),
|
||||
"id": zod.uuid().describe('Identifier of the object.')
|
||||
}).describe('Typed reference to an object that the case is about. The server checks on creation that the caller may see the object; an unknown object and an object of someone else both answer 404 not_found, so a reference never reveals whether another person\'s object exists. The case keeps only the type and the identifier, never a copy of the object.')
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const SupportCaseObjectType = zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are not in the contract yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.')
|
||||
export const SupportCaseObjectType = zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are in the contract (TASK-196) but not implemented yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.')
|
||||
|
||||
export type SupportCaseObjectType = zod.input<typeof SupportCaseObjectType>;
|
||||
export type SupportCaseObjectTypeOutput = zod.output<typeof SupportCaseObjectType>;
|
||||
@@ -21,7 +21,7 @@ export const SupportCaseSummary = zod.object({
|
||||
"type": zod.enum(['support', 'complaint', 'grade_appeal', 'anticheat_appeal', 'manual_assessment']).describe('Kind of the case. It fixes the allowed object reference, the type-specific fields, the response target, and the queue that handles the case.\n\n- support: a question or a problem, for example an assessment that is not available or a failed sandbox run. Candidate and employer accounts.\n- complaint: a complaint about an organization or an offer, including a breach of the salary terms or a disclosure of personal data (PRD FR18). Candidate accounts.\n- grade_appeal: an appeal of a category the caller received: the result of one own assessment attempt, or the outcome of one own resolved manual assessment case. An expert reviews it, and the original result stays in the history. Candidate accounts.\n- anticheat_appeal: an appeal of an anti-cheat review decision on one own assessment attempt. Candidate accounts.\n- manual_assessment: a request for a manual assessment of a category by a subject expert with the same rubric, the alternative to automated categorization (consent C3). Candidate accounts.'),
|
||||
"status": zod.enum(['submitted', 'in_review', 'waiting_for_user', 'waiting_expert', 'resolved', 'closed']).describe('Processing status of a case. Only the server changes it; no request field sets it. Adding a value is a contract change: generated clients reject an unknown value.\n\n- submitted: the case was accepted and waits in its queue.\n- in_review: support or a moderator works on it.\n- waiting_for_user: support asked the author for more detail. Not set yet: it starts with the planned operation that lets the author reply, and until then no case has this status.\n- waiting_expert: a grade appeal, an anti-cheat appeal, or a manual assessment waits for a subject expert. The server sets it in the same transaction as the creation of such a case. The case stays here until a person decides; it is never resolved by the passing of time.\n- resolved: terminal; a decision was made and `decision` holds its outcome and public reason.\n- closed: terminal; the case ended without a decision on the merits, for example as a duplicate of another case. The last history event says why.'),
|
||||
"object": zod.union([zod.object({
|
||||
"type": zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are not in the contract yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'),
|
||||
"type": zod.enum(['assessment_attempt', 'organization', 'invitation', 'support_case']).describe('Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with TASK-272.\n\n- assessment_attempt: an assessment attempt of the caller.\n- organization: an organization that the caller can see.\n- invitation: an invitation addressed to the caller. Invitations are in the contract (TASK-196) but not implemented yet; until they are, every invitation reference answers 404 not_found.\n- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.'),
|
||||
"id": zod.uuid().describe('Identifier of the object.')
|
||||
}).describe('Typed reference to an object that the case is about. The server checks on creation that the caller may see the object; an unknown object and an object of someone else both answer 404 not_found, so a reference never reveals whether another person\'s object exists. The case keeps only the type and the identifier, never a copy of the object.'),zod.null()]).describe('Object that the case is about, or null.'),
|
||||
"assessment_target": zod.union([zod.object({
|
||||
|
||||
Reference in new issue
Block a user