summary refs log tree commit diff
path: root/src/util/schemas
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-03-24 04:16:58 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-03-24 04:16:58 +1100
commit0f928e479cbd81b17710da5dad14a092f23cdf0d (patch)
treed885d84ba47d601c4ba064e1cf47d1369198c617 /src/util/schemas
parentMerge branch 'master' of github.com:fosscord/fosscord-server (diff)
downloadserver-0f928e479cbd81b17710da5dad14a092f23cdf0d.tar.xz
Work towards fixing openapi spec
Diffstat (limited to 'src/util/schemas')
-rw-r--r--src/util/schemas/GatewayBotResponse.ts10
-rw-r--r--src/util/schemas/GatewayResponse.ts3
-rw-r--r--src/util/schemas/UserProfileResponse.ts8
-rw-r--r--src/util/schemas/UserRelationsResponse.ts9
-rw-r--r--src/util/schemas/index.ts4
5 files changed, 34 insertions, 0 deletions
diff --git a/src/util/schemas/GatewayBotResponse.ts b/src/util/schemas/GatewayBotResponse.ts
new file mode 100644
index 00000000..30f1f57f
--- /dev/null
+++ b/src/util/schemas/GatewayBotResponse.ts
@@ -0,0 +1,10 @@
+export interface GatewayBotResponse {
+	url: string;
+	shards: number;
+	session_start_limit: {
+		total: number;
+		remaining: number;
+		reset_after: number;
+		max_concurrency: number;
+	};
+}
diff --git a/src/util/schemas/GatewayResponse.ts b/src/util/schemas/GatewayResponse.ts
new file mode 100644
index 00000000..e909f7bd
--- /dev/null
+++ b/src/util/schemas/GatewayResponse.ts
@@ -0,0 +1,3 @@
+export interface GatewayResponse {
+	url: string;
+}
diff --git a/src/util/schemas/UserProfileResponse.ts b/src/util/schemas/UserProfileResponse.ts
new file mode 100644
index 00000000..467d787f
--- /dev/null
+++ b/src/util/schemas/UserProfileResponse.ts
@@ -0,0 +1,8 @@
+import { PublicConnectedAccount, UserPublic } from "..";
+
+export interface UserProfileResponse {
+	user: UserPublic;
+	connected_accounts: PublicConnectedAccount;
+	premium_guild_since?: Date;
+	premium_since?: Date;
+}
diff --git a/src/util/schemas/UserRelationsResponse.ts b/src/util/schemas/UserRelationsResponse.ts
new file mode 100644
index 00000000..1ec15eca
--- /dev/null
+++ b/src/util/schemas/UserRelationsResponse.ts
@@ -0,0 +1,9 @@
+export interface UserRelationsResponse {
+	object: {
+		id?: string;
+		username?: string;
+		avatar?: string;
+		discriminator?: string;
+		public_flags?: number;
+	};
+}
diff --git a/src/util/schemas/index.ts b/src/util/schemas/index.ts
index 44909a3a..150a2dea 100644
--- a/src/util/schemas/index.ts
+++ b/src/util/schemas/index.ts
@@ -76,3 +76,7 @@ export * from "./VoiceVideoSchema";
 export * from "./WebAuthnSchema";
 export * from "./WebhookCreateSchema";
 export * from "./WidgetModifySchema";
+export * from "./UserRelationsResponse";
+export * from "./GatewayResponse";
+export * from "./GatewayBotResponse";
+export * from "./UserProfileResponse";