diff --git a/assets/openapi.json b/assets/openapi.json index e9c892ee2..eb5234e6d 100644 Binary files a/assets/openapi.json and b/assets/openapi.json differ diff --git a/assets/schemas.json b/assets/schemas.json index 2ac0c2d16..e08fc88b1 100644 Binary files a/assets/schemas.json and b/assets/schemas.json differ 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";