{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aidelly-ai/json-schema/aidelly-ai-report-schedule-schema.json",
  "title": "ReportSchedule",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aidelly-ai-openapi.yml#/components/schemas/ReportSchedule",
  "type": "object",
  "required": [
    "id",
    "name",
    "cadence",
    "recipient_emails",
    "next_run_at",
    "active",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string",
      "description": "Schedule name, unique per workspace (seeded from the source report's title unless overridden at creation)"
    },
    "template_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Report template the schedule renders with, if any"
    },
    "sections": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Report section identifiers (copied from the seed report)"
    },
    "commentary": {
      "type": [
        "string",
        "null"
      ],
      "description": "Commentary copied from the seed report"
    },
    "last_run_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "ISO 8601 datetime of the last completed send"
    },
    "cadence": {
      "type": "string",
      "enum": [
        "daily",
        "weekly",
        "biweekly",
        "monthly"
      ],
      "description": "Schedule frequency"
    },
    "recipient_emails": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "email"
      },
      "description": "List of email addresses to send reports to"
    },
    "next_run_at": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 datetime of next scheduled send"
    },
    "active": {
      "type": "boolean",
      "description": "Whether this schedule is active (false means soft-deleted)"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}