diff --git a/deno/gateway/v10.ts b/deno/gateway/v10.ts index 54247ca2..f9f39ef7 100644 --- a/deno/gateway/v10.ts +++ b/deno/gateway/v10.ts @@ -35,6 +35,7 @@ import type { APIAuditLogEntry, APIEntitlement, ChannelType, + APISubscription, } from '../payloads/v10/mod.ts'; import type { ReactionType } from '../rest/v10/mod.ts'; import type { Nullable } from '../utils/internals.ts'; @@ -349,6 +350,7 @@ export type GatewayDispatchPayload = | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch + | GatewaySubscriptionModifyDispatch | GatewayThreadCreateDispatch | GatewayThreadDeleteDispatch | GatewayThreadListSyncDispatch @@ -617,6 +619,55 @@ export interface GatewayApplicationCommandPermissionsUpdateDispatchData { permissions: APIApplicationCommandPermission[]; } +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionModifyDispatch = DataPayload< + | GatewayDispatchEvents.SubscriptionCreate + | GatewayDispatchEvents.SubscriptionDelete + | GatewayDispatchEvents.SubscriptionUpdate, + GatewaySubscriptionModifyDispatchData +>; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionModifyDispatchData = APISubscription; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + */ +export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + */ +export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDispatchData; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + */ +export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + */ +export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDispatchData; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionDeleteDispatchData = GatewaySubscriptionModifyDispatchData; + /** * https://discord.com/developers/docs/topics/gateway-events#channel-create * https://discord.com/developers/docs/topics/gateway-events#channel-update diff --git a/deno/gateway/v9.ts b/deno/gateway/v9.ts index ece65f93..57a86fa1 100644 --- a/deno/gateway/v9.ts +++ b/deno/gateway/v9.ts @@ -34,6 +34,7 @@ import type { AutoModerationRuleTriggerType, APIAuditLogEntry, ChannelType, + APISubscription, } from '../payloads/v9/mod.ts'; import type { ReactionType } from '../rest/v9/mod.ts'; import type { Nullable } from '../utils/internals.ts'; @@ -348,6 +349,7 @@ export type GatewayDispatchPayload = | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch + | GatewaySubscriptionModifyDispatch | GatewayThreadCreateDispatch | GatewayThreadDeleteDispatch | GatewayThreadListSyncDispatch @@ -616,6 +618,55 @@ export interface GatewayApplicationCommandPermissionsUpdateDispatchData { permissions: APIApplicationCommandPermission[]; } +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionModifyDispatch = DataPayload< + | GatewayDispatchEvents.SubscriptionCreate + | GatewayDispatchEvents.SubscriptionDelete + | GatewayDispatchEvents.SubscriptionUpdate, + GatewaySubscriptionModifyDispatchData +>; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionModifyDispatchData = APISubscription; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + */ +export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + */ +export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDispatchData; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + */ +export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + */ +export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDispatchData; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionDeleteDispatchData = GatewaySubscriptionModifyDispatchData; + /** * https://discord.com/developers/docs/topics/gateway-events#channel-create * https://discord.com/developers/docs/topics/gateway-events#channel-update diff --git a/gateway/v10.ts b/gateway/v10.ts index b4bda37e..d7ce181c 100644 --- a/gateway/v10.ts +++ b/gateway/v10.ts @@ -35,6 +35,7 @@ import type { APIAuditLogEntry, APIEntitlement, ChannelType, + APISubscription, } from '../payloads/v10/index'; import type { ReactionType } from '../rest/v10/index'; import type { Nullable } from '../utils/internals'; @@ -349,6 +350,7 @@ export type GatewayDispatchPayload = | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch + | GatewaySubscriptionModifyDispatch | GatewayThreadCreateDispatch | GatewayThreadDeleteDispatch | GatewayThreadListSyncDispatch @@ -617,6 +619,55 @@ export interface GatewayApplicationCommandPermissionsUpdateDispatchData { permissions: APIApplicationCommandPermission[]; } +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionModifyDispatch = DataPayload< + | GatewayDispatchEvents.SubscriptionCreate + | GatewayDispatchEvents.SubscriptionDelete + | GatewayDispatchEvents.SubscriptionUpdate, + GatewaySubscriptionModifyDispatchData +>; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionModifyDispatchData = APISubscription; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + */ +export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + */ +export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDispatchData; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + */ +export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + */ +export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDispatchData; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionDeleteDispatchData = GatewaySubscriptionModifyDispatchData; + /** * https://discord.com/developers/docs/topics/gateway-events#channel-create * https://discord.com/developers/docs/topics/gateway-events#channel-update diff --git a/gateway/v9.ts b/gateway/v9.ts index 70e8cbc9..578b7d01 100644 --- a/gateway/v9.ts +++ b/gateway/v9.ts @@ -34,6 +34,7 @@ import type { AutoModerationRuleTriggerType, APIAuditLogEntry, ChannelType, + APISubscription, } from '../payloads/v9/index'; import type { ReactionType } from '../rest/v9/index'; import type { Nullable } from '../utils/internals'; @@ -348,6 +349,7 @@ export type GatewayDispatchPayload = | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch + | GatewaySubscriptionModifyDispatch | GatewayThreadCreateDispatch | GatewayThreadDeleteDispatch | GatewayThreadListSyncDispatch @@ -616,6 +618,55 @@ export interface GatewayApplicationCommandPermissionsUpdateDispatchData { permissions: APIApplicationCommandPermission[]; } +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionModifyDispatch = DataPayload< + | GatewayDispatchEvents.SubscriptionCreate + | GatewayDispatchEvents.SubscriptionDelete + | GatewayDispatchEvents.SubscriptionUpdate, + GatewaySubscriptionModifyDispatchData +>; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionModifyDispatchData = APISubscription; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + */ +export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-create + */ +export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDispatchData; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + */ +export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-update + */ +export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDispatchData; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch; + +/** + * https://discord.com/developers/docs/topics/gateway-events#subscription-delete + */ +export type GatewaySubscriptionDeleteDispatchData = GatewaySubscriptionModifyDispatchData; + /** * https://discord.com/developers/docs/topics/gateway-events#channel-create * https://discord.com/developers/docs/topics/gateway-events#channel-update