summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
authorPuyodead1 <puyodead@proton.me>2023-03-24 18:14:47 -0400
committerPuyodead1 <puyodead@proton.me>2023-04-13 15:20:10 -0400
commit6b3a3b750f3e29b491c51f8199efd64c05176a65 (patch)
tree2f15670152c3fb99630c648a86dd63e0a0b86b74 /src/util
parentAAA (diff)
downloadserver-6b3a3b750f3e29b491c51f8199efd64c05176a65.tar.xz
fixing lots of openapi crap
Diffstat (limited to 'src/util')
-rw-r--r--src/util/schemas/LazyRequestSchema.ts4
-rw-r--r--src/util/schemas/UserGuildSettingsSchema.ts4
-rw-r--r--src/util/schemas/WebAuthnSchema.ts6
-rw-r--r--src/util/schemas/index.ts6
4 files changed, 9 insertions, 11 deletions
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<string, [number, number][]>;
+	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 <https://www.gnu.org/licenses/>.
 */
 
-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<Omit<UserGuildSettings, "channel_overrides">> {
 	channel_overrides?: {
-		[channel_id: string]: Partial<ChannelOverride>;
+		[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";