feat(evidence): project skill evidence from confirmed assessments
This commit is contained in:
1 parent
4761508f13
commit
c2a8d17195
94 files changed
+10077
-151
No files matched your search
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* 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 {
|
||||
EvidenceFactList,
|
||||
OrganizationEvidence
|
||||
} from '../../schemas';
|
||||
|
||||
|
||||
export const getGetOrganizationCandidateEvidenceResponseMock = (overrideResponse: Partial<Extract<OrganizationEvidence, object>> = {}): OrganizationEvidence => ({items: Array.from({ length: faker.number.int({min: 1, max: 9}) }, (_, i) => i + 1).map(() => ({skill: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa','go','postgresql','kafka','docker'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), trust: faker.number.int({min: 0, max: 3}), basis: faker.helpers.arrayElement(['synthetic_demo'] as const), calibration_status: faker.helpers.arrayElement(['uncalibrated'] as const), observed_year: faker.number.int({min: 2000, max: 9999})})), ...overrideResponse})
|
||||
|
||||
export const getListMyEvidenceResponseMock = (overrideResponse: Partial<Extract<EvidenceFactList, object>> = {}): EvidenceFactList => ({items: Array.from({ length: faker.number.int({min: 1, max: 100}) }, (_, i) => i + 1).map(() => ({id: faker.string.uuid(), kind: faker.helpers.arrayElement(['claim','measurement'] as const), source: {type: faker.helpers.arrayElement(['assessment_result'] as const), event_id: faker.string.uuid(), result_id: faker.string.uuid()}, skills: faker.helpers.arrayElements(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa','go','postgresql','kafka','docker'] as const), result: {grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), basis: faker.helpers.arrayElement(['synthetic_demo'] as const), calibration_status: faker.helpers.arrayElement(['uncalibrated'] as const)}, attribution: faker.helpers.arrayElement(['personal','team_role','team_unattributed'] as const), trust: faker.number.int({min: 0, max: 3}), occurred_at: faker.date.past().toISOString().slice(0, 19) + 'Z', visibility: faker.helpers.arrayElement(['visible','hidden'] as const)})), page: {has_more: faker.datatype.boolean(), next_cursor: faker.helpers.arrayElement([fakeFromPattern("^[A-Za-z0-9_-]+$", {minLength: 1, maxLength: 512}), null])}, ...overrideResponse})
|
||||
|
||||
|
||||
export const getGetOrganizationCandidateEvidenceMockHandler = (overrideResponse?: OrganizationEvidence | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<OrganizationEvidence> | OrganizationEvidence), options?: RequestHandlerOptions) => {
|
||||
return http.get('*/api/v1/organizations/:orgId/candidate-cards/:candidateHandle/evidence', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getGetOrganizationCandidateEvidenceResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
|
||||
export const getListMyEvidenceMockHandler = (overrideResponse?: EvidenceFactList | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<EvidenceFactList> | EvidenceFactList), options?: RequestHandlerOptions) => {
|
||||
return http.get('*/api/v1/me/evidence', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {
|
||||
|
||||
|
||||
return HttpResponse.json(overrideResponse !== undefined
|
||||
? (typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse)
|
||||
: getListMyEvidenceResponseMock(),
|
||||
{ status: 200
|
||||
})
|
||||
}, options)
|
||||
}
|
||||
export const getEvidenceMock = () => [
|
||||
getGetOrganizationCandidateEvidenceMockHandler(),
|
||||
getListMyEvidenceMockHandler()
|
||||
]
|
||||
@@ -0,0 +1,282 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import {
|
||||
useQuery
|
||||
} from '@tanstack/react-query';
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseQueryOptions,
|
||||
UseQueryResult
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
import type {
|
||||
EvidenceFactList,
|
||||
ListMyEvidenceParams,
|
||||
OrganizationEvidence,
|
||||
Problem
|
||||
} from '../../schemas';
|
||||
|
||||
import { apiRequest } from '../../client';
|
||||
import type { ErrorType } from '../../client';
|
||||
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
|
||||
|
||||
const withQueryKey = <T extends object, K>(query: T, queryKey: K): T & { queryKey: K } => {
|
||||
const result = { queryKey } as T & { queryKey: K };
|
||||
for (const key of Object.keys(query)) {
|
||||
// The explicit queryKey always wins, matching the previous
|
||||
// `{ ...query, queryKey }` spread where it was set last.
|
||||
if (key === 'queryKey') continue;
|
||||
Object.defineProperty(result, key, {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
get: () => (query as Record<string, unknown>)[key],
|
||||
});
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
export const getGetOrganizationCandidateEvidenceUrl = (orgId: string,
|
||||
candidateHandle: string,) => {
|
||||
|
||||
|
||||
|
||||
|
||||
return `/api/v1/organizations/${orgId}/candidate-cards/${candidateHandle}/evidence`
|
||||
}
|
||||
|
||||
/**
|
||||
* Requires the session cookie of an employer account with an active membership in `org_id`. The organization and membership come from the current server-side session and path, never from cached search data.
|
||||
*
|
||||
* `candidate_handle` is the organization-scoped opaque alias issued by the current anonymous-card projection. The server runs the same checks as the card read on every request: active membership, effective C2 publication, the candidate's hiding of this organization, and the minimum cohort. In addition the card must publish the `categories` field and show at least one category after the cohort rules, because the evidence explains those categories and discloses nothing beyond them. An unknown handle, a handle of another organization, a closed or revoked publication, a profile hidden from this organization, a profile suppressed by the minimum cohort, and a card without categories all answer the same 404 not_found. Closing C2 or hiding the organization blocks this read immediately, and a cached response proves nothing.
|
||||
*
|
||||
* The response lists, for each category of the card, the one visible fact that supports its confirmed grade: the earliest assessment that passed exactly that grade, so a lower grade or a retake adds nothing. A fact the candidate hid is absent. Each fact carries only the skill, the passed grade, the trust level, the year of the assessment, and the basis and calibration of the method (`synthetic_demo`, `uncalibrated`), which are the same for every candidate and say that the fact is a demonstration, not a validated measurement. It carries no identifier of the fact, event, result, or candidate, no month or exact time, and never an answer, item, score, failed attempt, review band, or anti-cheat signal. An express training run and a failed attempt create no fact. The answer has no key that joins it to a person, but it is not unlinkable: with the other values of the card it can narrow a small pool of candidates.
|
||||
*
|
||||
* Reading the evidence is a view of the candidate card: it consumes the organization's current card-view quota with the same distinct-card rule and is recorded in the access history with the `categories` field. When the quota is exhausted the operation answers 429 with Retry-After. The response is `Cache-Control: no-store`.
|
||||
*
|
||||
* A missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate account answers 403 forbidden; an unknown organization or account without an active membership answers 404 not_found. An `org_id` that is not a UUID or a malformed candidate handle answers 400 validation_failed.
|
||||
* @summary Read the permitted skill evidence of one currently visible candidate card.
|
||||
*/
|
||||
export const getOrganizationCandidateEvidence = async (orgId: string,
|
||||
candidateHandle: string, options?: Parameters<typeof apiRequest>[1]): Promise<OrganizationEvidence> => {
|
||||
|
||||
return apiRequest<OrganizationEvidence>(getGetOrganizationCandidateEvidenceUrl(orgId,candidateHandle),
|
||||
{
|
||||
...options,
|
||||
method: 'GET'
|
||||
|
||||
|
||||
}
|
||||
);}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const getGetOrganizationCandidateEvidenceQueryKey = (orgId: string,
|
||||
candidateHandle: string,) => {
|
||||
return [
|
||||
`/api/v1/organizations/${orgId}/candidate-cards/${candidateHandle}/evidence`
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getGetOrganizationCandidateEvidenceQueryOptions = <TData = Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>, TError = ErrorType<Problem>>(orgId: string,
|
||||
candidateHandle: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetOrganizationCandidateEvidenceQueryKey(orgId,candidateHandle);
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>> = ({ signal }) => getOrganizationCandidateEvidence(orgId,candidateHandle, { signal, ...requestOptions });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, enabled: orgId !== null && orgId !== undefined && candidateHandle !== null && candidateHandle !== undefined, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type GetOrganizationCandidateEvidenceQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>>
|
||||
export type GetOrganizationCandidateEvidenceQueryError = ErrorType<Problem>
|
||||
|
||||
|
||||
export function useGetOrganizationCandidateEvidence<TData = Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>, TError = ErrorType<Problem>>(
|
||||
orgId: string,
|
||||
candidateHandle: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetOrganizationCandidateEvidence<TData = Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>, TError = ErrorType<Problem>>(
|
||||
orgId: string,
|
||||
candidateHandle: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useGetOrganizationCandidateEvidence<TData = Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>, TError = ErrorType<Problem>>(
|
||||
orgId: string,
|
||||
candidateHandle: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary Read the permitted skill evidence of one currently visible candidate card.
|
||||
*/
|
||||
|
||||
export function useGetOrganizationCandidateEvidence<TData = Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>, TError = ErrorType<Problem>>(
|
||||
orgId: string,
|
||||
candidateHandle: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganizationCandidateEvidence>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getGetOrganizationCandidateEvidenceQueryOptions(orgId,candidateHandle,options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return withQueryKey(query, queryOptions.queryKey);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const getListMyEvidenceUrl = (params?: ListMyEvidenceParams,) => {
|
||||
const normalizedParams = new URLSearchParams();
|
||||
|
||||
Object.entries(params || {}).forEach(([key, value]) => {
|
||||
|
||||
if (value !== undefined) {
|
||||
normalizedParams.append(key, value === null ? 'null' : String(value))
|
||||
}
|
||||
});
|
||||
|
||||
const stringifiedParams = normalizedParams.toString();
|
||||
|
||||
return stringifiedParams.length > 0 ? `/api/v1/me/evidence?${stringifiedParams}` : `/api/v1/me/evidence`
|
||||
}
|
||||
|
||||
/**
|
||||
* Requires the session cookie of a candidate account. The candidate comes from the session, so the response holds only the caller's own facts. Returns a page, newest event first with the fact identifier as the tie-breaker, with cursor pagination. The response is `Cache-Control: no-store`.
|
||||
*
|
||||
* A fact is derived from the immutable result of a confirmed real assessment (root or corrective), in the same transaction that stores the result. Each fact names its source (the event and the result, which the candidate can open at `GetMyAssessmentResult`), the skills of the event, the grade that was passed with its basis and calibration, the attribution, the date, the visibility, and the trust level. An online assessment without a reliable confirmation of the identity has trust 1. One source event is one fact: its skills are tags of that fact, so several tags never make several facts.
|
||||
*
|
||||
* The list never carries raw answers, items, scores, failed attempts, or anti-cheat data. A failed attempt, a result without a reviewed category source, and an express training run (`demo_express`) create no fact, so reading the list before and after an express run shows no new fact. The list includes facts the candidate hid, with `visibility` `hidden`.
|
||||
*
|
||||
* A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account, or a candidate with an unverified email, answers 403 forbidden. A malformed `limit` or `cursor`, or a cursor of another candidate, answers 400 validation_failed.
|
||||
* @summary List the skill evidence of the current candidate.
|
||||
*/
|
||||
export const listMyEvidence = async (params?: ListMyEvidenceParams, options?: Parameters<typeof apiRequest>[1]): Promise<EvidenceFactList> => {
|
||||
|
||||
return apiRequest<EvidenceFactList>(getListMyEvidenceUrl(params),
|
||||
{
|
||||
...options,
|
||||
method: 'GET'
|
||||
|
||||
|
||||
}
|
||||
);}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const getListMyEvidenceQueryKey = (params?: ListMyEvidenceParams,) => {
|
||||
return [
|
||||
`/api/v1/me/evidence`, ...(params ? [params] : [])
|
||||
] as const;
|
||||
}
|
||||
|
||||
|
||||
export const getListMyEvidenceQueryOptions = <TData = Awaited<ReturnType<typeof listMyEvidence>>, TError = ErrorType<Problem>>(params?: ListMyEvidenceParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMyEvidence>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
) => {
|
||||
|
||||
const {query: queryOptions, request: requestOptions} = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getListMyEvidenceQueryKey(params);
|
||||
|
||||
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof listMyEvidence>>> = ({ signal }) => listMyEvidence(params, { signal, ...requestOptions });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof listMyEvidence>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
}
|
||||
|
||||
export type ListMyEvidenceQueryResult = NonNullable<Awaited<ReturnType<typeof listMyEvidence>>>
|
||||
export type ListMyEvidenceQueryError = ErrorType<Problem>
|
||||
|
||||
|
||||
export function useListMyEvidence<TData = Awaited<ReturnType<typeof listMyEvidence>>, TError = ErrorType<Problem>>(
|
||||
params: undefined | ListMyEvidenceParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMyEvidence>>, TError, TData>> & Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listMyEvidence>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listMyEvidence>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useListMyEvidence<TData = Awaited<ReturnType<typeof listMyEvidence>>, TError = ErrorType<Problem>>(
|
||||
params?: ListMyEvidenceParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMyEvidence>>, TError, TData>> & Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listMyEvidence>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listMyEvidence>>
|
||||
> , 'initialData'
|
||||
>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
export function useListMyEvidence<TData = Awaited<ReturnType<typeof listMyEvidence>>, TError = ErrorType<Problem>>(
|
||||
params?: ListMyEvidenceParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMyEvidence>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }
|
||||
/**
|
||||
* @summary List the skill evidence of the current candidate.
|
||||
*/
|
||||
|
||||
export function useListMyEvidence<TData = Awaited<ReturnType<typeof listMyEvidence>>, TError = ErrorType<Problem>>(
|
||||
params?: ListMyEvidenceParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof listMyEvidence>>, TError, TData>>, request?: SecondParameter<typeof apiRequest>}
|
||||
, queryClient?: QueryClient
|
||||
): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
|
||||
|
||||
const queryOptions = getListMyEvidenceQueryOptions(params,options)
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return withQueryKey(query, queryOptions.queryKey);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ export { getAssessmentMock } from './assessment/assessment.msw'
|
||||
export { getCandidateMock } from './candidate/candidate.msw'
|
||||
export { getCatalogMock } from './catalog/catalog.msw'
|
||||
export { getConsentMock } from './consent/consent.msw'
|
||||
export { getEvidenceMock } from './evidence/evidence.msw'
|
||||
export { getHealthMock } from './health/health.msw'
|
||||
export { getIdentityMock } from './identity/identity.msw'
|
||||
export { getInvitationMock } from './invitation/invitation.msw'
|
||||
|
||||
@@ -2,6 +2,7 @@ export * from './assessment/assessment';
|
||||
export * from './candidate/candidate';
|
||||
export * from './catalog/catalog';
|
||||
export * from './consent/consent';
|
||||
export * from './evidence/evidence';
|
||||
export * from './health/health';
|
||||
export * from './identity/identity';
|
||||
export * from './invitation/invitation';
|
||||
|
||||
@@ -26,6 +26,7 @@ import type {
|
||||
CardPreview,
|
||||
HiddenOrganization,
|
||||
HiddenOrganizationList,
|
||||
OrganizationEvidence,
|
||||
PrivacyEventList,
|
||||
PrivacyOrganization,
|
||||
PrivacySettings,
|
||||
@@ -42,7 +43,9 @@ export const getSetMyPublicationResponseMock = (overrideResponse: Partial<Extrac
|
||||
|
||||
export const getGetMyCardPreviewResponseAnonymousCardContentMock = (overrideResponse: Partial<AnonymousCardContent> = {}): AnonymousCardContent => ({...{pseudonym: fakeFromPattern("^cv1_[A-Za-z0-9_-]{43}$", {minLength: 47, maxLength: 47}), categories: faker.helpers.arrayElement([Array.from({ length: faker.number.int({min: 1, max: 9}) }, (_, i) => i + 1).map(() => ({specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), strength: faker.helpers.arrayElement(['standard','strong'] as const)})), null]), stack: faker.helpers.arrayElement([faker.helpers.arrayElements(['go','postgresql','kafka','docker'] as const), null]), self_assessment: faker.helpers.arrayElement([Array.from({ length: faker.number.int({min: 1, max: 9}) }, (_, i) => i + 1).map(() => ({specialization: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa'] as const), confirmation_status: faker.helpers.arrayElement(['confirmed','unconfirmed'] as const), declared_grade: faker.helpers.arrayElement([faker.helpers.arrayElement(['intern','junior','middle','senior'] as const),null,])})), null]), experience_band: faker.helpers.arrayElement([faker.helpers.arrayElement(['0_1','1_3','3_6','6_plus','0_3','3_plus'] as const),null,]), work_formats: faker.helpers.arrayElement([faker.helpers.arrayElements(['remote','office','hybrid'] as const), null]), salary_compatibility: faker.helpers.arrayElement([faker.helpers.arrayElement(['compatible','not_compatible'] as const),null,])}, ...overrideResponse});
|
||||
|
||||
export const getGetMyCardPreviewResponseMock = (overrideResponse: Partial<Extract<CardPreview, object>> = {}): CardPreview => ({state: faker.helpers.arrayElement(['closed','published'] as const), fields: faker.helpers.arrayElements(['categories','salary_compatibility','self_assessment','stack','experience','soft_skills','location','relocation','work_formats'] as const), card: faker.helpers.arrayElement([{...getGetMyCardPreviewResponseAnonymousCardContentMock()},null,]), generated_at: faker.date.past().toISOString().slice(0, 19) + 'Z', ...overrideResponse})
|
||||
export const getGetMyCardPreviewResponseOrganizationEvidenceMock = (overrideResponse: Partial<OrganizationEvidence> = {}): OrganizationEvidence => ({...{items: Array.from({ length: faker.number.int({min: 1, max: 9}) }, (_, i) => i + 1).map(() => ({skill: faker.helpers.arrayElement(['backend','frontend','mobile','network_engineer','devops_sre','data_analyst','ds_ml','information_security','qa','go','postgresql','kafka','docker'] as const), grade: faker.helpers.arrayElement(['intern','junior','middle','senior'] as const), trust: faker.number.int({min: 0, max: 3}), basis: faker.helpers.arrayElement(['synthetic_demo'] as const), calibration_status: faker.helpers.arrayElement(['uncalibrated'] as const), observed_year: faker.number.int({min: 2000, max: 9999})}))}, ...overrideResponse});
|
||||
|
||||
export const getGetMyCardPreviewResponseMock = (overrideResponse: Partial<Extract<CardPreview, object>> = {}): CardPreview => ({state: faker.helpers.arrayElement(['closed','published'] as const), fields: faker.helpers.arrayElements(['categories','salary_compatibility','self_assessment','stack','experience','soft_skills','location','relocation','work_formats'] as const), card: faker.helpers.arrayElement([{...getGetMyCardPreviewResponseAnonymousCardContentMock()},null,]), evidence: faker.helpers.arrayElement([{...getGetMyCardPreviewResponseOrganizationEvidenceMock()},null,]), generated_at: faker.date.past().toISOString().slice(0, 19) + 'Z', ...overrideResponse})
|
||||
|
||||
export const getSetMySearchStatusResponseMock = (overrideResponse: Partial<Extract<SearchStatus, object>> = {}): SearchStatus => ({value: faker.helpers.arrayElement(['looking','not_looking'] as const), lapsed: faker.datatype.boolean(), confirmed_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), lapses_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z',null,]), version: faker.number.int({min: 0}), ...overrideResponse})
|
||||
|
||||
|
||||
@@ -397,6 +397,8 @@ export const useSetMyPublication = <TError = ErrorType<Problem>,
|
||||
*
|
||||
* `card` is the closed `AnonymousCardContent` projection. It reaches no private profile or contact schema and contains no name, email, phone, Telegram name, employer, salary figure, account identifier, or profile identifier. Unpublished or unknown values are null. Only allowed canonical skills and generalized experience are exposed; arbitrary profile text and imported excerpts never appear. `categories` contains only confirmed assessment results. Self-assessed grades and work formats appear only through their separate explicit publication choices, and self-assessment never becomes a confirmed category. Salary compatibility is nullable and contains no salary amount.
|
||||
*
|
||||
* `evidence` shows what an organization would read in the evidence section of the card (`GetOrganizationCandidateEvidence`): for each category of the card, the one assessment fact that supports its confirmed grade, with its skill, the passed grade, the trust level, the year, and the basis and calibration (`synthetic_demo`, `uncalibrated`). It is null while `card` is null, and an empty list when the card shows no category or no visible fact supports one. The preview applies no organization or cohort, so an organization can still receive less.
|
||||
*
|
||||
* A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden.
|
||||
* @summary Preview the anonymous card that organizations would read.
|
||||
*/
|
||||
|
||||
@@ -260,14 +260,33 @@ describe("generated AnonymousCardContent", () => {
|
||||
state: "closed",
|
||||
fields: [],
|
||||
card: null,
|
||||
evidence: null,
|
||||
generated_at: "2026-10-06T09:30:00Z",
|
||||
};
|
||||
|
||||
expect(CardPreview.parse(closed)).toEqual(closed);
|
||||
expect(
|
||||
CardPreview.parse({ ...closed, state: "published", fields: ["stack"], card }),
|
||||
CardPreview.parse({
|
||||
...closed,
|
||||
state: "published",
|
||||
fields: ["stack"],
|
||||
card,
|
||||
evidence: {
|
||||
items: [
|
||||
{
|
||||
skill: "backend",
|
||||
grade: "junior",
|
||||
trust: 1,
|
||||
basis: "synthetic_demo",
|
||||
calibration_status: "uncalibrated",
|
||||
observed_year: 2026,
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
).toMatchObject({
|
||||
card: { stack: ["postgresql", "kafka"] },
|
||||
evidence: { items: [{ skill: "backend", trust: 1 }] },
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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 EvidenceAttribution = zod.enum(['personal', 'team_role', 'team_unattributed']).describe('Whose contribution the fact is.\n\n- personal: the candidate\'s own result. Every assessment fact is personal.\n- team_role: a team result with a confirmed role of the candidate.\n- team_unattributed: a team result without a confirmed role; it is not a personal skill.\n\nOnly `personal` is produced today.')
|
||||
|
||||
export type EvidenceAttribution = zod.input<typeof EvidenceAttribution>;
|
||||
export type EvidenceAttributionOutput = zod.output<typeof EvidenceAttribution>;
|
||||
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const evidenceFactSkillsMax = 13;
|
||||
|
||||
export const evidenceFactTrustMin = 0;
|
||||
export const evidenceFactTrustMax = 3;
|
||||
|
||||
|
||||
export const EvidenceFact = zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the fact.'),
|
||||
"kind": zod.enum(['claim', 'measurement']).describe('Whether a fact is a statement or an observation.\n\n- claim: something the candidate stated that nothing confirmed separately. Its trust is 0.\n- measurement: a result that a system observed, such as a confirmed assessment. Its trust is 1 to 3.\n\nAssessments produce measurements only. A claim never becomes a measurement by repetition, and the two kinds are stored apart.'),
|
||||
"source": zod.object({
|
||||
"type": zod.enum(['assessment_result']).describe('Where the fact comes from.\n\n- assessment_result: a real (root or corrective) assessment result of this platform that confirmed a grade. An express training run (`demo_express`), a failed attempt, and a result without a reviewed category source are never a source.\n\nAdding a value is a contract change.'),
|
||||
"event_id": zod.uuid().describe('Identifier of the source event. One event is one fact, however many skills it is tagged with.'),
|
||||
"result_id": zod.uuid().describe('Identifier of the immutable result that produced the fact.')
|
||||
}).describe('Where the fact comes from. For an assessment the event is the attempt and the result is the immutable result of that attempt, which the candidate reads at `GetMyAssessmentResult`; the two identifiers are equal because a result is keyed by its attempt.'),
|
||||
"skills": zod.array(zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa', 'go', 'postgresql', 'kafka', 'docker']).describe('A skill tag from a closed set - the specialization codes of the catalog and the technology codes of the anonymous card. An assessment tags its fact with the specialization of the category.')).min(1).max(evidenceFactSkillsMax).describe('Skill tags of the event in ascending order.'),
|
||||
"result": zod.object({
|
||||
"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.'),
|
||||
"basis": zod.enum(['synthetic_demo']).describe('What the measurement rests on.\n\n- synthetic_demo: a demonstration category from a synthetic reviewed bank. It shows the mechanics and is not a validated measurement.'),
|
||||
"calibration_status": zod.enum(['uncalibrated']).describe('Calibration of the method behind the result.\n\n- uncalibrated: the thresholds are initial values that no measurement has validated.')
|
||||
}).describe('What the fact says: the grade that was passed and how reliable the method is. It carries no score, answer, item, failure, or anti-cheat data.'),
|
||||
"attribution": zod.enum(['personal', 'team_role', 'team_unattributed']).describe('Whose contribution the fact is.\n\n- personal: the candidate\'s own result. Every assessment fact is personal.\n- team_role: a team result with a confirmed role of the candidate.\n- team_unattributed: a team result without a confirmed role; it is not a personal skill.\n\nOnly `personal` is produced today.'),
|
||||
"trust": zod.int().min(evidenceFactTrustMin).max(evidenceFactTrustMax).describe('Strength of the confirmation.\n\n- 0: stated by the person, not confirmed separately.\n- 1: an observable online result without a reliable confirmation of the identity or the authorship. Every assessment fact has this level today, because the assessment is unproctored and the identity is not confirmed.\n- 2: a result tied to a confirmed identity or confirmed by an independent party.\n- 3: an in-person check with a matching confirmation.\n\nA repeated statement, a sign-in, or a repeated tag of the same event never raises the level.'),
|
||||
"occurred_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.'),
|
||||
"visibility": zod.enum(['visible', 'hidden']).describe('Whether the fact may take part in what an organization reads.\n\n- visible: the fact is eligible for the organization projection. It does not publish the fact: the projection also needs the published card with the `categories` field and an active C2.\n- hidden: the candidate hid the fact. No organization reads it. Hiding never edits or deletes the confirmed result.')
|
||||
}).describe('One independent fact of the current candidate. `occurred_at` is when the source event ended; for an assessment it is the time of the decision. A fact is one source event; the skills of that event are tags of the fact, so a second tag never makes a second fact. Hidden facts are listed here with their visibility, because the candidate owns them.')
|
||||
|
||||
export type EvidenceFact = zod.input<typeof EvidenceFact>;
|
||||
export type EvidenceFactOutput = zod.output<typeof EvidenceFact>;
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const evidenceFactListItemsItemSkillsMax = 13;
|
||||
|
||||
export const evidenceFactListItemsItemTrustMin = 0;
|
||||
export const evidenceFactListItemsItemTrustMax = 3;
|
||||
|
||||
export const evidenceFactListItemsMax = 100;
|
||||
|
||||
export const evidenceFactListPageNextCursorMax = 512;
|
||||
|
||||
|
||||
export const evidenceFactListPageNextCursorRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
|
||||
export const EvidenceFactList = zod.object({
|
||||
"items": zod.array(zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the fact.'),
|
||||
"kind": zod.enum(['claim', 'measurement']).describe('Whether a fact is a statement or an observation.\n\n- claim: something the candidate stated that nothing confirmed separately. Its trust is 0.\n- measurement: a result that a system observed, such as a confirmed assessment. Its trust is 1 to 3.\n\nAssessments produce measurements only. A claim never becomes a measurement by repetition, and the two kinds are stored apart.'),
|
||||
"source": zod.object({
|
||||
"type": zod.enum(['assessment_result']).describe('Where the fact comes from.\n\n- assessment_result: a real (root or corrective) assessment result of this platform that confirmed a grade. An express training run (`demo_express`), a failed attempt, and a result without a reviewed category source are never a source.\n\nAdding a value is a contract change.'),
|
||||
"event_id": zod.uuid().describe('Identifier of the source event. One event is one fact, however many skills it is tagged with.'),
|
||||
"result_id": zod.uuid().describe('Identifier of the immutable result that produced the fact.')
|
||||
}).describe('Where the fact comes from. For an assessment the event is the attempt and the result is the immutable result of that attempt, which the candidate reads at `GetMyAssessmentResult`; the two identifiers are equal because a result is keyed by its attempt.'),
|
||||
"skills": zod.array(zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa', 'go', 'postgresql', 'kafka', 'docker']).describe('A skill tag from a closed set - the specialization codes of the catalog and the technology codes of the anonymous card. An assessment tags its fact with the specialization of the category.')).min(1).max(evidenceFactListItemsItemSkillsMax).describe('Skill tags of the event in ascending order.'),
|
||||
"result": zod.object({
|
||||
"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.'),
|
||||
"basis": zod.enum(['synthetic_demo']).describe('What the measurement rests on.\n\n- synthetic_demo: a demonstration category from a synthetic reviewed bank. It shows the mechanics and is not a validated measurement.'),
|
||||
"calibration_status": zod.enum(['uncalibrated']).describe('Calibration of the method behind the result.\n\n- uncalibrated: the thresholds are initial values that no measurement has validated.')
|
||||
}).describe('What the fact says: the grade that was passed and how reliable the method is. It carries no score, answer, item, failure, or anti-cheat data.'),
|
||||
"attribution": zod.enum(['personal', 'team_role', 'team_unattributed']).describe('Whose contribution the fact is.\n\n- personal: the candidate\'s own result. Every assessment fact is personal.\n- team_role: a team result with a confirmed role of the candidate.\n- team_unattributed: a team result without a confirmed role; it is not a personal skill.\n\nOnly `personal` is produced today.'),
|
||||
"trust": zod.int().min(evidenceFactListItemsItemTrustMin).max(evidenceFactListItemsItemTrustMax).describe('Strength of the confirmation.\n\n- 0: stated by the person, not confirmed separately.\n- 1: an observable online result without a reliable confirmation of the identity or the authorship. Every assessment fact has this level today, because the assessment is unproctored and the identity is not confirmed.\n- 2: a result tied to a confirmed identity or confirmed by an independent party.\n- 3: an in-person check with a matching confirmation.\n\nA repeated statement, a sign-in, or a repeated tag of the same event never raises the level.'),
|
||||
"occurred_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.'),
|
||||
"visibility": zod.enum(['visible', 'hidden']).describe('Whether the fact may take part in what an organization reads.\n\n- visible: the fact is eligible for the organization projection. It does not publish the fact: the projection also needs the published card with the `categories` field and an active C2.\n- hidden: the candidate hid the fact. No organization reads it. Hiding never edits or deletes the confirmed result.')
|
||||
}).describe('One independent fact of the current candidate. `occurred_at` is when the source event ended; for an assessment it is the time of the decision. A fact is one source event; the skills of that event are tags of the fact, so a second tag never makes a second fact. Hidden facts are listed here with their visibility, because the candidate owns them.')).max(evidenceFactListItemsMax).describe('Facts of the page.'),
|
||||
"page": zod.object({
|
||||
"has_more": zod.boolean().describe('Whether another page follows this one.'),
|
||||
"next_cursor": zod.string().min(1).max(evidenceFactListPageNextCursorMax).regex(evidenceFactListPageNextCursorRegExp).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 facts of the current candidate, newest event first.')
|
||||
|
||||
export type EvidenceFactList = zod.input<typeof EvidenceFactList>;
|
||||
export type EvidenceFactListOutput = zod.output<typeof EvidenceFactList>;
|
||||
@@ -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 EvidenceKind = zod.enum(['claim', 'measurement']).describe('Whether a fact is a statement or an observation.\n\n- claim: something the candidate stated that nothing confirmed separately. Its trust is 0.\n- measurement: a result that a system observed, such as a confirmed assessment. Its trust is 1 to 3.\n\nAssessments produce measurements only. A claim never becomes a measurement by repetition, and the two kinds are stored apart.')
|
||||
|
||||
export type EvidenceKind = zod.input<typeof EvidenceKind>;
|
||||
export type EvidenceKindOutput = zod.output<typeof EvidenceKind>;
|
||||
@@ -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 EvidenceResult = zod.object({
|
||||
"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.'),
|
||||
"basis": zod.enum(['synthetic_demo']).describe('What the measurement rests on.\n\n- synthetic_demo: a demonstration category from a synthetic reviewed bank. It shows the mechanics and is not a validated measurement.'),
|
||||
"calibration_status": zod.enum(['uncalibrated']).describe('Calibration of the method behind the result.\n\n- uncalibrated: the thresholds are initial values that no measurement has validated.')
|
||||
}).describe('What the fact says: the grade that was passed and how reliable the method is. It carries no score, answer, item, failure, or anti-cheat data.')
|
||||
|
||||
export type EvidenceResult = zod.input<typeof EvidenceResult>;
|
||||
export type EvidenceResultOutput = zod.output<typeof EvidenceResult>;
|
||||
@@ -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 EvidenceSource = zod.object({
|
||||
"type": zod.enum(['assessment_result']).describe('Where the fact comes from.\n\n- assessment_result: a real (root or corrective) assessment result of this platform that confirmed a grade. An express training run (`demo_express`), a failed attempt, and a result without a reviewed category source are never a source.\n\nAdding a value is a contract change.'),
|
||||
"event_id": zod.uuid().describe('Identifier of the source event. One event is one fact, however many skills it is tagged with.'),
|
||||
"result_id": zod.uuid().describe('Identifier of the immutable result that produced the fact.')
|
||||
}).describe('Where the fact comes from. For an assessment the event is the attempt and the result is the immutable result of that attempt, which the candidate reads at `GetMyAssessmentResult`; the two identifiers are equal because a result is keyed by its attempt.')
|
||||
|
||||
export type EvidenceSource = zod.input<typeof EvidenceSource>;
|
||||
export type EvidenceSourceOutput = zod.output<typeof EvidenceSource>;
|
||||
@@ -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 EvidenceSourceType = zod.enum(['assessment_result']).describe('Where the fact comes from.\n\n- assessment_result: a real (root or corrective) assessment result of this platform that confirmed a grade. An express training run (`demo_express`), a failed attempt, and a result without a reviewed category source are never a source.\n\nAdding a value is a contract change.')
|
||||
|
||||
export type EvidenceSourceType = zod.input<typeof EvidenceSourceType>;
|
||||
export type EvidenceSourceTypeOutput = zod.output<typeof EvidenceSourceType>;
|
||||
@@ -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 EvidenceVisibility = zod.enum(['visible', 'hidden']).describe('Whether the fact may take part in what an organization reads.\n\n- visible: the fact is eligible for the organization projection. It does not publish the fact: the projection also needs the published card with the `categories` field and an active C2.\n- hidden: the candidate hid the fact. No organization reads it. Hiding never edits or deletes the confirmed result.')
|
||||
|
||||
export type EvidenceVisibility = zod.input<typeof EvidenceVisibility>;
|
||||
export type EvidenceVisibilityOutput = zod.output<typeof EvidenceVisibility>;
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export * from './evidenceAttribution.zod';
|
||||
export * from './evidenceFact.zod';
|
||||
export * from './evidenceFactList.zod';
|
||||
export * from './evidenceKind.zod';
|
||||
export * from './evidenceResult.zod';
|
||||
export * from './evidenceSource.zod';
|
||||
export * from './evidenceSourceType.zod';
|
||||
export * from './evidenceVisibility.zod';
|
||||
export * from './listMyEvidenceParams.zod';
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const listMyEvidenceParamsLimitDefault = 20;
|
||||
export const listMyEvidenceParamsLimitMax = 100;
|
||||
|
||||
export const listMyEvidenceParamsCursorMax = 512;
|
||||
|
||||
|
||||
export const listMyEvidenceParamsCursorRegExp = new RegExp('^[A-Za-z0-9_-]+$');
|
||||
|
||||
export const ListMyEvidenceParams = zod.object({
|
||||
"limit": zod.int().min(1).max(listMyEvidenceParamsLimitMax).default(listMyEvidenceParamsLimitDefault),
|
||||
"cursor": zod.string().min(1).max(listMyEvidenceParamsCursorMax).regex(listMyEvidenceParamsCursorRegExp).exactOptional()
|
||||
})
|
||||
|
||||
export type ListMyEvidenceParams = zod.input<typeof ListMyEvidenceParams>;
|
||||
export type ListMyEvidenceParamsOutput = zod.output<typeof ListMyEvidenceParams>;
|
||||
@@ -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 EvidenceBasis = zod.enum(['synthetic_demo']).describe('What the measurement rests on.\n\n- synthetic_demo: a demonstration category from a synthetic reviewed bank. It shows the mechanics and is not a validated measurement.')
|
||||
|
||||
export type EvidenceBasis = zod.input<typeof EvidenceBasis>;
|
||||
export type EvidenceBasisOutput = zod.output<typeof EvidenceBasis>;
|
||||
@@ -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 EvidenceCalibrationStatus = zod.enum(['uncalibrated']).describe('Calibration of the method behind the result.\n\n- uncalibrated: the thresholds are initial values that no measurement has validated.')
|
||||
|
||||
export type EvidenceCalibrationStatus = zod.input<typeof EvidenceCalibrationStatus>;
|
||||
export type EvidenceCalibrationStatusOutput = zod.output<typeof EvidenceCalibrationStatus>;
|
||||
@@ -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 EvidenceSkillCode = zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa', 'go', 'postgresql', 'kafka', 'docker']).describe('A skill tag from a closed set - the specialization codes of the catalog and the technology codes of the anonymous card. An assessment tags its fact with the specialization of the category.')
|
||||
|
||||
export type EvidenceSkillCode = zod.input<typeof EvidenceSkillCode>;
|
||||
export type EvidenceSkillCodeOutput = zod.output<typeof EvidenceSkillCode>;
|
||||
@@ -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 EvidenceTrustLevelMin = 0;
|
||||
export const EvidenceTrustLevelMax = 3;
|
||||
|
||||
|
||||
export const EvidenceTrustLevel = zod.int().min(EvidenceTrustLevelMin).max(EvidenceTrustLevelMax).describe('Strength of the confirmation.\n\n- 0: stated by the person, not confirmed separately.\n- 1: an observable online result without a reliable confirmation of the identity or the authorship. Every assessment fact has this level today, because the assessment is unproctored and the identity is not confirmed.\n- 2: a result tied to a confirmed identity or confirmed by an independent party.\n- 3: an in-person check with a matching confirmation.\n\nA repeated statement, a sign-in, or a repeated tag of the same event never raises the level.')
|
||||
|
||||
export type EvidenceTrustLevel = zod.input<typeof EvidenceTrustLevel>;
|
||||
export type EvidenceTrustLevelOutput = zod.output<typeof EvidenceTrustLevel>;
|
||||
@@ -17,12 +17,18 @@ export * from './contactPhoneNumber.zod';
|
||||
export * from './contactTelegramUsername.zod';
|
||||
export * from './currencyCode.zod';
|
||||
export * from './emailAddress.zod';
|
||||
export * from './evidenceBasis.zod';
|
||||
export * from './evidenceCalibrationStatus.zod';
|
||||
export * from './evidenceSkillCode.zod';
|
||||
export * from './evidenceTrustLevel.zod';
|
||||
export * from './gradeCode.zod';
|
||||
export * from './invitationTermsVersion.zod';
|
||||
export * from './needLocationName.zod';
|
||||
export * from './needTaskText.zod';
|
||||
export * from './needVersion.zod';
|
||||
export * from './needVersionLabel.zod';
|
||||
export * from './organizationEvidence.zod';
|
||||
export * from './organizationEvidenceFact.zod';
|
||||
export * from './pageInfo.zod';
|
||||
export * from './problem.zod';
|
||||
export * from './problemCode.zod';
|
||||
@@ -41,6 +47,7 @@ export * from './assessment';
|
||||
export * from './candidate';
|
||||
export * from './catalog';
|
||||
export * from './consent';
|
||||
export * from './evidence';
|
||||
export * from './health';
|
||||
export * from './identity';
|
||||
export * from './invitation';
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const organizationEvidenceItemsItemTrustMin = 0;
|
||||
export const organizationEvidenceItemsItemTrustMax = 3;
|
||||
|
||||
export const organizationEvidenceItemsItemObservedYearMin = 2000;
|
||||
export const organizationEvidenceItemsItemObservedYearMax = 9999;
|
||||
|
||||
export const organizationEvidenceItemsMax = 9;
|
||||
|
||||
|
||||
export const OrganizationEvidence = zod.object({
|
||||
"items": zod.array(zod.object({
|
||||
"skill": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa', 'go', 'postgresql', 'kafka', 'docker']).describe('A skill tag from a closed set - the specialization codes of the catalog and the technology codes of the anonymous card. An assessment tags its fact with the specialization of the category.'),
|
||||
"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.'),
|
||||
"trust": zod.int().min(organizationEvidenceItemsItemTrustMin).max(organizationEvidenceItemsItemTrustMax).describe('Strength of the confirmation.\n\n- 0: stated by the person, not confirmed separately.\n- 1: an observable online result without a reliable confirmation of the identity or the authorship. Every assessment fact has this level today, because the assessment is unproctored and the identity is not confirmed.\n- 2: a result tied to a confirmed identity or confirmed by an independent party.\n- 3: an in-person check with a matching confirmation.\n\nA repeated statement, a sign-in, or a repeated tag of the same event never raises the level.'),
|
||||
"basis": zod.enum(['synthetic_demo']).describe('What the measurement rests on.\n\n- synthetic_demo: a demonstration category from a synthetic reviewed bank. It shows the mechanics and is not a validated measurement.'),
|
||||
"calibration_status": zod.enum(['uncalibrated']).describe('Calibration of the method behind the result.\n\n- uncalibrated: the thresholds are initial values that no measurement has validated.'),
|
||||
"observed_year": zod.int().min(organizationEvidenceItemsItemObservedYearMin).max(organizationEvidenceItemsItemObservedYearMax).describe('Year (UTC) when the assessment ended. The month, day, and time stay with the candidate.')
|
||||
}).describe('The one assessment fact that supports a category of the card as an organization reads it: the earliest visible measurement that passed exactly the confirmed grade of that category. A lower grade, a retake, the other tags of the event, the source, the basis, the exact time, and every identifier stay with the candidate. The fact carries no identifier of the fact, the event, the result, or the candidate, so it cannot be joined to a person by a key. It is not unlinkable: the skill, the grade, the trust level, and the year, together with the other values of the card, can narrow a small pool of candidates, and the minimum cohort of the card does not cover the year. `basis` and `calibration_status` are the same for every candidate: they say that the fact comes from a synthetic demonstration and is not calibrated, so a demonstration is never read as a validated measurement. The fact never carries an answer, score, item, failure, signal, or review band.')).max(organizationEvidenceItemsMax).describe('Permitted facts, one for each supported category.')
|
||||
}).describe('The permitted evidence of one candidate card, ordered by skill: at most one fact for each category of the card (at most nine). The list is empty when no visible fact supports a category of the card.')
|
||||
|
||||
export type OrganizationEvidence = zod.input<typeof OrganizationEvidence>;
|
||||
export type OrganizationEvidenceOutput = zod.output<typeof OrganizationEvidence>;
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Generated by orval 🍺
|
||||
* Do not edit manually.
|
||||
* Lincodex API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const organizationEvidenceFactTrustMin = 0;
|
||||
export const organizationEvidenceFactTrustMax = 3;
|
||||
|
||||
export const organizationEvidenceFactObservedYearMin = 2000;
|
||||
export const organizationEvidenceFactObservedYearMax = 9999;
|
||||
|
||||
|
||||
export const OrganizationEvidenceFact = zod.object({
|
||||
"skill": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa', 'go', 'postgresql', 'kafka', 'docker']).describe('A skill tag from a closed set - the specialization codes of the catalog and the technology codes of the anonymous card. An assessment tags its fact with the specialization of the category.'),
|
||||
"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.'),
|
||||
"trust": zod.int().min(organizationEvidenceFactTrustMin).max(organizationEvidenceFactTrustMax).describe('Strength of the confirmation.\n\n- 0: stated by the person, not confirmed separately.\n- 1: an observable online result without a reliable confirmation of the identity or the authorship. Every assessment fact has this level today, because the assessment is unproctored and the identity is not confirmed.\n- 2: a result tied to a confirmed identity or confirmed by an independent party.\n- 3: an in-person check with a matching confirmation.\n\nA repeated statement, a sign-in, or a repeated tag of the same event never raises the level.'),
|
||||
"basis": zod.enum(['synthetic_demo']).describe('What the measurement rests on.\n\n- synthetic_demo: a demonstration category from a synthetic reviewed bank. It shows the mechanics and is not a validated measurement.'),
|
||||
"calibration_status": zod.enum(['uncalibrated']).describe('Calibration of the method behind the result.\n\n- uncalibrated: the thresholds are initial values that no measurement has validated.'),
|
||||
"observed_year": zod.int().min(organizationEvidenceFactObservedYearMin).max(organizationEvidenceFactObservedYearMax).describe('Year (UTC) when the assessment ended. The month, day, and time stay with the candidate.')
|
||||
}).describe('The one assessment fact that supports a category of the card as an organization reads it: the earliest visible measurement that passed exactly the confirmed grade of that category. A lower grade, a retake, the other tags of the event, the source, the basis, the exact time, and every identifier stay with the candidate. The fact carries no identifier of the fact, the event, the result, or the candidate, so it cannot be joined to a person by a key. It is not unlinkable: the skill, the grade, the trust level, and the year, together with the other values of the card, can narrow a small pool of candidates, and the minimum cohort of the card does not cover the year. `basis` and `calibration_status` are the same for every candidate: they say that the fact comes from a synthetic demonstration and is not calibrated, so a demonstration is never read as a validated measurement. The fact never carries an answer, score, item, failure, signal, or review band.')
|
||||
|
||||
export type OrganizationEvidenceFact = zod.input<typeof OrganizationEvidenceFact>;
|
||||
export type OrganizationEvidenceFactOutput = zod.output<typeof OrganizationEvidenceFact>;
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
import * as zod from 'zod';
|
||||
|
||||
export const CardField = zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')
|
||||
export const CardField = zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result. With it an organization receives the confirmed category and, with each category of the card, one supporting assessment fact: its skill, the passed grade, the trust level, the year of the assessment, and the basis and calibration that mark a synthetic, uncalibrated demonstration (`GetOrganizationCandidateEvidence`). The candidate sees the same on `GetMyCardPreview`.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')
|
||||
|
||||
export type CardField = zod.input<typeof CardField>;
|
||||
export type CardFieldOutput = zod.output<typeof CardField>;
|
||||
@@ -10,7 +10,7 @@ export const CardFieldSetMin = 0;
|
||||
export const CardFieldSetMax = 9;
|
||||
|
||||
|
||||
export const CardFieldSet = zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(CardFieldSetMin).max(CardFieldSetMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.')
|
||||
export const CardFieldSet = zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result. With it an organization receives the confirmed category and, with each category of the card, one supporting assessment fact: its skill, the passed grade, the trust level, the year of the assessment, and the basis and calibration that mark a synthetic, uncalibrated demonstration (`GetOrganizationCandidateEvidence`). The candidate sees the same on `GetMyCardPreview`.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(CardFieldSetMin).max(CardFieldSetMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.')
|
||||
|
||||
export type CardFieldSet = zod.input<typeof CardFieldSet>;
|
||||
export type CardFieldSetOutput = zod.output<typeof CardFieldSet>;
|
||||
@@ -22,10 +22,18 @@ export const cardPreviewCardOneSelfAssessmentMax = 9;
|
||||
|
||||
export const cardPreviewCardOneWorkFormatsMax = 3;
|
||||
|
||||
export const cardPreviewEvidenceOneItemsItemTrustMin = 0;
|
||||
export const cardPreviewEvidenceOneItemsItemTrustMax = 3;
|
||||
|
||||
export const cardPreviewEvidenceOneItemsItemObservedYearMin = 2000;
|
||||
export const cardPreviewEvidenceOneItemsItemObservedYearMax = 9999;
|
||||
|
||||
export const cardPreviewEvidenceOneItemsMax = 9;
|
||||
|
||||
|
||||
export const CardPreview = zod.object({
|
||||
"state": zod.enum(['closed', 'published']).describe('Whether the candidate card can be read by organizations at all. It is computed from the stored publication and the consent ledger: a profile is closed unless the candidate published it and the C2 consent that backs the publication is still unrevoked.\n\n- closed: no organization reads the card. This is the state of every new profile and of a profile whose publication was closed or whose C2 was revoked.\n- published: organizations may read exactly the fields in `fields`, except for the organizations the candidate hid.'),
|
||||
"fields": zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(cardPreviewFieldsMin).max(cardPreviewFieldsMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.'),
|
||||
"fields": zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result. With it an organization receives the confirmed category and, with each category of the card, one supporting assessment fact: its skill, the passed grade, the trust level, the year of the assessment, and the basis and calibration that mark a synthetic, uncalibrated demonstration (`GetOrganizationCandidateEvidence`). The candidate sees the same on `GetMyCardPreview`.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(cardPreviewFieldsMin).max(cardPreviewFieldsMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.'),
|
||||
"card": zod.union([zod.object({
|
||||
"pseudonym": zod.string().min(cardPreviewCardOnePseudonymMin).max(cardPreviewCardOnePseudonymMax).regex(cardPreviewCardOnePseudonymRegExp).describe('Stable opaque alias scoped to the reading organization. It is not an account or profile identifier and changes across organizations.'),
|
||||
"categories": zod.array(zod.object({
|
||||
@@ -43,8 +51,18 @@ export const CardPreview = zod.object({
|
||||
"work_formats": zod.array(zod.enum(['remote', 'office', 'hybrid'])).max(cardPreviewCardOneWorkFormatsMax).nullable().describe('Explicitly opted-in work formats, or null.'),
|
||||
"salary_compatibility": zod.union([zod.enum(['compatible', 'not_compatible']).describe('A coarse compatibility result only. No salary amount, minimum, range, or threshold is part of the anonymous card.'),zod.null()]).describe('Nullable compatibility result with no salary values.')
|
||||
}).describe('The anonymous candidate card as an organization reads it. Only explicitly published values reach it; unconfirmed stack suggestions and unknown values never do. Stack output uses a closed taxonomy. It carries no name, contact, resume text, employer, salary figure, account or profile identifier, and no schema of the private profile or of a contact disclosure is reachable from it; a contact reaches an organization only through the contact grant of an accepted invitation. Each property is null when its field is not published or the candidate has no value for it, so the card does not tell the two apart. The set of properties is closed, and an organization-visible card must never gain a property that identifies the candidate. The search ranking and the full card of an organization\'s search result are defined by the search contract, which reuses this content.'),zod.null()]),
|
||||
"evidence": zod.union([zod.object({
|
||||
"items": zod.array(zod.object({
|
||||
"skill": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa', 'go', 'postgresql', 'kafka', 'docker']).describe('A skill tag from a closed set - the specialization codes of the catalog and the technology codes of the anonymous card. An assessment tags its fact with the specialization of the category.'),
|
||||
"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.'),
|
||||
"trust": zod.int().min(cardPreviewEvidenceOneItemsItemTrustMin).max(cardPreviewEvidenceOneItemsItemTrustMax).describe('Strength of the confirmation.\n\n- 0: stated by the person, not confirmed separately.\n- 1: an observable online result without a reliable confirmation of the identity or the authorship. Every assessment fact has this level today, because the assessment is unproctored and the identity is not confirmed.\n- 2: a result tied to a confirmed identity or confirmed by an independent party.\n- 3: an in-person check with a matching confirmation.\n\nA repeated statement, a sign-in, or a repeated tag of the same event never raises the level.'),
|
||||
"basis": zod.enum(['synthetic_demo']).describe('What the measurement rests on.\n\n- synthetic_demo: a demonstration category from a synthetic reviewed bank. It shows the mechanics and is not a validated measurement.'),
|
||||
"calibration_status": zod.enum(['uncalibrated']).describe('Calibration of the method behind the result.\n\n- uncalibrated: the thresholds are initial values that no measurement has validated.'),
|
||||
"observed_year": zod.int().min(cardPreviewEvidenceOneItemsItemObservedYearMin).max(cardPreviewEvidenceOneItemsItemObservedYearMax).describe('Year (UTC) when the assessment ended. The month, day, and time stay with the candidate.')
|
||||
}).describe('The one assessment fact that supports a category of the card as an organization reads it: the earliest visible measurement that passed exactly the confirmed grade of that category. A lower grade, a retake, the other tags of the event, the source, the basis, the exact time, and every identifier stay with the candidate. The fact carries no identifier of the fact, the event, the result, or the candidate, so it cannot be joined to a person by a key. It is not unlinkable: the skill, the grade, the trust level, and the year, together with the other values of the card, can narrow a small pool of candidates, and the minimum cohort of the card does not cover the year. `basis` and `calibration_status` are the same for every candidate: they say that the fact comes from a synthetic demonstration and is not calibrated, so a demonstration is never read as a validated measurement. The fact never carries an answer, score, item, failure, signal, or review band.')).max(cardPreviewEvidenceOneItemsMax).describe('Permitted facts, one for each supported category.')
|
||||
}).describe('The permitted evidence of one candidate card, ordered by skill: at most one fact for each category of the card (at most nine). The list is empty when no visible fact supports a category of the card.'),zod.null()]),
|
||||
"generated_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('A private candidate preview computed from the current profile, publication, and consent ledger. Its pseudonym uses a separate preview context and is not an organization\'s alias. Organization-specific visibility filters and cohort checks can further generalize or suppress the organization-facing card. This read creates no view or history record and never reaches an organization. `card` is null while the profile is closed.')
|
||||
}).describe('A private candidate preview computed from the current profile, publication, and consent ledger. Its pseudonym uses a separate preview context and is not an organization\'s alias. Organization-specific visibility filters and cohort checks can further generalize or suppress the organization-facing card. This read creates no view or history record and never reaches an organization. `card` is null while the profile is closed. `evidence` is what an organization would read in the evidence section of the card, one supporting assessment fact for each category of the card, and is null exactly when `card` is null; the organization-facing section can still be generalized or suppressed.')
|
||||
|
||||
export type CardPreview = zod.input<typeof CardPreview>;
|
||||
export type CardPreviewOutput = zod.output<typeof CardPreview>;
|
||||
@@ -16,7 +16,7 @@ export const PrivacyEvent = zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the event.'),
|
||||
"kind": zod.enum(['publication_opened', 'publication_changed', 'publication_closed', 'search_status_confirmed', 'search_status_cleared', 'organization_hidden', 'organization_unhidden']).describe('Kind of a change of the visibility settings that the history records.\n\n- publication_opened: the candidate published a closed profile.\n- publication_changed: the candidate changed the published fields of a published profile, or published it again under a new C2 record.\n- publication_closed: the candidate closed the publication. A revocation of C2 closes the card by the ledger and is read from the consent history, not recorded here.\n- search_status_confirmed: the candidate set or confirmed `looking`.\n- search_status_cleared: the candidate set `not_looking`. A lapse is not an event: it is computed.\n- organization_hidden: the candidate hid the profile from an organization.\n- organization_unhidden: the candidate lifted the hiding for an organization.'),
|
||||
"occurred_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.'),
|
||||
"fields": zod.union([zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(privacyEventFieldsOneMin).max(privacyEventFieldsOneMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.'),zod.null()]).describe('Published fields after the change for `publication_opened` and `publication_changed`, an empty set for `publication_closed`, and null for every other kind.'),
|
||||
"fields": zod.union([zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result. With it an organization receives the confirmed category and, with each category of the card, one supporting assessment fact: its skill, the passed grade, the trust level, the year of the assessment, and the basis and calibration that mark a synthetic, uncalibrated demonstration (`GetOrganizationCandidateEvidence`). The candidate sees the same on `GetMyCardPreview`.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(privacyEventFieldsOneMin).max(privacyEventFieldsOneMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.'),zod.null()]).describe('Published fields after the change for `publication_opened` and `publication_changed`, an empty set for `publication_closed`, and null for every other kind.'),
|
||||
"consent_id": zod.union([zod.uuid(),zod.null()]).describe('C2 record that backs the publication, for `publication_opened` and `publication_changed`, or null.'),
|
||||
"organization": zod.union([zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the organization.'),
|
||||
|
||||
@@ -23,7 +23,7 @@ export const PrivacyEventList = zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the event.'),
|
||||
"kind": zod.enum(['publication_opened', 'publication_changed', 'publication_closed', 'search_status_confirmed', 'search_status_cleared', 'organization_hidden', 'organization_unhidden']).describe('Kind of a change of the visibility settings that the history records.\n\n- publication_opened: the candidate published a closed profile.\n- publication_changed: the candidate changed the published fields of a published profile, or published it again under a new C2 record.\n- publication_closed: the candidate closed the publication. A revocation of C2 closes the card by the ledger and is read from the consent history, not recorded here.\n- search_status_confirmed: the candidate set or confirmed `looking`.\n- search_status_cleared: the candidate set `not_looking`. A lapse is not an event: it is computed.\n- organization_hidden: the candidate hid the profile from an organization.\n- organization_unhidden: the candidate lifted the hiding for an organization.'),
|
||||
"occurred_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.'),
|
||||
"fields": zod.union([zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(privacyEventListItemsItemFieldsOneMin).max(privacyEventListItemsItemFieldsOneMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.'),zod.null()]).describe('Published fields after the change for `publication_opened` and `publication_changed`, an empty set for `publication_closed`, and null for every other kind.'),
|
||||
"fields": zod.union([zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result. With it an organization receives the confirmed category and, with each category of the card, one supporting assessment fact: its skill, the passed grade, the trust level, the year of the assessment, and the basis and calibration that mark a synthetic, uncalibrated demonstration (`GetOrganizationCandidateEvidence`). The candidate sees the same on `GetMyCardPreview`.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(privacyEventListItemsItemFieldsOneMin).max(privacyEventListItemsItemFieldsOneMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.'),zod.null()]).describe('Published fields after the change for `publication_opened` and `publication_changed`, an empty set for `publication_closed`, and null for every other kind.'),
|
||||
"consent_id": zod.union([zod.uuid(),zod.null()]).describe('C2 record that backs the publication, for `publication_opened` and `publication_changed`, or null.'),
|
||||
"organization": zod.union([zod.object({
|
||||
"id": zod.uuid().describe('Identifier of the organization.'),
|
||||
|
||||
@@ -21,7 +21,7 @@ export const PrivacySettings = zod.object({
|
||||
"publication": zod.object({
|
||||
"state": zod.enum(['closed', 'published']).describe('Whether the candidate card can be read by organizations at all. It is computed from the stored publication and the consent ledger: a profile is closed unless the candidate published it and the C2 consent that backs the publication is still unrevoked.\n\n- closed: no organization reads the card. This is the state of every new profile and of a profile whose publication was closed or whose C2 was revoked.\n- published: organizations may read exactly the fields in `fields`, except for the organizations the candidate hid.'),
|
||||
"closed_reason": zod.union([zod.enum(['never_published', 'closed_by_candidate', 'consent_revoked']).describe('Why a closed profile is closed, shown only to the candidate.\n\n- never_published: the candidate has never published the profile.\n- closed_by_candidate: the candidate closed the publication.\n- consent_revoked: the C2 consent that backed the publication was revoked. A later C2 grant never reopens the publication; the candidate publishes again explicitly and the new publication refers to the new consent record.'),zod.null()]).describe('Why the profile is closed, or null while it is published.'),
|
||||
"fields": zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(privacySettingsPublicationFieldsOneMin).max(privacySettingsPublicationFieldsOneMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.').describe('Card fields that organizations may read. Empty exactly when `state` is `closed`.'),
|
||||
"fields": zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result. With it an organization receives the confirmed category and, with each category of the card, one supporting assessment fact: its skill, the passed grade, the trust level, the year of the assessment, and the basis and calibration that mark a synthetic, uncalibrated demonstration (`GetOrganizationCandidateEvidence`). The candidate sees the same on `GetMyCardPreview`.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(privacySettingsPublicationFieldsOneMin).max(privacySettingsPublicationFieldsOneMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.').describe('Card fields that organizations may read. Empty exactly when `state` is `closed`.'),
|
||||
"consent_id": zod.union([zod.uuid(),zod.null()]).describe('Identifier of the C2 record of the consent ledger that backs the current or the last publication, the `id` of a `ConsentRecord` of this account, or null when the profile was never published.'),
|
||||
"published_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 latest change that published or republished the card, or null while the profile was never published. It stays after a closing, as the time of the last publication.'),
|
||||
"version": zod.int().min(privacySettingsPublicationVersionMin).describe('Version of the publication setting of the candidate. A candidate who has never published has version 0 and the profile is closed; every change that alters the setting advances it by one. The client sends the version it read as `expected_version`. It is independent of the versions of the profile and of the search status, so a change of one never makes another stale.')
|
||||
|
||||
@@ -15,7 +15,7 @@ export const publicationVersionMin = 0;
|
||||
export const Publication = zod.object({
|
||||
"state": zod.enum(['closed', 'published']).describe('Whether the candidate card can be read by organizations at all. It is computed from the stored publication and the consent ledger: a profile is closed unless the candidate published it and the C2 consent that backs the publication is still unrevoked.\n\n- closed: no organization reads the card. This is the state of every new profile and of a profile whose publication was closed or whose C2 was revoked.\n- published: organizations may read exactly the fields in `fields`, except for the organizations the candidate hid.'),
|
||||
"closed_reason": zod.union([zod.enum(['never_published', 'closed_by_candidate', 'consent_revoked']).describe('Why a closed profile is closed, shown only to the candidate.\n\n- never_published: the candidate has never published the profile.\n- closed_by_candidate: the candidate closed the publication.\n- consent_revoked: the C2 consent that backed the publication was revoked. A later C2 grant never reopens the publication; the candidate publishes again explicitly and the new publication refers to the new consent record.'),zod.null()]).describe('Why the profile is closed, or null while it is published.'),
|
||||
"fields": zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(publicationFieldsOneMin).max(publicationFieldsOneMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.').describe('Card fields that organizations may read. Empty exactly when `state` is `closed`.'),
|
||||
"fields": zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result. With it an organization receives the confirmed category and, with each category of the card, one supporting assessment fact: its skill, the passed grade, the trust level, the year of the assessment, and the basis and calibration that mark a synthetic, uncalibrated demonstration (`GetOrganizationCandidateEvidence`). The candidate sees the same on `GetMyCardPreview`.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(publicationFieldsOneMin).max(publicationFieldsOneMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.').describe('Card fields that organizations may read. Empty exactly when `state` is `closed`.'),
|
||||
"consent_id": zod.union([zod.uuid(),zod.null()]).describe('Identifier of the C2 record of the consent ledger that backs the current or the last publication, the `id` of a `ConsentRecord` of this account, or null when the profile was never published.'),
|
||||
"published_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 latest change that published or republished the card, or null while the profile was never published. It stays after a closing, as the time of the last publication.'),
|
||||
"version": zod.int().min(publicationVersionMin).describe('Version of the publication setting of the candidate. A candidate who has never published has version 0 and the profile is closed; every change that alters the setting advances it by one. The client sends the version it read as `expected_version`. It is independent of the versions of the profile and of the search status, so a change of one never makes another stale.')
|
||||
|
||||
@@ -15,7 +15,7 @@ export const publicationUpdateFieldsMax = 9;
|
||||
export const PublicationUpdate = zod.object({
|
||||
"expected_version": zod.int().min(publicationUpdateExpectedVersionMin).describe('Version of the publication setting of the candidate. A candidate who has never published has version 0 and the profile is closed; every change that alters the setting advances it by one. The client sends the version it read as `expected_version`. It is independent of the versions of the profile and of the search status, so a change of one never makes another stale.'),
|
||||
"state": zod.enum(['closed', 'published']).describe('Whether the candidate card can be read by organizations at all. It is computed from the stored publication and the consent ledger: a profile is closed unless the candidate published it and the C2 consent that backs the publication is still unrevoked.\n\n- closed: no organization reads the card. This is the state of every new profile and of a profile whose publication was closed or whose C2 was revoked.\n- published: organizations may read exactly the fields in `fields`, except for the organizations the candidate hid.'),
|
||||
"fields": zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(publicationUpdateFieldsMin).max(publicationUpdateFieldsMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.')
|
||||
"fields": zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result. With it an organization receives the confirmed category and, with each category of the card, one supporting assessment fact: its skill, the passed grade, the trust level, the year of the assessment, and the basis and calibration that mark a synthetic, uncalibrated demonstration (`GetOrganizationCandidateEvidence`). The candidate sees the same on `GetMyCardPreview`.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(publicationUpdateFieldsMin).max(publicationUpdateFieldsMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.')
|
||||
}).describe('The complete new publication setting. `published` needs a non-empty set of fields and an active C2 consent of the account; `closed` needs an empty set and never fails for a missing consent. The body names no consent: the server binds the publication to the account\'s current unrevoked C2 record, and a client can neither supply nor forge one.')
|
||||
|
||||
export type PublicationUpdate = zod.input<typeof PublicationUpdate>;
|
||||
|
||||
@@ -15,7 +15,7 @@ export const setMyPublicationBodyFieldsMax = 9;
|
||||
export const SetMyPublicationBody = zod.object({
|
||||
"expected_version": zod.int().min(setMyPublicationBodyExpectedVersionMin).describe('Version of the publication setting of the candidate. A candidate who has never published has version 0 and the profile is closed; every change that alters the setting advances it by one. The client sends the version it read as `expected_version`. It is independent of the versions of the profile and of the search status, so a change of one never makes another stale.'),
|
||||
"state": zod.enum(['closed', 'published']).describe('Whether the candidate card can be read by organizations at all. It is computed from the stored publication and the consent ledger: a profile is closed unless the candidate published it and the C2 consent that backs the publication is still unrevoked.\n\n- closed: no organization reads the card. This is the state of every new profile and of a profile whose publication was closed or whose C2 was revoked.\n- published: organizations may read exactly the fields in `fields`, except for the organizations the candidate hid.'),
|
||||
"fields": zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(setMyPublicationBodyFieldsMin).max(setMyPublicationBodyFieldsMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.')
|
||||
"fields": zod.array(zod.enum(['categories', 'salary_compatibility', 'self_assessment', 'stack', 'experience', 'soft_skills', 'location', 'relocation', 'work_formats']).describe('A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.\n\n- categories: specialization and grade confirmed by an authoritative assessment result. With it an organization receives the confirmed category and, with each category of the card, one supporting assessment fact: its skill, the passed grade, the trust level, the year of the assessment, and the basis and calibration that mark a synthetic, uncalibrated demonstration (`GetOrganizationCandidateEvidence`). The candidate sees the same on `GetMyCardPreview`.\n- self_assessment: the candidate\'s declared specialization and grade, separate from confirmed categories.\n- stack: only recognized technology codes from the server\'s closed taxonomy.\n- experience: a coarse total-experience band, without employers, periods, or descriptions.\n- work_formats: explicitly selected work formats from the private questionnaire.\n- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.\n- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.\n\nOnly values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.\n\nAdding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.')).min(setMyPublicationBodyFieldsMin).max(setMyPublicationBodyFieldsMax).describe('Distinct card fields. The server stores them in ascending order of the codes and answers them in that order, whatever order the client sent, so equal sets are equal arrays.')
|
||||
}).describe('The complete new publication setting. `published` needs a non-empty set of fields and an active C2 consent of the account; `closed` needs an empty set and never fails for a missing consent. The body names no consent: the server binds the publication to the account\'s current unrevoked C2 record, and a client can neither supply nor forge one.')
|
||||
|
||||
export type SetMyPublicationBody = zod.input<typeof SetMyPublicationBody>;
|
||||
|
||||
Reference in new issue
Block a user