{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/philidor-io/json-schema/philidor-io-event-detail-schema.json",
  "title": "EventDetail",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/philidor-io-events-api-openapi.yml#/components/schemas/EventDetail",
  "type": "object",
  "properties": {
    "id": {
      "type": "number"
    },
    "event_type": {
      "type": "string"
    },
    "severity": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "occurred_at": {
      "type": "string"
    },
    "detected_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "protocol_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "protocol_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "protocol_logo": {
      "type": [
        "string",
        "null"
      ]
    },
    "chain_id": {
      "type": [
        "number",
        "null"
      ]
    },
    "chain_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "curator_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "curator_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "incident_scope": {
      "type": [
        "string",
        "null"
      ]
    },
    "incident_severity": {
      "type": [
        "string",
        "null"
      ]
    },
    "loss_amount_usd": {
      "type": [
        "number",
        "null"
      ]
    },
    "remediation_status": {
      "type": [
        "string",
        "null"
      ]
    },
    "user_compensation": {
      "type": [
        "string",
        "null"
      ]
    },
    "post_mortem_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "affected_asset": {
      "type": [
        "string",
        "null"
      ]
    },
    "tx_hash": {
      "type": [
        "string",
        "null"
      ]
    },
    "block_number": {
      "type": [
        "number",
        "null"
      ]
    },
    "created_at": {
      "type": "string"
    },
    "recorded_at": {
      "type": "string"
    },
    "source": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string"
    },
    "provisional": {
      "type": "boolean"
    },
    "confirmations_required": {
      "type": [
        "number",
        "null"
      ]
    },
    "lifecycle_status": {
      "type": "string",
      "enum": [
        "active",
        "published",
        "provisional",
        "resolved",
        "retracted",
        "invalidated"
      ]
    },
    "quality_status": {
      "type": [
        "string",
        "null"
      ]
    },
    "quality_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "retracted_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "retracted_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "asset_address": {
      "type": [
        "string",
        "null"
      ]
    },
    "asset_explorer_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "related_assets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string"
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "chain_id": {
            "type": [
              "number",
              "null"
            ]
          },
          "explorer_url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "symbol",
          "address",
          "chain_id",
          "explorer_url"
        ]
      }
    },
    "incident_details": {
      "type": "object",
      "properties": {
        "category": {
          "type": [
            "string",
            "null"
          ]
        },
        "reported_incident_date": {
          "type": [
            "string",
            "null"
          ]
        },
        "transaction_disclosure": {
          "type": [
            "string",
            "null"
          ]
        },
        "networks": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "metrics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "value": {
                "type": "number"
              },
              "unit": {
                "type": "string"
              }
            },
            "required": [
              "key",
              "label",
              "value",
              "unit"
            ]
          }
        }
      },
      "required": [
        "category",
        "reported_incident_date",
        "transaction_disclosure",
        "networks",
        "metrics"
      ]
    },
    "provenance": {
      "type": "object",
      "properties": {
        "producer": {
          "type": "string"
        },
        "detector": {
          "type": [
            "string",
            "null"
          ]
        },
        "verification_status": {
          "type": "string"
        },
        "decision_reason": {
          "type": [
            "string",
            "null"
          ]
        },
        "methodology": {
          "type": "string"
        },
        "sources": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "provider": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "price_usd": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "provider_confidence": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "liquidity_usd": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "observed_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "role",
              "provider",
              "url",
              "price_usd",
              "provider_confidence",
              "liquidity_usd",
              "observed_at"
            ]
          }
        }
      },
      "required": [
        "producer",
        "detector",
        "verification_status",
        "decision_reason",
        "methodology",
        "sources"
      ]
    },
    "price_evidence": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "asset_symbol": {
          "type": [
            "string",
            "null"
          ]
        },
        "asset_address": {
          "type": [
            "string",
            "null"
          ]
        },
        "observed_price_usd": {
          "type": "number"
        },
        "peg_target_usd": {
          "type": "number"
        },
        "drift_pct": {
          "type": [
            "number",
            "null"
          ]
        },
        "tracked_exposure_usd": {
          "type": [
            "number",
            "null"
          ]
        },
        "estimated_tracked_impact_usd": {
          "type": [
            "number",
            "null"
          ]
        },
        "observed_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "verification_status": {
          "type": "string"
        },
        "decision_reason": {
          "type": [
            "string",
            "null"
          ]
        },
        "sources": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "provider": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "price_usd": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "provider_confidence": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "liquidity_usd": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "observed_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "role",
              "provider",
              "url",
              "price_usd",
              "provider_confidence",
              "liquidity_usd",
              "observed_at"
            ]
          }
        }
      },
      "required": [
        "asset_symbol",
        "asset_address",
        "observed_price_usd",
        "peg_target_usd",
        "drift_pct",
        "tracked_exposure_usd",
        "estimated_tracked_impact_usd",
        "observed_at",
        "verification_status",
        "decision_reason",
        "sources"
      ]
    },
    "current_linked_vault_tvl_usd": {
      "type": "number"
    },
    "links": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "label",
          "url"
        ]
      }
    },
    "affected_vaults": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "vault_id": {
            "type": "string"
          },
          "vault_name": {
            "type": "string"
          },
          "tvl_usd": {
            "type": "number"
          },
          "chain_id": {
            "type": [
              "number",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "association_reason": {
            "type": "string"
          }
        },
        "required": [
          "vault_id",
          "vault_name",
          "tvl_usd",
          "chain_id",
          "address",
          "is_active",
          "association_reason"
        ]
      }
    }
  },
  "required": [
    "id",
    "event_type",
    "severity",
    "title",
    "description",
    "occurred_at",
    "detected_at",
    "protocol_id",
    "protocol_name",
    "protocol_logo",
    "chain_id",
    "chain_name",
    "curator_id",
    "curator_name",
    "incident_scope",
    "incident_severity",
    "loss_amount_usd",
    "remediation_status",
    "user_compensation",
    "post_mortem_url",
    "affected_asset",
    "tx_hash",
    "block_number",
    "created_at",
    "recorded_at",
    "source",
    "status",
    "provisional",
    "confirmations_required",
    "lifecycle_status",
    "quality_status",
    "quality_reason",
    "retracted_at",
    "retracted_reason",
    "asset_address",
    "asset_explorer_url",
    "related_assets",
    "incident_details",
    "provenance",
    "price_evidence",
    "current_linked_vault_tvl_usd",
    "links",
    "affected_vaults"
  ]
}