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

@@ -0,0 +1,240 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const matchSearchResponseSourceTwoFiltersStackOneMax = 4;
export const matchSearchResponseSourceTwoFiltersConditionsOneWorkFormatsOneMax = 3;
export const matchSearchResponseGroupsMainItemCandidateHandleMin = 47;
export const matchSearchResponseGroupsMainItemCandidateHandleMax = 47;
export const matchSearchResponseGroupsMainItemCandidateHandleRegExp = new RegExp('^cv1_[A-Za-z0-9_-]{43}$');
export const matchSearchResponseGroupsMainItemPublicContextStackOneMax = 4;
export const matchSearchResponseGroupsMainItemPublicContextWorkFormatsOneMax = 3;
export const matchSearchResponseGroupsMainItemEvidenceSummaryMax = 12;
export const matchSearchResponseGroupsMainItemComponentsFitMin = 0;
export const matchSearchResponseGroupsMainItemComponentsFitMax = 1;
export const matchSearchResponseGroupsMainItemComponentsCoverageMin = 0;
export const matchSearchResponseGroupsMainItemComponentsCoverageMax = 1;
export const matchSearchResponseGroupsMainItemComponentsDomainMin = 0;
export const matchSearchResponseGroupsMainItemComponentsDomainMax = 1;
export const matchSearchResponseGroupsMainItemComponentsSemanticsMin = 0;
export const matchSearchResponseGroupsMainItemComponentsSemanticsMax = 1;
export const matchSearchResponseGroupsMainItemComponentsPercentileOneMin = 0;
export const matchSearchResponseGroupsMainItemComponentsPercentileOneMax = 1;
export const matchSearchResponseGroupsMainItemComponentsCompetitionMin = 0;
export const matchSearchResponseGroupsMainItemComponentsCompetitionMax = 1;
export const matchSearchResponseGroupsMainItemComponentsFreshnessMin = 0;
export const matchSearchResponseGroupsMainItemComponentsFreshnessMax = 1;
export const matchSearchResponseGroupsMainItemComponentsResponsivenessMin = 0;
export const matchSearchResponseGroupsMainItemComponentsResponsivenessMax = 1;
export const matchSearchResponseGroupsMainItemComponentsRankScoreMin = 0;
export const matchSearchResponseGroupsMainItemComponentsRankScoreMax = 1;
export const matchSearchResponseGroupsMainItemUnknownFlagsMax = 9;
export const matchSearchResponseGroupsNearItemCandidateHandleMin = 47;
export const matchSearchResponseGroupsNearItemCandidateHandleMax = 47;
export const matchSearchResponseGroupsNearItemCandidateHandleRegExp = new RegExp('^cv1_[A-Za-z0-9_-]{43}$');
export const matchSearchResponseGroupsNearItemPublicContextStackOneMax = 4;
export const matchSearchResponseGroupsNearItemPublicContextWorkFormatsOneMax = 3;
export const matchSearchResponseGroupsNearItemEvidenceSummaryMax = 12;
export const matchSearchResponseGroupsNearItemComponentsFitMin = 0;
export const matchSearchResponseGroupsNearItemComponentsFitMax = 1;
export const matchSearchResponseGroupsNearItemComponentsCoverageMin = 0;
export const matchSearchResponseGroupsNearItemComponentsCoverageMax = 1;
export const matchSearchResponseGroupsNearItemComponentsDomainMin = 0;
export const matchSearchResponseGroupsNearItemComponentsDomainMax = 1;
export const matchSearchResponseGroupsNearItemComponentsSemanticsMin = 0;
export const matchSearchResponseGroupsNearItemComponentsSemanticsMax = 1;
export const matchSearchResponseGroupsNearItemComponentsPercentileOneMin = 0;
export const matchSearchResponseGroupsNearItemComponentsPercentileOneMax = 1;
export const matchSearchResponseGroupsNearItemComponentsCompetitionMin = 0;
export const matchSearchResponseGroupsNearItemComponentsCompetitionMax = 1;
export const matchSearchResponseGroupsNearItemComponentsFreshnessMin = 0;
export const matchSearchResponseGroupsNearItemComponentsFreshnessMax = 1;
export const matchSearchResponseGroupsNearItemComponentsResponsivenessMin = 0;
export const matchSearchResponseGroupsNearItemComponentsResponsivenessMax = 1;
export const matchSearchResponseGroupsNearItemComponentsRankScoreMin = 0;
export const matchSearchResponseGroupsNearItemComponentsRankScoreMax = 1;
export const matchSearchResponseGroupsNearItemUnknownFlagsMax = 9;
export const matchSearchResponseGroupsUnconfirmedItemCandidateHandleMin = 47;
export const matchSearchResponseGroupsUnconfirmedItemCandidateHandleMax = 47;
export const matchSearchResponseGroupsUnconfirmedItemCandidateHandleRegExp = new RegExp('^cv1_[A-Za-z0-9_-]{43}$');
export const matchSearchResponseGroupsUnconfirmedItemPublicContextStackOneMax = 4;
export const matchSearchResponseGroupsUnconfirmedItemPublicContextWorkFormatsOneMax = 3;
export const matchSearchResponseGroupsUnconfirmedItemEvidenceSummaryMax = 12;
export const matchSearchResponseGroupsUnconfirmedItemComponentsFitMin = 0;
export const matchSearchResponseGroupsUnconfirmedItemComponentsFitMax = 1;
export const matchSearchResponseGroupsUnconfirmedItemComponentsCoverageMin = 0;
export const matchSearchResponseGroupsUnconfirmedItemComponentsCoverageMax = 1;
export const matchSearchResponseGroupsUnconfirmedItemUnknownFlagsMax = 9;
export const MatchSearchResponse = zod.object({
"source": zod.union([zod.object({
"kind": zod.enum(['need']),
"need_id": zod.uuid(),
"requirements_version": zod.int().min(1).describe('Version of an employer need. Creation makes version 1, and every committed change of the need advances it by exactly one, including a change made by the server, such as a planned asynchronous ML suggestion. Each version is an immutable snapshot of the need. `requirements_version` names the version whose confirmed requirements are current, so a change that leaves them unchanged creates a need version without a new requirements version.')
}).describe('The immutable need requirements snapshot used by this result.'),zod.object({
"kind": zod.enum(['bank']),
"filters": zod.object({
"specialization": zod.union([zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),zod.null()]),
"confirmed_grade": zod.union([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.'),zod.null()]),
"confirmed_category": zod.union([zod.object({
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
"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.')
}).describe('A confirmed category filter, never a candidate declaration.'),zod.null()]),
"confirmation_status": zod.union([zod.enum(['confirmed', 'unconfirmed']).describe('Confirmation state for this specialization only. A result for one specialization never changes the state of another specialization.'),zod.null()]),
"declared_grade": zod.union([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.'),zod.null()]),
"stack": zod.union([zod.array(zod.enum(['go', 'postgresql', 'kafka', 'docker']).describe('A stack code that the anonymous card may expose. Search filters do not accept arbitrary profile text or candidate-provided evidence.')).min(1).max(matchSearchResponseSourceTwoFiltersStackOneMax),zod.null()]),
"conditions": zod.union([zod.object({
"work_formats": zod.union([zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).min(1).max(matchSearchResponseSourceTwoFiltersConditionsOneWorkFormatsOneMax),zod.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('Conditions echoed as a complete snapshot; null means no filter.'),zod.null()])
}).describe('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.')
}).describe('The normalized filters used for a bank search.')]).describe('Search basis echoed with the response so the displayed result remains tied to its need requirements version or bank filters.'),
"groups": zod.object({
"main": zod.array(zod.object({
"candidate_handle": zod.string().min(matchSearchResponseGroupsMainItemCandidateHandleMin).max(matchSearchResponseGroupsMainItemCandidateHandleMax).regex(matchSearchResponseGroupsMainItemCandidateHandleRegExp).describe('Opaque reference to a candidate as one organization sees it, taken from the organization-scoped anonymous card. It is a versioned HMAC alias, not a candidate account or profile identifier; it contains no contact information and is meaningless to another organization. The server resolves it only against the current visible cohort of the organization in the path. Clients never parse or construct it. It is shared by the candidate-card read and invitations.'),
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
"confirmation_status": zod.enum(['confirmed']),
"declared_grade": zod.union([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.'),zod.null()]).describe('Candidate-declared grade for this specialization, never a confirmation.'),
"category": zod.object({
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
"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.')
}).describe('A confirmed category. Its specialization must equal the enclosing match entry\'s specialization.'),
"strength": zod.enum(['standard', 'strong']).describe('Coarse strength of a confirmed assessment for this specialization.'),
"public_context": zod.object({
"stack": zod.union([zod.array(zod.enum(['go', 'postgresql', 'kafka', 'docker']).describe('A stack code that the anonymous card may expose. Search filters do not accept arbitrary profile text or candidate-provided evidence.')).max(matchSearchResponseGroupsMainItemPublicContextStackOneMax),zod.null()]),
"experience_band": zod.union([zod.enum(['0_1', '1_3', '3_6', '6_plus', '0_3', '3_plus']).describe('Coarse total experience bucket. Rare combinations may be generalized to 0_3 or 3_plus before they are returned.'),zod.null()]),
"work_formats": zod.union([zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).max(matchSearchResponseGroupsMainItemPublicContextWorkFormatsOneMax),zod.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('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.'),
"evidence_summary": zod.array(zod.object({
"code": zod.enum(['confirmed_category', 'required_skill_evidence', 'desired_skill_evidence', 'domain_alignment', 'task_alignment', 'work_conditions_match', 'salary_compatibility', 'declared_grade']).describe('Template code for an explanation derived from allowed evidence. It carries no free text, raw answer, or reason for withheld FSP data.'),
"state": zod.enum(['supports', 'partial', 'gap', 'declared_only'])
}).describe('A templated, non-text evidence explanation.')).max(matchSearchResponseGroupsMainItemEvidenceSummaryMax),
"components": zod.object({
"fit": zod.number().min(matchSearchResponseGroupsMainItemComponentsFitMin).max(matchSearchResponseGroupsMainItemComponentsFitMax).describe('A normalized FR09 ranking component from 0 to 1.'),
"coverage": zod.number().min(matchSearchResponseGroupsMainItemComponentsCoverageMin).max(matchSearchResponseGroupsMainItemComponentsCoverageMax).describe('A normalized FR09 ranking component from 0 to 1.'),
"domain": zod.number().min(matchSearchResponseGroupsMainItemComponentsDomainMin).max(matchSearchResponseGroupsMainItemComponentsDomainMax).describe('A normalized FR09 ranking component from 0 to 1.'),
"semantics": zod.number().min(matchSearchResponseGroupsMainItemComponentsSemanticsMin).max(matchSearchResponseGroupsMainItemComponentsSemanticsMax).describe('A normalized FR09 ranking component from 0 to 1.'),
"percentile": zod.union([zod.number().min(matchSearchResponseGroupsMainItemComponentsPercentileOneMin).max(matchSearchResponseGroupsMainItemComponentsPercentileOneMax),zod.null()]).describe('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`.'),
"competition": zod.number().min(matchSearchResponseGroupsMainItemComponentsCompetitionMin).max(matchSearchResponseGroupsMainItemComponentsCompetitionMax).describe('A normalized FR09 ranking component from 0 to 1.'),
"freshness": zod.number().min(matchSearchResponseGroupsMainItemComponentsFreshnessMin).max(matchSearchResponseGroupsMainItemComponentsFreshnessMax).describe('A normalized FR09 ranking component from 0 to 1.'),
"responsiveness": zod.number().min(matchSearchResponseGroupsMainItemComponentsResponsivenessMin).max(matchSearchResponseGroupsMainItemComponentsResponsivenessMax).describe('A normalized FR09 ranking component from 0 to 1.'),
"rank_score": zod.number().min(matchSearchResponseGroupsMainItemComponentsRankScoreMin).max(matchSearchResponseGroupsMainItemComponentsRankScoreMax).describe('A normalized FR09 ranking component from 0 to 1.')
}).describe('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`.'),
"unknown_flags": zod.array(zod.object({
"component": zod.enum(['semantics', 'percentile', 'assessment', 'freshness', 'responsiveness', 'experience_band', 'work_formats', 'salary_compatibility', 'domain']).describe('Ranking or public-card component whose value is unknown.'),
"reason": zod.enum(['ml_unavailable', 'cohort_below_30', 'no_confirmation_for_specialization', 'not_in_public_card', 'need_field_unconfirmed', 'no_freshness_history', 'no_response_history']).describe('Bounded explanation for an unknown component, not a hiding reason.')
}).describe('A safe, bounded explanation for one unavailable component.')).max(matchSearchResponseGroupsMainItemUnknownFlagsMax)
}).describe('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.')),
"near": zod.array(zod.object({
"candidate_handle": zod.string().min(matchSearchResponseGroupsNearItemCandidateHandleMin).max(matchSearchResponseGroupsNearItemCandidateHandleMax).regex(matchSearchResponseGroupsNearItemCandidateHandleRegExp).describe('Opaque reference to a candidate as one organization sees it, taken from the organization-scoped anonymous card. It is a versioned HMAC alias, not a candidate account or profile identifier; it contains no contact information and is meaningless to another organization. The server resolves it only against the current visible cohort of the organization in the path. Clients never parse or construct it. It is shared by the candidate-card read and invitations.'),
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
"confirmation_status": zod.enum(['confirmed']),
"declared_grade": zod.union([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.'),zod.null()]).describe('Candidate-declared grade for this specialization, never a confirmation.'),
"category": zod.object({
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
"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.')
}).describe('A confirmed category. Its specialization must equal the enclosing match entry\'s specialization.'),
"strength": zod.enum(['standard', 'strong']).describe('Coarse strength of a confirmed assessment for this specialization.'),
"public_context": zod.object({
"stack": zod.union([zod.array(zod.enum(['go', 'postgresql', 'kafka', 'docker']).describe('A stack code that the anonymous card may expose. Search filters do not accept arbitrary profile text or candidate-provided evidence.')).max(matchSearchResponseGroupsNearItemPublicContextStackOneMax),zod.null()]),
"experience_band": zod.union([zod.enum(['0_1', '1_3', '3_6', '6_plus', '0_3', '3_plus']).describe('Coarse total experience bucket. Rare combinations may be generalized to 0_3 or 3_plus before they are returned.'),zod.null()]),
"work_formats": zod.union([zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).max(matchSearchResponseGroupsNearItemPublicContextWorkFormatsOneMax),zod.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('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.'),
"evidence_summary": zod.array(zod.object({
"code": zod.enum(['confirmed_category', 'required_skill_evidence', 'desired_skill_evidence', 'domain_alignment', 'task_alignment', 'work_conditions_match', 'salary_compatibility', 'declared_grade']).describe('Template code for an explanation derived from allowed evidence. It carries no free text, raw answer, or reason for withheld FSP data.'),
"state": zod.enum(['supports', 'partial', 'gap', 'declared_only'])
}).describe('A templated, non-text evidence explanation.')).max(matchSearchResponseGroupsNearItemEvidenceSummaryMax),
"components": zod.object({
"fit": zod.number().min(matchSearchResponseGroupsNearItemComponentsFitMin).max(matchSearchResponseGroupsNearItemComponentsFitMax).describe('A normalized FR09 ranking component from 0 to 1.'),
"coverage": zod.number().min(matchSearchResponseGroupsNearItemComponentsCoverageMin).max(matchSearchResponseGroupsNearItemComponentsCoverageMax).describe('A normalized FR09 ranking component from 0 to 1.'),
"domain": zod.number().min(matchSearchResponseGroupsNearItemComponentsDomainMin).max(matchSearchResponseGroupsNearItemComponentsDomainMax).describe('A normalized FR09 ranking component from 0 to 1.'),
"semantics": zod.number().min(matchSearchResponseGroupsNearItemComponentsSemanticsMin).max(matchSearchResponseGroupsNearItemComponentsSemanticsMax).describe('A normalized FR09 ranking component from 0 to 1.'),
"percentile": zod.union([zod.number().min(matchSearchResponseGroupsNearItemComponentsPercentileOneMin).max(matchSearchResponseGroupsNearItemComponentsPercentileOneMax),zod.null()]).describe('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`.'),
"competition": zod.number().min(matchSearchResponseGroupsNearItemComponentsCompetitionMin).max(matchSearchResponseGroupsNearItemComponentsCompetitionMax).describe('A normalized FR09 ranking component from 0 to 1.'),
"freshness": zod.number().min(matchSearchResponseGroupsNearItemComponentsFreshnessMin).max(matchSearchResponseGroupsNearItemComponentsFreshnessMax).describe('A normalized FR09 ranking component from 0 to 1.'),
"responsiveness": zod.number().min(matchSearchResponseGroupsNearItemComponentsResponsivenessMin).max(matchSearchResponseGroupsNearItemComponentsResponsivenessMax).describe('A normalized FR09 ranking component from 0 to 1.'),
"rank_score": zod.number().min(matchSearchResponseGroupsNearItemComponentsRankScoreMin).max(matchSearchResponseGroupsNearItemComponentsRankScoreMax).describe('A normalized FR09 ranking component from 0 to 1.')
}).describe('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`.'),
"unknown_flags": zod.array(zod.object({
"component": zod.enum(['semantics', 'percentile', 'assessment', 'freshness', 'responsiveness', 'experience_band', 'work_formats', 'salary_compatibility', 'domain']).describe('Ranking or public-card component whose value is unknown.'),
"reason": zod.enum(['ml_unavailable', 'cohort_below_30', 'no_confirmation_for_specialization', 'not_in_public_card', 'need_field_unconfirmed', 'no_freshness_history', 'no_response_history']).describe('Bounded explanation for an unknown component, not a hiding reason.')
}).describe('A safe, bounded explanation for one unavailable component.')).max(matchSearchResponseGroupsNearItemUnknownFlagsMax)
}).describe('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.')),
"unconfirmed": zod.array(zod.object({
"candidate_handle": zod.string().min(matchSearchResponseGroupsUnconfirmedItemCandidateHandleMin).max(matchSearchResponseGroupsUnconfirmedItemCandidateHandleMax).regex(matchSearchResponseGroupsUnconfirmedItemCandidateHandleRegExp).describe('Opaque reference to a candidate as one organization sees it, taken from the organization-scoped anonymous card. It is a versioned HMAC alias, not a candidate account or profile identifier; it contains no contact information and is meaningless to another organization. The server resolves it only against the current visible cohort of the organization in the path. Clients never parse or construct it. It is shared by the candidate-card read and invitations.'),
"specialization": zod.enum(['backend', 'frontend', 'mobile', 'network_engineer', 'devops_sre', 'data_analyst', 'ds_ml', 'information_security', 'qa']).describe('Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.\n\n- backend: Backend (development).\n- frontend: Frontend (development).\n- mobile: Mobile (development).\n- network_engineer: Network Engineer (infrastructure).\n- devops_sre: DevOps/SRE (infrastructure).\n- data_analyst: Data Analyst (data).\n- ds_ml: DS/ML (data).\n- information_security: Information security (security).\n- qa: QA (quality).\n\nAdding a value is a contract change; renaming or removing one is a breaking change.'),
"confirmation_status": zod.enum(['unconfirmed']),
"declared_grade": zod.union([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.'),zod.null()]).describe('Candidate-declared grade, separate from assessment confirmation.'),
"category": zod.null().describe('There is no confirmed category for this specialization.'),
"strength": zod.null().describe('Assessment strength is not measured for this specialization.'),
"public_context": zod.object({
"stack": zod.union([zod.array(zod.enum(['go', 'postgresql', 'kafka', 'docker']).describe('A stack code that the anonymous card may expose. Search filters do not accept arbitrary profile text or candidate-provided evidence.')).max(matchSearchResponseGroupsUnconfirmedItemPublicContextStackOneMax),zod.null()]),
"experience_band": zod.union([zod.enum(['0_1', '1_3', '3_6', '6_plus', '0_3', '3_plus']).describe('Coarse total experience bucket. Rare combinations may be generalized to 0_3 or 3_plus before they are returned.'),zod.null()]),
"work_formats": zod.union([zod.array(zod.enum(['remote', 'office', 'hybrid']).describe('Acceptable work format: `remote`, `office`, or `hybrid`.')).max(matchSearchResponseGroupsUnconfirmedItemPublicContextWorkFormatsOneMax),zod.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('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.'),
"evidence_summary": zod.array(zod.object({
"code": zod.enum(['confirmed_category', 'required_skill_evidence', 'desired_skill_evidence', 'domain_alignment', 'task_alignment', 'work_conditions_match', 'salary_compatibility', 'declared_grade']).describe('Template code for an explanation derived from allowed evidence. It carries no free text, raw answer, or reason for withheld FSP data.'),
"state": zod.enum(['supports', 'partial', 'gap', 'declared_only'])
}).describe('A templated, non-text evidence explanation.')).max(matchSearchResponseGroupsUnconfirmedItemEvidenceSummaryMax),
"components": zod.object({
"fit": zod.number().min(matchSearchResponseGroupsUnconfirmedItemComponentsFitMin).max(matchSearchResponseGroupsUnconfirmedItemComponentsFitMax).describe('Job fit for this specialization, never an assessment score.'),
"coverage": zod.number().min(matchSearchResponseGroupsUnconfirmedItemComponentsCoverageMin).max(matchSearchResponseGroupsUnconfirmedItemComponentsCoverageMax).describe('Coverage of confirmed need skills by allowed public evidence.')
}).describe('Unconfirmed entries are ordered only by Fit and coverage. This strict component object has no theta, T, P, test percentile, or confirmed assessment score.'),
"unknown_flags": zod.array(zod.object({
"component": zod.enum(['semantics', 'percentile', 'assessment', 'freshness', 'responsiveness', 'experience_band', 'work_formats', 'salary_compatibility', 'domain']).describe('Ranking or public-card component whose value is unknown.'),
"reason": zod.enum(['ml_unavailable', 'cohort_below_30', 'no_confirmation_for_specialization', 'not_in_public_card', 'need_field_unconfirmed', 'no_freshness_history', 'no_response_history']).describe('Bounded explanation for an unknown component, not a hiding reason.')
}).describe('A safe, bounded explanation for one unavailable component.')).max(matchSearchResponseGroupsUnconfirmedItemUnknownFlagsMax)
}).describe('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.'))
}).describe('Separate ranking groups. Confirmed categories appear in main and near; unconfirmed specializations appear only in the lower unconfirmed group.')
}).describe('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.')
export type MatchSearchResponse = zod.input<typeof MatchSearchResponse>;
export type MatchSearchResponseOutput = zod.output<typeof MatchSearchResponse>;