{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/replynodes-com/json-schema/replynodes-com-watch-page-schema.json",
  "title": "WatchPage",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/replynodes-com-watches-api-openapi.yml#/components/schemas/WatchPage",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Watch"
      }
    },
    "meta": {
      "$ref": "#/$defs/CCIPageMeta"
    }
  },
  "required": [
    "data",
    "meta"
  ],
  "additionalProperties": false,
  "$defs": {
    "CCIPageMeta": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string"
        },
        "next_cursor": {
          "type": "string"
        },
        "has_more": {
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "next_cursor",
        "has_more"
      ],
      "additionalProperties": false
    },
    "Watch": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "target": {
          "type": "string"
        },
        "entity": {
          "$ref": "#/$defs/WatchEntity"
        },
        "topics": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WatchTopic"
          }
        },
        "unavailable_topics": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WatchTopic"
          },
          "description": "Currently active subscriptions whose event families are unavailable; their topic intervals and history remain retained."
        },
        "requested_frequency": {
          "$ref": "#/$defs/WatchFrequency"
        },
        "effective_frequency": {
          "$ref": "#/$defs/WatchFrequency"
        },
        "status": {
          "$ref": "#/$defs/WatchStatus"
        },
        "started_at": {
          "type": "string",
          "format": "date-time"
        },
        "status_changed_at": {
          "type": "string",
          "format": "date-time"
        },
        "archived_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "coverage": {
          "$ref": "#/$defs/WatchCoverage"
        },
        "topic_intervals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WatchTopicInterval"
          }
        },
        "webhook": {
          "$ref": "#/$defs/WatchWebhookConfig"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "target",
        "entity",
        "topics",
        "unavailable_topics",
        "requested_frequency",
        "effective_frequency",
        "status",
        "started_at",
        "status_changed_at",
        "archived_at",
        "coverage",
        "topic_intervals",
        "created_at",
        "updated_at"
      ],
      "additionalProperties": false
    },
    "WatchCoverage": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "initializing",
            "healthy",
            "degraded",
            "failed"
          ]
        },
        "last_run_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      },
      "required": [
        "state",
        "last_run_at"
      ],
      "additionalProperties": false
    },
    "WatchEntity": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "domain": {
          "type": "string"
        },
        "display_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "observed_since": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "last_observed_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "domain",
        "display_name",
        "observed_since",
        "last_observed_at"
      ],
      "additionalProperties": false
    },
    "WatchFrequency": {
      "type": "string",
      "enum": [
        "24h",
        "6h"
      ]
    },
    "WatchStatus": {
      "type": "string",
      "enum": [
        "active",
        "paused",
        "archived"
      ]
    },
    "WatchTopic": {
      "type": "string",
      "enum": [
        "pricing",
        "product",
        "integrations",
        "customers",
        "positioning"
      ]
    },
    "WatchTopicInterval": {
      "type": "object",
      "properties": {
        "topic": {
          "$ref": "#/$defs/WatchTopic"
        },
        "enabled_at": {
          "type": "string",
          "format": "date-time"
        },
        "disabled_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      },
      "required": [
        "topic",
        "enabled_at",
        "disabled_at"
      ],
      "additionalProperties": false
    },
    "WatchWebhookConfig": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "url"
      ],
      "additionalProperties": false
    }
  }
}