feat: define anonymous match search contract

This commit is contained in:
TakuyaYagam1 committed 2026-10-08 08:19:27 +03:00
1 parent e4f24fa202
commit 6ad4402ff4
66 files changed
+13047 -36

No files matched your search

+515
View File
@@ -4254,6 +4254,521 @@ InvitationDeclineRequest:
oneOf:
- $ref: '#/InvitationDeclineComment'
- type: 'null'
MatchConfirmationStatus:
type: string
description: Confirmation state for this specialization only. A result for one specialization never changes the state of another specialization.
enum:
- confirmed
- unconfirmed
MatchGradeFilter:
type: object
description: A confirmed category filter, never a candidate declaration.
additionalProperties: false
required:
- specialization
- grade
properties:
specialization:
$ref: '#/SpecializationCode'
grade:
$ref: '#/GradeCode'
MatchSearchStackTag:
type: string
description: A stack code that the anonymous card may expose. Search filters do not accept arbitrary profile text or candidate-provided evidence.
enum:
- go
- postgresql
- kafka
- docker
MatchSearchConditions:
type: object
description: Filters against safe, coarse card conditions. No candidate location, salary amount, salary minimum, or salary range is accepted.
additionalProperties: false
properties:
work_formats:
type: array
minItems: 1
maxItems: 3
uniqueItems: true
items:
$ref: '#/WorkFormat'
salary_compatibility:
$ref: '#/CandidateSalaryCompatibility'
MatchSearchFilters:
type: object
description: Optional filters over the current organization-visible bank. An empty object means no additional filter. Confirmed and declared grades are separate fields; a declaration never satisfies a confirmed-grade or category filter. Conditions use only the safe, coarse card fields.
additionalProperties: false
properties:
specialization:
$ref: '#/SpecializationCode'
confirmed_grade:
description: Match only candidates with this currently confirmed grade in the selected specialization. It never matches a declared grade.
$ref: '#/GradeCode'
confirmed_category:
$ref: '#/MatchGradeFilter'
confirmation_status:
$ref: '#/MatchConfirmationStatus'
declared_grade:
description: Candidate-declared grade filter. This is a separate claim and cannot satisfy `confirmed_grade` or `confirmed_category`.
$ref: '#/GradeCode'
stack:
type: array
minItems: 1
maxItems: 4
uniqueItems: true
items:
$ref: '#/MatchSearchStackTag'
conditions:
$ref: '#/MatchSearchConditions'
MatchSearchByNeed:
type: object
description: Search one immutable set of confirmed requirements. `requirements_version` is the Need.requirements_version, not the general Need.version; text-only or suggestion-only edits do not change this search basis.
additionalProperties: false
required:
- need_id
- requirements_version
properties:
need_id:
type: string
format: uuid
description: Need owned by the organization in the path.
requirements_version:
$ref: '#/NeedVersion'
filters:
$ref: '#/MatchSearchFilters'
MatchSearchByBank:
type: object
description: Search the current organization-visible bank. An empty `filters` object includes all otherwise eligible specializations as separate entries.
additionalProperties: false
required:
- filters
properties:
filters:
$ref: '#/MatchSearchFilters'
MatchSearchRequest:
oneOf:
- $ref: '#/MatchSearchByNeed'
- $ref: '#/MatchSearchByBank'
description: Search either a Need.requirements_version snapshot or the whole organization-visible bank with explicit filters. Unknown fields are rejected by both closed request variants.
MatchSearchNeedSource:
type: object
description: The immutable need requirements snapshot used by this result.
additionalProperties: false
required:
- kind
- need_id
- requirements_version
properties:
kind:
type: string
enum:
- need
need_id:
type: string
format: uuid
requirements_version:
$ref: '#/NeedVersion'
MatchAppliedConditions:
type: object
description: Conditions echoed as a complete snapshot; null means no filter.
additionalProperties: false
required:
- work_formats
- salary_compatibility
properties:
work_formats:
oneOf:
- type: array
minItems: 1
maxItems: 3
uniqueItems: true
items:
$ref: '#/WorkFormat'
- type: 'null'
salary_compatibility:
oneOf:
- $ref: '#/CandidateSalaryCompatibility'
- type: 'null'
MatchAppliedFilters:
type: object
description: A normalized response snapshot of the bank filters. Each key is present; null means the corresponding request filter was omitted. This keeps a search result tied to its exact filter basis.
additionalProperties: false
required:
- specialization
- confirmed_grade
- confirmed_category
- confirmation_status
- declared_grade
- stack
- conditions
properties:
specialization:
oneOf:
- $ref: '#/SpecializationCode'
- type: 'null'
confirmed_grade:
oneOf:
- $ref: '#/GradeCode'
- type: 'null'
confirmed_category:
oneOf:
- $ref: '#/MatchGradeFilter'
- type: 'null'
confirmation_status:
oneOf:
- $ref: '#/MatchConfirmationStatus'
- type: 'null'
declared_grade:
oneOf:
- $ref: '#/GradeCode'
- type: 'null'
stack:
oneOf:
- type: array
minItems: 1
maxItems: 4
uniqueItems: true
items:
$ref: '#/MatchSearchStackTag'
- type: 'null'
conditions:
oneOf:
- $ref: '#/MatchAppliedConditions'
- type: 'null'
MatchSearchBankSource:
type: object
description: The normalized filters used for a bank search.
additionalProperties: false
required:
- kind
- filters
properties:
kind:
type: string
enum:
- bank
filters:
$ref: '#/MatchAppliedFilters'
MatchSearchSource:
oneOf:
- $ref: '#/MatchSearchNeedSource'
- $ref: '#/MatchSearchBankSource'
description: Search basis echoed with the response so the displayed result remains tied to its need requirements version or bank filters.
MatchStrength:
type: string
description: Coarse strength of a confirmed assessment for this specialization.
enum:
- standard
- strong
MatchCategory:
type: object
description: A confirmed category. Its specialization must equal the enclosing match entry's specialization.
additionalProperties: false
required:
- specialization
- grade
properties:
specialization:
$ref: '#/SpecializationCode'
grade:
$ref: '#/GradeCode'
MatchScore:
type: number
format: double
minimum: 0
maximum: 1
description: A normalized FR09 ranking component from 0 to 1.
MatchNullableScore:
description: A score from a versioned ranking component, or null when it is not available. Any null component has a matching bounded entry in `unknown_flags`.
oneOf:
- type: number
format: double
minimum: 0
maximum: 1
- type: 'null'
MatchUnknownComponent:
type: string
description: Ranking or public-card component whose value is unknown.
enum:
- semantics
- percentile
- assessment
- freshness
- responsiveness
- experience_band
- work_formats
- salary_compatibility
- domain
MatchUnknownReason:
type: string
description: Bounded explanation for an unknown component, not a hiding reason.
enum:
- ml_unavailable
- cohort_below_30
- no_confirmation_for_specialization
- not_in_public_card
- need_field_unconfirmed
- no_freshness_history
- no_response_history
MatchUnknownFlag:
type: object
description: A safe, bounded explanation for one unavailable component.
additionalProperties: false
required:
- component
- reason
properties:
component:
$ref: '#/MatchUnknownComponent'
reason:
$ref: '#/MatchUnknownReason'
MatchUnknownFlags:
type: array
maxItems: 9
items:
$ref: '#/MatchUnknownFlag'
MatchEvidenceCode:
type: string
description: Template code for an explanation derived from allowed evidence. It carries no free text, raw answer, or reason for withheld FSP data.
enum:
- confirmed_category
- required_skill_evidence
- desired_skill_evidence
- domain_alignment
- task_alignment
- work_conditions_match
- salary_compatibility
- declared_grade
MatchEvidenceState:
type: string
enum:
- supports
- partial
- gap
- declared_only
MatchEvidenceSummaryItem:
type: object
description: A templated, non-text evidence explanation.
additionalProperties: false
required:
- code
- state
properties:
code:
$ref: '#/MatchEvidenceCode'
state:
$ref: '#/MatchEvidenceState'
MatchEvidenceSummary:
type: array
maxItems: 12
items:
$ref: '#/MatchEvidenceSummaryItem'
MatchPublicStack:
type: array
maxItems: 4
uniqueItems: true
items:
$ref: '#/MatchSearchStackTag'
MatchPublicContext:
type: object
description: Safe anonymous-card context only. A null value means that the value is not in the public card or is not present; the response does not reveal which. It contains no contact, candidate location, or salary amount.
additionalProperties: false
required:
- stack
- experience_band
- work_formats
- salary_compatibility
properties:
stack:
oneOf:
- $ref: '#/MatchPublicStack'
- type: 'null'
experience_band:
oneOf:
- $ref: '#/CandidateExperienceBand'
- type: 'null'
work_formats:
oneOf:
- type: array
maxItems: 3
uniqueItems: true
items:
$ref: '#/WorkFormat'
- type: 'null'
salary_compatibility:
oneOf:
- $ref: '#/CandidateSalaryCompatibility'
- type: 'null'
MatchConfirmedComponents:
type: object
description: Components from the FR09 ranking model for a confirmed category. `percentile` is null when fewer than 30 comparable real candidates are available; the ranking uses neutral T = 0.5 and does not publish a percentile. If ML is unavailable, `semantics` uses neutral 0.5 and the reason appears in `unknown_flags`.
additionalProperties: false
required:
- fit
- coverage
- domain
- semantics
- percentile
- competition
- freshness
- responsiveness
- rank_score
properties:
fit:
$ref: '#/MatchScore'
coverage:
$ref: '#/MatchScore'
domain:
$ref: '#/MatchScore'
semantics:
$ref: '#/MatchScore'
percentile:
$ref: '#/MatchNullableScore'
competition:
$ref: '#/MatchScore'
freshness:
$ref: '#/MatchScore'
responsiveness:
$ref: '#/MatchScore'
rank_score:
$ref: '#/MatchScore'
MatchUnconfirmedComponents:
type: object
description: Unconfirmed entries are ordered only by Fit and coverage. This strict component object has no theta, T, P, test percentile, or confirmed assessment score.
additionalProperties: false
required:
- fit
- coverage
properties:
fit:
type: number
format: double
minimum: 0
maximum: 1
description: Job fit for this specialization, never an assessment score.
coverage:
type: number
format: double
minimum: 0
maximum: 1
description: Coverage of confirmed need skills by allowed public evidence.
MatchConfirmedCandidate:
type: object
description: One confirmed specialization entry in the `main` or `near` group. The group containing it supplies the group label. A candidate may have a separate entry for another specialization.
additionalProperties: false
required:
- candidate_handle
- specialization
- confirmation_status
- declared_grade
- category
- strength
- public_context
- evidence_summary
- components
- unknown_flags
properties:
candidate_handle:
$ref: '#/CandidateHandle'
specialization:
$ref: '#/SpecializationCode'
confirmation_status:
type: string
enum:
- confirmed
declared_grade:
oneOf:
- $ref: '#/GradeCode'
- type: 'null'
description: Candidate-declared grade for this specialization, never a confirmation.
category:
$ref: '#/MatchCategory'
strength:
$ref: '#/MatchStrength'
public_context:
$ref: '#/MatchPublicContext'
evidence_summary:
$ref: '#/MatchEvidenceSummary'
components:
$ref: '#/MatchConfirmedComponents'
unknown_flags:
$ref: '#/MatchUnknownFlags'
MatchUnconfirmedCandidate:
type: object
description: One specialization with no confirmed category. `category` and `strength` remain present and null. A confirmation in another specialization never changes this entry. The schema intentionally has no assessment measurement fields.
additionalProperties: false
required:
- candidate_handle
- specialization
- confirmation_status
- declared_grade
- category
- strength
- public_context
- evidence_summary
- components
- unknown_flags
properties:
candidate_handle:
$ref: '#/CandidateHandle'
specialization:
$ref: '#/SpecializationCode'
confirmation_status:
type: string
enum:
- unconfirmed
declared_grade:
oneOf:
- $ref: '#/GradeCode'
- type: 'null'
description: Candidate-declared grade, separate from assessment confirmation.
category:
type: 'null'
description: There is no confirmed category for this specialization.
strength:
type: 'null'
description: Assessment strength is not measured for this specialization.
public_context:
$ref: '#/MatchPublicContext'
evidence_summary:
$ref: '#/MatchEvidenceSummary'
components:
$ref: '#/MatchUnconfirmedComponents'
unknown_flags:
$ref: '#/MatchUnknownFlags'
MatchSearchGroups:
type: object
description: Separate ranking groups. Confirmed categories appear in main and near; unconfirmed specializations appear only in the lower unconfirmed group.
additionalProperties: false
required:
- main
- near
- unconfirmed
properties:
main:
type: array
items:
$ref: '#/MatchConfirmedCandidate'
near:
type: array
items:
$ref: '#/MatchConfirmedCandidate'
unconfirmed:
type: array
items:
$ref: '#/MatchUnconfirmedCandidate'
MatchSearchResponse:
type: object
description: Anonymous search result grouped by specialization state. Repeated organization-scoped handles are allowed when the same candidate has different specialization entries; entries never transfer confirmation between specializations.
additionalProperties: false
required:
- source
- groups
properties:
source:
$ref: '#/MatchSearchSource'
groups:
$ref: '#/MatchSearchGroups'
NeedVersion:
type: integer
format: int64