feat(api): add employer need contract with requirement versions and recommendations
This commit is contained in:
1 parent
3adb0ef9e4
commit
a7d5781f2d
95 files changed
+25352
-26
No files matched your search
@@ -1624,6 +1624,918 @@ Session:
|
||||
$ref: '#/Account'
|
||||
csrf_token:
|
||||
$ref: '#/CsrfToken'
|
||||
NeedVersion:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
description: 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.
|
||||
examples:
|
||||
- 2
|
||||
NeedTitle:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 200
|
||||
pattern: ^\S(?:.*\S)?$
|
||||
description: Short name of the need inside the organization, for example "Backend for the payments team". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.
|
||||
NeedSourceText:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 10000
|
||||
description: 'Free description of the team''s tasks as the employer wrote or pasted it. The server extracts proposed requirements from it; the text itself is never a requirement. It may contain line breaks. Plain text; clients show it as text, never as HTML. It describes the job and must not contain personal data of candidates. The server stores it as written: it may contain requirements that discriminate by a protected characteristic, and the extractor never turns such a requirement into a need field. Exclusions, the requirements that a candidate must not meet, are planned as a separate additive field with the Labor Code article 64 check (TASK-182).'
|
||||
NeedValueStatus:
|
||||
type: string
|
||||
description: 'Confirmation state of one need field.
|
||||
|
||||
|
||||
- confirmed: a member of the organization entered the value or confirmed it. Only confirmed values feed readiness, category recommendations, search, and invitations.
|
||||
|
||||
- extracted: the server proposed the value from the need text or an import, and nobody has confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts as an answer in readiness.
|
||||
|
||||
- unknown: the field has no value. `value` and `source` are null. The server never fills an unknown field with a default or a guess, such as a Senior grade, the remote format, or a zero salary.'
|
||||
enum:
|
||||
- confirmed
|
||||
- extracted
|
||||
- unknown
|
||||
NeedItemStatus:
|
||||
type: string
|
||||
description: '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.'
|
||||
enum:
|
||||
- confirmed
|
||||
- extracted
|
||||
NeedValueOrigin:
|
||||
type: string
|
||||
description: 'Where the value of a field or item came from. The server sets it; a request never sends it.
|
||||
|
||||
|
||||
- manual: a member of the organization typed the value in the form. `quote`, `extraction_version`, and `extracted_in_version` are null.
|
||||
|
||||
- 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.
|
||||
|
||||
- imported: planned; the value was copied from a linked vacancy or an import. No MVP operation produces it.
|
||||
|
||||
|
||||
Confirming an extracted value keeps its origin and quote; changing the value makes it `manual`. Adding a value is a contract change.'
|
||||
enum:
|
||||
- manual
|
||||
- extracted_from_text
|
||||
- imported
|
||||
NeedSourceQuote:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 300
|
||||
description: 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.
|
||||
NeedVersionLabel:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 64
|
||||
pattern: ^[A-Za-z0-9._-]+$
|
||||
description: 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.
|
||||
NeedValueSource:
|
||||
type: object
|
||||
description: '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.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- origin
|
||||
- quote
|
||||
- extracted_in_version
|
||||
- extraction_version
|
||||
properties:
|
||||
origin:
|
||||
$ref: '#/NeedValueOrigin'
|
||||
quote:
|
||||
description: 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.
|
||||
oneOf:
|
||||
- $ref: '#/NeedSourceQuote'
|
||||
- type: 'null'
|
||||
extracted_in_version:
|
||||
description: 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`.
|
||||
oneOf:
|
||||
- $ref: '#/NeedVersion'
|
||||
- type: 'null'
|
||||
extraction_version:
|
||||
description: Extractor version for an extracted or imported value, or null for a manual value.
|
||||
oneOf:
|
||||
- $ref: '#/NeedVersionLabel'
|
||||
- type: 'null'
|
||||
SkillName:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 100
|
||||
pattern: ^\S(?:.*\S)?$
|
||||
description: 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.
|
||||
SkillTaxonomyCode:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 64
|
||||
pattern: ^[a-z0-9][a-z0-9_.+#-]*$
|
||||
description: 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.
|
||||
NeedTaskText:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 300
|
||||
pattern: ^\S(?:.*\S)?$
|
||||
description: One work task of the team, for example "Move the payout service to an event model". It has no leading or trailing whitespace and no line breaks. Plain text; clients show it as text, never as HTML.
|
||||
NeedDomainName:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 100
|
||||
pattern: ^\S(?:.*\S)?$
|
||||
description: Business domain of the work, for example payments or logistics, as free text. Plain text without line breaks; clients show it as text, never as HTML.
|
||||
NeedLocationName:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 100
|
||||
pattern: ^\S(?:.*\S)?$
|
||||
description: Place of work for the office or hybrid format, for example a city, as free text. It describes the employer's office, never a candidate's address. Plain text without line breaks; clients show it as text, never as HTML.
|
||||
RubAmount:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1000
|
||||
maximum: 100000000
|
||||
multipleOf: 1000
|
||||
description: Amount of money in whole rubles. A salary bound is positive and a multiple of 1000, the step that PRD FR13 sets for the bounds of a salary range and for the bids of the sealed final.
|
||||
examples:
|
||||
- 120000
|
||||
CurrencyCode:
|
||||
type: string
|
||||
description: ISO 4217 currency code. The MVP accepts only RUB; adding a value is a contract change.
|
||||
enum:
|
||||
- RUB
|
||||
SalaryPeriod:
|
||||
type: string
|
||||
description: Pay period of a salary amount. The MVP uses only `month`; adding a value is a contract change.
|
||||
enum:
|
||||
- month
|
||||
SalaryTaxBasis:
|
||||
type: string
|
||||
description: 'Tax basis of a salary amount: `net`, the amount paid out after personal income tax, or `gross`, the amount before it. The basis is always explicit; amounts in different bases are never compared directly.'
|
||||
enum:
|
||||
- net
|
||||
- gross
|
||||
SalaryRange:
|
||||
type: object
|
||||
description: 'Salary range `[A; B]` in whole rubles with its base: the currency, the pay period, and the tax basis (PRD FR13). The schema requires every field, bounds that are positive multiples of 1000, and the known currency, period, and basis. The server checks the cross-field rules in integer arithmetic: `salary_from < salary_to`, and a width `(B - A) / ((A + B) / 2)` from 10% to 40% inclusive, that is `20 * (B - A) >= A + B` and `5 * (B - A) <= A + B`. A violation answers 400 validation_failed with the pointer of `salary_to` in the request, for example `/salary/value/salary_to`. For example, `[95000; 105000]` has a width of exactly 10% and `[80000; 120000]` exactly 40%; both are accepted. The rules are the same for a need and an invitation.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- salary_from
|
||||
- salary_to
|
||||
- currency
|
||||
- period
|
||||
- tax_basis
|
||||
properties:
|
||||
salary_from:
|
||||
$ref: '#/RubAmount'
|
||||
salary_to:
|
||||
$ref: '#/RubAmount'
|
||||
currency:
|
||||
$ref: '#/CurrencyCode'
|
||||
period:
|
||||
$ref: '#/SalaryPeriod'
|
||||
tax_basis:
|
||||
$ref: '#/SalaryTaxBasis'
|
||||
NeedSpecialization:
|
||||
type: object
|
||||
description: Target specialization of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
- value
|
||||
- source
|
||||
properties:
|
||||
status:
|
||||
$ref: '#/NeedValueStatus'
|
||||
value:
|
||||
oneOf:
|
||||
- $ref: '#/SpecializationCode'
|
||||
- type: 'null'
|
||||
source:
|
||||
oneOf:
|
||||
- $ref: '#/NeedValueSource'
|
||||
- type: 'null'
|
||||
NeedGrade:
|
||||
type: object
|
||||
description: Target grade of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`; a text that names no grade leaves the grade unknown instead of assuming one.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
- value
|
||||
- source
|
||||
properties:
|
||||
status:
|
||||
$ref: '#/NeedValueStatus'
|
||||
value:
|
||||
oneOf:
|
||||
- $ref: '#/GradeCode'
|
||||
- type: 'null'
|
||||
source:
|
||||
oneOf:
|
||||
- $ref: '#/NeedValueSource'
|
||||
- type: 'null'
|
||||
NeedDomain:
|
||||
type: object
|
||||
description: Business domain of the need with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
- value
|
||||
- source
|
||||
properties:
|
||||
status:
|
||||
$ref: '#/NeedValueStatus'
|
||||
value:
|
||||
oneOf:
|
||||
- $ref: '#/NeedDomainName'
|
||||
- type: 'null'
|
||||
source:
|
||||
oneOf:
|
||||
- $ref: '#/NeedValueSource'
|
||||
- type: 'null'
|
||||
NeedWorkFormats:
|
||||
type: object
|
||||
description: Work formats that the employer offers, with their confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`; a known value lists one to three formats.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
- value
|
||||
- source
|
||||
properties:
|
||||
status:
|
||||
$ref: '#/NeedValueStatus'
|
||||
value:
|
||||
type:
|
||||
- array
|
||||
- 'null'
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
uniqueItems: true
|
||||
items:
|
||||
$ref: '#/WorkFormat'
|
||||
source:
|
||||
oneOf:
|
||||
- $ref: '#/NeedValueSource'
|
||||
- type: 'null'
|
||||
NeedLocation:
|
||||
type: object
|
||||
description: Place of work with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`. Readiness requires a confirmed place only when the confirmed work formats include `office` or `hybrid`.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
- value
|
||||
- source
|
||||
properties:
|
||||
status:
|
||||
$ref: '#/NeedValueStatus'
|
||||
value:
|
||||
oneOf:
|
||||
- $ref: '#/NeedLocationName'
|
||||
- type: 'null'
|
||||
source:
|
||||
oneOf:
|
||||
- $ref: '#/NeedValueSource'
|
||||
- type: 'null'
|
||||
NeedSalary:
|
||||
type: object
|
||||
description: Salary range that the employer offers, with its confirmation state and provenance. `value` and `source` are null exactly when `status` is `unknown`. A text without a salary leaves it unknown; the server never substitutes zero, a market estimate, or a range from another need.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
- value
|
||||
- source
|
||||
properties:
|
||||
status:
|
||||
$ref: '#/NeedValueStatus'
|
||||
value:
|
||||
oneOf:
|
||||
- $ref: '#/SalaryRange'
|
||||
- type: 'null'
|
||||
source:
|
||||
oneOf:
|
||||
- $ref: '#/NeedValueSource'
|
||||
- type: 'null'
|
||||
NeedSkill:
|
||||
type: object
|
||||
description: '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.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- name
|
||||
- taxonomy_code
|
||||
- status
|
||||
- source
|
||||
properties:
|
||||
name:
|
||||
$ref: '#/SkillName'
|
||||
taxonomy_code:
|
||||
oneOf:
|
||||
- $ref: '#/SkillTaxonomyCode'
|
||||
- type: 'null'
|
||||
status:
|
||||
$ref: '#/NeedItemStatus'
|
||||
source:
|
||||
$ref: '#/NeedValueSource'
|
||||
NeedTask:
|
||||
type: object
|
||||
description: One work task of the team with its confirmation state and provenance.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- text
|
||||
- status
|
||||
- source
|
||||
properties:
|
||||
text:
|
||||
$ref: '#/NeedTaskText'
|
||||
status:
|
||||
$ref: '#/NeedItemStatus'
|
||||
source:
|
||||
$ref: '#/NeedValueSource'
|
||||
NeedSpecializationInput:
|
||||
type: object
|
||||
description: Decision about the specialization in a request; see NeedUpdate for the rules of `status`.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- value
|
||||
- status
|
||||
properties:
|
||||
value:
|
||||
$ref: '#/SpecializationCode'
|
||||
status:
|
||||
$ref: '#/NeedItemStatus'
|
||||
NeedGradeInput:
|
||||
type: object
|
||||
description: Decision about the grade in a request; see NeedUpdate for the rules of `status`.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- value
|
||||
- status
|
||||
properties:
|
||||
value:
|
||||
$ref: '#/GradeCode'
|
||||
status:
|
||||
$ref: '#/NeedItemStatus'
|
||||
NeedDomainInput:
|
||||
type: object
|
||||
description: Decision about the domain in a request; see NeedUpdate for the rules of `status`.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- value
|
||||
- status
|
||||
properties:
|
||||
value:
|
||||
$ref: '#/NeedDomainName'
|
||||
status:
|
||||
$ref: '#/NeedItemStatus'
|
||||
NeedWorkFormatsInput:
|
||||
type: object
|
||||
description: Decision about the work formats in a request; see NeedUpdate for the rules of `status`. Formats are compared as a set.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- value
|
||||
- status
|
||||
properties:
|
||||
value:
|
||||
type: array
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
uniqueItems: true
|
||||
items:
|
||||
$ref: '#/WorkFormat'
|
||||
status:
|
||||
$ref: '#/NeedItemStatus'
|
||||
NeedLocationInput:
|
||||
type: object
|
||||
description: Decision about the place of work in a request; see NeedUpdate for the rules of `status`.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- value
|
||||
- status
|
||||
properties:
|
||||
value:
|
||||
$ref: '#/NeedLocationName'
|
||||
status:
|
||||
$ref: '#/NeedItemStatus'
|
||||
NeedSalaryInput:
|
||||
type: object
|
||||
description: Decision about the salary range in a request; see NeedUpdate for the rules of `status` and SalaryRange for the rules of the range, whose pointers are under `/salary/value`.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- value
|
||||
- status
|
||||
properties:
|
||||
value:
|
||||
$ref: '#/SalaryRange'
|
||||
status:
|
||||
$ref: '#/NeedItemStatus'
|
||||
NeedSkillInput:
|
||||
type: object
|
||||
description: 'One skill of a list in a request. A name that equals, without regard to letter case, a skill of the current version in either skill list refers to that skill and keeps its origin, quote, and taxonomy code; this is how an extracted skill is confirmed or moved between the required and desired lists. Any other name is a new manual skill. `status` follows the rules of NeedUpdate: `extracted` for a name that is not a stored suggestion answers 400 validation_failed with the pointer of that `status`, for example `/required_skills/2/status`. A name repeated within or across the two skill lists answers 400 with the pointer of the later `name`.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- name
|
||||
- status
|
||||
properties:
|
||||
name:
|
||||
$ref: '#/SkillName'
|
||||
status:
|
||||
$ref: '#/NeedItemStatus'
|
||||
NeedTaskInput:
|
||||
type: object
|
||||
description: One task of the list in a request. A text equal to a task of the current version refers to that task and keeps its origin and quote; any other text is a new manual task. `status` and repeated texts follow the rules of NeedSkillInput.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- text
|
||||
- status
|
||||
properties:
|
||||
text:
|
||||
$ref: '#/NeedTaskText'
|
||||
status:
|
||||
$ref: '#/NeedItemStatus'
|
||||
NeedRequirementSet:
|
||||
type: object
|
||||
description: Requirements of one need version, each with its confirmation state and provenance. Read-only; requests change them through the fields of NeedCreate and NeedUpdate.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- specialization
|
||||
- grade
|
||||
- required_skills
|
||||
- desired_skills
|
||||
- tasks
|
||||
- domain
|
||||
- work_formats
|
||||
- location
|
||||
- salary
|
||||
properties:
|
||||
specialization:
|
||||
$ref: '#/NeedSpecialization'
|
||||
grade:
|
||||
$ref: '#/NeedGrade'
|
||||
required_skills:
|
||||
type: array
|
||||
maxItems: 30
|
||||
description: Required skills; each has weight 2 in skill coverage. Only confirmed skills count.
|
||||
items:
|
||||
$ref: '#/NeedSkill'
|
||||
desired_skills:
|
||||
type: array
|
||||
maxItems: 30
|
||||
description: Desired skills; each has weight 1 in skill coverage. Only confirmed skills count.
|
||||
items:
|
||||
$ref: '#/NeedSkill'
|
||||
tasks:
|
||||
type: array
|
||||
maxItems: 20
|
||||
description: Work tasks of the team in the order given.
|
||||
items:
|
||||
$ref: '#/NeedTask'
|
||||
domain:
|
||||
$ref: '#/NeedDomain'
|
||||
work_formats:
|
||||
$ref: '#/NeedWorkFormats'
|
||||
location:
|
||||
$ref: '#/NeedLocation'
|
||||
salary:
|
||||
$ref: '#/NeedSalary'
|
||||
NeedFieldName:
|
||||
type: string
|
||||
description: Name of a need field, equal to its property name in NeedRequirementSet and in the request bodies. Adding a value is a contract change.
|
||||
enum:
|
||||
- specialization
|
||||
- grade
|
||||
- required_skills
|
||||
- desired_skills
|
||||
- tasks
|
||||
- domain
|
||||
- work_formats
|
||||
- location
|
||||
- salary
|
||||
NeedMissingReason:
|
||||
type: string
|
||||
description: 'Why a critical field is missing: `unknown`, the field has no value, or `unconfirmed`, it has only an extracted value or, for required skills, only extracted items that wait for confirmation.'
|
||||
enum:
|
||||
- unknown
|
||||
- unconfirmed
|
||||
NeedMissingField:
|
||||
type: object
|
||||
description: One critical field that has no confirmed value, with a specific question that the client shows next to the field.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- field
|
||||
- reason
|
||||
- question
|
||||
properties:
|
||||
field:
|
||||
$ref: '#/NeedFieldName'
|
||||
reason:
|
||||
$ref: '#/NeedMissingReason'
|
||||
question:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 300
|
||||
description: Specific Russian question about the missing value, for example which grade is needed. Plain text; the client shows it as text, never as HTML.
|
||||
NeedReadinessStatus:
|
||||
type: string
|
||||
description: '`complete` when every critical field has a confirmed value, otherwise `incomplete`.'
|
||||
enum:
|
||||
- complete
|
||||
- incomplete
|
||||
NeedReadinessReport:
|
||||
type: object
|
||||
description: Completeness of the critical fields, computed by the server for the current version. The critical fields are `specialization`, `grade`, `required_skills` (at least one confirmed skill), `work_formats`, `salary`, and `location` when the confirmed work formats include `office` or `hybrid`. An incomplete need is still a valid saved need; each later operation, such as search or an invitation, states which readiness it requires.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
- missing_fields
|
||||
properties:
|
||||
status:
|
||||
$ref: '#/NeedReadinessStatus'
|
||||
missing_fields:
|
||||
type: array
|
||||
maxItems: 9
|
||||
description: Critical fields without a confirmed value, each at most once, in the order of NeedFieldName. Empty exactly when `status` is `complete`.
|
||||
items:
|
||||
$ref: '#/NeedMissingField'
|
||||
NeedRecommendationStatus:
|
||||
type: string
|
||||
description: 'State of the category recommendations of the current requirements version.
|
||||
|
||||
|
||||
- computed: `categories` holds the recommendations computed from the confirmed requirements of `requirements_version`.
|
||||
|
||||
- pending: the computation for the current requirements version has not finished yet; `categories` is empty. Read the need again later.
|
||||
|
||||
- not_available: the current requirements have no confirmed required or desired skill to compute from; `categories` is empty.'
|
||||
enum:
|
||||
- computed
|
||||
- pending
|
||||
- not_available
|
||||
NeedSkillOverlap:
|
||||
type: object
|
||||
description: 'Skill coverage of a category: the weighted share of the confirmed skills of the need that the category taxonomy covers, with weight 2 for a required and 1 for a desired skill.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- share
|
||||
- covered_skills
|
||||
- uncovered_skills
|
||||
properties:
|
||||
share:
|
||||
type: number
|
||||
format: double
|
||||
minimum: 0
|
||||
maximum: 1
|
||||
description: Weighted share from 0 to 1, rounded to two decimals.
|
||||
covered_skills:
|
||||
type: array
|
||||
maxItems: 60
|
||||
description: Confirmed skills of the need that the category covers.
|
||||
items:
|
||||
$ref: '#/SkillName'
|
||||
uncovered_skills:
|
||||
type: array
|
||||
maxItems: 60
|
||||
description: Confirmed skills of the need that the category does not cover, including skills without a taxonomy code.
|
||||
items:
|
||||
$ref: '#/SkillName'
|
||||
NeedMoneyStatus:
|
||||
type: string
|
||||
description: 'How the salary component of a recommendation was obtained.
|
||||
|
||||
|
||||
- computed: at least five available candidates of the category have a known minimum comparable with the confirmed range; `share` is given.
|
||||
|
||||
- insufficient_data: fewer than five such candidates; the policy uses the neutral value 0.5 and `share` is null.
|
||||
|
||||
- no_salary: the need has no confirmed salary range; the policy uses the neutral value 0.5 and `share` is null.
|
||||
|
||||
- withheld: the organization changed salary ranges five times within seven days, so salary aggregates are withheld for seven days (PRD FR13, planned in TASK-211); the policy uses the neutral value 0.5 and `share` is null.
|
||||
|
||||
|
||||
An unknown candidate minimum never counts as zero.'
|
||||
enum:
|
||||
- computed
|
||||
- insufficient_data
|
||||
- no_salary
|
||||
- withheld
|
||||
NeedMoneyFit:
|
||||
type: object
|
||||
description: Salary component of a recommendation. It is an aggregate over at least five candidates and never reveals a minimum of any candidate.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
- share
|
||||
properties:
|
||||
status:
|
||||
$ref: '#/NeedMoneyStatus'
|
||||
share:
|
||||
type:
|
||||
- number
|
||||
- 'null'
|
||||
format: double
|
||||
minimum: 0
|
||||
maximum: 1
|
||||
description: 'Share of those candidates whose minimum is not above the upper bound of the range, rounded down to a multiple of 0.25 (one of 0, 0.25, 0.5, 0.75, 1), or null unless `status` is `computed`. The score and the ranking use this rounded value, never the exact share. A quarter step gives five levels: each probe of a new upper bound tells at most which quarter of the group accepts it, and in the smallest allowed group of five candidates a single minimum often does not move the value, while the share still separates a range that most candidates accept from one that few accept.'
|
||||
NeedSupplyBand:
|
||||
type: string
|
||||
description: 'Number of available candidates of the category in the allowed detail: `fewer_than_5`, `from_5_to_29`, or `30_or_more`. Smaller groups are never counted exactly.'
|
||||
enum:
|
||||
- fewer_than_5
|
||||
- from_5_to_29
|
||||
- 30_or_more
|
||||
NeedCategoryRecommendation:
|
||||
type: object
|
||||
description: 'One recommended category, a specialization with a grade, with its score and the reasons for it. The score is `0.5 * Overlap + 0.3 * Money + 0.2 * Supply` (PRD FR08) computed from the published components: the exact skill overlap, the money share rounded down to a quarter or the neutral 0.5, and `Supply = min(1, active / 30)` when at least five candidates are available. For a group of fewer than five, Supply enters the ranking as 0, the same for every such group, so neither the score nor the order reveals the exact size of a group below five.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- specialization
|
||||
- grade
|
||||
- score
|
||||
- skill_overlap
|
||||
- money
|
||||
- supply
|
||||
properties:
|
||||
specialization:
|
||||
$ref: '#/SpecializationCode'
|
||||
grade:
|
||||
$ref: '#/GradeCode'
|
||||
score:
|
||||
type:
|
||||
- number
|
||||
- 'null'
|
||||
format: double
|
||||
minimum: 0
|
||||
maximum: 1
|
||||
description: Recommendation score from 0 to 1, rounded half up to two decimals, or null when `supply` is `fewer_than_5`. Read-only; no request can set it.
|
||||
skill_overlap:
|
||||
$ref: '#/NeedSkillOverlap'
|
||||
money:
|
||||
$ref: '#/NeedMoneyFit'
|
||||
supply:
|
||||
$ref: '#/NeedSupplyBand'
|
||||
NeedCategoryRecommendations:
|
||||
type: object
|
||||
description: 'Category recommendations computed by the server from the confirmed requirements of `requirements_version` with a versioned policy (PRD FR08). Read-only: no request can set a recommendation, a score, or one of its components. The server may recompute them for the same requirements version, for example for a new policy or a changed pool of available candidates, without a new need version; `computed_at` and `policy_version` then change. The policy version and the candidate group used are stored with each computation, so a later policy never rewrites it.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- status
|
||||
- requirements_version
|
||||
- policy_version
|
||||
- algorithm_version
|
||||
- computed_at
|
||||
- categories
|
||||
properties:
|
||||
status:
|
||||
$ref: '#/NeedRecommendationStatus'
|
||||
requirements_version:
|
||||
$ref: '#/NeedVersion'
|
||||
policy_version:
|
||||
type:
|
||||
- integer
|
||||
- 'null'
|
||||
format: int32
|
||||
minimum: 1
|
||||
description: Number of the policy version whose weights were applied, or null unless `status` is `computed`.
|
||||
algorithm_version:
|
||||
description: Version of the recommendation algorithm, or null unless `status` is `computed`.
|
||||
oneOf:
|
||||
- $ref: '#/NeedVersionLabel'
|
||||
- type: 'null'
|
||||
computed_at:
|
||||
description: Time of the computation, or null unless `status` is `computed`.
|
||||
oneOf:
|
||||
- $ref: '#/Timestamp'
|
||||
- type: 'null'
|
||||
categories:
|
||||
type: array
|
||||
maxItems: 10
|
||||
description: Recommended categories, best first by the score described in NeedCategoryRecommendation. Empty unless `status` is `computed`.
|
||||
items:
|
||||
$ref: '#/NeedCategoryRecommendation'
|
||||
Need:
|
||||
type: object
|
||||
description: 'Hiring need of an organization: what the team needs, independent of any published vacancy. It holds the current version of the requirements with their provenance, the readiness of the critical fields, and the category recommendations. It never contains membership data, a candidate''s personal data, or a candidate''s salary minimum.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- organization_id
|
||||
- vacancy_id
|
||||
- title
|
||||
- source_text
|
||||
- version
|
||||
- requirements_version
|
||||
- requirements
|
||||
- readiness
|
||||
- recommendations
|
||||
- created_at
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of the need.
|
||||
organization_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Organization that owns the need, equal to `org_id` of the path. It never changes.
|
||||
vacancy_id:
|
||||
type:
|
||||
- string
|
||||
- 'null'
|
||||
format: uuid
|
||||
description: Linked vacancy of the same organization, or null. A need never requires a vacancy.
|
||||
title:
|
||||
$ref: '#/NeedTitle'
|
||||
source_text:
|
||||
description: Text the requirements were extracted from, or null.
|
||||
oneOf:
|
||||
- $ref: '#/NeedSourceText'
|
||||
- type: 'null'
|
||||
version:
|
||||
$ref: '#/NeedVersion'
|
||||
requirements_version:
|
||||
description: Need version in which the current confirmed requirements were last changed, at most `version`. A change that confirms, changes, or removes a requirement makes it equal to the new `version`. A change of the title, the vacancy link, or the text, or of suggestions only, creates a new `version` but keeps `requirements_version`, so it invalidates neither the recommendations nor search results and selection snapshots. Search runs and selection snapshots (PRD FR10) refer to `(need id, requirements_version)`, and a new selection snapshot is due only when it changes.
|
||||
allOf:
|
||||
- $ref: '#/NeedVersion'
|
||||
requirements:
|
||||
$ref: '#/NeedRequirementSet'
|
||||
readiness:
|
||||
$ref: '#/NeedReadinessReport'
|
||||
recommendations:
|
||||
$ref: '#/NeedCategoryRecommendations'
|
||||
created_at:
|
||||
$ref: '#/Timestamp'
|
||||
updated_at:
|
||||
$ref: '#/Timestamp'
|
||||
NeedSummary:
|
||||
type: object
|
||||
description: 'Need in a list: its identity, current version, target category fields, and readiness. Read the need for the requirements and the recommendations.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- vacancy_id
|
||||
- title
|
||||
- version
|
||||
- specialization
|
||||
- grade
|
||||
- readiness
|
||||
- created_at
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: Identifier of the need.
|
||||
vacancy_id:
|
||||
type:
|
||||
- string
|
||||
- 'null'
|
||||
format: uuid
|
||||
description: Linked vacancy, or null.
|
||||
title:
|
||||
$ref: '#/NeedTitle'
|
||||
version:
|
||||
$ref: '#/NeedVersion'
|
||||
specialization:
|
||||
$ref: '#/NeedSpecialization'
|
||||
grade:
|
||||
$ref: '#/NeedGrade'
|
||||
readiness:
|
||||
$ref: '#/NeedReadinessReport'
|
||||
created_at:
|
||||
$ref: '#/Timestamp'
|
||||
updated_at:
|
||||
$ref: '#/Timestamp'
|
||||
NeedList:
|
||||
type: object
|
||||
description: One page of the needs of an organization, newest first by creation time.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- items
|
||||
- page
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
maxItems: 100
|
||||
description: Needs of the page.
|
||||
items:
|
||||
$ref: '#/NeedSummary'
|
||||
page:
|
||||
$ref: '#/PageInfo'
|
||||
NeedCreate:
|
||||
type: object
|
||||
description: New need. Only `title` is required, so a need can start from a title, from a text, or from form fields, and with or without a vacancy. A field or list item given here must have `status` `confirmed` and becomes a confirmed manual value; `extracted` answers 400 with the pointer of that `status`, such as `/grade/status`, because a new need has no stored suggestion. A field that is absent is extracted from `source_text` when the text is given and is left unknown or empty otherwise. A nullable field sent as null, and a skill or task list sent as an empty list, stays unknown or empty and is not extracted; an empty `work_formats` value fails `minItems`. Unknown fields are rejected, so a request cannot set membership, a role, a status of the need, a provenance, readiness, a recommendation or its score, or a candidate's salary minimum.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- title
|
||||
properties:
|
||||
title:
|
||||
$ref: '#/NeedTitle'
|
||||
vacancy_id:
|
||||
type:
|
||||
- string
|
||||
- 'null'
|
||||
format: uuid
|
||||
description: Vacancy of the same organization to link, or null or absent for a need without a vacancy.
|
||||
source_text:
|
||||
oneOf:
|
||||
- $ref: '#/NeedSourceText'
|
||||
- type: 'null'
|
||||
specialization:
|
||||
oneOf:
|
||||
- $ref: '#/NeedSpecializationInput'
|
||||
- type: 'null'
|
||||
grade:
|
||||
oneOf:
|
||||
- $ref: '#/NeedGradeInput'
|
||||
- type: 'null'
|
||||
required_skills:
|
||||
type: array
|
||||
maxItems: 30
|
||||
items:
|
||||
$ref: '#/NeedSkillInput'
|
||||
desired_skills:
|
||||
type: array
|
||||
maxItems: 30
|
||||
items:
|
||||
$ref: '#/NeedSkillInput'
|
||||
tasks:
|
||||
type: array
|
||||
maxItems: 20
|
||||
items:
|
||||
$ref: '#/NeedTaskInput'
|
||||
domain:
|
||||
oneOf:
|
||||
- $ref: '#/NeedDomainInput'
|
||||
- type: 'null'
|
||||
work_formats:
|
||||
oneOf:
|
||||
- $ref: '#/NeedWorkFormatsInput'
|
||||
- type: 'null'
|
||||
location:
|
||||
oneOf:
|
||||
- $ref: '#/NeedLocationInput'
|
||||
- type: 'null'
|
||||
salary:
|
||||
oneOf:
|
||||
- $ref: '#/NeedSalaryInput'
|
||||
- type: 'null'
|
||||
NeedUpdate:
|
||||
type: object
|
||||
description: 'Change of a need over the version the client read. Each field present in the body replaces that field as a whole; an absent field stays unchanged. Nested objects and lists are not merged: a field decision and each list are replaced entirely, and a stored item missing from a sent list is deleted. A nullable field sent as null becomes unknown, or unlinked for `vacancy_id`; a skill or task list sent empty deletes every item; a list sent as null fails validation. A field decision `{value, status}` and a list item follow the same rules: `confirmed` with the stored value confirms it and keeps its origin and quote, and `confirmed` with another value sets a confirmed manual value; `extracted` keeps a stored suggestion unconfirmed and is allowed only with exactly the stored suggested value, otherwise it answers 400 with the pointer of that `status`, such as `/grade/status` or `/required_skills/0/status`. A client that sends back an unchanged form therefore confirms nothing by accident:
|
||||
it sends each suggestion with `extracted`, or leaves the field out. Sending a different `source_text` extracts again: new suggestions replace only the `extracted` values and items of fields not named in this body; confirmed values are never overwritten, a suggested skill whose name is already in either skill list is skipped, and a suggestion that a member deleted is not proposed again for this need. Unknown fields are rejected, so a request cannot set membership, a role, a provenance, readiness, a recommendation or its score, or a candidate''s salary minimum.'
|
||||
additionalProperties: false
|
||||
required:
|
||||
- expected_version
|
||||
properties:
|
||||
expected_version:
|
||||
$ref: '#/NeedVersion'
|
||||
title:
|
||||
$ref: '#/NeedTitle'
|
||||
vacancy_id:
|
||||
type:
|
||||
- string
|
||||
- 'null'
|
||||
format: uuid
|
||||
description: Vacancy of the same organization to link, or null to unlink.
|
||||
source_text:
|
||||
oneOf:
|
||||
- $ref: '#/NeedSourceText'
|
||||
- type: 'null'
|
||||
specialization:
|
||||
oneOf:
|
||||
- $ref: '#/NeedSpecializationInput'
|
||||
- type: 'null'
|
||||
grade:
|
||||
oneOf:
|
||||
- $ref: '#/NeedGradeInput'
|
||||
- type: 'null'
|
||||
required_skills:
|
||||
type: array
|
||||
maxItems: 30
|
||||
items:
|
||||
$ref: '#/NeedSkillInput'
|
||||
desired_skills:
|
||||
type: array
|
||||
maxItems: 30
|
||||
items:
|
||||
$ref: '#/NeedSkillInput'
|
||||
tasks:
|
||||
type: array
|
||||
maxItems: 20
|
||||
items:
|
||||
$ref: '#/NeedTaskInput'
|
||||
domain:
|
||||
oneOf:
|
||||
- $ref: '#/NeedDomainInput'
|
||||
- type: 'null'
|
||||
work_formats:
|
||||
oneOf:
|
||||
- $ref: '#/NeedWorkFormatsInput'
|
||||
- type: 'null'
|
||||
location:
|
||||
oneOf:
|
||||
- $ref: '#/NeedLocationInput'
|
||||
- type: 'null'
|
||||
salary:
|
||||
oneOf:
|
||||
- $ref: '#/NeedSalaryInput'
|
||||
- type: 'null'
|
||||
Problem:
|
||||
type: object
|
||||
description: Problem details (RFC 9457) returned with the application/problem+json media type for every error response. `code` is the stable, machine-readable reason; clients branch on it rather than on `title`, `detail`, or the HTTP status alone. The body never contains internal error text, stack traces, SQL, file paths, credentials, contact data, or echoed request values.
|
||||
|
||||
Reference in new issue
Block a user