{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/toolpin-dev/json-schema/toolpin-dev-envelope-watch-created-schema.json",
  "title": "Envelope[WatchCreated]",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/toolpin-dev-openapi.json#/components/schemas/Envelope_WatchCreated_",
  "properties": {
    "as_of": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "As Of",
      "description": "When all critical jobs had last succeeded. Null if one has never run."
    },
    "stale": {
      "type": "boolean",
      "title": "Stale",
      "description": "True when a daily job has not succeeded recently. The data is still served, and it is older than it should be."
    },
    "data": {
      "$ref": "#/$defs/WatchCreated"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "as_of",
    "stale",
    "data"
  ],
  "$defs": {
    "WatchCreated": {
      "properties": {
        "status": {
          "type": "string",
          "title": "Status",
          "description": "watching, or already_watching."
        },
        "server": {
          "type": "string",
          "title": "Server"
        },
        "watch_id": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Watch Id"
        },
        "used": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Used"
        },
        "limit": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Limit"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "status",
        "server"
      ],
      "title": "WatchCreated"
    }
  }
}