mirror of
https://github.com/stoatchat/javascript-client-api.git
synced 2026-07-21 04:25:22 -04:00
8258 lines
205 KiB
JSON
8258 lines
205 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "Revolt API",
|
|
"description": "User-first privacy focused chat platform.",
|
|
"termsOfService": "https://revolt.chat/terms",
|
|
"contact": {
|
|
"name": "Revolt Support",
|
|
"url": "https://revolt.chat",
|
|
"email": "contact@revolt.chat"
|
|
},
|
|
"license": {
|
|
"name": "AGPLv3",
|
|
"url": "https://github.com/revoltchat/delta/blob/master/LICENSE"
|
|
},
|
|
"version": "0.5.3-rc.1"
|
|
},
|
|
"servers": [
|
|
{
|
|
"url": "https://api.revolt.chat",
|
|
"description": "Revolt API"
|
|
},
|
|
{
|
|
"url": "http://local.revolt.chat:8000",
|
|
"description": "Local Revolt Environment"
|
|
}
|
|
],
|
|
"paths": {
|
|
"/": {
|
|
"get": {
|
|
"tags": [
|
|
"Core"
|
|
],
|
|
"summary": "Query Node",
|
|
"description": "Fetch the server configuration for this Revolt instance.",
|
|
"operationId": "root_root",
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RevoltConfig"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/@me": {
|
|
"get": {
|
|
"tags": [
|
|
"User Information"
|
|
],
|
|
"summary": "Fetch Self",
|
|
"description": "Retrieve your user information.",
|
|
"operationId": "fetch_self_req",
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"User Information"
|
|
],
|
|
"summary": "Edit User",
|
|
"description": "Edit currently authenticated user.",
|
|
"operationId": "edit_user_req",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataEditUser"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/users/{target}": {
|
|
"get": {
|
|
"tags": [
|
|
"User Information"
|
|
],
|
|
"summary": "Fetch User",
|
|
"description": "Retrieve a user's information.",
|
|
"operationId": "fetch_user_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/users/@me/username": {
|
|
"patch": {
|
|
"tags": [
|
|
"User Information"
|
|
],
|
|
"summary": "Change Username",
|
|
"description": "Change your username.",
|
|
"operationId": "change_username_req",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataChangeUsername"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
},
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/users/{target}/default_avatar": {
|
|
"get": {
|
|
"tags": [
|
|
"User Information"
|
|
],
|
|
"summary": "Fetch Default Avatar",
|
|
"description": "This returns a default avatar based on the given id.",
|
|
"operationId": "get_default_avatar_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Default Avatar Picture",
|
|
"content": {
|
|
"image/png": {
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/{target}/profile": {
|
|
"get": {
|
|
"tags": [
|
|
"User Information"
|
|
],
|
|
"summary": "Fetch User Profile",
|
|
"description": "Retrieve a user's profile data.\n\nWill fail if you do not have permission to access the other user's profile.",
|
|
"operationId": "fetch_profile_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserProfile"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/users/dms": {
|
|
"get": {
|
|
"tags": [
|
|
"Direct Messaging"
|
|
],
|
|
"summary": "Fetch Direct Message Channels",
|
|
"description": "This fetches your direct messages, including any DM and group DM conversations.",
|
|
"operationId": "fetch_dms_req",
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Channel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/users/{target}/dm": {
|
|
"get": {
|
|
"tags": [
|
|
"Direct Messaging"
|
|
],
|
|
"summary": "Open Direct Message",
|
|
"description": "Open a DM with another user.",
|
|
"operationId": "open_dm_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Channel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/users/{target}/mutual": {
|
|
"get": {
|
|
"tags": [
|
|
"Relationships"
|
|
],
|
|
"summary": "Fetch Mutual Friends And Servers",
|
|
"description": "Retrieve a list of mutual friends and servers with another user.",
|
|
"operationId": "find_mutual_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MutualResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/users/{username}/friend": {
|
|
"put": {
|
|
"tags": [
|
|
"Relationships"
|
|
],
|
|
"summary": "Send Friend Request / Accept Request",
|
|
"description": "Send a friend request to another user or accept another user's friend request.",
|
|
"operationId": "add_friend_req",
|
|
"parameters": [
|
|
{
|
|
"name": "username",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/users/{target}/friend": {
|
|
"delete": {
|
|
"tags": [
|
|
"Relationships"
|
|
],
|
|
"summary": "Deny Friend Request / Remove Friend",
|
|
"description": "Denies another user's friend request or removes an existing friend.",
|
|
"operationId": "remove_friend_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/users/{target}/block": {
|
|
"put": {
|
|
"tags": [
|
|
"Relationships"
|
|
],
|
|
"summary": "Block User",
|
|
"description": "Block another user by their id.",
|
|
"operationId": "block_user_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Relationships"
|
|
],
|
|
"summary": "Unblock User",
|
|
"description": "Unblock another user by their id.",
|
|
"operationId": "unblock_user_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/bots/create": {
|
|
"post": {
|
|
"tags": [
|
|
"Bots"
|
|
],
|
|
"summary": "Create Bot",
|
|
"description": "Create a new Revolt bot.",
|
|
"operationId": "create_create_bot",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataCreateBot"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Bot"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/bots/{target}/invite": {
|
|
"get": {
|
|
"tags": [
|
|
"Bots"
|
|
],
|
|
"summary": "Fetch Public Bot",
|
|
"description": "Fetch details of a public (or owned) bot by its id.",
|
|
"operationId": "fetch_public_fetch_public_bot",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PublicBot"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Bots"
|
|
],
|
|
"summary": "Invite Bot",
|
|
"description": "Invite a bot to a server or group by its id.`",
|
|
"operationId": "invite_invite_bot",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InviteBotDestination"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/bots/{target}": {
|
|
"get": {
|
|
"tags": [
|
|
"Bots"
|
|
],
|
|
"summary": "Fetch Bot",
|
|
"description": "Fetch details of a bot you own by its id.",
|
|
"operationId": "fetch_fetch_bot",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BotResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Bots"
|
|
],
|
|
"summary": "Delete Bot",
|
|
"description": "Delete a bot by its id.",
|
|
"operationId": "delete_delete_bot",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"Bots"
|
|
],
|
|
"summary": "Edit Bot",
|
|
"description": "Edit bot details by its id.",
|
|
"operationId": "edit_edit_bot",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataEditBot"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Bot"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/bots/@me": {
|
|
"get": {
|
|
"tags": [
|
|
"Bots"
|
|
],
|
|
"summary": "Fetch Owned Bots",
|
|
"description": "Fetch all of the bots that you have control over.",
|
|
"operationId": "fetch_owned_fetch_owned_bots",
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OwnedBotsResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/channels/{target}/ack/{message}": {
|
|
"put": {
|
|
"tags": [
|
|
"Messaging"
|
|
],
|
|
"summary": "Acknowledge Message",
|
|
"description": "Lets the server and all other clients know that we've seen this message id in this channel.",
|
|
"operationId": "channel_ack_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "message",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/channels/{target}": {
|
|
"get": {
|
|
"tags": [
|
|
"Channel Information"
|
|
],
|
|
"summary": "Fetch Channel",
|
|
"description": "Fetch channel by its id.",
|
|
"operationId": "channel_fetch_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Channel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Channel Information"
|
|
],
|
|
"summary": "Close Channel",
|
|
"description": "Deletes a server channel, leaves a group or closes a group.",
|
|
"operationId": "channel_delete_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"Channel Information"
|
|
],
|
|
"summary": "Edit Channel",
|
|
"description": "Edit a channel object by its id.",
|
|
"operationId": "channel_edit_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataEditChannel"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Channel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/channels/{target}/members": {
|
|
"get": {
|
|
"tags": [
|
|
"Groups"
|
|
],
|
|
"summary": "Fetch Group Members",
|
|
"description": "Retrieves all users who are part of this group.",
|
|
"operationId": "members_fetch_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/channels/{target}/invites": {
|
|
"post": {
|
|
"tags": [
|
|
"Channel Invites"
|
|
],
|
|
"summary": "Create Invite",
|
|
"description": "Creates an invite to this channel.\n\nChannel must be a `TextChannel`.",
|
|
"operationId": "invite_create_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Invite"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/channels/{target}/messages": {
|
|
"get": {
|
|
"tags": [
|
|
"Messaging"
|
|
],
|
|
"summary": "Fetch Messages",
|
|
"description": "Fetch multiple messages.",
|
|
"operationId": "message_query_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"description": "Maximum number of messages to fetch\n\nFor fetching nearby messages, this is \\`(limit + 1)\\`.",
|
|
"schema": {
|
|
"description": "Maximum number of messages to fetch\n\nFor fetching nearby messages, this is \\`(limit + 1)\\`.",
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"maximum": 100.0,
|
|
"minimum": 1.0,
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "before",
|
|
"in": "query",
|
|
"description": "Message id before which messages should be fetched",
|
|
"schema": {
|
|
"description": "Message id before which messages should be fetched",
|
|
"type": "string",
|
|
"maxLength": 26,
|
|
"minLength": 26,
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "after",
|
|
"in": "query",
|
|
"description": "Message id after which messages should be fetched",
|
|
"schema": {
|
|
"description": "Message id after which messages should be fetched",
|
|
"type": "string",
|
|
"maxLength": 26,
|
|
"minLength": 26,
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "sort",
|
|
"in": "query",
|
|
"description": "Message sort direction",
|
|
"schema": {
|
|
"description": "Message sort direction",
|
|
"$ref": "#/components/schemas/MessageSort",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "nearby",
|
|
"in": "query",
|
|
"description": "Message id to search around\n\nSpecifying 'nearby' ignores 'before', 'after' and 'sort'. It will also take half of limit rounded as the limits to each side. It also fetches the message ID specified.",
|
|
"schema": {
|
|
"description": "Message id to search around\n\nSpecifying 'nearby' ignores 'before', 'after' and 'sort'. It will also take half of limit rounded as the limits to each side. It also fetches the message ID specified.",
|
|
"type": "string",
|
|
"maxLength": 26,
|
|
"minLength": 26,
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "include_users",
|
|
"in": "query",
|
|
"description": "Whether to include user (and member, if server channel) objects",
|
|
"schema": {
|
|
"description": "Whether to include user (and member, if server channel) objects",
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BulkMessageResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Messaging"
|
|
],
|
|
"summary": "Send Message",
|
|
"description": "Sends a message to the given channel.",
|
|
"operationId": "message_send_message_send",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "Idempotency-Key",
|
|
"in": "header",
|
|
"description": "Unique key to prevent duplicate requests",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataMessageSend"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/channels/{target}/search": {
|
|
"post": {
|
|
"tags": [
|
|
"Messaging"
|
|
],
|
|
"summary": "Search for Messages",
|
|
"description": "This route searches for messages within the given parameters.",
|
|
"operationId": "message_search_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OptionsMessageSearch"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BulkMessageResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/channels/{_target}/messages/stale": {
|
|
"post": {
|
|
"tags": [
|
|
"Messaging"
|
|
],
|
|
"summary": "Poll Message Changes",
|
|
"description": "This route returns any changed message objects and tells you if any have been deleted.\n\nDon't actually poll this route, instead use this to update your local database.\n\n**DEPRECATED**",
|
|
"operationId": "message_query_stale_req",
|
|
"parameters": [
|
|
{
|
|
"name": "_target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OptionsQueryStale"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/channels/{target}/messages/{msg}": {
|
|
"get": {
|
|
"tags": [
|
|
"Messaging"
|
|
],
|
|
"summary": "Fetch Message",
|
|
"description": "Retrieves a message by its id.",
|
|
"operationId": "message_fetch_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "msg",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Messaging"
|
|
],
|
|
"summary": "Delete Message",
|
|
"description": "Delete a message you've sent or one you have permission to delete.",
|
|
"operationId": "message_delete_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "msg",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"Messaging"
|
|
],
|
|
"summary": "Edit Message",
|
|
"description": "Edits a message that you've previously sent.",
|
|
"operationId": "message_edit_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "msg",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataEditMessage"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/channels/create": {
|
|
"post": {
|
|
"tags": [
|
|
"Groups"
|
|
],
|
|
"summary": "Create Group",
|
|
"description": "Create a new group channel.",
|
|
"operationId": "group_create_req",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataCreateGroup"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Channel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/channels/{target}/recipients/{member}": {
|
|
"put": {
|
|
"tags": [
|
|
"Groups"
|
|
],
|
|
"summary": "Add Member to Group",
|
|
"description": "Adds another user to the group.",
|
|
"operationId": "group_add_member_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "member",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Groups"
|
|
],
|
|
"summary": "Remove Member from Group",
|
|
"description": "Removes a user from the group.",
|
|
"operationId": "group_remove_member_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "member",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/channels/{_target}/join_call": {
|
|
"post": {
|
|
"tags": [
|
|
"Voice"
|
|
],
|
|
"summary": "Join Call",
|
|
"description": "Asks the voice server for a token to join the call.",
|
|
"operationId": "voice_join_req",
|
|
"parameters": [
|
|
{
|
|
"name": "_target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CreateVoiceUserResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/channels/{target}/permissions/{role_id}": {
|
|
"put": {
|
|
"tags": [
|
|
"Channel Permissions"
|
|
],
|
|
"summary": "Set Role Permission",
|
|
"description": "Sets permissions for the specified role in this channel.\n\nChannel must be a `TextChannel` or `VoiceChannel`.",
|
|
"operationId": "permissions_set_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "role_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Data"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Channel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/channels/{target}/permissions/default": {
|
|
"put": {
|
|
"tags": [
|
|
"Channel Permissions"
|
|
],
|
|
"summary": "Set Default Permission",
|
|
"description": "Sets permissions for the default role in this channel.\n\nChannel must be a `Group`, `TextChannel` or `VoiceChannel`.",
|
|
"operationId": "permissions_set_default_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataDefaultChannelPermissions"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Channel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/servers/create": {
|
|
"post": {
|
|
"tags": [
|
|
"Server Information"
|
|
],
|
|
"summary": "Create Server",
|
|
"description": "Create a new server.",
|
|
"operationId": "server_create_req",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataCreateServer"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Server"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/servers/{target}": {
|
|
"get": {
|
|
"tags": [
|
|
"Server Information"
|
|
],
|
|
"summary": "Fetch Server",
|
|
"description": "Fetch a server by its id.",
|
|
"operationId": "server_fetch_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Server"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Server Information"
|
|
],
|
|
"summary": "Delete / Leave Server",
|
|
"description": "Deletes a server if owner otherwise leaves.",
|
|
"operationId": "server_delete_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"Server Information"
|
|
],
|
|
"summary": "Edit Server",
|
|
"description": "Edit a server by its id.",
|
|
"operationId": "server_edit_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataEditServer"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Server"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/servers/{target}/ack": {
|
|
"put": {
|
|
"tags": [
|
|
"Server Information"
|
|
],
|
|
"summary": "Mark Server As Read",
|
|
"description": "Mark all channels in a server as read.",
|
|
"operationId": "server_ack_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/servers/{target}/channels": {
|
|
"post": {
|
|
"tags": [
|
|
"Server Information"
|
|
],
|
|
"summary": "Create Channel",
|
|
"description": "Create a new Text or Voice channel.",
|
|
"operationId": "channel_create_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataCreateChannel"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Channel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/servers/{target}/members": {
|
|
"get": {
|
|
"tags": [
|
|
"Server Members"
|
|
],
|
|
"summary": "Fetch Members",
|
|
"description": "Fetch all server members.",
|
|
"operationId": "member_fetch_all_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AllMemberResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/servers/{target}/members/{member}": {
|
|
"get": {
|
|
"tags": [
|
|
"Server Members"
|
|
],
|
|
"summary": "Fetch Member",
|
|
"description": "Retrieve a member.",
|
|
"operationId": "member_fetch_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "member",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Member"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Server Members"
|
|
],
|
|
"summary": "Kick Member",
|
|
"description": "Removes a member from the server.",
|
|
"operationId": "member_remove_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "member",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/servers/{server}/members/{target}": {
|
|
"patch": {
|
|
"tags": [
|
|
"Server Members"
|
|
],
|
|
"summary": "Edit Member",
|
|
"description": "Edit a member by their id.",
|
|
"operationId": "member_edit_req",
|
|
"parameters": [
|
|
{
|
|
"name": "server",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataMemberEdit"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Member"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/servers/{server}/bans/{target}": {
|
|
"put": {
|
|
"tags": [
|
|
"Server Members"
|
|
],
|
|
"summary": "Ban User",
|
|
"description": "Ban a user by their id.",
|
|
"operationId": "ban_create_req",
|
|
"parameters": [
|
|
{
|
|
"name": "server",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataBanCreate"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServerBan"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Server Members"
|
|
],
|
|
"summary": "Unban user",
|
|
"description": "Remove a user's ban.",
|
|
"operationId": "ban_remove_req",
|
|
"parameters": [
|
|
{
|
|
"name": "server",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/servers/{target}/bans": {
|
|
"get": {
|
|
"tags": [
|
|
"Server Members"
|
|
],
|
|
"summary": "Fetch Bans",
|
|
"description": "Fetch all bans on a server.",
|
|
"operationId": "ban_list_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BanListResult"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/servers/{target}/invites": {
|
|
"get": {
|
|
"tags": [
|
|
"Server Members"
|
|
],
|
|
"summary": "Fetch Invites",
|
|
"description": "Fetch all server invites.",
|
|
"operationId": "invites_fetch_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Invite"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/servers/{target}/roles": {
|
|
"post": {
|
|
"tags": [
|
|
"Server Permissions"
|
|
],
|
|
"summary": "Create Role",
|
|
"description": "Creates a new server role.",
|
|
"operationId": "roles_create_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataCreateRole"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NewRoleResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/servers/{target}/roles/{role_id}": {
|
|
"delete": {
|
|
"tags": [
|
|
"Server Permissions"
|
|
],
|
|
"summary": "Delete Role",
|
|
"description": "Delete a server role by its id.",
|
|
"operationId": "roles_delete_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "role_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"Server Permissions"
|
|
],
|
|
"summary": "Edit Role",
|
|
"description": "Edit a role by its id.",
|
|
"operationId": "roles_edit_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "role_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataEditRole"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Role"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/servers/{target}/permissions/{role_id}": {
|
|
"put": {
|
|
"tags": [
|
|
"Server Permissions"
|
|
],
|
|
"summary": "Set Role Permission",
|
|
"description": "Sets permissions for the specified role in the server.",
|
|
"operationId": "permissions_set_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
},
|
|
{
|
|
"name": "role_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataSetServerRolePermission"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Server"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/servers/{target}/permissions/default": {
|
|
"put": {
|
|
"tags": [
|
|
"Server Permissions"
|
|
],
|
|
"summary": "Set Default Permission",
|
|
"description": "Sets permissions for the default role in this server.",
|
|
"operationId": "permissions_set_default_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataSetServerDefaultPermission"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Server"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/invites/{target}": {
|
|
"get": {
|
|
"tags": [
|
|
"Invites"
|
|
],
|
|
"summary": "Fetch Invite",
|
|
"description": "Fetch an invite by its id.",
|
|
"operationId": "invite_fetch_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InviteResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Invites"
|
|
],
|
|
"summary": "Join Invite",
|
|
"description": "Join an invite by its ID.",
|
|
"operationId": "invite_join_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InviteJoinResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Invites"
|
|
],
|
|
"summary": "Delete Invite",
|
|
"description": "Delete an invite by its id.",
|
|
"operationId": "invite_delete_req",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Id"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/auth/account/create": {
|
|
"post": {
|
|
"tags": [
|
|
"Account"
|
|
],
|
|
"summary": "Create Account",
|
|
"description": "Create a new account.",
|
|
"operationId": "create_account_create_account",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataCreateAccount"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/account/reverify": {
|
|
"post": {
|
|
"tags": [
|
|
"Account"
|
|
],
|
|
"summary": "Resend Verification",
|
|
"description": "Resend account creation verification email.",
|
|
"operationId": "resend_verification_resend_verification",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataResendVerification"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/account/": {
|
|
"get": {
|
|
"tags": [
|
|
"Account"
|
|
],
|
|
"summary": "Fetch Account",
|
|
"description": "Fetch account information from the current session.",
|
|
"operationId": "fetch_account_fetch_account",
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AccountInfo"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/auth/account/change/password": {
|
|
"patch": {
|
|
"tags": [
|
|
"Account"
|
|
],
|
|
"summary": "Change Password",
|
|
"description": "Change the current account password.",
|
|
"operationId": "change_password_change_password",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataChangePassword"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/auth/account/change/email": {
|
|
"patch": {
|
|
"tags": [
|
|
"Account"
|
|
],
|
|
"summary": "Change Email",
|
|
"description": "Change the associated account email.",
|
|
"operationId": "change_email_change_email",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataChangeEmail"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/auth/account/verify/{code}": {
|
|
"post": {
|
|
"tags": [
|
|
"Account"
|
|
],
|
|
"summary": "Verify Email",
|
|
"description": "Verify an email address.",
|
|
"operationId": "verify_email_verify_email",
|
|
"parameters": [
|
|
{
|
|
"name": "code",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/account/reset_password": {
|
|
"post": {
|
|
"tags": [
|
|
"Account"
|
|
],
|
|
"summary": "Send Password Reset",
|
|
"description": "Send an email to reset account password.",
|
|
"operationId": "send_password_reset_send_password_reset",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataSendPasswordReset"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"Account"
|
|
],
|
|
"summary": "Password Reset",
|
|
"description": "Confirm password reset and change the password.",
|
|
"operationId": "password_reset_password_reset",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataPasswordReset"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/session/login": {
|
|
"post": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Login",
|
|
"description": "Login to an account.",
|
|
"operationId": "login_login",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataLogin"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResponseLogin"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/session/logout": {
|
|
"post": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Logout",
|
|
"description": "Delete current session.",
|
|
"operationId": "logout_logout",
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/auth/session/all": {
|
|
"get": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Fetch Sessions",
|
|
"description": "Fetch all sessions associated with this account.",
|
|
"operationId": "fetch_all_fetch_all",
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/SessionInfo"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Delete All Sessions",
|
|
"description": "Delete all active sessions, optionally including current one.",
|
|
"operationId": "revoke_all_revoke_all",
|
|
"parameters": [
|
|
{
|
|
"name": "revoke_self",
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/auth/session/{id}": {
|
|
"delete": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Revoke Session",
|
|
"description": "Delete a specific active session.",
|
|
"operationId": "revoke_revoke",
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Edit Session",
|
|
"description": "Edit current session information.",
|
|
"operationId": "edit_edit",
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataEditSession"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Session"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/onboard/hello": {
|
|
"get": {
|
|
"tags": [
|
|
"Onboarding"
|
|
],
|
|
"summary": "Check Onboarding Status",
|
|
"description": "This will tell you whether the current account requires onboarding or whether you can continue to send requests as usual. You may skip calling this if you're restoring an existing session.",
|
|
"operationId": "hello_req",
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataHello"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
},
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/onboard/complete": {
|
|
"post": {
|
|
"tags": [
|
|
"Onboarding"
|
|
],
|
|
"summary": "Complete Onboarding",
|
|
"description": "This sets a new username, completes onboarding and allows a user to start using Revolt.",
|
|
"operationId": "complete_req",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DataOnboard"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
},
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/push/subscribe": {
|
|
"post": {
|
|
"tags": [
|
|
"Web Push"
|
|
],
|
|
"summary": "Push Subscribe",
|
|
"description": "Create a new Web Push subscription.\n\nIf an existing subscription exists on this session, it will be removed.",
|
|
"operationId": "subscribe_req",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebPushSubscription"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/push/unsubscribe": {
|
|
"post": {
|
|
"tags": [
|
|
"Web Push"
|
|
],
|
|
"summary": "Unsubscribe",
|
|
"description": "Remove the Web Push subscription associated with the current session.",
|
|
"operationId": "unsubscribe_req",
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/sync/settings/fetch": {
|
|
"post": {
|
|
"tags": [
|
|
"Sync"
|
|
],
|
|
"summary": "Fetch Settings",
|
|
"description": "Fetch settings from server filtered by keys.\n\nThis will return an object with the requested keys, each value is a tuple of `(timestamp, value)`, the value is the previously uploaded data.",
|
|
"operationId": "get_settings_req",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OptionsFetchSettings"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "array",
|
|
"items": [
|
|
{
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"maxItems": 2,
|
|
"minItems": 2
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/sync/settings/set": {
|
|
"post": {
|
|
"tags": [
|
|
"Sync"
|
|
],
|
|
"summary": "Set Settings",
|
|
"description": "Upload data to save to settings.",
|
|
"operationId": "set_settings_req",
|
|
"parameters": [
|
|
{
|
|
"name": "timestamp",
|
|
"in": "query",
|
|
"description": "Timestamp of settings change.\n\nUsed to avoid feedback loops.",
|
|
"schema": {
|
|
"description": "Timestamp of settings change.\n\nUsed to avoid feedback loops.",
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"nullable": true
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/sync/unreads": {
|
|
"get": {
|
|
"tags": [
|
|
"Sync"
|
|
],
|
|
"summary": "Fetch Unreads",
|
|
"description": "Fetch information about unread state on channels.",
|
|
"operationId": "get_unreads_req",
|
|
"responses": {
|
|
"default": {
|
|
"description": "An error occurred.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ChannelUnread"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Api Key": []
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"RevoltConfig": {
|
|
"title": "Server Configuration",
|
|
"type": "object",
|
|
"required": [
|
|
"app",
|
|
"features",
|
|
"revolt",
|
|
"vapid",
|
|
"ws"
|
|
],
|
|
"properties": {
|
|
"revolt": {
|
|
"description": "Revolt API Version",
|
|
"type": "string"
|
|
},
|
|
"features": {
|
|
"description": "Features enabled on this Revolt node",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RevoltFeatures"
|
|
}
|
|
]
|
|
},
|
|
"ws": {
|
|
"description": "WebSocket URL",
|
|
"type": "string"
|
|
},
|
|
"app": {
|
|
"description": "URL pointing to the client serving this node",
|
|
"type": "string"
|
|
},
|
|
"vapid": {
|
|
"description": "Web Push VAPID public key",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"RevoltFeatures": {
|
|
"title": "Feature Configuration",
|
|
"type": "object",
|
|
"required": [
|
|
"autumn",
|
|
"captcha",
|
|
"email",
|
|
"invite_only",
|
|
"january",
|
|
"voso"
|
|
],
|
|
"properties": {
|
|
"captcha": {
|
|
"description": "hCaptcha configuration",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CaptchaFeature"
|
|
}
|
|
]
|
|
},
|
|
"email": {
|
|
"description": "Whether email verification is enabled",
|
|
"type": "boolean"
|
|
},
|
|
"invite_only": {
|
|
"description": "Whether this server is invite only",
|
|
"type": "boolean"
|
|
},
|
|
"autumn": {
|
|
"description": "File server service configuration",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Feature"
|
|
}
|
|
]
|
|
},
|
|
"january": {
|
|
"description": "Proxy service configuration",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Feature"
|
|
}
|
|
]
|
|
},
|
|
"voso": {
|
|
"description": "Voice server configuration",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/VoiceFeature"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"CaptchaFeature": {
|
|
"title": "hCaptcha Configuration",
|
|
"type": "object",
|
|
"required": [
|
|
"enabled",
|
|
"key"
|
|
],
|
|
"properties": {
|
|
"enabled": {
|
|
"description": "Whether captcha is enabled",
|
|
"type": "boolean"
|
|
},
|
|
"key": {
|
|
"description": "Client key used for solving captcha",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Feature": {
|
|
"title": "Generic Service Configuration",
|
|
"type": "object",
|
|
"required": [
|
|
"enabled",
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"enabled": {
|
|
"description": "Whether the service is enabled",
|
|
"type": "boolean"
|
|
},
|
|
"url": {
|
|
"description": "URL pointing to the service",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"VoiceFeature": {
|
|
"title": "Voice Server Configuration",
|
|
"type": "object",
|
|
"required": [
|
|
"enabled",
|
|
"url",
|
|
"ws"
|
|
],
|
|
"properties": {
|
|
"enabled": {
|
|
"description": "Whether voice is enabled",
|
|
"type": "boolean"
|
|
},
|
|
"url": {
|
|
"description": "URL pointing to the voice API",
|
|
"type": "string"
|
|
},
|
|
"ws": {
|
|
"description": "URL pointing to the voice WebSocket server",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Permission": {
|
|
"description": "Permission value on Revolt\n\nThis should be restricted to the lower 52 bits to prevent any potential issues with Javascript. Also leave empty spaces for future permission flags to be added.",
|
|
"type": "string",
|
|
"enum": [
|
|
"ManageChannel",
|
|
"ManageServer",
|
|
"ManagePermissions",
|
|
"ManageRole",
|
|
"KickMembers",
|
|
"BanMembers",
|
|
"TimeoutMembers",
|
|
"AssignRoles",
|
|
"ChangeNickname",
|
|
"ManageNicknames",
|
|
"ChangeAvatar",
|
|
"RemoveAvatars",
|
|
"ViewChannel",
|
|
"ReadMessageHistory",
|
|
"SendMessage",
|
|
"ManageMessages",
|
|
"ManageWebhooks",
|
|
"InviteOthers",
|
|
"SendEmbeds",
|
|
"UploadFiles",
|
|
"Masquerade",
|
|
"Connect",
|
|
"Speak",
|
|
"Video",
|
|
"MuteMembers",
|
|
"DeafenMembers",
|
|
"MoveMembers",
|
|
"GrantAllSafe",
|
|
"GrantAll"
|
|
]
|
|
},
|
|
"UserPermission": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Access",
|
|
"ViewProfile",
|
|
"SendMessage",
|
|
"Invite"
|
|
]
|
|
},
|
|
"Error": {
|
|
"title": "Error",
|
|
"oneOf": [
|
|
{
|
|
"description": "This error was not labeled :(",
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"LabelMe"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"AlreadyOnboarded"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"UsernameTaken"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"UnknownUser"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"AlreadyFriends"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"AlreadySentRequest"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Blocked"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"BlockedByOther"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"NotFriends"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"UnknownChannel"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"UnknownAttachment"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"UnknownMessage"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CannotEditMessage"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CannotJoinCall"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"TooManyAttachments"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"TooManyReplies"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"EmptyMessage"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CannotRemoveYourself"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"max",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"GroupTooLarge"
|
|
]
|
|
},
|
|
"max": {
|
|
"type": "integer",
|
|
"format": "uint",
|
|
"minimum": 0.0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"AlreadyInGroup"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"NotInGroup"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"UnknownServer"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"InvalidRole"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Banned"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"max",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"TooManyServers"
|
|
]
|
|
},
|
|
"max": {
|
|
"type": "integer",
|
|
"format": "uint",
|
|
"minimum": 0.0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"ReachedMaximumBots"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"IsBot"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"BotIsPrivate"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"permission",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"MissingPermission"
|
|
]
|
|
},
|
|
"permission": {
|
|
"$ref": "#/components/schemas/Permission"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"permission",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"MissingUserPermission"
|
|
]
|
|
},
|
|
"permission": {
|
|
"$ref": "#/components/schemas/UserPermission"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"NotElevated"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CannotGiveMissingPermissions"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"operation",
|
|
"type",
|
|
"with"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"DatabaseError"
|
|
]
|
|
},
|
|
"operation": {
|
|
"type": "string"
|
|
},
|
|
"with": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"InternalError"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"InvalidOperation"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"InvalidCredentials"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"InvalidSession"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"DuplicateNonce"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"VosoUnavailable"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"NotFound"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"NoEffect"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"FailedValidation"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"User": {
|
|
"description": "Representiation of a User on Revolt.",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"username"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"description": "Unique Id",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"description": "Username",
|
|
"type": "string"
|
|
},
|
|
"avatar": {
|
|
"description": "Avatar attachment",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"relations": {
|
|
"description": "Relationships with other users",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Relationship"
|
|
},
|
|
"nullable": true
|
|
},
|
|
"badges": {
|
|
"description": "Bitfield of user badges",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"nullable": true
|
|
},
|
|
"status": {
|
|
"description": "User's current status",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/UserStatus"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"profile": {
|
|
"description": "User's profile page",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/UserProfile"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"flags": {
|
|
"description": "Enum of user flags",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"nullable": true
|
|
},
|
|
"bot": {
|
|
"description": "Bot information",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/BotInformation"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"relationship": {
|
|
"description": "Current session user's relationship with this user",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RelationshipStatus"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"online": {
|
|
"description": "Whether this user is currently online",
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"File": {
|
|
"description": "Representation of a File on Revolt Generated by Autumn",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"content_type",
|
|
"filename",
|
|
"metadata",
|
|
"size",
|
|
"tag"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"description": "Unique Id",
|
|
"type": "string"
|
|
},
|
|
"tag": {
|
|
"description": "Tag / bucket this file was uploaded to",
|
|
"type": "string"
|
|
},
|
|
"filename": {
|
|
"description": "Original filename",
|
|
"type": "string"
|
|
},
|
|
"metadata": {
|
|
"description": "Parsed metadata of this file",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Metadata"
|
|
}
|
|
]
|
|
},
|
|
"content_type": {
|
|
"description": "Raw content type of this file",
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"description": "Size of this file (in bytes)",
|
|
"type": "integer",
|
|
"format": "int"
|
|
},
|
|
"deleted": {
|
|
"description": "Whether this file was deleted",
|
|
"type": "boolean",
|
|
"nullable": true
|
|
},
|
|
"reported": {
|
|
"description": "Whether this file was reported",
|
|
"type": "boolean",
|
|
"nullable": true
|
|
},
|
|
"message_id": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"user_id": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"server_id": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"object_id": {
|
|
"description": "Id of the object this file is associated with",
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"Metadata": {
|
|
"description": "Metadata associated with file",
|
|
"oneOf": [
|
|
{
|
|
"description": "File is just a generic uncategorised file",
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"File"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"description": "File contains textual data and should be displayed as such",
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Text"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"description": "File is an image with specific dimensions",
|
|
"type": "object",
|
|
"required": [
|
|
"height",
|
|
"type",
|
|
"width"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Image"
|
|
]
|
|
},
|
|
"width": {
|
|
"type": "integer",
|
|
"format": "int"
|
|
},
|
|
"height": {
|
|
"type": "integer",
|
|
"format": "int"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"description": "File is a video with specific dimensions",
|
|
"type": "object",
|
|
"required": [
|
|
"height",
|
|
"type",
|
|
"width"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Video"
|
|
]
|
|
},
|
|
"width": {
|
|
"type": "integer",
|
|
"format": "int"
|
|
},
|
|
"height": {
|
|
"type": "integer",
|
|
"format": "int"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"description": "File is audio",
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Audio"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Relationship": {
|
|
"description": "Relationship entry indicating current status with other user",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"status"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"$ref": "#/components/schemas/RelationshipStatus"
|
|
}
|
|
}
|
|
},
|
|
"RelationshipStatus": {
|
|
"description": "User's relationship with another user (or themselves)",
|
|
"type": "string",
|
|
"enum": [
|
|
"None",
|
|
"User",
|
|
"Friend",
|
|
"Outgoing",
|
|
"Incoming",
|
|
"Blocked",
|
|
"BlockedOther"
|
|
]
|
|
},
|
|
"UserStatus": {
|
|
"description": "User's active status",
|
|
"type": "object",
|
|
"properties": {
|
|
"text": {
|
|
"description": "Custom status text",
|
|
"type": "string",
|
|
"maxLength": 128,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
},
|
|
"presence": {
|
|
"description": "Current presence option",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Presence"
|
|
}
|
|
],
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"Presence": {
|
|
"description": "Presence status",
|
|
"type": "string",
|
|
"enum": [
|
|
"Online",
|
|
"Idle",
|
|
"Busy",
|
|
"Invisible"
|
|
]
|
|
},
|
|
"UserProfile": {
|
|
"description": "User's profile",
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"description": "Text content on user's profile",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"background": {
|
|
"description": "Background visible on user's profile",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"BotInformation": {
|
|
"description": "Bot information for if the user is a bot",
|
|
"type": "object",
|
|
"required": [
|
|
"owner"
|
|
],
|
|
"properties": {
|
|
"owner": {
|
|
"description": "Id of the owner of this bot",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Id": {
|
|
"type": "string"
|
|
},
|
|
"DataEditUser": {
|
|
"title": "User Data",
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"description": "New user status",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/UserStatus"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"profile": {
|
|
"description": "New user profile data\n\nThis is applied as a partial.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/UserProfileData"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"avatar": {
|
|
"description": "Attachment Id for avatar",
|
|
"type": "string",
|
|
"maxLength": 128,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
},
|
|
"remove": {
|
|
"description": "Fields to remove from user object",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/FieldsUser"
|
|
},
|
|
"minItems": 1,
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"UserProfileData": {
|
|
"title": "Profile Data",
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"description": "Text to set as user profile description",
|
|
"type": "string",
|
|
"maxLength": 2000,
|
|
"minLength": 0,
|
|
"nullable": true
|
|
},
|
|
"background": {
|
|
"description": "Attachment Id for background",
|
|
"type": "string",
|
|
"maxLength": 128,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"FieldsUser": {
|
|
"description": "Optional fields on user object",
|
|
"type": "string",
|
|
"enum": [
|
|
"Avatar",
|
|
"StatusText",
|
|
"StatusPresence",
|
|
"ProfileContent",
|
|
"ProfileBackground"
|
|
]
|
|
},
|
|
"DataChangeUsername": {
|
|
"title": "Username Information",
|
|
"type": "object",
|
|
"required": [
|
|
"password",
|
|
"username"
|
|
],
|
|
"properties": {
|
|
"username": {
|
|
"description": "New username",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 2,
|
|
"pattern": "^[a-zA-Z0-9_.]+$"
|
|
},
|
|
"password": {
|
|
"description": "Current account password",
|
|
"type": "string",
|
|
"maxLength": 1024,
|
|
"minLength": 8
|
|
}
|
|
}
|
|
},
|
|
"Channel": {
|
|
"description": "Representation of a channel on Revolt",
|
|
"oneOf": [
|
|
{
|
|
"description": "Personal \"Saved Notes\" channel which allows users to save messages",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"channel_type",
|
|
"user"
|
|
],
|
|
"properties": {
|
|
"channel_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"SavedMessages"
|
|
]
|
|
},
|
|
"_id": {
|
|
"description": "Unique Id",
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"description": "Id of the user this channel belongs to",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"description": "Direct message channel between two users",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"active",
|
|
"channel_type",
|
|
"recipients"
|
|
],
|
|
"properties": {
|
|
"channel_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"DirectMessage"
|
|
]
|
|
},
|
|
"_id": {
|
|
"description": "Unique Id",
|
|
"type": "string"
|
|
},
|
|
"active": {
|
|
"description": "Whether this direct message channel is currently open on both sides",
|
|
"type": "boolean"
|
|
},
|
|
"recipients": {
|
|
"description": "2-tuple of user ids participating in direct message",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"last_message_id": {
|
|
"description": "Id of the last message sent in this channel",
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"description": "Group channel between 1 or more participants",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"channel_type",
|
|
"name",
|
|
"owner",
|
|
"recipients"
|
|
],
|
|
"properties": {
|
|
"channel_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Group"
|
|
]
|
|
},
|
|
"_id": {
|
|
"description": "Unique Id",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"description": "Display name of the channel",
|
|
"type": "string"
|
|
},
|
|
"owner": {
|
|
"description": "User id of the owner of the group",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"description": "Channel description",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"recipients": {
|
|
"description": "Array of user ids participating in channel",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"icon": {
|
|
"description": "Custom icon attachment",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"last_message_id": {
|
|
"description": "Id of the last message sent in this channel",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"permissions": {
|
|
"description": "Permissions assigned to members of this group (does not apply to the owner of the group)",
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"nullable": true
|
|
},
|
|
"nsfw": {
|
|
"description": "Whether this group is marked as not safe for work",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"description": "Text channel belonging to a server",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"channel_type",
|
|
"name",
|
|
"server"
|
|
],
|
|
"properties": {
|
|
"channel_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"TextChannel"
|
|
]
|
|
},
|
|
"_id": {
|
|
"description": "Unique Id",
|
|
"type": "string"
|
|
},
|
|
"server": {
|
|
"description": "Id of the server this channel belongs to",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"description": "Display name of the channel",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"description": "Channel description",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"icon": {
|
|
"description": "Custom icon attachment",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"last_message_id": {
|
|
"description": "Id of the last message sent in this channel",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"default_permissions": {
|
|
"description": "Default permissions assigned to users in this channel",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/OverrideField"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"role_permissions": {
|
|
"description": "Permissions assigned based on role to this channel",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/components/schemas/OverrideField"
|
|
}
|
|
},
|
|
"nsfw": {
|
|
"description": "Whether this channel is marked as not safe for work",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"description": "Voice channel belonging to a server",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"channel_type",
|
|
"name",
|
|
"server"
|
|
],
|
|
"properties": {
|
|
"channel_type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"VoiceChannel"
|
|
]
|
|
},
|
|
"_id": {
|
|
"description": "Unique Id",
|
|
"type": "string"
|
|
},
|
|
"server": {
|
|
"description": "Id of the server this channel belongs to",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"description": "Display name of the channel",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"description": "Channel description",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"icon": {
|
|
"description": "Custom icon attachment",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"default_permissions": {
|
|
"description": "Default permissions assigned to users in this channel",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/OverrideField"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"role_permissions": {
|
|
"description": "Permissions assigned based on role to this channel",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/components/schemas/OverrideField"
|
|
}
|
|
},
|
|
"nsfw": {
|
|
"description": "Whether this channel is marked as not safe for work",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"OverrideField": {
|
|
"description": "Representation of a single permission override as it appears on models and in the database",
|
|
"type": "object",
|
|
"required": [
|
|
"a",
|
|
"d"
|
|
],
|
|
"properties": {
|
|
"a": {
|
|
"description": "Allow bit flags",
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"d": {
|
|
"description": "Disallow bit flags",
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"r": {
|
|
"description": "Ranking of this override",
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"MutualResponse": {
|
|
"title": "Mutual Friends and Servers Response",
|
|
"type": "object",
|
|
"required": [
|
|
"servers",
|
|
"users"
|
|
],
|
|
"properties": {
|
|
"users": {
|
|
"description": "Array of mutual user IDs that both users are friends with",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"servers": {
|
|
"description": "Array of mutual server IDs that both users are in",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Bot": {
|
|
"description": "Representation of a bot on Revolt",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"owner",
|
|
"public",
|
|
"token"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"description": "Bot Id\n\nThis equals the associated bot user's id.",
|
|
"type": "string"
|
|
},
|
|
"owner": {
|
|
"description": "User Id of the bot owner",
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"description": "Token used to authenticate requests for this bot",
|
|
"type": "string"
|
|
},
|
|
"public": {
|
|
"description": "Whether the bot is public (may be invited by anyone)",
|
|
"type": "boolean"
|
|
},
|
|
"analytics": {
|
|
"description": "Whether to enable analytics",
|
|
"type": "boolean"
|
|
},
|
|
"discoverable": {
|
|
"description": "Whether this bot should be publicly discoverable",
|
|
"type": "boolean"
|
|
},
|
|
"interactions_url": {
|
|
"description": "Reserved; URL for handling interactions",
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"DataCreateBot": {
|
|
"title": "Bot Details",
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"description": "Bot username",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 2,
|
|
"pattern": "^[a-zA-Z0-9_.]+$"
|
|
}
|
|
}
|
|
},
|
|
"InviteBotDestination": {
|
|
"title": "Invite Destination",
|
|
"anyOf": [
|
|
{
|
|
"description": "Invite to a server",
|
|
"type": "object",
|
|
"required": [
|
|
"server"
|
|
],
|
|
"properties": {
|
|
"server": {
|
|
"description": "Server Id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"description": "Invite to a group",
|
|
"type": "object",
|
|
"required": [
|
|
"group"
|
|
],
|
|
"properties": {
|
|
"group": {
|
|
"description": "Group Id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"PublicBot": {
|
|
"title": "Public Bot",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"username"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"description": "Bot Id",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"description": "Bot Username",
|
|
"type": "string"
|
|
},
|
|
"avatar": {
|
|
"description": "Profile Avatar",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"description": {
|
|
"description": "Profile Description",
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"BotResponse": {
|
|
"title": "Bot Response",
|
|
"type": "object",
|
|
"required": [
|
|
"bot",
|
|
"user"
|
|
],
|
|
"properties": {
|
|
"bot": {
|
|
"description": "Bot object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Bot"
|
|
}
|
|
]
|
|
},
|
|
"user": {
|
|
"description": "User object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"OwnedBotsResponse": {
|
|
"title": "Owned Bots Response",
|
|
"description": "Both lists are sorted by their IDs.",
|
|
"type": "object",
|
|
"required": [
|
|
"bots",
|
|
"users"
|
|
],
|
|
"properties": {
|
|
"bots": {
|
|
"description": "Bot objects",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Bot"
|
|
}
|
|
},
|
|
"users": {
|
|
"description": "User objects",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"DataEditBot": {
|
|
"title": "Bot Details",
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "Bot username",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 2,
|
|
"pattern": "^[a-zA-Z0-9_.]+$",
|
|
"nullable": true
|
|
},
|
|
"public": {
|
|
"description": "Whether the bot can be added by anyone",
|
|
"type": "boolean",
|
|
"nullable": true
|
|
},
|
|
"analytics": {
|
|
"description": "Whether analytics should be gathered for this bot\n\nMust be enabled in order to show up on [Revolt Discover](https://rvlt.gg).",
|
|
"type": "boolean",
|
|
"nullable": true
|
|
},
|
|
"interactions_url": {
|
|
"description": "Interactions URL",
|
|
"type": "string",
|
|
"maxLength": 2048,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
},
|
|
"remove": {
|
|
"description": "Fields to remove from bot object",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/FieldsBot"
|
|
},
|
|
"minItems": 1,
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"FieldsBot": {
|
|
"description": "Optional fields on bot object",
|
|
"type": "string",
|
|
"enum": [
|
|
"Token",
|
|
"InteractionsURL"
|
|
]
|
|
},
|
|
"DataEditChannel": {
|
|
"title": "Channel Details",
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "Channel name",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
},
|
|
"description": {
|
|
"description": "Channel description",
|
|
"type": "string",
|
|
"maxLength": 1024,
|
|
"minLength": 0,
|
|
"nullable": true
|
|
},
|
|
"icon": {
|
|
"description": "Icon\n\nProvide an Autumn attachment Id.",
|
|
"type": "string",
|
|
"maxLength": 128,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
},
|
|
"nsfw": {
|
|
"description": "Whether this channel is age-restricted",
|
|
"type": "boolean",
|
|
"nullable": true
|
|
},
|
|
"remove": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/FieldsChannel"
|
|
},
|
|
"minItems": 1,
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"FieldsChannel": {
|
|
"description": "Optional fields on channel object",
|
|
"type": "string",
|
|
"enum": [
|
|
"Description",
|
|
"Icon",
|
|
"DefaultPermissions"
|
|
]
|
|
},
|
|
"Invite": {
|
|
"description": "Representation of an invite to a channel on Revolt",
|
|
"oneOf": [
|
|
{
|
|
"description": "Invite to a specific server channel",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"channel",
|
|
"creator",
|
|
"server",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Server"
|
|
]
|
|
},
|
|
"_id": {
|
|
"description": "Invite code",
|
|
"type": "string"
|
|
},
|
|
"server": {
|
|
"description": "Id of the server this invite points to",
|
|
"type": "string"
|
|
},
|
|
"creator": {
|
|
"description": "Id of user who created this invite",
|
|
"type": "string"
|
|
},
|
|
"channel": {
|
|
"description": "Id of the server channel this invite points to",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"description": "Invite to a group channel",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"channel",
|
|
"creator",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Group"
|
|
]
|
|
},
|
|
"_id": {
|
|
"description": "Invite code",
|
|
"type": "string"
|
|
},
|
|
"creator": {
|
|
"description": "Id of user who created this invite",
|
|
"type": "string"
|
|
},
|
|
"channel": {
|
|
"description": "Id of the group channel this invite points to",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Message": {
|
|
"description": "Representation of a Message on Revolt",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"author",
|
|
"channel",
|
|
"content"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"description": "Unique Id",
|
|
"type": "string"
|
|
},
|
|
"nonce": {
|
|
"description": "Unique value generated by client sending this message",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"channel": {
|
|
"description": "Id of the channel this message was sent in",
|
|
"type": "string"
|
|
},
|
|
"author": {
|
|
"description": "Id of the user that sent this message",
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"description": "Message content",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Content"
|
|
}
|
|
]
|
|
},
|
|
"attachments": {
|
|
"description": "Array of attachments",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/File"
|
|
},
|
|
"nullable": true
|
|
},
|
|
"edited": {
|
|
"description": "Time at which this message was last edited",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/DateTimeContainer"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"embeds": {
|
|
"description": "Attached embeds to this message",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Embed"
|
|
},
|
|
"nullable": true
|
|
},
|
|
"mentions": {
|
|
"description": "Array of user ids mentioned in this message",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"nullable": true
|
|
},
|
|
"replies": {
|
|
"description": "Array of message ids this message is replying to",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"nullable": true
|
|
},
|
|
"masquerade": {
|
|
"description": "Name and / or avatar overrides for this message",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Masquerade"
|
|
}
|
|
],
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"Content": {
|
|
"description": "Untagged enum representing message content",
|
|
"anyOf": [
|
|
{
|
|
"description": "Message contains text content",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"description": "Message is a system event",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SystemMessage"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"SystemMessage": {
|
|
"description": "Representation of a system event message",
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"content",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"text"
|
|
]
|
|
},
|
|
"content": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"by",
|
|
"id",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"user_added"
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"by": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"by",
|
|
"id",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"user_remove"
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"by": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"user_joined"
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"user_left"
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"user_kicked"
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"user_banned"
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"by",
|
|
"name",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"channel_renamed"
|
|
]
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"by": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"by",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"channel_description_changed"
|
|
]
|
|
},
|
|
"by": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"by",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"channel_icon_changed"
|
|
]
|
|
},
|
|
"by": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"DateTimeContainer": {
|
|
"description": "Container so we can apply this within Option<>s.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/DateTime"
|
|
}
|
|
]
|
|
},
|
|
"DateTime": {
|
|
"description": "Local definition of DateTime from Bson",
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"Embed": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Website"
|
|
]
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"special": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Special"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"image": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Image"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"video": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Video"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"site_name": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"icon_url": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"colour": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"height",
|
|
"size",
|
|
"type",
|
|
"url",
|
|
"width"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Image"
|
|
]
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"width": {
|
|
"type": "integer",
|
|
"format": "int"
|
|
},
|
|
"height": {
|
|
"type": "integer",
|
|
"format": "int"
|
|
},
|
|
"size": {
|
|
"$ref": "#/components/schemas/ImageSize"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Text"
|
|
]
|
|
},
|
|
"icon_url": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"media": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"colour": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"None"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Special": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"None"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"YouTube"
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"timestamp": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"content_type",
|
|
"id",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Twitch"
|
|
]
|
|
},
|
|
"content_type": {
|
|
"$ref": "#/components/schemas/TwitchType"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"content_type",
|
|
"id",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Spotify"
|
|
]
|
|
},
|
|
"content_type": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Soundcloud"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"content_type",
|
|
"id",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Bandcamp"
|
|
]
|
|
},
|
|
"content_type": {
|
|
"$ref": "#/components/schemas/BandcampType"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"TwitchType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Channel",
|
|
"Video",
|
|
"Clip"
|
|
]
|
|
},
|
|
"BandcampType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Album",
|
|
"Track"
|
|
]
|
|
},
|
|
"Image": {
|
|
"type": "object",
|
|
"required": [
|
|
"height",
|
|
"size",
|
|
"url",
|
|
"width"
|
|
],
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"width": {
|
|
"type": "integer",
|
|
"format": "int"
|
|
},
|
|
"height": {
|
|
"type": "integer",
|
|
"format": "int"
|
|
},
|
|
"size": {
|
|
"$ref": "#/components/schemas/ImageSize"
|
|
}
|
|
}
|
|
},
|
|
"ImageSize": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Large",
|
|
"Preview"
|
|
]
|
|
},
|
|
"Video": {
|
|
"type": "object",
|
|
"required": [
|
|
"height",
|
|
"url",
|
|
"width"
|
|
],
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"width": {
|
|
"type": "integer",
|
|
"format": "int"
|
|
},
|
|
"height": {
|
|
"type": "integer",
|
|
"format": "int"
|
|
}
|
|
}
|
|
},
|
|
"Masquerade": {
|
|
"description": "Name and / or avatar override information",
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "Replace the display name shown on this message",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
},
|
|
"avatar": {
|
|
"description": "Replace the avatar shown on this message (URL to image file)",
|
|
"type": "string",
|
|
"maxLength": 128,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"DataMessageSend": {
|
|
"type": "object",
|
|
"required": [
|
|
"content"
|
|
],
|
|
"properties": {
|
|
"nonce": {
|
|
"description": "Unique token to prevent duplicate message sending\n\n**This is deprecated and replaced by `Idempotency-Key`!**",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"content": {
|
|
"description": "Message content to send",
|
|
"type": "string",
|
|
"maxLength": 2000,
|
|
"minLength": 0
|
|
},
|
|
"attachments": {
|
|
"description": "Attachments to include in message",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"maxItems": 128,
|
|
"minItems": 1,
|
|
"nullable": true
|
|
},
|
|
"replies": {
|
|
"description": "Messages to reply to",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Reply"
|
|
},
|
|
"nullable": true
|
|
},
|
|
"embeds": {
|
|
"description": "Embeds to include in message",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/SendableEmbed"
|
|
},
|
|
"maxItems": 10,
|
|
"minItems": 1,
|
|
"nullable": true
|
|
},
|
|
"masquerade": {
|
|
"description": "Masquerade to apply to this message",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Masquerade"
|
|
}
|
|
],
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"Reply": {
|
|
"title": "Reply",
|
|
"description": "Representation of a message reply before it is sent.",
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"mention"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "Message Id",
|
|
"type": "string"
|
|
},
|
|
"mention": {
|
|
"description": "Whether this reply should mention the message's author",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"SendableEmbed": {
|
|
"description": "Representation of a text embed before it is sent.",
|
|
"type": "object",
|
|
"properties": {
|
|
"icon_url": {
|
|
"type": "string",
|
|
"maxLength": 128,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"maxLength": 100,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"maxLength": 2000,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
},
|
|
"media": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"colour": {
|
|
"type": "string",
|
|
"maxLength": 64,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"BulkMessageResponse": {
|
|
"title": "Bulk Message Response",
|
|
"description": "Response used when multiple messages are fetched",
|
|
"anyOf": [
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Message"
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"messages",
|
|
"users"
|
|
],
|
|
"properties": {
|
|
"messages": {
|
|
"description": "List of messages",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Message"
|
|
}
|
|
},
|
|
"users": {
|
|
"description": "List of users",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
},
|
|
"members": {
|
|
"description": "List of members",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Member"
|
|
},
|
|
"nullable": true
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Member": {
|
|
"description": "Representation of a member of a server on Revolt",
|
|
"type": "object",
|
|
"required": [
|
|
"_id"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"description": "Unique member id",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MemberCompositeKey"
|
|
}
|
|
]
|
|
},
|
|
"nickname": {
|
|
"description": "Member's nickname",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"avatar": {
|
|
"description": "Avatar attachment",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"roles": {
|
|
"description": "Member's roles",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"MemberCompositeKey": {
|
|
"description": "Composite primary key consisting of server and user id",
|
|
"type": "object",
|
|
"required": [
|
|
"server",
|
|
"user"
|
|
],
|
|
"properties": {
|
|
"server": {
|
|
"description": "Server Id",
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"description": "User Id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"MessageSort": {
|
|
"title": "Message Sort",
|
|
"description": "Sort used for retrieving messages",
|
|
"type": "string",
|
|
"enum": [
|
|
"Relevance",
|
|
"Latest",
|
|
"Oldest"
|
|
]
|
|
},
|
|
"OptionsMessageSearch": {
|
|
"title": "Search Parameters",
|
|
"type": "object",
|
|
"required": [
|
|
"query"
|
|
],
|
|
"properties": {
|
|
"query": {
|
|
"description": "Full-text search query\n\nSee [MongoDB documentation](https://docs.mongodb.com/manual/text-search/#-text-operator) for more information.",
|
|
"type": "string",
|
|
"maxLength": 64,
|
|
"minLength": 1
|
|
},
|
|
"limit": {
|
|
"description": "Maximum number of messages to fetch",
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"maximum": 100.0,
|
|
"minimum": 1.0,
|
|
"nullable": true
|
|
},
|
|
"before": {
|
|
"description": "Message id before which messages should be fetched",
|
|
"type": "string",
|
|
"maxLength": 26,
|
|
"minLength": 26,
|
|
"nullable": true
|
|
},
|
|
"after": {
|
|
"description": "Message id after which messages should be fetched",
|
|
"type": "string",
|
|
"maxLength": 26,
|
|
"minLength": 26,
|
|
"nullable": true
|
|
},
|
|
"sort": {
|
|
"description": "Message sort direction\n\nBy default, it will be sorted by relevance.",
|
|
"default": "Relevance",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MessageSort"
|
|
}
|
|
]
|
|
},
|
|
"include_users": {
|
|
"description": "Whether to include user (and member, if server channel) objects",
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"OptionsQueryStale": {
|
|
"title": "Query Parameters",
|
|
"type": "object",
|
|
"required": [
|
|
"ids"
|
|
],
|
|
"properties": {
|
|
"ids": {
|
|
"description": "Array of message IDs",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"maxItems": 150,
|
|
"minItems": 0
|
|
}
|
|
}
|
|
},
|
|
"DataEditMessage": {
|
|
"title": "Message Details",
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"description": "New message content",
|
|
"type": "string",
|
|
"maxLength": 2000,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
},
|
|
"embeds": {
|
|
"description": "Embeds to include in the message",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/SendableEmbed"
|
|
},
|
|
"maxItems": 10,
|
|
"minItems": 0,
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"DataCreateGroup": {
|
|
"title": "Group Data",
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"users"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"description": "Group name",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 1
|
|
},
|
|
"description": {
|
|
"description": "Group description",
|
|
"type": "string",
|
|
"maxLength": 1024,
|
|
"minLength": 0,
|
|
"nullable": true
|
|
},
|
|
"users": {
|
|
"description": "Array of user IDs to add to the group\n\nMust be friends with these users.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"maxItems": 49,
|
|
"minItems": 0
|
|
},
|
|
"nsfw": {
|
|
"description": "Whether this group is age-restricted",
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"CreateVoiceUserResponse": {
|
|
"title": "Voice Server Token Response",
|
|
"type": "object",
|
|
"required": [
|
|
"token"
|
|
],
|
|
"properties": {
|
|
"token": {
|
|
"description": "Token for authenticating with the voice server",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Data": {
|
|
"title": "Permission Value",
|
|
"type": "object",
|
|
"required": [
|
|
"permissions"
|
|
],
|
|
"properties": {
|
|
"permissions": {
|
|
"description": "Allow / deny values to set for this role",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Override"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"Override": {
|
|
"description": "Representation of a single permission override",
|
|
"type": "object",
|
|
"required": [
|
|
"allow",
|
|
"deny"
|
|
],
|
|
"properties": {
|
|
"allow": {
|
|
"description": "Allow bit flags",
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"deny": {
|
|
"description": "Disallow bit flags",
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"rank": {
|
|
"description": "Ranking of this override",
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"DataDefaultChannelPermissions": {
|
|
"title": "Permission Value",
|
|
"anyOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"permissions"
|
|
],
|
|
"properties": {
|
|
"permissions": {
|
|
"description": "Permission values to set for members in a `Group`",
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"permissions"
|
|
],
|
|
"properties": {
|
|
"permissions": {
|
|
"description": "Allow / deny values to set for members in this `TextChannel` or `VoiceChannel`",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Override"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Server": {
|
|
"description": "Representation of a server on Revolt",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"channels",
|
|
"default_permissions",
|
|
"name",
|
|
"owner"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"description": "Unique Id",
|
|
"type": "string"
|
|
},
|
|
"owner": {
|
|
"description": "User id of the owner",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"description": "Name of the server",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"description": "Description for the server",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"channels": {
|
|
"description": "Channels within this server",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"categories": {
|
|
"description": "Categories for this server",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Category"
|
|
},
|
|
"nullable": true
|
|
},
|
|
"system_messages": {
|
|
"description": "Configuration for sending system event messages",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SystemMessageChannels"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"roles": {
|
|
"description": "Roles for this server",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/components/schemas/Role"
|
|
}
|
|
},
|
|
"default_permissions": {
|
|
"description": "Default set of server and channel permissions",
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"icon": {
|
|
"description": "Icon attachment",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"banner": {
|
|
"description": "Banner attachment",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"flags": {
|
|
"description": "Enum of server flags",
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"nullable": true
|
|
},
|
|
"nsfw": {
|
|
"description": "Whether this server is flagged as not safe for work",
|
|
"type": "boolean"
|
|
},
|
|
"analytics": {
|
|
"description": "Whether to enable analytics",
|
|
"type": "boolean"
|
|
},
|
|
"discoverable": {
|
|
"description": "Whether this server should be publicly discoverable",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"Category": {
|
|
"type": "object",
|
|
"required": [
|
|
"channels",
|
|
"id",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 1
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 1
|
|
},
|
|
"channels": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"SystemMessageChannels": {
|
|
"type": "object",
|
|
"properties": {
|
|
"user_joined": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"user_left": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"user_kicked": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"user_banned": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"Role": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"permissions"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"permissions": {
|
|
"$ref": "#/components/schemas/OverrideField"
|
|
},
|
|
"colour": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"hoist": {
|
|
"type": "boolean"
|
|
},
|
|
"rank": {
|
|
"default": 0,
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
"DataCreateServer": {
|
|
"title": "Server Data",
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"description": "Server name",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 1
|
|
},
|
|
"description": {
|
|
"description": "Server description",
|
|
"type": "string",
|
|
"maxLength": 1024,
|
|
"minLength": 0,
|
|
"nullable": true
|
|
},
|
|
"nsfw": {
|
|
"description": "Whether this server is age-restricted",
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"DataEditServer": {
|
|
"title": "Server Data",
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "Server name",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
},
|
|
"description": {
|
|
"description": "Server description",
|
|
"type": "string",
|
|
"maxLength": 1024,
|
|
"minLength": 0,
|
|
"nullable": true
|
|
},
|
|
"icon": {
|
|
"description": "Attachment Id for icon",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"banner": {
|
|
"description": "Attachment Id for banner",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"categories": {
|
|
"description": "Category structure for server",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Category"
|
|
},
|
|
"nullable": true
|
|
},
|
|
"system_messages": {
|
|
"description": "System message configuration",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SystemMessageChannels"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"analytics": {
|
|
"description": "Whether analytics should be collected for this server\n\nMust be enabled in order to show up on [Revolt Discover](https://rvlt.gg).",
|
|
"type": "boolean",
|
|
"nullable": true
|
|
},
|
|
"remove": {
|
|
"description": "Fields to remove from server object",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/FieldsServer"
|
|
},
|
|
"minItems": 1,
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"FieldsServer": {
|
|
"description": "Optional fields on server object",
|
|
"type": "string",
|
|
"enum": [
|
|
"Description",
|
|
"Categories",
|
|
"SystemMessages",
|
|
"Icon",
|
|
"Banner"
|
|
]
|
|
},
|
|
"DataCreateChannel": {
|
|
"title": "Channel Data",
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"description": "Channel type",
|
|
"default": "Text",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ChannelType"
|
|
}
|
|
]
|
|
},
|
|
"name": {
|
|
"description": "Channel name",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 1
|
|
},
|
|
"description": {
|
|
"description": "Channel description",
|
|
"type": "string",
|
|
"maxLength": 1024,
|
|
"minLength": 0,
|
|
"nullable": true
|
|
},
|
|
"nsfw": {
|
|
"description": "Whether this channel is age restricted",
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"ChannelType": {
|
|
"title": "Channel Type",
|
|
"type": "string",
|
|
"enum": [
|
|
"Text",
|
|
"Voice"
|
|
]
|
|
},
|
|
"AllMemberResponse": {
|
|
"title": "Member List",
|
|
"description": "Both lists are sorted by ID.",
|
|
"type": "object",
|
|
"required": [
|
|
"members",
|
|
"users"
|
|
],
|
|
"properties": {
|
|
"members": {
|
|
"description": "List of members",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Member"
|
|
}
|
|
},
|
|
"users": {
|
|
"description": "List of users",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"DataMemberEdit": {
|
|
"title": "Member Data",
|
|
"type": "object",
|
|
"properties": {
|
|
"nickname": {
|
|
"description": "Member nickname",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
},
|
|
"avatar": {
|
|
"description": "Attachment Id to set for avatar",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"roles": {
|
|
"description": "Array of role ids",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"nullable": true
|
|
},
|
|
"remove": {
|
|
"description": "Fields to remove from channel object",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/FieldsMember"
|
|
},
|
|
"minItems": 1,
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"FieldsMember": {
|
|
"description": "Optional fields on server member object",
|
|
"type": "string",
|
|
"enum": [
|
|
"Nickname",
|
|
"Avatar",
|
|
"Roles"
|
|
]
|
|
},
|
|
"ServerBan": {
|
|
"description": "Representation of a server ban on Revolt",
|
|
"type": "object",
|
|
"required": [
|
|
"_id"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"description": "Unique member id",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MemberCompositeKey"
|
|
}
|
|
]
|
|
},
|
|
"reason": {
|
|
"description": "Reason for ban creation",
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"DataBanCreate": {
|
|
"title": "Ban Information",
|
|
"type": "object",
|
|
"properties": {
|
|
"reason": {
|
|
"description": "Ban reason",
|
|
"type": "string",
|
|
"maxLength": 1024,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"BanListResult": {
|
|
"title": "Ban List Result",
|
|
"type": "object",
|
|
"required": [
|
|
"bans",
|
|
"users"
|
|
],
|
|
"properties": {
|
|
"users": {
|
|
"description": "Users objects",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/BannedUser"
|
|
}
|
|
},
|
|
"bans": {
|
|
"description": "Ban objects",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ServerBan"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"BannedUser": {
|
|
"title": "Banned User",
|
|
"description": "Just enoguh user information to list bans.",
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"username"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"description": "Id of the banned user",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"description": "Username of the banned user",
|
|
"type": "string"
|
|
},
|
|
"avatar": {
|
|
"description": "Avatar of the banned user",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"NewRoleResponse": {
|
|
"title": "New Role Response",
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"role"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "Id of the role",
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"description": "New role",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Role"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"DataCreateRole": {
|
|
"title": "Role Data",
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"description": "Role name",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 1
|
|
},
|
|
"rank": {
|
|
"description": "Ranking position\n\nSmaller values take priority.",
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"DataEditRole": {
|
|
"title": "Role Data",
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "Role name",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
},
|
|
"colour": {
|
|
"description": "Role colour",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 1,
|
|
"nullable": true
|
|
},
|
|
"hoist": {
|
|
"description": "Whether this role should be displayed separately",
|
|
"type": "boolean",
|
|
"nullable": true
|
|
},
|
|
"rank": {
|
|
"description": "Ranking position\n\nSmaller values take priority.",
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"nullable": true
|
|
},
|
|
"remove": {
|
|
"description": "Fields to remove from role object",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/FieldsRole"
|
|
},
|
|
"minItems": 1,
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"FieldsRole": {
|
|
"description": "Optional fields on server object",
|
|
"type": "string",
|
|
"enum": [
|
|
"Colour"
|
|
]
|
|
},
|
|
"DataSetServerRolePermission": {
|
|
"title": "Permission Value",
|
|
"type": "object",
|
|
"required": [
|
|
"permissions"
|
|
],
|
|
"properties": {
|
|
"permissions": {
|
|
"description": "Allow / deny values for the role in this server.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Override"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"DataSetServerDefaultPermission": {
|
|
"title": "Permission Value",
|
|
"type": "object",
|
|
"required": [
|
|
"permissions"
|
|
],
|
|
"properties": {
|
|
"permissions": {
|
|
"description": "Default member permission value",
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
}
|
|
},
|
|
"InviteResponse": {
|
|
"title": "Invite",
|
|
"oneOf": [
|
|
{
|
|
"description": "Server channel invite",
|
|
"type": "object",
|
|
"required": [
|
|
"channel_id",
|
|
"channel_name",
|
|
"member_count",
|
|
"server_id",
|
|
"server_name",
|
|
"type",
|
|
"user_name"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Server"
|
|
]
|
|
},
|
|
"server_id": {
|
|
"description": "Id of the server",
|
|
"type": "string"
|
|
},
|
|
"server_name": {
|
|
"description": "Name of the server",
|
|
"type": "string"
|
|
},
|
|
"server_icon": {
|
|
"description": "Attachment for server icon",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"server_banner": {
|
|
"description": "Attachment for server banner",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"channel_id": {
|
|
"description": "Id of server channel",
|
|
"type": "string"
|
|
},
|
|
"channel_name": {
|
|
"description": "Name of server channel",
|
|
"type": "string"
|
|
},
|
|
"channel_description": {
|
|
"description": "Description of server channel",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"user_name": {
|
|
"description": "Name of user who created the invite",
|
|
"type": "string"
|
|
},
|
|
"user_avatar": {
|
|
"description": "Avatar of the user who created the invite",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"member_count": {
|
|
"description": "Number of members in this server",
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"description": "Group channel invite",
|
|
"type": "object",
|
|
"required": [
|
|
"channel_id",
|
|
"channel_name",
|
|
"type",
|
|
"user_name"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Group"
|
|
]
|
|
},
|
|
"channel_id": {
|
|
"description": "Id of group channel",
|
|
"type": "string"
|
|
},
|
|
"channel_name": {
|
|
"description": "Name of group channel",
|
|
"type": "string"
|
|
},
|
|
"channel_description": {
|
|
"description": "Description of group channel",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"user_name": {
|
|
"description": "Name of user who created the invite",
|
|
"type": "string"
|
|
},
|
|
"user_avatar": {
|
|
"description": "Avatar of the user who created the invite",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
],
|
|
"nullable": true
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"InviteJoinResponse": {
|
|
"title": "Join Response",
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"channel",
|
|
"server",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Server"
|
|
]
|
|
},
|
|
"channel": {
|
|
"description": "Channel we are joining",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Channel"
|
|
}
|
|
]
|
|
},
|
|
"server": {
|
|
"description": "Server we are joining",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Server"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"DataCreateAccount": {
|
|
"title": "Account Data",
|
|
"type": "object",
|
|
"required": [
|
|
"email",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"description": "Valid email address",
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"description": "Password",
|
|
"type": "string"
|
|
},
|
|
"invite": {
|
|
"description": "Invite code",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"captcha": {
|
|
"description": "Captcha verification code",
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"DataResendVerification": {
|
|
"title": "Resend Information",
|
|
"type": "object",
|
|
"required": [
|
|
"email"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"description": "Email associated with the account",
|
|
"type": "string"
|
|
},
|
|
"captcha": {
|
|
"description": "Captcha verification code",
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"AccountInfo": {
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"email"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"DataChangePassword": {
|
|
"title": "Change Data",
|
|
"type": "object",
|
|
"required": [
|
|
"current_password",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"password": {
|
|
"description": "New password",
|
|
"type": "string"
|
|
},
|
|
"current_password": {
|
|
"description": "Current password",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"DataChangeEmail": {
|
|
"title": "Change Data",
|
|
"type": "object",
|
|
"required": [
|
|
"current_password",
|
|
"email"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"description": "Valid email address",
|
|
"type": "string"
|
|
},
|
|
"current_password": {
|
|
"description": "Current password",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"DataPasswordReset": {
|
|
"title": "Password Reset",
|
|
"type": "object",
|
|
"required": [
|
|
"password",
|
|
"token"
|
|
],
|
|
"properties": {
|
|
"token": {
|
|
"description": "Reset token",
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"description": "New password",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"DataSendPasswordReset": {
|
|
"title": "Reset Information",
|
|
"type": "object",
|
|
"required": [
|
|
"email"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"description": "Email associated with the account",
|
|
"type": "string"
|
|
},
|
|
"captcha": {
|
|
"description": "Captcha verification code",
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"ResponseLogin": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"result",
|
|
"token",
|
|
"user_id"
|
|
],
|
|
"properties": {
|
|
"result": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Success"
|
|
]
|
|
},
|
|
"_id": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"user_id": {
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"subscription": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/WebPushSubscription"
|
|
}
|
|
],
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"result"
|
|
],
|
|
"properties": {
|
|
"result": {
|
|
"type": "string",
|
|
"enum": [
|
|
"EmailOTP"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"allowed_methods",
|
|
"result",
|
|
"ticket"
|
|
],
|
|
"properties": {
|
|
"result": {
|
|
"type": "string",
|
|
"enum": [
|
|
"MFA"
|
|
]
|
|
},
|
|
"ticket": {
|
|
"type": "string"
|
|
},
|
|
"allowed_methods": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"WebPushSubscription": {
|
|
"type": "object",
|
|
"required": [
|
|
"auth",
|
|
"endpoint",
|
|
"p256dh"
|
|
],
|
|
"properties": {
|
|
"endpoint": {
|
|
"type": "string"
|
|
},
|
|
"p256dh": {
|
|
"type": "string"
|
|
},
|
|
"auth": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"DataLogin": {
|
|
"title": "Login Data",
|
|
"type": "object",
|
|
"required": [
|
|
"email"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"description": "Email",
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"description": "Password",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"challenge": {
|
|
"description": "UN-USED: MFA challenge",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"friendly_name": {
|
|
"description": "Friendly name used for the session",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"captcha": {
|
|
"description": "Captcha verification code",
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"SessionInfo": {
|
|
"type": "object",
|
|
"required": [
|
|
"_id",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Session": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"token",
|
|
"user_id"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"user_id": {
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"subscription": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/WebPushSubscription"
|
|
}
|
|
],
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"DataEditSession": {
|
|
"title": "Edit Data",
|
|
"type": "object",
|
|
"required": [
|
|
"friendly_name"
|
|
],
|
|
"properties": {
|
|
"friendly_name": {
|
|
"description": "Session friendly name",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"DataHello": {
|
|
"title": "Onboarding Status",
|
|
"type": "object",
|
|
"required": [
|
|
"onboarding"
|
|
],
|
|
"properties": {
|
|
"onboarding": {
|
|
"description": "Whether onboarding is required",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"DataOnboard": {
|
|
"title": "New User Data",
|
|
"type": "object",
|
|
"required": [
|
|
"username"
|
|
],
|
|
"properties": {
|
|
"username": {
|
|
"description": "New username which will be used to identify the user on the platform",
|
|
"type": "string",
|
|
"maxLength": 32,
|
|
"minLength": 2,
|
|
"pattern": "^[a-zA-Z0-9_.]+$"
|
|
}
|
|
}
|
|
},
|
|
"OptionsFetchSettings": {
|
|
"title": "Fetch Options",
|
|
"type": "object",
|
|
"required": [
|
|
"keys"
|
|
],
|
|
"properties": {
|
|
"keys": {
|
|
"description": "Keys to fetch",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ChannelUnread": {
|
|
"description": "Representation of the state of a channel from the perspective of a user",
|
|
"type": "object",
|
|
"required": [
|
|
"_id"
|
|
],
|
|
"properties": {
|
|
"_id": {
|
|
"description": "Composite key pointing to a user's view of a channel",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ChannelCompositeKey"
|
|
}
|
|
]
|
|
},
|
|
"last_id": {
|
|
"description": "Id of the last message read in this channel by a user",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"mentions": {
|
|
"description": "Array of message ids that mention the user",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"ChannelCompositeKey": {
|
|
"description": "Composite primary key consisting of channel and user id",
|
|
"type": "object",
|
|
"required": [
|
|
"channel",
|
|
"user"
|
|
],
|
|
"properties": {
|
|
"channel": {
|
|
"description": "Channel Id",
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"description": "User Id",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securitySchemes": {
|
|
"Api Key": {
|
|
"description": "Session Token",
|
|
"type": "apiKey",
|
|
"name": "x-session-token",
|
|
"in": "header"
|
|
}
|
|
}
|
|
},
|
|
"externalDocs": {
|
|
"description": "Revolt Developer Documentation",
|
|
"url": "https://developers.revolt.chat"
|
|
},
|
|
"x-logo": {
|
|
"url": "https://revolt.chat/header.png",
|
|
"altText": "Revolt Header"
|
|
},
|
|
"x-tagGroups": [
|
|
{
|
|
"name": "Revolt",
|
|
"tags": [
|
|
"Core"
|
|
]
|
|
},
|
|
{
|
|
"name": "Users",
|
|
"tags": [
|
|
"User Information",
|
|
"Direct Messaging",
|
|
"Relationships"
|
|
]
|
|
},
|
|
{
|
|
"name": "Bots",
|
|
"tags": [
|
|
"Bots"
|
|
]
|
|
},
|
|
{
|
|
"name": "Channels",
|
|
"tags": [
|
|
"Channel Information",
|
|
"Channel Invites",
|
|
"Channel Permissions",
|
|
"Messaging",
|
|
"Groups",
|
|
"Voice"
|
|
]
|
|
},
|
|
{
|
|
"name": "Servers",
|
|
"tags": [
|
|
"Server Information",
|
|
"Server Members",
|
|
"Server Permissions"
|
|
]
|
|
},
|
|
{
|
|
"name": "Invites",
|
|
"tags": [
|
|
"Invites"
|
|
]
|
|
},
|
|
{
|
|
"name": "Authentication",
|
|
"tags": [
|
|
"Account",
|
|
"Session",
|
|
"Onboarding"
|
|
]
|
|
},
|
|
{
|
|
"name": "Miscellaneous",
|
|
"tags": [
|
|
"Sync",
|
|
"Web Push"
|
|
]
|
|
}
|
|
]
|
|
} |