summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
authorPuyodead1 <puyodead@proton.me>2023-03-25 18:28:12 -0400
committerPuyodead1 <puyodead@proton.me>2023-04-13 15:40:51 -0400
commit3a238429249a9a0d061dc49fab4bbc3b54320314 (patch)
treee21f6b3fdc5c03c37a90819febf56cda40d9e862 /src/util
parentoapi: voice regions (diff)
downloadserver-ts-3a238429249a9a0d061dc49fab4bbc3b54320314.tar.xz
oapi: root level routes
Diffstat (limited to 'src/util')
-rw-r--r--src/util/schemas/responses/DiscoverableGuildsResponse.ts8
-rw-r--r--src/util/schemas/responses/DiscoveryCategoriesResponse.ts3
-rw-r--r--src/util/schemas/responses/GuildRecommendationsResponse.ts6
-rw-r--r--src/util/schemas/responses/InstancePingResponse.ts13
-rw-r--r--src/util/schemas/responses/UpdatesResponse.ts6
-rw-r--r--src/util/schemas/responses/index.ts5
6 files changed, 41 insertions, 0 deletions
diff --git a/src/util/schemas/responses/DiscoverableGuildsResponse.ts b/src/util/schemas/responses/DiscoverableGuildsResponse.ts
new file mode 100644

index 00000000..2a9fb1bd --- /dev/null +++ b/src/util/schemas/responses/DiscoverableGuildsResponse.ts
@@ -0,0 +1,8 @@ +import { Guild } from "../../entities"; + +export interface DiscoverableGuildsResponse { + total: number; + guilds: Guild[]; + offset: number; + limit: number; +} diff --git a/src/util/schemas/responses/DiscoveryCategoriesResponse.ts b/src/util/schemas/responses/DiscoveryCategoriesResponse.ts new file mode 100644
index 00000000..c23f4f88 --- /dev/null +++ b/src/util/schemas/responses/DiscoveryCategoriesResponse.ts
@@ -0,0 +1,3 @@ +import { Categories } from "../../entities"; + +export type DiscoveryCategoriesResponse = Categories[]; diff --git a/src/util/schemas/responses/GuildRecommendationsResponse.ts b/src/util/schemas/responses/GuildRecommendationsResponse.ts new file mode 100644
index 00000000..211670a6 --- /dev/null +++ b/src/util/schemas/responses/GuildRecommendationsResponse.ts
@@ -0,0 +1,6 @@ +import { Guild } from "../../entities"; + +export interface GuildRecommendationsResponse { + recommended_guilds: Guild[]; + load_id: string; +} diff --git a/src/util/schemas/responses/InstancePingResponse.ts b/src/util/schemas/responses/InstancePingResponse.ts new file mode 100644
index 00000000..5f1a9488 --- /dev/null +++ b/src/util/schemas/responses/InstancePingResponse.ts
@@ -0,0 +1,13 @@ +export interface InstancePingResponse { + ping: "pong!"; + instance: { + id: string; + name: string; + description: string | null; + image: string | null; + correspondenceEmail: string | null; + correspondenceUserID: string | null; + frontPage: string | null; + tosPage: string | null; + }; +} diff --git a/src/util/schemas/responses/UpdatesResponse.ts b/src/util/schemas/responses/UpdatesResponse.ts new file mode 100644
index 00000000..6b8566f4 --- /dev/null +++ b/src/util/schemas/responses/UpdatesResponse.ts
@@ -0,0 +1,6 @@ +export interface UpdatesResponse { + name: string; + pub_date: string; + url: string; + notes: string | null; +} diff --git a/src/util/schemas/responses/index.ts b/src/util/schemas/responses/index.ts
index e75ab382..282c4a41 100644 --- a/src/util/schemas/responses/index.ts +++ b/src/util/schemas/responses/index.ts
@@ -9,6 +9,8 @@ export * from "./CaptchaRequiredResponse"; export * from "./ChannelInvitesResponse"; export * from "./ChannelPinsResponse"; export * from "./ChannelWebhooksResponse"; +export * from "./DiscoverableGuildsResponse"; +export * from "./DiscoveryCategoriesResponse"; export * from "./GatewayBotResponse"; export * from "./GatewayResponse"; export * from "./GeneralConfigurationResponse"; @@ -22,6 +24,7 @@ export * from "./GuildInvitesResponse"; export * from "./GuildMembersResponse"; export * from "./GuildMessagesSearchResponse"; export * from "./GuildPruneResponse"; +export * from "./GuildRecommendationsResponse"; export * from "./GuildResponse"; export * from "./GuildRolesResponse"; export * from "./GuildStickersResponse"; @@ -31,6 +34,7 @@ export * from "./GuildVoiceRegionsResponse"; export * from "./GuildWidgetJsonResponse"; export * from "./GuildWidgetSettingsResponse"; export * from "./InstanceDomainsResponse"; +export * from "./InstancePingResponse"; export * from "./InstanceStatsResponse"; export * from "./LimitsConfigurationResponse"; export * from "./LocationMetadataResponse"; @@ -39,6 +43,7 @@ export * from "./OAuthAuthorizeResponse"; export * from "./StickerPacksResponse"; export * from "./Tenor"; export * from "./TokenResponse"; +export * from "./UpdatesResponse"; export * from "./UserNoteResponse"; export * from "./UserProfileResponse"; export * from "./UserRelationshipsResponse";