{ "openapi": "3.1.0", "info": { "title": "Api", "version": "0.42.3" }, "paths": { "/users/search": { "get": { "tags": [ "users" ], "operationId": "users.searchUsers", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/User" } } } } }, "400": { "description": "InvalidUserSearchRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidUserSearchRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/users/by-username": { "get": { "tags": [ "users" ], "operationId": "users.lookupUsersByUsername", "parameters": [ { "name": "usernames", "in": "query", "schema": { "type": "string" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/User" } } } } }, "400": { "description": "InvalidUsernameLookupRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidUsernameLookupRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/users/contacts": { "get": { "tags": [ "users" ], "operationId": "users.listContacts", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/User" } } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/users/{id}": { "get": { "tags": [ "users" ], "operationId": "users.getUser", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "UserProfile", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserProfile" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } }, "delete": { "tags": [ "users" ], "operationId": "users.deleteUser", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "204": { "description": "" }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/users/{id}/posts": { "get": { "tags": [ "users" ], "operationId": "users.listUserPosts", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "cursor", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "UserPostsPage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPostsPage" } } } }, "400": { "description": "InvalidPostsRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidPostsRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/users/register": { "post": { "tags": [ "users" ], "operationId": "users.register", "parameters": [], "security": [], "responses": { "201": { "description": "User", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "409": { "description": "UsernameTaken", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsernameTakenEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterBody" } } }, "required": true } } }, "/users/login": { "post": { "tags": [ "users" ], "operationId": "users.login", "parameters": [], "security": [], "responses": { "200": { "description": "LoginResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResponse" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "InvalidCredentials", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidCredentialsEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginBody" } } }, "required": true } } }, "/users/refresh": { "post": { "tags": [ "users" ], "operationId": "users.refresh", "parameters": [], "security": [], "responses": { "200": { "description": "RefreshResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefreshResponse" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "InvalidCredentials", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidCredentialsEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefreshBody" } } }, "required": true } } }, "/users/logout": { "post": { "tags": [ "users" ], "operationId": "users.logout", "parameters": [], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogoutBody" } } }, "required": true } } }, "/users/me/password": { "post": { "tags": [ "users" ], "operationId": "users.changePassword", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "RefreshResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefreshResponse" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "InvalidCredentials | Unauthorized", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidCredentialsEncoded" }, { "$ref": "#/components/schemas/UnauthorizedEncoded" } ] } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordBody" } } }, "required": true } } }, "/users/me": { "put": { "tags": [ "users" ], "operationId": "users.updateProfile", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "UserProfile", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserProfile" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProfileBody" } } }, "required": true } }, "delete": { "tags": [ "users" ], "operationId": "users.deleteAccount", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "204": { "description": "" }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "InvalidCredentials | Unauthorized", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidCredentialsEncoded" }, { "$ref": "#/components/schemas/UnauthorizedEncoded" } ] } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteAccountBody" } } }, "required": true } } }, "/users/me/avatar": { "post": { "tags": [ "users" ], "operationId": "users.uploadAvatar", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } }, "400": { "description": "InvalidAvatarUpload | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidAvatarUploadEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "413": { "description": "AvatarTooLarge", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AvatarTooLargeEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary" }, "x": { "type": "string" }, "y": { "type": "string" }, "size": { "type": "string" } }, "required": [ "file", "x", "y", "size" ], "additionalProperties": false } } }, "required": true } } }, "/users/{id}/role": { "patch": { "tags": [ "users" ], "operationId": "users.updateUserRole", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserRoleBody" } } }, "required": true } } }, "/users/me/status": { "put": { "tags": [ "users" ], "operationId": "users.updateStatus", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "User", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStatusBody" } } }, "required": true } } }, "/users/me/blocks": { "get": { "tags": [ "users" ], "operationId": "users.listBlocks", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BlockedUser" } } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/users/{id}/block": { "put": { "tags": [ "users" ], "operationId": "users.setBlock", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "BlockedUser", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BlockedUser" } } } }, "400": { "description": "InvalidBlockRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidBlockRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BlockUserBody" } } }, "required": true } }, "delete": { "tags": [ "users" ], "operationId": "users.removeBlock", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "204": { "description": "" }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/posts/{id}": { "get": { "tags": [ "posts" ], "operationId": "posts.getPost", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Post", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Post" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } }, "put": { "tags": [ "posts" ], "operationId": "posts.updatePost", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Post", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Post" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "409": { "description": "AttachmentInUse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttachmentInUseEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePostBody" } } }, "required": true } }, "delete": { "tags": [ "posts" ], "operationId": "posts.deletePost", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "204": { "description": "" }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/posts": { "get": { "tags": [ "posts" ], "operationId": "posts.listPosts", "parameters": [ { "name": "cursor", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "PostsPage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PostsPage" } } } }, "400": { "description": "InvalidPostsRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidPostsRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } }, "post": { "tags": [ "posts" ], "operationId": "posts.createPost", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "201": { "description": "Post", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Post" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "409": { "description": "AttachmentInUse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttachmentInUseEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePostBody" } } }, "required": true } } }, "/posts/{id}/reactions": { "post": { "tags": [ "comments" ], "operationId": "comments.addPostReaction", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "ReactionState", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionState" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionBody" } } }, "required": true } }, "delete": { "tags": [ "comments" ], "operationId": "comments.removePostReaction", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "ReactionState", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionState" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionBody" } } }, "required": true } } }, "/posts/{id}/comments": { "get": { "tags": [ "comments" ], "operationId": "comments.listComments", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "cursor", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "CommentsPage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentsPage" } } } }, "400": { "description": "InvalidCommentRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidCommentRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } }, "post": { "tags": [ "comments" ], "operationId": "comments.createComment", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "201": { "description": "Comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Comment" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCommentBody" } } }, "required": true } } }, "/comments/{id}/replies": { "get": { "tags": [ "comments" ], "operationId": "comments.listReplies", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "cursor", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "CommentsPage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentsPage" } } } }, "400": { "description": "InvalidCommentRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidCommentRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } }, "post": { "tags": [ "comments" ], "operationId": "comments.createReply", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "201": { "description": "Comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Comment" } } } }, "400": { "description": "InvalidCommentRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidCommentRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCommentBody" } } }, "required": true } } }, "/comments/{id}": { "get": { "tags": [ "comments" ], "operationId": "comments.getComment", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Comment" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } }, "patch": { "tags": [ "comments" ], "operationId": "comments.updateComment", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Comment" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCommentBody" } } }, "required": true } }, "delete": { "tags": [ "comments" ], "operationId": "comments.deleteComment", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "204": { "description": "" }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } } } }, "/comments/{id}/reactions": { "post": { "tags": [ "comments" ], "operationId": "comments.addCommentReaction", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "ReactionState", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionState" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionBody" } } }, "required": true } }, "delete": { "tags": [ "comments" ], "operationId": "comments.removeCommentReaction", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "ReactionState", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionState" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionBody" } } }, "required": true } } }, "/chats": { "get": { "tags": [ "chats" ], "operationId": "chats.listChats", "parameters": [ { "name": "cursor", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false }, { "name": "unread", "in": "query", "schema": { "type": "string", "enum": [ "true", "false" ] }, "required": false }, { "name": "requests", "in": "query", "schema": { "type": "string", "enum": [ "true", "false" ] }, "required": false }, { "name": "archived", "in": "query", "schema": { "type": "string", "enum": [ "true", "false" ] }, "required": false } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "ChatsPage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatsPage" } } } }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/chats/unread-count": { "get": { "tags": [ "chats" ], "operationId": "chats.getUnreadChatCount", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "UnreadChatCount", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnreadChatCount" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/chats/{id}": { "get": { "tags": [ "chats" ], "operationId": "chats.getChat", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Chat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Chat" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } }, "put": { "tags": [ "chats" ], "operationId": "chats.updateChat", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Chat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Chat" } } } }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateChatBody" } } }, "required": true } }, "delete": { "tags": [ "chats" ], "operationId": "chats.deleteChat", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "204": { "description": "" }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/chats/direct": { "post": { "tags": [ "chats" ], "operationId": "chats.createDirectChat", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Chat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Chat" } } } }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDirectChatBody" } } }, "required": true } } }, "/chats/group": { "post": { "tags": [ "chats" ], "operationId": "chats.createGroupChat", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "201": { "description": "Chat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Chat" } } } }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateGroupChatBody" } } }, "required": true } } }, "/chats/{id}/avatar": { "post": { "tags": [ "chats" ], "operationId": "chats.uploadChatAvatar", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Chat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Chat" } } } }, "400": { "description": "InvalidChatRequest | InvalidAvatarUpload | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/InvalidAvatarUploadEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "413": { "description": "AvatarTooLarge", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AvatarTooLargeEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary" }, "x": { "type": "string" }, "y": { "type": "string" }, "size": { "type": "string" } }, "required": [ "file", "x", "y", "size" ], "additionalProperties": false } } }, "required": true } }, "delete": { "tags": [ "chats" ], "operationId": "chats.deleteChatAvatar", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Chat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Chat" } } } }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/chats/{id}/participants": { "post": { "tags": [ "chats" ], "operationId": "chats.addParticipants", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Chat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Chat" } } } }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddParticipantsBody" } } }, "required": true } } }, "/chats/{id}/participants/{userId}": { "delete": { "tags": [ "chats" ], "operationId": "chats.removeParticipant", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "userId", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Chat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Chat" } } } }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/chats/{id}/accept": { "post": { "tags": [ "chats" ], "operationId": "chats.acceptChatRequest", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Chat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Chat" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/chats/{id}/preferences": { "patch": { "tags": [ "chats" ], "operationId": "chats.updateChatPreferences", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Chat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Chat" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateChatPreferencesBody" } } }, "required": true } } }, "/chats/{id}/leave": { "post": { "tags": [ "chats" ], "operationId": "chats.leaveChat", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "204": { "description": "" }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/chats/{id}/owner": { "post": { "tags": [ "chats" ], "operationId": "chats.transferOwnership", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Chat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Chat" } } } }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransferOwnershipBody" } } }, "required": true } } }, "/chats/{id}/participants/{userId}/role": { "patch": { "tags": [ "chats" ], "operationId": "chats.updateParticipantRole", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "userId", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Chat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Chat" } } } }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateParticipantRoleBody" } } }, "required": true } } }, "/chats/{id}/messages": { "get": { "tags": [ "chats" ], "operationId": "chats.listMessages", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "before", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "after", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "MessagesPage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesPage" } } } }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } }, "post": { "tags": [ "chats" ], "operationId": "chats.createMessage", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "201": { "description": "Message", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "409": { "description": "AttachmentInUse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttachmentInUseEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateMessageBody" } } }, "required": true } } }, "/chats/{id}/messages/{messageId}/forward": { "post": { "tags": [ "chats" ], "operationId": "chats.forwardMessage", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "messageId", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "ForwardMessageResult", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForwardMessageResult" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForwardMessageBody" } } }, "required": true } } }, "/chats/{id}/typing": { "post": { "tags": [ "chats" ], "operationId": "chats.sendTyping", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "204": { "description": "" }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/chats/{id}/read": { "post": { "tags": [ "chats" ], "operationId": "chats.markRead", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Chat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Chat" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarkReadBody" } } }, "required": true } } }, "/chats/{id}/messages/{messageId}": { "put": { "tags": [ "chats" ], "operationId": "chats.updateMessage", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "messageId", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Message", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "409": { "description": "AttachmentInUse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttachmentInUseEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMessageBody" } } }, "required": true } }, "delete": { "tags": [ "chats" ], "operationId": "chats.deleteMessage", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "messageId", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "204": { "description": "" }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/chats/{id}/messages/{messageId}/reactions": { "post": { "tags": [ "chats" ], "operationId": "chats.addMessageReaction", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "messageId", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "ReactionState", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionState" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionBody" } } }, "required": true } }, "delete": { "tags": [ "chats" ], "operationId": "chats.removeMessageReaction", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "messageId", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "ReactionState", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionState" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionBody" } } }, "required": true } } }, "/chats/{id}/pins": { "get": { "tags": [ "chats" ], "operationId": "chats.listPinnedMessages", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Message" } } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } }, "post": { "tags": [ "chats" ], "operationId": "chats.pinMessage", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Message", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PinMessageBody" } } }, "required": true } } }, "/chats/{id}/events": { "get": { "tags": [ "chats" ], "operationId": "chats.listChatEvents", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ChatEvent" } } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/chats/{id}/pins/{messageId}": { "delete": { "tags": [ "chats" ], "operationId": "chats.unpinMessage", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "messageId", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Message", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/chats/{id}/stars": { "get": { "tags": [ "chats" ], "operationId": "chats.listStarredMessages", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Message" } } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/chats/{id}/messages/{messageId}/star": { "post": { "tags": [ "chats" ], "operationId": "chats.starMessage", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "messageId", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Message", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } }, "delete": { "tags": [ "chats" ], "operationId": "chats.unstarMessage", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "messageId", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Message", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/chats/{id}/invites": { "post": { "tags": [ "chats" ], "operationId": "chats.createChatInvite", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "201": { "description": "ChatInvite", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatInvite" } } } }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateChatInviteBody" } } }, "required": true } }, "get": { "tags": [ "chats" ], "operationId": "chats.listChatInvites", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ChatInvite" } } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/chats/{id}/invites/{inviteId}": { "delete": { "tags": [ "chats" ], "operationId": "chats.revokeChatInvite", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true }, { "name": "inviteId", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "204": { "description": "" }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/chats/invites/{code}": { "get": { "tags": [ "chats" ], "operationId": "chats.previewChatInvite", "parameters": [ { "name": "code", "in": "path", "schema": { "type": "string" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "ChatInvitePreview", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatInvitePreview" } } } }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } } } }, "/chats/invites/{code}/join": { "post": { "tags": [ "chats" ], "operationId": "chats.joinChatViaInvite", "parameters": [ { "name": "code", "in": "path", "schema": { "type": "string" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Chat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Chat" } } } }, "400": { "description": "InvalidChatRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidChatRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/search": { "get": { "tags": [ "search" ], "operationId": "search.searchAll", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "limit", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "SearchAllPage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchAllPage" } } } }, "400": { "description": "InvalidSearchRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidSearchRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/search/users": { "get": { "tags": [ "search" ], "operationId": "search.searchUsers", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "cursor", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "UserSearchPage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserSearchPage" } } } }, "400": { "description": "InvalidSearchRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidSearchRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/search/posts": { "get": { "tags": [ "search" ], "operationId": "search.searchPosts", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "cursor", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "PostSearchPage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PostSearchPage" } } } }, "400": { "description": "InvalidSearchRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidSearchRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/search/comments": { "get": { "tags": [ "search" ], "operationId": "search.searchComments", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "cursor", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "CommentSearchPage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentSearchPage" } } } }, "400": { "description": "InvalidSearchRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidSearchRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/search/messages": { "get": { "tags": [ "search" ], "operationId": "search.searchMessages", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "cursor", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false }, { "name": "chatId", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "MessageSearchPage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageSearchPage" } } } }, "400": { "description": "InvalidSearchRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidSearchRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/attachments": { "post": { "tags": [ "attachments" ], "operationId": "attachments.uploadAttachment", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "201": { "description": "Attachment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Attachment" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "413": { "description": "AttachmentTooLarge | AttachmentQuotaExceeded", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/AttachmentTooLargeEncoded" }, { "$ref": "#/components/schemas/AttachmentQuotaExceededEncoded" } ] } } } }, "415": { "description": "UnsupportedAttachmentType", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnsupportedAttachmentTypeEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary" } }, "required": [ "file" ], "additionalProperties": false } } }, "required": true } } }, "/attachments/{id}": { "delete": { "tags": [ "attachments" ], "operationId": "attachments.deleteAttachment", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "204": { "description": "" }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/version": { "get": { "tags": [ "meta" ], "operationId": "meta.getVersion", "parameters": [], "security": [], "responses": { "200": { "description": "VersionResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VersionResponse" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } } } } }, "/realtime/ws-ticket": { "post": { "tags": [ "realtime" ], "operationId": "realtime.createWsTicket", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "201": { "description": "WsTicketResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WsTicketResponse" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/admin/stats": { "get": { "tags": [ "admin" ], "operationId": "admin.getAdminStats", "parameters": [ { "name": "days", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "AdminStats", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminStats" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } } } } }, "/games/{game}/lobbies": { "get": { "tags": [ "games" ], "operationId": "games.listGameLobbies", "parameters": [ { "name": "game", "in": "path", "schema": { "$ref": "#/components/schemas/GameId" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "GameLobbyList", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameLobbyList" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } }, "post": { "tags": [ "games" ], "operationId": "games.createGameLobby", "parameters": [ { "name": "game", "in": "path", "schema": { "$ref": "#/components/schemas/GameId" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "201": { "description": "GameLobby", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameLobby" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/games/{game}/quick-play": { "post": { "tags": [ "games" ], "operationId": "games.quickPlay", "parameters": [ { "name": "game", "in": "path", "schema": { "$ref": "#/components/schemas/GameId" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "GameLobby", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameLobby" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/games/lobbies/{id}": { "get": { "tags": [ "games" ], "operationId": "games.getGameLobby", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "GameLobby", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameLobby" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/games/lobbies/{id}/join": { "post": { "tags": [ "games" ], "operationId": "games.joinGameLobby", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "GameLobby", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameLobby" } } } }, "400": { "description": "InvalidGameRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidGameRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/games/lobbies/{id}/leave": { "post": { "tags": [ "games" ], "operationId": "games.leaveGameLobby", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "204": { "description": "" }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/games/lobbies/{id}/start": { "post": { "tags": [ "games" ], "operationId": "games.startGameLobby", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "GameLobby", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameLobby" } } } }, "400": { "description": "InvalidGameRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidGameRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/games/lobbies/{id}/finish": { "post": { "tags": [ "games" ], "operationId": "games.finishRace", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "GameLobby", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameLobby" } } } }, "400": { "description": "InvalidGameRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidGameRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinishRaceBody" } } }, "required": true } } }, "/games/lobbies/{id}/reflex": { "post": { "tags": [ "games" ], "operationId": "games.finishReflex", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "GameLobby", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameLobby" } } } }, "400": { "description": "InvalidGameRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidGameRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinishReflexBody" } } }, "required": true } } }, "/games/lobbies/{id}/rematch": { "post": { "tags": [ "games" ], "operationId": "games.rematchGameLobby", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "GameLobby", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameLobby" } } } }, "400": { "description": "InvalidGameRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidGameRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } }, "/games/lobbies/{id}/invite": { "post": { "tags": [ "games" ], "operationId": "games.inviteToGameLobby", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "204": { "description": "" }, "400": { "description": "InvalidGameRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidGameRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameInviteBody" } } }, "required": true } } }, "/games/lobbies/{id}/chat": { "get": { "tags": [ "games" ], "operationId": "games.listGameChat", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "GameChat", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameChat" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } }, "post": { "tags": [ "games" ], "operationId": "games.postGameChat", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "201": { "description": "GameChatMessage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameChatMessage" } } } }, "400": { "description": "InvalidGameRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidGameRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } }, "429": { "description": "TooManyRequests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TooManyRequestsEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameChatBody" } } }, "required": true } } }, "/games/drawing/packs": { "get": { "tags": [ "games" ], "operationId": "games.listDrawingPacks", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "DrawingPackList", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DrawingPackList" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/games/lobbies/{id}/settings": { "put": { "tags": [ "games" ], "operationId": "games.updateDrawingSettings", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "GameLobby", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameLobby" } } } }, "400": { "description": "InvalidGameRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidGameRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DrawingSettingsBody" } } }, "required": true } } }, "/games/lobbies/{id}/drawing": { "post": { "tags": [ "games" ], "operationId": "games.submitDrawing", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "GameLobby", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameLobby" } } } }, "400": { "description": "InvalidGameRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidGameRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitDrawingBody" } } }, "required": true } } }, "/games/lobbies/{id}/bluff": { "post": { "tags": [ "games" ], "operationId": "games.submitBluff", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "GameLobby", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameLobby" } } } }, "400": { "description": "InvalidGameRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidGameRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitBluffBody" } } }, "required": true } } }, "/games/lobbies/{id}/vote": { "post": { "tags": [ "games" ], "operationId": "games.submitVote", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "GameLobby", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameLobby" } } } }, "400": { "description": "InvalidGameRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidGameRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitVoteBody" } } }, "required": true } } }, "/games/{game}/leaderboard": { "get": { "tags": [ "games" ], "operationId": "games.getLeaderboard", "parameters": [ { "name": "game", "in": "path", "schema": { "$ref": "#/components/schemas/GameId" }, "required": true }, { "name": "period", "in": "query", "schema": { "$ref": "#/components/schemas/LeaderboardPeriod" }, "required": false } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "Leaderboard", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Leaderboard" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/notifications": { "get": { "tags": [ "notifications" ], "operationId": "notifications.listNotifications", "parameters": [ { "name": "cursor", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "NotificationsPage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationsPage" } } } }, "400": { "description": "InvalidNotificationRequest | HttpApiDecodeError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidNotificationRequestEncoded" }, { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/notifications/unread-count": { "get": { "tags": [ "notifications" ], "operationId": "notifications.getUnreadNotificationCount", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "UnreadNotificationCount", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnreadNotificationCount" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/notifications/preferences": { "get": { "tags": [ "notifications" ], "operationId": "notifications.getNotificationPreferences", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "NotificationPreferences", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationPreferences" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } }, "patch": { "tags": [ "notifications" ], "operationId": "notifications.updateNotificationPreferences", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "NotificationPreferences", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationPreferences" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateNotificationPreferencesBody" } } }, "required": true } } }, "/notifications/read-all": { "post": { "tags": [ "notifications" ], "operationId": "notifications.markAllNotificationsRead", "parameters": [], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "UnreadNotificationCount", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnreadNotificationCount" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } } } } }, "/notifications/{id}/read": { "post": { "tags": [ "notifications" ], "operationId": "notifications.markNotificationRead", "parameters": [ { "name": "id", "in": "path", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": true } ], "security": [ { "bearer": [] } ], "responses": { "200": { "description": "UnreadNotificationCount", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnreadNotificationCount" } } } }, "400": { "description": "HttpApiDecodeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HttpApiDecodeErrorEncoded" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedEncoded" } } } }, "404": { "description": "NotFound", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundEncoded" } } } } } } } }, "components": { "schemas": { "HttpApiDecodeErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "HttpApiDecodeError" ] }, "issues": { "type": "array", "items": { "$ref": "#/components/schemas/Issue" } }, "message": { "type": "string" } }, "required": [ "_tag", "issues", "message" ], "additionalProperties": false }, "Issue": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "Refinement", "Type" ] }, "path": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "number" } ] } }, "message": { "type": "string" } }, "required": [ "_tag", "path", "message" ], "additionalProperties": false }, "UnauthorizedEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "Unauthorized" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "NotFoundEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "NotFound" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "UnreadNotificationCount": { "type": "object", "properties": { "count": { "type": "number" } }, "required": [ "count" ], "additionalProperties": false }, "NotificationPreferences": { "type": "object", "properties": { "comment": { "type": "boolean" }, "reply": { "type": "boolean" }, "reaction": { "type": "boolean" }, "mention": { "type": "boolean" }, "game_invite": { "type": "boolean" }, "game_record": { "type": "boolean" } }, "required": [ "comment", "reply", "reaction", "mention", "game_invite", "game_record" ], "additionalProperties": false }, "UpdateNotificationPreferencesBody": { "type": "object", "properties": { "comment": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "reply": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "reaction": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "mention": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "game_invite": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "game_record": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "additionalProperties": false }, "InvalidNotificationRequestEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "InvalidNotificationRequest" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "NotificationsPage": { "type": "object", "properties": { "notifications": { "type": "array", "items": { "$ref": "#/components/schemas/Notification" } }, "limit": { "type": "number" }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "unreadCount": { "type": "number" } }, "required": [ "notifications", "limit", "nextCursor", "unreadCount" ], "additionalProperties": false }, "Notification": { "type": "object", "properties": { "id": { "type": "number" }, "type": { "$ref": "#/components/schemas/NotificationType" }, "actor": { "$ref": "#/components/schemas/User" }, "postId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "commentId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "emoji": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "game": { "anyOf": [ { "$ref": "#/components/schemas/GameId" }, { "type": "null" } ] }, "lobbyId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "excerpt": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "read": { "type": "boolean" }, "createdAt": { "type": "number" } }, "required": [ "id", "type", "actor", "postId", "commentId", "emoji", "game", "lobbyId", "excerpt", "read", "createdAt" ], "additionalProperties": false }, "GameId": { "type": "string", "enum": [ "typing", "drawing", "reflex" ] }, "User": { "type": "object", "properties": { "id": { "type": "number" }, "username": { "type": "string" }, "displayName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarVariants": { "anyOf": [ { "$ref": "#/components/schemas/AvatarVariants" }, { "type": "null" } ] }, "role": { "$ref": "#/components/schemas/UserRole" }, "statusText": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "statusEmoji": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "statusExpiresAt": { "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": [ "id", "username", "displayName", "avatarUrl", "avatarVariants", "role", "statusText", "statusEmoji", "statusExpiresAt" ], "additionalProperties": false }, "UserRole": { "type": "string", "enum": [ "user", "admin" ] }, "AvatarVariants": { "type": "object", "properties": { "small": { "type": "string" }, "medium": { "type": "string" }, "large": { "type": "string" } }, "required": [ "small", "medium", "large" ], "additionalProperties": false }, "NotificationType": { "type": "string", "enum": [ "comment", "reply", "reaction", "mention", "game_invite", "game_record" ] }, "Leaderboard": { "type": "object", "properties": { "game": { "$ref": "#/components/schemas/GameId" }, "period": { "$ref": "#/components/schemas/LeaderboardPeriod" }, "entries": { "type": "array", "items": { "$ref": "#/components/schemas/LeaderboardEntry" } }, "me": { "anyOf": [ { "$ref": "#/components/schemas/LeaderboardEntry" }, { "type": "null" } ] } }, "required": [ "game", "period", "entries", "me" ], "additionalProperties": false }, "LeaderboardEntry": { "type": "object", "properties": { "rank": { "type": "number" }, "user": { "$ref": "#/components/schemas/User" }, "bestScore": { "type": "number" }, "averageScore": { "type": "number" }, "averageAccuracy": { "type": "number" }, "races": { "type": "number" }, "wins": { "type": "number" } }, "required": [ "rank", "user", "bestScore", "averageScore", "averageAccuracy", "races", "wins" ], "additionalProperties": false }, "LeaderboardPeriod": { "type": "string", "enum": [ "day", "week", "all" ] }, "InvalidGameRequestEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "InvalidGameRequest" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "ForbiddenEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "Forbidden" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "GameLobby": { "type": "object", "properties": { "id": { "type": "number" }, "game": { "$ref": "#/components/schemas/GameId" }, "hostId": { "type": "number" }, "phase": { "$ref": "#/components/schemas/GameLobbyPhase" }, "round": { "type": "number" }, "passage": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "startsAt": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "endsAt": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "serverNow": { "type": "number" }, "minPlayers": { "type": "number" }, "maxPlayers": { "type": "number" }, "players": { "type": "array", "items": { "$ref": "#/components/schemas/GameLobbyPlayer" } }, "drawing": { "anyOf": [ { "$ref": "#/components/schemas/DrawingGame" }, { "type": "null" } ] }, "reflex": { "anyOf": [ { "$ref": "#/components/schemas/ReflexGame" }, { "type": "null" } ] }, "chatOpen": { "type": "boolean" }, "createdAt": { "type": "number" } }, "required": [ "id", "game", "hostId", "phase", "round", "passage", "startsAt", "endsAt", "serverNow", "minPlayers", "maxPlayers", "players", "drawing", "reflex", "chatOpen", "createdAt" ], "additionalProperties": false }, "ReflexGame": { "type": "object", "properties": { "introMs": { "type": "number" }, "rounds": { "type": "array", "items": { "$ref": "#/components/schemas/ReflexRound" } }, "results": { "type": "array", "items": { "$ref": "#/components/schemas/ReflexPlayerResult" } } }, "required": [ "introMs", "rounds", "results" ], "additionalProperties": false }, "ReflexPlayerResult": { "type": "object", "properties": { "userId": { "type": "number" }, "rounds": { "type": "array", "items": { "$ref": "#/components/schemas/ReflexRoundResult" } } }, "required": [ "userId", "rounds" ], "additionalProperties": false }, "ReflexRoundResult": { "type": "object", "properties": { "outcome": { "$ref": "#/components/schemas/ReflexOutcome" }, "reactionMs": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "points": { "type": "number" } }, "required": [ "outcome", "reactionMs", "points" ], "additionalProperties": false }, "ReflexOutcome": { "type": "string", "enum": [ "hit", "early", "miss", "wrong" ] }, "ReflexRound": { "type": "object", "properties": { "kind": { "$ref": "#/components/schemas/ReflexKind" }, "armAt": { "type": "number" }, "signalAt": { "type": "number" }, "closeAt": { "type": "number" }, "cues": { "type": "array", "items": { "$ref": "#/components/schemas/ReflexCue" } }, "symbol": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "direction": { "anyOf": [ { "$ref": "#/components/schemas/ReflexDirection" }, { "type": "null" } ] }, "target": { "anyOf": [ { "type": "object", "properties": { "x": { "type": "number" }, "y": { "type": "number" } }, "required": [ "x", "y" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "kind", "armAt", "signalAt", "closeAt", "cues", "symbol", "direction", "target" ], "additionalProperties": false }, "ReflexDirection": { "type": "string", "enum": [ "up", "down", "left", "right" ] }, "ReflexCue": { "type": "object", "properties": { "at": { "type": "number" }, "variant": { "type": "number" } }, "required": [ "at", "variant" ], "additionalProperties": false }, "ReflexKind": { "type": "string", "enum": [ "go", "decoy", "match", "arrow", "target" ] }, "DrawingGame": { "type": "object", "properties": { "packs": { "type": "array", "items": { "type": "string" } }, "rounds": { "type": "number" }, "stage": { "anyOf": [ { "$ref": "#/components/schemas/DrawingStage" }, { "type": "null" } ] }, "myPrompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "participantIds": { "type": "array", "items": { "type": "number" } }, "drawings": { "type": "array", "items": { "$ref": "#/components/schemas/DrawingEntry" } }, "scores": { "type": "array", "items": { "$ref": "#/components/schemas/DrawingScore" } } }, "required": [ "packs", "rounds", "stage", "myPrompt", "participantIds", "drawings", "scores" ], "additionalProperties": false }, "DrawingScore": { "type": "object", "properties": { "userId": { "type": "number" }, "score": { "type": "number" } }, "required": [ "userId", "score" ], "additionalProperties": false }, "DrawingEntry": { "type": "object", "properties": { "id": { "type": "number" }, "turn": { "type": "number" }, "position": { "type": "number" }, "artistId": { "type": "number" }, "submitted": { "type": "boolean" }, "strokes": { "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/DrawingStroke" }, "maxItems": 400 }, { "type": "null" } ] }, "prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "revealed": { "type": "boolean" }, "bluffCount": { "type": "number" }, "voteCount": { "type": "number" }, "myBluff": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "myVote": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "answers": { "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/DrawingAnswer" } }, { "type": "null" } ] } }, "required": [ "id", "turn", "position", "artistId", "submitted", "strokes", "prompt", "revealed", "bluffCount", "voteCount", "myBluff", "myVote", "answers" ], "additionalProperties": false }, "DrawingAnswer": { "type": "object", "properties": { "id": { "type": "number" }, "text": { "type": "string" }, "mine": { "type": "boolean" }, "real": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "authorId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "voterIds": { "anyOf": [ { "type": "array", "items": { "type": "number" } }, { "type": "null" } ] }, "points": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "revealAt": { "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": [ "id", "text", "mine", "real", "authorId", "voterIds", "points", "revealAt" ], "additionalProperties": false }, "DrawingStroke": { "type": "object", "properties": { "color": { "type": "integer", "minimum": 0, "maximum": 9 }, "brush": { "$ref": "#/components/schemas/DrawingBrush" }, "points": { "type": "array", "items": { "type": "integer", "minimum": 0, "maximum": 800 }, "minItems": 2, "maxItems": 12000 } }, "required": [ "color", "brush", "points" ], "additionalProperties": false }, "DrawingBrush": { "type": "string", "enum": [ "thin", "thick" ] }, "DrawingStage": { "type": "object", "properties": { "kind": { "$ref": "#/components/schemas/DrawingStageKind" }, "turn": { "type": "number" }, "drawingId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "startedAt": { "type": "number" }, "endsAt": { "type": "number" } }, "required": [ "kind", "turn", "drawingId", "startedAt", "endsAt" ], "additionalProperties": false }, "DrawingStageKind": { "type": "string", "enum": [ "draw", "bluff", "vote", "reveal" ] }, "GameLobbyPlayer": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" }, "joinedAt": { "type": "number" }, "durationMs": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "accuracy": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "place": { "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": [ "user", "joinedAt", "durationMs", "score", "accuracy", "place" ], "additionalProperties": false }, "GameLobbyPhase": { "type": "string", "enum": [ "waiting", "countdown", "racing", "finished" ] }, "SubmitVoteBody": { "type": "object", "properties": { "answer": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "answer" ], "additionalProperties": false }, "SubmitBluffBody": { "type": "object", "properties": { "text": { "type": "string" } }, "required": [ "text" ], "additionalProperties": false }, "SubmitDrawingBody": { "type": "object", "properties": { "strokes": { "type": "array", "items": { "$ref": "#/components/schemas/DrawingStroke" }, "maxItems": 400 } }, "required": [ "strokes" ], "additionalProperties": false }, "DrawingSettingsBody": { "type": "object", "properties": { "packs": { "type": "array", "items": { "type": "string", "maxLength": 40 }, "minItems": 1, "maxItems": 20 }, "rounds": { "type": "integer", "minimum": 1, "maximum": 3 } }, "required": [ "packs", "rounds" ], "additionalProperties": false }, "DrawingPackList": { "type": "object", "properties": { "packs": { "type": "array", "items": { "$ref": "#/components/schemas/DrawingPack" } } }, "required": [ "packs" ], "additionalProperties": false }, "DrawingPack": { "type": "object", "properties": { "slug": { "type": "string" }, "name": { "type": "string" }, "icon": { "type": "string" }, "description": { "type": "string" }, "samples": { "type": "array", "items": { "type": "string" } }, "promptCount": { "type": "number" } }, "required": [ "slug", "name", "icon", "description", "samples", "promptCount" ], "additionalProperties": false }, "TooManyRequestsEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "TooManyRequests" ] }, "message": { "type": "string" }, "retryAfterSeconds": { "type": "number" } }, "required": [ "_tag", "message", "retryAfterSeconds" ], "additionalProperties": false }, "GameChatMessage": { "type": "object", "properties": { "id": { "type": "number" }, "lobbyId": { "type": "number" }, "user": { "$ref": "#/components/schemas/User" }, "text": { "type": "string" }, "createdAt": { "type": "number" } }, "required": [ "id", "lobbyId", "user", "text", "createdAt" ], "additionalProperties": false }, "GameChatBody": { "type": "object", "properties": { "text": { "type": "string" } }, "required": [ "text" ], "additionalProperties": false }, "GameChat": { "type": "object", "properties": { "messages": { "type": "array", "items": { "$ref": "#/components/schemas/GameChatMessage" } } }, "required": [ "messages" ], "additionalProperties": false }, "GameInviteBody": { "type": "object", "properties": { "userId": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 } }, "required": [ "userId" ], "additionalProperties": false }, "FinishReflexBody": { "type": "object", "properties": { "taps": { "type": "array", "items": { "$ref": "#/components/schemas/ReflexTap" }, "maxItems": 8 } }, "required": [ "taps" ], "additionalProperties": false }, "ReflexTap": { "type": "object", "properties": { "early": { "type": "boolean" }, "reactionMs": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 10000 }, { "type": "null" } ] }, "direction": { "anyOf": [ { "$ref": "#/components/schemas/ReflexDirection" }, { "type": "null" } ] }, "x": { "anyOf": [ { "type": "number", "minimum": 0, "maximum": 1 }, { "type": "null" } ] }, "y": { "anyOf": [ { "type": "number", "minimum": 0, "maximum": 1 }, { "type": "null" } ] } }, "required": [ "early", "reactionMs", "direction", "x", "y" ], "additionalProperties": false }, "FinishRaceBody": { "type": "object", "properties": { "typed": { "type": "string", "maxLength": 2000 }, "errors": { "type": "integer", "minimum": 0, "maximum": 100000 } }, "required": [ "typed", "errors" ], "additionalProperties": false }, "GameLobbyList": { "type": "object", "properties": { "lobbies": { "type": "array", "items": { "$ref": "#/components/schemas/GameLobby" } } }, "required": [ "lobbies" ], "additionalProperties": false }, "AdminStats": { "type": "object", "properties": { "generatedAt": { "type": "number" }, "totals": { "$ref": "#/components/schemas/AdminTotals" }, "activity": { "type": "array", "items": { "$ref": "#/components/schemas/AdminActivityWindow" } }, "timeline": { "type": "array", "items": { "$ref": "#/components/schemas/AdminTimelinePoint" } }, "health": { "$ref": "#/components/schemas/AdminRuntimeHealth" } }, "required": [ "generatedAt", "totals", "activity", "timeline", "health" ], "additionalProperties": false }, "AdminRuntimeHealth": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "ok", "degraded" ] }, "version": { "type": "string" }, "uptimeSeconds": { "type": "number" }, "dependencies": { "type": "array", "items": { "$ref": "#/components/schemas/AdminDependencyHealth" } }, "websocketConnections": { "type": "number" }, "requestsTotal": { "type": "number" }, "serverErrorsTotal": { "type": "number" }, "errorRate": { "type": "number" }, "rateLimitRejectionsTotal": { "type": "number" }, "dbQueryErrorsTotal": { "type": "number" } }, "required": [ "status", "version", "uptimeSeconds", "dependencies", "websocketConnections", "requestsTotal", "serverErrorsTotal", "errorRate", "rateLimitRejectionsTotal", "dbQueryErrorsTotal" ], "additionalProperties": false }, "AdminDependencyHealth": { "type": "object", "properties": { "name": { "type": "string", "enum": [ "database", "pubsub" ] }, "reachable": { "type": "boolean" }, "latencyMs": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "backend": { "type": "string" } }, "required": [ "name", "reachable", "latencyMs", "backend" ], "additionalProperties": false }, "AdminTimelinePoint": { "type": "object", "properties": { "date": { "type": "string" }, "signups": { "type": "number" }, "posts": { "type": "number" }, "comments": { "type": "number" }, "messages": { "type": "number" } }, "required": [ "date", "signups", "posts", "comments", "messages" ], "additionalProperties": false }, "AdminActivityWindow": { "type": "object", "properties": { "window": { "$ref": "#/components/schemas/AdminActivityWindowLabel" }, "activeUsers": { "type": "number" }, "newUsers": { "type": "number" }, "newPosts": { "type": "number" }, "newComments": { "type": "number" }, "newMessages": { "type": "number" }, "newReactions": { "type": "number" } }, "required": [ "window", "activeUsers", "newUsers", "newPosts", "newComments", "newMessages", "newReactions" ], "additionalProperties": false }, "AdminActivityWindowLabel": { "type": "string", "enum": [ "1d", "7d", "30d" ] }, "AdminTotals": { "type": "object", "properties": { "users": { "type": "number" }, "admins": { "type": "number" }, "posts": { "type": "number" }, "comments": { "type": "number" }, "chats": { "type": "number" }, "messages": { "type": "number" }, "reactions": { "type": "number" }, "attachments": { "type": "number" }, "attachmentBytes": { "type": "number" } }, "required": [ "users", "admins", "posts", "comments", "chats", "messages", "reactions", "attachments", "attachmentBytes" ], "additionalProperties": false }, "WsTicketResponse": { "type": "object", "properties": { "ticket": { "type": "string" } }, "required": [ "ticket" ], "additionalProperties": false }, "VersionResponse": { "type": "object", "properties": { "version": { "type": "string" } }, "required": [ "version" ], "additionalProperties": false }, "AttachmentQuotaExceededEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "AttachmentQuotaExceeded" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "AttachmentTooLargeEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "AttachmentTooLarge" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "UnsupportedAttachmentTypeEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "UnsupportedAttachmentType" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "Attachment": { "type": "object", "properties": { "id": { "type": "number" }, "filename": { "type": "string" }, "mimeType": { "type": "string" }, "size": { "type": "number" }, "url": { "type": "string" }, "width": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "height": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "blurhash": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "waveform": { "anyOf": [ { "type": "array", "items": { "type": "number" } }, { "type": "null" } ] }, "durationMs": { "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": [ "id", "filename", "mimeType", "size", "url", "width", "height", "blurhash", "waveform", "durationMs" ], "additionalProperties": false }, "InvalidSearchRequestEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "InvalidSearchRequest" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "MessageSearchPage": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/MessageSearchResult" } }, "chats": { "type": "array", "items": { "$ref": "#/components/schemas/MessageSearchChat" } }, "limit": { "type": "number" }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "results", "chats", "limit", "nextCursor" ], "additionalProperties": false }, "MessageSearchChat": { "type": "object", "properties": { "id": { "type": "number" }, "type": { "$ref": "#/components/schemas/ChatType" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "participants": { "type": "array", "items": { "$ref": "#/components/schemas/ChatParticipant" } } }, "required": [ "id", "type", "title", "participants" ], "additionalProperties": false }, "ChatParticipant": { "type": "object", "properties": { "userId": { "type": "number" }, "username": { "type": "string" }, "displayName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarVariants": { "anyOf": [ { "$ref": "#/components/schemas/AvatarVariants" }, { "type": "null" } ] }, "role": { "$ref": "#/components/schemas/ChatRole" }, "statusText": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "statusEmoji": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "statusExpiresAt": { "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": [ "userId", "username", "displayName", "avatarUrl", "avatarVariants", "role", "statusText", "statusEmoji", "statusExpiresAt" ], "additionalProperties": false }, "ChatRole": { "type": "string", "enum": [ "owner", "admin", "member" ] }, "ChatType": { "type": "string", "enum": [ "direct", "group" ] }, "MessageSearchResult": { "type": "object", "properties": { "id": { "type": "number" }, "chatId": { "type": "number" }, "sender": { "$ref": "#/components/schemas/User" }, "createdAt": { "type": "number" }, "snippet": { "type": "array", "items": { "$ref": "#/components/schemas/SearchSnippetSegment" } } }, "required": [ "id", "chatId", "sender", "createdAt", "snippet" ], "additionalProperties": false }, "SearchSnippetSegment": { "type": "object", "properties": { "text": { "type": "string" }, "match": { "type": "boolean" } }, "required": [ "text", "match" ], "additionalProperties": false }, "CommentSearchPage": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/CommentSearchResult" } }, "limit": { "type": "number" }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "results", "limit", "nextCursor" ], "additionalProperties": false }, "CommentSearchResult": { "type": "object", "properties": { "id": { "type": "number" }, "postId": { "type": "number" }, "parentCommentId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "author": { "$ref": "#/components/schemas/User" }, "createdAt": { "type": "number" }, "snippet": { "type": "array", "items": { "$ref": "#/components/schemas/SearchSnippetSegment" } } }, "required": [ "id", "postId", "parentCommentId", "author", "createdAt", "snippet" ], "additionalProperties": false }, "PostSearchPage": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/PostSearchResult" } }, "limit": { "type": "number" }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "results", "limit", "nextCursor" ], "additionalProperties": false }, "PostSearchResult": { "type": "object", "properties": { "id": { "type": "number" }, "author": { "$ref": "#/components/schemas/User" }, "createdAt": { "type": "number" }, "snippet": { "type": "array", "items": { "$ref": "#/components/schemas/SearchSnippetSegment" } } }, "required": [ "id", "author", "createdAt", "snippet" ], "additionalProperties": false }, "UserSearchPage": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/UserSearchResult" } }, "limit": { "type": "number" }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "results", "limit", "nextCursor" ], "additionalProperties": false }, "UserSearchResult": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" }, "snippet": { "type": "array", "items": { "$ref": "#/components/schemas/SearchSnippetSegment" } } }, "required": [ "user", "snippet" ], "additionalProperties": false }, "SearchAllPage": { "type": "object", "properties": { "users": { "$ref": "#/components/schemas/UserSearchPage" }, "posts": { "$ref": "#/components/schemas/PostSearchPage" }, "comments": { "$ref": "#/components/schemas/CommentSearchPage" }, "messages": { "$ref": "#/components/schemas/MessageSearchPage" } }, "required": [ "users", "posts", "comments", "messages" ], "additionalProperties": false }, "InvalidChatRequestEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "InvalidChatRequest" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "Chat": { "type": "object", "properties": { "id": { "type": "number" }, "type": { "$ref": "#/components/schemas/ChatType" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdBy": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" }, "version": { "type": "number" }, "participants": { "type": "array", "items": { "$ref": "#/components/schemas/ChatParticipant" } }, "lastMessage": { "anyOf": [ { "$ref": "#/components/schemas/Message" }, { "type": "null" } ] }, "unreadCount": { "type": "number" }, "avatarVariants": { "anyOf": [ { "$ref": "#/components/schemas/AvatarVariants" }, { "type": "null" } ] }, "messageRequest": { "anyOf": [ { "$ref": "#/components/schemas/MessageRequest" }, { "type": "null" } ] }, "mutedUntil": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "archived": { "type": "boolean" }, "pinned": { "type": "boolean" } }, "required": [ "id", "type", "title", "createdBy", "createdAt", "updatedAt", "version", "participants", "lastMessage", "unreadCount", "avatarVariants", "messageRequest", "mutedUntil", "archived", "pinned" ], "additionalProperties": false }, "MessageRequest": { "type": "object", "properties": { "addedBy": { "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": [ "addedBy" ], "additionalProperties": false }, "Message": { "type": "object", "properties": { "id": { "type": "number" }, "chatId": { "type": "number" }, "senderId": { "type": "number" }, "body": { "type": "string" }, "attachment": { "anyOf": [ { "$ref": "#/components/schemas/Attachment" }, { "type": "null" } ] }, "parentMessage": { "anyOf": [ { "$ref": "#/components/schemas/ParentMessagePreview" }, { "type": "null" } ] }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" }, "readByUserIds": { "type": "array", "items": { "type": "number" } }, "reactions": { "type": "array", "items": { "$ref": "#/components/schemas/ReactionSummary" } }, "pinned": { "type": "boolean" }, "starred": { "type": "boolean" }, "forwardedFrom": { "anyOf": [ { "$ref": "#/components/schemas/ForwardedFrom" }, { "type": "null" } ] }, "clientId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "chatId", "senderId", "body", "attachment", "parentMessage", "createdAt", "updatedAt", "readByUserIds", "reactions", "pinned", "starred", "forwardedFrom" ], "additionalProperties": false }, "ForwardedFrom": { "type": "object", "properties": { "senderId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "senderName": { "type": "string" } }, "required": [ "senderId", "senderName" ], "additionalProperties": false }, "ReactionSummary": { "type": "object", "properties": { "emoji": { "type": "string" }, "count": { "type": "number" }, "reactedByMe": { "type": "boolean" } }, "required": [ "emoji", "count", "reactedByMe" ], "additionalProperties": false }, "ParentMessagePreview": { "type": "object", "properties": { "id": { "type": "number" }, "senderId": { "type": "number" }, "senderName": { "type": "string" }, "body": { "type": "string" }, "hasAttachment": { "type": "boolean" }, "forwarded": { "type": "boolean" } }, "required": [ "id", "senderId", "senderName", "body", "hasAttachment", "forwarded" ], "additionalProperties": false }, "ChatInvitePreview": { "type": "object", "properties": { "chatId": { "type": "number" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarVariants": { "anyOf": [ { "$ref": "#/components/schemas/AvatarVariants" }, { "type": "null" } ] }, "memberCount": { "type": "number" }, "alreadyMember": { "type": "boolean" }, "invitedBy": { "anyOf": [ { "$ref": "#/components/schemas/AuthorSummary" }, { "type": "null" } ] } }, "required": [ "chatId", "title", "avatarVariants", "memberCount", "alreadyMember", "invitedBy" ], "additionalProperties": false }, "AuthorSummary": { "type": "object", "properties": { "id": { "type": "number" }, "username": { "type": "string" }, "displayName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarVariants": { "anyOf": [ { "$ref": "#/components/schemas/AvatarVariants" }, { "type": "null" } ] } }, "required": [ "id", "username", "displayName", "avatarUrl", "avatarVariants" ], "additionalProperties": false }, "ChatInvite": { "type": "object", "properties": { "id": { "type": "number" }, "chatId": { "type": "number" }, "code": { "type": "string" }, "createdBy": { "type": "number" }, "createdAt": { "type": "number" }, "expiresAt": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "maxUses": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "useCount": { "type": "number" }, "revokedAt": { "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": [ "id", "chatId", "code", "createdBy", "createdAt", "expiresAt", "maxUses", "useCount", "revokedAt" ], "additionalProperties": false }, "CreateChatInviteBody": { "type": "object", "properties": { "expiresInHours": { "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 720 }, { "type": "null" } ] }, "maxUses": { "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 20 }, { "type": "null" } ] } }, "additionalProperties": false }, "PinMessageBody": { "type": "object", "properties": { "messageId": { "type": "number" } }, "required": [ "messageId" ], "additionalProperties": false }, "ChatEvent": { "type": "object", "properties": { "id": { "type": "number" }, "type": { "$ref": "#/components/schemas/ChatEventType" }, "afterMessageId": { "type": "number" }, "actor": { "anyOf": [ { "$ref": "#/components/schemas/ChatEventPerson" }, { "type": "null" } ] }, "target": { "anyOf": [ { "$ref": "#/components/schemas/ChatEventPerson" }, { "type": "null" } ] }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "type": "number" } }, "required": [ "id", "type", "afterMessageId", "actor", "target", "detail", "createdAt" ], "additionalProperties": false }, "ChatEventPerson": { "type": "object", "properties": { "userId": { "type": "number" }, "name": { "type": "string" } }, "required": [ "userId", "name" ], "additionalProperties": false }, "ChatEventType": { "type": "string", "enum": [ "member_added", "member_joined", "member_left", "member_removed", "renamed", "avatar_changed", "avatar_removed", "owner_changed", "admin_granted", "admin_revoked" ] }, "ReactionState": { "type": "object", "properties": { "reactions": { "type": "array", "items": { "$ref": "#/components/schemas/ReactionSummary" } } }, "required": [ "reactions" ], "additionalProperties": false }, "ReactionBody": { "type": "object", "properties": { "emoji": { "$ref": "#/components/schemas/ReactionEmoji" } }, "required": [ "emoji" ], "additionalProperties": false }, "ReactionEmoji": { "type": "string", "enum": [ "👍", "❤️", "😂", "😮", "😢", "😡" ] }, "AttachmentInUseEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "AttachmentInUse" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "UpdateMessageBody": { "type": "object", "properties": { "body": { "type": "string", "pattern": "^\\S[\\s\\S]*\\S$|^\\S$|^$", "maxLength": 4000 }, "attachmentId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": [ "body" ], "additionalProperties": false }, "MarkReadBody": { "type": "object", "properties": { "messageId": { "type": "number" } }, "required": [ "messageId" ], "additionalProperties": false }, "ForwardMessageResult": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/ForwardTargetResult" } } }, "required": [ "results" ], "additionalProperties": false }, "ForwardTargetResult": { "type": "object", "properties": { "chatId": { "type": "number" }, "message": { "anyOf": [ { "$ref": "#/components/schemas/Message" }, { "type": "null" } ] }, "error": { "anyOf": [ { "type": "object", "properties": { "reason": { "$ref": "#/components/schemas/ForwardFailureReason" }, "message": { "type": "string" } }, "required": [ "reason", "message" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "chatId", "message", "error" ], "additionalProperties": false }, "ForwardFailureReason": { "type": "string", "enum": [ "unavailable", "blocked", "quota_exceeded", "invalid_content" ] }, "ForwardMessageBody": { "type": "object", "properties": { "targetChatIds": { "type": "array", "items": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "minItems": 1, "maxItems": 10 }, "clientId": { "anyOf": [ { "type": "string", "maxLength": 48 }, { "type": "null" } ] } }, "required": [ "targetChatIds" ], "additionalProperties": false }, "CreateMessageBody": { "type": "object", "properties": { "body": { "type": "string", "pattern": "^\\S[\\s\\S]*\\S$|^\\S$|^$", "maxLength": 4000 }, "attachmentId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "parentMessageId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "clientId": { "anyOf": [ { "type": "string", "maxLength": 64 }, { "type": "null" } ] } }, "required": [ "body" ], "additionalProperties": false }, "MessagesPage": { "type": "object", "properties": { "messages": { "type": "array", "items": { "$ref": "#/components/schemas/Message" } }, "limit": { "type": "number" }, "hasEarlier": { "type": "boolean" }, "hasNewer": { "type": "boolean" }, "earliestCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "latestCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "messages", "limit", "hasEarlier", "hasNewer", "earliestCursor", "latestCursor" ], "additionalProperties": false }, "UpdateParticipantRoleBody": { "type": "object", "properties": { "role": { "type": "string", "enum": [ "admin", "member" ] } }, "required": [ "role" ], "additionalProperties": false }, "TransferOwnershipBody": { "type": "object", "properties": { "userId": { "type": "number" } }, "required": [ "userId" ], "additionalProperties": false }, "UpdateChatPreferencesBody": { "type": "object", "properties": { "mute": { "anyOf": [ { "$ref": "#/components/schemas/ChatMuteDuration" }, { "type": "null" }, { "type": "null" } ] }, "archived": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "pinned": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "additionalProperties": false }, "ChatMuteDuration": { "type": "string", "enum": [ "8h", "1w", "always" ] }, "AddParticipantsBody": { "type": "object", "properties": { "participantIds": { "type": "array", "items": { "type": "number" }, "minItems": 1, "maxItems": 19 } }, "required": [ "participantIds" ], "additionalProperties": false }, "AvatarTooLargeEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "AvatarTooLarge" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "InvalidAvatarUploadEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "InvalidAvatarUpload" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "UpdateChatBody": { "type": "object", "properties": { "title": { "type": "string", "pattern": "^\\S[\\s\\S]*\\S$|^\\S$|^$", "minLength": 1, "maxLength": 100 } }, "required": [ "title" ], "additionalProperties": false }, "CreateGroupChatBody": { "type": "object", "properties": { "title": { "type": "string", "pattern": "^\\S[\\s\\S]*\\S$|^\\S$|^$", "minLength": 1, "maxLength": 100 }, "participantIds": { "type": "array", "items": { "type": "number" }, "minItems": 1, "maxItems": 19 } }, "required": [ "title", "participantIds" ], "additionalProperties": false }, "CreateDirectChatBody": { "type": "object", "properties": { "userId": { "type": "number" } }, "required": [ "userId" ], "additionalProperties": false }, "UnreadChatCount": { "type": "object", "properties": { "count": { "type": "number" }, "chats": { "type": "number" } }, "required": [ "count", "chats" ], "additionalProperties": false }, "ChatsPage": { "type": "object", "properties": { "chats": { "type": "array", "items": { "$ref": "#/components/schemas/Chat" } }, "limit": { "type": "number" }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "chats", "limit", "nextCursor" ], "additionalProperties": false }, "Comment": { "type": "object", "properties": { "id": { "type": "number" }, "postId": { "type": "number" }, "parentCommentId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "authorId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "author": { "anyOf": [ { "$ref": "#/components/schemas/AuthorSummary" }, { "type": "null" } ] }, "deleted": { "type": "boolean" }, "content": { "type": "string" }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" }, "reactions": { "type": "array", "items": { "$ref": "#/components/schemas/ReactionSummary" } }, "replyCount": { "type": "number" } }, "required": [ "id", "postId", "parentCommentId", "authorId", "author", "deleted", "content", "createdAt", "updatedAt", "reactions", "replyCount" ], "additionalProperties": false }, "UpdateCommentBody": { "type": "object", "properties": { "content": { "type": "string", "pattern": "^\\S[\\s\\S]*\\S$|^\\S$|^$", "minLength": 1, "maxLength": 2000 } }, "required": [ "content" ], "additionalProperties": false }, "InvalidCommentRequestEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "InvalidCommentRequest" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "CreateCommentBody": { "type": "object", "properties": { "content": { "type": "string", "pattern": "^\\S[\\s\\S]*\\S$|^\\S$|^$", "minLength": 1, "maxLength": 2000 } }, "required": [ "content" ], "additionalProperties": false }, "CommentsPage": { "type": "object", "properties": { "comments": { "type": "array", "items": { "$ref": "#/components/schemas/Comment" } }, "limit": { "type": "number" }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "comments", "limit", "nextCursor" ], "additionalProperties": false }, "Post": { "type": "object", "properties": { "id": { "type": "number" }, "authorId": { "type": "number" }, "author": { "$ref": "#/components/schemas/AuthorSummary" }, "body": { "type": "string" }, "attachment": { "anyOf": [ { "$ref": "#/components/schemas/Attachment" }, { "type": "null" } ] }, "createdAt": { "type": "number" }, "updatedAt": { "type": "number" }, "reactions": { "type": "array", "items": { "$ref": "#/components/schemas/ReactionSummary" } }, "commentCount": { "type": "number" } }, "required": [ "id", "authorId", "author", "body", "attachment", "createdAt", "updatedAt", "reactions", "commentCount" ], "additionalProperties": false }, "UpdatePostBody": { "type": "object", "properties": { "body": { "type": "string", "pattern": "^\\S[\\s\\S]*\\S$|^\\S$|^$", "maxLength": 10000 }, "attachmentId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": [ "body" ], "additionalProperties": false }, "CreatePostBody": { "type": "object", "properties": { "body": { "type": "string", "pattern": "^\\S[\\s\\S]*\\S$|^\\S$|^$", "maxLength": 10000 }, "attachmentId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "clientId": { "anyOf": [ { "type": "string", "maxLength": 64 }, { "type": "null" } ] } }, "required": [ "body" ], "additionalProperties": false }, "InvalidPostsRequestEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "InvalidPostsRequest" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "PostsPage": { "type": "object", "properties": { "posts": { "type": "array", "items": { "$ref": "#/components/schemas/Post" } }, "limit": { "type": "number" }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "posts", "limit", "nextCursor" ], "additionalProperties": false }, "InvalidBlockRequestEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "InvalidBlockRequest" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "BlockedUser": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" }, "type": { "$ref": "#/components/schemas/BlockType" }, "createdAt": { "type": "number" } }, "required": [ "user", "type", "createdAt" ], "additionalProperties": false }, "BlockType": { "type": "string", "enum": [ "block", "mute" ] }, "BlockUserBody": { "type": "object", "properties": { "type": { "$ref": "#/components/schemas/BlockType" } }, "required": [ "type" ], "additionalProperties": false }, "UpdateStatusBody": { "type": "object", "properties": { "statusText": { "anyOf": [ { "type": "string", "pattern": "^\\S[\\s\\S]*\\S$|^\\S$|^$", "minLength": 1, "maxLength": 100 }, { "type": "null" } ] }, "statusEmoji": { "anyOf": [ { "type": "string", "pattern": "^\\S[\\s\\S]*\\S$|^\\S$|^$", "minLength": 1, "maxLength": 8 }, { "type": "null" } ] }, "expiresInMinutes": { "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 43200 }, { "type": "null" } ] } }, "required": [ "statusText", "statusEmoji" ], "additionalProperties": false }, "UpdateUserRoleBody": { "type": "object", "properties": { "role": { "$ref": "#/components/schemas/UserRole" } }, "required": [ "role" ], "additionalProperties": false }, "InvalidCredentialsEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "InvalidCredentials" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "DeleteAccountBody": { "type": "object", "properties": { "password": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": [ "password" ], "additionalProperties": false }, "UserProfile": { "type": "object", "properties": { "id": { "type": "number" }, "username": { "type": "string" }, "displayName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarVariants": { "anyOf": [ { "$ref": "#/components/schemas/AvatarVariants" }, { "type": "null" } ] }, "role": { "$ref": "#/components/schemas/UserRole" }, "statusText": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "statusEmoji": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "statusExpiresAt": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "bio": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "username", "displayName", "avatarUrl", "avatarVariants", "role", "statusText", "statusEmoji", "statusExpiresAt", "bio" ], "additionalProperties": false }, "UpdateProfileBody": { "type": "object", "properties": { "displayName": { "anyOf": [ { "type": "string", "pattern": "^\\S[\\s\\S]*\\S$|^\\S$|^$", "minLength": 1, "maxLength": 64 }, { "type": "null" } ] }, "avatarUrl": { "anyOf": [ { "type": "string", "maxLength": 2048 }, { "type": "null" } ] }, "bio": { "anyOf": [ { "type": "string", "pattern": "^\\S[\\s\\S]*\\S$|^\\S$|^$", "minLength": 1, "maxLength": 160 }, { "type": "null" }, { "type": "null" } ] } }, "required": [ "displayName", "avatarUrl" ], "additionalProperties": false }, "RefreshResponse": { "type": "object", "properties": { "accessToken": { "type": "string" }, "refreshToken": { "type": "string" } }, "required": [ "accessToken", "refreshToken" ], "additionalProperties": false }, "ChangePasswordBody": { "type": "object", "properties": { "currentPassword": { "type": "string", "minLength": 1, "maxLength": 128 }, "newPassword": { "type": "string", "minLength": 8, "maxLength": 128 } }, "required": [ "currentPassword", "newPassword" ], "additionalProperties": false }, "LogoutBody": { "type": "object", "properties": { "refreshToken": { "type": "string", "maxLength": 1024 }, "allSessions": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": [ "refreshToken" ], "additionalProperties": false }, "RefreshBody": { "type": "object", "properties": { "refreshToken": { "type": "string", "maxLength": 1024 } }, "required": [ "refreshToken" ], "additionalProperties": false }, "LoginResponse": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" }, "accessToken": { "type": "string" }, "refreshToken": { "type": "string" } }, "required": [ "user", "accessToken", "refreshToken" ], "additionalProperties": false }, "LoginBody": { "type": "object", "properties": { "username": { "type": "string", "pattern": "^\\S[\\s\\S]*\\S$|^\\S$|^$", "minLength": 1, "maxLength": 32 }, "password": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": [ "username", "password" ], "additionalProperties": false }, "UsernameTakenEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "UsernameTaken" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "RegisterBody": { "type": "object", "properties": { "username": { "type": "string", "pattern": "^\\S[\\s\\S]*\\S$|^\\S$|^$", "minLength": 3, "maxLength": 32, "allOf": [ { "pattern": "^[A-Za-z0-9_.-]*[A-Za-z0-9_]$" } ] }, "password": { "type": "string", "minLength": 8, "maxLength": 128 } }, "required": [ "username", "password" ], "additionalProperties": false }, "UserPostsPage": { "type": "object", "properties": { "posts": { "type": "array", "items": { "$ref": "#/components/schemas/Post" } }, "limit": { "type": "number" }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalCount": { "type": "number" } }, "required": [ "posts", "limit", "nextCursor", "totalCount" ], "additionalProperties": false }, "InvalidUsernameLookupRequestEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "InvalidUsernameLookupRequest" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false }, "InvalidUserSearchRequestEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": [ "InvalidUserSearchRequest" ] }, "message": { "type": "string" } }, "required": [ "_tag", "message" ], "additionalProperties": false } }, "securitySchemes": { "bearer": { "type": "http", "scheme": "Bearer" } } }, "security": [], "tags": [ { "name": "users" }, { "name": "posts" }, { "name": "comments" }, { "name": "chats" }, { "name": "search" }, { "name": "attachments" }, { "name": "meta" }, { "name": "realtime" }, { "name": "admin" }, { "name": "games" }, { "name": "notifications" } ] }