{
  "$defs": {
    "EquityBand": {
      "description": "Equity-band (optional disclosure).",
      "properties": {
        "high_pct": {
          "format": "double",
          "type": "number"
        },
        "low_pct": {
          "format": "double",
          "type": "number"
        },
        "option_plan_ref": {
          "anyOf": [
            {
              "$ref": "#/$defs/PathRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "PathRef into the BDR 0067 OptionPlan covering this band."
        },
        "reference_basis": {
          "description": "Pool reference basis (typically post-money fully-diluted).",
          "type": "string"
        }
      },
      "required": [
        "low_pct",
        "high_pct",
        "reference_basis"
      ],
      "type": "object"
    },
    "IsoCountry": {
      "description": "ISO 3166-1 alpha-2 country code.",
      "pattern": "^[A-Z]{2}$",
      "type": "string"
    },
    "IsoCurrency": {
      "description": "ISO 4217 currency code.",
      "pattern": "^[A-Z]{3}$",
      "type": "string"
    },
    "IsoDate": {
      "description": "ISO 8601 date (YYYY-MM-DD).",
      "format": "date",
      "type": "string"
    },
    "PathRef": {
      "description": "Path-based cross-reference relative to .corpospec/ root.\nPattern: `^[a-z0-9_-]+(/[a-z0-9_.-]+)+$`",
      "pattern": "^[a-z0-9_-]+(/[a-z0-9_.-]+)+$",
      "type": "string"
    },
    "PostalAddress": {
      "description": "Physical address aligned with schema.org PostalAddress.",
      "properties": {
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "$ref": "#/$defs/IsoCountry"
        },
        "postal_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "type": [
            "string",
            "null"
          ]
        },
        "street": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "country"
      ],
      "type": "object"
    },
    "PostedLocation": {
      "description": "Posting location — either a fixed postal address or a remote\ndesignation.",
      "oneOf": [
        {
          "$ref": "#/$defs/PostalAddress",
          "properties": {
            "kind": {
              "const": "address",
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        {
          "properties": {
            "country": {
              "$ref": "#/$defs/IsoCountry"
            },
            "kind": {
              "const": "remote",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "country"
          ],
          "type": "object"
        }
      ]
    },
    "RequisitionState": {
      "description": "Requisition lifecycle state.",
      "enum": [
        "draft",
        "open",
        "on_hold",
        "closed",
        "filled"
      ],
      "type": "string"
    },
    "SalaryBand": {
      "description": "Disclosed salary band — EU 2023/970 Art. 5 mandatory for EU\npostings.",
      "properties": {
        "basis": {
          "description": "Free-form basis statement (e.g. `\"Title-V matched against\ninternal level 4 band\"`).",
          "type": [
            "string",
            "null"
          ]
        },
        "currency": {
          "$ref": "#/$defs/IsoCurrency"
        },
        "frequency": {
          "$ref": "#/$defs/SalaryFrequency"
        },
        "high": {
          "format": "double",
          "type": "number"
        },
        "low": {
          "format": "double",
          "type": "number"
        }
      },
      "required": [
        "currency",
        "low",
        "high",
        "frequency"
      ],
      "type": "object"
    },
    "SalaryFrequency": {
      "description": "Salary frequency basis.",
      "enum": [
        "annual",
        "monthly",
        "hourly"
      ],
      "type": "string"
    }
  },
  "$id": "https://corpospec.com/schemas/v0.16.0/job-requisition.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Job requisition record.",
  "properties": {
    "bdr_reference": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "PathRef into a relevant BDR / decision."
    },
    "benefits_summary": {
      "description": "PathRefs into BDR 0069 BenefitPlan records.",
      "items": {
        "$ref": "#/$defs/PathRef"
      },
      "type": "array"
    },
    "closed_at": {
      "anyOf": [
        {
          "$ref": "#/$defs/IsoDate"
        },
        {
          "type": "null"
        }
      ]
    },
    "consent_record_template": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "PathRef into the consent-record template applied to candidates."
    },
    "entity": {
      "$ref": "#/$defs/PathRef"
    },
    "equity_disclosed_band": {
      "anyOf": [
        {
          "$ref": "#/$defs/EquityBand"
        },
        {
          "type": "null"
        }
      ]
    },
    "headcount": {
      "format": "int32",
      "type": "integer"
    },
    "hiring_manager": {
      "$ref": "#/$defs/PathRef"
    },
    "id": {
      "$ref": "#/$defs/PathRef"
    },
    "opened_at": {
      "$ref": "#/$defs/IsoDate"
    },
    "posted_jurisdictions": {
      "description": "Jurisdictions the posting is published in (drives EU 2023/970\napplicability).",
      "items": {
        "$ref": "#/$defs/IsoCountry"
      },
      "type": "array"
    },
    "posted_locations": {
      "description": "Posting locations.",
      "items": {
        "$ref": "#/$defs/PostedLocation"
      },
      "type": "array"
    },
    "posting_url": {
      "description": "External job-board / careers-page URL.",
      "type": [
        "string",
        "null"
      ]
    },
    "recruiter": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ]
    },
    "role": {
      "$ref": "#/$defs/PathRef",
      "description": "PathRef into `people/roles/<slug>`."
    },
    "salary_disclosed_band": {
      "anyOf": [
        {
          "$ref": "#/$defs/SalaryBand"
        },
        {
          "type": "null"
        }
      ],
      "description": "Mandatory when `posted_jurisdictions` contains any EU member\nstate."
    },
    "state": {
      "$ref": "#/$defs/RequisitionState"
    }
  },
  "required": [
    "id",
    "role",
    "entity",
    "headcount",
    "hiring_manager",
    "posted_locations",
    "posted_jurisdictions",
    "state",
    "opened_at"
  ],
  "title": "JobRequisition",
  "type": "object",
  "x-corpospec-pillar": "people"
}