diff --git a/assets/openapi.json b/assets/openapi.json index e5c7f6c23..060937d0d 100644 Binary files a/assets/openapi.json and b/assets/openapi.json differ diff --git a/assets/schemas.json b/assets/schemas.json index a31541225..1dd09ce9a 100644 Binary files a/assets/schemas.json and b/assets/schemas.json differ diff --git a/src/schemas/api/guilds/AuditLog.ts b/src/schemas/api/guilds/AuditLog.ts index e538b3d1d..3b2286a5b 100644 --- a/src/schemas/api/guilds/AuditLog.ts +++ b/src/schemas/api/guilds/AuditLog.ts @@ -16,11 +16,11 @@ along with this program. If not, see . */ -import { AutomodRuleSchema, ChannelPermissionOverwrite, PartialUser, PublicChannel, WebhookResponse } from "@spacebar/schemas"; +import { AutomodRuleSchema, ChannelPermissionOverwrite, PartialUser, PublicChannel, Snowflake, WebhookResponse } from "@spacebar/schemas"; // Note: some audit log event types have some special keys: https://docs.discord.food/resources/audit-log#audit-log-change-exceptions export interface AuditLogResponse { - audit_log_entries: unknown[]; // TODO: type + audit_log_entries: AuditLogEntry[]; application_commands: unknown[]; // TODO: type auto_moderation_rules: AutomodRuleSchema[]; guild_scheduled_events: unknown[]; // TODO: type @@ -30,6 +30,16 @@ export interface AuditLogResponse { webhooks: WebhookResponse[]; } +export interface AuditLogEntry { + id: Snowflake; + action_type: AuditLogEvents; + user_id: Snowflake | null; + target_id: Snowflake | null; + changes?: AuditLogChange[]; + options?: unknown; + reason?: string; +} + export enum AuditLogEvents { // guild level GUILD_UPDATE = 1,