{
  "$id": "https://hoba.work/schemas/record.schema.json",
  "$ref": "#/definitions/Record",
  "definitions": {
    "Record": {
      "type": "object",
      "properties": {
        "title": {
          "$ref": "#/definitions/__schema0"
        },
        "status": {
          "$ref": "#/definitions/__schema1"
        },
        "evidence_ids": {
          "$ref": "#/definitions/__schema2"
        },
        "content": {
          "$ref": "#/definitions/__schema3"
        },
        "aliases": {
          "$ref": "#/definitions/__schema4"
        },
        "id": {
          "$ref": "#/definitions/__schema5"
        },
        "type": {
          "$ref": "#/definitions/__schema6"
        },
        "record_class": {
          "$ref": "#/definitions/__schema7"
        },
        "owner": {
          "$ref": "#/definitions/__schema8"
        },
        "owner_actor": {
          "$ref": "#/definitions/__schema9"
        },
        "summary": {
          "$ref": "#/definitions/__schema10"
        },
        "flows": {
          "$ref": "#/definitions/__schema11"
        },
        "visibility_default": {
          "$ref": "#/definitions/__schema13"
        },
        "evidence_level": {
          "$ref": "#/definitions/__schema14"
        },
        "superseded_by": {
          "$ref": "#/definitions/__schema15"
        }
      },
      "required": [
        "title",
        "id",
        "type",
        "record_class",
        "owner",
        "summary"
      ],
      "additionalProperties": false
    },
    "__schema0": {
      "type": "string",
      "minLength": 3
    },
    "__schema1": {
      "default": "active",
      "type": "string",
      "enum": [
        "active",
        "deprecated"
      ]
    },
    "__schema2": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^(EVD-\\d{3}|evidence\\.[a-z0-9_]+)$"
      }
    },
    "__schema3": {
      "type": "string"
    },
    "__schema4": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "__schema5": {
      "type": "string",
      "pattern": "^(R-\\d{3}|record\\.[a-z0-9_]+)$"
    },
    "__schema6": {
      "type": "string",
      "const": "record"
    },
    "__schema7": {
      "type": "string",
      "enum": [
        "budget-line",
        "contract",
        "bid",
        "requisition-funding",
        "payroll",
        "placement-fee",
        "subscription",
        "runway"
      ]
    },
    "__schema8": {
      "type": "string",
      "enum": [
        "inside",
        "outside-party",
        "ownerless"
      ]
    },
    "__schema9": {
      "type": "string",
      "enum": [
        "actor.candidate",
        "actor.recruiter",
        "actor.hiring_manager",
        "actor.ats_vendor",
        "actor.employer_policy",
        "actor.public_policy_and_industry_standards",
        "actor.client"
      ]
    },
    "__schema10": {
      "type": "string",
      "minLength": 10
    },
    "__schema11": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "pattern": "^(R-\\d{3}|record\\.[a-z0-9_]+)$"
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "percentage": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "fraction": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "split_type": {
            "type": "string",
            "enum": [
              "margin",
              "payroll",
              "settlement",
              "burn",
              "allocation",
              "fee"
            ]
          },
          "amount": {
            "type": "object",
            "properties": {
              "value": {
                "type": "number"
              },
              "unit": {
                "type": "string",
                "minLength": 1
              },
              "evidence": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema12"
                }
              }
            },
            "required": [
              "value",
              "unit",
              "evidence"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "to",
          "label"
        ],
        "additionalProperties": false
      }
    },
    "__schema12": {
      "type": "string",
      "pattern": "^(EVD-\\d{3}|evidence\\.[a-z0-9_]+)$"
    },
    "__schema13": {
      "default": "opaque",
      "type": "string",
      "enum": [
        "observable",
        "inferable",
        "opaque"
      ]
    },
    "__schema14": {
      "default": "supported",
      "type": "string",
      "enum": [
        "observed",
        "compatible",
        "supported",
        "strongly_supported",
        "proven",
        "contradicted",
        "unknown"
      ]
    },
    "__schema15": {
      "allOf": [
        {
          "$ref": "#/definitions/__schema5"
        }
      ]
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}
