{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "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
      },
      "Interaction": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/CommandInteraction"
          },
          {
            "$ref": "#/components/schemas/ComponentInteraction"
          }
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "retry_after_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": true
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": true
      },
      "Configuration": {
        "type": "object",
        "properties": {
          "permission_catalogue": {
            "type": "integer",
            "minimum": 66,
            "maximum": 67
          },
          "name": {
            "type": "string",
            "x-weighted-max-length": 60,
            "x-weighted-min-length": 1,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          },
          "description": {
            "type": "string",
            "x-weighted-max-length": 200,
            "x-weighted-min-length": 0,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent.",
            "x-max-lines": 6
          },
          "icon_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "banner_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "support_url": {
            "type": "string"
          },
          "privacy_url": {
            "type": "string"
          },
          "visibility": {
            "enum": [
              "public",
              "private"
            ]
          },
          "install_policy": {
            "enum": [
              "account",
              "either",
              "chat"
            ]
          },
          "permissions": {
            "type": "object",
            "propertyNames": {
              "enum": [
                "administrator",
                "messages.read_self",
                "messages.read_others",
                "messages.history",
                "messages.search",
                "scribbles.read",
                "bot_dm",
                "calls.audio.receive",
                "calls.video.receive",
                "calls.screen.receive",
                "attachments.download",
                "polls.results",
                "presence.read",
                "typing.read",
                "groups.members.read",
                "friends.read",
                "friends.requests.read",
                "profile.read_self",
                "profile.read_others",
                "profile.write",
                "settings.write",
                "chats.mute",
                "commands",
                "notifications.send",
                "stickers.manage",
                "bot.messages.send",
                "bot.messages.ephemeral",
                "bot.messages.edit",
                "bot.messages.delete",
                "bot.scribbles.write",
                "bot.scribbles.erase",
                "bot.stickers.send",
                "bot.gifs.send",
                "bot.placements.write",
                "bot.attachments.send",
                "bot.polls.create",
                "bot.polls.close",
                "bot.pins.write",
                "bot.reactions.write",
                "bot.games.start",
                "bot.groups.create",
                "bot.calls.start",
                "bot.calls.speak",
                "bot.calls.join_with_user",
                "bot.calls.join_all",
                "bot.calls.video",
                "bot.calls.invite",
                "user.messages.send",
                "user.messages.edit",
                "user.messages.delete",
                "user.scribbles.write",
                "user.scribbles.erase",
                "user.stickers.send",
                "user.gifs.send",
                "user.placements.write",
                "user.attachments.send",
                "user.polls.create",
                "user.polls.close",
                "user.polls.vote",
                "user.pins.write",
                "user.reactions.write",
                "user.friends.request",
                "user.friends.respond",
                "user.blocks.write",
                "user.groups.write",
                "user.groups.members",
                "bot.messages.components"
              ]
            },
            "additionalProperties": {
              "enum": [
                "disabled",
                "optional",
                "required"
              ]
            }
          },
          "commands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Command"
            },
            "maxItems": 100
          }
        },
        "required": [
          "name",
          "description",
          "icon_asset_id",
          "banner_asset_id",
          "support_url",
          "privacy_url",
          "visibility",
          "install_policy",
          "permissions",
          "commands"
        ],
        "additionalProperties": true
      },
      "Application": {
        "type": "object",
        "properties": {
          "permission_catalogue": {
            "type": "integer",
            "minimum": 66,
            "maximum": 67
          },
          "name": {
            "type": "string",
            "x-weighted-max-length": 60,
            "x-weighted-min-length": 1,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          },
          "description": {
            "type": "string",
            "x-weighted-max-length": 200,
            "x-weighted-min-length": 0,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent.",
            "x-max-lines": 6
          },
          "icon_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "banner_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "support_url": {
            "type": "string"
          },
          "privacy_url": {
            "type": "string"
          },
          "visibility": {
            "enum": [
              "public",
              "private"
            ]
          },
          "install_policy": {
            "enum": [
              "account",
              "either",
              "chat"
            ]
          },
          "permissions": {
            "type": "object",
            "propertyNames": {
              "enum": [
                "administrator",
                "messages.read_self",
                "messages.read_others",
                "messages.history",
                "messages.search",
                "scribbles.read",
                "bot_dm",
                "calls.audio.receive",
                "calls.video.receive",
                "calls.screen.receive",
                "attachments.download",
                "polls.results",
                "presence.read",
                "typing.read",
                "groups.members.read",
                "friends.read",
                "friends.requests.read",
                "profile.read_self",
                "profile.read_others",
                "profile.write",
                "settings.write",
                "chats.mute",
                "commands",
                "notifications.send",
                "stickers.manage",
                "bot.messages.send",
                "bot.messages.ephemeral",
                "bot.messages.edit",
                "bot.messages.delete",
                "bot.scribbles.write",
                "bot.scribbles.erase",
                "bot.stickers.send",
                "bot.gifs.send",
                "bot.placements.write",
                "bot.attachments.send",
                "bot.polls.create",
                "bot.polls.close",
                "bot.pins.write",
                "bot.reactions.write",
                "bot.games.start",
                "bot.groups.create",
                "bot.calls.start",
                "bot.calls.speak",
                "bot.calls.join_with_user",
                "bot.calls.join_all",
                "bot.calls.video",
                "bot.calls.invite",
                "user.messages.send",
                "user.messages.edit",
                "user.messages.delete",
                "user.scribbles.write",
                "user.scribbles.erase",
                "user.stickers.send",
                "user.gifs.send",
                "user.placements.write",
                "user.attachments.send",
                "user.polls.create",
                "user.polls.close",
                "user.polls.vote",
                "user.pins.write",
                "user.reactions.write",
                "user.friends.request",
                "user.friends.respond",
                "user.blocks.write",
                "user.groups.write",
                "user.groups.members",
                "bot.messages.components"
              ]
            },
            "additionalProperties": {
              "enum": [
                "disabled",
                "optional",
                "required"
              ]
            }
          },
          "commands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Command"
            },
            "maxItems": 100
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "owner_id": {
            "type": "string"
          },
          "bot_user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "published_revision": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "status": {
            "enum": [
              "draft",
              "published",
              "unpublished",
              "disabled",
              "deleted"
            ]
          },
          "install_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "owner_id",
          "bot_user_id",
          "revision",
          "published_revision",
          "enabled",
          "status",
          "install_url",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": true
      },
      "Scope": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "account"
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "chat"
              },
              "chat_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              }
            },
            "required": [
              "type",
              "chat_id"
            ],
            "additionalProperties": false
          }
        ]
      },
      "Installation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "configuration_revision": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "grant_revision": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "status": {
            "enum": [
              "active",
              "paused",
              "revoked"
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/Scope"
          },
          "permissions": {
            "type": "array",
            "items": {
              "enum": [
                "administrator",
                "messages.read_self",
                "messages.read_others",
                "messages.history",
                "messages.search",
                "scribbles.read",
                "bot_dm",
                "calls.audio.receive",
                "calls.video.receive",
                "calls.screen.receive",
                "attachments.download",
                "polls.results",
                "presence.read",
                "typing.read",
                "groups.members.read",
                "friends.read",
                "friends.requests.read",
                "profile.read_self",
                "profile.read_others",
                "profile.write",
                "settings.write",
                "chats.mute",
                "commands",
                "notifications.send",
                "stickers.manage",
                "bot.messages.send",
                "bot.messages.ephemeral",
                "bot.messages.edit",
                "bot.messages.delete",
                "bot.scribbles.write",
                "bot.scribbles.erase",
                "bot.stickers.send",
                "bot.gifs.send",
                "bot.placements.write",
                "bot.attachments.send",
                "bot.polls.create",
                "bot.polls.close",
                "bot.pins.write",
                "bot.reactions.write",
                "bot.games.start",
                "bot.groups.create",
                "bot.calls.start",
                "bot.calls.speak",
                "bot.calls.join_with_user",
                "bot.calls.join_all",
                "bot.calls.video",
                "bot.calls.invite",
                "user.messages.send",
                "user.messages.edit",
                "user.messages.delete",
                "user.scribbles.write",
                "user.scribbles.erase",
                "user.stickers.send",
                "user.gifs.send",
                "user.placements.write",
                "user.attachments.send",
                "user.polls.create",
                "user.polls.close",
                "user.polls.vote",
                "user.pins.write",
                "user.reactions.write",
                "user.friends.request",
                "user.friends.respond",
                "user.blocks.write",
                "user.groups.write",
                "user.groups.members",
                "bot.messages.components"
              ]
            }
          },
          "optional_permissions": {
            "type": "array",
            "items": {
              "enum": [
                "administrator",
                "messages.read_self",
                "messages.read_others",
                "messages.history",
                "messages.search",
                "scribbles.read",
                "bot_dm",
                "calls.audio.receive",
                "calls.video.receive",
                "calls.screen.receive",
                "attachments.download",
                "polls.results",
                "presence.read",
                "typing.read",
                "groups.members.read",
                "friends.read",
                "friends.requests.read",
                "profile.read_self",
                "profile.read_others",
                "profile.write",
                "settings.write",
                "chats.mute",
                "commands",
                "notifications.send",
                "stickers.manage",
                "bot.messages.send",
                "bot.messages.ephemeral",
                "bot.messages.edit",
                "bot.messages.delete",
                "bot.scribbles.write",
                "bot.scribbles.erase",
                "bot.stickers.send",
                "bot.gifs.send",
                "bot.placements.write",
                "bot.attachments.send",
                "bot.polls.create",
                "bot.polls.close",
                "bot.pins.write",
                "bot.reactions.write",
                "bot.games.start",
                "bot.groups.create",
                "bot.calls.start",
                "bot.calls.speak",
                "bot.calls.join_with_user",
                "bot.calls.join_all",
                "bot.calls.video",
                "bot.calls.invite",
                "user.messages.send",
                "user.messages.edit",
                "user.messages.delete",
                "user.scribbles.write",
                "user.scribbles.erase",
                "user.stickers.send",
                "user.gifs.send",
                "user.placements.write",
                "user.attachments.send",
                "user.polls.create",
                "user.polls.close",
                "user.polls.vote",
                "user.pins.write",
                "user.reactions.write",
                "user.friends.request",
                "user.friends.respond",
                "user.blocks.write",
                "user.groups.write",
                "user.groups.members",
                "bot.messages.components"
              ]
            }
          },
          "authorized_since": {
            "type": "object",
            "propertyNames": {
              "enum": [
                "administrator",
                "messages.read_self",
                "messages.read_others",
                "messages.history",
                "messages.search",
                "scribbles.read",
                "bot_dm",
                "calls.audio.receive",
                "calls.video.receive",
                "calls.screen.receive",
                "attachments.download",
                "polls.results",
                "presence.read",
                "typing.read",
                "groups.members.read",
                "friends.read",
                "friends.requests.read",
                "profile.read_self",
                "profile.read_others",
                "profile.write",
                "settings.write",
                "chats.mute",
                "commands",
                "notifications.send",
                "stickers.manage",
                "bot.messages.send",
                "bot.messages.ephemeral",
                "bot.messages.edit",
                "bot.messages.delete",
                "bot.scribbles.write",
                "bot.scribbles.erase",
                "bot.stickers.send",
                "bot.gifs.send",
                "bot.placements.write",
                "bot.attachments.send",
                "bot.polls.create",
                "bot.polls.close",
                "bot.pins.write",
                "bot.reactions.write",
                "bot.games.start",
                "bot.groups.create",
                "bot.calls.start",
                "bot.calls.speak",
                "bot.calls.join_with_user",
                "bot.calls.join_all",
                "bot.calls.video",
                "bot.calls.invite",
                "user.messages.send",
                "user.messages.edit",
                "user.messages.delete",
                "user.scribbles.write",
                "user.scribbles.erase",
                "user.stickers.send",
                "user.gifs.send",
                "user.placements.write",
                "user.attachments.send",
                "user.polls.create",
                "user.polls.close",
                "user.polls.vote",
                "user.pins.write",
                "user.reactions.write",
                "user.friends.request",
                "user.friends.respond",
                "user.blocks.write",
                "user.groups.write",
                "user.groups.members",
                "bot.messages.components"
              ]
            },
            "additionalProperties": {
              "type": "string",
              "format": "date-time"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "application_id",
          "user_id",
          "configuration_revision",
          "grant_revision",
          "status",
          "scope",
          "permissions",
          "optional_permissions",
          "authorized_since",
          "created_at"
        ],
        "additionalProperties": true
      },
      "Command": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "pattern": "^[a-z0-9_-]+$"
          },
          "description": {
            "type": "string",
            "x-weighted-max-length": 100,
            "x-weighted-min-length": 1,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 32,
                  "pattern": "^[a-z0-9_-]+$"
                },
                "description": {
                  "type": "string",
                  "x-weighted-max-length": 100,
                  "x-weighted-min-length": 1,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                },
                "type": {
                  "enum": [
                    "string",
                    "integer",
                    "number",
                    "boolean",
                    "user",
                    "message",
                    "attachment"
                  ]
                },
                "required": {
                  "type": "boolean"
                },
                "choices": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "x-weighted-max-length": 100,
                        "x-weighted-min-length": 1,
                        "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                      },
                      "value": {
                        "type": [
                          "string",
                          "number"
                        ]
                      }
                    },
                    "required": [
                      "name",
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "maxItems": 25
                }
              },
              "required": [
                "name",
                "description",
                "type"
              ],
              "additionalProperties": false
            },
            "maxItems": 25
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "options",
          "revision"
        ],
        "additionalProperties": true
      },
      "CommandCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "pattern": "^[a-z0-9_-]+$"
          },
          "description": {
            "type": "string",
            "x-weighted-max-length": 100,
            "x-weighted-min-length": 1,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 32,
                  "pattern": "^[a-z0-9_-]+$"
                },
                "description": {
                  "type": "string",
                  "x-weighted-max-length": 100,
                  "x-weighted-min-length": 1,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                },
                "type": {
                  "enum": [
                    "string",
                    "integer",
                    "number",
                    "boolean",
                    "user",
                    "message",
                    "attachment"
                  ]
                },
                "required": {
                  "type": "boolean"
                },
                "choices": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "x-weighted-max-length": 100,
                        "x-weighted-min-length": 1,
                        "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                      },
                      "value": {
                        "type": [
                          "string",
                          "number"
                        ]
                      }
                    },
                    "required": [
                      "name",
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "maxItems": 25
                }
              },
              "required": [
                "name",
                "description",
                "type"
              ],
              "additionalProperties": false
            },
            "maxItems": 25
          }
        },
        "required": [
          "name",
          "description"
        ],
        "additionalProperties": false
      },
      "CommandPatch": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "pattern": "^[a-z0-9_-]+$"
          },
          "description": {
            "type": "string",
            "x-weighted-max-length": 100,
            "x-weighted-min-length": 1,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 32,
                  "pattern": "^[a-z0-9_-]+$"
                },
                "description": {
                  "type": "string",
                  "x-weighted-max-length": 100,
                  "x-weighted-min-length": 1,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                },
                "type": {
                  "enum": [
                    "string",
                    "integer",
                    "number",
                    "boolean",
                    "user",
                    "message",
                    "attachment"
                  ]
                },
                "required": {
                  "type": "boolean"
                },
                "choices": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "x-weighted-max-length": 100,
                        "x-weighted-min-length": 1,
                        "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                      },
                      "value": {
                        "type": [
                          "string",
                          "number"
                        ]
                      }
                    },
                    "required": [
                      "name",
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "maxItems": 25
                }
              },
              "required": [
                "name",
                "description",
                "type"
              ],
              "additionalProperties": false
            },
            "maxItems": 25
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "BasicIdentity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "kind": {
            "enum": [
              "bot",
              "user"
            ]
          },
          "display_name": {
            "type": "string"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "display_name",
          "avatar_url"
        ],
        "additionalProperties": true
      },
      "DeveloperUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "avatar_version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "username",
          "display_name",
          "avatar_version"
        ],
        "additionalProperties": true
      },
      "Chat": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "kind": {
            "enum": [
              "group",
              "dm"
            ]
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "title"
        ],
        "additionalProperties": true
      },
      "Message": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "chat_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "sequence": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "kind": {
            "type": "string"
          },
          "actor": {
            "type": "object",
            "properties": {
              "kind": {
                "enum": [
                  "bot",
                  "user"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              }
            },
            "required": [
              "kind",
              "id"
            ],
            "additionalProperties": true
          },
          "installation_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "via": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "application_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[\\w-]+$"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "application_id",
                  "name"
                ],
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "edited_via": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "application_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[\\w-]+$"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "application_id",
                  "name"
                ],
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "content": {
            "type": "string"
          },
          "has_display": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "edited_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "reply_to": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "attachment_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "audience": {
            "enum": [
              "chat",
              "installer",
              "interaction"
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "chat_id",
          "revision",
          "content",
          "created_at",
          "audience"
        ],
        "additionalProperties": true
      },
      "MessagePatch": {
        "type": "object",
        "properties": {
          "actor": {
            "enum": [
              "bot",
              "user"
            ]
          },
          "content": {
            "type": "string",
            "x-weighted-max-length": 4000,
            "x-weighted-min-length": 1,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          }
        },
        "required": [
          "actor",
          "content"
        ],
        "additionalProperties": false
      },
      "MessageCreate": {
        "type": "object",
        "properties": {
          "actor": {
            "enum": [
              "bot",
              "user"
            ]
          },
          "content": {
            "type": "string",
            "x-weighted-max-length": 4000,
            "x-weighted-min-length": 1,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          },
          "reply_to": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "display": {
            "$ref": "#/components/schemas/DisplayDocument"
          }
        },
        "required": [
          "actor",
          "content"
        ],
        "additionalProperties": false
      },
      "EphemeralCreate": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "x-weighted-max-length": 4000,
            "x-weighted-min-length": 1,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          },
          "expires_in": {
            "type": "integer",
            "minimum": 60,
            "maximum": 86400
          },
          "display": {
            "$ref": "#/components/schemas/DisplayDocument"
          }
        },
        "required": [
          "content"
        ],
        "additionalProperties": false
      },
      "MessageReceipt": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "content": {
            "type": "string"
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "edited_at": {
            "type": "string",
            "format": "date-time"
          },
          "audience": {
            "enum": [
              "chat",
              "installer",
              "interaction"
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "revision"
        ],
        "additionalProperties": true
      },
      "Pin": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "message_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "actor": {
            "type": "object",
            "properties": {
              "kind": {
                "enum": [
                  "bot",
                  "user"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              }
            },
            "required": [
              "kind",
              "id"
            ],
            "additionalProperties": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          }
        },
        "required": [
          "message_id",
          "revision"
        ],
        "additionalProperties": true
      },
      "Reaction": {
        "type": "object",
        "properties": {
          "message_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "emoji": {
            "type": "string"
          },
          "actor": {
            "type": "object",
            "properties": {
              "kind": {
                "enum": [
                  "bot",
                  "user"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              }
            },
            "required": [
              "kind",
              "id"
            ],
            "additionalProperties": true
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          }
        },
        "required": [
          "message_id"
        ],
        "additionalProperties": true
      },
      "Asset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "purpose": {
            "enum": [
              "attachment",
              "sticker",
              "avatar",
              "banner",
              "group_icon"
            ]
          },
          "owner_kind": {
            "enum": [
              "bot",
              "user"
            ]
          },
          "content_type": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "filename": {
            "type": "string"
          },
          "width": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "height": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "enum": [
              "uploading",
              "ready",
              "failed"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "purpose",
          "owner_kind",
          "content_type",
          "size",
          "filename",
          "width",
          "height",
          "status",
          "created_at"
        ],
        "additionalProperties": true
      },
      "Upload": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "part_size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "part_count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "part_size",
          "part_count",
          "expires_at"
        ],
        "additionalProperties": true
      },
      "UploadCreate": {
        "type": "object",
        "properties": {
          "actor": {
            "enum": [
              "bot",
              "user"
            ]
          },
          "purpose": {
            "enum": [
              "attachment",
              "sticker",
              "avatar",
              "banner",
              "group_icon"
            ]
          },
          "chat_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240,
            "pattern": "^[^/\\\\\\u0000-\\u001f\\u007f]+$"
          },
          "content_type": {
            "enum": [
              "image/png",
              "image/jpeg",
              "image/webp",
              "image/gif",
              "image/avif",
              "image/bmp",
              "video/mp4",
              "video/webm",
              "video/quicktime",
              "application/octet-stream"
            ]
          },
          "size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 157286400
          }
        },
        "required": [
          "actor",
          "purpose",
          "filename",
          "content_type",
          "size"
        ],
        "additionalProperties": false
      },
      "UploadPart": {
        "type": "object",
        "properties": {
          "part_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 15
          },
          "etag": {
            "type": "string"
          }
        },
        "required": [
          "part_number",
          "etag"
        ],
        "additionalProperties": false
      },
      "Sticker": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "name": {
            "type": "string"
          },
          "owner_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "uploaded": {
            "type": "boolean"
          },
          "content_type": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "thumbnail_url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "owner_id",
          "uploaded",
          "content_type",
          "size",
          "revision",
          "thumbnail_url"
        ],
        "additionalProperties": true
      },
      "Gif": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "provider": {
            "const": "klipy"
          },
          "width": {
            "type": "number"
          },
          "height": {
            "type": "number"
          },
          "preview_url": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "provider",
          "width",
          "height",
          "preview_url",
          "expires_at"
        ],
        "additionalProperties": true
      },
      "Scribble": {
        "type": "object",
        "properties": {
          "anchor_sequence": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "canvas_width": {
            "type": "integer",
            "minimum": 200,
            "maximum": 4000
          },
          "tool": {
            "enum": [
              "pen",
              "pencil",
              "highlighter"
            ]
          },
          "color": {
            "type": "string",
            "pattern": "^#[a-fA-F0-9]{6}([fF]{2})?$"
          },
          "size": {
            "type": "number",
            "minimum": 1,
            "maximum": 24
          },
          "points": {
            "type": "array",
            "items": {
              "type": "array",
              "items": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": -8,
                  "maximum": 8
                }
              ],
              "minItems": 2,
              "maxItems": 2
            },
            "minItems": 1,
            "maxItems": 1200
          },
          "draw_order": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "chat_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "actor": {
            "type": "object",
            "properties": {
              "kind": {
                "enum": [
                  "bot",
                  "user"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              }
            },
            "required": [
              "kind",
              "id"
            ],
            "additionalProperties": true
          },
          "installation_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "erasures": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                "size": {
                  "type": "number",
                  "minimum": 1,
                  "maximum": 24
                },
                "points": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "items": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "number",
                        "minimum": -8,
                        "maximum": 8
                      }
                    ],
                    "minItems": 2,
                    "maxItems": 2
                  },
                  "minItems": 1,
                  "maxItems": 1200
                }
              },
              "required": [
                "id",
                "size",
                "points"
              ],
              "additionalProperties": true
            }
          }
        },
        "required": [
          "id",
          "chat_id",
          "actor",
          "anchor_sequence",
          "canvas_width",
          "tool",
          "color",
          "size",
          "points",
          "draw_order",
          "created_at",
          "revision"
        ],
        "additionalProperties": true
      },
      "ScribbleCreate": {
        "type": "object",
        "properties": {
          "actor": {
            "enum": [
              "bot",
              "user"
            ]
          },
          "anchor_sequence": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "canvas_width": {
            "type": "integer",
            "minimum": 200,
            "maximum": 4000
          },
          "tool": {
            "enum": [
              "pen",
              "pencil",
              "highlighter"
            ]
          },
          "color": {
            "type": "string",
            "pattern": "^#[a-fA-F0-9]{6}([fF]{2})?$"
          },
          "size": {
            "type": "number",
            "minimum": 1,
            "maximum": 24
          },
          "points": {
            "type": "array",
            "items": {
              "type": "array",
              "items": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": -8,
                  "maximum": 8
                }
              ],
              "minItems": 2,
              "maxItems": 2
            },
            "minItems": 1,
            "maxItems": 1200
          },
          "draw_order": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "actor",
          "anchor_sequence",
          "tool",
          "color",
          "size",
          "points"
        ],
        "additionalProperties": false
      },
      "ScribblePatch": {
        "type": "object",
        "properties": {
          "actor": {
            "enum": [
              "bot",
              "user"
            ]
          },
          "points": {
            "type": "array",
            "items": {
              "type": "array",
              "items": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "number",
                  "minimum": -8,
                  "maximum": 8
                }
              ],
              "minItems": 2,
              "maxItems": 2
            },
            "minItems": 1,
            "maxItems": 1200
          },
          "color": {
            "type": "string",
            "pattern": "^#[a-fA-F0-9]{6}([fF]{2})?$"
          },
          "size": {
            "type": "number",
            "minimum": 1,
            "maximum": 24
          }
        },
        "required": [
          "actor"
        ],
        "additionalProperties": false
      },
      "ScribbleErase": {
        "type": "object",
        "properties": {
          "actor": {
            "enum": [
              "bot",
              "user"
            ]
          },
          "removed_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-f0-9-]{36}$"
            },
            "minItems": 0,
            "maxItems": 100
          },
          "cuts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stroke_id": {
                  "type": "string",
                  "pattern": "^[a-f0-9-]{36}$"
                },
                "size": {
                  "type": "number",
                  "minimum": 1,
                  "maximum": 24
                },
                "points": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "items": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "number",
                        "minimum": -8,
                        "maximum": 8
                      }
                    ],
                    "minItems": 2,
                    "maxItems": 2
                  },
                  "minItems": 1,
                  "maxItems": 1200
                }
              },
              "required": [
                "stroke_id",
                "size",
                "points"
              ],
              "additionalProperties": false
            },
            "minItems": 0,
            "maxItems": 100
          },
          "revisions": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          }
        },
        "required": [
          "actor",
          "removed_ids",
          "cuts",
          "revisions"
        ],
        "additionalProperties": false
      },
      "ScribbleErased": {
        "type": "object",
        "properties": {
          "removed_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[\\w-]+$"
            }
          },
          "cuts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                "stroke_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                "size": {
                  "type": "number"
                },
                "points": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "items": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "number",
                        "minimum": -8,
                        "maximum": 8
                      }
                    ],
                    "minItems": 2,
                    "maxItems": 2
                  },
                  "minItems": 1,
                  "maxItems": 1200
                }
              },
              "required": [
                "id",
                "stroke_id",
                "size",
                "points"
              ],
              "additionalProperties": true
            }
          },
          "revision": {
            "type": "string"
          }
        },
        "required": [
          "removed_ids",
          "cuts"
        ],
        "additionalProperties": true
      },
      "Placement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "chat_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "message_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "kind": {
            "enum": [
              "sticker",
              "gif"
            ]
          },
          "actor_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "anchor_sequence": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "canvas_width": {
            "type": "number",
            "minimum": 200,
            "maximum": 4000
          },
          "x": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "y": {
            "type": "number",
            "minimum": -160,
            "maximum": 160
          },
          "width": {
            "type": "number",
            "minimum": 0.004,
            "maximum": 7.2
          },
          "height": {
            "type": "number",
            "minimum": 0.004,
            "maximum": 7.2
          },
          "rotation": {
            "type": "number"
          },
          "order": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          }
        },
        "required": [
          "id",
          "chat_id",
          "message_id",
          "kind",
          "actor_id",
          "anchor_sequence",
          "canvas_width",
          "x",
          "y",
          "width",
          "height",
          "rotation",
          "order",
          "revision"
        ],
        "additionalProperties": true
      },
      "PlacementPatch": {
        "type": "object",
        "properties": {
          "actor": {
            "enum": [
              "bot",
              "user"
            ]
          },
          "anchor_sequence": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "canvas_width": {
            "type": "number",
            "minimum": 200,
            "maximum": 4000
          },
          "x": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "y": {
            "type": "number",
            "minimum": -160,
            "maximum": 160
          },
          "width": {
            "type": "number",
            "minimum": 0.004,
            "maximum": 7.2
          },
          "height": {
            "type": "number",
            "minimum": 0.004,
            "maximum": 7.2
          },
          "rotation": {
            "type": "number"
          },
          "order": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647
          }
        },
        "required": [
          "actor"
        ],
        "additionalProperties": false
      },
      "PollCreate": {
        "type": "object",
        "properties": {
          "actor": {
            "enum": [
              "bot",
              "user"
            ]
          },
          "title": {
            "type": "string",
            "x-weighted-max-length": 200,
            "x-weighted-min-length": 1,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string",
              "x-weighted-max-length": 100,
              "x-weighted-min-length": 1,
              "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
            },
            "minItems": 2,
            "maxItems": 20
          },
          "multiple": {
            "type": "boolean"
          },
          "public_votes": {
            "type": "boolean"
          },
          "duration_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 2592000
          }
        },
        "required": [
          "actor",
          "title",
          "options",
          "multiple",
          "public_votes",
          "duration_seconds"
        ],
        "additionalProperties": false
      },
      "Poll": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "message_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "title": {
            "type": "string"
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "multiple": {
            "type": "boolean"
          },
          "public_votes": {
            "type": "boolean"
          },
          "closes_at": {
            "type": "string",
            "format": "date-time"
          },
          "closed": {
            "type": "boolean"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "voters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128,
                        "pattern": "^[\\w-]+$"
                      },
                      "display_name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "display_name"
                    ],
                    "additionalProperties": true
                  }
                }
              },
              "required": [
                "id",
                "text",
                "count"
              ],
              "additionalProperties": true
            }
          },
          "voters": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "winner_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "message_id",
          "title",
          "revision",
          "multiple",
          "public_votes",
          "closes_at",
          "closed",
          "options",
          "voters",
          "winner_ids"
        ],
        "additionalProperties": true
      },
      "PollCreated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "message_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "title": {
            "type": "string"
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "closes_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "message_id",
          "revision"
        ],
        "additionalProperties": true
      },
      "PollVote": {
        "type": "object",
        "properties": {
          "poll_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "own_option_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          }
        },
        "required": [
          "poll_id",
          "own_option_ids",
          "revision"
        ],
        "additionalProperties": true
      },
      "Game": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "min_players": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "max_players": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "start_options_schema": {
            "type": "object"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "min_players",
          "max_players",
          "start_options_schema"
        ],
        "additionalProperties": true
      },
      "GameStarted": {
        "type": "object",
        "properties": {
          "game_session_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "chat_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "game_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "status": {
            "type": "string"
          },
          "message_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "player_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "game_session_id",
          "chat_id",
          "game_id",
          "status",
          "message_id",
          "player_count"
        ],
        "additionalProperties": true
      },
      "Call": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "chat_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "status": {
            "type": "string"
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "participants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "display_name": {
                  "type": "string"
                }
              },
              "required": [
                "id"
              ],
              "additionalProperties": true
            }
          }
        },
        "required": [
          "id",
          "chat_id",
          "status",
          "started_at",
          "participants"
        ],
        "additionalProperties": true
      },
      "SessionDescription": {
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "offer",
              "answer"
            ]
          },
          "sdp": {
            "type": "string",
            "minLength": 1,
            "x-max-utf8-bytes": 65536
          }
        },
        "required": [
          "type",
          "sdp"
        ],
        "additionalProperties": false
      },
      "CallSession": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "participant_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "ice_servers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "urls": {
                  "type": [
                    "string",
                    "array"
                  ]
                },
                "username": {
                  "type": "string"
                },
                "credential": {
                  "type": "string"
                }
              },
              "required": [
                "urls"
              ],
              "additionalProperties": true
            }
          },
          "revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "capabilities": {
            "type": "object",
            "properties": {
              "audio_codecs": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "video_codecs": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "max_publish_tracks": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "max_subscriptions": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "max_tracks_per_request": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "audio_codecs",
              "video_codecs",
              "max_publish_tracks",
              "max_subscriptions",
              "max_tracks_per_request"
            ],
            "additionalProperties": true
          }
        },
        "required": [
          "id",
          "participant_id",
          "ice_servers",
          "revision",
          "expires_at",
          "capabilities"
        ],
        "additionalProperties": true
      },
      "Track": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "participant_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "source": {
            "enum": [
              "microphone",
              "camera",
              "screen",
              "screen_audio"
            ]
          },
          "kind": {
            "enum": [
              "audio",
              "video"
            ]
          },
          "revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "participant_id",
          "source",
          "kind",
          "revision",
          "active"
        ],
        "additionalProperties": true
      },
      "Negotiation": {
        "type": "object",
        "properties": {
          "description": {
            "$ref": "#/components/schemas/SessionDescription"
          },
          "tracks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "track_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                "mid": {
                  "type": "string"
                }
              },
              "required": [
                "track_id",
                "mid"
              ],
              "additionalProperties": false
            }
          },
          "revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "tracks",
          "revision"
        ],
        "additionalProperties": true
      },
      "Publish": {
        "type": "object",
        "properties": {
          "description": {
            "$ref": "#/components/schemas/SessionDescription"
          },
          "tracks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "mid": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[\\w-]+$"
                },
                "source": {
                  "enum": [
                    "microphone",
                    "camera"
                  ]
                }
              },
              "required": [
                "mid",
                "source"
              ],
              "additionalProperties": false
            },
            "maxItems": 2,
            "minItems": 1
          }
        },
        "required": [
          "description",
          "tracks"
        ],
        "additionalProperties": false
      },
      "CallInvitation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "status": {
            "enum": [
              "pending",
              "approved",
              "rejected",
              "expired",
              "cancelled"
            ]
          },
          "user_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[\\w-]+$"
            }
          },
          "required_votes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "approvals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "status",
          "expires_at"
        ],
        "additionalProperties": true
      },
      "Profile": {
        "type": "object",
        "properties": {
          "display_name": {
            "type": "string",
            "x-weighted-max-length": 20,
            "x-weighted-min-length": 1,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          },
          "about": {
            "type": "string",
            "x-weighted-max-length": 200,
            "x-weighted-min-length": 0,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent.",
            "x-max-lines": 6
          },
          "pronouns": {
            "type": "string",
            "x-weighted-max-length": 40,
            "x-weighted-min-length": 0,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          },
          "background_gradient": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "top": {
                    "type": "string",
                    "pattern": "^#[a-fA-F0-9]{6}$"
                  },
                  "bottom": {
                    "type": "string",
                    "pattern": "^#[a-fA-F0-9]{6}$"
                  }
                },
                "required": [
                  "top",
                  "bottom"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "nameplate_name_color": {
            "enum": [
              "red",
              "orange",
              "yellow",
              "lime",
              "green",
              "teal",
              "blue",
              "purple",
              "pink",
              "gray",
              null
            ]
          },
          "nameplate_background_color": {
            "enum": [
              "red",
              "orange",
              "yellow",
              "lime",
              "green",
              "teal",
              "blue",
              "purple",
              "pink",
              "gray",
              null
            ]
          },
          "online_indicator_color": {
            "enum": [
              "red",
              "orange",
              "yellow",
              "lime",
              "green",
              "teal",
              "blue",
              "purple",
              "pink",
              "gray",
              null
            ]
          },
          "announcement_pack": {
            "enum": [
              "",
              "cat",
              "dog",
              "cosmic",
              "pirate",
              "arcade",
              "haunted",
              "royal"
            ]
          },
          "profile_art": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "version": {
                    "const": 2
                  },
                  "strokes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9-]{36}$"
                        },
                        "anchor_seq": {
                          "const": 0
                        },
                        "canvas_width": {
                          "const": 428
                        },
                        "tool": {
                          "enum": [
                            "pen",
                            "pencil",
                            "highlighter"
                          ]
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[a-fA-F0-9]{6}([fF]{2})?$"
                        },
                        "size": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 24
                        },
                        "points": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1.2827102803738317
                              }
                            ],
                            "minItems": 2,
                            "maxItems": 2
                          },
                          "minItems": 1,
                          "maxItems": 1200
                        },
                        "draw_order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "erasures": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^[a-f0-9-]{36}$"
                              },
                              "size": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 24
                              },
                              "points": {
                                "type": "array",
                                "items": {
                                  "type": "array",
                                  "items": [
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1.2827102803738317
                                    }
                                  ],
                                  "minItems": 2,
                                  "maxItems": 2
                                },
                                "minItems": 1,
                                "maxItems": 1200
                              }
                            },
                            "required": [
                              "id",
                              "size",
                              "points"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 0,
                          "maxItems": 100
                        }
                      },
                      "required": [
                        "id",
                        "anchor_seq",
                        "canvas_width",
                        "tool",
                        "color",
                        "size",
                        "points",
                        "draw_order"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 0,
                    "maxItems": 1500
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9-]{36}$"
                        },
                        "kind": {
                          "enum": [
                            "emoji",
                            "sticker"
                          ]
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 36
                        },
                        "x": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 428
                        },
                        "y": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 549
                        },
                        "width": {
                          "type": "number",
                          "minimum": 16,
                          "maximum": 428
                        },
                        "height": {
                          "type": "number",
                          "minimum": 16,
                          "maximum": 549
                        },
                        "rotation": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "value",
                        "x",
                        "y",
                        "width",
                        "height",
                        "rotation",
                        "order"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 0,
                    "maxItems": 40
                  }
                },
                "required": [
                  "version",
                  "strokes",
                  "items"
                ],
                "additionalProperties": false,
                "x-canvas": {
                  "width": 428,
                  "height": 549
                },
                "x-encoded-max-length": 1500000,
                "x-total-points": 180000
              },
              {
                "type": "null"
              }
            ]
          },
          "nameplate_art": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "version": {
                    "const": 2
                  },
                  "strokes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9-]{36}$"
                        },
                        "anchor_seq": {
                          "const": 0
                        },
                        "canvas_width": {
                          "const": 280
                        },
                        "tool": {
                          "enum": [
                            "pen",
                            "pencil",
                            "highlighter"
                          ]
                        },
                        "color": {
                          "anyOf": [
                            {
                              "enum": [
                                "#ad333e",
                                "#9c491b",
                                "#79601a",
                                "#547222",
                                "#27734b",
                                "#187577",
                                "#3e5bb0",
                                "#7946a0",
                                "#a33d78",
                                "#62686c"
                              ]
                            },
                            {
                              "type": "string",
                              "pattern": "^#[a-fA-F0-9]{6}[fF]{2}$"
                            }
                          ]
                        },
                        "size": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 24
                        },
                        "points": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 0.22857142857142856
                              }
                            ],
                            "minItems": 2,
                            "maxItems": 2
                          },
                          "minItems": 1,
                          "maxItems": 1200
                        },
                        "draw_order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "erasures": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^[a-f0-9-]{36}$"
                              },
                              "size": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 24
                              },
                              "points": {
                                "type": "array",
                                "items": {
                                  "type": "array",
                                  "items": [
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 0.22857142857142856
                                    }
                                  ],
                                  "minItems": 2,
                                  "maxItems": 2
                                },
                                "minItems": 1,
                                "maxItems": 1200
                              }
                            },
                            "required": [
                              "id",
                              "size",
                              "points"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 0,
                          "maxItems": 100
                        }
                      },
                      "required": [
                        "id",
                        "anchor_seq",
                        "canvas_width",
                        "tool",
                        "color",
                        "size",
                        "points",
                        "draw_order"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 0,
                    "maxItems": 400
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9-]{36}$"
                        },
                        "kind": {
                          "enum": [
                            "emoji"
                          ]
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 36
                        },
                        "x": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 280
                        },
                        "y": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 64
                        },
                        "width": {
                          "type": "number",
                          "minimum": 16,
                          "maximum": 280
                        },
                        "height": {
                          "type": "number",
                          "minimum": 16,
                          "maximum": 64
                        },
                        "rotation": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "value",
                        "x",
                        "y",
                        "width",
                        "height",
                        "rotation",
                        "order"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 0,
                    "maxItems": 8
                  }
                },
                "required": [
                  "version",
                  "strokes",
                  "items"
                ],
                "additionalProperties": false,
                "x-canvas": {
                  "width": 280,
                  "height": 64
                },
                "x-encoded-max-length": 240000,
                "x-total-points": 24000,
                "x-stroke-colors": [
                  "#ad333e",
                  "#9c491b",
                  "#79601a",
                  "#547222",
                  "#27734b",
                  "#187577",
                  "#3e5bb0",
                  "#7946a0",
                  "#a33d78",
                  "#62686c"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[\\w-]{1,100}$"
          },
          "banner_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[\\w-]{1,100}$"
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "kind": {
            "enum": [
              "user",
              "bot"
            ]
          },
          "username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "banner_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          }
        },
        "required": [
          "id",
          "kind",
          "username",
          "display_name",
          "about",
          "pronouns",
          "background_gradient",
          "nameplate_name_color",
          "nameplate_background_color",
          "online_indicator_color",
          "announcement_pack",
          "profile_art",
          "nameplate_art",
          "avatar_url",
          "banner_url",
          "revision"
        ],
        "additionalProperties": true
      },
      "ProfilePatch": {
        "type": "object",
        "properties": {
          "display_name": {
            "type": "string",
            "x-weighted-max-length": 20,
            "x-weighted-min-length": 1,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          },
          "about": {
            "type": "string",
            "x-weighted-max-length": 200,
            "x-weighted-min-length": 0,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent.",
            "x-max-lines": 6
          },
          "pronouns": {
            "type": "string",
            "x-weighted-max-length": 40,
            "x-weighted-min-length": 0,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          },
          "background_gradient": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "top": {
                    "type": "string",
                    "pattern": "^#[a-fA-F0-9]{6}$"
                  },
                  "bottom": {
                    "type": "string",
                    "pattern": "^#[a-fA-F0-9]{6}$"
                  }
                },
                "required": [
                  "top",
                  "bottom"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "nameplate_name_color": {
            "enum": [
              "red",
              "orange",
              "yellow",
              "lime",
              "green",
              "teal",
              "blue",
              "purple",
              "pink",
              "gray",
              null
            ]
          },
          "nameplate_background_color": {
            "enum": [
              "red",
              "orange",
              "yellow",
              "lime",
              "green",
              "teal",
              "blue",
              "purple",
              "pink",
              "gray",
              null
            ]
          },
          "online_indicator_color": {
            "enum": [
              "red",
              "orange",
              "yellow",
              "lime",
              "green",
              "teal",
              "blue",
              "purple",
              "pink",
              "gray",
              null
            ]
          },
          "announcement_pack": {
            "enum": [
              "",
              "cat",
              "dog",
              "cosmic",
              "pirate",
              "arcade",
              "haunted",
              "royal"
            ]
          },
          "profile_art": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "version": {
                    "const": 2
                  },
                  "strokes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9-]{36}$"
                        },
                        "anchor_seq": {
                          "const": 0
                        },
                        "canvas_width": {
                          "const": 428
                        },
                        "tool": {
                          "enum": [
                            "pen",
                            "pencil",
                            "highlighter"
                          ]
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[a-fA-F0-9]{6}([fF]{2})?$"
                        },
                        "size": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 24
                        },
                        "points": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1.2827102803738317
                              }
                            ],
                            "minItems": 2,
                            "maxItems": 2
                          },
                          "minItems": 1,
                          "maxItems": 1200
                        },
                        "draw_order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "erasures": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^[a-f0-9-]{36}$"
                              },
                              "size": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 24
                              },
                              "points": {
                                "type": "array",
                                "items": {
                                  "type": "array",
                                  "items": [
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1.2827102803738317
                                    }
                                  ],
                                  "minItems": 2,
                                  "maxItems": 2
                                },
                                "minItems": 1,
                                "maxItems": 1200
                              }
                            },
                            "required": [
                              "id",
                              "size",
                              "points"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 0,
                          "maxItems": 100
                        }
                      },
                      "required": [
                        "id",
                        "anchor_seq",
                        "canvas_width",
                        "tool",
                        "color",
                        "size",
                        "points",
                        "draw_order"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 0,
                    "maxItems": 1500
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9-]{36}$"
                        },
                        "kind": {
                          "enum": [
                            "emoji",
                            "sticker"
                          ]
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 36
                        },
                        "x": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 428
                        },
                        "y": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 549
                        },
                        "width": {
                          "type": "number",
                          "minimum": 16,
                          "maximum": 428
                        },
                        "height": {
                          "type": "number",
                          "minimum": 16,
                          "maximum": 549
                        },
                        "rotation": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "value",
                        "x",
                        "y",
                        "width",
                        "height",
                        "rotation",
                        "order"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 0,
                    "maxItems": 40
                  }
                },
                "required": [
                  "version",
                  "strokes",
                  "items"
                ],
                "additionalProperties": false,
                "x-canvas": {
                  "width": 428,
                  "height": 549
                },
                "x-encoded-max-length": 1500000,
                "x-total-points": 180000
              },
              {
                "type": "null"
              }
            ]
          },
          "nameplate_art": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "version": {
                    "const": 2
                  },
                  "strokes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9-]{36}$"
                        },
                        "anchor_seq": {
                          "const": 0
                        },
                        "canvas_width": {
                          "const": 280
                        },
                        "tool": {
                          "enum": [
                            "pen",
                            "pencil",
                            "highlighter"
                          ]
                        },
                        "color": {
                          "anyOf": [
                            {
                              "enum": [
                                "#ad333e",
                                "#9c491b",
                                "#79601a",
                                "#547222",
                                "#27734b",
                                "#187577",
                                "#3e5bb0",
                                "#7946a0",
                                "#a33d78",
                                "#62686c"
                              ]
                            },
                            {
                              "type": "string",
                              "pattern": "^#[a-fA-F0-9]{6}[fF]{2}$"
                            }
                          ]
                        },
                        "size": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 24
                        },
                        "points": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 0.22857142857142856
                              }
                            ],
                            "minItems": 2,
                            "maxItems": 2
                          },
                          "minItems": 1,
                          "maxItems": 1200
                        },
                        "draw_order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "erasures": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^[a-f0-9-]{36}$"
                              },
                              "size": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 24
                              },
                              "points": {
                                "type": "array",
                                "items": {
                                  "type": "array",
                                  "items": [
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 0.22857142857142856
                                    }
                                  ],
                                  "minItems": 2,
                                  "maxItems": 2
                                },
                                "minItems": 1,
                                "maxItems": 1200
                              }
                            },
                            "required": [
                              "id",
                              "size",
                              "points"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 0,
                          "maxItems": 100
                        }
                      },
                      "required": [
                        "id",
                        "anchor_seq",
                        "canvas_width",
                        "tool",
                        "color",
                        "size",
                        "points",
                        "draw_order"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 0,
                    "maxItems": 400
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9-]{36}$"
                        },
                        "kind": {
                          "enum": [
                            "emoji"
                          ]
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 36
                        },
                        "x": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 280
                        },
                        "y": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 64
                        },
                        "width": {
                          "type": "number",
                          "minimum": 16,
                          "maximum": 280
                        },
                        "height": {
                          "type": "number",
                          "minimum": 16,
                          "maximum": 64
                        },
                        "rotation": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "value",
                        "x",
                        "y",
                        "width",
                        "height",
                        "rotation",
                        "order"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 0,
                    "maxItems": 8
                  }
                },
                "required": [
                  "version",
                  "strokes",
                  "items"
                ],
                "additionalProperties": false,
                "x-canvas": {
                  "width": 280,
                  "height": 64
                },
                "x-encoded-max-length": 240000,
                "x-total-points": 24000,
                "x-stroke-colors": [
                  "#ad333e",
                  "#9c491b",
                  "#79601a",
                  "#547222",
                  "#27734b",
                  "#187577",
                  "#3e5bb0",
                  "#7946a0",
                  "#a33d78",
                  "#62686c"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[\\w-]{1,100}$"
          },
          "banner_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[\\w-]{1,100}$"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "ProfileChanged": {
        "type": "object",
        "properties": {
          "display_name": {
            "type": "string",
            "x-weighted-max-length": 20,
            "x-weighted-min-length": 1,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          },
          "about": {
            "type": "string",
            "x-weighted-max-length": 200,
            "x-weighted-min-length": 0,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent.",
            "x-max-lines": 6
          },
          "pronouns": {
            "type": "string",
            "x-weighted-max-length": 40,
            "x-weighted-min-length": 0,
            "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
          },
          "background_gradient": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "top": {
                    "type": "string",
                    "pattern": "^#[a-fA-F0-9]{6}$"
                  },
                  "bottom": {
                    "type": "string",
                    "pattern": "^#[a-fA-F0-9]{6}$"
                  }
                },
                "required": [
                  "top",
                  "bottom"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "nameplate_name_color": {
            "enum": [
              "red",
              "orange",
              "yellow",
              "lime",
              "green",
              "teal",
              "blue",
              "purple",
              "pink",
              "gray",
              null
            ]
          },
          "nameplate_background_color": {
            "enum": [
              "red",
              "orange",
              "yellow",
              "lime",
              "green",
              "teal",
              "blue",
              "purple",
              "pink",
              "gray",
              null
            ]
          },
          "online_indicator_color": {
            "enum": [
              "red",
              "orange",
              "yellow",
              "lime",
              "green",
              "teal",
              "blue",
              "purple",
              "pink",
              "gray",
              null
            ]
          },
          "announcement_pack": {
            "enum": [
              "",
              "cat",
              "dog",
              "cosmic",
              "pirate",
              "arcade",
              "haunted",
              "royal"
            ]
          },
          "profile_art": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "version": {
                    "const": 2
                  },
                  "strokes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9-]{36}$"
                        },
                        "anchor_seq": {
                          "const": 0
                        },
                        "canvas_width": {
                          "const": 428
                        },
                        "tool": {
                          "enum": [
                            "pen",
                            "pencil",
                            "highlighter"
                          ]
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[a-fA-F0-9]{6}([fF]{2})?$"
                        },
                        "size": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 24
                        },
                        "points": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1.2827102803738317
                              }
                            ],
                            "minItems": 2,
                            "maxItems": 2
                          },
                          "minItems": 1,
                          "maxItems": 1200
                        },
                        "draw_order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "erasures": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^[a-f0-9-]{36}$"
                              },
                              "size": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 24
                              },
                              "points": {
                                "type": "array",
                                "items": {
                                  "type": "array",
                                  "items": [
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1.2827102803738317
                                    }
                                  ],
                                  "minItems": 2,
                                  "maxItems": 2
                                },
                                "minItems": 1,
                                "maxItems": 1200
                              }
                            },
                            "required": [
                              "id",
                              "size",
                              "points"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 0,
                          "maxItems": 100
                        }
                      },
                      "required": [
                        "id",
                        "anchor_seq",
                        "canvas_width",
                        "tool",
                        "color",
                        "size",
                        "points",
                        "draw_order"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 0,
                    "maxItems": 1500
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9-]{36}$"
                        },
                        "kind": {
                          "enum": [
                            "emoji",
                            "sticker"
                          ]
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 36
                        },
                        "x": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 428
                        },
                        "y": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 549
                        },
                        "width": {
                          "type": "number",
                          "minimum": 16,
                          "maximum": 428
                        },
                        "height": {
                          "type": "number",
                          "minimum": 16,
                          "maximum": 549
                        },
                        "rotation": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "value",
                        "x",
                        "y",
                        "width",
                        "height",
                        "rotation",
                        "order"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 0,
                    "maxItems": 40
                  }
                },
                "required": [
                  "version",
                  "strokes",
                  "items"
                ],
                "additionalProperties": false,
                "x-canvas": {
                  "width": 428,
                  "height": 549
                },
                "x-encoded-max-length": 1500000,
                "x-total-points": 180000
              },
              {
                "type": "null"
              }
            ]
          },
          "nameplate_art": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "version": {
                    "const": 2
                  },
                  "strokes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9-]{36}$"
                        },
                        "anchor_seq": {
                          "const": 0
                        },
                        "canvas_width": {
                          "const": 280
                        },
                        "tool": {
                          "enum": [
                            "pen",
                            "pencil",
                            "highlighter"
                          ]
                        },
                        "color": {
                          "anyOf": [
                            {
                              "enum": [
                                "#ad333e",
                                "#9c491b",
                                "#79601a",
                                "#547222",
                                "#27734b",
                                "#187577",
                                "#3e5bb0",
                                "#7946a0",
                                "#a33d78",
                                "#62686c"
                              ]
                            },
                            {
                              "type": "string",
                              "pattern": "^#[a-fA-F0-9]{6}[fF]{2}$"
                            }
                          ]
                        },
                        "size": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 24
                        },
                        "points": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 0.22857142857142856
                              }
                            ],
                            "minItems": 2,
                            "maxItems": 2
                          },
                          "minItems": 1,
                          "maxItems": 1200
                        },
                        "draw_order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "erasures": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^[a-f0-9-]{36}$"
                              },
                              "size": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 24
                              },
                              "points": {
                                "type": "array",
                                "items": {
                                  "type": "array",
                                  "items": [
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 0.22857142857142856
                                    }
                                  ],
                                  "minItems": 2,
                                  "maxItems": 2
                                },
                                "minItems": 1,
                                "maxItems": 1200
                              }
                            },
                            "required": [
                              "id",
                              "size",
                              "points"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 0,
                          "maxItems": 100
                        }
                      },
                      "required": [
                        "id",
                        "anchor_seq",
                        "canvas_width",
                        "tool",
                        "color",
                        "size",
                        "points",
                        "draw_order"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 0,
                    "maxItems": 400
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9-]{36}$"
                        },
                        "kind": {
                          "enum": [
                            "emoji"
                          ]
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 36
                        },
                        "x": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 280
                        },
                        "y": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 64
                        },
                        "width": {
                          "type": "number",
                          "minimum": 16,
                          "maximum": 280
                        },
                        "height": {
                          "type": "number",
                          "minimum": 16,
                          "maximum": 64
                        },
                        "rotation": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "value",
                        "x",
                        "y",
                        "width",
                        "height",
                        "rotation",
                        "order"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 0,
                    "maxItems": 8
                  }
                },
                "required": [
                  "version",
                  "strokes",
                  "items"
                ],
                "additionalProperties": false,
                "x-canvas": {
                  "width": 280,
                  "height": 64
                },
                "x-encoded-max-length": 240000,
                "x-total-points": 24000,
                "x-stroke-colors": [
                  "#ad333e",
                  "#9c491b",
                  "#79601a",
                  "#547222",
                  "#27734b",
                  "#187577",
                  "#3e5bb0",
                  "#7946a0",
                  "#a33d78",
                  "#62686c"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[\\w-]{1,100}$"
          },
          "banner_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[\\w-]{1,100}$"
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": true
      },
      "Settings": {
        "type": "object",
        "properties": {
          "target_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "values": {
            "type": "object"
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          }
        },
        "required": [
          "target_id",
          "values",
          "revision"
        ],
        "additionalProperties": true
      },
      "SettingsPatch": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "patch": {
                "type": "object",
                "properties": {
                  "defaultDMNotifications": {
                    "type": "string",
                    "default": "all",
                    "enum": [
                      "all",
                      "mentions",
                      "none"
                    ]
                  },
                  "defaultGroupNotifications": {
                    "type": "string",
                    "default": "all",
                    "enum": [
                      "all",
                      "mentions",
                      "none"
                    ]
                  },
                  "shareOnline": {
                    "type": "boolean",
                    "default": true
                  },
                  "shareTyping": {
                    "type": "boolean",
                    "default": true
                  },
                  "allowFriendRequests": {
                    "type": "boolean",
                    "default": true
                  },
                  "allowGroupDMs": {
                    "type": "boolean",
                    "default": true
                  },
                  "quietEnabled": {
                    "type": "boolean",
                    "default": false
                  },
                  "quietStart": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 5,
                    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "quietEnd": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 5,
                    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "quietTimezone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "format": "iana-timezone"
                  },
                  "quietDays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 6
                    },
                    "minItems": 0,
                    "maxItems": 7,
                    "uniqueItems": true
                  },
                  "quietAllowCalls": {
                    "type": "boolean",
                    "default": false
                  },
                  "pausedUntil": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "x-max-future-seconds": 2592000
                  },
                  "theme": {
                    "enum": [
                      "light",
                      "dark",
                      "sand",
                      "rose",
                      "ocean",
                      "plum"
                    ]
                  },
                  "emojiSkinTone": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 5
                  },
                  "doubleClickEmoji": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32,
                    "description": "one emoji from the sometimes emoji catalogue."
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "required": [
              "patch"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "target_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              },
              "patch": {
                "type": "object",
                "properties": {
                  "timezone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "format": "iana-timezone"
                  },
                  "push": {
                    "type": "boolean",
                    "default": true
                  },
                  "inApp": {
                    "type": "boolean",
                    "default": true
                  },
                  "ringtone": {
                    "type": "boolean",
                    "default": true
                  },
                  "messages": {
                    "type": "boolean",
                    "default": true
                  },
                  "reactions": {
                    "type": "boolean",
                    "default": true
                  },
                  "friendRequests": {
                    "type": "boolean",
                    "default": true
                  },
                  "calls": {
                    "type": "boolean",
                    "default": true
                  },
                  "preview": {
                    "type": "string",
                    "default": "full",
                    "enum": [
                      "full",
                      "sender",
                      "hidden"
                    ]
                  },
                  "audioMode": {
                    "type": "string",
                    "default": "noise-cancelling",
                    "enum": [
                      "noise-cancelling",
                      "studio"
                    ]
                  },
                  "microphone": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 100,
                    "description": "an opaque device_choices ID returned by /me/settings/targets, or an empty string for system default."
                  },
                  "camera": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 100,
                    "description": "an opaque device_choices ID returned by /me/settings/targets, or an empty string for system default."
                  },
                  "output": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 100,
                    "description": "an opaque device_choices ID returned by /me/settings/targets, or an empty string for system default."
                  },
                  "joinMuted": {
                    "type": "boolean",
                    "default": false
                  },
                  "callSounds": {
                    "type": "boolean",
                    "default": true
                  },
                  "gameSounds": {
                    "type": "boolean",
                    "default": true
                  },
                  "soundVolume": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "followSystemTheme": {
                    "type": "boolean",
                    "default": false
                  },
                  "textSize": {
                    "type": "integer",
                    "minimum": 12,
                    "maximum": 22
                  },
                  "spacing": {
                    "type": "string",
                    "default": "comfortable",
                    "enum": [
                      "comfortable",
                      "compact"
                    ]
                  },
                  "motion": {
                    "type": "string",
                    "default": "system",
                    "enum": [
                      "system",
                      "reduce",
                      "full"
                    ]
                  },
                  "autoplay": {
                    "type": "boolean",
                    "default": true
                  },
                  "loadMedia": {
                    "type": "boolean",
                    "default": true
                  },
                  "subtleDrawings": {
                    "type": "boolean",
                    "default": false
                  },
                  "enterSends": {
                    "type": "string",
                    "default": "auto",
                    "enum": [
                      "auto",
                      "send",
                      "newline"
                    ]
                  },
                  "showMyCameraPreview": {
                    "type": "boolean",
                    "default": true
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "required": [
              "target_id",
              "patch"
            ],
            "additionalProperties": false
          }
        ]
      },
      "SettingsChanged": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "target_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "values": {
            "type": "object"
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": true
      },
      "SettingsTarget": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "label": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "device_choices": {
            "type": "object"
          }
        },
        "required": [
          "id",
          "device_choices"
        ],
        "additionalProperties": true
      },
      "Mute": {
        "type": "object",
        "properties": {
          "muted": {
            "type": "boolean"
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          }
        },
        "required": [
          "muted",
          "revision"
        ],
        "additionalProperties": true
      },
      "Group": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "name": {
            "type": "string"
          },
          "owner_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "created_by_bot": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "members_locked": {
            "type": "boolean"
          },
          "icon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "owner_id",
          "revision"
        ],
        "additionalProperties": true
      },
      "GroupMember": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "display_name": {
            "type": "string"
          },
          "owner": {
            "type": "boolean"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "Friend": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "display_name": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "user",
              "bot"
            ]
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "friendship_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          }
        },
        "required": [
          "id",
          "display_name",
          "kind",
          "avatar_url",
          "friendship_id"
        ],
        "additionalProperties": true
      },
      "FriendRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "sender": {
            "$ref": "#/components/schemas/BasicIdentity"
          },
          "recipient": {
            "$ref": "#/components/schemas/BasicIdentity"
          },
          "direction": {
            "enum": [
              "incoming",
              "outgoing"
            ]
          },
          "status": {
            "enum": [
              "pending",
              "accepted",
              "denied"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          }
        },
        "required": [
          "id",
          "sender",
          "recipient",
          "direction",
          "status",
          "created_at",
          "revision"
        ],
        "additionalProperties": true
      },
      "FriendResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "status": {
            "enum": [
              "accepted",
              "denied"
            ]
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          }
        },
        "required": [
          "request_id",
          "status"
        ],
        "additionalProperties": true
      },
      "Presence": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "online": {
            "type": "boolean"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "user_id",
          "online",
          "expires_at"
        ],
        "additionalProperties": true
      },
      "Notification": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "status": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "CommandInteraction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "installation_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "installer_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "chat_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "command_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "configuration_revision": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "options": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "number",
                "boolean"
              ]
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "ack_deadline": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "application_id",
          "installation_id",
          "installer_id",
          "chat_id",
          "command_id",
          "configuration_revision",
          "options",
          "created_at",
          "ack_deadline",
          "expires_at"
        ],
        "additionalProperties": true
      },
      "GatewayTicket": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "ticket": {
            "type": "string",
            "pattern": "^stgate_[a-f0-9]{64}$"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "url",
          "ticket",
          "expires_at"
        ],
        "additionalProperties": true
      },
      "Limits": {
        "type": "object",
        "properties": {
          "api_version": {
            "const": 1
          },
          "catalogue_version": {
            "const": 1
          },
          "limits": {
            "const": {
              "displays": {
                "bytes": 32768,
                "nodes": 128,
                "depth": 8,
                "actions": 32,
                "patches": 32,
                "updates_per_second": 5
              },
              "rest_application": {
                "capacity": 100,
                "refill": 50,
                "period_ms": 1000
              },
              "rest_installation": {
                "capacity": 20,
                "refill": 10,
                "period_ms": 1000
              },
              "messages": {
                "capacity": 5,
                "period_ms": 5000,
                "scope": "application,user,chat"
              },
              "notifications": {
                "hour": 5,
                "day": 20,
                "scope": "application,user"
              },
              "social_invitations": {
                "capacity": 10,
                "period_ms": 3600000,
                "scope": "application,user"
              },
              "call_starts_and_invitations": {
                "count": 5,
                "window_ms": 600000,
                "scope": "application,user,chat"
              },
              "drawing_previews": {
                "capacity": 10,
                "period_ms": 1000,
                "scope": "installation,chat"
              },
              "json_bytes": 262144,
              "profile_json_bytes": 1756384,
              "sdp_bytes": 65536,
              "page_size": {
                "default": 50,
                "maximum": 100
              },
              "gateway": {
                "frame_bytes": 65536,
                "frames_per_minute": 120,
                "unacknowledged_events": 256,
                "application_events": 100000,
                "installation_events": 10000,
                "retention_ms": 86400000,
                "ticket_ms": 60000,
                "identify_ms": 5000,
                "heartbeat_ms": 30000,
                "heartbeat_ack_ms": 10000,
                "connections_per_application": 1
              },
              "uploads": {
                "concurrent": 3,
                "daily_bytes": 524288000,
                "part_bytes": 10485760,
                "lifetime_ms": 900000
              },
              "stickers": {
                "user_count": 25,
                "application_count": 100,
                "application_bytes": 209715200
              },
              "calls": {
                "installation_sessions": 1,
                "application_sessions": 20,
                "subscriptions": 80,
                "subscriptions_per_request": 64,
                "publish_sources": 2,
                "heartbeat_ms": 20000,
                "lease_ms": 75000,
                "answer_ms": 15000
              },
              "applications_per_developer": 10,
              "private_invites": 1000,
              "installations": {
                "user": 100,
                "application": 10000
              },
              "commands": {
                "count": 100,
                "options": 25,
                "choices": 25,
                "ack_ms": 3000,
                "interaction_ms": 900000,
                "responses": 5
              },
              "idempotency_ms": 86400000,
              "activity_ms": 7776000000,
              "ephemeral": {
                "default_seconds": 3600,
                "minimum_seconds": 60,
                "maximum_seconds": 86400
              }
            }
          },
          "fields": {
            "const": {
              "application": {
                "name": {
                  "type": "string",
                  "x-weighted-max-length": 60,
                  "x-weighted-min-length": 1,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                },
                "description": {
                  "type": "string",
                  "x-weighted-max-length": 200,
                  "x-weighted-min-length": 0,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent.",
                  "x-max-lines": 6
                },
                "visibility": {
                  "enum": [
                    "public",
                    "private"
                  ]
                },
                "install_policy": {
                  "enum": [
                    "account",
                    "either",
                    "chat"
                  ]
                },
                "privacy_url": {
                  "type": "string",
                  "minLength": 0,
                  "maxLength": 500,
                  "format": "https-url"
                },
                "support_url": {
                  "type": "string",
                  "minLength": 0,
                  "maxLength": 500,
                  "format": "https-url"
                },
                "icon_asset_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^[\\w-]{1,100}$"
                },
                "banner_asset_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^[\\w-]{1,100}$"
                },
                "permission_mode": {
                  "enum": [
                    "disabled",
                    "optional",
                    "required"
                  ]
                }
              },
              "profile": {
                "display_name": {
                  "type": "string",
                  "x-weighted-max-length": 20,
                  "x-weighted-min-length": 1,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                },
                "about": {
                  "type": "string",
                  "x-weighted-max-length": 200,
                  "x-weighted-min-length": 0,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent.",
                  "x-max-lines": 6
                },
                "pronouns": {
                  "type": "string",
                  "x-weighted-max-length": 40,
                  "x-weighted-min-length": 0,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                },
                "background_gradient": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "top": {
                          "type": "string",
                          "pattern": "^#[a-fA-F0-9]{6}$"
                        },
                        "bottom": {
                          "type": "string",
                          "pattern": "^#[a-fA-F0-9]{6}$"
                        }
                      },
                      "required": [
                        "top",
                        "bottom"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "nameplate_name_color": {
                  "enum": [
                    "red",
                    "orange",
                    "yellow",
                    "lime",
                    "green",
                    "teal",
                    "blue",
                    "purple",
                    "pink",
                    "gray",
                    null
                  ]
                },
                "nameplate_background_color": {
                  "enum": [
                    "red",
                    "orange",
                    "yellow",
                    "lime",
                    "green",
                    "teal",
                    "blue",
                    "purple",
                    "pink",
                    "gray",
                    null
                  ]
                },
                "online_indicator_color": {
                  "enum": [
                    "red",
                    "orange",
                    "yellow",
                    "lime",
                    "green",
                    "teal",
                    "blue",
                    "purple",
                    "pink",
                    "gray",
                    null
                  ]
                },
                "announcement_pack": {
                  "enum": [
                    "",
                    "cat",
                    "dog",
                    "cosmic",
                    "pirate",
                    "arcade",
                    "haunted",
                    "royal"
                  ]
                },
                "profile_art": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "version": {
                          "const": 2
                        },
                        "strokes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^[a-f0-9-]{36}$"
                              },
                              "anchor_seq": {
                                "const": 0
                              },
                              "canvas_width": {
                                "const": 428
                              },
                              "tool": {
                                "enum": [
                                  "pen",
                                  "pencil",
                                  "highlighter"
                                ]
                              },
                              "color": {
                                "type": "string",
                                "pattern": "^#[a-fA-F0-9]{6}([fF]{2})?$"
                              },
                              "size": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 24
                              },
                              "points": {
                                "type": "array",
                                "items": {
                                  "type": "array",
                                  "items": [
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1.2827102803738317
                                    }
                                  ],
                                  "minItems": 2,
                                  "maxItems": 2
                                },
                                "minItems": 1,
                                "maxItems": 1200
                              },
                              "draw_order": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "erasures": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[a-f0-9-]{36}$"
                                    },
                                    "size": {
                                      "type": "number",
                                      "minimum": 1,
                                      "maximum": 24
                                    },
                                    "points": {
                                      "type": "array",
                                      "items": {
                                        "type": "array",
                                        "items": [
                                          {
                                            "type": "number",
                                            "minimum": 0,
                                            "maximum": 1
                                          },
                                          {
                                            "type": "number",
                                            "minimum": 0,
                                            "maximum": 1.2827102803738317
                                          }
                                        ],
                                        "minItems": 2,
                                        "maxItems": 2
                                      },
                                      "minItems": 1,
                                      "maxItems": 1200
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "size",
                                    "points"
                                  ],
                                  "additionalProperties": false
                                },
                                "minItems": 0,
                                "maxItems": 100
                              }
                            },
                            "required": [
                              "id",
                              "anchor_seq",
                              "canvas_width",
                              "tool",
                              "color",
                              "size",
                              "points",
                              "draw_order"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 0,
                          "maxItems": 1500
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^[a-f0-9-]{36}$"
                              },
                              "kind": {
                                "enum": [
                                  "emoji",
                                  "sticker"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 36
                              },
                              "x": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 428
                              },
                              "y": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 549
                              },
                              "width": {
                                "type": "number",
                                "minimum": 16,
                                "maximum": 428
                              },
                              "height": {
                                "type": "number",
                                "minimum": 16,
                                "maximum": 549
                              },
                              "rotation": {
                                "type": "number",
                                "minimum": -180,
                                "maximum": 180
                              },
                              "order": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "id",
                              "kind",
                              "value",
                              "x",
                              "y",
                              "width",
                              "height",
                              "rotation",
                              "order"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 0,
                          "maxItems": 40
                        }
                      },
                      "required": [
                        "version",
                        "strokes",
                        "items"
                      ],
                      "additionalProperties": false,
                      "x-canvas": {
                        "width": 428,
                        "height": 549
                      },
                      "x-encoded-max-length": 1500000,
                      "x-total-points": 180000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "nameplate_art": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "version": {
                          "const": 2
                        },
                        "strokes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^[a-f0-9-]{36}$"
                              },
                              "anchor_seq": {
                                "const": 0
                              },
                              "canvas_width": {
                                "const": 280
                              },
                              "tool": {
                                "enum": [
                                  "pen",
                                  "pencil",
                                  "highlighter"
                                ]
                              },
                              "color": {
                                "anyOf": [
                                  {
                                    "enum": [
                                      "#ad333e",
                                      "#9c491b",
                                      "#79601a",
                                      "#547222",
                                      "#27734b",
                                      "#187577",
                                      "#3e5bb0",
                                      "#7946a0",
                                      "#a33d78",
                                      "#62686c"
                                    ]
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^#[a-fA-F0-9]{6}[fF]{2}$"
                                  }
                                ]
                              },
                              "size": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 24
                              },
                              "points": {
                                "type": "array",
                                "items": {
                                  "type": "array",
                                  "items": [
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    },
                                    {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 0.22857142857142856
                                    }
                                  ],
                                  "minItems": 2,
                                  "maxItems": 2
                                },
                                "minItems": 1,
                                "maxItems": 1200
                              },
                              "draw_order": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "erasures": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^[a-f0-9-]{36}$"
                                    },
                                    "size": {
                                      "type": "number",
                                      "minimum": 1,
                                      "maximum": 24
                                    },
                                    "points": {
                                      "type": "array",
                                      "items": {
                                        "type": "array",
                                        "items": [
                                          {
                                            "type": "number",
                                            "minimum": 0,
                                            "maximum": 1
                                          },
                                          {
                                            "type": "number",
                                            "minimum": 0,
                                            "maximum": 0.22857142857142856
                                          }
                                        ],
                                        "minItems": 2,
                                        "maxItems": 2
                                      },
                                      "minItems": 1,
                                      "maxItems": 1200
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "size",
                                    "points"
                                  ],
                                  "additionalProperties": false
                                },
                                "minItems": 0,
                                "maxItems": 100
                              }
                            },
                            "required": [
                              "id",
                              "anchor_seq",
                              "canvas_width",
                              "tool",
                              "color",
                              "size",
                              "points",
                              "draw_order"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 0,
                          "maxItems": 400
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^[a-f0-9-]{36}$"
                              },
                              "kind": {
                                "enum": [
                                  "emoji"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 36
                              },
                              "x": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 280
                              },
                              "y": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 64
                              },
                              "width": {
                                "type": "number",
                                "minimum": 16,
                                "maximum": 280
                              },
                              "height": {
                                "type": "number",
                                "minimum": 16,
                                "maximum": 64
                              },
                              "rotation": {
                                "type": "number",
                                "minimum": -180,
                                "maximum": 180
                              },
                              "order": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "id",
                              "kind",
                              "value",
                              "x",
                              "y",
                              "width",
                              "height",
                              "rotation",
                              "order"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 0,
                          "maxItems": 8
                        }
                      },
                      "required": [
                        "version",
                        "strokes",
                        "items"
                      ],
                      "additionalProperties": false,
                      "x-canvas": {
                        "width": 280,
                        "height": 64
                      },
                      "x-encoded-max-length": 240000,
                      "x-total-points": 24000,
                      "x-stroke-colors": [
                        "#ad333e",
                        "#9c491b",
                        "#79601a",
                        "#547222",
                        "#27734b",
                        "#187577",
                        "#3e5bb0",
                        "#7946a0",
                        "#a33d78",
                        "#62686c"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "avatar_asset_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^[\\w-]{1,100}$"
                },
                "banner_asset_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^[\\w-]{1,100}$"
                }
              },
              "account_settings": {
                "defaultDMNotifications": {
                  "type": "string",
                  "default": "all",
                  "enum": [
                    "all",
                    "mentions",
                    "none"
                  ]
                },
                "defaultGroupNotifications": {
                  "type": "string",
                  "default": "all",
                  "enum": [
                    "all",
                    "mentions",
                    "none"
                  ]
                },
                "shareOnline": {
                  "type": "boolean",
                  "default": true
                },
                "shareTyping": {
                  "type": "boolean",
                  "default": true
                },
                "allowFriendRequests": {
                  "type": "boolean",
                  "default": true
                },
                "allowGroupDMs": {
                  "type": "boolean",
                  "default": true
                },
                "quietEnabled": {
                  "type": "boolean",
                  "default": false
                },
                "quietStart": {
                  "type": "string",
                  "minLength": 0,
                  "maxLength": 5,
                  "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                },
                "quietEnd": {
                  "type": "string",
                  "minLength": 0,
                  "maxLength": 5,
                  "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                },
                "quietTimezone": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80,
                  "format": "iana-timezone"
                },
                "quietDays": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 6
                  },
                  "minItems": 0,
                  "maxItems": 7,
                  "uniqueItems": true
                },
                "quietAllowCalls": {
                  "type": "boolean",
                  "default": false
                },
                "pausedUntil": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "x-max-future-seconds": 2592000
                },
                "theme": {
                  "enum": [
                    "light",
                    "dark",
                    "sand",
                    "rose",
                    "ocean",
                    "plum"
                  ]
                },
                "emojiSkinTone": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 5
                },
                "doubleClickEmoji": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 32,
                  "description": "one emoji from the sometimes emoji catalogue."
                }
              },
              "instance_settings": {
                "timezone": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80,
                  "format": "iana-timezone"
                },
                "push": {
                  "type": "boolean",
                  "default": true
                },
                "inApp": {
                  "type": "boolean",
                  "default": true
                },
                "ringtone": {
                  "type": "boolean",
                  "default": true
                },
                "messages": {
                  "type": "boolean",
                  "default": true
                },
                "reactions": {
                  "type": "boolean",
                  "default": true
                },
                "friendRequests": {
                  "type": "boolean",
                  "default": true
                },
                "calls": {
                  "type": "boolean",
                  "default": true
                },
                "preview": {
                  "type": "string",
                  "default": "full",
                  "enum": [
                    "full",
                    "sender",
                    "hidden"
                  ]
                },
                "audioMode": {
                  "type": "string",
                  "default": "noise-cancelling",
                  "enum": [
                    "noise-cancelling",
                    "studio"
                  ]
                },
                "microphone": {
                  "type": "string",
                  "minLength": 0,
                  "maxLength": 100,
                  "description": "an opaque device_choices ID returned by /me/settings/targets, or an empty string for system default."
                },
                "camera": {
                  "type": "string",
                  "minLength": 0,
                  "maxLength": 100,
                  "description": "an opaque device_choices ID returned by /me/settings/targets, or an empty string for system default."
                },
                "output": {
                  "type": "string",
                  "minLength": 0,
                  "maxLength": 100,
                  "description": "an opaque device_choices ID returned by /me/settings/targets, or an empty string for system default."
                },
                "joinMuted": {
                  "type": "boolean",
                  "default": false
                },
                "callSounds": {
                  "type": "boolean",
                  "default": true
                },
                "gameSounds": {
                  "type": "boolean",
                  "default": true
                },
                "soundVolume": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100
                },
                "followSystemTheme": {
                  "type": "boolean",
                  "default": false
                },
                "textSize": {
                  "type": "integer",
                  "minimum": 12,
                  "maximum": 22
                },
                "spacing": {
                  "type": "string",
                  "default": "comfortable",
                  "enum": [
                    "comfortable",
                    "compact"
                  ]
                },
                "motion": {
                  "type": "string",
                  "default": "system",
                  "enum": [
                    "system",
                    "reduce",
                    "full"
                  ]
                },
                "autoplay": {
                  "type": "boolean",
                  "default": true
                },
                "loadMedia": {
                  "type": "boolean",
                  "default": true
                },
                "subtleDrawings": {
                  "type": "boolean",
                  "default": false
                },
                "enterSends": {
                  "type": "string",
                  "default": "auto",
                  "enum": [
                    "auto",
                    "send",
                    "newline"
                  ]
                },
                "showMyCameraPreview": {
                  "type": "boolean",
                  "default": true
                }
              },
              "message": {
                "content": {
                  "type": "string",
                  "x-weighted-max-length": 4000,
                  "x-weighted-min-length": 1,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                },
                "actor": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "reply_to": {
                  "type": "string",
                  "pattern": "^[\\w-]{1,100}$"
                },
                "expires_in": {
                  "type": "integer",
                  "minimum": 60,
                  "maximum": 86400
                }
              },
              "scribble": {
                "anchor_sequence": {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                "canvas_width": {
                  "type": "integer",
                  "minimum": 200,
                  "maximum": 4000
                },
                "tool": {
                  "enum": [
                    "pen",
                    "pencil",
                    "highlighter"
                  ]
                },
                "color": {
                  "type": "string",
                  "pattern": "^#[a-fA-F0-9]{6}([fF]{2})?$"
                },
                "size": {
                  "type": "number",
                  "minimum": 1,
                  "maximum": 24
                },
                "points": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "items": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "number",
                        "minimum": -8,
                        "maximum": 8
                      }
                    ],
                    "minItems": 2,
                    "maxItems": 2
                  },
                  "minItems": 1,
                  "maxItems": 1200
                },
                "draw_order": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "erasure": {
                "removed_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[a-f0-9-]{36}$"
                  },
                  "minItems": 0,
                  "maxItems": 100
                },
                "cuts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "stroke_id": {
                        "type": "string",
                        "pattern": "^[a-f0-9-]{36}$"
                      },
                      "size": {
                        "type": "number",
                        "minimum": 1,
                        "maximum": 24
                      },
                      "points": {
                        "type": "array",
                        "items": {
                          "type": "array",
                          "items": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "number",
                              "minimum": -8,
                              "maximum": 8
                            }
                          ],
                          "minItems": 2,
                          "maxItems": 2
                        },
                        "minItems": 1,
                        "maxItems": 1200
                      }
                    },
                    "required": [
                      "stroke_id",
                      "size",
                      "points"
                    ],
                    "additionalProperties": false
                  },
                  "minItems": 0,
                  "maxItems": 100
                },
                "revisions": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string",
                    "pattern": "^\\d+$"
                  }
                },
                "x-total-operations": 100
              },
              "placement": {
                "anchor_sequence": {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                "canvas_width": {
                  "type": "number",
                  "minimum": 200,
                  "maximum": 4000
                },
                "x": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "y": {
                  "type": "number",
                  "minimum": -160,
                  "maximum": 160
                },
                "width": {
                  "type": "number",
                  "minimum": 0.004,
                  "maximum": 7.2
                },
                "height": {
                  "type": "number",
                  "minimum": 0.004,
                  "maximum": 7.2
                },
                "rotation": {
                  "type": "number"
                },
                "order": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 2147483647
                },
                "x-pixel-bounds": {
                  "width": [
                    16,
                    1440
                  ],
                  "height": [
                    16,
                    1440
                  ],
                  "y": [
                    -32000,
                    32000
                  ]
                }
              },
              "poll": {
                "title": {
                  "type": "string",
                  "x-weighted-max-length": 200,
                  "x-weighted-min-length": 1,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                },
                "options": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "x-weighted-max-length": 100,
                    "x-weighted-min-length": 1,
                    "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                  },
                  "minItems": 2,
                  "maxItems": 20
                },
                "multiple": {
                  "type": "boolean"
                },
                "public_votes": {
                  "type": "boolean"
                },
                "duration_seconds": {
                  "type": "integer",
                  "minimum": 60,
                  "maximum": 2592000
                }
              },
              "group": {
                "name": {
                  "type": "string",
                  "x-weighted-max-length": 48,
                  "x-weighted-min-length": 1,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                },
                "member_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[\\w-]{1,100}$"
                  },
                  "minItems": 1,
                  "maxItems": 19,
                  "uniqueItems": true
                },
                "icon_asset_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^[\\w-]{1,100}$"
                },
                "capacity": 20
              },
              "notification": {
                "title": {
                  "type": "string",
                  "x-weighted-max-length": 80,
                  "x-weighted-min-length": 1,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                },
                "body": {
                  "type": "string",
                  "x-weighted-max-length": 240,
                  "x-weighted-min-length": 1,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                },
                "chat_id": {
                  "type": "string",
                  "pattern": "^[\\w-]{1,100}$"
                },
                "message_id": {
                  "type": "string",
                  "pattern": "^[\\w-]{1,100}$"
                }
              },
              "upload": {
                "actor": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "purpose": {
                  "enum": [
                    "attachment",
                    "sticker",
                    "avatar",
                    "banner",
                    "group_icon"
                  ]
                },
                "chat_id": {
                  "type": "string",
                  "pattern": "^[\\w-]{1,100}$"
                },
                "filename": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 240,
                  "pattern": "^[^/\\\\\\u0000-\\u001f\\u007f]+$"
                },
                "size": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 157286400
                },
                "content_type": {
                  "enum": [
                    "image/png",
                    "image/jpeg",
                    "image/webp",
                    "image/gif",
                    "image/avif",
                    "image/bmp",
                    "video/mp4",
                    "video/webm",
                    "video/quicktime",
                    "application/octet-stream"
                  ]
                },
                "x-purpose-bytes": {
                  "attachment": 157286400,
                  "sticker": 20971520,
                  "avatar": 5242880,
                  "banner": 20971520,
                  "group_icon": 5242880
                },
                "x-image-types": [
                  "image/png",
                  "image/jpeg",
                  "image/webp"
                ],
                "x-sticker-extra-types": [
                  "image/gif"
                ],
                "x-image-pixels": 40000000
              },
              "sticker": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 40
                },
                "asset_id": {
                  "type": "string",
                  "pattern": "^[\\w-]{1,100}$"
                }
              },
              "command": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 32,
                  "pattern": "^[a-z0-9_-]+$"
                },
                "description": {
                  "type": "string",
                  "x-weighted-max-length": 100,
                  "x-weighted-min-length": 1,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                },
                "option_type": {
                  "enum": [
                    "string",
                    "integer",
                    "number",
                    "boolean",
                    "user",
                    "message",
                    "attachment"
                  ]
                },
                "string_value": {
                  "type": "string",
                  "x-weighted-max-length": 4000,
                  "x-weighted-min-length": 0,
                  "description": "length uses sometimes weighted textLength; UTF-16 maxLength is not equivalent."
                },
                "integer_value": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "call": {
                "video": {
                  "type": "boolean"
                },
                "user_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[\\w-]{1,100}$"
                  },
                  "minItems": 1,
                  "maxItems": 10,
                  "uniqueItems": true
                },
                "source": {
                  "enum": [
                    "microphone",
                    "camera",
                    "screen",
                    "screen_audio"
                  ]
                },
                "publish_source": {
                  "enum": [
                    "microphone",
                    "camera"
                  ]
                },
                "mid": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[\\w-]+$"
                }
              }
            }
          },
          "quotas": {
            "type": "object"
          }
        },
        "required": [
          "api_version",
          "catalogue_version",
          "limits",
          "fields",
          "quotas"
        ],
        "additionalProperties": true
      },
      "ConsentPrompt": {
        "type": "object",
        "properties": {
          "application": {
            "$ref": "#/components/schemas/Application"
          },
          "configuration": {
            "$ref": "#/components/schemas/Configuration"
          },
          "prompt_token": {
            "type": "string"
          },
          "revision": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "eligible_chats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Chat"
            }
          },
          "chats_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "application",
          "configuration",
          "prompt_token",
          "revision",
          "expires_at",
          "eligible_chats"
        ],
        "additionalProperties": true
      },
      "Token": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "prefix": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "prefix",
          "label",
          "created_at"
        ],
        "additionalProperties": true
      },
      "Activity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[\\w-]+$"
          },
          "action": {
            "type": "string"
          },
          "actor": {
            "enum": [
              "bot",
              "user"
            ]
          },
          "resource_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[\\w-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "result": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "action",
          "actor",
          "created_at"
        ],
        "additionalProperties": true
      }
    }
  },
  "title": "sometimes bots gateway v1",
  "definitions": {
    "ClientFrame": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "identify"
            },
            "ticket": {
              "type": "string",
              "pattern": "^stgate_[a-f0-9]{64}$"
            },
            "subscriptions": {
              "type": "array",
              "items": {
                "enum": [
                  "*",
                  "installation.created",
                  "installation.updated",
                  "installation.revoked",
                  "application.updated",
                  "application.disabled",
                  "chat.access_changed",
                  "message.created",
                  "message.updated",
                  "message.deleted",
                  "scribble.created",
                  "scribble.updated",
                  "scribble.erased",
                  "scribble.preview",
                  "placement.created",
                  "placement.updated",
                  "placement.removed",
                  "reaction.updated",
                  "pin.updated",
                  "poll.updated",
                  "poll.closed",
                  "presence.updated",
                  "typing.started",
                  "typing.stopped",
                  "group.updated",
                  "members.updated",
                  "friends.updated",
                  "friend_request.updated",
                  "profile.updated",
                  "settings.updated",
                  "stickers.updated",
                  "call.created",
                  "call.updated",
                  "call.ended",
                  "call.track.added",
                  "call.track.removed",
                  "call.invitation.updated",
                  "interaction.created",
                  "game.started",
                  "game.ended"
                ]
              },
              "maxItems": 40
            },
            "resume_cursor": {
              "type": "string"
            }
          },
          "required": [
            "op",
            "ticket",
            "subscriptions"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "ack"
            },
            "cursor": {
              "type": "string"
            }
          },
          "required": [
            "op",
            "cursor"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "heartbeat_ack"
            },
            "nonce": {
              "type": "string"
            }
          },
          "required": [
            "op",
            "nonce"
          ],
          "additionalProperties": false
        }
      ]
    },
    "ServerFrame": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "ready"
            },
            "api_version": {
              "const": 1
            },
            "session_id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[\\w-]+$"
            },
            "cursor": {
              "type": "string"
            },
            "heartbeat_interval_ms": {
              "const": 30000
            }
          },
          "required": [
            "op",
            "api_version",
            "session_id",
            "cursor",
            "heartbeat_interval_ms"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "heartbeat"
            },
            "nonce": {
              "type": "string"
            }
          },
          "required": [
            "op",
            "nonce"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "resumed"
            },
            "cursor": {
              "type": "string"
            }
          },
          "required": [
            "op",
            "cursor"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "resync_required"
            },
            "reason": {
              "type": "string"
            },
            "scope": {
              "const": "application"
            },
            "cursor": {
              "type": "string"
            }
          },
          "required": [
            "op",
            "reason",
            "scope",
            "cursor"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "installation.created"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Installation"
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "installation.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Installation"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        "grant_revision": {
                          "type": "string",
                          "pattern": "^\\d+$"
                        },
                        "refresh": {
                          "const": true
                        },
                        "reason": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "grant_revision",
                        "refresh",
                        "reason"
                      ],
                      "additionalProperties": true
                    }
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "installation.revoked"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "grant_revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    }
                  },
                  "required": [
                    "id",
                    "reason",
                    "grant_revision"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "application.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "published_revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "status": {
                      "enum": [
                        "enabled",
                        "disabled"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "published_revision",
                    "status"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "application.disabled"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "published_revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "status": {
                      "enum": [
                        "enabled",
                        "disabled"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "published_revision",
                    "status"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "chat.access_changed"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "accessible": {
                      "type": "boolean"
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    }
                  },
                  "required": [
                    "chat_id"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "message.created"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  },
                  "required": [
                    "chat_id",
                    "message"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "message.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  },
                  "required": [
                    "chat_id",
                    "message"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "message.deleted"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "message_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    }
                  },
                  "required": [
                    "chat_id",
                    "message_id",
                    "revision"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "scribble.created"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "stroke": {
                      "$ref": "#/components/schemas/Scribble"
                    }
                  },
                  "required": [
                    "chat_id",
                    "stroke"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "scribble.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "chat_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        "stroke": {
                          "$ref": "#/components/schemas/Scribble"
                        }
                      },
                      "required": [
                        "chat_id",
                        "stroke"
                      ],
                      "additionalProperties": true
                    },
                    {
                      "type": "object",
                      "properties": {
                        "chat_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        "revision": {
                          "type": "string",
                          "pattern": "^\\d+$"
                        }
                      },
                      "required": [
                        "chat_id",
                        "id"
                      ],
                      "additionalProperties": true
                    }
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "scribble.erased"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128,
                        "pattern": "^[\\w-]+$"
                      }
                    },
                    "cuts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    }
                  },
                  "required": [
                    "chat_id",
                    "revision"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "scribble.preview"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "actor": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": true
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "stroke": {
                      "type": "object"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "chat_id",
                    "actor",
                    "id",
                    "stroke",
                    "expires_at"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "placement.created"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "placement": {
                      "$ref": "#/components/schemas/Placement"
                    }
                  },
                  "required": [
                    "chat_id",
                    "placement"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "placement.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "placement": {
                      "$ref": "#/components/schemas/Placement"
                    }
                  },
                  "required": [
                    "chat_id",
                    "placement"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "placement.removed"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    }
                  },
                  "required": [
                    "revision"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "reaction.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "message_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "people": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128,
                                  "pattern": "^[\\w-]+$"
                                },
                                "display_name": {
                                  "type": "string"
                                },
                                "kind": {
                                  "enum": [
                                    "bot",
                                    "user"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "display_name",
                                "kind"
                              ],
                              "additionalProperties": true
                            }
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "people"
                        ],
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "chat_id",
                    "message_id",
                    "reactions"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "pin.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "message_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "pins": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Pin"
                      }
                    }
                  },
                  "required": [
                    "chat_id",
                    "message_id",
                    "pins"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "poll.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "poll": {
                      "$ref": "#/components/schemas/Poll"
                    }
                  },
                  "required": [
                    "chat_id",
                    "poll"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "poll.closed"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "poll": {
                      "$ref": "#/components/schemas/Poll"
                    }
                  },
                  "required": [
                    "chat_id",
                    "poll"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "presence.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Presence"
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "typing.started"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "user_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "chat_id",
                    "user_id",
                    "expires_at"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "typing.stopped"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "user_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "chat_id",
                    "user_id",
                    "expires_at"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "group.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "group": {
                      "$ref": "#/components/schemas/Group"
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    }
                  },
                  "required": [
                    "chat_id",
                    "group",
                    "revision"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "members.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GroupMember"
                      }
                    }
                  },
                  "required": [
                    "chat_id",
                    "members"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "friends.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "refresh": {
                      "const": true
                    }
                  },
                  "required": [
                    "revision",
                    "refresh"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "friend_request.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "request": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/FriendRequest"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    }
                  },
                  "required": [
                    "request_id",
                    "request",
                    "revision"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "profile.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "user_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "profile": {
                      "$ref": "#/components/schemas/Profile"
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    }
                  },
                  "required": [
                    "user_id",
                    "profile",
                    "revision"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "settings.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "target": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "values": {
                      "type": "object"
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    }
                  },
                  "required": [
                    "target",
                    "values",
                    "revision"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "stickers.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "sticker_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "operation": {
                      "enum": [
                        "added",
                        "removed"
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    }
                  },
                  "required": [
                    "sticker_id",
                    "operation",
                    "revision"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "call.created"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "call": {
                      "$ref": "#/components/schemas/Call"
                    }
                  },
                  "required": [
                    "chat_id",
                    "call"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "call.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "call": {
                      "$ref": "#/components/schemas/Call"
                    }
                  },
                  "required": [
                    "chat_id",
                    "call"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "call.ended"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "call": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        "chat_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        "status": {
                          "const": "ended"
                        },
                        "ended_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "chat_id",
                        "status",
                        "ended_at"
                      ],
                      "additionalProperties": true
                    }
                  },
                  "required": [
                    "chat_id",
                    "call"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "call.track.added"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "session_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "track": {
                      "$ref": "#/components/schemas/Track"
                    }
                  },
                  "required": [
                    "session_id",
                    "track"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "call.track.removed"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "session_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "track_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    }
                  },
                  "required": [
                    "session_id",
                    "track_id"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "call.invitation.updated"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "invitation_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "status": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "invitation_id",
                    "status",
                    "expires_at"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "interaction.created"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Interaction"
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "game.started"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "game_session_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "status": {
                      "enum": [
                        "active",
                        "ended"
                      ]
                    }
                  },
                  "required": [
                    "chat_id",
                    "game_session_id",
                    "status"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "op": {
              "const": "event"
            },
            "id": {
              "type": "string"
            },
            "cursor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": {
              "const": "game.ended"
            },
            "installation_id": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[\\w-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "grant_revision": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "occurred_at": {
              "type": "string",
              "format": "date-time"
            },
            "resource_revision": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "origin": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "bot",
                    "user"
                  ]
                },
                "application_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "application_id"
              ],
              "additionalProperties": true
            },
            "transient": {
              "type": "boolean"
            },
            "data": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "chat_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "game_session_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[\\w-]+$"
                    },
                    "status": {
                      "enum": [
                        "active",
                        "ended"
                      ]
                    }
                  },
                  "required": [
                    "chat_id",
                    "game_session_id",
                    "status"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "resource_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[\\w-]+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revision": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "fetch_required": {
                      "const": true
                    }
                  },
                  "required": [
                    "resource_id",
                    "revision",
                    "fetch_required"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          },
          "required": [
            "op",
            "id",
            "cursor",
            "type",
            "installation_id",
            "grant_revision",
            "occurred_at",
            "resource_revision",
            "origin",
            "data"
          ],
          "additionalProperties": true
        }
      ]
    }
  },
  "x-close-codes": {
    "1011": "temporary service failure",
    "4001": "identify required",
    "4002": "malformed frame or ACK",
    "4003": "authentication or authorization ended",
    "4008": "heartbeat timeout",
    "4009": "another consumer connected",
    "4010": "fresh snapshots required"
  },
  "x-limits": {
    "frame_bytes": 65536,
    "frames_per_minute": 120,
    "unacknowledged_events": 256,
    "application_events": 100000,
    "installation_events": 10000,
    "retention_ms": 86400000,
    "ticket_ms": 60000,
    "identify_ms": 5000,
    "heartbeat_ms": 30000,
    "heartbeat_ack_ms": 10000,
    "connections_per_application": 1
  }
}
