From ff48d078e4fe163ca0553501f979e3f5c7d251ab Mon Sep 17 00:00:00 2001 From: TomatoCake <60300461+DEVTomatoCake@users.noreply.github.com> Date: Sat, 17 Aug 2024 19:15:32 +0200 Subject: [PATCH 1/3] Trying to fix guild response schemas --- assets/openapi.json | Bin 617024 -> 617733 bytes assets/schemas.json | Bin 21209522 -> 24192271 bytes src/api/routes/guilds/#guild_id/index.ts | 10 +++--- src/util/interfaces/Event.ts | 4 +-- src/util/schemas/GuildCreateSchema.ts | 7 ++--- src/util/schemas/GuildUpdateSchema.ts | 10 +++--- .../schemas/responses/GuildCreateResponse.ts | 29 +++++++++++++++--- .../responses/MemberJoinGuildResponse.ts | 11 ++++--- src/util/schemas/responses/TypedResponses.ts | 3 +- 9 files changed, 47 insertions(+), 27 deletions(-) diff --git a/assets/openapi.json b/assets/openapi.json index 2af0a2c700b59b034ce0c5ad1fdb65d6592a5404..2adbc67e5e2c4e792e7c80b135bdcf1049ed510c 100644 GIT binary patch delta 873 zcmdUtQAkr!7{@u^J!fvXrbunN=~&SUF>A|uh=E;*&`N0KgFToHS*}d+B8wt|78QyK zUHZVUmu%Q$Fej@{pw-QKtQ@qUCX^6C4+=|ydNI0F_7L^ZYYzv``M$%S-~Z3w$oa43 z{fVpWJ~RnRFET;KD`gS`HW!5j>!P`1ydT38O{g_DqI#ESK1|qw#{F=TJW(DcZ8vn^ zT()68^#+qO6|$iLG7J-2PvF9w1uJH~r0LL4>1Uvl;f8~&w^e!H5AHy%rGqX!h6wsH z6{Mf$om7bNUP`uePIX?$k?|ZxxMywpdARQ#Mh- zA#42Rg0XroRDW0{(%tt6^LApE-Udr~EUATBwDW}2f%t={hvyHtq=cY^p zRvu}l!WVF&UR5nWtIGVSTzajX*-P1S%VtzRx#h5fSMMh^z&iiy9{G;)jenGBXduqb qBjiBb(p4yWz9qHqLT9qDY&pkddY5QZDA{T`JS6(cr0BDTe*OZnj8&rm delta 485 zcma)&!Ap~I9LD*5-{1Sbo3b)mf)(p+AeqF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RR;=UNu;}8n939qhLfx2a*bAlz`DlI8v;9o5_s^H*cbGF6@-A%y2u~u_GL>U{gPNUqMz58 zkAh#0j<&^)e>v)Ue@xIz*~k;D&&75b$<_(%wZhnl)hzAy_}`eCPkX#VFiV`GdZ8>! zRKBvk+NG?9)mr5`Qg8e9BH5coG}F-WUwuX23){96p4LDI~VV z1&%PiF~m{wKS+fOps#X_(snP*^DqsWVao6K;K<_w-3lT#mAOfn{BRAa`ssat;J(=u zaMmVCzCvh>|M`)xmmRrB3(SBl+Wrg6>J7P`FmPVy1QL=U|l|eK(gCqyd z&GNPRU6O{`$t7Tn&9w|o%&0lVLa(5BI_)j{Na!YH)`$Ud1{aL. */ @@ -77,8 +77,8 @@ router.patch( requestBody: "GuildUpdateSchema", permission: "MANAGE_GUILD", responses: { - "200": { - body: "GuildUpdateSchema", + 200: { + body: "GuildCreateResponse", }, 401: { body: "APIErrorResponse", diff --git a/src/util/interfaces/Event.ts b/src/util/interfaces/Event.ts index a31e2263..253a013c 100644 --- a/src/util/interfaces/Event.ts +++ b/src/util/interfaces/Event.ts @@ -28,7 +28,6 @@ import { Role, Emoji, PublicMember, - Guild, Channel, PublicUser, User, @@ -43,6 +42,7 @@ import { ReadyUserGuildSettingsEntries, ReadyPrivateChannel, GuildOrUnavailable, + GuildCreateResponse, } from "@spacebar/util"; export interface Event { @@ -195,7 +195,7 @@ export interface GuildCreateEvent extends Event { export interface GuildUpdateEvent extends Event { event: "GUILD_UPDATE"; - data: Guild; + data: GuildCreateResponse; } export interface GuildDeleteEvent extends Event { diff --git a/src/util/schemas/GuildCreateSchema.ts b/src/util/schemas/GuildCreateSchema.ts index f7138991..41e3b214 100644 --- a/src/util/schemas/GuildCreateSchema.ts +++ b/src/util/schemas/GuildCreateSchema.ts @@ -1,17 +1,17 @@ /* Spacebar: A FOSS re-implementation and extension of the Discord.com backend. Copyright (C) 2023 Spacebar and Spacebar Contributors - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ @@ -26,7 +26,6 @@ export interface GuildCreateSchema { region?: string; icon?: string | null; channels?: ChannelModifySchema[]; - guild_template_code?: string; system_channel_id?: string; rules_channel_id?: string; } diff --git a/src/util/schemas/GuildUpdateSchema.ts b/src/util/schemas/GuildUpdateSchema.ts index 19316380..938daa1f 100644 --- a/src/util/schemas/GuildUpdateSchema.ts +++ b/src/util/schemas/GuildUpdateSchema.ts @@ -1,26 +1,24 @@ /* Spacebar: A FOSS re-implementation and extension of the Discord.com backend. Copyright (C) 2023 Spacebar and Spacebar Contributors - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ import { GuildCreateSchema } from "@spacebar/util"; -export interface GuildUpdateSchema - extends Omit { - name?: string; +export interface GuildUpdateSchema extends Omit { banner?: string | null; splash?: string | null; description?: string; diff --git a/src/util/schemas/responses/GuildCreateResponse.ts b/src/util/schemas/responses/GuildCreateResponse.ts index 5b2bf25d..50f5f2fc 100644 --- a/src/util/schemas/responses/GuildCreateResponse.ts +++ b/src/util/schemas/responses/GuildCreateResponse.ts @@ -1,21 +1,42 @@ /* Spacebar: A FOSS re-implementation and extension of the Discord.com backend. Copyright (C) 2023 Spacebar and Spacebar Contributors - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -export interface GuildCreateResponse { +import { GuildUpdateSchema, GuildWelcomeScreen } from "@spacebar/util"; + +export interface GuildCreateResponse extends Omit { id: string; + name: string; + primary_category_id: string | undefined; + large: boolean | undefined; + max_members: number | undefined; + max_presences: number | undefined; + max_video_channel_users: number | undefined; + member_count: number | undefined; + presence_count: number | undefined; + template_id: string | undefined; + mfa_level: number | undefined; + owner_id: string | undefined; + premium_subscription_count: number | undefined; + premium_tier: number | undefined; + welcome_screen: GuildWelcomeScreen; + widget_channel_id: string | undefined; + widget_enabled: boolean; + nsfw_level: number | undefined; + nsfw: boolean; + parent: string | undefined; } diff --git a/src/util/schemas/responses/MemberJoinGuildResponse.ts b/src/util/schemas/responses/MemberJoinGuildResponse.ts index b5c290b9..67d2de01 100644 --- a/src/util/schemas/responses/MemberJoinGuildResponse.ts +++ b/src/util/schemas/responses/MemberJoinGuildResponse.ts @@ -1,25 +1,26 @@ /* Spacebar: A FOSS re-implementation and extension of the Discord.com backend. Copyright (C) 2023 Spacebar and Spacebar Contributors - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -import { Emoji, Guild, Role, Sticker } from "../../entities"; +import { GuildCreateResponse } from "@spacebar/util"; +import { Emoji, Role, Sticker } from "../../entities"; export interface MemberJoinGuildResponse { - guild: Guild; + guild: GuildCreateResponse; emojis: Emoji[]; roles: Role[]; stickers: Sticker[]; diff --git a/src/util/schemas/responses/TypedResponses.ts b/src/util/schemas/responses/TypedResponses.ts index 8214ff7b..3b864781 100644 --- a/src/util/schemas/responses/TypedResponses.ts +++ b/src/util/schemas/responses/TypedResponses.ts @@ -16,6 +16,7 @@ along with this program. If not, see . */ +import { GuildCreateResponse } from "@spacebar/util"; import { GeneralConfiguration, LimitsConfiguration } from "../../config"; import { DmChannelDTO } from "../../dtos"; import { @@ -89,7 +90,7 @@ export type APIEmojiArray = Emoji[]; export type APIMemberArray = Member[]; export type APIPublicMember = PublicMember; -export interface APIGuildWithJoinedAt extends Guild { +export interface APIGuildWithJoinedAt extends GuildCreateResponse { joined_at: string; } From c53752a4601c56e1aa9367a2c10f4c2548ba6062 Mon Sep 17 00:00:00 2001 From: TomatoCake <60300461+DEVTomatoCake@users.noreply.github.com> Date: Thu, 22 Aug 2024 05:29:00 +0200 Subject: [PATCH 2/3] Run openapi.js from #1193 --- assets/openapi.json | Bin 610864 -> 610464 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/assets/openapi.json b/assets/openapi.json index e2b3004d3d95598f9d7accd4d0f3521e486e6187..14d13fa44732ad06f5b834f6dd7938d3d1a44e18 100644 GIT binary patch delta 43 zcmdn6M0LSJ)rJF7M2#)7Pc1l7LF~P_eG{Z@L_eHF2}`bv;CbIr;{}RRZ9+} delta 43 zcmZ3mP<6u+)rJF7M2#)7Pc1l7LF~P_eCZ*h>35%{)poT Date: Thu, 22 Aug 2024 05:33:25 +0200 Subject: [PATCH 3/3] Run prettier --- src/api/routes/guilds/#guild_id/widget.json.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/routes/guilds/#guild_id/widget.json.ts b/src/api/routes/guilds/#guild_id/widget.json.ts index 0ee3640d..6c272e81 100644 --- a/src/api/routes/guilds/#guild_id/widget.json.ts +++ b/src/api/routes/guilds/#guild_id/widget.json.ts @@ -52,7 +52,7 @@ router.get( }), async (req: Request, res: Response) => { const { guild_id } = req.params; - + const guild = await Guild.findOneOrFail({ where: { id: guild_id }, select: {