From c1264c1776a1870ccab49675cf105016b6e674d0 Mon Sep 17 00:00:00 2001 From: Stoat CI Date: Tue, 31 Mar 2026 22:33:53 +0000 Subject: [PATCH] chore: generate OpenAPI specification --- OpenAPI.json | 375 +++++++++++++++++++++++++++++---------------------- 1 file changed, 214 insertions(+), 161 deletions(-) diff --git a/OpenAPI.json b/OpenAPI.json index 03747ae..e016e1b 100644 --- a/OpenAPI.json +++ b/OpenAPI.json @@ -13,7 +13,7 @@ "name": "AGPLv3", "url": "https://github.com/stoatchat/stoatchat/blob/main/crates/delta/LICENSE" }, - "version": "0.11.5" + "version": "0.12.0" }, "servers": [ { @@ -884,7 +884,7 @@ ] } }, - "/bots/{bot}": { + "/bots/{bot_id}": { "get": { "tags": [ "Bots" @@ -894,7 +894,7 @@ "operationId": "fetch_fetch_bot", "parameters": [ { - "name": "bot", + "name": "bot_id", "in": "path", "required": true, "schema": { @@ -929,46 +929,7 @@ "Session Token": [] } ] - } - }, - "/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": [ - { - "Session Token": [] - } - ] - } - }, - "/bots/{target}": { + }, "delete": { "tags": [ "Bots" @@ -978,7 +939,7 @@ "operationId": "delete_delete_bot", "parameters": [ { - "name": "target", + "name": "bot_id", "in": "path", "required": true, "schema": { @@ -1016,7 +977,7 @@ "operationId": "edit_edit_bot", "parameters": [ { - "name": "target", + "name": "bot_id", "in": "path", "required": true, "schema": { @@ -1063,6 +1024,43 @@ ] } }, + "/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": [ + { + "Session Token": [] + } + ] + } + }, "/channels/{target}/ack/{message}": { "put": { "tags": [ @@ -1995,9 +1993,7 @@ "Session Token": [] } ] - } - }, - "/channels/{target}/recipients/{member}": { + }, "delete": { "tags": [ "Groups" @@ -2007,7 +2003,7 @@ "operationId": "group_remove_member_remove_member", "parameters": [ { - "name": "target", + "name": "group_id", "in": "path", "required": true, "schema": { @@ -2015,7 +2011,7 @@ } }, { - "name": "member", + "name": "member_id", "in": "path", "required": true, "schema": { @@ -2450,63 +2446,6 @@ ] } }, - "/channels/{target}/webhooks": { - "post": { - "tags": [ - "Webhooks" - ], - "summary": "Creates a webhook", - "description": "Creates a webhook which 3rd party platforms can use to send messages", - "operationId": "webhook_create_create_webhook", - "parameters": [ - { - "name": "target", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/Id" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateWebhookBody" - } - } - }, - "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/Webhook" - } - } - } - } - }, - "security": [ - { - "Session Token": [] - } - ] - } - }, "/channels/{channel_id}/webhooks": { "get": { "tags": [ @@ -2555,6 +2494,61 @@ "Session Token": [] } ] + }, + "post": { + "tags": [ + "Webhooks" + ], + "summary": "Creates a webhook", + "description": "Creates a webhook which 3rd party platforms can use to send messages", + "operationId": "webhook_create_create_webhook", + "parameters": [ + { + "name": "channel_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/Id" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWebhookBody" + } + } + }, + "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/Webhook" + } + } + } + } + }, + "security": [ + { + "Session Token": [] + } + ] } }, "/servers/create": { @@ -2760,6 +2754,12 @@ "security": [ { "Session Token": [] + }, + { + "Session Token": [] + }, + { + "Valid MFA Ticket": [] } ] } @@ -2918,7 +2918,7 @@ ] } }, - "/servers/{target}/members/{member}": { + "/servers/{server_id}/members/{member_id}": { "get": { "tags": [ "Server Members" @@ -2928,7 +2928,7 @@ "operationId": "member_fetch_fetch", "parameters": [ { - "name": "target", + "name": "server_id", "in": "path", "required": true, "schema": { @@ -2936,7 +2936,7 @@ } }, { - "name": "member", + "name": "member_id", "in": "path", "required": true, "schema": { @@ -2989,7 +2989,7 @@ "operationId": "member_remove_kick", "parameters": [ { - "name": "target", + "name": "server_id", "in": "path", "required": true, "schema": { @@ -2997,7 +2997,7 @@ } }, { - "name": "member", + "name": "member_id", "in": "path", "required": true, "schema": { @@ -3025,9 +3025,7 @@ "Session Token": [] } ] - } - }, - "/servers/{server}/members/{member}": { + }, "patch": { "tags": [ "Server Members" @@ -3037,7 +3035,7 @@ "operationId": "member_edit_edit", "parameters": [ { - "name": "server", + "name": "server_id", "in": "path", "required": true, "schema": { @@ -3045,7 +3043,7 @@ } }, { - "name": "member", + "name": "member_id", "in": "path", "required": true, "schema": { @@ -3942,7 +3940,47 @@ ] } }, - "/custom/emoji/{id}": { + "/custom/emoji/{emoji_id}": { + "get": { + "tags": [ + "Emojis" + ], + "summary": "Fetch Emoji", + "description": "Fetch an emoji by its id.", + "operationId": "emoji_fetch_fetch_emoji", + "parameters": [ + { + "name": "emoji_id", + "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/Emoji" + } + } + } + } + } + }, "put": { "tags": [ "Emojis" @@ -3952,7 +3990,7 @@ "operationId": "emoji_create_create_emoji", "parameters": [ { - "name": "id", + "name": "emoji_id", "in": "path", "required": true, "schema": { @@ -3997,48 +4035,6 @@ "Session Token": [] } ] - } - }, - "/custom/emoji/{emoji_id}": { - "get": { - "tags": [ - "Emojis" - ], - "summary": "Fetch Emoji", - "description": "Fetch an emoji by its id.", - "operationId": "emoji_fetch_fetch_emoji", - "parameters": [ - { - "name": "emoji_id", - "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/Emoji" - } - } - } - } - } }, "delete": { "tags": [ @@ -6683,6 +6679,26 @@ } } }, + { + "type": "object", + "required": [ + "retry_after", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "InSlowmode" + ] + }, + "retry_after": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + }, { "type": "object", "required": [ @@ -7607,6 +7623,15 @@ "format": "uint", "minimum": 0.0 }, + "thumbhash": { + "type": "array", + "items": { + "type": "integer", + "format": "uint8", + "minimum": 0.0 + }, + "nullable": true + }, "animated": { "type": "boolean" } @@ -8179,6 +8204,13 @@ } ], "nullable": true + }, + "slowmode": { + "description": "The channel's slowmode delay in seconds", + "type": "integer", + "format": "uint64", + "minimum": 0.0, + "nullable": true } } } @@ -8593,6 +8625,14 @@ ], "nullable": true }, + "slowmode": { + "description": "The channel's slow mode delay in seconds, up to 6 hours", + "type": "integer", + "format": "uint64", + "maximum": 21600.0, + "minimum": 0.0, + "nullable": true + }, "remove": { "description": "Fields to remove from channel", "default": [], @@ -10763,6 +10803,11 @@ "type": "boolean", "nullable": true }, + "owner": { + "description": "User id of the new owner", + "type": "string", + "nullable": true + }, "remove": { "description": "Fields to remove from server object", "default": [], @@ -11026,6 +11071,14 @@ "maxLength": 1024, "minLength": 0, "nullable": true + }, + "delete_message_seconds": { + "description": "Messages to delete in seconds", + "type": "integer", + "format": "int64", + "maximum": 604800.0, + "minimum": 0.0, + "nullable": true } } },