diff --git a/src/api/routes/users/@me/mfa/codes-verification.ts b/src/api/routes/users/@me/mfa/codes-verification.ts
index 2fd1dd32..d84aa26a 100644
--- a/src/api/routes/users/@me/mfa/codes-verification.ts
+++ b/src/api/routes/users/@me/mfa/codes-verification.ts
@@ -30,7 +30,7 @@ router.post(
requestBody: "CodesVerificationSchema",
responses: {
200: {
- body: "APIBackupCodeArray",
+ body: "BackupCodeArray",
},
400: {
body: "APIErrorResponse",
diff --git a/src/api/routes/users/@me/mfa/codes.ts b/src/api/routes/users/@me/mfa/codes.ts
index 969ff78f..73cde9d4 100644
--- a/src/api/routes/users/@me/mfa/codes.ts
+++ b/src/api/routes/users/@me/mfa/codes.ts
@@ -35,7 +35,7 @@ router.post(
description: "This route is replaced with users/@me/mfa/codes-verification in newer clients",
responses: {
200: {
- body: "APIBackupCodeArray",
+ body: "BackupCodeArray",
},
400: {
body: "APIErrorResponse",
diff --git a/src/schemas/responses/BackupCodesChallengeResponse.ts b/src/schemas/responses/BackupCodesResponses.ts
index ab6e4129..feccd728 100644
--- a/src/schemas/responses/BackupCodesChallengeResponse.ts
+++ b/src/schemas/responses/BackupCodesResponses.ts
@@ -1,6 +1,6 @@
/*
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
+ Copyright (C) 2026 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
@@ -16,7 +16,14 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-export interface BackupCodesChallengeResponse {
+export interface BackupCodesResponses {
nonce: string;
regenerate_nonce: string;
}
+
+export interface BackupCode {
+ code: string;
+ consumed: boolean;
+}
+
+export type BackupCodeArray = BackupCode[];
diff --git a/src/schemas/responses/TypedResponses.ts b/src/schemas/responses/TypedResponses.ts
index 2cf9d6f8..2055d6af 100644
--- a/src/schemas/responses/TypedResponses.ts
+++ b/src/schemas/responses/TypedResponses.ts
@@ -30,7 +30,6 @@ export type APIPublicUser = PublicUser;
export type APIPrivateUser = PrivateUser;
export type APIGuildArray = APIGuild[];
export type APIDMChannelArray = DmChannelDTO[];
-export type APIBackupCodeArray = BackupCode[];
export interface UserUpdateResponse extends APIPrivateUser {
newToken?: string;
@@ -43,7 +42,6 @@ export type APIApplicationArray = Application[];
export type APIInviteArray = Invite[];
export type APIWebhookArray = Webhook[];
export type APIDiscoveryCategoryArray = Categories[];
-export type APIGeneralConfiguration = GeneralConfiguration;
export type APIChannelArray = Channel[];
export interface APIGuildWithJoinedAt extends GuildCreateResponse {
@@ -51,6 +49,7 @@ export interface APIGuildWithJoinedAt extends GuildCreateResponse {
}
export type APITemplateArray = Template[];
+export type APIGeneralConfiguration = GeneralConfiguration;
export type APILimitsConfiguration = LimitsConfiguration;
export type APIConnectionsConfiguration = Record<
diff --git a/src/schemas/responses/index.ts b/src/schemas/responses/index.ts
index 95fce7bd..e5b3f641 100644
--- a/src/schemas/responses/index.ts
+++ b/src/schemas/responses/index.ts
@@ -19,7 +19,7 @@
export * from "./APIErrorOrCaptchaResponse";
export * from "./APIErrorResponse";
export * from "./AccountStandingResponse";
-export * from "./BackupCodesChallengeResponse";
+export * from "./BackupCodesResponses";
export * from "./CaptchaRequiredResponse";
export * from "./CollectiblesCategoriesResponse";
export * from "./CollectiblesMarketingResponse";
|