implement hubs routes
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface EmailDomainLookupSchema {
|
||||
allow_multiple_guilds: boolean;
|
||||
email: string;
|
||||
use_verification_code: boolean;
|
||||
guild_id?: string;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface EmailDomainLookupVerifyCodeSchema {
|
||||
email: string;
|
||||
guild_id: string;
|
||||
code: string;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface HubWaitlistSignupSchema {
|
||||
email: string;
|
||||
school: string;
|
||||
}
|
||||
@@ -34,6 +34,8 @@ export * from "./ConnectedAccountSchema";
|
||||
export * from "./ConnectionCallbackSchema";
|
||||
export * from "./ConnectionUpdateSchema";
|
||||
export * from "./DmChannelCreateSchema";
|
||||
export * from "./EmailDomainLookupSchema";
|
||||
export * from "./EmailDomainLookupVerifyCodeSchema";
|
||||
export * from "./EmojiCreateSchema";
|
||||
export * from "./EmojiModifySchema";
|
||||
export * from "./ForgotPasswordSchema";
|
||||
@@ -42,6 +44,7 @@ export * from "./GuildCreateSchema";
|
||||
export * from "./GuildTemplateCreateSchema";
|
||||
export * from "./GuildUpdateSchema";
|
||||
export * from "./GuildUpdateWelcomeScreenSchema";
|
||||
export * from "./HubWaitlistSignupSchema";
|
||||
export * from "./IdentifySchema";
|
||||
export * from "./InviteCreateSchema";
|
||||
export * from "./LazyRequestSchema";
|
||||
@@ -59,6 +62,7 @@ export * from "./RegisterSchema";
|
||||
export * from "./RelationshipPostSchema";
|
||||
export * from "./RelationshipPutSchema";
|
||||
export * from "./RequestGuildMembersSchema";
|
||||
export * from "./responses";
|
||||
export * from "./RoleModifySchema";
|
||||
export * from "./RolePositionUpdateSchema";
|
||||
export * from "./SelectProtocolSchema";
|
||||
@@ -83,4 +87,3 @@ export * from "./WebAuthnSchema";
|
||||
export * from "./WebhookCreateSchema";
|
||||
export * from "./WebhookExecuteSchema";
|
||||
export * from "./WidgetModifySchema";
|
||||
export * from "./responses";
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
export interface HubGuild {
|
||||
icon: string;
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface EmailDomainLookupResponse {
|
||||
guilds_info: HubGuild[];
|
||||
has_matching_guild: boolean;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Guild } from "../../entities";
|
||||
|
||||
export interface EmailDomainLookupVerifyCodeResponse {
|
||||
guild: Guild;
|
||||
joined: boolean;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Guild } from "../../entities";
|
||||
|
||||
export interface HubDirectoryEntry {
|
||||
author_id: string;
|
||||
created_at: string;
|
||||
description: string;
|
||||
directory_channel_id: string;
|
||||
guild: Guild;
|
||||
primary_category_id: number;
|
||||
type: number; // TODO: not exactly sure what this is, channel type?
|
||||
}
|
||||
|
||||
export type HubDirectoryEntriesResponse = HubDirectoryEntry[];
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface HubWaitlistSignupResponse {
|
||||
email: string;
|
||||
email_domain: string;
|
||||
school: string;
|
||||
user_id: string;
|
||||
}
|
||||
@@ -21,6 +21,8 @@ export * from "./APIErrorResponse";
|
||||
export * from "./BackupCodesChallengeResponse";
|
||||
export * from "./CaptchaRequiredResponse";
|
||||
export * from "./DiscoverableGuildsResponse";
|
||||
export * from "./EmailDomainLookupResponse";
|
||||
export * from "./EmailDomainLookupVerifyCodeResponse";
|
||||
export * from "./GatewayBotResponse";
|
||||
export * from "./GatewayResponse";
|
||||
export * from "./GenerateRegistrationTokensResponse";
|
||||
@@ -34,6 +36,8 @@ export * from "./GuildVanityUrl";
|
||||
export * from "./GuildVoiceRegionsResponse";
|
||||
export * from "./GuildWidgetJsonResponse";
|
||||
export * from "./GuildWidgetSettingsResponse";
|
||||
export * from "./HubDirectoryEntriesResponse";
|
||||
export * from "./HubWaitlistSignupResponse";
|
||||
export * from "./InstanceDomainsResponse";
|
||||
export * from "./InstancePingResponse";
|
||||
export * from "./InstanceStatsResponse";
|
||||
@@ -47,7 +51,7 @@ export * from "./TypedResponses";
|
||||
export * from "./UpdatesResponse";
|
||||
export * from "./UserNoteResponse";
|
||||
export * from "./UserProfileResponse";
|
||||
export * from "./UserRelationsResponse";
|
||||
export * from "./UserRelationshipsResponse";
|
||||
export * from "./UserRelationsResponse";
|
||||
export * from "./WebAuthnCreateResponse";
|
||||
export * from "./WebhookCreateResponse";
|
||||
|
||||
Reference in New Issue
Block a user