{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/philidor-io/json-schema/philidor-io-graph-incident-exposure-summary-response-schema.json",
  "title": "GraphIncidentExposureSummaryResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/philidor-io-openapi.json#/components/schemas/GraphIncidentExposureSummaryResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "snapshotId": {
          "type": "string"
        },
        "mapVersion": {
          "type": "string"
        },
        "generatedAt": {
          "type": "string"
        },
        "validTime": {
          "type": "string"
        },
        "vaultCount": {
          "type": "number"
        },
        "issuerCount": {
          "type": "number"
        },
        "totalIncidentExposureUsd": {
          "type": "string"
        },
        "factorAttribution": {
          "type": "object",
          "properties": {
            "methodologyVersion": {
              "type": "string",
              "enum": [
                "factor-attribution-v1"
              ]
            },
            "maturity": {
              "type": "string",
              "enum": [
                "experimental"
              ]
            },
            "asOf": {
              "type": "string",
              "format": "date-time"
            },
            "scope": {
              "type": "string",
              "enum": [
                "casebook-corpus"
              ]
            },
            "exposureNormalized": {
              "type": "boolean",
              "enum": [
                false
              ]
            },
            "evidenceManifest": {
              "type": "object",
              "properties": {
                "version": {
                  "type": "string",
                  "enum": [
                    "factor-attribution-publication-v1"
                  ]
                },
                "manifestSha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "inputSha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "outputSha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                }
              },
              "required": [
                "version",
                "manifestSha256",
                "inputSha256",
                "outputSha256"
              ]
            },
            "window": {
              "type": "object",
              "properties": {
                "startInclusive": {
                  "type": "string",
                  "format": "date-time"
                },
                "endExclusive": {
                  "type": "string",
                  "format": "date-time"
                },
                "durationYears": {
                  "type": "string",
                  "pattern": "^(0|[1-9]\\d*)\\.\\d{12}$"
                },
                "yearConvention": {
                  "type": "string",
                  "enum": [
                    "365.25-days"
                  ]
                }
              },
              "required": [
                "startInclusive",
                "endExclusive",
                "durationYears",
                "yearConvention"
              ]
            },
            "coverage": {
              "type": "object",
              "properties": {
                "eligibleIncidentCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "knownLossIncidentCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "unknownLossIncidentCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "recordedIncidentCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "attributedIncidentCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "knownRawLossUsd": {
                  "type": "string",
                  "pattern": "^(0|[1-9]\\d*)\\.\\d{6}$"
                },
                "attributedLossUsd": {
                  "type": "string",
                  "pattern": "^(0|[1-9]\\d*)\\.\\d{6}$"
                },
                "unattributedKnownLossUsd": {
                  "type": "string",
                  "pattern": "^(0|[1-9]\\d*)\\.\\d{6}$"
                },
                "attributedKnownLossShare": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^(0\\.\\d{12}|1\\.0{12})$"
                }
              },
              "required": [
                "eligibleIncidentCount",
                "knownLossIncidentCount",
                "unknownLossIncidentCount",
                "recordedIncidentCount",
                "attributedIncidentCount",
                "knownRawLossUsd",
                "attributedLossUsd",
                "unattributedKnownLossUsd",
                "attributedKnownLossShare"
              ]
            },
            "byFactorType": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "factorType": {
                    "type": "string",
                    "enum": [
                      "oracle",
                      "bridge",
                      "signer",
                      "wrapper",
                      "contract"
                    ]
                  },
                  "positiveLossIncidentCount": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "attributedLossUsd": {
                    "type": "string",
                    "pattern": "^(0|[1-9]\\d*)\\.\\d{6}$"
                  },
                  "incidentFrequencyPerYear": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^(0|[1-9]\\d*)\\.\\d{12}$"
                  },
                  "meanSeverityUsd": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^(0|[1-9]\\d*)\\.\\d{6}$"
                  },
                  "annualizedLossUsd": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^(0|[1-9]\\d*)\\.\\d{6}$"
                  }
                },
                "required": [
                  "factorType",
                  "positiveLossIncidentCount",
                  "attributedLossUsd",
                  "incidentFrequencyPerYear",
                  "meanSeverityUsd",
                  "annualizedLossUsd"
                ]
              }
            },
            "calendarYears": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "year": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "window": {
                    "type": "object",
                    "properties": {
                      "startInclusive": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "endExclusive": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "durationYears": {
                        "type": "string",
                        "pattern": "^(0|[1-9]\\d*)\\.\\d{12}$"
                      },
                      "yearConvention": {
                        "type": "string",
                        "enum": [
                          "365.25-days"
                        ]
                      }
                    },
                    "required": [
                      "startInclusive",
                      "endExclusive",
                      "durationYears",
                      "yearConvention"
                    ]
                  },
                  "coverage": {
                    "type": "object",
                    "properties": {
                      "eligibleIncidentCount": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "knownLossIncidentCount": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "unknownLossIncidentCount": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "recordedIncidentCount": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "attributedIncidentCount": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "knownRawLossUsd": {
                        "type": "string",
                        "pattern": "^(0|[1-9]\\d*)\\.\\d{6}$"
                      },
                      "attributedLossUsd": {
                        "type": "string",
                        "pattern": "^(0|[1-9]\\d*)\\.\\d{6}$"
                      },
                      "unattributedKnownLossUsd": {
                        "type": "string",
                        "pattern": "^(0|[1-9]\\d*)\\.\\d{6}$"
                      },
                      "attributedKnownLossShare": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "pattern": "^(0\\.\\d{12}|1\\.0{12})$"
                      }
                    },
                    "required": [
                      "eligibleIncidentCount",
                      "knownLossIncidentCount",
                      "unknownLossIncidentCount",
                      "recordedIncidentCount",
                      "attributedIncidentCount",
                      "knownRawLossUsd",
                      "attributedLossUsd",
                      "unattributedKnownLossUsd",
                      "attributedKnownLossShare"
                    ]
                  },
                  "byFactorType": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "factorType": {
                          "type": "string",
                          "enum": [
                            "oracle",
                            "bridge",
                            "signer",
                            "wrapper",
                            "contract"
                          ]
                        },
                        "positiveLossIncidentCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "attributedLossUsd": {
                          "type": "string",
                          "pattern": "^(0|[1-9]\\d*)\\.\\d{6}$"
                        },
                        "incidentFrequencyPerYear": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^(0|[1-9]\\d*)\\.\\d{12}$"
                        },
                        "meanSeverityUsd": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^(0|[1-9]\\d*)\\.\\d{6}$"
                        },
                        "annualizedLossUsd": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^(0|[1-9]\\d*)\\.\\d{6}$"
                        }
                      },
                      "required": [
                        "factorType",
                        "positiveLossIncidentCount",
                        "attributedLossUsd",
                        "incidentFrequencyPerYear",
                        "meanSeverityUsd",
                        "annualizedLossUsd"
                      ]
                    }
                  }
                },
                "required": [
                  "year",
                  "window",
                  "coverage",
                  "byFactorType"
                ]
              }
            },
            "sourceCoverage": {
              "type": "object",
              "properties": {
                "scope": {
                  "type": "string",
                  "enum": [
                    "current-retained-casebook-cohort"
                  ]
                },
                "retainedIncidentCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "missingOccurrenceCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "missingAvailabilityCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "temporallyExcludedIncidentCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "scope",
                "retainedIncidentCount",
                "missingOccurrenceCount",
                "missingAvailabilityCount",
                "temporallyExcludedIncidentCount"
              ]
            }
          },
          "required": [
            "methodologyVersion",
            "maturity",
            "asOf",
            "scope",
            "exposureNormalized",
            "window",
            "coverage",
            "byFactorType",
            "calendarYears",
            "sourceCoverage"
          ]
        },
        "issuers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "issuerProtocolSlug": {
                "type": "string"
              },
              "issuerName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "vaultCount": {
                "type": "number"
              },
              "exposureUsd": {
                "type": "string"
              },
              "incidentCount": {
                "type": "number"
              },
              "totalIncidentLossUsd": {
                "type": "string"
              },
              "mechanisms": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "mechanism": {
                      "type": "string"
                    },
                    "incidentCount": {
                      "type": "number"
                    },
                    "totalLossUsd": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "mechanism",
                    "incidentCount",
                    "totalLossUsd"
                  ]
                }
              },
              "topVaults": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "vaultKey": {
                      "type": "string"
                    },
                    "exposureUsd": {
                      "type": "string"
                    },
                    "exposureShare": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "vaultKey",
                    "exposureUsd",
                    "exposureShare"
                  ]
                }
              }
            },
            "required": [
              "issuerProtocolSlug",
              "issuerName",
              "vaultCount",
              "exposureUsd",
              "incidentCount",
              "totalIncidentLossUsd",
              "mechanisms",
              "topVaults"
            ]
          }
        }
      },
      "required": [
        "snapshotId",
        "mapVersion",
        "generatedAt",
        "validTime",
        "vaultCount",
        "issuerCount",
        "totalIncidentExposureUsd",
        "issuers"
      ]
    }
  },
  "required": [
    "data"
  ]
}