Missed some schemas

This commit is contained in:
Madeline
2022-09-28 16:39:05 +10:00
parent f75a7bac16
commit 7818e8dd3c
11 changed files with 6972 additions and 6887 deletions
@@ -0,0 +1,4 @@
import { ChannelPermissionOverwrite } from "@fosscord/util";
export interface ChannelPermissionOverwriteSchema
extends ChannelPermissionOverwrite {}
+8
View File
@@ -0,0 +1,8 @@
import { Tuple } from "lambert-server";
export const PayloadSchema = {
op: Number,
$d: new Tuple(Object, Number), // or number for heartbeat sequence
$s: Number,
$t: String,
};
+17
View File
@@ -0,0 +1,17 @@
import { GuildCreateSchema } from "@fosscord/util";
export interface GuildUpdateSchema extends Omit<GuildCreateSchema, "channels"> {
banner?: string | null;
splash?: string | null;
description?: string;
features?: string[];
verification_level?: number;
default_message_notifications?: number;
system_channel_flags?: number;
explicit_content_filter?: number;
public_updates_channel_id?: string;
afk_timeout?: number;
afk_channel_id?: string;
preferred_locale?: string;
premium_progress_bar_enabled?: boolean;
}
@@ -0,0 +1,9 @@
import { UserGuildSettings, ChannelOverride } from "@fosscord/util";
// This sucks. I would use a DeepPartial, my own or typeorms, but they both generate inncorect schema
export interface UserGuildSettingsSchema
extends Partial<Omit<UserGuildSettings, "channel_overrides">> {
channel_overrides: {
[channel_id: string]: Partial<ChannelOverride>;
};
}
+3
View File
@@ -0,0 +1,3 @@
import { UserSettings } from "@fosscord/util";
export interface UserSettingsSchema extends Partial<UserSettings> {}
+4
View File
@@ -39,3 +39,7 @@ export * from "./VoiceVideoSchema";
export * from "./IdentifySchema";
export * from "./ActivitySchema";
export * from "./LazyRequestSchema";
export * from "./GuildUpdateSchema";
export * from "./ChannelPermissionOverwriteSchema";
export * from "./UserGuildSettingsSchema";
export * from "./GatewayPayloadSchema"