summary refs log tree commit diff
path: root/assets/openapi.json
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-17 22:25:38 +0100
committerRory& <root@rory.gay>2026-01-21 07:10:35 +0100
commitdfdc8d5a239202dfa33bc61937344072e90d9fb1 (patch)
tree060283e16a4dff23291c3a63a67be6b578cca75d /assets/openapi.json
parentPost-rebase fixes (diff)
downloadserver-ts-rebased/dev/pomelo.tar.xz
Diffstat (limited to 'assets/openapi.json')
-rw-r--r--assets/openapi.json755
1 files changed, 578 insertions, 177 deletions
diff --git a/assets/openapi.json b/assets/openapi.json

index fbadb7ab..ed53ce9a 100644 --- a/assets/openapi.json +++ b/assets/openapi.json
@@ -1577,6 +1577,9 @@ "discriminator": { "type": "string" }, + "global_name": { + "type": "string" + }, "id": { "type": "string" }, @@ -1671,11 +1674,11 @@ "region": { "type": "string" }, - "icon": { + "banner": { "type": "string", "nullable": true }, - "banner": { + "icon": { "type": "string", "nullable": true }, @@ -1968,6 +1971,12 @@ "username": { "type": "string" }, + "global_name": { + "type": [ + "null", + "string" + ] + }, "discriminator": { "type": "string" }, @@ -1989,6 +1998,7 @@ "avatar", "avatar_url", "discriminator", + "global_name", "id", "status", "username" @@ -2501,6 +2511,9 @@ "id": { "type": "string" }, + "banner": { + "type": "string" + }, "icon": { "type": "string" }, @@ -2537,9 +2550,6 @@ "$ref": "#/components/schemas/Role" } }, - "banner": { - "type": "string" - }, "channels": { "type": "array", "items": { @@ -2711,29 +2721,10 @@ "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", "type": "string" }, - "premium_since": { - "type": "string", - "format": "date-time" - }, - "avatar": { - "type": "string" - }, - "banner": { - "type": "string" - }, - "bio": { - "type": "string" - }, - "theme_colors": { - "type": "array", - "items": { - "type": "integer" - } - }, - "pronouns": { + "username": { "type": "string" }, - "username": { + "global_name": { "type": "string" }, "discriminator": { @@ -2742,15 +2733,37 @@ "public_flags": { "type": "integer" }, + "avatar": { + "type": "string" + }, "accent_color": { "type": "integer" }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, "bot": { "type": "boolean" }, + "premium_since": { + "type": "string", + "format": "date-time" + }, "premium_type": { "type": "integer" }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pronouns": { + "type": "string" + }, "badge_ids": { "type": "array", "items": { @@ -2782,22 +2795,40 @@ "flags": { "type": "integer" }, - "verified": { - "type": "boolean" + "username": { + "type": "string" }, - "premium_since": { - "type": "string", - "format": "date-time" + "global_name": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "public_flags": { + "type": "integer" }, "avatar": { "type": "string" }, + "accent_color": { + "type": "integer" + }, "banner": { "type": "string" }, "bio": { "type": "string" }, + "bot": { + "type": "boolean" + }, + "premium_since": { + "type": "string", + "format": "date-time" + }, + "premium_type": { + "type": "integer" + }, "theme_colors": { "type": "array", "items": { @@ -2807,24 +2838,9 @@ "pronouns": { "type": "string" }, - "username": { - "type": "string" - }, - "discriminator": { - "type": "string" - }, - "public_flags": { - "type": "integer" - }, - "accent_color": { - "type": "integer" - }, - "bot": { + "verified": { "type": "boolean" }, - "premium_type": { - "type": "integer" - }, "badge_ids": { "type": "array", "items": { @@ -2893,12 +2909,9 @@ "$ref": "#/components/schemas/BackupCode" } }, - "UserUpdateResponse": { + "PrivateUserResponse": { "type": "object", "properties": { - "newToken": { - "type": "string" - }, "email": { "type": "string" }, @@ -2909,22 +2922,143 @@ "flags": { "type": "integer" }, - "verified": { + "username": { + "type": "string" + }, + "global_name": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "public_flags": { + "type": "integer" + }, + "avatar": { + "type": "string" + }, + "accent_color": { + "type": "integer" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "bot": { "type": "boolean" }, "premium_since": { "type": "string", "format": "date-time" }, + "premium_type": { + "type": "integer" + }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pronouns": { + "type": "string" + }, + "verified": { + "type": "boolean" + }, + "badge_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "mfa_enabled": { + "type": "boolean" + }, + "phone": { + "type": "string" + }, + "nsfw_allowed": { + "type": "boolean" + }, + "premium": { + "type": "boolean" + }, + "purchased_flags": { + "type": "integer" + }, + "premium_usage_flags": { + "type": "integer" + }, + "disabled": { + "type": "boolean" + }, + "settings": { + "$ref": "#/components/schemas/UserSettingsSchema" + } + }, + "required": [ + "bio", + "bot", + "disabled", + "discriminator", + "flags", + "id", + "mfa_enabled", + "nsfw_allowed", + "premium", + "premium_since", + "premium_type", + "premium_usage_flags", + "public_flags", + "purchased_flags", + "username", + "verified" + ] + }, + "PublicUserResponse": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "username": { + "type": "string" + }, + "global_name": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "public_flags": { + "type": "integer" + }, "avatar": { "type": "string" }, + "accent_color": { + "type": "integer" + }, "banner": { "type": "string" }, "bio": { "type": "string" }, + "bot": { + "type": "boolean" + }, + "premium_since": { + "type": "string", + "format": "date-time" + }, + "premium_type": { + "type": "integer" + }, "theme_colors": { "type": "array", "items": { @@ -2934,24 +3068,86 @@ "pronouns": { "type": "string" }, + "badge_ids": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "bio", + "bot", + "discriminator", + "id", + "premium_since", + "premium_type", + "public_flags", + "username" + ] + }, + "UserUpdateResponse": { + "type": "object", + "properties": { + "newToken": { + "type": "string" + }, + "email": { + "type": "string" + }, + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "flags": { + "type": "integer" + }, "username": { "type": "string" }, + "global_name": { + "type": "string" + }, "discriminator": { "type": "string" }, "public_flags": { "type": "integer" }, + "avatar": { + "type": "string" + }, "accent_color": { "type": "integer" }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, "bot": { "type": "boolean" }, + "premium_since": { + "type": "string", + "format": "date-time" + }, "premium_type": { "type": "integer" }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pronouns": { + "type": "string" + }, + "verified": { + "type": "boolean" + }, "badge_ids": { "type": "array", "items": { @@ -3098,6 +3294,10 @@ "autoCreateBotUsers": { "type": "boolean", "default": false + }, + "uniqueUsernames": { + "type": "boolean", + "default": false } }, "required": [ @@ -3110,7 +3310,8 @@ "instanceId", "instanceName", "serverName", - "tosPage" + "tosPage", + "uniqueUsernames" ] }, "APIChannelArray": { @@ -3140,25 +3341,6 @@ "guild_id": { "type": "string" }, - "mute": { - "type": "boolean" - }, - "deaf": { - "type": "boolean" - }, - "nick": { - "type": "string" - }, - "joined_at": { - "type": "string", - "format": "date-time" - }, - "pending": { - "type": "boolean" - }, - "premium_since": { - "type": "integer" - }, "avatar": { "type": "string" }, @@ -3168,6 +3350,9 @@ "bio": { "type": "string" }, + "premium_since": { + "type": "integer" + }, "theme_colors": { "type": "array", "items": { @@ -3177,6 +3362,22 @@ "pronouns": { "type": "string" }, + "mute": { + "type": "boolean" + }, + "deaf": { + "type": "boolean" + }, + "nick": { + "type": "string" + }, + "joined_at": { + "type": "string", + "format": "date-time" + }, + "pending": { + "type": "boolean" + }, "communication_disabled_until": { "anyOf": [ { @@ -3281,11 +3482,11 @@ "region": { "type": "string" }, - "icon": { + "banner": { "type": "string", "nullable": true }, - "banner": { + "icon": { "type": "string", "nullable": true }, @@ -3594,6 +3795,9 @@ "username": { "type": "string" }, + "global_name": { + "type": "string" + }, "discriminator": { "type": "string" }, @@ -5957,6 +6161,17 @@ "files" ] }, + "UniqueUsernameAttemptSchema": { + "type": "object", + "properties": { + "username": { + "type": "string" + } + }, + "required": [ + "username" + ] + }, "UserDeleteSchema": { "type": "object", "properties": { @@ -6028,7 +6243,8 @@ "type": "object", "properties": { "username": { - "minLength": 2, + "minLength": 1, + "maxLength": 100, "type": "string" }, "avatar": { @@ -6036,6 +6252,7 @@ "nullable": true }, "bio": { + "maxLength": 1024, "type": "string" }, "accent_color": { @@ -6046,28 +6263,24 @@ "nullable": true }, "password": { - "minLength": 1, - "maxLength": 72, "type": "string" }, "new_password": { - "minLength": 1, - "maxLength": 72, "type": "string" }, "code": { - "minLength": 6, - "maxLength": 6, "type": "string" }, "email": { - "format": "email", "type": "string" }, "discriminator": { "minLength": 4, "maxLength": 4, "type": "string" + }, + "global_name": { + "type": "string" } } }, @@ -6808,6 +7021,17 @@ "user_sessions" ] }, + "UniqueUsernameAttemptResponse": { + "type": "object", + "properties": { + "taken": { + "type": "boolean" + } + }, + "required": [ + "taken" + ] + }, "ApplicationCommandOption": { "type": "object", "properties": { @@ -7460,6 +7684,12 @@ "username": { "type": "string" }, + "global_name": { + "type": "string" + }, + "legacy_username": { + "type": "string" + }, "discriminator": { "type": "string" }, @@ -7627,6 +7857,9 @@ "type": "string" } }, + "tag": { + "type": "string" + }, "id": { "type": "string" } @@ -7658,6 +7891,7 @@ "security_keys", "sessions", "system", + "tag", "username", "verified", "webauthn_enabled" @@ -10611,25 +10845,6 @@ "guild_id": { "type": "string" }, - "mute": { - "type": "boolean" - }, - "deaf": { - "type": "boolean" - }, - "nick": { - "type": "string" - }, - "joined_at": { - "type": "string", - "format": "date-time" - }, - "pending": { - "type": "boolean" - }, - "premium_since": { - "type": "integer" - }, "avatar": { "type": "string" }, @@ -10639,6 +10854,9 @@ "bio": { "type": "string" }, + "premium_since": { + "type": "integer" + }, "theme_colors": { "type": "array", "items": { @@ -10648,6 +10866,22 @@ "pronouns": { "type": "string" }, + "mute": { + "type": "boolean" + }, + "deaf": { + "type": "boolean" + }, + "nick": { + "type": "string" + }, + "joined_at": { + "type": "string", + "format": "date-time" + }, + "pending": { + "type": "boolean" + }, "communication_disabled_until": { "anyOf": [ { @@ -10690,29 +10924,10 @@ "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", "type": "string" }, - "premium_since": { - "type": "string", - "format": "date-time" - }, - "avatar": { - "type": "string" - }, - "banner": { - "type": "string" - }, - "bio": { - "type": "string" - }, - "theme_colors": { - "type": "array", - "items": { - "type": "integer" - } - }, - "pronouns": { + "username": { "type": "string" }, - "username": { + "global_name": { "type": "string" }, "discriminator": { @@ -10721,15 +10936,37 @@ "public_flags": { "type": "integer" }, + "avatar": { + "type": "string" + }, "accent_color": { "type": "integer" }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, "bot": { "type": "boolean" }, + "premium_since": { + "type": "string", + "format": "date-time" + }, "premium_type": { "type": "integer" }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pronouns": { + "type": "string" + }, "badge_ids": { "type": "array", "items": { @@ -12442,38 +12679,31 @@ "MinimalPublicUserDTO": { "type": "object", "properties": { - "avatar": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "global_name": { "type": "string", + "default": null, "nullable": true }, "discriminator": { "type": "string" }, - "id": { - "type": "string" - }, "public_flags": { "type": "integer" }, - "username": { - "type": "string" - }, - "badge_ids": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] + "avatar": { + "type": "string", + "nullable": true } }, "required": [ "discriminator", + "global_name", "id", "public_flags", "username" @@ -12539,6 +12769,10 @@ "type": "integer", "default": 1048576 }, + "minUsername": { + "type": "integer", + "default": 2 + }, "maxUsername": { "type": "integer", "default": 32 @@ -12556,7 +12790,8 @@ "maxBio", "maxFriends", "maxGuilds", - "maxUsername" + "maxUsername", + "minUsername" ] }, "GuildLimits": { @@ -12810,6 +13045,9 @@ "UserProfile": { "type": "object", "properties": { + "accent_color": { + "type": "integer" + }, "banner": { "type": "string" }, @@ -12824,9 +13062,6 @@ }, "pronouns": { "type": "string" - }, - "accent_color": { - "type": "integer" } }, "required": [ @@ -13030,6 +13265,9 @@ "name": "track" }, { + "name": "unique-username" + }, + { "name": "updates" }, { @@ -14159,6 +14397,121 @@ ] } }, + "/users/@me/pomelo/": { + "post": { + "security": [ + { + "bearer": [] + } + ], + "description": "Claims a unique username for the user. Returns the updated user object on success. Fires a User Update Gateway event.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UniqueUsernameAttemptSchema" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrivateUserResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + } + }, + "tags": [ + "users" + ] + } + }, + "/users/@me/pomelo-suggestions/": { + "get": { + "security": [ + { + "bearer": [] + } + ], + "description": "Returns a suggested unique username string based on the current user's username.", + "responses": { + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + } + }, + "tags": [ + "users" + ] + } + }, + "/users/@me/pomelo-attempt/": { + "post": { + "security": [ + { + "bearer": [] + } + ], + "description": "Checks whether a unique username is available for the user to claim.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UniqueUsernameAttemptSchema" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UniqueUsernameAttemptResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + } + }, + "tags": [ + "users" + ] + } + }, "/users/@me/notes/{user_id}": { "get": { "security": [ @@ -15788,6 +16141,86 @@ ] } }, + "/unique-username/username-suggestions-unauthed/": { + "get": { + "security": [ + { + "bearer": [] + } + ], + "description": "Returns a suggested unique username string based on the current user's username.", + "responses": { + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + } + }, + "parameters": [ + { + "name": "global_name", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "tags": [ + "unique-username" + ] + } + }, + "/unique-username/username-attempt-unauthed/": { + "post": { + "security": [ + { + "bearer": [] + } + ], + "description": "Checks whether a unique username is available for the user to claim.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UniqueUsernameAttemptSchema" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UniqueUsernameAttemptResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + } + }, + "tags": [ + "unique-username" + ] + } + }, "/track/": { "post": { "responses": { @@ -24978,38 +25411,6 @@ ] } }, - "/auth/forgot/": { - "post": { - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForgotPasswordSchema" - } - } - } - }, - "responses": { - "204": { - "description": "No description available" - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIErrorOrCaptchaResponse" - } - } - } - } - }, - "tags": [ - "auth" - ] - } - }, "/auth/fingerprint/": { "post": { "responses": {