{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cadencz-com/json-schema/cadencz-com-plan-read-schema.json",
  "title": "PlanRead",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cadencz-com-plans-api-openapi.yml#/components/schemas/PlanRead",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "workspace_id": {
      "type": "string",
      "title": "Workspace Id"
    },
    "week_of": {
      "type": "string",
      "format": "date-time",
      "title": "Week Of"
    },
    "goal": {
      "type": "string",
      "title": "Goal"
    },
    "niche": {
      "type": "string",
      "title": "Niche"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "items": {
      "items": {
        "$ref": "#/$defs/PlanItemRead"
      },
      "type": "array",
      "title": "Items"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "workspace_id",
    "week_of",
    "goal",
    "niche",
    "status",
    "items",
    "created_at"
  ],
  "$defs": {
    "MediaRead": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "kind": {
          "type": "string",
          "title": "Kind"
        },
        "url": {
          "type": "string",
          "title": "Url"
        },
        "alt_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Alt Text"
        },
        "width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Width"
        },
        "height": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Height"
        },
        "bytes": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bytes"
        }
      },
      "type": "object",
      "required": [
        "id",
        "kind",
        "url"
      ],
      "title": "MediaRead"
    },
    "PlanItemRead": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "theme": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Theme"
        },
        "angle": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Angle"
        },
        "platforms": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Platforms"
        },
        "why": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Why"
        },
        "prompt": {
          "type": "string",
          "title": "Prompt"
        },
        "scheduled_for": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Scheduled For"
        },
        "status": {
          "type": "string",
          "title": "Status"
        },
        "format": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Format"
        },
        "publish_mode": {
          "type": "string",
          "title": "Publish Mode",
          "default": "single"
        },
        "content_metadata": {
          "additionalProperties": true,
          "type": "object",
          "title": "Content Metadata"
        },
        "body_parts": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Body Parts"
        },
        "media_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Media Ids"
        },
        "media": {
          "items": {
            "$ref": "#/$defs/MediaRead"
          },
          "type": "array",
          "title": "Media"
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "theme",
        "angle",
        "platforms",
        "why",
        "prompt",
        "scheduled_for",
        "status"
      ],
      "title": "PlanItemRead"
    }
  }
}