{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/anchord-ai/json-schema/anchord-ai-guard-batch-result-schema.json",
  "title": "GuardBatchResult",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/anchord-ai-openapi.yaml#/components/schemas/GuardBatchResult",
  "type": "object",
  "required": [
    "client_ref",
    "allowed",
    "blocks"
  ],
  "properties": {
    "client_ref": {
      "type": "string"
    },
    "allowed": {
      "type": "boolean"
    },
    "entity_id": {
      "type": "string",
      "format": "uuid"
    },
    "entity": {
      "anyOf": [
        {
          "$ref": "#/$defs/EntityRef"
        },
        {
          "type": "null"
        }
      ]
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "confidence": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "maximum": 1
    },
    "active_links": {
      "type": "integer"
    },
    "audit_id": {
      "type": "string",
      "format": "uuid"
    },
    "redirect": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "requested_entity_id": {
          "type": "string",
          "format": "uuid"
        },
        "canonical_entity_id": {
          "type": "string",
          "format": "uuid"
        }
      }
    }
  },
  "$defs": {
    "EntityKind": {
      "type": "string",
      "enum": [
        "company",
        "person"
      ]
    },
    "EntityRef": {
      "type": "object",
      "required": [
        "id",
        "kind"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "kind": {
          "$ref": "#/$defs/EntityKind"
        }
      }
    }
  }
}