summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-04-19 23:51:03 +0200
committerRory& <root@rory.gay>2026-04-20 00:15:02 +0200
commitaffb847a70fd4ff4255ee7d2f930622c07011d97 (patch)
tree7cdb3d79686b43a630c0e3fc2d68db1b8a162849
parentClean up schemas/api a bit (diff)
downloadserver-ts-affb847a70fd4ff4255ee7d2f930622c07011d97.tar.xz
Clean up schemas/gateway a bit
-rw-r--r--src/schemas/gateway/GatewayPayloadSchema.ts1
-rw-r--r--src/schemas/gateway/IdentifySchema.ts1
-rw-r--r--src/schemas/gateway/LazyRequestSchema.ts17
-rw-r--r--src/schemas/gateway/StreamCreateSchema.ts18
-rw-r--r--src/schemas/gateway/StreamDeleteSchema.ts18
-rw-r--r--src/schemas/gateway/StreamWatchSchema.ts18
-rw-r--r--src/schemas/gateway/index.ts2
7 files changed, 57 insertions, 18 deletions
diff --git a/src/schemas/gateway/GatewayPayloadSchema.ts b/src/schemas/gateway/GatewayPayloadSchema.ts

index 1df6de7d..3a00326f 100644 --- a/src/schemas/gateway/GatewayPayloadSchema.ts +++ b/src/schemas/gateway/GatewayPayloadSchema.ts
@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ +// TODO: should this even be in schemas? import { Tuple } from "lambert-server"; export const PayloadSchema = { diff --git a/src/schemas/gateway/IdentifySchema.ts b/src/schemas/gateway/IdentifySchema.ts
index 7a80803a..23b81122 100644 --- a/src/schemas/gateway/IdentifySchema.ts +++ b/src/schemas/gateway/IdentifySchema.ts
@@ -20,6 +20,7 @@ import { ActivitySchema } from "@spacebar/schemas"; +// TODO: can we get rid of this somehow? export const IdentifySchema = { token: String, $intents: BigInt, // discord uses a Integer for bitfields we use bigints tho. | instanceOf will automatically convert the Number to a BigInt diff --git a/src/schemas/gateway/LazyRequestSchema.ts b/src/schemas/gateway/LazyRequestSchema.ts deleted file mode 100644
index 0433355c..00000000 --- a/src/schemas/gateway/LazyRequestSchema.ts +++ /dev/null
@@ -1,17 +0,0 @@ -/* - 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 <https://www.gnu.org/licenses/>. -*/ diff --git a/src/schemas/gateway/StreamCreateSchema.ts b/src/schemas/gateway/StreamCreateSchema.ts
index 3e97724a..5f861ac1 100644 --- a/src/schemas/gateway/StreamCreateSchema.ts +++ b/src/schemas/gateway/StreamCreateSchema.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 <https://www.gnu.org/licenses/>. +*/ + export interface StreamCreateSchema { type: "guild" | "call"; channel_id: string; diff --git a/src/schemas/gateway/StreamDeleteSchema.ts b/src/schemas/gateway/StreamDeleteSchema.ts
index 65434441..b3689829 100644 --- a/src/schemas/gateway/StreamDeleteSchema.ts +++ b/src/schemas/gateway/StreamDeleteSchema.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 <https://www.gnu.org/licenses/>. +*/ + export interface StreamDeleteSchema { stream_key: string; } diff --git a/src/schemas/gateway/StreamWatchSchema.ts b/src/schemas/gateway/StreamWatchSchema.ts
index 14fdd026..bfb46fde 100644 --- a/src/schemas/gateway/StreamWatchSchema.ts +++ b/src/schemas/gateway/StreamWatchSchema.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 <https://www.gnu.org/licenses/>. +*/ + export interface StreamWatchSchema { stream_key: string; } diff --git a/src/schemas/gateway/index.ts b/src/schemas/gateway/index.ts
index bdd1c406..b631036c 100644 --- a/src/schemas/gateway/index.ts +++ b/src/schemas/gateway/index.ts
@@ -15,9 +15,9 @@ 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 "./GatewayPayloadSchema"; export * from "./IdentifySchema"; -export * from "./LazyRequestSchema"; export * from "./StreamCreateSchema"; export * from "./StreamDeleteSchema"; export * from "./StreamWatchSchema";