schemas: PublicationVersion: type: integer format: int64 minimum: 0 description: >- 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. examples: - 2 SearchStatusVersion: type: integer format: int64 minimum: 0 description: >- Version of the search status of the candidate. A candidate who never set the status has version 0 and the status `not_looking`; every confirmation or change advances it by one. The client sends the version it read as `expected_version`. examples: - 3 CardField: type: string description: |- 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. - categories: specialization and grade confirmed by an authoritative assessment result. - self_assessment: the candidate's declared specialization and grade, separate from confirmed categories. - stack: only recognized technology codes from the server's closed taxonomy. - experience: a coarse total-experience band, without employers, periods, or descriptions. - work_formats: explicitly selected work formats from the private questionnaire. - salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds. - soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card. Only 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. Adding 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. enum: - categories - salary_compatibility - self_assessment - stack - experience - soft_skills - location - relocation - work_formats CardFieldSet: type: array minItems: 0 maxItems: 9 uniqueItems: true description: >- 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. items: $ref: "#/schemas/CardField" PublicationState: type: string description: |- 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. - 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. - published: organizations may read exactly the fields in `fields`, except for the organizations the candidate hid. enum: - closed - published PublicationClosedReason: type: string description: |- Why a closed profile is closed, shown only to the candidate. - never_published: the candidate has never published the profile. - closed_by_candidate: the candidate closed the publication. - 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. enum: - never_published - closed_by_candidate - consent_revoked Publication: type: object description: >- Publication setting of the candidate card. It is separate from the consent: the C2 consent in the ledger proves that the candidate accepted the publication text, and this setting records whether and which fields are published. `state` is `published` only while the referenced C2 record is unrevoked, whatever the stored setting says, so a revocation closes the card at once. The state, the fields, and the times belong to the history that the C2 consent record does not carry. additionalProperties: false required: - state - closed_reason - fields - consent_id - published_at - version properties: state: $ref: "#/schemas/PublicationState" closed_reason: description: Why the profile is closed, or null while it is published. oneOf: - $ref: "#/schemas/PublicationClosedReason" - type: "null" fields: description: >- Card fields that organizations may read. Empty exactly when `state` is `closed`. allOf: - $ref: "#/schemas/CardFieldSet" consent_id: description: >- 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. oneOf: - type: string format: uuid - type: "null" published_at: description: >- 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. oneOf: - $ref: "./common_schemas.yml#/schemas/Timestamp" - type: "null" version: $ref: "#/schemas/PublicationVersion" PublicationUpdate: type: object description: >- 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. additionalProperties: false required: - expected_version - state - fields properties: expected_version: $ref: "#/schemas/PublicationVersion" state: $ref: "#/schemas/PublicationState" fields: $ref: "#/schemas/CardFieldSet" SearchStatusValue: type: string description: |- Whether the candidate says they are searching for work. The status is a statement, never a consent: it publishes nothing, hides nothing, and grants nothing, and no value of it changes the C2 consent, the publication, or the hidden organizations. - looking: the candidate is searching ("Ищу"). It holds only while it is confirmed in time; see `SearchStatus.lapsed`. - not_looking: the candidate is not announcing a search. It is the state of every new account and the state to which a lapsed status falls. enum: - looking - not_looking SearchStatus: type: object description: >- Search status of the candidate as it holds now. The status `looking` stores the moment of its confirmation and lapses when the confirmation interval of the product policy passes without a new confirmation. A lapse only ever narrows: the status falls to `not_looking`, which is the non-public state, and a lapse never changes the publication or the hidden organizations. It needs no stored change, so no process can make a candidate more visible by expiry, and a lapsed candidate confirms again explicitly. additionalProperties: false required: - value - lapsed - confirmed_at - lapses_at - version properties: value: description: >- The status that holds now: `looking` only while the confirmation has not lapsed. allOf: - $ref: "#/schemas/SearchStatusValue" lapsed: type: boolean description: >- True when the candidate set `looking`, did not confirm it again, and the interval ended, so `value` is `not_looking`. False otherwise, including a status the candidate cleared. confirmed_at: description: >- Moment of the latest confirmation of `looking`, or null when the candidate never set it or cleared it. oneOf: - $ref: "./common_schemas.yml#/schemas/Timestamp" - type: "null" lapses_at: description: >- Moment at which the confirmed status lapses, fixed when it was confirmed from the `search_status` section of the product policy version in force then, or null when `confirmed_at` is null. A later policy change does not move it; it stays in the past for a lapsed status. oneOf: - $ref: "./common_schemas.yml#/schemas/Timestamp" - type: "null" version: $ref: "#/schemas/SearchStatusVersion" SearchStatusUpdate: type: object description: >- The complete new search status. `looking` is also the confirmation of a status that still holds or has lapsed: it sets the confirmation time to now. The body carries no time, interval, or policy version; the server takes them from the effective product policy. additionalProperties: false required: - expected_version - value properties: expected_version: $ref: "#/schemas/SearchStatusVersion" value: $ref: "#/schemas/SearchStatusValue" PrivacyOrganization: type: object description: >- Organization as the candidate who hid it reads it. The name is the current name of the organization. The candidate must already have been able to see the organization to hide it, so the reference tells them nothing that they could not read before. additionalProperties: false required: - id - name properties: id: type: string format: uuid description: Identifier of the organization. name: type: string minLength: 1 maxLength: 200 description: >- Current name of the organization. Plain text; clients show it as text, never as HTML. HiddenOrganization: type: object description: >- One organization that the candidate hides the profile from. The record belongs to the candidate: no organization reads it, learns that it was hidden, or can tell a hidden candidate from one who is not published. additionalProperties: false required: - organization - hidden_at properties: organization: $ref: "#/schemas/PrivacyOrganization" hidden_at: $ref: "./common_schemas.yml#/schemas/Timestamp" HiddenOrganizationList: type: object description: >- One page of the organizations that the candidate hides the profile from, newest first with the organization identifier as the tie-breaker. additionalProperties: false required: - items - page properties: items: type: array maxItems: 100 description: Hidden organizations of the page. items: $ref: "#/schemas/HiddenOrganization" page: $ref: "./common_schemas.yml#/schemas/PageInfo" PrivacySettings: type: object description: >- The visibility settings of the current candidate in one read: the publication, the search status, and the number of hidden organizations. The three are independent: each has its own version and its own operation, and a change of one leaves the others as they were. A new account reads a closed profile, `not_looking`, and no hidden organization. additionalProperties: false required: - publication - search_status - hidden_organizations_total properties: publication: $ref: "#/schemas/Publication" search_status: $ref: "#/schemas/SearchStatus" hidden_organizations_total: type: integer minimum: 0 maximum: 1000 description: >- Number of organizations that the candidate hides the profile from. The list is read with `ListMyHiddenOrganizations`. CardCategory: type: object description: A category confirmed by assessment results, as the card shows it. additionalProperties: false required: - specialization - grade - strength properties: specialization: $ref: "./catalog_schemas.yml#/schemas/SpecializationCode" grade: $ref: "./catalog_schemas.yml#/schemas/GradeCode" strength: type: string enum: - standard - strong description: Coarse strength of the authoritative confirmation. CardSelfAssessment: type: object description: Candidate-declared specialization and optional grade. This is never an assessment result. additionalProperties: false required: - specialization - confirmation_status properties: specialization: $ref: "./catalog_schemas.yml#/schemas/SpecializationCode" confirmation_status: type: string enum: - confirmed - unconfirmed declared_grade: oneOf: - $ref: "./catalog_schemas.yml#/schemas/GradeCode" - type: "null" CandidateExperienceBand: type: string description: >- Coarse total experience bucket. Rare combinations may be generalized to 0_3 or 3_plus before they are returned. enum: - "0_1" - "1_3" - "3_6" - "6_plus" - "0_3" - "3_plus" CandidateWorkFormat: type: string enum: - remote - office - hybrid CandidateSalaryCompatibility: type: string description: >- A coarse compatibility result only. No salary amount, minimum, range, or threshold is part of the anonymous card. enum: - compatible - not_compatible AnonymousCardContent: type: object description: >- 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. additionalProperties: false required: - pseudonym - categories - stack - self_assessment - experience_band - work_formats - salary_compatibility properties: pseudonym: type: string minLength: 47 maxLength: 47 pattern: '^cv1_[A-Za-z0-9_-]{43}$' description: >- Stable opaque alias scoped to the reading organization. It is not an account or profile identifier and changes across organizations. categories: type: - array - "null" maxItems: 9 description: Categories confirmed by assessment results, or null. items: $ref: "#/schemas/CardCategory" stack: type: - array - "null" maxItems: 4 description: Recognized confirmed technology codes only, or null. items: type: string enum: - go - postgresql - kafka - docker self_assessment: type: - array - "null" maxItems: 9 description: Candidate-declared specialization and grade, separate from categories. items: $ref: "#/schemas/CardSelfAssessment" experience_band: oneOf: - $ref: "#/schemas/CandidateExperienceBand" - type: "null" description: Coarse total work-experience bucket, or null. work_formats: type: - array - "null" maxItems: 3 description: Explicitly opted-in work formats, or null. items: $ref: "#/schemas/CandidateWorkFormat" salary_compatibility: oneOf: - $ref: "#/schemas/CandidateSalaryCompatibility" - type: "null" description: Nullable compatibility result with no salary values. CardPreview: type: object description: >- 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. additionalProperties: false required: - state - fields - card - generated_at properties: state: $ref: "#/schemas/PublicationState" fields: $ref: "#/schemas/CardFieldSet" card: oneOf: - $ref: "#/schemas/AnonymousCardContent" - type: "null" generated_at: $ref: "./common_schemas.yml#/schemas/Timestamp" PrivacyEventKind: type: string description: |- Kind of a change of the visibility settings that the history records. - publication_opened: the candidate published a closed profile. - publication_changed: the candidate changed the published fields of a published profile, or published it again under a new C2 record. - 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. - search_status_confirmed: the candidate set or confirmed `looking`. - search_status_cleared: the candidate set `not_looking`. A lapse is not an event: it is computed. - organization_hidden: the candidate hid the profile from an organization. - organization_unhidden: the candidate lifted the hiding for an organization. enum: - publication_opened - publication_changed - publication_closed - search_status_confirmed - search_status_cleared - organization_hidden - organization_unhidden PrivacyEvent: type: object description: >- One recorded change of the visibility settings of the current candidate, as evidence of what was published, hidden, or announced and when. The history is append-only and returns only the caller's own records. A publication event carries the published fields and the C2 record behind them; an organization event names the organization; the other properties are null. additionalProperties: false required: - id - kind - occurred_at - fields - consent_id - organization properties: id: type: string format: uuid description: Identifier of the event. kind: $ref: "#/schemas/PrivacyEventKind" occurred_at: $ref: "./common_schemas.yml#/schemas/Timestamp" fields: description: >- Published fields after the change for `publication_opened` and `publication_changed`, an empty set for `publication_closed`, and null for every other kind. oneOf: - $ref: "#/schemas/CardFieldSet" - type: "null" consent_id: description: >- C2 record that backs the publication, for `publication_opened` and `publication_changed`, or null. oneOf: - type: string format: uuid - type: "null" organization: description: >- Organization of `organization_hidden` and `organization_unhidden` with its current name, resolved when the history is read (the event stores only the identifier), or null. oneOf: - $ref: "#/schemas/PrivacyOrganization" - type: "null" PrivacyEventList: type: object description: >- One page of the settings history of the current candidate, newest first. additionalProperties: false required: - items - page properties: items: type: array maxItems: 100 description: Events of the page. items: $ref: "#/schemas/PrivacyEvent" page: $ref: "./common_schemas.yml#/schemas/PageInfo" CardAccessKind: type: string description: |- How an organization reached the candidate. - card_viewed: an organization read the permitted anonymous card. - contact_read: an organization read the contacts through the contact grant of an accepted invitation. enum: - card_viewed - contact_read CardAccess: type: object description: >- One access of an organization to the card or the contacts of the current candidate. A retained access permits the candidate to see the organization's identifier and current name and to hide their profile from it. `organization` is null when the organization cannot be presented. Earlier permitted accesses remain after hiding. The record carries no employee identity, query, ranking, or search filter of the organization. additionalProperties: false required: - id - kind - occurred_at - organization properties: id: type: string format: uuid description: Identifier of the access record. kind: $ref: "#/schemas/CardAccessKind" occurred_at: $ref: "./common_schemas.yml#/schemas/Timestamp" organization: oneOf: - $ref: "#/schemas/PrivacyOrganization" - type: "null" CardAccessList: type: object description: >- One page of the accesses to the card of the current candidate, newest first. additionalProperties: false required: - items - page properties: items: type: array maxItems: 100 description: Accesses of the page. items: $ref: "#/schemas/CardAccess" page: $ref: "./common_schemas.yml#/schemas/PageInfo"