fix(app,api): kick reasons, blocked counts and locale fallbacks (#3334)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-09 01:40:08 +02:00
1 parent a5c1362f4a
commit 4db13b0375
157 files changed
+3080 -1995

No files matched your search

@@ -1269,9 +1269,6 @@ const AdminGuildResponseSchema = z.object({
banner: createStringType(1, 256).nullable(),
member_count: Int32Type,
nsfw_level: NSFWLevelSchema.optional(),
nsfw: z.boolean().optional(),
content_warning_level: ContentWarningLevelSchema.optional(),
content_warning_text: createStringType(0, CONTENT_WARNING_TEXT_MAX_LENGTH).nullable().optional(),
});
const AdminGuildChannelSummarySchema = z.object({
id: SnowflakeStringType,
@@ -232,11 +232,7 @@ export const RecoverAccountResponse = z.union([
export type RecoverAccountResponse = z.infer<typeof RecoverAccountResponse>;
export const AuthRegisterResponse = z.union([
AuthTokenWithUserIdResponse,
AuthMfaRequiredResponse,
AuthRegistrationPendingApprovalResponse,
]);
export const AuthRegisterResponse = z.union([AuthTokenWithUserIdResponse, AuthRegistrationPendingApprovalResponse]);
export type AuthRegisterResponse = z.infer<typeof AuthRegisterResponse>;
@@ -13,6 +13,11 @@ export const EmbedAuthorResponse = z.object({
export type EmbedAuthorResponse = z.infer<typeof EmbedAuthorResponse>;
export const EmbedProviderResponse = z.object({
name: z.string().describe('The name of the provider'),
url: z.url().nullish().describe('The URL of the provider'),
});
export const EmbedFooterResponse = z.object({
text: z.string().describe('The footer text'),
icon_url: z.url().nullish().describe('The URL of the footer icon'),
@@ -61,7 +66,7 @@ export const MessageEmbedChildResponse = z.object({
thumbnail: EmbedMediaResponse.nullish().describe('The thumbnail of the embed'),
footer: EmbedFooterResponse.nullish().describe('The footer of the embed'),
fields: z.array(EmbedFieldResponse).nullish().describe('The fields of the embed'),
provider: EmbedAuthorResponse.nullish().describe('The provider of the embed (e.g., YouTube, Twitter)'),
provider: EmbedProviderResponse.nullish().describe('The provider of the embed (e.g., YouTube, Twitter)'),
video: EmbedMediaResponse.nullish().describe('The video of the embed'),
audio: EmbedMediaResponse.nullish().describe('The audio of the embed'),
html: z.string().nullish().describe('Sanitized oEmbed HTML for trusted specialized embed renderers'),
@@ -89,6 +94,11 @@ export interface EmbedAuthor {
readonly proxy_icon_url?: string;
}
export interface EmbedProvider {
readonly name: string;
readonly url?: string;
}
export interface EmbedFooter {
readonly text: string;
readonly icon_url?: string;
@@ -128,7 +138,7 @@ export interface MessageEmbedChild {
readonly thumbnail?: EmbedMedia;
readonly footer?: EmbedFooter;
readonly fields?: ReadonlyArray<EmbedField>;
readonly provider?: EmbedAuthor;
readonly provider?: EmbedProvider;
readonly video?: EmbedMedia;
readonly audio?: EmbedMedia;
readonly html?: string;
@@ -84,13 +84,13 @@ export const TicketResponse = z.object({
export type TicketResponse = z.infer<typeof TicketResponse>;
const FLUXER_TAG_REGEX = /^([^#]{1,32})#([0-9]{4})$/;
const FLUXER_TAG_REGEX = /^([^#]{1,32})(#[0-9]{4})?$/;
const FLUXER_TAG_TYPE = z
.string()
.min(3)
.min(1)
.max(37)
.refine((value) => FLUXER_TAG_REGEX.test(value), 'Fluxer tag must be in the format username#1234')
.describe('A Fluxer username tag in the format username#1234');
.refine((value) => FLUXER_TAG_REGEX.test(value), 'Fluxer tag must be in the format username#1234 or username')
.describe('A Fluxer username tag in the format username#1234, or a bare username on an instance without user tags');
const EuCountryCodeEnum = withOpenApiType(
createNamedStringLiteralUnion(
[
@@ -59,4 +59,8 @@ export const HarvestDownloadUrlResponse = z.object({
export type HarvestDownloadUrlResponse = z.infer<typeof HarvestDownloadUrlResponse>;
export const HarvestDownloadQuery = z.object({
token: createStringType(1, 2048).describe('The signed download token from the harvest download URL'),
});
export const HarvestArchiveResponse = z.file().describe('The ZIP archive containing the requested user data');