diff --git a/assets/openapi.json b/assets/openapi.json index c2718ee..85292bc 100644 --- a/assets/openapi.json +++ b/assets/openapi.json @@ -146,31 +146,6 @@ "version" ] }, - "ConnectedAccountCommonOAuthTokenResponse": { - "type": "object", - "properties": { - "access_token": { - "type": "string" - }, - "token_type": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "refresh_token": { - "type": "string" - }, - "expires_in": { - "type": "integer" - } - }, - "required": [ - "access_token", - "scope", - "token_type" - ] - }, "RouteResponse": { "type": "object", "properties": { @@ -2514,7 +2489,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -2723,7 +2698,7 @@ }, "required": [ "ToGuildSource", - "__@annotationsKey@12309", + "__@annotationsKey@12306", "bans", "channel_ordering", "channels", @@ -4404,6 +4379,31 @@ "user_id" ] }, + "ConnectedAccountCommonOAuthTokenResponse": { + "type": "object", + "properties": { + "access_token": { + "type": "string" + }, + "token_type": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "refresh_token": { + "type": "string" + }, + "expires_in": { + "type": "integer" + } + }, + "required": [ + "access_token", + "scope", + "token_type" + ] + }, "ConnectionCallbackSchema": { "type": "object", "properties": { @@ -7854,7 +7854,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -7865,7 +7865,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "channel", "embeds", "flags", @@ -8042,7 +8042,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -8053,7 +8053,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "created_at", "flags", "id", @@ -8110,7 +8110,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -8121,7 +8121,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "channel", "channel_id", "closed", @@ -8321,7 +8321,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -8332,7 +8332,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "bio", "bot", "connected_accounts", @@ -8430,7 +8430,7 @@ "session_nickname": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -8441,7 +8441,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "activities", "client_info", "client_status", @@ -8733,7 +8733,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -8744,7 +8744,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "from", "from_id", "id", @@ -8829,7 +8829,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -8840,7 +8840,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "external_id", "id", "name", @@ -9043,7 +9043,7 @@ "type": "boolean", "default": true }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -9054,7 +9054,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "afk_timeout", "allow_accessibility_detection", "animate_emoji", @@ -9169,7 +9169,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -9180,7 +9180,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "counter", "id", "key_id", @@ -9338,7 +9338,7 @@ "flags": { "$ref": "#/components/schemas/ThreadMemberFlags" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -9349,7 +9349,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "channel", "flags", "id", @@ -9454,7 +9454,7 @@ "type": "integer", "default": 0 }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -9465,7 +9465,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "banner", "bio", "communication_disabled_until", @@ -9710,7 +9710,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -9721,7 +9721,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "bans", "channel_ordering", "channels", @@ -9776,7 +9776,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -9787,7 +9787,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "executor", "executor_id", "guild", @@ -9857,7 +9857,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -9868,7 +9868,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "color", "colors", "flags", @@ -9941,7 +9941,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -9952,7 +9952,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "code", "created_at", "creator", @@ -10010,7 +10010,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10021,7 +10021,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "animated", "available", "groups", @@ -10078,7 +10078,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10089,7 +10089,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "format_type", "id", "name", @@ -10124,7 +10124,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10135,7 +10135,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "id", "name", "stickers" @@ -10216,7 +10216,7 @@ "flags": { "type": "integer" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10227,7 +10227,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "channel", "channel_id", "code", @@ -10301,7 +10301,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10312,7 +10312,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "channel", "channel_id", "deaf", @@ -10387,7 +10387,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10398,7 +10398,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "application", "application_id", "avatar", @@ -10555,7 +10555,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10566,7 +10566,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "description", "discoverability_state", "discovery_eligibility_flags", @@ -10609,7 +10609,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10620,7 +10620,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "id", "members", "name", @@ -10658,7 +10658,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10669,7 +10669,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "id", "membership_state", "permissions", @@ -10949,7 +10949,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10960,7 +10960,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "badge_count", "channel", "channel_id", @@ -11047,7 +11047,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -11058,7 +11058,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "channel", "channel_id", "id", @@ -11099,7 +11099,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -11110,7 +11110,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "filename", "id", "message", @@ -13701,7 +13701,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -13712,7 +13712,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "code", "consumed", "expired", @@ -13823,7 +13823,7 @@ "icon": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -13834,7 +13834,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "id", "is_primary", "localizations", @@ -14212,7 +14212,7 @@ "link": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -14223,7 +14223,7 @@ } }, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "description", "icon", "id" diff --git a/assets/schemas.json b/assets/schemas.json index 0bd0ace..75c9d90 100644 --- a/assets/schemas.json +++ b/assets/schemas.json @@ -125,33 +125,6 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ConnectedAccountCommonOAuthTokenResponse": { - "type": "object", - "properties": { - "access_token": { - "type": "string" - }, - "token_type": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "refresh_token": { - "type": "string" - }, - "expires_in": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "access_token", - "scope", - "token_type" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "RouteResponse": { "type": "object", "properties": { @@ -2640,7 +2613,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -2858,7 +2831,7 @@ "additionalProperties": false, "required": [ "ToGuildSource", - "__@annotationsKey@12309", + "__@annotationsKey@12306", "bans", "channel_ordering", "channels", @@ -4660,6 +4633,33 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, + "ConnectedAccountCommonOAuthTokenResponse": { + "type": "object", + "properties": { + "access_token": { + "type": "string" + }, + "token_type": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "refresh_token": { + "type": "string" + }, + "expires_in": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "access_token", + "scope", + "token_type" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, "ConnectionCallbackSchema": { "type": "object", "properties": { @@ -8333,7 +8333,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -8345,7 +8345,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "channel", "embeds", "flags", @@ -8527,7 +8527,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -8539,7 +8539,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "created_at", "flags", "id", @@ -8598,7 +8598,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -8610,7 +8610,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "channel", "channel_id", "closed", @@ -8811,7 +8811,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -8823,7 +8823,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "bio", "bot", "connected_accounts", @@ -8922,7 +8922,7 @@ "session_nickname": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -8934,7 +8934,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "activities", "client_info", "client_status", @@ -9235,7 +9235,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -9247,7 +9247,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "from", "from_id", "id", @@ -9334,7 +9334,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -9346,7 +9346,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "external_id", "id", "name", @@ -9552,7 +9552,7 @@ "type": "boolean", "default": true }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -9564,7 +9564,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "afk_timeout", "allow_accessibility_detection", "animate_emoji", @@ -9692,7 +9692,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -9704,7 +9704,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "counter", "id", "key_id", @@ -9885,7 +9885,7 @@ "flags": { "$ref": "#/definitions/ThreadMemberFlags" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -9897,7 +9897,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "channel", "flags", "id", @@ -10003,7 +10003,7 @@ "type": "integer", "default": 0 }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10015,7 +10015,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "banner", "bio", "communication_disabled_until", @@ -10269,7 +10269,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10281,7 +10281,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "bans", "channel_ordering", "channels", @@ -10337,7 +10337,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10349,7 +10349,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "executor", "executor_id", "guild", @@ -10420,7 +10420,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10432,7 +10432,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "color", "colors", "flags", @@ -10508,7 +10508,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10520,7 +10520,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "code", "created_at", "creator", @@ -10579,7 +10579,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10591,7 +10591,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "animated", "available", "groups", @@ -10649,7 +10649,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10661,7 +10661,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "format_type", "id", "name", @@ -10697,7 +10697,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10709,7 +10709,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "id", "name", "stickers" @@ -10793,7 +10793,7 @@ "flags": { "type": "integer" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10805,7 +10805,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "channel", "channel_id", "code", @@ -10880,7 +10880,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10892,7 +10892,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "channel", "channel_id", "deaf", @@ -10968,7 +10968,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -10980,7 +10980,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "application", "application_id", "avatar", @@ -11139,7 +11139,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -11151,7 +11151,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "description", "discoverability_state", "discovery_eligibility_flags", @@ -11195,7 +11195,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -11207,7 +11207,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "id", "members", "name", @@ -11246,7 +11246,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -11258,7 +11258,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "id", "membership_state", "permissions", @@ -11559,7 +11559,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -11571,7 +11571,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "badge_count", "channel", "channel_id", @@ -11663,7 +11663,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -11675,7 +11675,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "channel", "channel_id", "id", @@ -11717,7 +11717,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -11729,7 +11729,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "filename", "id", "message", @@ -14496,7 +14496,7 @@ "id": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -14508,7 +14508,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "code", "consumed", "expired", @@ -14634,7 +14634,7 @@ "icon": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -14646,7 +14646,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "id", "is_primary", "localizations", @@ -15053,7 +15053,7 @@ "link": { "type": "string" }, - "__@annotationsKey@12309": { + "__@annotationsKey@12306": { "type": "object", "additionalProperties": { "type": "array", @@ -15065,7 +15065,7 @@ }, "additionalProperties": false, "required": [ - "__@annotationsKey@12309", + "__@annotationsKey@12306", "description", "icon", "id" diff --git "a/src/api/routes/channels/\043channel_id/messages/\043message_id/index.ts" "b/src/api/routes/channels/\043channel_id/messages/\043message_id/index.ts" index 96ff98e..233d138 100644 --- "a/src/api/routes/channels/\043channel_id/messages/\043message_id/index.ts" +++ "b/src/api/routes/channels/\043channel_id/messages/\043message_id/index.ts" @@ -34,7 +34,7 @@ import { Request, Response, Router } from "express"; import { HTTPError } from "lambert-server"; import multer from "multer"; -import { handleMessage, postHandleMessage, route } from "../../../../../util"; +import { handleMessage, postHandleMessage, route } from "@spacebar/api"; import { MessageCreateAttachment, MessageCreateCloudAttachment, MessageCreateSchema, MessageEditSchema, ChannelType } from "@spacebar/schemas"; const router = Router({ mergeParams: true }); diff --git "a/src/api/routes/connections/\043connection_name/authorize.ts" "b/src/api/routes/connections/\043connection_name/authorize.ts" index b74fd86..7d3d03e 100644 --- "a/src/api/routes/connections/\043connection_name/authorize.ts" +++ "b/src/api/routes/connections/\043connection_name/authorize.ts" @@ -18,7 +18,7 @@ import { route } from "@spacebar/api"; import { Request, Response, Router } from "express"; -import { ConnectionStore, FieldErrors } from "../../../../util"; +import { ConnectionStore, FieldErrors } from "@spacebar/util"; const router = Router({ mergeParams: true }); diff --git "a/src/api/routes/guilds/\043guild_id/widget.png.ts" "b/src/api/routes/guilds/\043guild_id/widget.png.ts" index 875761e..ee62321 100644 --- "a/src/api/routes/guilds/\043guild_id/widget.png.ts" +++ "b/src/api/routes/guilds/\043guild_id/widget.png.ts" @@ -24,7 +24,7 @@ import fs from "fs"; import { HTTPError } from "lambert-server"; import path from "path"; -import { storage } from "../../../../cdn/util/Storage"; +import { storage } from "@spacebar/cdn"; const router: Router = Router({ mergeParams: true }); diff --git a/src/cdn/routes/app-assets.ts b/src/cdn/routes/app-assets.ts index 572cb3a..149d8b3 100644 --- a/src/cdn/routes/app-assets.ts +++ b/src/cdn/routes/app-assets.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/app-icons.ts b/src/cdn/routes/app-icons.ts index b8ab98b..b67bc1f 100644 --- a/src/cdn/routes/app-icons.ts +++ b/src/cdn/routes/app-icons.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/attachments.ts b/src/cdn/routes/attachments.ts index 86a7f0c..87d96a4 100644 --- a/src/cdn/routes/attachments.ts +++ b/src/cdn/routes/attachments.ts @@ -21,8 +21,8 @@ import imageSize from "image-size"; import { HTTPError } from "lambert-server"; import { multer } from "../util/multer"; -import { storage } from "../util/Storage"; -import { CloudAttachment } from "../../util/entities/CloudAttachment"; +import { storage } from "@spacebar/cdn"; +import { CloudAttachment } from "@spacebar/util"; import { fileTypeFromBuffer } from "file-type"; import { cache } from "../util/cache"; diff --git a/src/cdn/routes/avatar-decoration-presets.ts b/src/cdn/routes/avatar-decoration-presets.ts index 736a281..591e0ab 100644 --- a/src/cdn/routes/avatar-decoration-presets.ts +++ b/src/cdn/routes/avatar-decoration-presets.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { HTTPError } from "lambert-server"; import { fileTypeFromBuffer } from "file-type"; import { cache } from "../util/cache"; diff --git a/src/cdn/routes/avatars.ts b/src/cdn/routes/avatars.ts index 793bc45..f2d539b 100644 --- a/src/cdn/routes/avatars.ts +++ b/src/cdn/routes/avatars.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/badge-icons.ts b/src/cdn/routes/badge-icons.ts index 829baeb..33134e1 100644 --- a/src/cdn/routes/badge-icons.ts +++ b/src/cdn/routes/badge-icons.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { HTTPError } from "lambert-server"; import { fileTypeFromBuffer } from "file-type"; import { cache } from "../util/cache"; diff --git a/src/cdn/routes/banners.ts b/src/cdn/routes/banners.ts index 211643f..979bdad 100644 --- a/src/cdn/routes/banners.ts +++ b/src/cdn/routes/banners.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/channel-icons.ts b/src/cdn/routes/channel-icons.ts index 946759d..3b85d4e 100644 --- a/src/cdn/routes/channel-icons.ts +++ b/src/cdn/routes/channel-icons.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/discover-splashes.ts b/src/cdn/routes/discover-splashes.ts index d9822fe..e9c07cb 100644 --- a/src/cdn/routes/discover-splashes.ts +++ b/src/cdn/routes/discover-splashes.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/discovery-splashes.ts b/src/cdn/routes/discovery-splashes.ts index c9f8ddf..9d6d81c 100644 --- a/src/cdn/routes/discovery-splashes.ts +++ b/src/cdn/routes/discovery-splashes.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/emojis.ts b/src/cdn/routes/emojis.ts index 761ad00..f11af3b 100644 --- a/src/cdn/routes/emojis.ts +++ b/src/cdn/routes/emojis.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/guild-profiles.ts b/src/cdn/routes/guild-profiles.ts index 279b436..9d27deb 100644 --- a/src/cdn/routes/guild-profiles.ts +++ b/src/cdn/routes/guild-profiles.ts @@ -21,7 +21,7 @@ import { Request, Response, Router } from "express"; import { HTTPError } from "lambert-server"; import { multer } from "../util/multer"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { cache } from "../util/cache"; diff --git a/src/cdn/routes/icons.ts b/src/cdn/routes/icons.ts index c98313f..6ddd49e 100644 --- a/src/cdn/routes/icons.ts +++ b/src/cdn/routes/icons.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/role-icons.ts b/src/cdn/routes/role-icons.ts index 2aaa619..f169309 100644 --- a/src/cdn/routes/role-icons.ts +++ b/src/cdn/routes/role-icons.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/splashes.ts b/src/cdn/routes/splashes.ts index 8a501ec..a10709d 100644 --- a/src/cdn/routes/splashes.ts +++ b/src/cdn/routes/splashes.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/stickers.ts b/src/cdn/routes/stickers.ts index 5821db6..a920694 100644 --- a/src/cdn/routes/stickers.ts +++ b/src/cdn/routes/stickers.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/team-icons.ts b/src/cdn/routes/team-icons.ts index 103974d..c0e7e78 100644 --- a/src/cdn/routes/team-icons.ts +++ b/src/cdn/routes/team-icons.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/util/basicCrdFileRouter.ts b/src/cdn/util/basicCrdFileRouter.ts index d489f37..7490d54 100644 --- a/src/cdn/util/basicCrdFileRouter.ts +++ b/src/cdn/util/basicCrdFileRouter.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/connections/BattleNet/index.ts b/src/connections/BattleNet/index.ts index 843ab79..f7d08cb 100644 --- a/src/connections/BattleNet/index.ts +++ b/src/connections/BattleNet/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { BattleNetSettings } from "./BattleNetSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; interface BattleNetConnectionUser { sub: string; diff --git a/src/connections/Discord/index.ts b/src/connections/Discord/index.ts index ab44f4b..f209a81 100644 --- a/src/connections/Discord/index.ts +++ b/src/connections/Discord/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { DiscordSettings } from "./DiscordSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; interface UserResponse { id: string; diff --git a/src/connections/EpicGames/index.ts b/src/connections/EpicGames/index.ts index 69c44cb..959192e 100644 --- a/src/connections/EpicGames/index.ts +++ b/src/connections/EpicGames/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { EpicGamesSettings } from "./EpicGamesSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; export interface UserResponse { accountId: string; diff --git a/src/connections/Facebook/index.ts b/src/connections/Facebook/index.ts index b661cbe..29317c2 100644 --- a/src/connections/Facebook/index.ts +++ b/src/connections/Facebook/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { FacebookSettings } from "./FacebookSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; export interface FacebookErrorResponse { error: { diff --git a/src/connections/GitHub/index.ts b/src/connections/GitHub/index.ts index 42dc072..df64912 100644 --- a/src/connections/GitHub/index.ts +++ b/src/connections/GitHub/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { GitHubSettings } from "./GitHubSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; interface UserResponse { login: string; diff --git a/src/connections/Reddit/index.ts b/src/connections/Reddit/index.ts index 14faf4a..781e097 100644 --- a/src/connections/Reddit/index.ts +++ b/src/connections/Reddit/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { RedditSettings } from "./RedditSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; export interface UserResponse { verified: boolean; diff --git a/src/connections/Spotify/index.ts b/src/connections/Spotify/index.ts index e1381cf..2186396 100644 --- a/src/connections/Spotify/index.ts +++ b/src/connections/Spotify/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, ConnectionLoader, DiscordApiErrors, RefreshableConnection } from "@spacebar/util"; +import { ConnectedAccount, ConnectionLoader, DiscordApiErrors, RefreshableConnection } from "@spacebar/util"; import wretch from "wretch"; import { SpotifySettings } from "./SpotifySettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; export interface UserResponse { display_name: string; diff --git a/src/connections/Twitch/index.ts b/src/connections/Twitch/index.ts index 84e8b3c..5952caf 100644 --- a/src/connections/Twitch/index.ts +++ b/src/connections/Twitch/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, ConnectionLoader, DiscordApiErrors, RefreshableConnection } from "@spacebar/util"; +import { ConnectedAccount, ConnectionLoader, DiscordApiErrors, RefreshableConnection } from "@spacebar/util"; import wretch from "wretch"; import { TwitchSettings } from "./TwitchSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; interface TwitchConnectionUserResponse { data: { diff --git a/src/connections/Twitter/index.ts b/src/connections/Twitter/index.ts index 46b9289..3c79515 100644 --- a/src/connections/Twitter/index.ts +++ b/src/connections/Twitter/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, ConnectionLoader, DiscordApiErrors, RefreshableConnection } from "@spacebar/util"; +import { ConnectedAccount, ConnectionLoader, DiscordApiErrors, RefreshableConnection } from "@spacebar/util"; import wretch from "wretch"; import { TwitterSettings } from "./TwitterSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; interface TwitterUserResponse { data: { diff --git a/src/connections/Xbox/index.ts b/src/connections/Xbox/index.ts index 184fe76..59d4a00 100644 --- a/src/connections/Xbox/index.ts +++ b/src/connections/Xbox/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { XboxSettings } from "./XboxSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; interface XboxUserResponse { IssueInstant: string; diff --git a/src/connections/Youtube/index.ts b/src/connections/Youtube/index.ts index de452df..2db9289 100644 --- a/src/connections/Youtube/index.ts +++ b/src/connections/Youtube/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { YoutubeSettings } from "./YoutubeSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; interface YouTubeConnectionChannelListResult { items: { diff --git a/src/gateway/Server.ts b/src/gateway/Server.ts index c6419cf..72faa98 100644 --- a/src/gateway/Server.ts +++ b/src/gateway/Server.ts @@ -22,7 +22,7 @@ import ws from "ws"; import { Connection, openConnections } from "./events/Connection"; import http from "http"; -import { cleanupOnStartup } from "./util/Utils"; +import { cleanupOnStartup } from "./util"; import { randomString } from "@spacebar/api"; import { setInterval } from "timers"; diff --git a/src/gateway/listener/listener.ts b/src/gateway/listener/listener.ts index 3a7b626..112f55b 100644 --- a/src/gateway/listener/listener.ts +++ b/src/gateway/listener/listener.ts @@ -31,11 +31,9 @@ Recipient, Relationship, } from "@spacebar/util"; -import { CLOSECODES, OPCODES } from "../util/Constants"; -import { Send } from "../util/Send"; +import { CLOSECODES, OPCODES, Send } from "../util"; import { WebSocket } from "@spacebar/gateway"; import { Channel as AMQChannel } from "amqplib"; -import * as console from "node:console"; import { PublicMember, RelationshipType } from "@spacebar/schemas"; import { bgRedBright } from "picocolors"; diff --git a/src/gateway/opcodes/VoiceStateUpdate.ts b/src/gateway/opcodes/VoiceStateUpdate.ts index 89ead6e..678afad 100644 --- a/src/gateway/opcodes/VoiceStateUpdate.ts +++ b/src/gateway/opcodes/VoiceStateUpdate.ts @@ -18,7 +18,7 @@ import { Payload, WebSocket } from "@spacebar/gateway"; import { Config, emitEvent, Guild, Member, VoiceServerUpdateEvent, VoiceState, VoiceStateUpdateEvent } from "@spacebar/util"; -import { genVoiceToken } from "../util/SessionUtils"; +import { genVoiceToken } from "@spacebar/gateway"; import { check } from "./instanceOf"; import { Region, VoiceStateUpdateSchema } from "@spacebar/schemas"; // TODO: check if a voice server is setup diff --git a/src/schemas/gateway/LazyRequestSchema.ts b/src/schemas/gateway/LazyRequestSchema.ts index fcefe68..0433355 100644 --- a/src/schemas/gateway/LazyRequestSchema.ts +++ b/src/schemas/gateway/LazyRequestSchema.ts @@ -15,32 +15,3 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ - -export interface LazyRequestSchema { - guild_id: string; - channels?: { - /** - * @items.type integer - * @minItems 2 - * @maxItems 2 - */ - [key: string]: number[][]; // puyo: changed from [number, number] because it breaks openapi - }; - activities?: boolean; - threads?: boolean; - typing?: true; - members?: string[]; - member_updates?: boolean; - thread_member_lists?: unknown[]; -} - -export const LazyRequestSchema = { - guild_id: String, - $activities: Boolean, - $channels: Object, - $typing: Boolean, - $threads: Boolean, - $members: [] as string[], - $member_updates: Boolean, - $thread_member_lists: [] as unknown[], -}; diff --git a/src/schemas/responses/AccountStandingResponse.ts b/src/schemas/responses/AccountStandingResponse.ts index bbb8cd8..6f29ebe 100644 --- a/src/schemas/responses/AccountStandingResponse.ts +++ b/src/schemas/responses/AccountStandingResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { Attachment } from "../../util/entities"; +// TODO: remove dependency on entities... +import { Attachment } from "@spacebar/util"; export enum AccountStandingState { ALL_GOOD = 100, diff --git a/src/schemas/responses/DiscoverableGuildsResponse.ts b/src/schemas/responses/DiscoverableGuildsResponse.ts index 3e22c99..02c46f1 100644 --- a/src/schemas/responses/DiscoverableGuildsResponse.ts +++ b/src/schemas/responses/DiscoverableGuildsResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { Guild } from "../../util/entities"; +// TODO: remove dependency on entities +import { Guild } from "@spacebar/util"; export interface DiscoverableGuildsResponse { total: number; diff --git a/src/schemas/responses/EmailDomainLookupVerifyCodeResponse.ts b/src/schemas/responses/EmailDomainLookupVerifyCodeResponse.ts index 6efeaba..b2400e9 100644 --- a/src/schemas/responses/EmailDomainLookupVerifyCodeResponse.ts +++ b/src/schemas/responses/EmailDomainLookupVerifyCodeResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { Guild } from "../../util/entities"; +// TODO: remove dependency on entities +import { Guild } from "@spacebar/util"; export interface EmailDomainLookupVerifyCodeResponse { guild: Guild; diff --git a/src/schemas/responses/GuildMessagesSearchResponse.ts b/src/schemas/responses/GuildMessagesSearchResponse.ts index 6777ad8..555092e 100644 --- a/src/schemas/responses/GuildMessagesSearchResponse.ts +++ b/src/schemas/responses/GuildMessagesSearchResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { Attachment, Role } from "../../util/entities"; +// TODO: remove dependency on entities +import { Attachment, Role } from "@spacebar/util"; import { ActionRowComponent, Embed, MessageType, Poll, PublicUser } from "@spacebar/schemas"; export interface GuildMessagesSearchMessage { diff --git a/src/schemas/responses/GuildRecommendationsResponse.ts b/src/schemas/responses/GuildRecommendationsResponse.ts index 04f9d1e..c8fed07 100644 --- a/src/schemas/responses/GuildRecommendationsResponse.ts +++ b/src/schemas/responses/GuildRecommendationsResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { Guild } from "../../util/entities"; +// TODO: remove dependency on entities +import { Guild } from "@spacebar/util"; export interface GuildRecommendationsResponse { recommended_guilds: Guild[]; diff --git a/src/schemas/responses/HubDirectoryEntriesResponse.ts b/src/schemas/responses/HubDirectoryEntriesResponse.ts index 677199d..c19b6a1 100644 --- a/src/schemas/responses/HubDirectoryEntriesResponse.ts +++ b/src/schemas/responses/HubDirectoryEntriesResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { Guild } from "../../util/entities"; +// TODO: remove dependency on entities +import { Guild } from "@spacebar/util"; export interface HubDirectoryEntry { author_id: string; diff --git a/src/schemas/responses/MemberJoinGuildResponse.ts b/src/schemas/responses/MemberJoinGuildResponse.ts index 1f9bc8c..7508165 100644 --- a/src/schemas/responses/MemberJoinGuildResponse.ts +++ b/src/schemas/responses/MemberJoinGuildResponse.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Emoji, Role, Sticker } from "../../util/entities"; +import { Emoji, Role, Sticker } from "@spacebar/util"; import { GuildCreateResponse } from "@spacebar/schemas"; export interface MemberJoinGuildResponse { diff --git a/src/schemas/responses/TokenResponse.ts b/src/schemas/responses/TokenResponse.ts index 0af06fd..4a0c083 100644 --- a/src/schemas/responses/TokenResponse.ts +++ b/src/schemas/responses/TokenResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { BackupCode, UserSettings } from "../../util/entities"; +// TODO: remove dependency on entities +import { BackupCode, UserSettings } from "@spacebar/util"; export interface TokenResponse { token: string; diff --git a/src/schemas/responses/TypedResponses.ts b/src/schemas/responses/TypedResponses.ts index 13956ec..13143a9 100644 --- a/src/schemas/responses/TypedResponses.ts +++ b/src/schemas/responses/TypedResponses.ts @@ -18,10 +18,11 @@ import { GeneralConfiguration, LimitsConfiguration } from "../../util/config/types"; import { DmChannelDTO } from "../../util/dtos"; -import { Application, BackupCode, Categories, Channel, Emoji, Guild, Invite, Member, Message, Role, Sticker, StickerPack, Template, Webhook } from "../../util/entities"; +import { Application, BackupCode, Categories, Channel, Emoji, Guild, Invite, Member, Message, Role, Sticker, StickerPack, Template, Webhook } from "@spacebar/util"; import { GuildVoiceRegion } from "./GuildVoiceRegionsResponse"; import { GuildBansResponse, GuildCreateResponse, PrivateUser, PublicMember, PublicUser } from "@spacebar/schemas"; +// TODO: remove this entire file! // removes internal properties from the guild class export type APIGuild = Omit; diff --git a/src/schemas/responses/WebhookCreateResponse.ts b/src/schemas/responses/WebhookCreateResponse.ts index 1246c74..08d997f 100644 --- a/src/schemas/responses/WebhookCreateResponse.ts +++ b/src/schemas/responses/WebhookCreateResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { User, Webhook } from "../../util/entities"; +// TODO: remove dependency on entities +import { User, Webhook } from "@spacebar/util"; export interface WebhookCreateResponse { user: User; diff --git a/src/schemas/uncategorised/ConnectedAccountSchema.ts b/src/schemas/uncategorised/ConnectedAccountSchema.ts index c1d24d7..a754f9f 100644 --- a/src/schemas/uncategorised/ConnectedAccountSchema.ts +++ b/src/schemas/uncategorised/ConnectedAccountSchema.ts @@ -16,8 +16,6 @@ along with this program. If not, see . */ -import { ConnectedAccountTokenData } from "../../util/interfaces"; - export interface ConnectedAccountSchema { external_id: string; user_id: string; @@ -34,3 +32,21 @@ metadata_visibility?: number; two_way_link?: boolean; } + +export interface ConnectedAccountCommonOAuthTokenResponse { + access_token: string; + token_type: string; + scope: string; + refresh_token?: string; + expires_in?: number; +} + +export interface ConnectedAccountTokenData { + access_token: string; + token_type?: string; + scope?: string; + refresh_token?: string; + expires_in?: number; + expires_at?: number; + fetched_at: number; +} diff --git a/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts b/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts index 32be9dd..272110c 100644 --- a/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts +++ b/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts @@ -1,5 +1,3 @@ -import { LazyRequestSchema } from "../gateway/LazyRequestSchema"; - export interface GuildSubscriptionsBulkSchema { subscriptions: { [key: string]: GuildSubscriptionSchema }; } @@ -9,3 +7,32 @@ export const GuildSubscriptionsBulkSchema = { $subscriptions: Object, }; + +export interface LazyRequestSchema { + guild_id: string; + channels?: { + /** + * @items.type integer + * @minItems 2 + * @maxItems 2 + */ + [key: string]: number[][]; // puyo: changed from [number, number] because it breaks openapi + }; + activities?: boolean; + threads?: boolean; + typing?: true; + members?: string[]; + member_updates?: boolean; + thread_member_lists?: unknown[]; +} + +export const LazyRequestSchema = { + guild_id: String, + $activities: Boolean, + $channels: Object, + $typing: Boolean, + $threads: Boolean, + $members: [] as string[], + $member_updates: Boolean, + $thread_member_lists: [] as unknown[], +}; diff --git a/src/util/connections/ConnectionConfig.ts b/src/util/connections/ConnectionConfig.ts index a5e0095..c5da387 100644 --- a/src/util/connections/ConnectionConfig.ts +++ b/src/util/connections/ConnectionConfig.ts @@ -17,7 +17,7 @@ */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { ConnectionConfigEntity } from "../entities/ConnectionConfigEntity"; +import { ConnectionConfigEntity } from "../entities"; import { OrmUtils } from "../imports"; let config: any; diff --git a/src/util/connections/RefreshableConnection.ts b/src/util/connections/RefreshableConnection.ts index 32cf36a..3d7761f 100644 --- a/src/util/connections/RefreshableConnection.ts +++ b/src/util/connections/RefreshableConnection.ts @@ -17,8 +17,8 @@ */ import { ConnectedAccount } from "../entities"; -import { ConnectedAccountCommonOAuthTokenResponse } from "../interfaces"; import { Connection } from "./Connection"; +import { ConnectedAccountCommonOAuthTokenResponse } from "@spacebar/schemas"; /** * A connection that can refresh its token. diff --git a/src/util/entities/Attachment.ts b/src/util/entities/Attachment.ts index c6858eb..9dc9c3a 100644 --- a/src/util/entities/Attachment.ts +++ b/src/util/entities/Attachment.ts @@ -18,7 +18,7 @@ import { BeforeRemove, Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm"; import { URL } from "url"; -import { deleteFile } from "../util/cdn"; +import { deleteFile } from "../util"; import { BaseClass } from "./BaseClass"; import { getUrlSignature, NewUrlUserSignatureData, NewUrlSignatureData } from "../Signing"; diff --git a/src/util/entities/BaseClass.ts b/src/util/entities/BaseClass.ts index ad8338e..24a3aee 100644 --- a/src/util/entities/BaseClass.ts +++ b/src/util/entities/BaseClass.ts @@ -17,10 +17,9 @@ */ import { BaseEntity, BeforeInsert, BeforeUpdate, Column, ColumnOptions, FindOptionsWhere, ObjectIdColumn, PrimaryColumn } from "typeorm"; -import { Snowflake } from "../util/Snowflake"; -import { getDatabase } from "../util/Database"; -import { OrmUtils } from "../imports/OrmUtils"; -import { annotationsKey, JsonNumber } from "../util/Decorators"; +import { Snowflake, getDatabase } from "../util"; +import { OrmUtils } from "../imports"; +import { annotationsKey } from "../util/Decorators"; export class BaseClassWithoutId extends BaseEntity { private get construct() { diff --git a/src/util/entities/ConnectedAccount.ts b/src/util/entities/ConnectedAccount.ts index 7c5ffb5..6a5fed7 100644 --- a/src/util/entities/ConnectedAccount.ts +++ b/src/util/entities/ConnectedAccount.ts @@ -17,9 +17,9 @@ */ import { Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm"; -import { ConnectedAccountTokenData } from "../interfaces"; import { BaseClass } from "./BaseClass"; import { User } from "./User"; +import { ConnectedAccountTokenData } from "@spacebar/schemas"; @Entity({ name: "connected_accounts", diff --git a/src/util/entities/Member.ts b/src/util/entities/Member.ts index 401c51b..6d93cf5 100644 --- a/src/util/entities/Member.ts +++ b/src/util/entities/Member.ts @@ -21,8 +21,7 @@ import { Ban, Channel, PublicGuildRelations } from "."; import { ReadyGuildDTO } from "../dtos"; import { GuildCreateEvent, GuildDeleteEvent, GuildMemberAddEvent, GuildMemberRemoveEvent, GuildMemberUpdateEvent, MessageCreateEvent } from "../interfaces"; -import { Config, emitEvent } from "../util"; -import { DiscordApiErrors } from "../util/Constants"; +import { Config, emitEvent, DiscordApiErrors } from "../util"; import { BaseClassWithoutId } from "./BaseClass"; import { Guild } from "./Guild"; import { Message } from "./Message"; diff --git a/src/util/entities/Message.ts b/src/util/entities/Message.ts index bedd5ae..a4448a1 100644 --- a/src/util/entities/Message.ts +++ b/src/util/entities/Message.ts @@ -20,7 +20,7 @@ import { Member } from "./Member"; import { Role } from "./Role"; import { Channel } from "./Channel"; -import { InteractionType } from "../interfaces/Interaction"; +import { InteractionType } from "../interfaces"; import { Application } from "./Application"; import { Column, CreateDateColumn, Entity, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany, RelationId, FindOneOptions, Raw, Not, BaseEntity, In } from "typeorm"; import { BaseClass } from "./BaseClass"; diff --git a/src/util/interfaces/ConnectedAccount.ts b/src/util/interfaces/ConnectedAccount.ts index 57cda25..0433355 100644 --- a/src/util/interfaces/ConnectedAccount.ts +++ b/src/util/interfaces/ConnectedAccount.ts @@ -15,21 +15,3 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ - -export interface ConnectedAccountCommonOAuthTokenResponse { - access_token: string; - token_type: string; - scope: string; - refresh_token?: string; - expires_in?: number; -} - -export interface ConnectedAccountTokenData { - access_token: string; - token_type?: string; - scope?: string; - refresh_token?: string; - expires_in?: number; - expires_at?: number; - fetched_at: number; -} diff --git a/src/util/util/Config.ts b/src/util/util/Config.ts index 1cd24b9..27f0b45 100644 --- a/src/util/util/Config.ts +++ b/src/util/util/Config.ts @@ -20,7 +20,7 @@ import fs from "fs/promises"; import { OrmUtils } from ".."; import { ConfigValue } from "../config"; -import { ConfigEntity } from "../entities/Config"; +import { ConfigEntity } from "../entities"; import { JsonValue } from "@protobuf-ts/runtime"; // TODO: yaml instead of json diff --git a/src/webrtc/Server.ts b/src/webrtc/Server.ts index bc26f3d..ff98fe5 100644 --- a/src/webrtc/Server.ts +++ b/src/webrtc/Server.ts @@ -21,7 +21,7 @@ import http from "http"; import ws from "ws"; import { Connection } from "./events/Connection"; -import { loadWebRtcLibrary, mediaServer, WRTC_PORT_MAX, WRTC_PORT_MIN, WRTC_PUBLIC_IP } from "./util/MediaServer"; +import { loadWebRtcLibrary, mediaServer, WRTC_PORT_MAX, WRTC_PORT_MIN, WRTC_PUBLIC_IP } from "./util"; import { green, yellow } from "picocolors"; export class Server {