{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/revdoku-com/json-schema/revdoku-com-publication-schema.json",
  "title": "Publication",
  "description": "A bucket's published site, or its 24-hour preview.",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/revdoku-com-openapi.json#/components/schemas/Publication",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "bucket_id",
    "url",
    "preview",
    "publish_state",
    "live",
    "access_mode",
    "password_configured",
    "support",
    "publish_error",
    "expires_at",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Publication ID."
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "The site address."
    },
    "preview": {
      "type": "boolean",
      "description": "True for a 24-hour preview."
    },
    "publish_state": {
      "type": "string",
      "enum": [
        "ready",
        "queued",
        "processing",
        "failed",
        "unpublishing"
      ],
      "description": "Build state. A publish runs in the background: poll until ready or failed."
    },
    "live": {
      "type": "boolean",
      "description": "True while the site serves visitors."
    },
    "access_mode": {
      "type": "string",
      "enum": [
        "public",
        "password",
        "require_email"
      ],
      "description": "Who can open the site."
    },
    "password_configured": {
      "type": "boolean",
      "description": "True when a password protects the site."
    },
    "support": {
      "type": "object",
      "description": "How visitors of the site reach a person.",
      "properties": {
        "handoff": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "form",
            "form_email",
            "email",
            "link",
            "none",
            null
          ],
          "description": "form, form_email, email or link; none while the site takes no visitors to a person."
        },
        "link_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "The support page of the handoff link, else null."
        }
      },
      "required": [
        "handoff",
        "link_url"
      ]
    },
    "publish_error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Why the last build failed."
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When a preview stops serving."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "bucket_id": {
      "type": "string",
      "description": "The bucket whose files the site publishes."
    }
  }
}