{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/merlonix-com/json-schema/merlonix-com-alert-schema.json",
  "title": "Alert",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/merlonix-com-openapi.yml#/components/schemas/Alert",
  "type": "object",
  "required": [
    "id",
    "tenant_id",
    "asset_id",
    "vendor_slug",
    "source_check_table",
    "source_check_id",
    "severity",
    "title",
    "summary",
    "ai_classification",
    "ai_confidence",
    "recommended_action",
    "ai_rationale",
    "fired_at",
    "acknowledged_at",
    "acknowledged_by",
    "resolved_at",
    "resolved_by",
    "suppressed_until",
    "dedupe_key",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "tenant_id": {
      "type": "string",
      "format": "uuid"
    },
    "asset_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "vendor_slug": {
      "type": [
        "string",
        "null"
      ]
    },
    "source_check_table": {
      "type": "string",
      "enum": [
        "ssl_checks",
        "dns_checks",
        "vendor_status_snapshots",
        "pipeline_failures",
        "uptime_checks",
        "domain_checks",
        "dnsbl_checks",
        "agent_readiness_checks",
        "heartbeat_checks",
        "port_checks",
        "psi_checks",
        "health_checks",
        "crawl_runs",
        "injection_scan_results",
        "dns_security_checks",
        "security_header_checks",
        "email_auth_checks",
        "ct_watch_checks",
        "mcp_health_checks",
        "journey_runs",
        "answer_presence_results"
      ]
    },
    "source_check_id": {
      "type": "integer"
    },
    "severity": {
      "type": "string",
      "enum": [
        "info",
        "warning",
        "critical"
      ]
    },
    "title": {
      "type": "string"
    },
    "summary": {
      "type": "string"
    },
    "ai_classification": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "real_issue",
        "false_positive",
        "informational",
        "uncertain",
        null
      ]
    },
    "ai_confidence": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "maximum": 1
    },
    "recommended_action": {
      "type": [
        "string",
        "null"
      ],
      "description": "TD-1731/TD-1732: deterministic \"what to do\" hint enum (humanize client-side); null when none."
    },
    "ai_rationale": {
      "type": [
        "string",
        "null"
      ],
      "description": "TD-1732: classifier prose \"why\"; null when none."
    },
    "fired_at": {
      "type": "string",
      "format": "date-time"
    },
    "acknowledged_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "acknowledged_by": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "resolved_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "resolved_by": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "suppressed_until": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "dedupe_key": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "acknowledged",
        "muted",
        "resolved"
      ]
    }
  }
}