feat: missing subscription dispatch types (#1105)

This commit is contained in:
Almeida
2024-09-22 14:02:23 +01:00
committed by GitHub
parent 2ae232477a
commit 2b653a00b3
4 changed files with 204 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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