summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-03-14 05:43:24 +0100
committerRory& <root@rory.gay>2026-03-14 05:43:42 +0100
commit8bb0b84b5e2260dc9bbd6cf90ca4dddeb91b1a02 (patch)
treea9206491206888ed464353c3c5570620b2ea3352
parentRemove unused imports for entities (diff)
downloadserver-ts-8bb0b84b5e2260dc9bbd6cf90ca4dddeb91b1a02.tar.xz
Shorten imports
-rw-r--r--assets/openapi.json174
-rw-r--r--assets/schemas.json178
-rw-r--r--src/api/routes/channels/#channel_id/messages/#message_id/index.ts2
-rw-r--r--src/api/routes/connections/#connection_name/authorize.ts2
-rw-r--r--src/api/routes/guilds/#guild_id/widget.png.ts2
-rw-r--r--src/cdn/routes/app-assets.ts2
-rw-r--r--src/cdn/routes/app-icons.ts2
-rw-r--r--src/cdn/routes/attachments.ts4
-rw-r--r--src/cdn/routes/avatar-decoration-presets.ts2
-rw-r--r--src/cdn/routes/avatars.ts2
-rw-r--r--src/cdn/routes/badge-icons.ts2
-rw-r--r--src/cdn/routes/banners.ts2
-rw-r--r--src/cdn/routes/channel-icons.ts2
-rw-r--r--src/cdn/routes/discover-splashes.ts2
-rw-r--r--src/cdn/routes/discovery-splashes.ts2
-rw-r--r--src/cdn/routes/emojis.ts2
-rw-r--r--src/cdn/routes/guild-profiles.ts2
-rw-r--r--src/cdn/routes/icons.ts2
-rw-r--r--src/cdn/routes/role-icons.ts2
-rw-r--r--src/cdn/routes/splashes.ts2
-rw-r--r--src/cdn/routes/stickers.ts2
-rw-r--r--src/cdn/routes/team-icons.ts2
-rw-r--r--src/cdn/util/basicCrdFileRouter.ts2
-rw-r--r--src/connections/BattleNet/index.ts4
-rw-r--r--src/connections/Discord/index.ts4
-rw-r--r--src/connections/EpicGames/index.ts4
-rw-r--r--src/connections/Facebook/index.ts4
-rw-r--r--src/connections/GitHub/index.ts4
-rw-r--r--src/connections/Reddit/index.ts4
-rw-r--r--src/connections/Spotify/index.ts4
-rw-r--r--src/connections/Twitch/index.ts4
-rw-r--r--src/connections/Twitter/index.ts4
-rw-r--r--src/connections/Xbox/index.ts4
-rw-r--r--src/connections/Youtube/index.ts4
-rw-r--r--src/gateway/Server.ts2
-rw-r--r--src/gateway/listener/listener.ts4
-rw-r--r--src/gateway/opcodes/VoiceStateUpdate.ts2
-rw-r--r--src/schemas/gateway/LazyRequestSchema.ts29
-rw-r--r--src/schemas/responses/AccountStandingResponse.ts3
-rw-r--r--src/schemas/responses/DiscoverableGuildsResponse.ts3
-rw-r--r--src/schemas/responses/EmailDomainLookupVerifyCodeResponse.ts3
-rw-r--r--src/schemas/responses/GuildMessagesSearchResponse.ts3
-rw-r--r--src/schemas/responses/GuildRecommendationsResponse.ts3
-rw-r--r--src/schemas/responses/HubDirectoryEntriesResponse.ts3
-rw-r--r--src/schemas/responses/MemberJoinGuildResponse.ts2
-rw-r--r--src/schemas/responses/TokenResponse.ts3
-rw-r--r--src/schemas/responses/TypedResponses.ts3
-rw-r--r--src/schemas/responses/WebhookCreateResponse.ts3
-rw-r--r--src/schemas/uncategorised/ConnectedAccountSchema.ts20
-rw-r--r--src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts31
-rw-r--r--src/util/connections/ConnectionConfig.ts2
-rw-r--r--src/util/connections/RefreshableConnection.ts2
-rw-r--r--src/util/entities/Attachment.ts2
-rw-r--r--src/util/entities/BaseClass.ts7
-rw-r--r--src/util/entities/ConnectedAccount.ts2
-rw-r--r--src/util/entities/Member.ts3
-rw-r--r--src/util/entities/Message.ts2
-rw-r--r--src/util/interfaces/ConnectedAccount.ts18
-rw-r--r--src/util/util/Config.ts2
-rw-r--r--src/webrtc/Server.ts2
60 files changed, 300 insertions, 299 deletions
diff --git a/assets/openapi.json b/assets/openapi.json

index c2718ee8..85292bc3 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 0bd0aced..75c9d904 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/#channel_id/messages/#message_id/index.ts b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts
index 96ff98e1..233d1381 100644 --- a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts +++ b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts
@@ -34,7 +34,7 @@ import { 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/#connection_name/authorize.ts b/src/api/routes/connections/#connection_name/authorize.ts
index b74fd861..7d3d03eb 100644 --- a/src/api/routes/connections/#connection_name/authorize.ts +++ b/src/api/routes/connections/#connection_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/#guild_id/widget.png.ts b/src/api/routes/guilds/#guild_id/widget.png.ts
index 875761e6..ee623214 100644 --- a/src/api/routes/guilds/#guild_id/widget.png.ts +++ b/src/api/routes/guilds/#guild_id/widget.png.ts
@@ -24,7 +24,7 @@ import { Request, Response, Router } from "express"; 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 572cb3aa..149d8b35 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 b8ab98b9..b67bc1fb 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 86a7f0c8..87d96a4c 100644 --- a/src/cdn/routes/attachments.ts +++ b/src/cdn/routes/attachments.ts
@@ -21,8 +21,8 @@ import { Request, Response, Router } from "express"; 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 736a281d..591e0ab1 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 793bc45b..f2d539bd 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 829baeb1..33134e1a 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 211643f9..979bdad0 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 946759dd..3b85d4e4 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 d9822feb..e9c07cb1 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 c9f8ddf7..9d6d81c7 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 761ad00e..f11af3ba 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 279b4361..9d27debf 100644 --- a/src/cdn/routes/guild-profiles.ts +++ b/src/cdn/routes/guild-profiles.ts
@@ -21,7 +21,7 @@ import crypto from "crypto"; 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 c98313f4..6ddd49e9 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 2aaa6197..f169309c 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 8a501ec4..a10709d7 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 5821db67..a9206949 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 103974da..c0e7e785 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 d489f373..7490d546 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 843ab79b..f7d08cbe 100644 --- a/src/connections/BattleNet/index.ts +++ b/src/connections/BattleNet/index.ts
@@ -16,10 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 ab44f4b3..f209a81b 100644 --- a/src/connections/Discord/index.ts +++ b/src/connections/Discord/index.ts
@@ -16,10 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 69c44cb0..959192e6 100644 --- a/src/connections/EpicGames/index.ts +++ b/src/connections/EpicGames/index.ts
@@ -16,10 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 b661cbe8..29317c2e 100644 --- a/src/connections/Facebook/index.ts +++ b/src/connections/Facebook/index.ts
@@ -16,10 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 42dc0724..df64912a 100644 --- a/src/connections/GitHub/index.ts +++ b/src/connections/GitHub/index.ts
@@ -16,10 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 14faf4a6..781e097a 100644 --- a/src/connections/Reddit/index.ts +++ b/src/connections/Reddit/index.ts
@@ -16,10 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 e1381cf2..2186396b 100644 --- a/src/connections/Spotify/index.ts +++ b/src/connections/Spotify/index.ts
@@ -16,10 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 84e8b3c0..5952caf1 100644 --- a/src/connections/Twitch/index.ts +++ b/src/connections/Twitch/index.ts
@@ -16,10 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 46b9289a..3c79515b 100644 --- a/src/connections/Twitter/index.ts +++ b/src/connections/Twitter/index.ts
@@ -16,10 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 184fe763..59d4a005 100644 --- a/src/connections/Xbox/index.ts +++ b/src/connections/Xbox/index.ts
@@ -16,10 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 de452dff..2db9289f 100644 --- a/src/connections/Youtube/index.ts +++ b/src/connections/Youtube/index.ts
@@ -16,10 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 c6419cfa..72faa983 100644 --- a/src/gateway/Server.ts +++ b/src/gateway/Server.ts
@@ -22,7 +22,7 @@ import { checkToken, closeDatabase, Config, initDatabase, initEvent, Rights } fr 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 3a7b626c..112f55bb 100644 --- a/src/gateway/listener/listener.ts +++ b/src/gateway/listener/listener.ts
@@ -31,11 +31,9 @@ import { 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 89ead6e7..678afad8 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 fcefe680..0433355c 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 <https://www.gnu.org/licenses/>. */ - -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 bbb8cd85..6f29ebef 100644 --- a/src/schemas/responses/AccountStandingResponse.ts +++ b/src/schemas/responses/AccountStandingResponse.ts
@@ -16,7 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 3e22c992..02c46f1c 100644 --- a/src/schemas/responses/DiscoverableGuildsResponse.ts +++ b/src/schemas/responses/DiscoverableGuildsResponse.ts
@@ -16,7 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 6efeaba6..b2400e95 100644 --- a/src/schemas/responses/EmailDomainLookupVerifyCodeResponse.ts +++ b/src/schemas/responses/EmailDomainLookupVerifyCodeResponse.ts
@@ -16,7 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 6777ad8a..555092ee 100644 --- a/src/schemas/responses/GuildMessagesSearchResponse.ts +++ b/src/schemas/responses/GuildMessagesSearchResponse.ts
@@ -16,7 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 04f9d1ef..c8fed072 100644 --- a/src/schemas/responses/GuildRecommendationsResponse.ts +++ b/src/schemas/responses/GuildRecommendationsResponse.ts
@@ -16,7 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 677199d3..c19b6a14 100644 --- a/src/schemas/responses/HubDirectoryEntriesResponse.ts +++ b/src/schemas/responses/HubDirectoryEntriesResponse.ts
@@ -16,7 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 1f9bc8c9..75081656 100644 --- a/src/schemas/responses/MemberJoinGuildResponse.ts +++ b/src/schemas/responses/MemberJoinGuildResponse.ts
@@ -16,7 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 0af06fd1..4a0c0834 100644 --- a/src/schemas/responses/TokenResponse.ts +++ b/src/schemas/responses/TokenResponse.ts
@@ -16,7 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 13956ec8..13143a9f 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<Guild, "afk_channel" | "template" | "owner" | "public_updates_channel" | "rules_channel" | "system_channel" | "widget_channel">; diff --git a/src/schemas/responses/WebhookCreateResponse.ts b/src/schemas/responses/WebhookCreateResponse.ts
index 1246c742..08d997fb 100644 --- a/src/schemas/responses/WebhookCreateResponse.ts +++ b/src/schemas/responses/WebhookCreateResponse.ts
@@ -16,7 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -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 c1d24d70..a754f9f4 100644 --- a/src/schemas/uncategorised/ConnectedAccountSchema.ts +++ b/src/schemas/uncategorised/ConnectedAccountSchema.ts
@@ -16,8 +16,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { ConnectedAccountTokenData } from "../../util/interfaces"; - export interface ConnectedAccountSchema { external_id: string; user_id: string; @@ -34,3 +32,21 @@ export interface ConnectedAccountSchema { 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 32be9dd0..272110c5 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 type GuildSubscriptionSchema = Omit<LazyRequestSchema, "guild_id">; 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 a5e0095a..c5da3878 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 32cf36ac..3d7761f7 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 c6858eb8..9dc9c3ac 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 ad8338e7..24a3aee1 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 7c5ffb55..6a5fed75 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 401c51be..6d93cf5d 100644 --- a/src/util/entities/Member.ts +++ b/src/util/entities/Member.ts
@@ -21,8 +21,7 @@ import { BeforeInsert, BeforeUpdate, Column, Entity, Index, JoinColumn, JoinTabl 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 bedd5aee..a4448a14 100644 --- a/src/util/entities/Message.ts +++ b/src/util/entities/Message.ts
@@ -20,7 +20,7 @@ import { User } from "./User"; 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 57cda25d..0433355c 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 <https://www.gnu.org/licenses/>. */ - -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 1cd24b90..27f0b450 100644 --- a/src/util/util/Config.ts +++ b/src/util/util/Config.ts
@@ -20,7 +20,7 @@ import { existsSync } from "fs"; 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 bc26f3d1..ff98fe57 100644 --- a/src/webrtc/Server.ts +++ b/src/webrtc/Server.ts
@@ -21,7 +21,7 @@ import { closeDatabase, Config, initDatabase, initEvent } from "@spacebar/util"; 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 {