{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getbioflow-com/json-schema/getbioflow-com-page-schema.json",
  "title": "Page",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getbioflow-com-openapi.json#/components/schemas/Page",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "DRAFT",
        "PUBLISHED",
        "ARCHIVED"
      ]
    },
    "locale": {
      "type": "string"
    },
    "public_url": {
      "description": "Live URL when routed; null for unrouted drafts",
      "type": [
        "string",
        "null"
      ]
    },
    "theme": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string"
        },
        "preset_key": {
          "type": "string"
        }
      },
      "required": [
        "label",
        "preset_key"
      ],
      "additionalProperties": false
    },
    "draft": {
      "type": "object",
      "properties": {
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
          "description": "Concurrency stamp — pass as expected_updated_at on every write"
        },
        "block_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "blocks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PageBlockRef"
          }
        }
      },
      "required": [
        "updated_at",
        "block_count",
        "blocks"
      ],
      "additionalProperties": false
    },
    "published": {
      "type": "object",
      "properties": {
        "is_live": {
          "type": "boolean"
        },
        "block_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "live_updated_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "is_live",
        "block_count",
        "live_updated_at"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "title",
    "description",
    "slug",
    "status",
    "locale",
    "public_url",
    "theme",
    "draft",
    "published"
  ],
  "additionalProperties": false,
  "$defs": {
    "PageBlockRef": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "kind": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "label": {
          "type": "string",
          "description": "Display label derived from data"
        }
      },
      "required": [
        "id",
        "kind",
        "enabled",
        "label"
      ],
      "additionalProperties": false
    }
  }
}