feat: add assessment, privacy and support flows

This commit is contained in:
TakuyaYagam1 committed 2026-10-08 08:08:25 +03:00
1 parent ee3738ee73
commit e4f24fa202
339 files changed
+56454 -1126

No files matched your search

@@ -7,7 +7,7 @@
import * as zod from 'zod';
export const privacyEventListItemsItemFieldsOneMin = 0;
export const privacyEventListItemsItemFieldsOneMax = 6;
export const privacyEventListItemsItemFieldsOneMax = 9;
export const privacyEventListItemsItemOrganizationOneNameMax = 200;
@@ -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', 'stack', 'experience', 'soft_skills', 'location', 'relocation']).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: the categories confirmed by assessment results (specialization and confirmed grade). A self-assessed grade is not a category and is never published.\n- stack: the technology tags of the profile.\n- experience: the total months of work experience, without employers, periods, or descriptions.\n- soft_skills: the soft skills of the profile.\n- location: the city or region of the profile.\n- relocation: whether the candidate is ready to relocate.\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.\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.'),