Skip to content

Commit

Permalink
feat(APIAuditLogChange): add missing keys (#964)
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftyy authored Apr 25, 2024
1 parent c9f2c5b commit 4e37de7
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 4 deletions.
33 changes: 32 additions & 1 deletion deno/payloads/v10/auditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type {
AutoModerationRuleEventType,
AutoModerationRuleTriggerType,
} from './autoModeration.ts';
import type { APIChannel, APIOverwrite } from './channel.ts';
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel.ts';
import type {
APIGuildIntegration,
APIGuildIntegrationType,
Expand Down Expand Up @@ -353,6 +353,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyAsset
| APIAuditLogChangeKeyAutoArchiveDuration
| APIAuditLogChangeKeyAvailable
| APIAuditLogChangeKeyAvailableTags
| APIAuditLogChangeKeyAvatarHash
| APIAuditLogChangeKeyBannerHash
| APIAuditLogChangeKeyBitrate
Expand All @@ -363,6 +364,8 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyDeaf
| APIAuditLogChangeKeyDefaultAutoArchiveDuration
| APIAuditLogChangeKeyDefaultMessageNotifications
| APIAuditLogChangeKeyDefaultReactionEmoji
| APIAuditLogChangeKeyDefaultThreadRateLimitPerUser
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyDiscoverySplashHash
Expand All @@ -375,6 +378,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyExpireBehavior
| APIAuditLogChangeKeyExpireGracePeriod
| APIAuditLogChangeKeyExplicitContentFilter
| APIAuditLogChangeKeyFlags
| APIAuditLogChangeKeyFormatType
| APIAuditLogChangeKeyGuildId
| APIAuditLogChangeKeyHoist
Expand Down Expand Up @@ -832,6 +836,33 @@ export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles',
*/
export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>;

/**
* Returned when a guild forum's available tags gets changed
*/
export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>;

/**
* Returned when a guild forum's default reaction emoji gets changed
*/
export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<
'default_reaction_emoji',
APIGuildForumDefaultReactionEmoji
>;

/**
* Returned when a channel flag gets changed
*/
export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>;

/**
* Returned when a thread's amount of seconds a user has to wait before creating another thread
* gets changed
*/
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData<
'default_thread_rate_limit_per_user',
number
>;

interface AuditLogChangeData<K extends string, D> {
key: K;
/**
Expand Down
33 changes: 32 additions & 1 deletion deno/payloads/v9/auditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type {
AutoModerationRuleEventType,
AutoModerationRuleTriggerType,
} from './autoModeration.ts';
import type { APIChannel, APIOverwrite } from './channel.ts';
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel.ts';
import type {
APIGuildIntegration,
APIGuildIntegrationType,
Expand Down Expand Up @@ -353,6 +353,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyAsset
| APIAuditLogChangeKeyAutoArchiveDuration
| APIAuditLogChangeKeyAvailable
| APIAuditLogChangeKeyAvailableTags
| APIAuditLogChangeKeyAvatarHash
| APIAuditLogChangeKeyBannerHash
| APIAuditLogChangeKeyBitrate
Expand All @@ -363,6 +364,8 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyDeaf
| APIAuditLogChangeKeyDefaultAutoArchiveDuration
| APIAuditLogChangeKeyDefaultMessageNotifications
| APIAuditLogChangeKeyDefaultReactionEmoji
| APIAuditLogChangeKeyDefaultThreadRateLimitPerUser
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyDiscoverySplashHash
Expand All @@ -375,6 +378,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyExpireBehavior
| APIAuditLogChangeKeyExpireGracePeriod
| APIAuditLogChangeKeyExplicitContentFilter
| APIAuditLogChangeKeyFlags
| APIAuditLogChangeKeyFormatType
| APIAuditLogChangeKeyGuildId
| APIAuditLogChangeKeyHoist
Expand Down Expand Up @@ -832,6 +836,33 @@ export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles',
*/
export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>;

/**
* Returned when a guild forum's available tags gets changed
*/
export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>;

/**
* Returned when a guild forum's default reaction emoji gets changed
*/
export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<
'default_reaction_emoji',
APIGuildForumDefaultReactionEmoji
>;

/**
* Returned when a channel flag gets changed
*/
export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>;

/**
* Returned when a thread's amount of seconds a user has to wait before creating another thread
* gets changed
*/
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData<
'default_thread_rate_limit_per_user',
number
>;

interface AuditLogChangeData<K extends string, D> {
key: K;
/**
Expand Down
33 changes: 32 additions & 1 deletion payloads/v10/auditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type {
AutoModerationRuleEventType,
AutoModerationRuleTriggerType,
} from './autoModeration';
import type { APIChannel, APIOverwrite } from './channel';
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel';
import type {
APIGuildIntegration,
APIGuildIntegrationType,
Expand Down Expand Up @@ -353,6 +353,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyAsset
| APIAuditLogChangeKeyAutoArchiveDuration
| APIAuditLogChangeKeyAvailable
| APIAuditLogChangeKeyAvailableTags
| APIAuditLogChangeKeyAvatarHash
| APIAuditLogChangeKeyBannerHash
| APIAuditLogChangeKeyBitrate
Expand All @@ -363,6 +364,8 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyDeaf
| APIAuditLogChangeKeyDefaultAutoArchiveDuration
| APIAuditLogChangeKeyDefaultMessageNotifications
| APIAuditLogChangeKeyDefaultReactionEmoji
| APIAuditLogChangeKeyDefaultThreadRateLimitPerUser
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyDiscoverySplashHash
Expand All @@ -375,6 +378,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyExpireBehavior
| APIAuditLogChangeKeyExpireGracePeriod
| APIAuditLogChangeKeyExplicitContentFilter
| APIAuditLogChangeKeyFlags
| APIAuditLogChangeKeyFormatType
| APIAuditLogChangeKeyGuildId
| APIAuditLogChangeKeyHoist
Expand Down Expand Up @@ -832,6 +836,33 @@ export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles',
*/
export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>;

/**
* Returned when a guild forum's available tags gets changed
*/
export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>;

/**
* Returned when a guild forum's default reaction emoji gets changed
*/
export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<
'default_reaction_emoji',
APIGuildForumDefaultReactionEmoji
>;

/**
* Returned when a channel flag gets changed
*/
export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>;

/**
* Returned when a thread's amount of seconds a user has to wait before creating another thread
* gets changed
*/
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData<
'default_thread_rate_limit_per_user',
number
>;

interface AuditLogChangeData<K extends string, D> {
key: K;
/**
Expand Down
33 changes: 32 additions & 1 deletion payloads/v9/auditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type {
AutoModerationRuleEventType,
AutoModerationRuleTriggerType,
} from './autoModeration';
import type { APIChannel, APIOverwrite } from './channel';
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel';
import type {
APIGuildIntegration,
APIGuildIntegrationType,
Expand Down Expand Up @@ -353,6 +353,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyAsset
| APIAuditLogChangeKeyAutoArchiveDuration
| APIAuditLogChangeKeyAvailable
| APIAuditLogChangeKeyAvailableTags
| APIAuditLogChangeKeyAvatarHash
| APIAuditLogChangeKeyBannerHash
| APIAuditLogChangeKeyBitrate
Expand All @@ -363,6 +364,8 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyDeaf
| APIAuditLogChangeKeyDefaultAutoArchiveDuration
| APIAuditLogChangeKeyDefaultMessageNotifications
| APIAuditLogChangeKeyDefaultReactionEmoji
| APIAuditLogChangeKeyDefaultThreadRateLimitPerUser
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyDiscoverySplashHash
Expand All @@ -375,6 +378,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyExpireBehavior
| APIAuditLogChangeKeyExpireGracePeriod
| APIAuditLogChangeKeyExplicitContentFilter
| APIAuditLogChangeKeyFlags
| APIAuditLogChangeKeyFormatType
| APIAuditLogChangeKeyGuildId
| APIAuditLogChangeKeyHoist
Expand Down Expand Up @@ -832,6 +836,33 @@ export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles',
*/
export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>;

/**
* Returned when a guild forum's available tags gets changed
*/
export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>;

/**
* Returned when a guild forum's default reaction emoji gets changed
*/
export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<
'default_reaction_emoji',
APIGuildForumDefaultReactionEmoji
>;

/**
* Returned when a channel flag gets changed
*/
export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>;

/**
* Returned when a thread's amount of seconds a user has to wait before creating another thread
* gets changed
*/
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData<
'default_thread_rate_limit_per_user',
number
>;

interface AuditLogChangeData<K extends string, D> {
key: K;
/**
Expand Down

0 comments on commit 4e37de7

Please sign in to comment.