{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$ref": "#/components/schemas/DisplayDocument",
  "components": {
    "schemas": {
      "DisplayTimeline": {
        "type": "object",
        "properties": {
          "position": {
            "type": "number",
            "minimum": 0,
            "maximum": 86400000
          },
          "duration": {
            "type": "number",
            "minimum": 0,
            "maximum": 86400000
          },
          "at": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000000
          },
          "rate": {
            "type": "number",
            "minimum": 0,
            "maximum": 4
          }
        },
        "required": [
          "position",
          "duration",
          "at",
          "rate"
        ],
        "additionalProperties": false
      },
      "DisplayData": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 4000
          },
          {
            "type": "number",
            "minimum": -1000000000000000,
            "maximum": 1000000000000000
          },
          {
            "type": "boolean"
          },
          {
            "type": "null"
          },
          {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 500
            },
            "maxItems": 100
          },
          {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 500
              },
              "maxItems": 12
            },
            "maxItems": 100
          },
          {
            "$ref": "#/components/schemas/DisplayTimeline"
          }
        ]
      },
      "DisplayValue": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/DisplayData"
          },
          {
            "type": "object",
            "properties": {
              "bind": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "bind"
            ],
            "additionalProperties": false
          }
        ]
      },
      "DisplayStyle": {
        "type": "object",
        "properties": {
          "color": {
            "type": "string",
            "pattern": "^(#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8}|surface|ink|muted|accent|line|transparent)$"
          },
          "background": {
            "type": "string",
            "pattern": "^(#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8}|surface|ink|muted|accent|line|transparent)$"
          },
          "borderColor": {
            "type": "string",
            "pattern": "^(#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8}|surface|ink|muted|accent|line|transparent)$"
          },
          "gradientTo": {
            "type": "string",
            "pattern": "^(#[0-9a-fA-F]{6}|#[0-9a-fA-F]{8}|surface|ink|muted|accent|line|transparent)$"
          },
          "gap": {
            "type": "number",
            "minimum": 0,
            "maximum": 48
          },
          "padding": {
            "type": "number",
            "minimum": 0,
            "maximum": 48
          },
          "radius": {
            "type": "number",
            "minimum": 0,
            "maximum": 48
          },
          "fontSize": {
            "type": "number",
            "minimum": 12,
            "maximum": 48
          },
          "borderWidth": {
            "type": "number",
            "minimum": 0,
            "maximum": 4
          },
          "width": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 24,
                "maximum": 960
              },
              {
                "const": "fill"
              }
            ]
          },
          "maxWidth": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 24,
                "maximum": 960
              },
              {
                "const": "fill"
              }
            ]
          },
          "height": {
            "type": "number",
            "minimum": 24,
            "maximum": 480
          },
          "grow": {
            "type": "number",
            "minimum": 0,
            "maximum": 12
          },
          "columns": {
            "type": "string",
            "pattern": "^(?:[1-9](?:\\.[0-9])?fr|auto)(?: (?:[1-9](?:\\.[0-9])?fr|auto)){0,5}$"
          },
          "align": {
            "enum": [
              "start",
              "center",
              "end",
              "stretch"
            ]
          },
          "justify": {
            "enum": [
              "start",
              "center",
              "end",
              "space-between",
              "space-around"
            ]
          },
          "wrap": {
            "enum": [
              "wrap",
              "nowrap"
            ]
          },
          "textAlign": {
            "enum": [
              "left",
              "center",
              "right"
            ]
          },
          "fontWeight": {
            "enum": [
              "normal",
              "medium",
              "bold"
            ]
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "DisplayAction": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "bot"
              },
              "audience": {
                "enum": [
                  "installer",
                  "chat_members"
                ]
              },
              "context": {
                "$ref": "#/components/schemas/DisplayValue"
              }
            },
            "required": [
              "type",
              "audience"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "command"
              },
              "audience": {
                "enum": [
                  "installer",
                  "chat_members"
                ]
              },
              "command_id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "context": {
                "$ref": "#/components/schemas/DisplayValue"
              }
            },
            "required": [
              "type",
              "audience",
              "command_id"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "link"
              },
              "audience": {
                "enum": [
                  "installer",
                  "chat_members"
                ]
              },
              "url": {
                "type": "string",
                "maxLength": 500,
                "pattern": "^https://"
              },
              "context": {
                "$ref": "#/components/schemas/DisplayValue"
              }
            },
            "required": [
              "type",
              "audience",
              "url"
            ],
            "additionalProperties": false
          }
        ]
      },
      "DisplayNode": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "row"
              },
              "props": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "column"
              },
              "props": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "grid"
              },
              "props": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "text"
              },
              "props": {
                "type": "object",
                "properties": {
                  "text": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "markdown"
              },
              "props": {
                "type": "object",
                "properties": {
                  "text": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "image"
              },
              "props": {
                "type": "object",
                "properties": {
                  "asset_id": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "alt": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "fit": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "icon"
              },
              "props": {
                "type": "object",
                "properties": {
                  "name": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "label": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "badge"
              },
              "props": {
                "type": "object",
                "properties": {
                  "text": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "divider"
              },
              "props": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "button"
              },
              "props": {
                "type": "object",
                "properties": {
                  "label": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "icon": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "action": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "disabled": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "select"
              },
              "props": {
                "type": "object",
                "properties": {
                  "label": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "options": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "value": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "action": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "disabled": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "toggle"
              },
              "props": {
                "type": "object",
                "properties": {
                  "label": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "value": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "action": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "disabled": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "slider"
              },
              "props": {
                "type": "object",
                "properties": {
                  "label": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "value": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "min": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "max": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "step": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "timeline": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "action": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "disabled": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "input"
              },
              "props": {
                "type": "object",
                "properties": {
                  "label": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "placeholder": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "action": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "disabled": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "progress"
              },
              "props": {
                "type": "object",
                "properties": {
                  "label": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "value": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "max": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "timeline": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "timeline"
              },
              "props": {
                "type": "object",
                "properties": {
                  "label": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "timeline": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "list"
              },
              "props": {
                "type": "object",
                "properties": {
                  "items": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "table"
              },
              "props": {
                "type": "object",
                "properties": {
                  "headers": {
                    "$ref": "#/components/schemas/DisplayValue"
                  },
                  "rows": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "details"
              },
              "props": {
                "type": "object",
                "properties": {
                  "label": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "tabs"
              },
              "props": {
                "type": "object",
                "properties": {
                  "label": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "type": {
                "const": "tab"
              },
              "props": {
                "type": "object",
                "properties": {
                  "label": {
                    "$ref": "#/components/schemas/DisplayValue"
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayNode"
                },
                "maxItems": 128
              },
              "style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "narrow_style": {
                "$ref": "#/components/schemas/DisplayStyle"
              },
              "style_ref": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "id",
              "type"
            ],
            "additionalProperties": false
          }
        ]
      },
      "DisplayDocument": {
        "type": "object",
        "properties": {
          "version": {
            "const": 1
          },
          "root": {
            "$ref": "#/components/schemas/DisplayNode"
          },
          "state": {
            "type": "object",
            "propertyNames": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,64}$"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/DisplayData"
            }
          },
          "actions": {
            "type": "object",
            "propertyNames": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,64}$"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/DisplayAction"
            },
            "maxProperties": 32
          },
          "styles": {
            "type": "object",
            "propertyNames": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,64}$"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/DisplayStyle"
            }
          }
        },
        "required": [
          "version",
          "root",
          "state",
          "actions"
        ],
        "additionalProperties": false
      },
      "DisplaySnapshot": {
        "type": "object",
        "properties": {
          "message_id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "revision": {
            "type": "string"
          },
          "layout_revision": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "server_time": {
            "type": "number"
          },
          "active": {
            "type": "boolean"
          },
          "installer": {
            "type": "boolean"
          },
          "document": {
            "$ref": "#/components/schemas/DisplayDocument"
          }
        },
        "required": [
          "message_id",
          "application_id",
          "revision",
          "layout_revision",
          "updated_at",
          "server_time",
          "active",
          "installer",
          "document"
        ],
        "additionalProperties": false
      },
      "DisplayPatch": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "op": {
                "const": "state"
              },
              "values": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[a-zA-Z0-9_-]{1,64}$"
                },
                "additionalProperties": {
                  "$ref": "#/components/schemas/DisplayData"
                }
              }
            },
            "required": [
              "op",
              "values"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "const": "props"
              },
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "values": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[a-zA-Z0-9_-]{1,64}$"
                },
                "additionalProperties": {
                  "$ref": "#/components/schemas/DisplayValue"
                }
              }
            },
            "required": [
              "op",
              "id",
              "values"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "const": "replace"
              },
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "node": {
                "$ref": "#/components/schemas/DisplayNode"
              }
            },
            "required": [
              "op",
              "id",
              "node"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "const": "remove"
              },
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              }
            },
            "required": [
              "op",
              "id"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "const": "insert"
              },
              "id": {
                "type": "string",
                "pattern": "^[a-zA-Z0-9_-]{1,64}$"
              },
              "index": {
                "type": "integer",
                "minimum": 0
              },
              "node": {
                "$ref": "#/components/schemas/DisplayNode"
              }
            },
            "required": [
              "op",
              "id",
              "index",
              "node"
            ],
            "additionalProperties": false
          }
        ]
      },
      "DisplayUpdate": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "document": {
                "$ref": "#/components/schemas/DisplayDocument"
              }
            },
            "required": [
              "document"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operations": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayPatch"
                },
                "maxItems": 32,
                "minItems": 1
              }
            },
            "required": [
              "operations"
            ],
            "additionalProperties": false
          }
        ]
      },
      "DisplayInteractionRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "component_id": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]{1,64}$"
          },
          "action_id": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]{1,64}$"
          },
          "layout_revision": {
            "type": "string"
          },
          "context": {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          },
          "value": {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "component_id",
          "action_id",
          "layout_revision"
        ],
        "additionalProperties": false
      },
      "ComponentInteraction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "application_id": {
            "type": "string"
          },
          "installation_id": {
            "type": "string"
          },
          "installer_id": {
            "type": "string"
          },
          "chat_id": {
            "type": "string"
          },
          "command_id": {
            "type": "null"
          },
          "kind": {
            "const": "component"
          },
          "actor_id": {
            "type": "string"
          },
          "message_id": {
            "type": "string"
          },
          "component_id": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]{1,64}$"
          },
          "action_id": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]{1,64}$"
          },
          "layout_revision": {
            "type": "string"
          },
          "context": {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          },
          "configuration_revision": {
            "type": "string"
          },
          "options": {
            "type": "object",
            "properties": {
              "value": {
                "type": [
                  "string",
                  "number",
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "value"
            ],
            "additionalProperties": false
          },
          "created_at": {
            "type": "string"
          },
          "ack_deadline": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "application_id",
          "installation_id",
          "installer_id",
          "chat_id",
          "command_id",
          "kind",
          "actor_id",
          "message_id",
          "component_id",
          "action_id",
          "layout_revision",
          "context",
          "configuration_revision",
          "options",
          "created_at",
          "ack_deadline",
          "expires_at"
        ],
        "additionalProperties": false
      }
    }
  }
}
