From 6b3a3b750f3e29b491c51f8199efd64c05176a65 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Fri, 24 Mar 2023 18:14:47 -0400 Subject: fixing lots of openapi crap --- src/util/schemas/LazyRequestSchema.ts | 4 +++- src/util/schemas/UserGuildSettingsSchema.ts | 4 ++-- src/util/schemas/WebAuthnSchema.ts | 6 +++--- src/util/schemas/index.ts | 6 +----- 4 files changed, 9 insertions(+), 11 deletions(-) (limited to 'src/util') diff --git a/src/util/schemas/LazyRequestSchema.ts b/src/util/schemas/LazyRequestSchema.ts index 63e67416..f69ae1f7 100644 --- a/src/util/schemas/LazyRequestSchema.ts +++ b/src/util/schemas/LazyRequestSchema.ts @@ -18,7 +18,9 @@ export interface LazyRequestSchema { guild_id: string; - channels?: Record; + channels?: { + [key: string]: [number, number][]; + }; activities?: boolean; threads?: boolean; typing?: true; diff --git a/src/util/schemas/UserGuildSettingsSchema.ts b/src/util/schemas/UserGuildSettingsSchema.ts index c295f767..82edae9c 100644 --- a/src/util/schemas/UserGuildSettingsSchema.ts +++ b/src/util/schemas/UserGuildSettingsSchema.ts @@ -16,12 +16,12 @@ along with this program. If not, see . */ -import { UserGuildSettings, ChannelOverride } from "@spacebar/util"; +import { ChannelOverride, UserGuildSettings } from "@spacebar/util"; // This sucks. I would use a DeepPartial, my own or typeorms, but they both generate inncorect schema export interface UserGuildSettingsSchema extends Partial> { channel_overrides?: { - [channel_id: string]: Partial; + [channel_id: string]: ChannelOverride; }; } diff --git a/src/util/schemas/WebAuthnSchema.ts b/src/util/schemas/WebAuthnSchema.ts index 652cda34..3f5e0da7 100644 --- a/src/util/schemas/WebAuthnSchema.ts +++ b/src/util/schemas/WebAuthnSchema.ts @@ -28,9 +28,9 @@ export interface CreateWebAuthnCredentialSchema { ticket: string; } -export type WebAuthnPostSchema = Partial< - GenerateWebAuthnCredentialsSchema | CreateWebAuthnCredentialSchema ->; +export type WebAuthnPostSchema = + | GenerateWebAuthnCredentialsSchema + | CreateWebAuthnCredentialSchema; export interface WebAuthnTotpSchema { code: string; diff --git a/src/util/schemas/index.ts b/src/util/schemas/index.ts index 22927146..23d03190 100644 --- a/src/util/schemas/index.ts +++ b/src/util/schemas/index.ts @@ -58,7 +58,6 @@ export * from "./PurgeSchema"; export * from "./RegisterSchema"; export * from "./RelationshipPostSchema"; export * from "./RelationshipPutSchema"; -export * from "./responses"; export * from "./RoleModifySchema"; export * from "./RolePositionUpdateSchema"; export * from "./SelectProtocolSchema"; @@ -80,7 +79,4 @@ export * from "./VoiceVideoSchema"; export * from "./WebAuthnSchema"; export * from "./WebhookCreateSchema"; export * from "./WidgetModifySchema"; -export * from "./UserRelationsResponse"; -export * from "./GatewayResponse"; -export * from "./GatewayBotResponse"; -export * from "./UserProfileResponse"; +export * from "./responses"; -- cgit 1.5.1