{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ayhire-com/json-schema/ayhire-com-watch-schema.json",
  "title": "Watch",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ayhire-com-openapi.yml#/components/schemas/Watch",
  "type": "object",
  "properties": {
    "github_username": {
      "type": "string"
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "avatar_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "role": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid"
            },
            "title": {
              "type": "string"
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "rules": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "open_to_work",
          "job_change",
          "says_looking",
          "new_work"
        ]
      }
    },
    "paid_checks": {
      "type": "boolean",
      "description": "Also re-read their LinkedIn every 2 weeks (paid)"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "last_checked_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "last_check_status": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "ok",
        "not_found",
        "failed",
        null
      ]
    },
    "latest": {
      "type": [
        "object",
        "null"
      ],
      "description": "The newest change, in a sentence, with its evidence link"
    },
    "fits": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "role_id": {
            "type": "string",
            "format": "uuid"
          },
          "role_title": {
            "type": "string"
          },
          "relevance": {
            "type": "integer"
          },
          "reason": {
            "type": "string"
          },
          "added": {
            "type": "boolean"
          }
        }
      }
    }
  },
  "required": [
    "github_username",
    "rules"
  ]
}