{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/entitylight/json-schema/entitylight-watch-schema.json",
  "title": "Watch",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/entitylight-openapi.json#/components/schemas/Watch",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "businessName": {
      "type": "string"
    },
    "sosId": {
      "description": "The registration watched; null when the watch follows a name",
      "type": [
        "string",
        "null"
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "AL",
        "AK",
        "AZ",
        "AR",
        "CA",
        "CO",
        "CT",
        "DE",
        "DC",
        "FL",
        "GA",
        "HI",
        "ID",
        "IL",
        "IN",
        "IA",
        "KS",
        "KY",
        "LA",
        "ME",
        "MD",
        "MA",
        "MI",
        "MN",
        "MS",
        "MO",
        "MT",
        "NE",
        "NV",
        "NH",
        "NJ",
        "NM",
        "NY",
        "NC",
        "ND",
        "OH",
        "OK",
        "OR",
        "PA",
        "RI",
        "SC",
        "SD",
        "TN",
        "TX",
        "UT",
        "VT",
        "VA",
        "WA",
        "WV",
        "WI",
        "WY"
      ]
    },
    "active": {
      "type": "boolean"
    },
    "checkEveryDays": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "endsAt": {
      "description": "ISO 8601",
      "type": [
        "string",
        "null"
      ]
    },
    "webhookUrl": {
      "description": "Where this watch's watch.checked events go; the organization's webhook when null",
      "type": [
        "string",
        "null"
      ]
    },
    "nextCheckAt": {
      "type": "string",
      "description": "ISO 8601"
    },
    "lastCheckedAt": {
      "description": "ISO 8601",
      "type": [
        "string",
        "null"
      ]
    },
    "lastLookupId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        {
          "type": "null"
        }
      ],
      "description": "The latest check; read its coverage to see whether every source was searched"
    },
    "pausedAt": {
      "description": "ISO 8601. Set while checks are paused because the plan has no lookups left; they resume once it does",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "businessName",
    "sosId",
    "state",
    "active",
    "checkEveryDays",
    "endsAt",
    "webhookUrl",
    "nextCheckAt",
    "lastCheckedAt",
    "lastLookupId",
    "pausedAt"
  ],
  "additionalProperties": false
}