{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usewrit-app/json-schema/usewrit-app-selector-schema.json",
  "title": "Selector",
  "description": "One monitor content selector (`store::target_selectors::TargetSelector`).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usewrit-app-selectors-api-openapi.yml#/components/schemas/Selector",
  "type": "object",
  "required": [
    "id",
    "target_id",
    "name",
    "selector",
    "enabled",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64"
    },
    "target_id": {
      "type": "integer",
      "format": "int64"
    },
    "name": {
      "type": "string"
    },
    "selector": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "enabled": {
      "type": "integer",
      "description": "0/1 integer flag."
    },
    "content_type": {
      "type": [
        "string",
        "null"
      ],
      "description": "`text` | `html` | `visual`."
    },
    "visual_region": {
      "type": [
        "string",
        "null"
      ],
      "description": "JSON-TEXT region descriptor (visual selectors)."
    },
    "ignore_regex": {
      "type": [
        "string",
        "null"
      ]
    },
    "priority": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64"
    },
    "baseline_hash": {
      "type": [
        "string",
        "null"
      ]
    },
    "baseline_content": {
      "type": [
        "string",
        "null"
      ]
    },
    "baseline_screenshot": {
      "type": [
        "string",
        "null"
      ]
    },
    "baseline_fetched_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "last_content_hash": {
      "type": [
        "string",
        "null"
      ]
    },
    "last_checked_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "change_count": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64"
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}