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,39 @@
/**
* Generated by orval 🍺
* Do not edit manually.
* Lincodex API
* OpenAPI spec version: 0.1.0
*/
import * as zod from 'zod';
export const matchSearchSourceTwoFiltersStackOneMax = 4;
export const matchSearchSourceTwoFiltersConditionsOneWorkFormatsOneMax = 3;
export const MatchSearchSource = 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(matchSearchSourceTwoFiltersStackOneMax),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(matchSearchSourceTwoFiltersConditionsOneWorkFormatsOneMax),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.')
export type MatchSearchSource = zod.input<typeof MatchSearchSource>;
export type MatchSearchSourceOutput = zod.output<typeof MatchSearchSource>;