39 lines
4.7 KiB
TypeScript
39 lines
4.7 KiB
TypeScript
/**
|
|
* Generated by orval 🍺
|
|
* Do not edit manually.
|
|
* Lincodex API
|
|
* OpenAPI spec version: 0.1.0
|
|
*/
|
|
import * as zod from 'zod';
|
|
|
|
export const needSkillNameMax = 100;
|
|
|
|
|
|
export const needSkillNameRegExp = new RegExp('^\\S(?:.*\\S)?$');
|
|
export const needSkillTaxonomyCodeOneMax = 64;
|
|
|
|
|
|
export const needSkillTaxonomyCodeOneRegExp = new RegExp('^[a-z0-9][a-z0-9_.+#-]*$');
|
|
export const needSkillSourceQuoteOneMax = 300;
|
|
|
|
|
|
export const needSkillSourceExtractionVersionOneMax = 64;
|
|
|
|
|
|
export const needSkillSourceExtractionVersionOneRegExp = new RegExp('^[A-Za-z0-9._-]+$');
|
|
|
|
export const NeedSkill = zod.object({
|
|
"name": zod.string().min(1).max(needSkillNameMax).regex(needSkillNameRegExp).describe('Name of a skill or technology as the employer gave it, for example Go, PostgreSQL, or Temporal. It has no leading or trailing whitespace and no line breaks. The server compares names without regard to letter case. Plain text; clients show it as text, never as HTML.'),
|
|
"taxonomy_code": zod.union([zod.string().min(1).max(needSkillTaxonomyCodeOneMax).regex(needSkillTaxonomyCodeOneRegExp).describe('Code of a skill in the platform skill taxonomy, for example `postgresql`. The server assigns it from the taxonomy; clients never send it and never derive it from the name.'),zod.null()]),
|
|
"status": zod.enum(['confirmed', 'extracted']).describe('Confirmation state of a list item, and the decision that a request sends for a field or an item: `confirmed` or `extracted`, with the meaning of NeedValueStatus. A request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion unconfirmed with exactly its stored value. An item is never `unknown`; a list with no confirmed item is what readiness reports as missing.'),
|
|
"source": zod.object({
|
|
"origin": zod.enum(['manual', 'extracted_from_text', 'imported']).describe('Where the value of a field or item came from. The server sets it; a request never sends it.\n\n- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.\n- extracted_from_text: the server extracted the value from `source_text`, with the deterministic rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor version.\n- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.\n\nConfirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'),
|
|
"quote": zod.union([zod.string().min(1).max(needSkillSourceQuoteOneMax).describe('Exact excerpt of the `source_text` that the value was extracted from, so a reviewer can check it. It may contain line breaks. Plain text; clients show it as text, never as HTML.'),zod.null()]).describe('Excerpt of the need text that supports the value, or null for a manual value and for an extracted value that the extractor did not tie to one excerpt.'),
|
|
"extracted_in_version": zod.union([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.'),zod.null()]).describe('Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or null for a manual value. A confirmed value keeps it after the text changes, so its quote may be absent from the current `source_text`.'),
|
|
"extraction_version": zod.union([zod.string().min(1).max(needSkillSourceExtractionVersionOneMax).regex(needSkillSourceExtractionVersionOneRegExp).describe('Opaque identifier of a published extractor or algorithm version, for example `need-rules.2026-10.1`. Clients show it as text and never parse it.'),zod.null()]).describe('Extractor version for an extracted or imported value, or null for a manual value.')
|
|
}).describe('Provenance of a value: its origin, the quote it was extracted from, the need version whose text the quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot set it.')
|
|
}).describe('One required or desired skill of the need. `taxonomy_code` is null for a skill that the platform taxonomy does not know: the server keeps the name as given, never maps it to a guessed code, and counts it as not covered in category recommendations.')
|
|
|
|
export type NeedSkill = zod.input<typeof NeedSkill>;
|
|
export type NeedSkillOutput = zod.output<typeof NeedSkill>;
|