From 06ea966591a2d35b82d54bbb6666adbe0e11632b Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 15 Jul 2026 12:50:53 +0200 Subject: [PATCH] Remove APIBackupCodesArray --- assets/openapi.json | Bin 996580 -> 995921 bytes assets/schemas.json | Bin 441854 -> 441213 bytes .../users/@me/mfa/codes-verification.ts | 2 +- src/api/routes/users/@me/mfa/codes.ts | 2 +- ...ngeResponse.ts => BackupCodesResponses.ts} | 11 +++++++++-- src/schemas/responses/TypedResponses.ts | 3 +-- src/schemas/responses/index.ts | 2 +- 7 files changed, 13 insertions(+), 7 deletions(-) rename src/schemas/responses/{BackupCodesChallengeResponse.ts => BackupCodesResponses.ts} (78%) diff --git a/assets/openapi.json b/assets/openapi.json index 91807e0bc3a72e4ccffffde4385bcbd3a4f75458..b96c1edd44f4aa7f50b28e4f78aba4895e69e3ea 100644 GIT binary patch delta 167 zcmaFz(&pk5n+=JVn)R=2*T2HpcW!#a5@wd|4U3ud#kR8_WQrBpzJ4cD1bchRRVE;2 z24WT>$~awN9;e)NgLNEU+x3rg h1Thm(<=(#T90w3{0x=g5a|1CC5c6(dcaG024FDVaNE`qF delta 215 zcmcck#OBFMn+=JVCeQN_nf@u6F=euKS?2UO9cG=$4S^{vdHH$ClNmiEr@xJ6=3K61!c;l^KrW-qv`R*~ z=>|s_S*Dxb;NYMBJDD+hd+b7{qoUjEPcucZZ&%vR6f4qx{Sp%pGXpUT5VHa?+xF|1 z*k`|G2AaD4<8clxmg)2NaBys2a)iT|86?;a6a->UAm##MZXo6XVqTzPzJx3Qy3b!O diff --git a/assets/schemas.json b/assets/schemas.json index 6b696fd48917437e4e36f9a7177aa734fadae0cc..1d31ca658ebf833190d19f352a9d39712dbbcef4 100644 GIT binary patch delta 63 zcmezOTk7vOsSR5U0A;rpW1YY#Bu+M_KVq tZ}4Yw*#6p%Nm+RN|0Jg0Y}@&Qm_7=$|H@. */ -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 2cf9d6f84..2055d6aff 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 95fce7bdf..e5b3f6418 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";