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

@@ -1442,6 +1442,42 @@ type Handler interface {
//
// PUT /api/v1/me/questionnaire
SaveMyQuestionnaire(ctx context.Context, req *CandidateQuestionnaireUpdate) (SaveMyQuestionnaireRes, error)
// SearchOrganizationMatches implements SearchOrganizationMatches operation.
//
// Requires the session cookie of an employer account with an active owner membership in `org_id`, the
// CSRF token of that session in X-CSRF-Token, and an allowed Origin. The organization comes from the
// path and the active server-side membership. Hidden profiles, revoked or missing C2 publication, and
// the organization's visibility restrictions are applied before any result is returned.
//
// The body selects either a Need's `requirements_version` snapshot or the current organization-visible
// bank with explicit filters. A need reference uses `Need.requirements_version`, not the general
// `Need.version`; title or suggestion-only edits do not change the confirmed-requirements snapshot. An
// empty bank filter searches all otherwise eligible specializations, returning each specialization
// separately.
//
// Every entry is one candidate specialization. A confirmed result in Backend never confirms Networks
// for the same candidate. The `main`, `near`, and `unconfirmed` arrays are separate groups. A
// confirmed category with required-skill coverage below 0.25 belongs to `near`; other confirmed
// entries belong to `main` (FR09). Entries in `unconfirmed` are ordered by Fit, then coverage, then a
// stable internal tie-breaker that is never returned. Their category and strength remain null, and
// they have no theta, T, P, or test percentile. The search result uses the organization-scoped opaque
// `candidate_handle` as its display pseudonym and invitation reference, never a candidate account or
// profile identifier.
//
// The card context is limited to safe public fields: recognized stack tags, coarse experience,
// accepted work formats, and coarse salary compatibility. It contains no contact, candidate location,
// salary amount or minimum, raw answer, arbitrary profile text, or reason for withheld FSP data.
// Evidence explanations use bounded codes, not free text. When ML is unavailable, semantic similarity
// uses the neutral 0.5 specified by FR09 and `unknown_flags` names `ml_unavailable`. For fewer than 30
// comparable real candidates, the search uses neutral T = 0.5, returns no percentile value, and names
// `cohort_below_30`.
//
// A missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate account
// answers 403 forbidden; an unknown organization or account without active membership answers 404
// not_found. The response is `Cache-Control: no-store`.
//
// POST /api/v1/organizations/{org_id}/matches
SearchOrganizationMatches(ctx context.Context, req MatchSearchRequest, params SearchOrganizationMatchesParams) (SearchOrganizationMatchesRes, error)
// SendOrganizationInvitation implements SendOrganizationInvitation operation.
//
// Requires the session cookie of an employer account with an active membership in `org_id`, the CSRF