mirror of
https://github.com/spacebarchat/server.git
synced 2026-09-25 06:56:33 +00:00
Export spacebar specific schemas
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,4 +23,5 @@ export * from "./guilds";
|
||||
export * from "./integrations";
|
||||
export * from "./messages";
|
||||
export * from "./reports";
|
||||
export * from "./spacebar";
|
||||
export * from "./users";
|
||||
|
||||
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export * from "./AttachmentListResponse";
|
||||
export * from "./AvatarDecorations";
|
||||
export * from "./Integrations";
|
||||
export * from "./Version";
|
||||
export * from "./WellKnown";
|
||||
Reference in New Issue
Block a user