{
  "$defs": {
    "ActivitySetData": {
      "additionalProperties": false,
      "description": "ActivitySetData makes a connection active or passive.",
      "properties": {
        "active": {
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "active"
      ],
      "type": "object"
    },
    "AuthPhoneData": {
      "additionalProperties": false,
      "description": "AuthPhoneData signs in, or creates the account, with the code sent by SMS.",
      "properties": {
        "client": {
          "$ref": "#/$defs/ClientData"
        },
        "code": {
          "type": "string"
        },
        "verification_id": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "verification_id"
      ],
      "type": "object"
    },
    "AuthQRData": {
      "additionalProperties": false,
      "description": "AuthQRData asks for a QR code a signed-in phone can let this client in with.",
      "properties": {
        "client": {
          "$ref": "#/$defs/ClientData"
        }
      },
      "type": "object"
    },
    "AuthResponseData": {
      "additionalProperties": false,
      "description": "AuthResponseData for auth response with tokens",
      "properties": {
        "access_token": {
          "type": "string"
        },
        "created": {
          "type": "boolean"
        },
        "expires_in": {
          "type": "integer"
        },
        "refresh_token": {
          "type": "string"
        },
        "session": {
          "$ref": "#/$defs/SessionData"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "access_token",
        "created",
        "expires_in",
        "refresh_token",
        "session",
        "user_id"
      ],
      "type": "object"
    },
    "BanChangeData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "expires_at": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "conversation_id",
        "operation_id",
        "user_id"
      ],
      "type": "object"
    },
    "BanData": {
      "additionalProperties": false,
      "properties": {
        "avatar_hash": {
          "type": "string"
        },
        "banned_by": {
          "type": "integer"
        },
        "conversation_id": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "expires_at": {
          "type": "string"
        },
        "nick": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "removed": {
          "type": "boolean"
        },
        "role": {
          "enum": [
            "owner",
            "admin",
            "editor",
            "member"
          ],
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "banned_by",
        "conversation_id",
        "created_at",
        "role",
        "user_id"
      ],
      "type": "object"
    },
    "BanListResponseData": {
      "additionalProperties": false,
      "properties": {
        "bans": {
          "items": {
            "$ref": "#/$defs/BanData"
          },
          "type": "array"
        }
      },
      "required": [
        "bans"
      ],
      "type": "object"
    },
    "BanResponseData": {
      "additionalProperties": false,
      "properties": {
        "ban": {
          "$ref": "#/$defs/BanData"
        },
        "conversation": {
          "$ref": "#/$defs/ConversationData"
        }
      },
      "required": [
        "ban",
        "conversation"
      ],
      "type": "object"
    },
    "BlockChangeData": {
      "additionalProperties": false,
      "properties": {
        "operation_id": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "operation_id",
        "user_id"
      ],
      "type": "object"
    },
    "BlockData": {
      "additionalProperties": false,
      "properties": {
        "avatar_hash": {
          "type": "string"
        },
        "blocked_at": {
          "type": "string"
        },
        "nick": {
          "type": "string"
        },
        "removed": {
          "type": "boolean"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "blocked_at",
        "nick",
        "user_id"
      ],
      "type": "object"
    },
    "BlockListResponseData": {
      "additionalProperties": false,
      "properties": {
        "blocks": {
          "items": {
            "$ref": "#/$defs/BlockData"
          },
          "type": "array"
        }
      },
      "required": [
        "blocks"
      ],
      "type": "object"
    },
    "BlockResponseData": {
      "additionalProperties": false,
      "properties": {
        "block": {
          "$ref": "#/$defs/BlockData"
        }
      },
      "required": [
        "block"
      ],
      "type": "object"
    },
    "BotCommandData": {
      "additionalProperties": false,
      "description": "BotCommandData is a command a bot takes, written after \"/\", and what it does.",
      "properties": {
        "command": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      },
      "required": [
        "command",
        "description"
      ],
      "type": "object"
    },
    "BotCommandsData": {
      "additionalProperties": false,
      "description": "BotCommandsData are the commands a bot takes in direct conversations and in groups.",
      "properties": {
        "direct": {
          "items": {
            "$ref": "#/$defs/BotCommandData"
          },
          "type": "array"
        },
        "groups": {
          "items": {
            "$ref": "#/$defs/BotCommandData"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "ButtonAnswerData": {
      "additionalProperties": false,
      "description": "ButtonAnswerData is a bot's answer to a press of its button.",
      "properties": {
        "alert": {
          "type": "boolean"
        },
        "press_id": {
          "type": "string"
        },
        "text": {
          "type": "string"
        }
      },
      "required": [
        "press_id"
      ],
      "type": "object"
    },
    "ButtonData": {
      "additionalProperties": false,
      "description": "ButtonData is a button under a bot's message: what it shows, and either the data a press of it tells the bot or the address it opens.",
      "properties": {
        "data": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "text"
      ],
      "type": "object"
    },
    "ButtonPressData": {
      "additionalProperties": false,
      "description": "ButtonPressData presses a button with data under a bot's message.",
      "properties": {
        "data": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        }
      },
      "required": [
        "data",
        "msg_id"
      ],
      "type": "object"
    },
    "ButtonPressResponseData": {
      "additionalProperties": false,
      "description": "ButtonPressResponseData answers a press with what the bot has the presser shown: a text, as an alert to dismiss or briefly; nothing when it did not answer in time.",
      "properties": {
        "alert": {
          "type": "boolean"
        },
        "text": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "ButtonPressedEventData": {
      "additionalProperties": false,
      "description": "ButtonPressedEventData tells a bot of a press of its button: who pressed it, under which message, as the bot sees it, and the button's data.",
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "data": {
          "type": "string"
        },
        "from": {
          "type": "integer"
        },
        "message": {
          "$ref": "#/$defs/MessageData"
        },
        "press_id": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "data",
        "from",
        "press_id"
      ],
      "type": "object"
    },
    "ByeData": {
      "additionalProperties": false,
      "description": "ByeData for server-initiated disconnect",
      "properties": {
        "message": {
          "type": "string"
        },
        "reason": {
          "enum": [
            "timeout",
            "maintenance",
            "restart"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "ClientData": {
      "additionalProperties": false,
      "description": "ClientData is untrusted metadata used only to label a persistent login.",
      "properties": {
        "device_name": {
          "type": "string"
        },
        "language": {
          "description": "Language is the BCP 47 tag of what the client's user reads, for what the server writes to their account.",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "platform": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "CodeRequestData": {
      "additionalProperties": false,
      "description": "CodeRequestData asks for a code sent to a phone number by SMS: auth.code to sign in with it, phone.code to bind the number to the account.",
      "properties": {
        "app_hash": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "sms": {
          "description": "SMS asks for the code by SMS even where it could go to the account's devices.",
          "type": "boolean"
        }
      },
      "required": [
        "phone"
      ],
      "type": "object"
    },
    "CodeResponseData": {
      "additionalProperties": false,
      "description": "CodeResponseData describes a code that has just been sent.",
      "properties": {
        "code_length": {
          "type": "integer"
        },
        "devices": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "expires_in": {
          "type": "integer"
        },
        "resend_in": {
          "type": "integer"
        },
        "sent_to": {
          "description": "SentTo is where the code went: to the account's devices, as a message from Mandarin, or by SMS. Devices names those devices.",
          "type": "string"
        },
        "verification_id": {
          "type": "string"
        }
      },
      "required": [
        "code_length",
        "expires_in",
        "resend_in",
        "sent_to",
        "verification_id"
      ],
      "type": "object"
    },
    "ContactAddData": {
      "additionalProperties": false,
      "description": "ContactAddData takes somebody into the caller's contact list.",
      "properties": {
        "nick": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        },
        "request": {
          "description": "Request answers the person's contact request: it takes them in only while they still wait, and is refused as contact_not_found once the request was answered, or dropped, elsewhere.",
          "type": "boolean"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "operation_id",
        "user_id"
      ],
      "type": "object"
    },
    "ContactData": {
      "additionalProperties": false,
      "description": "ContactData is an entry of a contact list as its owner sees it: a contact, or somebody waiting to become one.",
      "properties": {
        "avatar_hash": {
          "type": "string"
        },
        "nick": {
          "description": "Nick is the entry's name: the owner's for the person, or a snapshot of the name the person went by when nobody named them.",
          "type": "string"
        },
        "phone": {
          "description": "Phone is the number in the owner's address book that found the person, on the change an address book made.",
          "type": "string"
        },
        "removed": {
          "description": "Removed marks an entry that is gone from the list.",
          "type": "boolean"
        },
        "requested_at": {
          "description": "RequestedAt is when a request was made, for a request.",
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "user_id"
      ],
      "type": "object"
    },
    "ContactDeleteData": {
      "additionalProperties": false,
      "description": "ContactDeleteData takes somebody out of the caller's contact list, or turns their request away.",
      "properties": {
        "operation_id": {
          "type": "string"
        },
        "request": {
          "description": "Request turns the person's contact request away, only while they still wait; see ContactAddData.Request.",
          "type": "boolean"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "operation_id",
        "user_id"
      ],
      "type": "object"
    },
    "ContactListResponseData": {
      "additionalProperties": false,
      "description": "ContactListResponseData is the caller's contact list: their contacts, and apart from them the people waiting to be taken in, newest first.",
      "properties": {
        "contacts": {
          "items": {
            "$ref": "#/$defs/ContactData"
          },
          "type": "array"
        },
        "requests": {
          "items": {
            "$ref": "#/$defs/ContactData"
          },
          "type": "array"
        }
      },
      "required": [
        "contacts"
      ],
      "type": "object"
    },
    "ContactRenameData": {
      "additionalProperties": false,
      "description": "ContactRenameData renames an entry of the caller's contact list.",
      "properties": {
        "nick": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "nick",
        "operation_id",
        "user_id"
      ],
      "type": "object"
    },
    "ContactResponseData": {
      "additionalProperties": false,
      "description": "ContactResponseData answers a change to a contact list and carries the event that tells the owner's devices of it: the entry as it now stands and, for somebody taken in, their presence as the owner may see it.",
      "properties": {
        "contact": {
          "$ref": "#/$defs/ContactData"
        },
        "presence": {
          "$ref": "#/$defs/UserStatus"
        }
      },
      "required": [
        "contact"
      ],
      "type": "object"
    },
    "ConversationActionData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "operation_id"
      ],
      "type": "object"
    },
    "ConversationCreateData": {
      "additionalProperties": false,
      "properties": {
        "description": {
          "type": "string"
        },
        "kind": {
          "enum": [
            "group",
            "channel"
          ],
          "type": "string"
        },
        "member_ids": {
          "items": {
            "type": "integer"
          },
          "type": "array"
        },
        "operation_id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "kind",
        "operation_id",
        "title"
      ],
      "type": "object"
    },
    "ConversationData": {
      "additionalProperties": false,
      "description": "ConversationData is a conversation as its user sees it, in groups of fields by the stream that changes them. A snapshot a client loads has every group; one inside an event has only the groups that event's stream changes, and a client replaces each group it carries whole.",
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "kind": {
          "enum": [
            "direct",
            "group",
            "channel"
          ],
          "type": "string"
        },
        "membership": {
          "$ref": "#/$defs/ConversationMembershipData"
        },
        "personal": {
          "$ref": "#/$defs/ConversationPersonalData"
        },
        "read": {
          "$ref": "#/$defs/ConversationReadData"
        },
        "seq": {
          "description": "Seq is where the conversation's stream stood when the snapshot was made.",
          "type": "string"
        },
        "shared": {
          "$ref": "#/$defs/ConversationSharedData"
        }
      },
      "required": [
        "conversation_id",
        "kind"
      ],
      "type": "object"
    },
    "ConversationDeletedEventData": {
      "additionalProperties": false,
      "description": "ConversationDeletedEventData tells a user that a conversation is no longer theirs, and why: deleted, left, removed or banned.",
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "reason": {
          "enum": [
            "deleted",
            "left",
            "removed",
            "banned"
          ],
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "reason"
      ],
      "type": "object"
    },
    "ConversationGetData": {
      "additionalProperties": false,
      "description": "ConversationGetData names a conversation by its ID, or a direct one by the other participant: the conversation with them as it stands, or as it will once somebody writes in it.",
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "ConversationIDData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id"
      ],
      "type": "object"
    },
    "ConversationListResponseData": {
      "additionalProperties": false,
      "properties": {
        "conversations": {
          "items": {
            "$ref": "#/$defs/ConversationData"
          },
          "type": "array"
        }
      },
      "required": [
        "conversations"
      ],
      "type": "object"
    },
    "ConversationMembershipData": {
      "additionalProperties": false,
      "description": "ConversationMembershipData is the viewer's standing in a conversation.",
      "properties": {
        "capabilities": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "next_send_at": {
          "type": "string"
        },
        "posting_restriction": {
          "oneOf": [
            {
              "$ref": "#/$defs/RestrictionData"
            },
            {
              "type": "null"
            }
          ]
        },
        "role": {
          "enum": [
            "owner",
            "admin",
            "editor",
            "member"
          ],
          "type": "string"
        }
      },
      "required": [
        "capabilities",
        "next_send_at",
        "posting_restriction",
        "role"
      ],
      "type": "object"
    },
    "ConversationMutationData": {
      "additionalProperties": false,
      "description": "ConversationMutationData is the common envelope used by membership and invitation events. Only fields relevant to the event are present.",
      "properties": {
        "ban": {
          "$ref": "#/$defs/BanData"
        },
        "by": {
          "description": "By is, in conversation.created, who made the conversation the user's where somebody else did: added them, or made it with them in it — in a channel, whose members only its owner and admins see, only its creator.",
          "type": "integer"
        },
        "conversation": {
          "$ref": "#/$defs/ConversationData"
        },
        "delivery": {
          "$ref": "#/$defs/DeliveryData"
        },
        "draft": {
          "$ref": "#/$defs/DraftData"
        },
        "invite": {
          "$ref": "#/$defs/InviteData"
        },
        "member": {
          "$ref": "#/$defs/MemberData"
        },
        "members": {
          "items": {
            "$ref": "#/$defs/MemberData"
          },
          "type": "array"
        },
        "notification": {
          "$ref": "#/$defs/NotificationData"
        },
        "pin": {
          "$ref": "#/$defs/PinData"
        },
        "read": {
          "$ref": "#/$defs/ReadData"
        },
        "restriction": {
          "$ref": "#/$defs/RestrictionData"
        }
      },
      "type": "object"
    },
    "ConversationPersonalData": {
      "additionalProperties": false,
      "description": "ConversationPersonalData is the viewer's own settings for a conversation, and the reactions to their messages waiting for them to see.",
      "properties": {
        "draft": {
          "oneOf": [
            {
              "$ref": "#/$defs/DraftData"
            },
            {
              "type": "null"
            }
          ]
        },
        "notification": {
          "$ref": "#/$defs/NotificationData"
        },
        "waiting_reaction_count": {
          "type": "integer"
        },
        "waiting_reactions": {
          "description": "WaitingReactions are the newest of the waiting reactions, listed by message; WaitingReactionCount is how many messages have any. Both are left out while nothing waits.",
          "items": {
            "$ref": "#/$defs/WaitingReactionData"
          },
          "type": "array"
        }
      },
      "required": [
        "draft",
        "notification"
      ],
      "type": "object"
    },
    "ConversationReadData": {
      "additionalProperties": false,
      "description": "ConversationReadData is how far the viewer has read, what is left unread, and in a direct conversation how far the peer has read and how far each of them has the messages on a device.",
      "properties": {
        "delivered_through": {
          "type": "string"
        },
        "peer_delivered_through": {
          "type": "string"
        },
        "peer_read_through": {
          "type": "string"
        },
        "read_at": {
          "type": "string"
        },
        "read_through": {
          "type": "string"
        },
        "unread_count": {
          "type": "integer"
        },
        "unread_mention_count": {
          "type": "integer"
        }
      },
      "required": [
        "read_at",
        "read_through",
        "unread_count",
        "unread_mention_count"
      ],
      "type": "object"
    },
    "ConversationResponseData": {
      "additionalProperties": false,
      "properties": {
        "conversation": {
          "$ref": "#/$defs/ConversationData"
        },
        "refused": {
          "description": "Refused are the people asked for whom the conversation was made without.",
          "items": {
            "$ref": "#/$defs/MemberRefusalData"
          },
          "type": "array"
        }
      },
      "required": [
        "conversation"
      ],
      "type": "object"
    },
    "ConversationSearchData": {
      "additionalProperties": false,
      "properties": {
        "cursor": {
          "type": "string"
        },
        "kind": {
          "enum": [
            "direct",
            "group",
            "channel"
          ],
          "type": "string"
        },
        "limit": {
          "type": "integer"
        },
        "query": {
          "type": "string"
        }
      },
      "required": [
        "query"
      ],
      "type": "object"
    },
    "ConversationSearchResponseData": {
      "additionalProperties": false,
      "properties": {
        "conversations": {
          "items": {
            "$ref": "#/$defs/ConversationData"
          },
          "type": "array"
        },
        "next_cursor": {
          "type": "string"
        }
      },
      "required": [
        "conversations"
      ],
      "type": "object"
    },
    "ConversationSharedData": {
      "additionalProperties": false,
      "description": "ConversationSharedData is what every member of a conversation sees alike; in a direct conversation, the peer as the viewer knows them.",
      "properties": {
        "avatar_hash": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "integer"
        },
        "description": {
          "type": "string"
        },
        "member_count": {
          "type": "integer"
        },
        "peer_bot": {
          "description": "PeerBot marks a direct conversation with a bot, and PeerOfficial one with an account of the server's own.",
          "type": "boolean"
        },
        "peer_id": {
          "type": "integer"
        },
        "peer_official": {
          "type": "boolean"
        },
        "primary_invite": {
          "description": "PrimaryInvite is the token of the conversation's public link, empty without one.",
          "type": "string"
        },
        "slow_mode_seconds": {
          "type": "integer"
        },
        "title": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "required": [
        "avatar_hash",
        "created_at",
        "created_by",
        "description",
        "member_count",
        "primary_invite",
        "slow_mode_seconds",
        "title",
        "updated_at"
      ],
      "type": "object"
    },
    "ConversationUpdateData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        },
        "slow_mode_seconds": {
          "type": "integer"
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "operation_id"
      ],
      "type": "object"
    },
    "CustomStatus": {
      "additionalProperties": false,
      "description": "CustomStatus is an emoji with an optional caption that a user shows next to their name, online or not. Until, when given, is when it clears itself.",
      "properties": {
        "emoji": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "until": {
          "type": "string"
        }
      },
      "required": [
        "emoji"
      ],
      "type": "object"
    },
    "DeliveryData": {
      "additionalProperties": false,
      "description": "DeliveryData is how far a participant's devices have a direct conversation's messages.",
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "delivered_at": {
          "type": "string"
        },
        "through": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "conversation_id",
        "delivered_at",
        "through",
        "user_id"
      ],
      "type": "object"
    },
    "DeliveryMutationData": {
      "additionalProperties": false,
      "description": "DeliveryMutationData answers delivery.set.",
      "properties": {
        "conversation": {
          "$ref": "#/$defs/ConversationData"
        },
        "delivery": {
          "$ref": "#/$defs/DeliveryData"
        }
      },
      "required": [
        "conversation",
        "delivery"
      ],
      "type": "object"
    },
    "DeliverySetData": {
      "additionalProperties": false,
      "description": "DeliverySetData reports that the caller's devices have every message of a direct conversation through one; the message names the conversation.",
      "properties": {
        "operation_id": {
          "type": "string"
        },
        "through": {
          "type": "string"
        }
      },
      "required": [
        "operation_id",
        "through"
      ],
      "type": "object"
    },
    "DraftData": {
      "additionalProperties": false,
      "properties": {
        "cleared": {
          "type": "boolean"
        },
        "conversation_id": {
          "type": "string"
        },
        "mentions": {
          "items": {
            "$ref": "#/$defs/MentionData"
          },
          "type": "array"
        },
        "reply_to": {
          "type": "string"
        },
        "smileys": {
          "items": {
            "$ref": "#/$defs/SmileyData"
          },
          "type": "array"
        },
        "text": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "conversation_id",
        "text",
        "updated_at",
        "user_id"
      ],
      "type": "object"
    },
    "DraftResponseData": {
      "additionalProperties": false,
      "properties": {
        "conversation": {
          "$ref": "#/$defs/ConversationData"
        },
        "draft": {
          "$ref": "#/$defs/DraftData"
        }
      },
      "required": [
        "conversation",
        "draft"
      ],
      "type": "object"
    },
    "DraftUpdateData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "mentions": {
          "items": {
            "$ref": "#/$defs/MentionData"
          },
          "type": "array"
        },
        "operation_id": {
          "type": "string"
        },
        "reply_to": {
          "type": "string"
        },
        "smileys": {
          "items": {
            "$ref": "#/$defs/SmileyData"
          },
          "type": "array"
        },
        "text": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "conversation_id",
        "operation_id",
        "text"
      ],
      "type": "object"
    },
    "Envelope": {
      "additionalProperties": false,
      "description": "The frame every message travels in: a request, its answer, or an event.",
      "properties": {
        "conversation_id": {
          "description": "The conversation whose stream seq belongs to; absent for the account stream.",
          "type": "string"
        },
        "data": {
          "description": "The body x-clema-messages names for the type.",
          "type": "object"
        },
        "error": {
          "$ref": "#/$defs/Error"
        },
        "id": {
          "description": "Request ID; an answer echoes it, an event has none.",
          "type": "string"
        },
        "ok": {
          "description": "Present in answers alone: whether the request succeeded.",
          "type": "boolean"
        },
        "seq": {
          "description": "The place in its stream of an event of one, or of the event an answer's change made: a decimal string.",
          "type": "string"
        },
        "type": {
          "description": "The message type, such as message.send or message.created.",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "Error": {
      "additionalProperties": false,
      "description": "Why a request failed.",
      "properties": {
        "code": {
          "enum": [
            "conflict",
            "contact_exists",
            "contact_not_found",
            "delivery_failed",
            "internal_error",
            "invalid_code",
            "invalid_format",
            "invalid_state",
            "invalid_token",
            "no_common_types",
            "not_authenticated",
            "not_authorized",
            "not_found",
            "not_supported",
            "rate_limited",
            "session_not_found",
            "transfer_expired",
            "transfer_not_found",
            "user_not_found",
            "verification_expired"
          ],
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "retry_after": {
          "description": "Seconds to wait, given with rate_limited when known.",
          "type": "integer"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "FileAbortData": {
      "additionalProperties": false,
      "properties": {
        "file_id": {
          "type": "string"
        }
      },
      "required": [
        "file_id"
      ],
      "type": "object"
    },
    "FileCompleteData": {
      "additionalProperties": false,
      "properties": {
        "file_id": {
          "type": "string"
        }
      },
      "required": [
        "file_id"
      ],
      "type": "object"
    },
    "FileCompleteResponseData": {
      "additionalProperties": false,
      "properties": {
        "file": {
          "$ref": "#/$defs/FilePayload"
        }
      },
      "required": [
        "file"
      ],
      "type": "object"
    },
    "FileCreateData": {
      "additionalProperties": false,
      "properties": {
        "content_type": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        },
        "size": {
          "type": "integer"
        }
      },
      "required": [
        "name",
        "operation_id",
        "size"
      ],
      "type": "object"
    },
    "FileGetData": {
      "additionalProperties": false,
      "properties": {
        "file_id": {
          "type": "string"
        }
      },
      "required": [
        "file_id"
      ],
      "type": "object"
    },
    "FileMediaData": {
      "additionalProperties": false,
      "properties": {
        "duration_ms": {
          "type": "integer"
        },
        "height": {
          "type": "integer"
        },
        "kind": {
          "enum": [
            "image",
            "video",
            "audio"
          ],
          "type": "string"
        },
        "preview": {
          "$ref": "#/$defs/FileMediaPreviewData"
        },
        "state": {
          "enum": [
            "pending",
            "processing",
            "ready",
            "failed"
          ],
          "type": "string"
        },
        "width": {
          "type": "integer"
        }
      },
      "required": [
        "kind",
        "state"
      ],
      "type": "object"
    },
    "FileMediaPreviewData": {
      "additionalProperties": false,
      "properties": {
        "content_type": {
          "type": "string"
        },
        "height": {
          "type": "integer"
        },
        "size": {
          "type": "integer"
        },
        "variant": {
          "enum": [
            "preview"
          ],
          "type": "string"
        },
        "width": {
          "type": "integer"
        }
      },
      "required": [
        "content_type",
        "height",
        "size",
        "variant",
        "width"
      ],
      "type": "object"
    },
    "FileMessageData": {
      "additionalProperties": false,
      "description": "FileMessageData attaches a completed upload of the sender's to a message. Voice makes it a voice message: a recording of the sender's, which clients show as one rather than as a file.",
      "properties": {
        "file_id": {
          "type": "string"
        },
        "voice": {
          "$ref": "#/$defs/VoiceData"
        }
      },
      "required": [
        "file_id"
      ],
      "type": "object"
    },
    "FilePartData": {
      "additionalProperties": false,
      "properties": {
        "etag": {
          "type": "string"
        },
        "part": {
          "type": "integer"
        },
        "size": {
          "type": "integer"
        }
      },
      "required": [
        "etag",
        "part"
      ],
      "type": "object"
    },
    "FilePayload": {
      "additionalProperties": false,
      "description": "FilePayload for file message content",
      "properties": {
        "available": {
          "type": "boolean"
        },
        "content_type": {
          "type": "string"
        },
        "file_id": {
          "type": "string"
        },
        "hash": {
          "type": "string"
        },
        "media": {
          "$ref": "#/$defs/FileMediaData"
        },
        "name": {
          "type": "string"
        },
        "size": {
          "type": "integer"
        },
        "voice": {
          "$ref": "#/$defs/VoiceData",
          "description": "Voice is there when the file is a voice message's recording."
        }
      },
      "required": [
        "available",
        "name",
        "size"
      ],
      "type": "object"
    },
    "FileUpdatedEventData": {
      "additionalProperties": false,
      "properties": {
        "file": {
          "$ref": "#/$defs/FilePayload"
        }
      },
      "required": [
        "file"
      ],
      "type": "object"
    },
    "FileUploadData": {
      "additionalProperties": false,
      "properties": {
        "content_type": {
          "type": "string"
        },
        "expires_in": {
          "type": "integer"
        },
        "file_id": {
          "type": "string"
        },
        "media": {
          "$ref": "#/$defs/FileMediaData"
        },
        "name": {
          "type": "string"
        },
        "part_size": {
          "type": "integer"
        },
        "parts": {
          "items": {
            "$ref": "#/$defs/FilePartData"
          },
          "type": "array"
        },
        "size": {
          "type": "integer"
        },
        "status": {
          "enum": [
            "pending",
            "ready",
            "attached"
          ],
          "type": "string"
        }
      },
      "required": [
        "file_id",
        "name",
        "part_size",
        "parts",
        "size",
        "status"
      ],
      "type": "object"
    },
    "HelloData": {
      "additionalProperties": false,
      "description": "HelloData for hello request/response",
      "properties": {
        "active": {
          "description": "Active is false for a connection nobody is looking at, such as a background sync; absent means true. Only clients send it.",
          "type": "boolean"
        },
        "link_base": {
          "description": "LinkBase is where the service's links start, such as https://mandarin.im, when it has links of its own. Only the server sends it.",
          "type": "string"
        },
        "types": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "types"
      ],
      "type": "object"
    },
    "HistRequestData": {
      "additionalProperties": false,
      "description": "HistRequestData for history request",
      "properties": {
        "after": {
          "description": "msg_id - load messages newer than this, \"0\" from the start",
          "type": "string"
        },
        "around": {
          "description": "msg_id - load context around this message",
          "type": "string"
        },
        "before": {
          "description": "msg_id - load messages older than this",
          "type": "string"
        },
        "conversation_id": {
          "type": "string"
        },
        "limit": {
          "type": "integer"
        }
      },
      "required": [
        "conversation_id"
      ],
      "type": "object"
    },
    "HistResponseData": {
      "additionalProperties": false,
      "description": "HistResponseData for history response",
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "has_more": {
          "description": "true if there are more older messages",
          "type": "boolean"
        },
        "messages": {
          "items": {
            "$ref": "#/$defs/MessageData"
          },
          "type": "array"
        }
      },
      "required": [
        "conversation_id",
        "has_more",
        "messages"
      ],
      "type": "object"
    },
    "InstalledPacksData": {
      "additionalProperties": false,
      "description": "InstalledPacksData is the packs the account installed, in the order its panel shows them.",
      "properties": {
        "installed": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "installed"
      ],
      "type": "object"
    },
    "InviteActionData": {
      "additionalProperties": false,
      "properties": {
        "operation_id": {
          "type": "string"
        },
        "token": {
          "type": "string"
        }
      },
      "required": [
        "operation_id",
        "token"
      ],
      "type": "object"
    },
    "InviteConversationData": {
      "additionalProperties": false,
      "description": "InviteConversationData is a conversation as an invitation shows it to somebody who is not in it.",
      "properties": {
        "avatar_hash": {
          "type": "string"
        },
        "conversation_id": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "kind": {
          "enum": [
            "group",
            "channel"
          ],
          "type": "string"
        },
        "member_count": {
          "type": "integer"
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "kind",
        "member_count",
        "title"
      ],
      "type": "object"
    },
    "InviteCreateData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "expires_in": {
          "type": "integer"
        },
        "max_uses": {
          "type": "integer"
        },
        "name": {
          "description": "Name is a shareable invitation's own name, its token instead of a random code.",
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        },
        "permanent": {
          "type": "boolean"
        },
        "primary": {
          "description": "Primary makes the new link the conversation's primary one.",
          "type": "boolean"
        },
        "role": {
          "enum": [
            "editor",
            "member"
          ],
          "type": "string"
        },
        "target_user_id": {
          "type": "integer"
        }
      },
      "required": [
        "conversation_id",
        "operation_id"
      ],
      "type": "object"
    },
    "InviteData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "integer"
        },
        "expires_at": {
          "description": "absent: never expires",
          "type": "string"
        },
        "link": {
          "description": "Link is the address the invitation travels as, when the service has links of its own.",
          "type": "string"
        },
        "max_uses": {
          "description": "absent: no limit",
          "type": "integer"
        },
        "primary": {
          "description": "Primary marks the conversation's primary link.",
          "type": "boolean"
        },
        "revoked_at": {
          "type": "string"
        },
        "role": {
          "enum": [
            "editor",
            "member"
          ],
          "type": "string"
        },
        "target_user_id": {
          "type": "integer"
        },
        "token": {
          "type": "string"
        },
        "uses": {
          "type": "integer"
        }
      },
      "required": [
        "conversation_id",
        "created_at",
        "created_by",
        "role",
        "token",
        "uses"
      ],
      "type": "object"
    },
    "InviteListResponseData": {
      "additionalProperties": false,
      "properties": {
        "invites": {
          "items": {
            "$ref": "#/$defs/InviteData"
          },
          "type": "array"
        }
      },
      "required": [
        "invites"
      ],
      "type": "object"
    },
    "InvitePreviewResponseData": {
      "additionalProperties": false,
      "description": "InvitePreviewResponseData answers invite.get.",
      "properties": {
        "conversation": {
          "$ref": "#/$defs/InviteConversationData"
        },
        "member": {
          "type": "boolean"
        },
        "role": {
          "enum": [
            "editor",
            "member"
          ],
          "type": "string"
        }
      },
      "required": [
        "conversation",
        "member",
        "role"
      ],
      "type": "object"
    },
    "InviteResponseData": {
      "additionalProperties": false,
      "properties": {
        "invite": {
          "$ref": "#/$defs/InviteData"
        }
      },
      "required": [
        "invite"
      ],
      "type": "object"
    },
    "InviteTokenData": {
      "additionalProperties": false,
      "description": "InviteTokenData names an invitation by its token.",
      "properties": {
        "token": {
          "type": "string"
        }
      },
      "required": [
        "token"
      ],
      "type": "object"
    },
    "InviteUpdateData": {
      "additionalProperties": false,
      "description": "InviteUpdateData makes a link the conversation's primary one, or stops it being that.",
      "properties": {
        "operation_id": {
          "type": "string"
        },
        "primary": {
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "token": {
          "type": "string"
        }
      },
      "required": [
        "operation_id",
        "primary",
        "token"
      ],
      "type": "object"
    },
    "MemberChangeData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        },
        "role": {
          "enum": [
            "owner",
            "admin",
            "editor",
            "member"
          ],
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        },
        "user_ids": {
          "description": "UserIDs adds several people at once, in place of UserID.",
          "items": {
            "type": "integer"
          },
          "type": "array"
        }
      },
      "required": [
        "conversation_id",
        "operation_id"
      ],
      "type": "object"
    },
    "MemberData": {
      "additionalProperties": false,
      "properties": {
        "avatar_hash": {
          "type": "string"
        },
        "bot": {
          "description": "Bot marks a member a program runs, and BotReads what it hears there, as it was when it joined: \"all\" said there, or what is \"addressed\" to it.",
          "type": "boolean"
        },
        "bot_reads": {
          "type": "string"
        },
        "conversation_id": {
          "type": "string"
        },
        "joined_at": {
          "type": "string"
        },
        "nick": {
          "type": "string"
        },
        "posting_restriction": {
          "$ref": "#/$defs/RestrictionData"
        },
        "role": {
          "enum": [
            "owner",
            "admin",
            "editor",
            "member"
          ],
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "conversation_id",
        "joined_at",
        "role",
        "user_id"
      ],
      "type": "object"
    },
    "MemberListResponseData": {
      "additionalProperties": false,
      "properties": {
        "members": {
          "items": {
            "$ref": "#/$defs/MemberData"
          },
          "type": "array"
        }
      },
      "required": [
        "members"
      ],
      "type": "object"
    },
    "MemberRefusalData": {
      "additionalProperties": false,
      "description": "MemberRefusalData is somebody who could not be brought into a conversation, and why: not_found, privacy, banned or member.",
      "properties": {
        "reason": {
          "enum": [
            "not_found",
            "privacy",
            "blocked",
            "banned",
            "member"
          ],
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "reason",
        "user_id"
      ],
      "type": "object"
    },
    "MemberResponseData": {
      "additionalProperties": false,
      "description": "MemberResponseData answers a change of membership: the member it was about, or, adding several people at once, those added and those who could not be, with why. An ownership transfer names both members it changed.",
      "properties": {
        "conversation": {
          "$ref": "#/$defs/ConversationData",
          "description": "Conversation is the conversation as it now stands for the caller, while they are still in it."
        },
        "member": {
          "$ref": "#/$defs/MemberData"
        },
        "members": {
          "items": {
            "$ref": "#/$defs/MemberData"
          },
          "type": "array"
        },
        "refused": {
          "items": {
            "$ref": "#/$defs/MemberRefusalData"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "MentionData": {
      "additionalProperties": false,
      "description": "MentionData identifies the displayed range of an individual mention. Offsets are Unicode code points so the contract is encoding-independent.",
      "properties": {
        "length": {
          "type": "integer"
        },
        "offset": {
          "type": "integer"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "length",
        "offset",
        "user_id"
      ],
      "type": "object"
    },
    "MessageClearData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "operation_id"
      ],
      "type": "object"
    },
    "MessageClearedEventData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "through": {
          "description": "Through is the last message the clear hid.",
          "type": "string"
        }
      },
      "required": [
        "conversation_id"
      ],
      "type": "object"
    },
    "MessageData": {
      "additionalProperties": false,
      "description": "MessageData is the single message representation used by mutations, events, history and synchronization.",
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "deleted_at": {
          "type": "string"
        },
        "edited_at": {
          "type": "string"
        },
        "forwarded_from": {
          "$ref": "#/$defs/MessageReferenceData"
        },
        "from": {
          "type": "integer"
        },
        "keyboard": {
          "description": "Keyboard is a bot's buttons under its message.",
          "items": {
            "items": {
              "$ref": "#/$defs/ButtonData"
            },
            "type": "array"
          },
          "type": "array"
        },
        "kind": {
          "enum": [
            "text",
            "file",
            "transfer"
          ],
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "payload": {
          "description": "A message's content, by its kind: text, file or transfer.",
          "oneOf": [
            {
              "$ref": "#/$defs/TextPayload"
            },
            {
              "$ref": "#/$defs/FilePayload"
            },
            {
              "$ref": "#/$defs/TransferPayload"
            }
          ]
        },
        "played": {
          "description": "Played is a voice message's as its viewer sees it: whether they played it, or, when it is their own, whether anybody did.",
          "type": "boolean"
        },
        "reactions": {
          "items": {
            "$ref": "#/$defs/MessageReactionData"
          },
          "type": "array"
        },
        "reply_to": {
          "$ref": "#/$defs/MessageReferenceData"
        },
        "revision": {
          "type": "integer"
        },
        "sign_in_code": {
          "description": "SignInCode marks a message of the server's that tells a code to sign in with: it reaches only clients of this protocol.",
          "type": "boolean"
        },
        "time": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "from",
        "kind",
        "msg_id",
        "reactions",
        "revision",
        "time"
      ],
      "type": "object"
    },
    "MessageDeleteData": {
      "additionalProperties": false,
      "properties": {
        "msg_id": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        },
        "scope": {
          "enum": [
            "self",
            "all"
          ],
          "type": "string"
        }
      },
      "required": [
        "msg_id",
        "operation_id",
        "scope"
      ],
      "type": "object"
    },
    "MessageDeletedEventData": {
      "additionalProperties": false,
      "properties": {
        "actor_id": {
          "type": "integer"
        },
        "conversation_id": {
          "type": "string"
        },
        "message": {
          "$ref": "#/$defs/MessageData"
        },
        "msg_id": {
          "type": "string"
        },
        "scope": {
          "enum": [
            "self",
            "all"
          ],
          "type": "string"
        }
      },
      "required": [
        "conversation_id"
      ],
      "type": "object"
    },
    "MessageEditData": {
      "additionalProperties": false,
      "properties": {
        "keyboard": {
          "description": "Keyboard is the buttons a bot's message is to have: none, left out.",
          "items": {
            "items": {
              "$ref": "#/$defs/ButtonData"
            },
            "type": "array"
          },
          "type": "array"
        },
        "mentions": {
          "items": {
            "$ref": "#/$defs/MentionData"
          },
          "type": "array"
        },
        "msg_id": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        },
        "revision": {
          "type": "integer"
        },
        "smileys": {
          "items": {
            "$ref": "#/$defs/SmileyData"
          },
          "type": "array"
        },
        "text": {
          "type": "string"
        }
      },
      "required": [
        "msg_id",
        "operation_id",
        "revision",
        "text"
      ],
      "type": "object"
    },
    "MessageForwardData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "msg_id",
        "operation_id"
      ],
      "type": "object"
    },
    "MessageIdentityData": {
      "additionalProperties": false,
      "description": "MessageIdentityData names a message in an event about it that its recipient can no longer see: hidden, or cleared from their view.",
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        }
      },
      "required": [
        "msg_id"
      ],
      "type": "object"
    },
    "MessageMutationResponseData": {
      "additionalProperties": false,
      "properties": {
        "message": {
          "$ref": "#/$defs/MessageData"
        }
      },
      "required": [
        "message"
      ],
      "type": "object"
    },
    "MessagePlayData": {
      "additionalProperties": false,
      "description": "MessagePlayData says the caller played somebody else's voice message.",
      "properties": {
        "msg_id": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        }
      },
      "required": [
        "msg_id",
        "operation_id"
      ],
      "type": "object"
    },
    "MessagePlayedEventData": {
      "additionalProperties": false,
      "description": "MessagePlayedEventData tells a user's devices that a voice message became played as they see it: they played it, or somebody played theirs.",
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "msg_id"
      ],
      "type": "object"
    },
    "MessageReactData": {
      "additionalProperties": false,
      "properties": {
        "active": {
          "type": "boolean"
        },
        "msg_id": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        },
        "reaction": {
          "type": "string"
        }
      },
      "required": [
        "active",
        "msg_id",
        "operation_id",
        "reaction"
      ],
      "type": "object"
    },
    "MessageReactionData": {
      "additionalProperties": false,
      "properties": {
        "reaction": {
          "type": "string"
        },
        "user_ids": {
          "items": {
            "type": "integer"
          },
          "type": "array"
        }
      },
      "required": [
        "reaction",
        "user_ids"
      ],
      "type": "object"
    },
    "MessageReferenceData": {
      "additionalProperties": false,
      "properties": {
        "deleted": {
          "type": "boolean"
        },
        "from": {
          "type": "integer"
        },
        "kind": {
          "enum": [
            "text",
            "file",
            "transfer"
          ],
          "type": "string"
        },
        "msg_id": {
          "type": "string"
        },
        "payload": {
          "description": "A message's content, by its kind: text, file or transfer.",
          "oneOf": [
            {
              "$ref": "#/$defs/TextPayload"
            },
            {
              "$ref": "#/$defs/FilePayload"
            },
            {
              "$ref": "#/$defs/TransferPayload"
            }
          ]
        }
      },
      "required": [
        "from",
        "kind",
        "msg_id"
      ],
      "type": "object"
    },
    "MessageSearchData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "cursor": {
          "type": "string"
        },
        "kind": {
          "enum": [
            "text",
            "file",
            "transfer"
          ],
          "type": "string"
        },
        "limit": {
          "type": "integer"
        },
        "mentioned_me": {
          "type": "boolean"
        },
        "query": {
          "type": "string"
        },
        "sender_id": {
          "type": "integer"
        },
        "shared": {
          "description": "Shared lists a conversation's media, files or links, with or without a query.",
          "enum": [
            "media",
            "files",
            "voice",
            "links"
          ],
          "type": "string"
        }
      },
      "required": [
        "query"
      ],
      "type": "object"
    },
    "MessageSearchHitData": {
      "additionalProperties": false,
      "properties": {
        "conversation": {
          "$ref": "#/$defs/ConversationData"
        },
        "message": {
          "$ref": "#/$defs/MessageData"
        }
      },
      "required": [
        "conversation",
        "message"
      ],
      "type": "object"
    },
    "MessageSearchResponseData": {
      "additionalProperties": false,
      "properties": {
        "hits": {
          "items": {
            "$ref": "#/$defs/MessageSearchHitData"
          },
          "type": "array"
        },
        "next_cursor": {
          "type": "string"
        }
      },
      "required": [
        "hits"
      ],
      "type": "object"
    },
    "MsgSendData": {
      "additionalProperties": false,
      "description": "MsgSendData sends a message to a conversation of any kind.",
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "keyboard": {
          "description": "Keyboard is a bot's buttons under a text message.",
          "items": {
            "items": {
              "$ref": "#/$defs/ButtonData"
            },
            "type": "array"
          },
          "type": "array"
        },
        "kind": {
          "enum": [
            "text",
            "file",
            "transfer"
          ],
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        },
        "payload": {
          "description": "What a message is sent with, by its kind: its text, or a file uploaded first.",
          "oneOf": [
            {
              "$ref": "#/$defs/TextPayload"
            },
            {
              "$ref": "#/$defs/FileMessageData"
            }
          ]
        },
        "reply_to": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "kind",
        "operation_id",
        "payload"
      ],
      "type": "object"
    },
    "NotificationData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "level": {
          "enum": [
            "all",
            "mentions",
            "none"
          ],
          "type": "string"
        },
        "mute_until": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "level"
      ],
      "type": "object"
    },
    "NotificationResponseData": {
      "additionalProperties": false,
      "properties": {
        "conversation": {
          "$ref": "#/$defs/ConversationData"
        },
        "notification": {
          "$ref": "#/$defs/NotificationData"
        }
      },
      "required": [
        "conversation",
        "notification"
      ],
      "type": "object"
    },
    "NotificationSetData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "level": {
          "enum": [
            "all",
            "mentions",
            "none"
          ],
          "type": "string"
        },
        "mute_until": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "level",
        "operation_id"
      ],
      "type": "object"
    },
    "PackChangeData": {
      "additionalProperties": false,
      "properties": {
        "operation_id": {
          "type": "string"
        },
        "pack_id": {
          "type": "string"
        }
      },
      "required": [
        "operation_id",
        "pack_id"
      ],
      "type": "object"
    },
    "PackData": {
      "additionalProperties": false,
      "description": "PackData is a pack with its smileys in order.",
      "properties": {
        "kind": {
          "type": "string"
        },
        "pack_id": {
          "type": "string"
        },
        "smileys": {
          "items": {
            "$ref": "#/$defs/PackSmileyData"
          },
          "type": "array"
        },
        "title": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        "version": {
          "type": "integer"
        }
      },
      "required": [
        "kind",
        "pack_id",
        "smileys",
        "title",
        "version"
      ],
      "type": "object"
    },
    "PackGetData": {
      "additionalProperties": false,
      "properties": {
        "pack_id": {
          "type": "string"
        }
      },
      "required": [
        "pack_id"
      ],
      "type": "object"
    },
    "PackListResponseData": {
      "additionalProperties": false,
      "description": "PackListResponseData is the catalog and the packs the account installed, in the order its panel shows them.",
      "properties": {
        "installed": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "packs": {
          "items": {
            "$ref": "#/$defs/PackSummaryData"
          },
          "type": "array"
        }
      },
      "required": [
        "installed",
        "packs"
      ],
      "type": "object"
    },
    "PackOrderData": {
      "additionalProperties": false,
      "description": "PackOrderData puts the installed packs in a new order: every one of them, each once.",
      "properties": {
        "operation_id": {
          "type": "string"
        },
        "pack_ids": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "operation_id",
        "pack_ids"
      ],
      "type": "object"
    },
    "PackResponseData": {
      "additionalProperties": false,
      "properties": {
        "pack": {
          "$ref": "#/$defs/PackData"
        }
      },
      "required": [
        "pack"
      ],
      "type": "object"
    },
    "PackSmileyData": {
      "additionalProperties": false,
      "description": "PackSmileyData is a smiley of a pack. Its pictures are at /smileys/{pack_id}/{smiley_id}/{format} and never change.",
      "properties": {
        "codes": {
          "description": "Codes are the other texts ICQ clients type it as.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "fallback": {
          "description": "Fallback is the text a message carries for the smiley.",
          "type": "string"
        },
        "formats": {
          "items": {
            "$ref": "#/$defs/SmileyFormatData"
          },
          "type": "array"
        },
        "smiley_id": {
          "type": "string"
        }
      },
      "required": [
        "fallback",
        "formats",
        "smiley_id"
      ],
      "type": "object"
    },
    "PackSummaryData": {
      "additionalProperties": false,
      "description": "PackSummaryData is a pack of the catalog as pack.list names it.",
      "properties": {
        "kind": {
          "description": "Kind is \"smileys\", marked in messages by ranges, or \"emoji\", the pictures every Unicode emoji is drawn with.",
          "type": "string"
        },
        "pack_id": {
          "type": "string"
        },
        "title": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Title is the pack's name by language; \"en\" is always there.",
          "type": "object"
        },
        "version": {
          "description": "Version grows whenever the pack's title, smileys or their order change.",
          "type": "integer"
        }
      },
      "required": [
        "kind",
        "pack_id",
        "title",
        "version"
      ],
      "type": "object"
    },
    "PhoneData": {
      "additionalProperties": false,
      "description": "PhoneData is the number an account signs in with. It is private to the account's owner.",
      "properties": {
        "number": {
          "type": "string"
        },
        "verified_at": {
          "type": "string"
        }
      },
      "required": [
        "number",
        "verified_at"
      ],
      "type": "object"
    },
    "PhoneResponseData": {
      "additionalProperties": false,
      "description": "PhoneResponseData answers phone.get and phone.set and carries phone.updated. Phone is nil for an account made before sign-in by phone that has no number.",
      "properties": {
        "phone": {
          "oneOf": [
            {
              "$ref": "#/$defs/PhoneData"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "phone"
      ],
      "type": "object"
    },
    "PhoneSetData": {
      "additionalProperties": false,
      "description": "PhoneSetData binds to the account the number a phone.code code was sent to.",
      "properties": {
        "code": {
          "type": "string"
        },
        "verification_id": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "verification_id"
      ],
      "type": "object"
    },
    "PhonebookEntryData": {
      "additionalProperties": false,
      "description": "PhonebookEntryData is one entry of a device's address book.",
      "properties": {
        "name": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "phone"
      ],
      "type": "object"
    },
    "PhonebookMatchData": {
      "additionalProperties": false,
      "description": "PhonebookMatchData is an added entry whose number belongs to an account the caller may find.",
      "properties": {
        "added": {
          "type": "boolean"
        },
        "phone": {
          "type": "string"
        },
        "user": {
          "$ref": "#/$defs/SearchUserData"
        }
      },
      "required": [
        "added",
        "phone",
        "user"
      ],
      "type": "object"
    },
    "PhonebookStateData": {
      "additionalProperties": false,
      "description": "PhonebookStateData says what the server holds of the caller's book: the digest the client compares with its own, and the number of entries.",
      "properties": {
        "count": {
          "type": "integer"
        },
        "hash": {
          "type": "string"
        }
      },
      "required": [
        "count",
        "hash"
      ],
      "type": "object"
    },
    "PhonebookUpdateData": {
      "additionalProperties": false,
      "description": "PhonebookUpdateData changes the caller's address book: reset empties it first, add puts entries in or renames them, remove takes numbers out.",
      "properties": {
        "add": {
          "items": {
            "$ref": "#/$defs/PhonebookEntryData"
          },
          "type": "array"
        },
        "remove": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "reset": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "PhonebookUpdateResponseData": {
      "additionalProperties": false,
      "description": "PhonebookUpdateResponseData is the book after a change, and whom the change's new entries found.",
      "properties": {
        "count": {
          "type": "integer"
        },
        "hash": {
          "type": "string"
        },
        "matches": {
          "items": {
            "$ref": "#/$defs/PhonebookMatchData"
          },
          "type": "array"
        }
      },
      "required": [
        "count",
        "hash",
        "matches"
      ],
      "type": "object"
    },
    "PinChangeData": {
      "additionalProperties": false,
      "properties": {
        "msg_id": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        }
      },
      "required": [
        "msg_id",
        "operation_id"
      ],
      "type": "object"
    },
    "PinData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "message": {
          "$ref": "#/$defs/MessageData"
        },
        "msg_id": {
          "type": "string"
        },
        "pinned_at": {
          "type": "string"
        },
        "pinned_by": {
          "type": "integer"
        }
      },
      "required": [
        "conversation_id",
        "msg_id",
        "pinned_at",
        "pinned_by"
      ],
      "type": "object"
    },
    "PinListResponseData": {
      "additionalProperties": false,
      "properties": {
        "pins": {
          "items": {
            "$ref": "#/$defs/PinData"
          },
          "type": "array"
        }
      },
      "required": [
        "pins"
      ],
      "type": "object"
    },
    "PinResponseData": {
      "additionalProperties": false,
      "properties": {
        "pin": {
          "$ref": "#/$defs/PinData"
        }
      },
      "required": [
        "pin"
      ],
      "type": "object"
    },
    "PresenceSetData": {
      "additionalProperties": false,
      "description": "PresenceSetData changes what the caller says about themselves. A field left out stays as it is.",
      "properties": {
        "custom": {
          "description": "A new custom status, or null to clear it.",
          "oneOf": [
            {
              "$ref": "#/$defs/CustomStatus"
            },
            {
              "type": "null"
            }
          ]
        },
        "state": {
          "enum": [
            "available",
            "away",
            "busy",
            "invisible"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "PrivacyData": {
      "additionalProperties": false,
      "properties": {
        "direct_messages": {
          "enum": [
            "everyone",
            "contacts"
          ],
          "type": "string"
        },
        "group_invites": {
          "enum": [
            "everyone",
            "contacts",
            "nobody"
          ],
          "type": "string"
        },
        "phone_discovery": {
          "enum": [
            "everyone",
            "contacts",
            "nobody"
          ],
          "type": "string"
        },
        "presence": {
          "enum": [
            "everyone",
            "contacts",
            "nobody"
          ],
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "required": [
        "direct_messages",
        "group_invites",
        "phone_discovery",
        "presence"
      ],
      "type": "object"
    },
    "PrivacyResponseData": {
      "additionalProperties": false,
      "properties": {
        "privacy": {
          "$ref": "#/$defs/PrivacyData"
        }
      },
      "required": [
        "privacy"
      ],
      "type": "object"
    },
    "PrivacyUpdateData": {
      "additionalProperties": false,
      "properties": {
        "direct_messages": {
          "enum": [
            "everyone",
            "contacts"
          ],
          "type": "string"
        },
        "group_invites": {
          "enum": [
            "everyone",
            "contacts",
            "nobody"
          ],
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        },
        "phone_discovery": {
          "enum": [
            "everyone",
            "contacts",
            "nobody"
          ],
          "type": "string"
        },
        "presence": {
          "enum": [
            "everyone",
            "contacts",
            "nobody"
          ],
          "type": "string"
        }
      },
      "required": [
        "operation_id"
      ],
      "type": "object"
    },
    "ProfileData": {
      "additionalProperties": false,
      "description": "ProfileData is what a user says about themselves, whole: a field left out is empty. A profile its viewer may not see names its user alone.",
      "properties": {
        "about": {
          "type": "string"
        },
        "avatar_hash": {
          "type": "string"
        },
        "birthday": {
          "type": "string"
        },
        "bot": {
          "description": "Bot marks an account a program runs, and BotReads what it hears of the groups it is in: \"all\" said there, or what is \"addressed\" to it.",
          "type": "boolean"
        },
        "bot_reads": {
          "type": "string"
        },
        "commands": {
          "$ref": "#/$defs/BotCommandsData",
          "description": "Commands are a bot's commands, by where they hold."
        },
        "first_name": {
          "type": "string"
        },
        "gender": {
          "enum": [
            "male",
            "female",
            ""
          ],
          "type": "string"
        },
        "joins_groups": {
          "description": "JoinsGroups is a bot's: whether anybody may add it to a group.",
          "type": "boolean"
        },
        "last_name": {
          "type": "string"
        },
        "link": {
          "type": "string"
        },
        "name": {
          "description": "Name is a bot's public name, and Link where it is found by it, on a service with links of its own.",
          "type": "string"
        },
        "nick": {
          "type": "string"
        },
        "official": {
          "description": "Official marks one of the server's own accounts.",
          "type": "boolean"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "user_id"
      ],
      "type": "object"
    },
    "ProfileGetData": {
      "additionalProperties": false,
      "description": "ProfileGetData asks for a user's profile by ID, or a bot's by its name; neither asks for one's own.",
      "properties": {
        "name": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "ProfileResponseData": {
      "additionalProperties": false,
      "description": "ProfileResponseData answers profile.get and profile.update and carries profile.updated.",
      "properties": {
        "profile": {
          "$ref": "#/$defs/ProfileData"
        }
      },
      "required": [
        "profile"
      ],
      "type": "object"
    },
    "ProfileUpdateData": {
      "additionalProperties": false,
      "description": "ProfileUpdateData changes the caller's own profile; a field left out stays as it is.",
      "properties": {
        "about": {
          "type": "string"
        },
        "birthday": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "gender": {
          "enum": [
            "male",
            "female",
            ""
          ],
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "nick": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        }
      },
      "required": [
        "operation_id"
      ],
      "type": "object"
    },
    "PushRegisterData": {
      "additionalProperties": false,
      "description": "PushRegisterData registers the session's device for pushes.",
      "properties": {
        "provider": {
          "enum": [
            "fcm"
          ],
          "type": "string"
        },
        "token": {
          "type": "string"
        }
      },
      "required": [
        "provider",
        "token"
      ],
      "type": "object"
    },
    "QRAcceptResponseData": {
      "additionalProperties": false,
      "description": "QRAcceptResponseData is the session a phone let in.",
      "properties": {
        "session": {
          "$ref": "#/$defs/SessionData"
        }
      },
      "required": [
        "session"
      ],
      "type": "object"
    },
    "QRAcceptedData": {
      "additionalProperties": false,
      "description": "QRAcceptedData tells the waiting client it was let in: the body auth.phone returns, without created.",
      "properties": {
        "access_token": {
          "type": "string"
        },
        "expires_in": {
          "type": "integer"
        },
        "refresh_token": {
          "type": "string"
        },
        "session": {
          "$ref": "#/$defs/SessionData"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "access_token",
        "expires_in",
        "refresh_token",
        "session",
        "user_id"
      ],
      "type": "object"
    },
    "QRCodeData": {
      "additionalProperties": false,
      "description": "QRCodeData is what the QR code shows and how long it stays valid.",
      "properties": {
        "expires_in": {
          "type": "integer"
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "expires_in",
        "url"
      ],
      "type": "object"
    },
    "QRTokenData": {
      "additionalProperties": false,
      "description": "QRTokenData names a scanned QR code by its token.",
      "properties": {
        "token": {
          "type": "string"
        }
      },
      "required": [
        "token"
      ],
      "type": "object"
    },
    "QRWaitingData": {
      "additionalProperties": false,
      "description": "QRWaitingData describes the client waiting behind a scanned QR code, for the phone to show before the user agrees. Client is what that client says about itself, and untrusted.",
      "properties": {
        "client": {
          "$ref": "#/$defs/ClientData"
        },
        "expires_in": {
          "type": "integer"
        },
        "ip": {
          "type": "string"
        },
        "location": {
          "type": "string"
        }
      },
      "required": [
        "client",
        "expires_in",
        "ip"
      ],
      "type": "object"
    },
    "ReactionsResponseData": {
      "additionalProperties": false,
      "properties": {
        "conversation": {
          "$ref": "#/$defs/ConversationData"
        }
      },
      "required": [
        "conversation"
      ],
      "type": "object"
    },
    "ReactionsSeeData": {
      "additionalProperties": false,
      "description": "ReactionsSeeData reports that the caller has seen the reactions to a message of theirs; the message names the conversation.",
      "properties": {
        "msg_id": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        }
      },
      "required": [
        "msg_id",
        "operation_id"
      ],
      "type": "object"
    },
    "ReadData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "read_at": {
          "type": "string"
        },
        "through": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "conversation_id",
        "read_at",
        "through",
        "user_id"
      ],
      "type": "object"
    },
    "ReadMutationData": {
      "additionalProperties": false,
      "properties": {
        "conversation": {
          "$ref": "#/$defs/ConversationData"
        },
        "read": {
          "$ref": "#/$defs/ReadData"
        }
      },
      "required": [
        "conversation",
        "read"
      ],
      "type": "object"
    },
    "ReadSetData": {
      "additionalProperties": false,
      "properties": {
        "operation_id": {
          "type": "string"
        },
        "through": {
          "type": "string"
        }
      },
      "required": [
        "operation_id",
        "through"
      ],
      "type": "object"
    },
    "RefreshData": {
      "additionalProperties": false,
      "description": "RefreshData for refresh token request",
      "properties": {
        "refresh_token": {
          "type": "string"
        }
      },
      "required": [
        "refresh_token"
      ],
      "type": "object"
    },
    "RefreshResponseData": {
      "additionalProperties": false,
      "description": "RefreshResponseData for refresh token response",
      "properties": {
        "access_token": {
          "type": "string"
        },
        "expires_in": {
          "type": "integer"
        },
        "refresh_token": {
          "type": "string"
        },
        "session": {
          "$ref": "#/$defs/SessionData"
        }
      },
      "required": [
        "access_token",
        "expires_in",
        "refresh_token",
        "session"
      ],
      "type": "object"
    },
    "RestrictionData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "restricted": {
          "type": "boolean"
        },
        "restricted_by": {
          "type": "integer"
        },
        "until": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "conversation_id",
        "restricted",
        "restricted_by",
        "updated_at",
        "user_id"
      ],
      "type": "object"
    },
    "RestrictionResponseData": {
      "additionalProperties": false,
      "properties": {
        "conversation": {
          "$ref": "#/$defs/ConversationData"
        },
        "member": {
          "$ref": "#/$defs/MemberData"
        },
        "restriction": {
          "$ref": "#/$defs/RestrictionData"
        }
      },
      "required": [
        "conversation",
        "member",
        "restriction"
      ],
      "type": "object"
    },
    "RestrictionSetData": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "operation_id": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "restricted": {
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "until": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "conversation_id",
        "operation_id",
        "restricted",
        "user_id"
      ],
      "type": "object"
    },
    "SearchRequestData": {
      "additionalProperties": false,
      "description": "SearchRequestData for user search request",
      "properties": {
        "limit": {
          "type": "integer"
        },
        "offset": {
          "type": "integer"
        },
        "query": {
          "type": "string"
        }
      },
      "required": [
        "query"
      ],
      "type": "object"
    },
    "SearchResponseData": {
      "additionalProperties": false,
      "description": "SearchResponseData for user search response",
      "properties": {
        "has_more": {
          "type": "boolean"
        },
        "users": {
          "items": {
            "$ref": "#/$defs/SearchUserData"
          },
          "type": "array"
        }
      },
      "required": [
        "has_more",
        "users"
      ],
      "type": "object"
    },
    "SearchUserData": {
      "additionalProperties": false,
      "description": "SearchUserData represents a user in search results",
      "properties": {
        "about": {
          "type": "string"
        },
        "avatar_hash": {
          "type": "string"
        },
        "bot": {
          "description": "Bot marks a user a program runs, and Official one of the server's own accounts, as their profile does.",
          "type": "boolean"
        },
        "first_name": {
          "type": "string"
        },
        "gender": {
          "enum": [
            "male",
            "female",
            ""
          ],
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "nick": {
          "type": "string"
        },
        "official": {
          "type": "boolean"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "about",
        "first_name",
        "gender",
        "last_name",
        "nick",
        "user_id"
      ],
      "type": "object"
    },
    "SessionData": {
      "additionalProperties": false,
      "properties": {
        "client": {
          "$ref": "#/$defs/ClientData"
        },
        "created_at": {
          "type": "string"
        },
        "current": {
          "type": "boolean"
        },
        "expires_at": {
          "type": "string"
        },
        "last_active_at": {
          "type": "string"
        },
        "online": {
          "type": "boolean"
        },
        "push": {
          "type": "boolean"
        },
        "session_id": {
          "type": "string"
        },
        "transport": {
          "description": "Transport names the adapter the login was made through. It is derived by the server; unlike Client, a client cannot set it.",
          "type": "string"
        }
      },
      "required": [
        "client",
        "created_at",
        "current",
        "expires_at",
        "last_active_at",
        "online",
        "push",
        "session_id",
        "transport"
      ],
      "type": "object"
    },
    "SessionListResponseData": {
      "additionalProperties": false,
      "properties": {
        "sessions": {
          "items": {
            "$ref": "#/$defs/SessionData"
          },
          "type": "array"
        }
      },
      "required": [
        "sessions"
      ],
      "type": "object"
    },
    "SessionRevokeData": {
      "additionalProperties": false,
      "properties": {
        "scope": {
          "enum": [
            "others"
          ],
          "type": "string"
        },
        "session_id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "SessionRevokeResponseData": {
      "additionalProperties": false,
      "properties": {
        "session_ids": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "session_ids"
      ],
      "type": "object"
    },
    "SessionRevokedData": {
      "additionalProperties": false,
      "properties": {
        "reason": {
          "enum": [
            "revoked",
            "expired",
            "replaced"
          ],
          "type": "string"
        },
        "session_id": {
          "type": "string"
        }
      },
      "required": [
        "session_id"
      ],
      "type": "object"
    },
    "SmileyData": {
      "additionalProperties": false,
      "description": "SmileyData marks a range of a text, its smiley's fallback or one of its codes, as a smiley of a pack. Offsets are Unicode code points.",
      "properties": {
        "length": {
          "type": "integer"
        },
        "offset": {
          "type": "integer"
        },
        "pack_id": {
          "type": "string"
        },
        "smiley_id": {
          "type": "string"
        }
      },
      "required": [
        "length",
        "offset",
        "pack_id",
        "smiley_id"
      ],
      "type": "object"
    },
    "SmileyFormatData": {
      "additionalProperties": false,
      "description": "SmileyFormatData is a format a smiley's picture is in: \"small\" for a line of text and the panel, \"large\" for a message of nothing but smileys.",
      "properties": {
        "format": {
          "type": "string"
        },
        "height": {
          "type": "integer"
        },
        "width": {
          "type": "integer"
        }
      },
      "required": [
        "format",
        "height",
        "width"
      ],
      "type": "object"
    },
    "StatRequestData": {
      "additionalProperties": false,
      "description": "StatRequestData asks for one user's presence, or every contact's without a user.",
      "properties": {
        "user_id": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "StatResponseData": {
      "additionalProperties": false,
      "description": "StatResponseData for status response",
      "properties": {
        "statuses": {
          "items": {
            "$ref": "#/$defs/UserStatus"
          },
          "type": "array"
        }
      },
      "required": [
        "statuses"
      ],
      "type": "object"
    },
    "SyncEventData": {
      "additionalProperties": false,
      "properties": {
        "data": {},
        "seq": {
          "type": "string"
        },
        "time": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "data",
        "seq",
        "time",
        "type"
      ],
      "type": "object"
    },
    "SyncPullData": {
      "additionalProperties": false,
      "properties": {
        "after": {
          "type": "string"
        },
        "conversation_id": {
          "description": "ConversationID names the conversation stream to pull; empty for the account stream.",
          "type": "string"
        },
        "limit": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "SyncPullResponseData": {
      "additionalProperties": false,
      "properties": {
        "events": {
          "items": {
            "$ref": "#/$defs/SyncEventData"
          },
          "type": "array"
        },
        "has_more": {
          "type": "boolean"
        },
        "next": {
          "type": "string"
        },
        "reset": {
          "description": "Reset tells the device its cursor can no longer be followed: it reloads current state and pulls on from Next.",
          "type": "boolean"
        }
      },
      "required": [
        "events",
        "has_more",
        "next"
      ],
      "type": "object"
    },
    "SyncStateResponseData": {
      "additionalProperties": false,
      "description": "SyncStateResponseData is where the caller's streams stand: the head of the account stream, and of every conversation the caller has.",
      "properties": {
        "account": {
          "type": "string"
        },
        "conversations": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        }
      },
      "required": [
        "account",
        "conversations"
      ],
      "type": "object"
    },
    "TextPayload": {
      "additionalProperties": false,
      "description": "TextPayload for text message content",
      "properties": {
        "mentions": {
          "items": {
            "$ref": "#/$defs/MentionData"
          },
          "type": "array"
        },
        "smileys": {
          "items": {
            "$ref": "#/$defs/SmileyData"
          },
          "type": "array"
        },
        "text": {
          "type": "string"
        }
      },
      "required": [
        "text"
      ],
      "type": "object"
    },
    "TokenAuthData": {
      "additionalProperties": false,
      "description": "TokenAuthData for token authentication request",
      "properties": {
        "access_token": {
          "type": "string"
        }
      },
      "required": [
        "access_token"
      ],
      "type": "object"
    },
    "TokenAuthResponseData": {
      "additionalProperties": false,
      "properties": {
        "session": {
          "$ref": "#/$defs/SessionData"
        }
      },
      "required": [
        "session"
      ],
      "type": "object"
    },
    "TransferAcceptResponseData": {
      "additionalProperties": false,
      "properties": {
        "token": {
          "type": "string"
        }
      },
      "required": [
        "token"
      ],
      "type": "object"
    },
    "TransferActionData": {
      "additionalProperties": false,
      "description": "TransferActionData accepts, declines or cancels a transfer, and tells its parties who did, or why it ended when neither did.",
      "properties": {
        "reason": {
          "type": "string"
        },
        "transfer_id": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "transfer_id"
      ],
      "type": "object"
    },
    "TransferCreateData": {
      "additionalProperties": false,
      "properties": {
        "content_type": {
          "type": "string"
        },
        "conversation_id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "size": {
          "type": "integer"
        }
      },
      "required": [
        "conversation_id",
        "name",
        "size"
      ],
      "type": "object"
    },
    "TransferData": {
      "additionalProperties": false,
      "properties": {
        "content_type": {
          "type": "string"
        },
        "conversation_id": {
          "type": "string"
        },
        "expires_in": {
          "type": "integer"
        },
        "from": {
          "type": "integer"
        },
        "msg_id": {
          "description": "MsgID is the transfer's record in the history of ConversationID, the direct conversation of its two parties.",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "size": {
          "type": "integer"
        },
        "to": {
          "type": "integer"
        },
        "token": {
          "type": "string"
        },
        "transfer_id": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "from",
        "name",
        "size",
        "to",
        "transfer_id"
      ],
      "type": "object"
    },
    "TransferPayload": {
      "additionalProperties": false,
      "description": "TransferPayload is a direct transfer as history keeps it: what was offered and how far it got. The bytes are never kept.",
      "properties": {
        "content_type": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "size": {
          "type": "integer"
        },
        "state": {
          "enum": [
            "offered",
            "accepted",
            "completed",
            "declined",
            "cancelled",
            "expired",
            "failed"
          ],
          "type": "string"
        },
        "transfer_id": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "size",
        "state",
        "transfer_id"
      ],
      "type": "object"
    },
    "TransportData": {
      "additionalProperties": false,
      "description": "TransportData is one adapter's account as the owner sees it. An empty ID means the account has not been created yet; an ID with password_set false is an account whose secret was reset, its identifier still reserved.",
      "properties": {
        "created_at": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "id": {
          "type": "string"
        },
        "last_used_at": {
          "type": "string"
        },
        "password": {
          "$ref": "#/$defs/TransportPasswordPolicy"
        },
        "password_set": {
          "type": "boolean"
        },
        "title": {
          "type": "string"
        },
        "transport": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "required": [
        "enabled",
        "password",
        "password_set",
        "title",
        "transport"
      ],
      "type": "object"
    },
    "TransportListResponseData": {
      "additionalProperties": false,
      "properties": {
        "transports": {
          "items": {
            "$ref": "#/$defs/TransportData"
          },
          "type": "array"
        }
      },
      "required": [
        "transports"
      ],
      "type": "object"
    },
    "TransportPasswordData": {
      "additionalProperties": false,
      "description": "TransportPasswordData replaces the password of an existing account.",
      "properties": {
        "password": {
          "type": "string"
        },
        "transport": {
          "type": "string"
        }
      },
      "required": [
        "password",
        "transport"
      ],
      "type": "object"
    },
    "TransportPasswordPolicy": {
      "additionalProperties": false,
      "description": "TransportPasswordPolicy publishes the adapter's own password bounds, which are not Mandarin's: legacy clients often accept far shorter passwords.",
      "properties": {
        "max_length": {
          "type": "integer"
        },
        "min_length": {
          "type": "integer"
        }
      },
      "required": [
        "max_length",
        "min_length"
      ],
      "type": "object"
    },
    "TransportResponseData": {
      "additionalProperties": false,
      "description": "TransportResponseData is the body of every transport command that acts on one account, and of the transport.updated push. It always carries the whole record, so a client never has to merge a partial update.",
      "properties": {
        "transport": {
          "$ref": "#/$defs/TransportData"
        }
      },
      "required": [
        "transport"
      ],
      "type": "object"
    },
    "TransportSelectData": {
      "additionalProperties": false,
      "description": "TransportSelectData names the account for an operation that needs nothing else.",
      "properties": {
        "transport": {
          "type": "string"
        }
      },
      "required": [
        "transport"
      ],
      "type": "object"
    },
    "TransportSetupData": {
      "additionalProperties": false,
      "description": "TransportSetupData creates the account and chooses its first password.",
      "properties": {
        "password": {
          "type": "string"
        },
        "transport": {
          "type": "string"
        }
      },
      "required": [
        "password",
        "transport"
      ],
      "type": "object"
    },
    "TypingChangedData": {
      "additionalProperties": false,
      "description": "TypingChangedData tells a conversation's other members who started or stopped composing there.",
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "state": {
          "enum": [
            "start",
            "voice",
            "stop"
          ],
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "conversation_id",
        "state",
        "user_id"
      ],
      "type": "object"
    },
    "TypingSetData": {
      "additionalProperties": false,
      "description": "TypingSetData says the caller started or stopped composing in a conversation: \"start\" while they type, \"voice\" while they record a voice message, \"stop\" when they did either.",
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "state": {
          "enum": [
            "start",
            "voice",
            "stop"
          ],
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "state"
      ],
      "type": "object"
    },
    "UserStatus": {
      "additionalProperties": false,
      "description": "UserStatus is what is known about a user's presence: whether they can be reached, what they say about it and their custom status. presence.get lists these, and every presence event carries one.",
      "properties": {
        "active": {
          "description": "Active is whether somebody is looking at a client of the user now, as far as the viewer may know; LastActiveAt, while nobody is, when somebody last was.",
          "type": "boolean"
        },
        "custom": {
          "$ref": "#/$defs/CustomStatus"
        },
        "last_active_at": {
          "type": "string"
        },
        "online": {
          "type": "boolean"
        },
        "state": {
          "enum": [
            "available",
            "away",
            "busy",
            "invisible"
          ],
          "type": "string"
        },
        "time": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "active",
        "online",
        "time",
        "user_id"
      ],
      "type": "object"
    },
    "VoiceData": {
      "additionalProperties": false,
      "description": "VoiceData is what a voice message's sender measured of it as it was recorded: how long it lasts, and how loud it was along the way, as up to 64 levels from 0 to 31 in order.",
      "properties": {
        "duration_ms": {
          "type": "integer"
        },
        "waveform": {
          "items": {
            "type": "integer"
          },
          "type": "array"
        }
      },
      "required": [
        "duration_ms",
        "waveform"
      ],
      "type": "object"
    },
    "WaitingReactionData": {
      "additionalProperties": false,
      "description": "WaitingReactionData is somebody's reaction to a message of the viewer's that the viewer has not seen yet, with the start of what the message says.",
      "properties": {
        "msg_id": {
          "type": "string"
        },
        "preview": {
          "type": "string"
        },
        "reacted_at": {
          "type": "string"
        },
        "reaction": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "required": [
        "msg_id",
        "preview",
        "reacted_at",
        "reaction",
        "user_id"
      ],
      "type": "object"
    }
  },
  "$id": "https://mandarin.im/clema/2.0.0/schema.json",
  "$ref": "#/$defs/Envelope",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Every CLEMA frame is an Envelope; x-clema-messages names, for each message type, what its data is, what a request is answered with, and whether an event is kept by streams.",
  "title": "CLEMA 2.0.0",
  "x-clema-messages": {
    "activity.set": {
      "data": {
        "$ref": "#/$defs/ActivitySetData"
      },
      "direction": "request"
    },
    "auth.code": {
      "data": {
        "$ref": "#/$defs/CodeRequestData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/CodeResponseData"
      }
    },
    "auth.logout": {
      "direction": "request"
    },
    "auth.phone": {
      "data": {
        "$ref": "#/$defs/AuthPhoneData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/AuthResponseData"
      }
    },
    "auth.qr": {
      "data": {
        "$ref": "#/$defs/AuthQRData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/QRCodeData"
      }
    },
    "auth.refresh": {
      "data": {
        "$ref": "#/$defs/RefreshData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/RefreshResponseData"
      }
    },
    "auth.token": {
      "data": {
        "$ref": "#/$defs/TokenAuthData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/TokenAuthResponseData"
      }
    },
    "ban.add": {
      "data": {
        "$ref": "#/$defs/BanChangeData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/BanResponseData"
      }
    },
    "ban.added": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "ban.list": {
      "data": {
        "$ref": "#/$defs/ConversationIDData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/BanListResponseData"
      }
    },
    "ban.remove": {
      "data": {
        "$ref": "#/$defs/BanChangeData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/BanResponseData"
      }
    },
    "ban.removed": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "block.add": {
      "data": {
        "$ref": "#/$defs/BlockChangeData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/BlockResponseData"
      }
    },
    "block.added": {
      "data": {
        "$ref": "#/$defs/BlockResponseData"
      },
      "direction": "event",
      "durable": true
    },
    "block.list": {
      "direction": "request",
      "response": {
        "$ref": "#/$defs/BlockListResponseData"
      }
    },
    "block.remove": {
      "data": {
        "$ref": "#/$defs/BlockChangeData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/BlockResponseData"
      }
    },
    "block.removed": {
      "data": {
        "$ref": "#/$defs/BlockResponseData"
      },
      "direction": "event",
      "durable": true
    },
    "button.answer": {
      "data": {
        "$ref": "#/$defs/ButtonAnswerData"
      },
      "direction": "request"
    },
    "button.press": {
      "data": {
        "$ref": "#/$defs/ButtonPressData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ButtonPressResponseData"
      }
    },
    "button.pressed": {
      "data": {
        "$ref": "#/$defs/ButtonPressedEventData"
      },
      "direction": "event",
      "durable": true
    },
    "connection.close": {
      "direction": "request"
    },
    "connection.closing": {
      "data": {
        "$ref": "#/$defs/ByeData"
      },
      "direction": "event",
      "durable": false
    },
    "connection.hello": {
      "data": {
        "$ref": "#/$defs/HelloData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/HelloData"
      }
    },
    "connection.ping": {
      "direction": "request"
    },
    "connection.pong": {
      "direction": "event",
      "durable": false
    },
    "contact.add": {
      "data": {
        "$ref": "#/$defs/ContactAddData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ContactResponseData"
      }
    },
    "contact.added": {
      "data": {
        "$ref": "#/$defs/ContactResponseData"
      },
      "direction": "event",
      "durable": true
    },
    "contact.delete": {
      "data": {
        "$ref": "#/$defs/ContactDeleteData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ContactResponseData"
      }
    },
    "contact.deleted": {
      "data": {
        "$ref": "#/$defs/ContactResponseData"
      },
      "direction": "event",
      "durable": true
    },
    "contact.list": {
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ContactListResponseData"
      }
    },
    "contact.rename": {
      "data": {
        "$ref": "#/$defs/ContactRenameData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ContactResponseData"
      }
    },
    "contact.renamed": {
      "data": {
        "$ref": "#/$defs/ContactResponseData"
      },
      "direction": "event",
      "durable": true
    },
    "contact.requested": {
      "data": {
        "$ref": "#/$defs/ContactResponseData"
      },
      "direction": "event",
      "durable": true
    },
    "conversation.create": {
      "data": {
        "$ref": "#/$defs/ConversationCreateData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ConversationResponseData"
      }
    },
    "conversation.created": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "conversation.delete": {
      "data": {
        "$ref": "#/$defs/ConversationActionData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ConversationResponseData"
      }
    },
    "conversation.deleted": {
      "data": {
        "$ref": "#/$defs/ConversationDeletedEventData"
      },
      "direction": "event",
      "durable": true
    },
    "conversation.get": {
      "data": {
        "$ref": "#/$defs/ConversationGetData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ConversationResponseData"
      }
    },
    "conversation.list": {
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ConversationListResponseData"
      }
    },
    "conversation.search": {
      "data": {
        "$ref": "#/$defs/ConversationSearchData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ConversationSearchResponseData"
      }
    },
    "conversation.update": {
      "data": {
        "$ref": "#/$defs/ConversationUpdateData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ConversationResponseData"
      }
    },
    "conversation.updated": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "delivery.set": {
      "data": {
        "$ref": "#/$defs/DeliverySetData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/DeliveryMutationData"
      }
    },
    "delivery.updated": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "draft.update": {
      "data": {
        "$ref": "#/$defs/DraftUpdateData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/DraftResponseData"
      }
    },
    "draft.updated": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "file.abort": {
      "data": {
        "$ref": "#/$defs/FileAbortData"
      },
      "direction": "request"
    },
    "file.complete": {
      "data": {
        "$ref": "#/$defs/FileCompleteData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/FileCompleteResponseData"
      }
    },
    "file.create": {
      "data": {
        "$ref": "#/$defs/FileCreateData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/FileUploadData"
      }
    },
    "file.get": {
      "data": {
        "$ref": "#/$defs/FileGetData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/FileUploadData"
      }
    },
    "file.updated": {
      "data": {
        "$ref": "#/$defs/FileUpdatedEventData"
      },
      "direction": "event",
      "durable": true
    },
    "invite.accept": {
      "data": {
        "$ref": "#/$defs/InviteActionData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ConversationMutationData"
      }
    },
    "invite.accepted": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "invite.create": {
      "data": {
        "$ref": "#/$defs/InviteCreateData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/InviteResponseData"
      }
    },
    "invite.created": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "invite.get": {
      "data": {
        "$ref": "#/$defs/InviteTokenData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/InvitePreviewResponseData"
      }
    },
    "invite.list": {
      "data": {
        "$ref": "#/$defs/ConversationIDData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/InviteListResponseData"
      }
    },
    "invite.revoke": {
      "data": {
        "$ref": "#/$defs/InviteActionData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ConversationMutationData"
      }
    },
    "invite.revoked": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "invite.update": {
      "data": {
        "$ref": "#/$defs/InviteUpdateData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/InviteResponseData"
      }
    },
    "invite.updated": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "member.add": {
      "data": {
        "$ref": "#/$defs/MemberChangeData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/MemberResponseData"
      }
    },
    "member.added": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "member.list": {
      "data": {
        "$ref": "#/$defs/ConversationIDData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/MemberListResponseData"
      }
    },
    "member.remove": {
      "data": {
        "$ref": "#/$defs/MemberChangeData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/MemberResponseData"
      }
    },
    "member.removed": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "member.update": {
      "data": {
        "$ref": "#/$defs/MemberChangeData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/MemberResponseData"
      }
    },
    "member.updated": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "message.clear": {
      "data": {
        "$ref": "#/$defs/MessageClearData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/MessageClearedEventData"
      }
    },
    "message.cleared": {
      "data": {
        "$ref": "#/$defs/MessageClearedEventData"
      },
      "direction": "event",
      "durable": true
    },
    "message.created": {
      "data": {
        "oneOf": [
          {
            "$ref": "#/$defs/MessageData"
          },
          {
            "$ref": "#/$defs/MessageIdentityData"
          }
        ]
      },
      "direction": "event",
      "durable": true
    },
    "message.delete": {
      "data": {
        "$ref": "#/$defs/MessageDeleteData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/MessageMutationResponseData"
      }
    },
    "message.deleted": {
      "data": {
        "$ref": "#/$defs/MessageDeletedEventData"
      },
      "direction": "event",
      "durable": true
    },
    "message.edit": {
      "data": {
        "$ref": "#/$defs/MessageEditData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/MessageMutationResponseData"
      }
    },
    "message.edited": {
      "data": {
        "oneOf": [
          {
            "$ref": "#/$defs/MessageData"
          },
          {
            "$ref": "#/$defs/MessageIdentityData"
          }
        ]
      },
      "direction": "event",
      "durable": true
    },
    "message.forward": {
      "data": {
        "$ref": "#/$defs/MessageForwardData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/MessageMutationResponseData"
      }
    },
    "message.list": {
      "data": {
        "$ref": "#/$defs/HistRequestData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/HistResponseData"
      }
    },
    "message.play": {
      "data": {
        "$ref": "#/$defs/MessagePlayData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/MessageMutationResponseData"
      }
    },
    "message.played": {
      "data": {
        "$ref": "#/$defs/MessagePlayedEventData"
      },
      "direction": "event",
      "durable": true
    },
    "message.react": {
      "data": {
        "$ref": "#/$defs/MessageReactData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/MessageMutationResponseData"
      }
    },
    "message.reacted": {
      "data": {
        "oneOf": [
          {
            "$ref": "#/$defs/MessageData"
          },
          {
            "$ref": "#/$defs/MessageIdentityData"
          }
        ]
      },
      "direction": "event",
      "durable": true
    },
    "message.search": {
      "data": {
        "$ref": "#/$defs/MessageSearchData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/MessageSearchResponseData"
      }
    },
    "message.send": {
      "data": {
        "$ref": "#/$defs/MsgSendData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/MessageMutationResponseData"
      }
    },
    "notification.set": {
      "data": {
        "$ref": "#/$defs/NotificationSetData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/NotificationResponseData"
      }
    },
    "notification.updated": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "pack.get": {
      "data": {
        "$ref": "#/$defs/PackGetData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/PackResponseData"
      }
    },
    "pack.install": {
      "data": {
        "$ref": "#/$defs/PackChangeData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/InstalledPacksData"
      }
    },
    "pack.installed": {
      "data": {
        "$ref": "#/$defs/InstalledPacksData"
      },
      "direction": "event",
      "durable": true
    },
    "pack.list": {
      "direction": "request",
      "response": {
        "$ref": "#/$defs/PackListResponseData"
      }
    },
    "pack.order": {
      "data": {
        "$ref": "#/$defs/PackOrderData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/InstalledPacksData"
      }
    },
    "pack.ordered": {
      "data": {
        "$ref": "#/$defs/InstalledPacksData"
      },
      "direction": "event",
      "durable": true
    },
    "pack.remove": {
      "data": {
        "$ref": "#/$defs/PackChangeData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/InstalledPacksData"
      }
    },
    "pack.removed": {
      "data": {
        "$ref": "#/$defs/InstalledPacksData"
      },
      "direction": "event",
      "durable": true
    },
    "phone.code": {
      "data": {
        "$ref": "#/$defs/CodeRequestData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/CodeResponseData"
      }
    },
    "phone.get": {
      "direction": "request",
      "response": {
        "$ref": "#/$defs/PhoneResponseData"
      }
    },
    "phone.set": {
      "data": {
        "$ref": "#/$defs/PhoneSetData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/PhoneResponseData"
      }
    },
    "phone.updated": {
      "data": {
        "$ref": "#/$defs/PhoneResponseData"
      },
      "direction": "event",
      "durable": false
    },
    "phonebook.clear": {
      "direction": "request"
    },
    "phonebook.get": {
      "direction": "request",
      "response": {
        "$ref": "#/$defs/PhonebookStateData"
      }
    },
    "phonebook.update": {
      "data": {
        "$ref": "#/$defs/PhonebookUpdateData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/PhonebookUpdateResponseData"
      }
    },
    "pin.added": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "pin.list": {
      "data": {
        "$ref": "#/$defs/ConversationIDData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/PinListResponseData"
      }
    },
    "pin.remove": {
      "data": {
        "$ref": "#/$defs/PinChangeData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/PinResponseData"
      }
    },
    "pin.removed": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "pin.set": {
      "data": {
        "$ref": "#/$defs/PinChangeData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/PinResponseData"
      }
    },
    "presence.get": {
      "data": {
        "$ref": "#/$defs/StatRequestData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/StatResponseData"
      }
    },
    "presence.offline": {
      "data": {
        "$ref": "#/$defs/UserStatus"
      },
      "direction": "event",
      "durable": false
    },
    "presence.online": {
      "data": {
        "$ref": "#/$defs/UserStatus"
      },
      "direction": "event",
      "durable": false
    },
    "presence.self": {
      "data": {
        "$ref": "#/$defs/UserStatus"
      },
      "direction": "event",
      "durable": false
    },
    "presence.set": {
      "data": {
        "$ref": "#/$defs/PresenceSetData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/UserStatus"
      }
    },
    "presence.updated": {
      "data": {
        "$ref": "#/$defs/UserStatus"
      },
      "direction": "event",
      "durable": false
    },
    "privacy.get": {
      "direction": "request",
      "response": {
        "$ref": "#/$defs/PrivacyResponseData"
      }
    },
    "privacy.update": {
      "data": {
        "$ref": "#/$defs/PrivacyUpdateData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/PrivacyResponseData"
      }
    },
    "privacy.updated": {
      "data": {
        "$ref": "#/$defs/PrivacyResponseData"
      },
      "direction": "event",
      "durable": true
    },
    "profile.get": {
      "data": {
        "$ref": "#/$defs/ProfileGetData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ProfileResponseData"
      }
    },
    "profile.update": {
      "data": {
        "$ref": "#/$defs/ProfileUpdateData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ProfileResponseData"
      }
    },
    "profile.updated": {
      "data": {
        "$ref": "#/$defs/ProfileResponseData"
      },
      "direction": "event",
      "durable": true
    },
    "push.register": {
      "data": {
        "$ref": "#/$defs/PushRegisterData"
      },
      "direction": "request"
    },
    "push.unregister": {
      "direction": "request"
    },
    "qr.accept": {
      "data": {
        "$ref": "#/$defs/QRTokenData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/QRAcceptResponseData"
      }
    },
    "qr.accepted": {
      "data": {
        "$ref": "#/$defs/QRAcceptedData"
      },
      "direction": "event",
      "durable": false
    },
    "qr.get": {
      "data": {
        "$ref": "#/$defs/QRTokenData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/QRWaitingData"
      }
    },
    "reactions.see": {
      "data": {
        "$ref": "#/$defs/ReactionsSeeData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ReactionsResponseData"
      }
    },
    "reactions.updated": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "read.set": {
      "data": {
        "$ref": "#/$defs/ReadSetData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/ReadMutationData"
      }
    },
    "read.updated": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "restriction.set": {
      "data": {
        "$ref": "#/$defs/RestrictionSetData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/RestrictionResponseData"
      }
    },
    "restriction.updated": {
      "data": {
        "$ref": "#/$defs/ConversationMutationData"
      },
      "direction": "event",
      "durable": true
    },
    "session.list": {
      "direction": "request",
      "response": {
        "$ref": "#/$defs/SessionListResponseData"
      }
    },
    "session.revoke": {
      "data": {
        "$ref": "#/$defs/SessionRevokeData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/SessionRevokeResponseData"
      }
    },
    "session.revoked": {
      "data": {
        "$ref": "#/$defs/SessionRevokedData"
      },
      "direction": "event",
      "durable": false
    },
    "sync.pull": {
      "data": {
        "$ref": "#/$defs/SyncPullData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/SyncPullResponseData"
      }
    },
    "sync.state": {
      "direction": "request",
      "response": {
        "$ref": "#/$defs/SyncStateResponseData"
      }
    },
    "transfer.accept": {
      "data": {
        "$ref": "#/$defs/TransferActionData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/TransferAcceptResponseData"
      }
    },
    "transfer.accepted": {
      "data": {
        "$ref": "#/$defs/TransferActionData"
      },
      "direction": "event",
      "durable": false
    },
    "transfer.cancel": {
      "data": {
        "$ref": "#/$defs/TransferActionData"
      },
      "direction": "request"
    },
    "transfer.cancelled": {
      "data": {
        "$ref": "#/$defs/TransferActionData"
      },
      "direction": "event",
      "durable": false
    },
    "transfer.create": {
      "data": {
        "$ref": "#/$defs/TransferCreateData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/TransferData"
      }
    },
    "transfer.created": {
      "data": {
        "$ref": "#/$defs/TransferData"
      },
      "direction": "event",
      "durable": false
    },
    "transfer.decline": {
      "data": {
        "$ref": "#/$defs/TransferActionData"
      },
      "direction": "request"
    },
    "transfer.declined": {
      "data": {
        "$ref": "#/$defs/TransferActionData"
      },
      "direction": "event",
      "durable": false
    },
    "transport.disable": {
      "data": {
        "$ref": "#/$defs/TransportSelectData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/TransportResponseData"
      }
    },
    "transport.enable": {
      "data": {
        "$ref": "#/$defs/TransportSelectData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/TransportResponseData"
      }
    },
    "transport.list": {
      "direction": "request",
      "response": {
        "$ref": "#/$defs/TransportListResponseData"
      }
    },
    "transport.password": {
      "data": {
        "$ref": "#/$defs/TransportPasswordData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/TransportResponseData"
      }
    },
    "transport.reset": {
      "data": {
        "$ref": "#/$defs/TransportSelectData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/TransportResponseData"
      }
    },
    "transport.setup": {
      "data": {
        "$ref": "#/$defs/TransportSetupData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/TransportResponseData"
      }
    },
    "transport.updated": {
      "data": {
        "$ref": "#/$defs/TransportResponseData"
      },
      "direction": "event",
      "durable": false
    },
    "typing.changed": {
      "data": {
        "$ref": "#/$defs/TypingChangedData"
      },
      "direction": "event",
      "durable": false
    },
    "typing.set": {
      "data": {
        "$ref": "#/$defs/TypingSetData"
      },
      "direction": "request"
    },
    "user.search": {
      "data": {
        "$ref": "#/$defs/SearchRequestData"
      },
      "direction": "request",
      "response": {
        "$ref": "#/$defs/SearchResponseData"
      }
    }
  },
  "x-clema-version": "2.0.0"
}
