{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cherishedbook-com/json-schema/cherishedbook-com-broadcast-state-schema.json",
  "title": "BroadcastState",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cherishedbook-com-openapi.yml#/components/schemas/BroadcastState",
  "type": "object",
  "required": [
    "id",
    "kind",
    "title",
    "is_showing",
    "moderation",
    "message"
  ],
  "properties": {
    "id": {
      "type": "integer"
    },
    "kind": {
      "type": "string",
      "enum": [
        "announcement",
        "event"
      ]
    },
    "title": {
      "type": "string"
    },
    "content": {
      "type": [
        "string",
        "null"
      ]
    },
    "location": {
      "type": [
        "string",
        "null"
      ]
    },
    "starts_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "ends_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "rsvp_enabled": {
      "type": "boolean"
    },
    "is_showing": {
      "type": "boolean",
      "description": "False until the safety check passes."
    },
    "moderation": {
      "$ref": "#/$defs/Moderation"
    },
    "message": {
      "type": "string",
      "description": "Written for a person to hear."
    }
  },
  "$defs": {
    "Moderation": {
      "type": "object",
      "required": [
        "status",
        "reason"
      ],
      "properties": {
        "status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "pending",
            "passed",
            "failed",
            null
          ]
        },
        "reason": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}