{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kunkafa-com/json-schema/kunkafa-com-report-document-schema.json",
  "title": "ReportDocument",
  "description": "One report edition. meta describes the market, the window, the rules and every band and duration; data[floor] holds the figures for every forecast at that confidence or higher; conf is the floor-independent breakdown by confidence band.",
  "x-generated": "2026-11-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kunkafa-com-openapi.json#/components/schemas/ReportDocument",
  "type": "object",
  "properties": {
    "schema": {
      "const": "kunkafa-report-floors-2"
    },
    "meta": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "market": {
          "type": "object"
        },
        "edition": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string"
            },
            "page": {
              "type": "string"
            },
            "data": {
              "type": "string"
            },
            "stable": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "window": {
          "type": "object",
          "properties": {
            "from": {
              "type": "string",
              "format": "date"
            },
            "to": {
              "type": "string",
              "format": "date"
            },
            "timezone": {
              "const": "UTC"
            },
            "countedBy": {
              "type": "string"
            }
          }
        },
        "generatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "rules": {
          "type": "object"
        },
        "bands": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string"
              },
              "fromPct": {
                "type": "number"
              },
              "toPct": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "label": {
                "type": "string"
              }
            }
          }
        },
        "durations": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "index": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "forecastMinutes": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "days": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "date"
          }
        }
      }
    },
    "floors": {
      "type": "array",
      "items": {
        "type": "integer"
      }
    },
    "defaultFloor": {
      "const": 95
    },
    "buckets": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "confBands": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "conf": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "pct": {
            "type": "object",
            "description": "Share of forecasts per band, percent, summing to 100",
            "additionalProperties": {
              "type": "number"
            }
          }
        },
        "required": [
          "total",
          "pct"
        ]
      }
    },
    "data": {
      "type": "object",
      "description": "Keyed by confidence floor (95 … 60)",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "floorLabel": {
            "type": "string"
          },
          "upTo": {
            "type": "object"
          },
          "hero": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer"
              },
              "pct": {
                "type": "object",
                "description": "Share of forecasts per band, percent, summing to 100",
                "additionalProperties": {
                  "type": "number"
                }
              }
            },
            "required": [
              "total",
              "pct"
            ]
          },
          "side": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "integer"
                },
                "pct": {
                  "type": "object",
                  "description": "Share of forecasts per band, percent, summing to 100",
                  "additionalProperties": {
                    "type": "number"
                  }
                }
              },
              "required": [
                "total",
                "pct"
              ]
            }
          },
          "dur": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "integer"
                },
                "pct": {
                  "type": "object",
                  "description": "Share of forecasts per band, percent, summing to 100",
                  "additionalProperties": {
                    "type": "number"
                  }
                }
              },
              "required": [
                "total",
                "pct"
              ]
            }
          },
          "day": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "integer"
                },
                "pct": {
                  "type": "object",
                  "description": "Share of forecasts per band, percent, summing to 100",
                  "additionalProperties": {
                    "type": "number"
                  }
                }
              },
              "required": [
                "total",
                "pct"
              ]
            }
          },
          "ex": {
            "type": "object",
            "description": "One example per band with the widest forecast distance"
          }
        }
      }
    }
  },
  "required": [
    "schema",
    "meta",
    "floors",
    "defaultFloor",
    "buckets",
    "conf",
    "data"
  ]
}