From 43eb367b2431af0e3cda0832e7f60a7ff7446ffa Mon Sep 17 00:00:00 2001 From: Rory& Date: Mon, 20 Apr 2026 00:07:11 +0200 Subject: [PATCH] Clean up schemas/uncategorised a bit --- src/schemas/uncategorised/ActivitySchema.ts | 1 + .../GuildSubscriptionsBulkSchema.ts | 18 ++++++++++++++++++ src/schemas/uncategorised/LoginResponse.ts | 18 ++++++++++++++++++ .../uncategorised/MessageCreateSchema.ts | 2 +- .../uncategorised/SettingsProtoUpdateSchema.ts | 1 + src/schemas/uncategorised/UserModifySchema.ts | 1 + .../uncategorised/UserNoteUpdateSchema.ts | 18 ++++++++++++++++++ 7 files changed, 58 insertions(+), 1 deletion(-) diff --git a/src/schemas/uncategorised/ActivitySchema.ts b/src/schemas/uncategorised/ActivitySchema.ts index e54948fca..572c28c09 100644 --- a/src/schemas/uncategorised/ActivitySchema.ts +++ b/src/schemas/uncategorised/ActivitySchema.ts @@ -16,6 +16,7 @@ along with this program. If not, see . */ +// TODO: remove entity imports import { Activity, Status } from "@spacebar/util"; export const ActivitySchema = { diff --git a/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts b/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts index 272110c5f..8739f5a8b 100644 --- a/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts +++ b/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts @@ -1,3 +1,21 @@ +/* + 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 interface GuildSubscriptionsBulkSchema { subscriptions: { [key: string]: GuildSubscriptionSchema }; } diff --git a/src/schemas/uncategorised/LoginResponse.ts b/src/schemas/uncategorised/LoginResponse.ts index 4a904fcf5..11d6865d5 100644 --- a/src/schemas/uncategorised/LoginResponse.ts +++ b/src/schemas/uncategorised/LoginResponse.ts @@ -1,3 +1,21 @@ +/* + 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 . +*/ + import { TokenResponse } from "../responses"; export interface MFAResponse { diff --git a/src/schemas/uncategorised/MessageCreateSchema.ts b/src/schemas/uncategorised/MessageCreateSchema.ts index ad1efc683..ed0387b4e 100644 --- a/src/schemas/uncategorised/MessageCreateSchema.ts +++ b/src/schemas/uncategorised/MessageCreateSchema.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Snowflake } from "@spacebar/util"; +import { Snowflake } from "../Identifiers"; import { InteractionType, AllowedMentions, MessageReference, ApplicationCommandType, BaseMessageComponents, Embed, PollAnswer, PollMedia, PublicUser } from "@spacebar/schemas"; export type MessageCreateAttachment = { diff --git a/src/schemas/uncategorised/SettingsProtoUpdateSchema.ts b/src/schemas/uncategorised/SettingsProtoUpdateSchema.ts index 5bf6808a4..14d2df2c3 100644 --- a/src/schemas/uncategorised/SettingsProtoUpdateSchema.ts +++ b/src/schemas/uncategorised/SettingsProtoUpdateSchema.ts @@ -16,6 +16,7 @@ along with this program. If not, see . */ +// TODO: better alternative? import { JsonValue } from "@protobuf-ts/runtime"; export interface SettingsProtoUpdateSchema { diff --git a/src/schemas/uncategorised/UserModifySchema.ts b/src/schemas/uncategorised/UserModifySchema.ts index 45c1ae909..18eeb1f6c 100644 --- a/src/schemas/uncategorised/UserModifySchema.ts +++ b/src/schemas/uncategorised/UserModifySchema.ts @@ -16,6 +16,7 @@ along with this program. If not, see . */ +// TODO: dedicated schemas? import { User_DisplayNameEffect, User_DisplayNameFont } from "discord-protos"; export interface UserModifySchema { diff --git a/src/schemas/uncategorised/UserNoteUpdateSchema.ts b/src/schemas/uncategorised/UserNoteUpdateSchema.ts index f54306934..51eaea9fd 100644 --- a/src/schemas/uncategorised/UserNoteUpdateSchema.ts +++ b/src/schemas/uncategorised/UserNoteUpdateSchema.ts @@ -1,3 +1,21 @@ +/* + 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 interface UserNoteUpdateSchema { note: string; }