From 404da008ba40b98cf3f270504b95ef0586e7df91 Mon Sep 17 00:00:00 2001 From: Rory& Date: Tue, 22 Sep 2026 07:35:18 +0200 Subject: [PATCH] Export spacebar specific schemas --- assets/openapi.json | Bin 1100978 -> 1105194 bytes assets/schemas.json | Bin 515460 -> 517511 bytes src/database/entities/AvatarDecoration.ts | 9 ++++----- src/schemas/api/index.ts | 1 + src/schemas/api/spacebar/index.ts | 23 ++++++++++++++++++++++ 5 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 src/schemas/api/spacebar/index.ts diff --git a/assets/openapi.json b/assets/openapi.json index e9c892ee2725a41eff0c74d17543480abec5e78e..eb5234e6db7254e2c92fe96ce106387879d15b22 100644 GIT binary patch delta 595 zcmb`@KWI}?6b5kK-}7$%-qP}_wrB$inVM%eJCp~Fg(`>+aT1J@Y!QP$B-w93(iVg$xH*K7MchQB4p#6wDV;m~rth5Zz*%ohzj!m<+HWp+ zVbu#2NflnG9o!VZuIizVXIUcuLvszQ&*P`yPO>DNw8imqk!-))^!&-tKAHttGUZOv z|B-v}+KqM<)DxB=f+zG*!S5>V$)F&{YBWb$u3W&YMH)nSNxKctR!w+M=?0t)m5{E{ zI9es;ih8R6#ib>Tx!PIuI9Lig)f-aILTZm;N0&1Lry$forO>khd%x z)+lp)ZNU;Te11&lj-he_JZ)t}kkf~TMa9q`UB=dZeW1Eq(j`MO#cqkd+to&$Buipa zM2bo=DJ~_Xq-fN6;9zQ#+sZsrUt%`eE0Ja76VX8oZSe_sJM8Pf#~1h1QIs#n8JrHw z3HN6#rJ&g6>v-2^Grrb2iJqw&^7ZUJK8@1})Hhfb-`?_3xGlB=?|j6Dv&j?U!Zx3a F{sBr+;MV{E delta 229 zcmZ3r%X!mG=M5(oPgmH3Ghz7ZC^b7E+>l^SiJef z;`S4Z8G)E-`-#QO-{QB=GiPb@-oBriWeLmnE(I15@#z5yOx)8II$3zzt(#eZm=%cG zwp%x|zY&AmA~5|~9<%6lffG#b+ZBXZE;CP;7h&O;-oVGQA0adOz%AD4zr diff --git a/assets/schemas.json b/assets/schemas.json index 2ac0c2d1612fbe82c95ea2ad92ad4556a5c38821..e08fc88b1498aef78ec1f4b3cd5a1a9f0b5d0360 100644 GIT binary patch delta 336 zcmZqKE#H1xeuG>`^OMf@C!LJjpL8}FT z^H_>fbMvQvoXadf`NOBk=?zva=F<=9zw0hMBj0!vkg@X4$^s0jtUsBtzM%*kZOn u@Mb#3xLu%`xs`FcP95{v=|EAJ>H6kO9NT^Cnd8~ouavNDzf!`!xc~stjW_!M diff --git a/src/database/entities/AvatarDecoration.ts b/src/database/entities/AvatarDecoration.ts index 695de8850..97bd13415 100644 --- a/src/database/entities/AvatarDecoration.ts +++ b/src/database/entities/AvatarDecoration.ts @@ -17,8 +17,7 @@ */ import { Column, Entity, Index, JoinColumn, ManyToOne, RelationId } from "typeorm"; -import { AvatarDecorationData } from "@spacebar/schemas"; -import { PublicAvatarDecoration } from "@spacebar/schemas/api/spacebar/AvatarDecorations"; +import { AvatarDecorationData, PublicAvatarDecorationResponse } from "@spacebar/schemas"; import { BaseClass } from "./BaseClass"; import { User } from "./User"; @@ -62,13 +61,13 @@ export class AvatarDecorations extends BaseClass { } satisfies AvatarDecorationData; } - toPublicAvatarDecoration(opts?: {available: boolean}): PublicAvatarDecoration { + toPublicAvatarDecoration(opts?: { available: boolean }): PublicAvatarDecorationResponse { return { id: this.id, approved: this.approved, uploader: this.uploader.toPartialUser(), public: this.public, - available: opts?.available ?? this.public - } satisfies PublicAvatarDecoration; + available: opts?.available ?? this.public, + } satisfies PublicAvatarDecorationResponse; } } diff --git a/src/schemas/api/index.ts b/src/schemas/api/index.ts index 42888e435..1c6c251d4 100644 --- a/src/schemas/api/index.ts +++ b/src/schemas/api/index.ts @@ -23,4 +23,5 @@ export * from "./guilds"; export * from "./integrations"; export * from "./messages"; export * from "./reports"; +export * from "./spacebar"; export * from "./users"; diff --git a/src/schemas/api/spacebar/index.ts b/src/schemas/api/spacebar/index.ts new file mode 100644 index 000000000..a973fdb80 --- /dev/null +++ b/src/schemas/api/spacebar/index.ts @@ -0,0 +1,23 @@ +/* + Spacebar: A FOSS re-implementation and extension of the Discord.com backend. + Copyright (C) 2026 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 * from "./AttachmentListResponse"; +export * from "./AvatarDecorations"; +export * from "./Integrations"; +export * from "./Version"; +export * from "./WellKnown";