diff options
Diffstat (limited to 'assets/openapi.json')
-rw-r--r-- | assets/openapi.json | 738 |
1 files changed, 664 insertions, 74 deletions
diff --git a/assets/openapi.json b/assets/openapi.json index bc43189a..211b8451 100644 --- a/assets/openapi.json +++ b/assets/openapi.json @@ -3865,87 +3865,94 @@ "width" ] }, - "UserPublic": { + "PublicConnectedAccount": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "premium_since": { - "type": "string", - "format": "date-time" - }, - "username": { + "type": { "type": "string" }, - "discriminator": { + "name": { "type": "string" }, - "public_flags": { - "type": "integer" + "verified": { + "type": "boolean" + } + }, + "required": [ + "name", + "type" + ] + }, + "DmChannelDTO": { + "type": "object", + "properties": { + "icon": { + "type": "string", + "nullable": true }, - "avatar": { + "id": { "type": "string" }, - "accent_color": { - "type": "integer" - }, - "banner": { - "type": "string" + "last_message_id": { + "type": "string", + "nullable": true }, - "bio": { - "type": "string" + "name": { + "type": "string", + "nullable": true }, - "bot": { - "type": "boolean" + "origin_channel_id": { + "type": "string", + "nullable": true }, - "premium_type": { - "type": "integer" + "owner_id": { + "type": "string" }, - "theme_colors": { + "recipients": { "type": "array", - "items": [ - { - "type": "integer" - }, - { - "type": "integer" - } - ], - "minItems": 2, - "maxItems": 2 + "items": { + "$ref": "#/components/schemas/MinimalPublicUserDTO" + } }, - "pronouns": { - "type": "string" + "type": { + "type": "integer" } }, "required": [ - "bio", - "bot", - "discriminator", + "icon", "id", - "premium_since", - "premium_type", - "public_flags", - "username" + "last_message_id", + "name", + "origin_channel_id", + "recipients", + "type" ] }, - "PublicConnectedAccount": { + "MinimalPublicUserDTO": { "type": "object", "properties": { - "type": { + "avatar": { + "type": "string", + "nullable": true + }, + "discriminator": { "type": "string" }, - "name": { + "id": { "type": "string" }, - "verified": { - "type": "boolean" + "public_flags": { + "type": "integer" + }, + "username": { + "type": "string" } }, "required": [ - "name", - "type" + "discriminator", + "id", + "public_flags", + "username" ] }, "ChannelPermissionOverwriteSchema": { @@ -5386,6 +5393,17 @@ } } }, + "UserNoteUpdateSchema": { + "type": "object", + "properties": { + "note": { + "type": "string" + } + }, + "required": [ + "note" + ] + }, "UserProfileModifySchema": { "type": "object", "properties": { @@ -6581,11 +6599,30 @@ "token" ] }, + "UserNoteResponse": { + "type": "object", + "properties": { + "note": { + "type": "string" + }, + "note_user_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "required": [ + "note", + "note_user_id", + "user_id" + ] + }, "UserProfileResponse": { "type": "object", "properties": { "user": { - "$ref": "#/components/schemas/UserPublic" + "$ref": "#/components/schemas/PublicUser" }, "connected_accounts": { "$ref": "#/components/schemas/PublicConnectedAccount" @@ -6604,6 +6641,29 @@ "user" ] }, + "UserRelationshipsResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/RelationshipType" + }, + "nickname": { + "type": "null" + }, + "user": { + "$ref": "#/components/schemas/PublicUser" + } + }, + "required": [ + "id", + "nickname", + "type", + "user" + ] + }, "UserRelationsResponse": { "type": "object", "properties": { @@ -6633,6 +6693,255 @@ "object" ] }, + "PublicUserResponse": { + "$ref": "#/components/schemas/PublicUser" + }, + "PrivateUserResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "premium_since": { + "type": "string", + "format": "date-time" + }, + "verified": { + "type": "boolean" + }, + "username": { + "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_type": { + "type": "integer" + }, + "theme_colors": { + "type": "array", + "items": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "minItems": 2, + "maxItems": 2 + }, + "pronouns": { + "type": "string" + }, + "flags": { + "type": "string" + }, + "mfa_enabled": { + "type": "boolean" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "nsfw_allowed": { + "type": "boolean" + }, + "premium": { + "type": "boolean" + }, + "purchased_flags": { + "type": "integer" + }, + "premium_usage_flags": { + "type": "integer" + }, + "disabled": { + "type": "boolean" + } + }, + "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" + ] + }, + "UserUpdateResponse": { + "type": "object", + "properties": { + "newToken": { + "type": "string" + }, + "id": { + "type": "string" + }, + "premium_since": { + "type": "string", + "format": "date-time" + }, + "verified": { + "type": "boolean" + }, + "username": { + "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_type": { + "type": "integer" + }, + "theme_colors": { + "type": "array", + "items": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "minItems": 2, + "maxItems": 2 + }, + "pronouns": { + "type": "string" + }, + "flags": { + "type": "string" + }, + "mfa_enabled": { + "type": "boolean" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "nsfw_allowed": { + "type": "boolean" + }, + "premium": { + "type": "boolean" + }, + "purchased_flags": { + "type": "integer" + }, + "premium_usage_flags": { + "type": "integer" + }, + "disabled": { + "type": "boolean" + } + }, + "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" + ] + }, + "UserGuildsResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Guild" + } + }, + "UserChannelsResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DmChannelDTO" + } + }, + "UserBackupCodesResponse": { + "type": "object", + "properties": { + "expired": {}, + "user": { + "$ref": "#/components/schemas/User" + }, + "code": { + "type": "string" + }, + "consumed": { + "type": "boolean" + }, + "id": { + "type": "string" + } + }, + "required": [ + "code", + "consumed", + "expired", + "id", + "user" + ] + }, "WebhookCreateResponse": { "type": "object", "properties": { @@ -6841,8 +7150,35 @@ } }, "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserSettings" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } } }, "tags": [ @@ -6868,8 +7204,28 @@ } }, "responses": { - "default": { + "204": { "description": "No description available" + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } } }, "tags": [ @@ -6885,8 +7241,28 @@ } ], "responses": { - "default": { + "204": { "description": "No description available" + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } } }, "parameters": [ @@ -6912,9 +7288,29 @@ "bearer": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserNoteUpdateSchema" + } + } + } + }, "responses": { - "default": { + "204": { "description": "No description available" + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } } }, "parameters": [ @@ -7049,6 +7445,8 @@ "bearer": [] } ], + "description": "This route is replaced with users/@me/mfa/codes-verification in newer clients", + "deprecated": true, "requestBody": { "required": true, "content": { @@ -7060,8 +7458,35 @@ } }, "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserBackupCodesResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } } }, "tags": [ @@ -7087,8 +7512,35 @@ } }, "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserBackupCodesResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } } }, "tags": [ @@ -7131,8 +7583,35 @@ } }, "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserUpdateResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } } }, "tags": [ @@ -7148,8 +7627,15 @@ } ], "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserGuildsResponse" + } + } + } } }, "tags": [ @@ -7165,8 +7651,28 @@ } ], "responses": { - "default": { + "204": { "description": "No description available" + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } } }, "parameters": [ @@ -7282,8 +7788,28 @@ } ], "responses": { - "default": { + "204": { "description": "No description available" + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } } }, "tags": [ @@ -7316,8 +7842,28 @@ } ], "responses": { - "default": { + "204": { "description": "No description available" + }, + "401": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } } }, "tags": [ @@ -7434,8 +7980,15 @@ } }, "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DmChannelDTO" + } + } + } } }, "tags": [ @@ -7590,6 +8143,16 @@ } } } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } } }, "parameters": [ @@ -7654,8 +8217,15 @@ } ], "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicUserResponse" + } + } + } } }, "parameters": [ @@ -7683,8 +8253,28 @@ } ], "responses": { - "default": { + "204": { "description": "No description available" + }, + "403": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } } }, "parameters": [ @@ -11252,7 +11842,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserPublic" + "$ref": "#/components/schemas/PublicUser" } } } |