summary refs log tree commit diff
path: root/src/util/schemas
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-08-30 15:13:18 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-08-30 15:13:18 +1000
commitc2931f61aa0adb682ab023d85ba599099024d62b (patch)
tree86de9071cbded565fe9e082bd2cc6c611a926c6c /src/util/schemas
parentGuild join messages (diff)
parentOop, deprecated typeorm call (diff)
downloadserver-c2931f61aa0adb682ab023d85ba599099024d62b.tar.xz
Merge branch 'staging' into dev/Maddy/feat/welcomeMessages
Diffstat (limited to '')
-rw-r--r--src/util/schemas/ActivitySchema.ts (renamed from gateway/src/schema/Activity.ts)16
-rw-r--r--src/util/schemas/BanCreateSchema.ts4
-rw-r--r--src/util/schemas/BanModeratorSchema.ts7
-rw-r--r--src/util/schemas/BanRegistrySchema.ts8
-rw-r--r--src/util/schemas/BulkDeleteSchema.ts3
-rw-r--r--src/util/schemas/ChannelModifySchema.ts28
-rw-r--r--src/util/schemas/ChannelPermissionOverwriteSchema.ts5
-rw-r--r--src/util/schemas/ChannelReorderSchema.ts1
-rw-r--r--src/util/schemas/DmChannelCreateSchema.ts4
-rw-r--r--src/util/schemas/EmojiCreateSchema.ts6
-rw-r--r--src/util/schemas/EmojiModifySchema.ts4
-rw-r--r--src/util/schemas/GuildCreateSchema.ts14
-rw-r--r--src/util/schemas/GuildTemplateCreateSchema.ts4
-rw-r--r--src/util/schemas/GuildUpdateSchema.ts18
-rw-r--r--src/util/schemas/GuildUpdateWelcomeScreenSchema.ts10
-rw-r--r--src/util/schemas/IdentifySchema.ts (renamed from gateway/src/schema/Identify.ts)14
-rw-r--r--src/util/schemas/InviteCreateSchema.ts11
-rw-r--r--src/util/schemas/LazyRequestSchema.ts (renamed from gateway/src/schema/LazyRequest.ts)2
-rw-r--r--src/util/schemas/LoginSchema.ts8
-rw-r--r--src/util/schemas/MemberChangeSchema.ts3
-rw-r--r--src/util/schemas/MemberNickChangeSchema.ts3
-rw-r--r--src/util/schemas/MessageAcknowledgeSchema.ts8
-rw-r--r--src/util/schemas/MessageCreateSchema.ts33
-rw-r--r--src/util/schemas/MfaCodesSchema.ts4
-rw-r--r--src/util/schemas/ModifyGuildStickerSchema.ts15
-rw-r--r--src/util/schemas/PruneSchema.ts6
-rw-r--r--src/util/schemas/PurgeSchema.ts4
-rw-r--r--src/util/schemas/RegisterSchema.ts26
-rw-r--r--src/util/schemas/RelationshipPostSchema.ts4
-rw-r--r--src/util/schemas/RelationshipPutSchema.ts5
-rw-r--r--src/util/schemas/RoleModifySchema.ts10
-rw-r--r--src/util/schemas/RolePositionUpdateSchema.ts4
-rw-r--r--src/util/schemas/TemplateCreateSchema.ts4
-rw-r--r--src/util/schemas/TemplateModifySchema.ts4
-rw-r--r--src/util/schemas/TotpDisableSchema.ts3
-rw-r--r--src/util/schemas/TotpEnableSchema.ts5
-rw-r--r--src/util/schemas/TotpSchema.ts6
-rw-r--r--src/util/schemas/UserModifySchema.ts19
-rw-r--r--src/util/schemas/UserSettingsSchema.ts3
-rw-r--r--src/util/schemas/VanityUrlSchema.ts7
-rw-r--r--src/util/schemas/VoiceStateUpdateSchema.ts18
-rw-r--r--src/util/schemas/WebhookCreateSchema.ts8
-rw-r--r--src/util/schemas/WidgetModifySchema.ts4
-rw-r--r--src/util/schemas/index.ts43
44 files changed, 400 insertions, 16 deletions
diff --git a/gateway/src/schema/Activity.ts b/src/util/schemas/ActivitySchema.ts

index e18f66c8..d94557ea 100644 --- a/gateway/src/schema/Activity.ts +++ b/src/util/schemas/ActivitySchema.ts
@@ -11,7 +11,7 @@ export const ActivitySchema = { $created_at: Date, $timestamps: { $start: Number, - $end: Number, + $end: Number }, $application_id: String, $details: String, @@ -19,28 +19,28 @@ export const ActivitySchema = { $emoji: { $name: String, $id: String, - $animated: Boolean, + $animated: Boolean }, $party: { $id: String, - $size: [Number, Number], + $size: [Number, Number] }, $assets: { $large_image: String, $large_text: String, $small_image: String, - $small_text: String, + $small_text: String }, $secrets: { $join: String, $spectate: String, - $match: String, + $match: String }, $instance: Boolean, - $flags: String, - }, + $flags: String + } ], - $since: Number, // unix time (in milliseconds) of when the client went idle, or null if the client is not idle + $since: Number // unix time (in milliseconds) of when the client went idle, or null if the client is not idle }; export interface ActivitySchema { diff --git a/src/util/schemas/BanCreateSchema.ts b/src/util/schemas/BanCreateSchema.ts new file mode 100644
index 00000000..834577dc --- /dev/null +++ b/src/util/schemas/BanCreateSchema.ts
@@ -0,0 +1,4 @@ +export interface BanCreateSchema { + delete_message_days?: string; + reason?: string; +} diff --git a/src/util/schemas/BanModeratorSchema.ts b/src/util/schemas/BanModeratorSchema.ts new file mode 100644
index 00000000..afb76433 --- /dev/null +++ b/src/util/schemas/BanModeratorSchema.ts
@@ -0,0 +1,7 @@ +export interface BanModeratorSchema { + id: string; + user_id: string; + guild_id: string; + executor_id: string; + reason?: string | undefined; +} diff --git a/src/util/schemas/BanRegistrySchema.ts b/src/util/schemas/BanRegistrySchema.ts new file mode 100644
index 00000000..501f94dc --- /dev/null +++ b/src/util/schemas/BanRegistrySchema.ts
@@ -0,0 +1,8 @@ +export interface BanRegistrySchema { + id: string; + user_id: string; + guild_id: string; + executor_id: string; + ip?: string; + reason?: string | undefined; +} diff --git a/src/util/schemas/BulkDeleteSchema.ts b/src/util/schemas/BulkDeleteSchema.ts new file mode 100644
index 00000000..bfc4df65 --- /dev/null +++ b/src/util/schemas/BulkDeleteSchema.ts
@@ -0,0 +1,3 @@ +export interface BulkDeleteSchema { + messages: string[]; +} diff --git a/src/util/schemas/ChannelModifySchema.ts b/src/util/schemas/ChannelModifySchema.ts new file mode 100644
index 00000000..f5babef0 --- /dev/null +++ b/src/util/schemas/ChannelModifySchema.ts
@@ -0,0 +1,28 @@ +import { ChannelPermissionOverwriteType, ChannelType } from ".."; + +export interface ChannelModifySchema { + /** + * @maxLength 100 + */ + name?: string; + type?: ChannelType; + topic?: string; + icon?: string | null; + bitrate?: number; + user_limit?: number; + rate_limit_per_user?: number; + position?: number; + permission_overwrites?: { + id: string; + type: ChannelPermissionOverwriteType; + allow: string; + deny: string; + }[]; + parent_id?: string; + id?: string; // is not used (only for guild create) + nsfw?: boolean; + rtc_region?: string; + default_auto_archive_duration?: number; + flags?: number; + default_thread_rate_limit_per_user?: number; +} diff --git a/src/util/schemas/ChannelPermissionOverwriteSchema.ts b/src/util/schemas/ChannelPermissionOverwriteSchema.ts new file mode 100644
index 00000000..e8bc13bb --- /dev/null +++ b/src/util/schemas/ChannelPermissionOverwriteSchema.ts
@@ -0,0 +1,5 @@ +import { ChannelPermissionOverwrite } from "@fosscord/util"; + +// TODO: Only permissions your bot has in the guild or channel can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel) + +export interface ChannelPermissionOverwriteSchema extends ChannelPermissionOverwrite {} diff --git a/src/util/schemas/ChannelReorderSchema.ts b/src/util/schemas/ChannelReorderSchema.ts new file mode 100644
index 00000000..95c2eba9 --- /dev/null +++ b/src/util/schemas/ChannelReorderSchema.ts
@@ -0,0 +1 @@ +export type ChannelReorderSchema = { id: string; position?: number; lock_permissions?: boolean; parent_id?: string }[]; diff --git a/src/util/schemas/DmChannelCreateSchema.ts b/src/util/schemas/DmChannelCreateSchema.ts new file mode 100644
index 00000000..1b0fe86d --- /dev/null +++ b/src/util/schemas/DmChannelCreateSchema.ts
@@ -0,0 +1,4 @@ +export interface DmChannelCreateSchema { + name?: string; + recipients: string[]; +} diff --git a/src/util/schemas/EmojiCreateSchema.ts b/src/util/schemas/EmojiCreateSchema.ts new file mode 100644
index 00000000..34084713 --- /dev/null +++ b/src/util/schemas/EmojiCreateSchema.ts
@@ -0,0 +1,6 @@ +export interface EmojiCreateSchema { + name?: string; + image: string; + require_colons?: boolean | null; + roles?: string[]; +} diff --git a/src/util/schemas/EmojiModifySchema.ts b/src/util/schemas/EmojiModifySchema.ts new file mode 100644
index 00000000..05d2d395 --- /dev/null +++ b/src/util/schemas/EmojiModifySchema.ts
@@ -0,0 +1,4 @@ +export interface EmojiModifySchema { + name?: string; + roles?: string[]; +} diff --git a/src/util/schemas/GuildCreateSchema.ts b/src/util/schemas/GuildCreateSchema.ts new file mode 100644
index 00000000..e4855119 --- /dev/null +++ b/src/util/schemas/GuildCreateSchema.ts
@@ -0,0 +1,14 @@ +import { ChannelModifySchema } from "."; + +export interface GuildCreateSchema { + /** + * @maxLength 100 + */ + name: string; + region?: string; + icon?: string | null; + channels?: ChannelModifySchema[]; + guild_template_code?: string; + system_channel_id?: string; + rules_channel_id?: string; +} diff --git a/src/util/schemas/GuildTemplateCreateSchema.ts b/src/util/schemas/GuildTemplateCreateSchema.ts new file mode 100644
index 00000000..59db8428 --- /dev/null +++ b/src/util/schemas/GuildTemplateCreateSchema.ts
@@ -0,0 +1,4 @@ +export interface GuildTemplateCreateSchema { + name: string; + avatar?: string | null; +} diff --git a/src/util/schemas/GuildUpdateSchema.ts b/src/util/schemas/GuildUpdateSchema.ts new file mode 100644
index 00000000..86527cf1 --- /dev/null +++ b/src/util/schemas/GuildUpdateSchema.ts
@@ -0,0 +1,18 @@ +import { GuildCreateSchema } from "."; + +export interface GuildUpdateSchema extends Omit<GuildCreateSchema, "channels" | "name"> { + name?: string; + 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; +} diff --git a/src/util/schemas/GuildUpdateWelcomeScreenSchema.ts b/src/util/schemas/GuildUpdateWelcomeScreenSchema.ts new file mode 100644
index 00000000..c8b8ba4e --- /dev/null +++ b/src/util/schemas/GuildUpdateWelcomeScreenSchema.ts
@@ -0,0 +1,10 @@ +export interface GuildUpdateWelcomeScreenSchema { + welcome_channels?: { + channel_id: string; + description: string; + emoji_id?: string; + emoji_name: string; + }[]; + enabled?: boolean; + description?: string; +} diff --git a/gateway/src/schema/Identify.ts b/src/util/schemas/IdentifySchema.ts
index 21141321..bb5ae0c8 100644 --- a/gateway/src/schema/Identify.ts +++ b/src/util/schemas/IdentifySchema.ts
@@ -1,8 +1,8 @@ -import { ActivitySchema } from "./Activity"; +import { ActivitySchema } from "./ActivitySchema"; 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 + $intents: String, // discord uses a Integer for bitfields we use bigints tho. | instanceOf will automatically convert the Number to a BigInt $properties: Object, // { // // discord uses $ in the property key for bots, so we need to double prefix it, because instanceOf treats $ (prefix) as a optional key @@ -33,7 +33,7 @@ export const IdentifySchema = { $presence: ActivitySchema, $compress: Boolean, $large_threshold: Number, - $shard: [BigInt, BigInt], + $shard: [Number, Number], $guild_subscriptions: Boolean, $capabilities: Number, $client_state: { @@ -41,10 +41,10 @@ export const IdentifySchema = { $highest_last_message_id: String, $read_state_version: Number, $user_guild_settings_version: Number, - $user_settings_version: undefined, + $user_settings_version: undefined }, $v: Number, - $version: Number, + $version: Number }; export interface IdentifySchema { @@ -71,11 +71,11 @@ export interface IdentifySchema { client_version?: string; system_locale?: string; }; - intents?: bigint; // discord uses a Integer for bitfields we use bigints tho. | instanceOf will automatically convert the Number to a BigInt + intents?: string; // discord uses a Integer for bitfields we use bigints tho. | instanceOf will automatically convert the Number to a BigInt presence?: ActivitySchema; compress?: boolean; large_threshold?: number; - shard?: [bigint, bigint]; + shard?: [number, number]; guild_subscriptions?: boolean; capabilities?: number; client_state?: { diff --git a/src/util/schemas/InviteCreateSchema.ts b/src/util/schemas/InviteCreateSchema.ts new file mode 100644
index 00000000..cac11147 --- /dev/null +++ b/src/util/schemas/InviteCreateSchema.ts
@@ -0,0 +1,11 @@ +export interface InviteCreateSchema { + target_user_id?: string; + target_type?: string; + validate?: string; // ? what is this + max_age?: number; + max_uses?: number; + temporary?: boolean; + unique?: boolean; + target_user?: string; + target_user_type?: number; +} diff --git a/gateway/src/schema/LazyRequest.ts b/src/util/schemas/LazyRequestSchema.ts
index 1fe658bb..fbed5c5b 100644 --- a/gateway/src/schema/LazyRequest.ts +++ b/src/util/schemas/LazyRequestSchema.ts
@@ -15,5 +15,5 @@ export const LazyRequest = { $typing: Boolean, $threads: Boolean, $members: [] as any[], - $thread_member_lists: [] as any[], + $thread_member_lists: [] as any[] }; diff --git a/src/util/schemas/LoginSchema.ts b/src/util/schemas/LoginSchema.ts new file mode 100644
index 00000000..dc889d94 --- /dev/null +++ b/src/util/schemas/LoginSchema.ts
@@ -0,0 +1,8 @@ +export interface LoginSchema { + login: string; + password: string; + undelete?: boolean; + captcha_key?: string; + login_source?: string; + gift_code_sku_id?: string; +} diff --git a/src/util/schemas/MemberChangeSchema.ts b/src/util/schemas/MemberChangeSchema.ts new file mode 100644
index 00000000..db434538 --- /dev/null +++ b/src/util/schemas/MemberChangeSchema.ts
@@ -0,0 +1,3 @@ +export interface MemberChangeSchema { + roles?: string[]; +} diff --git a/src/util/schemas/MemberNickChangeSchema.ts b/src/util/schemas/MemberNickChangeSchema.ts new file mode 100644
index 00000000..d863038c --- /dev/null +++ b/src/util/schemas/MemberNickChangeSchema.ts
@@ -0,0 +1,3 @@ +export interface MemberNickChangeSchema { + nick: string; +} diff --git a/src/util/schemas/MessageAcknowledgeSchema.ts b/src/util/schemas/MessageAcknowledgeSchema.ts new file mode 100644
index 00000000..3f4eb2b6 --- /dev/null +++ b/src/util/schemas/MessageAcknowledgeSchema.ts
@@ -0,0 +1,8 @@ +// TODO: public read receipts & privacy scoping +// TODO: send read state event to all channel members +// TODO: advance-only notification cursor + +export interface MessageAcknowledgeSchema { + manual?: boolean; + mention_count?: number; +} diff --git a/src/util/schemas/MessageCreateSchema.ts b/src/util/schemas/MessageCreateSchema.ts new file mode 100644
index 00000000..bf3470bb --- /dev/null +++ b/src/util/schemas/MessageCreateSchema.ts
@@ -0,0 +1,33 @@ +import { Embed } from "@fosscord/util"; + +export interface MessageCreateSchema { + type?: number; + content?: string; + nonce?: string; + channel_id?: string; + tts?: boolean; + flags?: string; + embeds?: Embed[]; + embed?: Embed; + // TODO: ^ embed is deprecated in favor of embeds (https://discord.com/developers/docs/resources/channel#message-object) + allowed_mentions?: { + parse?: string[]; + roles?: string[]; + users?: string[]; + replied_user?: boolean; + }; + message_reference?: { + message_id: string; + channel_id: string; + guild_id?: string; + fail_if_not_exists?: boolean; + }; + payload_json?: string; + file?: any; + /** + TODO: we should create an interface for attachments + TODO: OpenWAAO<-->attachment-style metadata conversion + **/ + attachments?: any[]; + sticker_ids?: string[]; +} diff --git a/src/util/schemas/MfaCodesSchema.ts b/src/util/schemas/MfaCodesSchema.ts new file mode 100644
index 00000000..ac05b9a4 --- /dev/null +++ b/src/util/schemas/MfaCodesSchema.ts
@@ -0,0 +1,4 @@ +export interface MfaCodesSchema { + password: string; + regenerate?: boolean; +} diff --git a/src/util/schemas/ModifyGuildStickerSchema.ts b/src/util/schemas/ModifyGuildStickerSchema.ts new file mode 100644
index 00000000..159cc44f --- /dev/null +++ b/src/util/schemas/ModifyGuildStickerSchema.ts
@@ -0,0 +1,15 @@ +export interface ModifyGuildStickerSchema { + /** + * @minLength 2 + * @maxLength 30 + */ + name: string; + /** + * @maxLength 100 + */ + description?: string; + /** + * @maxLength 200 + */ + tags: string; +} diff --git a/src/util/schemas/PruneSchema.ts b/src/util/schemas/PruneSchema.ts new file mode 100644
index 00000000..bea5e2b4 --- /dev/null +++ b/src/util/schemas/PruneSchema.ts
@@ -0,0 +1,6 @@ +export interface PruneSchema { + /** + * @min 0 + */ + days: number; +} diff --git a/src/util/schemas/PurgeSchema.ts b/src/util/schemas/PurgeSchema.ts new file mode 100644
index 00000000..f5ab0a20 --- /dev/null +++ b/src/util/schemas/PurgeSchema.ts
@@ -0,0 +1,4 @@ +export interface PurgeSchema { + before: string; + after: string; +} diff --git a/src/util/schemas/RegisterSchema.ts b/src/util/schemas/RegisterSchema.ts new file mode 100644
index 00000000..9bbd9db5 --- /dev/null +++ b/src/util/schemas/RegisterSchema.ts
@@ -0,0 +1,26 @@ +export interface RegisterSchema { + /** + * @minLength 2 + * @maxLength 32 + */ + username: string; + /** + * @minLength 1 + * @maxLength 72 + */ + password?: string; + consent: boolean; + /** + * @TJS-format email + */ + email?: string; + fingerprint?: string; + invite?: string; + /** + * @TJS-type string + */ + date_of_birth?: Date; // "2000-04-03" + gift_code_sku_id?: string; + captcha_key?: string; + promotional_email_opt_in?: boolean; +} diff --git a/src/util/schemas/RelationshipPostSchema.ts b/src/util/schemas/RelationshipPostSchema.ts new file mode 100644
index 00000000..774c67f6 --- /dev/null +++ b/src/util/schemas/RelationshipPostSchema.ts
@@ -0,0 +1,4 @@ +export interface RelationshipPostSchema { + discriminator: string; + username: string; +} diff --git a/src/util/schemas/RelationshipPutSchema.ts b/src/util/schemas/RelationshipPutSchema.ts new file mode 100644
index 00000000..0a7f9720 --- /dev/null +++ b/src/util/schemas/RelationshipPutSchema.ts
@@ -0,0 +1,5 @@ +import { RelationshipType } from "@fosscord/util"; + +export interface RelationshipPutSchema { + type?: RelationshipType; +} diff --git a/src/util/schemas/RoleModifySchema.ts b/src/util/schemas/RoleModifySchema.ts new file mode 100644
index 00000000..f3f4a20e --- /dev/null +++ b/src/util/schemas/RoleModifySchema.ts
@@ -0,0 +1,10 @@ +export interface RoleModifySchema { + name?: string; + permissions?: string; + color?: number; + hoist?: boolean; // whether the role should be displayed separately in the sidebar + mentionable?: boolean; // whether the role should be mentionable + position?: number; + icon?: string; + unicode_emoji?: string; +} diff --git a/src/util/schemas/RolePositionUpdateSchema.ts b/src/util/schemas/RolePositionUpdateSchema.ts new file mode 100644
index 00000000..993d1ae0 --- /dev/null +++ b/src/util/schemas/RolePositionUpdateSchema.ts
@@ -0,0 +1,4 @@ +export type RolePositionUpdateSchema = { + id: string; + position: number; +}[]; diff --git a/src/util/schemas/TemplateCreateSchema.ts b/src/util/schemas/TemplateCreateSchema.ts new file mode 100644
index 00000000..160934f5 --- /dev/null +++ b/src/util/schemas/TemplateCreateSchema.ts
@@ -0,0 +1,4 @@ +export interface TemplateCreateSchema { + name: string; + description?: string; +} diff --git a/src/util/schemas/TemplateModifySchema.ts b/src/util/schemas/TemplateModifySchema.ts new file mode 100644
index 00000000..f9c9d14b --- /dev/null +++ b/src/util/schemas/TemplateModifySchema.ts
@@ -0,0 +1,4 @@ +export interface TemplateModifySchema { + name: string; + description?: string; +} diff --git a/src/util/schemas/TotpDisableSchema.ts b/src/util/schemas/TotpDisableSchema.ts new file mode 100644
index 00000000..51446e1c --- /dev/null +++ b/src/util/schemas/TotpDisableSchema.ts
@@ -0,0 +1,3 @@ +export interface TotpDisableSchema { + code: string; +} diff --git a/src/util/schemas/TotpEnableSchema.ts b/src/util/schemas/TotpEnableSchema.ts new file mode 100644
index 00000000..4e3551d9 --- /dev/null +++ b/src/util/schemas/TotpEnableSchema.ts
@@ -0,0 +1,5 @@ +export interface TotpEnableSchema { + password: string; + code?: string; + secret?: string; +} diff --git a/src/util/schemas/TotpSchema.ts b/src/util/schemas/TotpSchema.ts new file mode 100644
index 00000000..941a92ec --- /dev/null +++ b/src/util/schemas/TotpSchema.ts
@@ -0,0 +1,6 @@ +export interface TotpSchema { + code: string; + ticket: string; + gift_code_sku_id?: string | null; + login_source?: string | null; +} diff --git a/src/util/schemas/UserModifySchema.ts b/src/util/schemas/UserModifySchema.ts new file mode 100644
index 00000000..622497d9 --- /dev/null +++ b/src/util/schemas/UserModifySchema.ts
@@ -0,0 +1,19 @@ +export interface UserModifySchema { + /** + * @minLength 1 + * @maxLength 100 + */ + username?: string; + discriminator?: string; + avatar?: string | null; + /** + * @maxLength 1024 + */ + bio?: string; + accent_color?: number; + banner?: string | null; + password?: string; + new_password?: string; + code?: string; + email?: string; +} diff --git a/src/util/schemas/UserSettingsSchema.ts b/src/util/schemas/UserSettingsSchema.ts new file mode 100644
index 00000000..eb9b316d --- /dev/null +++ b/src/util/schemas/UserSettingsSchema.ts
@@ -0,0 +1,3 @@ +import { UserSettings } from "@fosscord/util"; + +export interface UserSettingsSchema extends Partial<UserSettings> {} diff --git a/src/util/schemas/VanityUrlSchema.ts b/src/util/schemas/VanityUrlSchema.ts new file mode 100644
index 00000000..4dd9b9da --- /dev/null +++ b/src/util/schemas/VanityUrlSchema.ts
@@ -0,0 +1,7 @@ +export interface VanityUrlSchema { + /** + * @minLength 1 + * @maxLength 20 + */ + code?: string; +} diff --git a/src/util/schemas/VoiceStateUpdateSchema.ts b/src/util/schemas/VoiceStateUpdateSchema.ts new file mode 100644
index 00000000..ea286b1a --- /dev/null +++ b/src/util/schemas/VoiceStateUpdateSchema.ts
@@ -0,0 +1,18 @@ +export const VoiceStateUpdateSchema = { + $guild_id: String, + $channel_id: String, + self_mute: Boolean, + self_deaf: Boolean, + self_video: Boolean +}; + +//TODO need more testing when community guild and voice stage channel are working +export interface VoiceStateUpdateSchema { + channel_id: string; + guild_id?: string; + suppress?: boolean; + request_to_speak_timestamp?: Date; + self_mute?: boolean; + self_deaf?: boolean; + self_video?: boolean; +} diff --git a/src/util/schemas/WebhookCreateSchema.ts b/src/util/schemas/WebhookCreateSchema.ts new file mode 100644
index 00000000..12ab1869 --- /dev/null +++ b/src/util/schemas/WebhookCreateSchema.ts
@@ -0,0 +1,8 @@ +// TODO: webhooks +export interface WebhookCreateSchema { + /** + * @maxLength 80 + */ + name: string; + avatar?: string; +} diff --git a/src/util/schemas/WidgetModifySchema.ts b/src/util/schemas/WidgetModifySchema.ts new file mode 100644
index 00000000..26d4504f --- /dev/null +++ b/src/util/schemas/WidgetModifySchema.ts
@@ -0,0 +1,4 @@ +export interface WidgetModifySchema { + enabled: boolean; // whether the widget is enabled + channel_id: string; // the widget channel id +} diff --git a/src/util/schemas/index.ts b/src/util/schemas/index.ts new file mode 100644
index 00000000..a15ab4b0 --- /dev/null +++ b/src/util/schemas/index.ts
@@ -0,0 +1,43 @@ +export * from "./ActivitySchema"; +export * from "./BanCreateSchema"; +export * from "./BanModeratorSchema"; +export * from "./BanRegistrySchema"; +export * from "./BulkDeleteSchema"; +export * from "./ChannelModifySchema"; +export * from "./ChannelPermissionOverwriteSchema"; +export * from "./ChannelReorderSchema"; +export * from "./DmChannelCreateSchema"; +export * from "./EmojiCreateSchema"; +export * from "./EmojiModifySchema"; +export * from "./GuildCreateSchema"; +export * from "./GuildTemplateCreateSchema"; +export * from "./GuildUpdateSchema"; +export * from "./GuildUpdateWelcomeScreenSchema"; +export * from "./IdentifySchema"; +export * from "./InviteCreateSchema"; +export * from "./LazyRequestSchema"; +export * from "./LoginSchema"; +export * from "./MemberChangeSchema"; +export * from "./MemberNickChangeSchema"; +export * from "./MessageAcknowledgeSchema"; +export * from "./MessageCreateSchema"; +export * from "./MfaCodesSchema"; +export * from "./ModifyGuildStickerSchema"; +export * from "./PruneSchema"; +export * from "./PurgeSchema"; +export * from "./RegisterSchema"; +export * from "./RelationshipPostSchema"; +export * from "./RelationshipPutSchema"; +export * from "./RoleModifySchema"; +export * from "./RolePositionUpdateSchema"; +export * from "./TemplateCreateSchema"; +export * from "./TemplateModifySchema"; +export * from "./TotpDisableSchema"; +export * from "./TotpEnableSchema"; +export * from "./TotpSchema"; +export * from "./UserModifySchema"; +export * from "./UserSettingsSchema"; +export * from "./VanityUrlSchema"; +export * from "./VoiceStateUpdateSchema"; +export * from "./WebhookCreateSchema"; +export * from "./WidgetModifySchema";