{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zephira-ai/json-schema/zephira-ai-filed-financials-response-schema.json",
  "title": "FiledFinancialsResponse",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zephira-ai-openapi.yml#/components/schemas/FiledFinancialsResponse",
  "anyOf": [
    {
      "$ref": "#/$defs/FiledFinancialStatements"
    },
    {
      "$ref": "#/$defs/FiledFinancialsUnavailable"
    }
  ],
  "$defs": {
    "FiledFinancialGroup": {
      "type": "object",
      "required": [
        "id",
        "name",
        "order",
        "list"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "order": {
          "type": "integer"
        },
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FiledFinancialMetric"
          }
        }
      },
      "additionalProperties": true
    },
    "FiledFinancialMetric": {
      "type": "object",
      "required": [
        "name",
        "list"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Exact metric or reporting metadata label."
        },
        "list": {
          "type": "object",
          "propertyNames": {
            "format": "date"
          },
          "additionalProperties": {
            "type": [
              "string",
              "number",
              "null"
            ]
          },
          "description": "Values keyed by reporting period-end date. Strings can contain amounts or text metadata."
        },
        "progress": {
          "type": "array",
          "items": {
            "type": "number"
          },
          "description": "Optional relative trend values."
        }
      },
      "additionalProperties": true
    },
    "FiledFinancialStatements": {
      "type": "object",
      "required": [
        "years",
        "groups"
      ],
      "properties": {
        "years": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "date"
          },
          "description": "Reporting period-end dates."
        },
        "groups": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FiledFinancialGroup"
          }
        },
        "source": {
          "$ref": "#/$defs/Source",
          "description": "Response provenance when requested and supplied."
        }
      },
      "additionalProperties": true
    },
    "FiledFinancialsUnavailable": {
      "type": "object",
      "required": [
        "found"
      ],
      "properties": {
        "found": {
          "type": "boolean",
          "const": false
        },
        "message": {
          "type": "string",
          "description": "Explanation when available."
        }
      },
      "additionalProperties": true
    },
    "Source": {
      "type": "object",
      "properties": {
        "category": {
          "type": [
            "string",
            "null"
          ]
        },
        "comment": {
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "type": [
            "integer",
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        }
      },
      "additionalProperties": true
    }
  }
}