{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pkgseek-com/json-schema/pkgseek-com-watch-request-schema.json",
  "title": "WatchRequest",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pkgseek-com-openapi.yml#/components/schemas/WatchRequest",
  "type": "object",
  "required": [
    "kind",
    "webhook_url"
  ],
  "properties": {
    "catalog_revision": {
      "type": [
        "string",
        "null"
      ]
    },
    "distro": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional distro filter (not honored for abi_exports)."
    },
    "installed": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/InstalledTarget"
        }
      ]
    },
    "kind": {
      "type": "string",
      "description": "Event kind to watch: repository_package_drop, repository_file_drop,\nabi_exports (global only) or lifecycle."
    },
    "package": {
      "type": [
        "string",
        "null"
      ]
    },
    "release": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional release filter (requires distro)."
    },
    "release_policy": {
      "type": [
        "string",
        "null"
      ]
    },
    "schema_version": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32",
      "minimum": 0
    },
    "scope": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/PackageScope"
        }
      ]
    },
    "webhook_url": {
      "type": "string",
      "description": "HTTPS endpoint, port 443, publicly routable host (verified at registration)."
    }
  },
  "additionalProperties": false,
  "$defs": {
    "InstalledTarget": {
      "type": "object",
      "required": [
        "version"
      ],
      "properties": {
        "source_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_version": {
          "type": [
            "string",
            "null"
          ]
        },
        "version": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "PackageScope": {
      "type": "object",
      "description": "An explicit ordinary-repository request uses one exact release snapshot.",
      "required": [
        "distro",
        "release",
        "source",
        "arch"
      ],
      "properties": {
        "arch": {
          "type": "string"
        },
        "distro": {
          "type": "string"
        },
        "release": {
          "type": "string"
        },
        "repo": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  }
}