Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

fix(schema): add missing with_counts fields to GuildResponse and GuildAdminResponse schemas (#1213)

Mizarc5293386e1534
diff --git a/fluxer_admin/openapi-admin.json b/fluxer_admin/openapi-admin.json
index cfbe0c39f..c61c10bbf 100644
--- a/fluxer_admin/openapi-admin.json
+++ b/fluxer_admin/openapi-admin.json
@@ -12197,7 +12197,9 @@
"description": "Custom content warning text shown before entry",
"nullable": true,
"type": "string"
- }
+ },
+ "approximate_member_count": {"$ref": "#/components/schemas/Int32Type"},
+ "approximate_presence_count": {"$ref": "#/components/schemas/Int32Type"}
},
"required": [
"id",
diff --git a/fluxer_api/src/api/openapi/openapi.json b/fluxer_api/src/api/openapi/openapi.json
index 2f4e291a0..4b1bec5db 100644
--- a/fluxer_api/src/api/openapi/openapi.json
+++ b/fluxer_api/src/api/openapi/openapi.json
@@ -29981,7 +29981,9 @@
"description": "Channels visible to the requesting user from gateway state"
},
"member_count": {"$ref": "#/components/schemas/Int32Type"},
- "online_count": {"$ref": "#/components/schemas/Int32Type"}
+ "online_count": {"$ref": "#/components/schemas/Int32Type"},
+ "approximate_member_count": {"$ref": "#/components/schemas/Int32Type"},
+ "approximate_presence_count": {"$ref": "#/components/schemas/Int32Type"}
},
"required": [
"id",
diff --git a/packages/schema/src/domains/admin/AdminGuildSchemas.ts b/packages/schema/src/domains/admin/AdminGuildSchemas.ts
index 43ba2f2fb..cfa8cd5c8 100644
--- a/packages/schema/src/domains/admin/AdminGuildSchemas.ts
+++ b/packages/schema/src/domains/admin/AdminGuildSchemas.ts
@@ -47,6 +47,12 @@ export const GuildAdminResponse = z.object({
.nullable()
.optional()
.describe('Custom content warning text shown before entry'),
+ approximate_member_count: Int32Type.optional().describe(
+ 'Approximate total member count (only when with_counts is true)'
+ ),
+ approximate_presence_count: Int32Type.optional().describe(
+ 'Approximate online member count (only when with_counts is true)'
+ ),
});
export type GuildAdminResponse = z.infer<typeof GuildAdminResponse>;
diff --git a/packages/schema/src/domains/guild/GuildResponseSchemas.ts b/packages/schema/src/domains/guild/GuildResponseSchemas.ts
index 7e81b4b75..a2e58315b 100644
--- a/packages/schema/src/domains/guild/GuildResponseSchemas.ts
+++ b/packages/schema/src/domains/guild/GuildResponseSchemas.ts
@@ -165,6 +165,12 @@ export const GuildResponse = z.object({
channels: z.array(ChannelResponse).optional().describe('Channels visible to the requesting user from gateway state'),
member_count: Int32Type.optional().describe('Total number of members in the guild'),
online_count: Int32Type.optional().describe('Number of online members visible in the guild'),
+ approximate_member_count: Int32Type.optional().describe(
+ 'Approximate total member count (only when with_counts is true)',
+ ),
+ approximate_presence_count: Int32Type.optional().describe(
+ 'Approximate online member count (only when with_counts is true)',
+ ),
});
export type GuildResponse = z.infer<typeof GuildResponse>;
@@ -232,6 +238,8 @@ export interface Guild {
readonly unavailable_hidden?: boolean;
readonly member_count?: number;
readonly online_count?: number;
+ readonly approximate_member_count?: number;
+ readonly approximate_presence_count?: number;
readonly roles?: ReadonlyArray<z.infer<typeof GuildRoleResponse>>;
readonly emojis?: ReadonlyArray<z.infer<typeof GuildEmojiResponse>>;
readonly stickers?: ReadonlyArray<z.infer<typeof GuildStickerResponse>>;