{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aidelly-ai/json-schema/aidelly-ai-report-schema.json",
  "title": "Report",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aidelly-ai-openapi.yml#/components/schemas/Report",
  "type": "object",
  "required": [
    "id",
    "title",
    "date_range_start",
    "date_range_end",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "title": {
      "type": "string",
      "description": "Report name"
    },
    "date_range_start": {
      "type": "string",
      "format": "date",
      "description": "Start date for analytics (ISO 8601)"
    },
    "date_range_end": {
      "type": "string",
      "format": "date",
      "description": "End date for analytics (ISO 8601)"
    },
    "snapshot": {
      "type": [
        "object",
        "null"
      ],
      "description": "Generated report snapshot with metrics and visualizations",
      "additionalProperties": true
    },
    "sections": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Report section identifiers included in the snapshot"
    },
    "commentary": {
      "type": [
        "string",
        "null"
      ],
      "description": "Free-form commentary attached to the report"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "queued",
        "generating",
        "ready",
        "failed"
      ],
      "description": "Generation status (API-created reports are ready)"
    },
    "generated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the snapshot was generated"
    },
    "template_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Template the report was created from, if any"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}