{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postfleet-ai/json-schema/postfleet-ai-comprehend-result-schema.json",
  "title": "ComprehendResult",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postfleet-ai-openapi.json#/components/schemas/ComprehendResult",
  "type": "object",
  "properties": {
    "subject_clean": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "body_clean": {
      "type": "string"
    },
    "truncated": {
      "type": "boolean"
    },
    "sanitization": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "stripped": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "detail",
          "stripped"
        ],
        "additionalProperties": false
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "complete",
        "partial",
        "skipped_injection_risk",
        "skipped_spam",
        "skipped_virus"
      ]
    },
    "classification": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "extraction": {
      "anyOf": [
        {},
        {
          "type": "null"
        }
      ]
    },
    "extraction_error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "confidence": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "scan_risk": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "low",
            "high",
            "error"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "heuristic_risk": {
      "type": "string",
      "enum": [
        "low",
        "high"
      ]
    },
    "spam_risk": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "low",
            "high",
            "error"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "virus_risk": {
      "type": "null",
      "description": "Always null. Malware scanning is not evaluated on this surface."
    },
    "not_evaluated": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "malware",
          "spam"
        ]
      }
    },
    "spam_evaluated": {
      "type": "string",
      "enum": [
        "none",
        "content",
        "auth_and_content"
      ]
    },
    "from": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "auth_results": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "spf": {
              "type": "string",
              "enum": [
                "pass",
                "fail",
                "softfail",
                "neutral",
                "none",
                "temperror",
                "permerror"
              ]
            },
            "dkim": {
              "type": "string",
              "enum": [
                "pass",
                "fail",
                "softfail",
                "neutral",
                "none",
                "temperror",
                "permerror"
              ]
            },
            "dmarc": {
              "type": "string",
              "enum": [
                "pass",
                "fail",
                "softfail",
                "neutral",
                "none",
                "temperror",
                "permerror"
              ]
            }
          },
          "required": [
            "spf",
            "dkim",
            "dmarc"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "subject_clean",
    "body_clean",
    "truncated",
    "sanitization",
    "status",
    "classification",
    "extraction",
    "extraction_error",
    "confidence",
    "model",
    "scan_risk",
    "heuristic_risk",
    "spam_risk",
    "virus_risk",
    "not_evaluated",
    "spam_evaluated",
    "from",
    "auth_results"
  ],
  "additionalProperties": false
}