{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oviond-com/json-schema/oviond-com-create-report-request-schema.json",
  "title": "CreateReportRequest",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oviond-com-openapi.json#/components/schemas/CreateReportRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "client_id": {
      "type": "string",
      "minLength": 1
    },
    "type": {
      "type": "string",
      "enum": [
        "REPORT",
        "DASHBOARD"
      ]
    },
    "template": {
      "type": "string",
      "enum": [
        "BLANK",
        "TEMPLATE"
      ]
    },
    "template_id": {
      "type": "string",
      "description": "Clone pages and widgets from this template into the new report"
    },
    "pages": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": {}
      }
    },
    "theme_id": {
      "type": "string"
    },
    "date_range": {
      "$ref": "#/$defs/DateRange"
    },
    "logo_url": {
      "type": "string"
    },
    "auto_refresh_enabled": {
      "type": "boolean"
    },
    "show_cover_page": {
      "type": "boolean"
    },
    "show_cover_page_logo": {
      "type": "boolean"
    },
    "show_cover_page_client_logo": {
      "type": "boolean"
    },
    "show_cover_page_agency_logo": {
      "type": "boolean"
    },
    "show_cover_page_name": {
      "type": "boolean"
    },
    "show_cover_page_date": {
      "type": "boolean"
    },
    "show_cover_page_bg_image": {
      "type": "boolean"
    },
    "show_header": {
      "type": "boolean"
    },
    "show_header_logo": {
      "type": "boolean"
    },
    "show_header_name": {
      "type": "boolean"
    },
    "show_header_date": {
      "type": "boolean"
    },
    "show_page_numbers": {
      "type": "boolean"
    },
    "show_table_of_contents": {
      "type": "boolean"
    },
    "show_date": {
      "type": "boolean"
    },
    "show_thank_you": {
      "type": "boolean"
    },
    "show_thank_you_bg_image": {
      "type": "boolean"
    },
    "show_thank_you_logo": {
      "type": "boolean"
    },
    "show_thank_you_client_logo": {
      "type": "boolean"
    },
    "show_thank_you_agency_logo": {
      "type": "boolean"
    },
    "show_thank_you_heading": {
      "type": "boolean"
    },
    "show_thank_you_message": {
      "type": "boolean"
    },
    "orientation": {
      "type": "string",
      "enum": [
        "portrait",
        "landscape"
      ]
    },
    "paper_size": {
      "type": "string",
      "enum": [
        "a4",
        "letter"
      ]
    },
    "layout": {
      "type": "string",
      "enum": [
        "grid",
        "canvas"
      ]
    },
    "cover_page_title": {
      "type": [
        "string",
        "null"
      ]
    },
    "cover_page_subtitle": {
      "type": [
        "string",
        "null"
      ]
    },
    "cover_page_pattern_id": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "diagonal-corner-bands",
        "side-rail",
        "bottom-horizon-band",
        "diagonal-velocity",
        "flowing-waves",
        "orbit-frame",
        "geo-forms",
        "prism-tiles",
        "folded-corners",
        "mosaic-frame"
      ]
    },
    "cover_page_manual_bg_image_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "thank_you_page_title": {
      "type": [
        "string",
        "null"
      ]
    },
    "thank_you_page_subtitle": {
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "auto_refresh_interval_hours": {
      "anyOf": [
        {
          "type": "number",
          "enum": [
            1
          ]
        },
        {
          "type": "number",
          "enum": [
            24
          ]
        }
      ],
      "description": "Auto-refresh cadence: 1 = hourly, 24 = daily"
    },
    "password_enabled": {
      "type": "boolean"
    },
    "password": {
      "type": "string"
    },
    "pdf_enabled": {
      "type": "boolean"
    }
  },
  "required": [
    "name",
    "client_id",
    "type",
    "template"
  ],
  "$defs": {
    "DateRange": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "enum": [
            "Today",
            "Yesterday",
            "Last 7 Days",
            "Last 30 Days",
            "Last 60 Days",
            "Custom Days",
            "This Month",
            "Last Month",
            "Custom Months",
            "Last 2 Months",
            "Last 3 Months",
            "Last 12 Months",
            "This Year",
            "Last Year",
            "Custom"
          ]
        },
        "compare": {
          "type": "string",
          "enum": [
            "None",
            "Period",
            "Month",
            "Year",
            "Custom"
          ]
        },
        "include_today": {
          "type": "boolean"
        },
        "current_start": {
          "type": "string"
        },
        "current_end": {
          "type": "string"
        },
        "previous_start": {
          "type": "string"
        },
        "previous_end": {
          "type": "string"
        },
        "custom_days": {
          "type": "number"
        },
        "custom_months": {
          "type": "number"
        }
      }
    }
  }
}