{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "project_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Project that owns this record."
    },
    "source": {
      "type": "string",
      "enum": [
        "watches",
        "candidates"
      ]
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "subject_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "decision": {
            "type": "object",
            "properties": {
              "index": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "url": {
                "type": "string"
              },
              "normalized_url": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "host": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "decision": {
                "type": "string",
                "enum": [
                  "admitted",
                  "rejected"
                ]
              },
              "reason": {
                "type": "string",
                "description": "Recorded explanation; null when no explanation applies."
              },
              "rule_kind": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rule_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rule_value": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cap": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "limit": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "used": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "limit",
                      "used"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "index",
              "url",
              "normalized_url",
              "host",
              "decision",
              "reason",
              "rule_kind",
              "rule_id",
              "rule_value",
              "cap"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "subject_id",
          "decision"
        ],
        "additionalProperties": false
      }
    },
    "page_summary": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "admitted": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "rejected": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "by_rule": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        }
      },
      "required": [
        "total",
        "admitted",
        "rejected",
        "by_rule"
      ],
      "additionalProperties": false
    },
    "policy_revision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "disavow_revision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string",
          "description": "Opaque continuation for the same listing; null means no further page."
        },
        {
          "type": "null"
        }
      ],
      "description": "Opaque continuation for the same listing; null means no further page."
    },
    "has_more": {
      "type": "boolean",
      "description": "True when another page is available."
    },
    "report_only": {
      "type": "boolean",
      "const": true
    },
    "snapshot": {
      "type": "boolean",
      "const": false
    },
    "domain_cap_applied": {
      "type": "boolean",
      "const": false
    }
  },
  "required": [
    "project_id",
    "source",
    "rows",
    "page_summary",
    "policy_revision",
    "disavow_revision",
    "next_cursor",
    "has_more",
    "report_only",
    "snapshot",
    "domain_cap_applied"
  ],
  "additionalProperties": {}
}
