diff --git a/src/schemas/responses/EmailDomainLookupResponse.ts b/src/schemas/responses/EmailDomainLookupResponse.ts index c3ce5213e..863e11e94 100644 --- a/src/schemas/responses/EmailDomainLookupResponse.ts +++ b/src/schemas/responses/EmailDomainLookupResponse.ts @@ -15,6 +15,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + export interface HubGuild { icon: string; id: string; diff --git a/src/schemas/responses/EmojiSourceResponse.ts b/src/schemas/responses/EmojiSourceResponse.ts index 9397027d9..f01848a8e 100644 --- a/src/schemas/responses/EmojiSourceResponse.ts +++ b/src/schemas/responses/EmojiSourceResponse.ts @@ -16,6 +16,7 @@ along with this program. If not, see . */ +// TODO: remove entity import import { Emoji } from "@spacebar/util"; export interface EmojiSourceResponse { diff --git a/src/schemas/responses/GatewayBotResponse.ts b/src/schemas/responses/GatewayBotResponse.ts deleted file mode 100644 index 1bbe1598e..000000000 --- a/src/schemas/responses/GatewayBotResponse.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - Spacebar: A FOSS re-implementation and extension of the Discord.com backend. - Copyright (C) 2023 Spacebar and Spacebar Contributors - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . -*/ - -export interface GatewayBotResponse { - url: string; - shards: number; - session_start_limit: { - total: number; - remaining: number; - reset_after: number; - max_concurrency: number; - }; -} diff --git a/src/schemas/responses/GatewayResponse.ts b/src/schemas/responses/GatewayResponse.ts index 7d1c659e2..7327e1ed7 100644 --- a/src/schemas/responses/GatewayResponse.ts +++ b/src/schemas/responses/GatewayResponse.ts @@ -19,3 +19,13 @@ export interface GatewayResponse { url: string; } + +export interface GatewayBotResponse extends GatewayResponse { + shards: number; + session_start_limit: { + total: number; + remaining: number; + reset_after: number; + max_concurrency: number; + }; +} diff --git a/src/schemas/responses/GuildCreateResponse.ts b/src/schemas/responses/GuildCreateResponse.ts index 0fef3843b..cd115cf32 100644 --- a/src/schemas/responses/GuildCreateResponse.ts +++ b/src/schemas/responses/GuildCreateResponse.ts @@ -16,6 +16,7 @@ along with this program. If not, see . */ +// TODO: remove import from util import { GuildWelcomeScreen } from "@spacebar/util"; import { GuildUpdateSchema } from "@spacebar/schemas"; diff --git a/src/schemas/responses/GuildWidgetJsonResponse.ts b/src/schemas/responses/GuildWidgetJsonResponse.ts index a1c99ddeb..84fb9913d 100644 --- a/src/schemas/responses/GuildWidgetJsonResponse.ts +++ b/src/schemas/responses/GuildWidgetJsonResponse.ts @@ -16,6 +16,7 @@ along with this program. If not, see . */ +// TODO: remove util import import { ClientStatus } from "@spacebar/util"; export interface GuildWidgetJsonResponse { diff --git a/src/schemas/responses/GuildWidgetSettingsResponse.ts b/src/schemas/responses/GuildWidgetSettingsResponse.ts index 957aaff06..0b7bb9215 100644 --- a/src/schemas/responses/GuildWidgetSettingsResponse.ts +++ b/src/schemas/responses/GuildWidgetSettingsResponse.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Snowflake } from "@spacebar/util"; +import { Snowflake } from "../Identifiers"; export interface GuildWidgetSettingsResponse { enabled: boolean; diff --git a/src/schemas/responses/MemberJoinGuildResponse.ts b/src/schemas/responses/MemberJoinGuildResponse.ts index 75081656b..bbb370cc7 100644 --- a/src/schemas/responses/MemberJoinGuildResponse.ts +++ b/src/schemas/responses/MemberJoinGuildResponse.ts @@ -16,6 +16,7 @@ along with this program. If not, see . */ +// TODO: remove entity imports import { Emoji, Role, Sticker } from "@spacebar/util"; import { GuildCreateResponse } from "@spacebar/schemas"; diff --git a/src/schemas/responses/PreloadMessagesResponseSchema.ts b/src/schemas/responses/PreloadMessagesResponseSchema.ts index 0edb6a712..0a767888a 100644 --- a/src/schemas/responses/PreloadMessagesResponseSchema.ts +++ b/src/schemas/responses/PreloadMessagesResponseSchema.ts @@ -16,6 +16,7 @@ along with this program. If not, see . */ +// TODO: remove entity import import { Message } from "@spacebar/util"; export type PreloadMessagesResponseSchema = Message[]; diff --git a/src/schemas/responses/SettingsProtoUpdateResponse.ts b/src/schemas/responses/SettingsProtoUpdateResponse.ts index 079f36c4a..fe635f77a 100644 --- a/src/schemas/responses/SettingsProtoUpdateResponse.ts +++ b/src/schemas/responses/SettingsProtoUpdateResponse.ts @@ -16,6 +16,7 @@ along with this program. If not, see . */ +// TODO: is there a better alternative for this? import { JsonValue } from "@protobuf-ts/runtime"; export interface SettingsProtoResponse { diff --git a/src/schemas/responses/TeamListResponse.ts b/src/schemas/responses/TeamListResponse.ts index e4e8284e7..d8bf8564e 100644 --- a/src/schemas/responses/TeamListResponse.ts +++ b/src/schemas/responses/TeamListResponse.ts @@ -16,6 +16,7 @@ along with this program. If not, see . */ +// TODO: remove entity import import { Team } from "@spacebar/util"; export type TeamListResponse = Team[]; diff --git a/src/schemas/responses/TypedResponses.ts b/src/schemas/responses/TypedResponses.ts index 4ce275362..9fa6cd0c5 100644 --- a/src/schemas/responses/TypedResponses.ts +++ b/src/schemas/responses/TypedResponses.ts @@ -16,11 +16,13 @@ along with this program. If not, see . */ +// TODO: clean up util imports import { GeneralConfiguration, LimitsConfiguration } from "../../util/config/types"; import { DmChannelDTO } from "../../util/dtos"; -import { Application, BackupCode, Categories, Channel, Emoji, Guild, Invite, Member, Message, Role, Sticker, StickerPack, Template, Webhook } from "@spacebar/util"; +// TODO: remove entity imports +import { Application, BackupCode, Categories, Channel, Guild, Invite, Member, Message, Role, Template, Webhook } from "@spacebar/util"; import { GuildVoiceRegion } from "./GuildVoiceRegionsResponse"; -import { GuildBansResponse, GuildCreateResponse, PrivateUser, PublicMember, PublicUser } from "@spacebar/schemas"; +import { GuildCreateResponse, PrivateUser, PublicMember, PublicUser } from "@spacebar/schemas"; // TODO: remove this entire file! // removes internal properties from the guild class diff --git a/src/schemas/responses/UserProfileResponse.ts b/src/schemas/responses/UserProfileResponse.ts index 656e139b8..64459bd14 100644 --- a/src/schemas/responses/UserProfileResponse.ts +++ b/src/schemas/responses/UserProfileResponse.ts @@ -16,6 +16,7 @@ along with this program. If not, see . */ +// TODO: remove entity imports import { Badge, Member, User } from "@spacebar/util"; import { PublicConnectedAccount, PublicMember, PublicUser } from "@spacebar/schemas"; diff --git a/src/schemas/responses/UserRelationsResponse.ts b/src/schemas/responses/UserRelationsResponse.ts index 377cab099..8124a55cd 100644 --- a/src/schemas/responses/UserRelationsResponse.ts +++ b/src/schemas/responses/UserRelationsResponse.ts @@ -15,6 +15,13 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -import { User } from "@spacebar/util"; -export type UserRelationsResponse = (Pick & Pick & Pick & Pick & Pick)[]; +export interface UserRelationResponse { + id: string; + username: string; + discriminator: string; + avatar?: string; + public_flags: number; +} + +export type UserRelationsResponse = UserRelationResponse[]; diff --git a/src/schemas/responses/WebAuthnCreateResponse.ts b/src/schemas/responses/WebAuthnCreateResponse.ts index b87ff1dfc..37d768eb4 100644 --- a/src/schemas/responses/WebAuthnCreateResponse.ts +++ b/src/schemas/responses/WebAuthnCreateResponse.ts @@ -15,6 +15,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + export interface WebAuthnCreateResponse { name: string; id: string; diff --git a/src/schemas/responses/index.ts b/src/schemas/responses/index.ts index e231879e8..c430cb172 100644 --- a/src/schemas/responses/index.ts +++ b/src/schemas/responses/index.ts @@ -15,6 +15,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ + export * from "./APIErrorOrCaptchaResponse"; export * from "./APIErrorResponse"; export * from "./AccountStandingResponse"; @@ -28,7 +29,6 @@ export * from "./DmMessagesResponseSchema"; export * from "./EmailDomainLookupResponse"; export * from "./EmailDomainLookupVerifyCodeResponse"; export * from "./EmojiSourceResponse"; -export * from "./GatewayBotResponse"; export * from "./GatewayResponse"; export * from "./GenerateRegistrationTokensResponse"; export * from "./GuildBansResponse";