mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-30 15:30:09 +00:00
feat: add stage instance related typings to audit logs (#151)
This commit is contained in:
@@ -15,6 +15,7 @@ import type {
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
import type { APIWebhook } from './webhook.ts';
|
||||
import type { StageInstancePrivacyLevel } from './stageInstance.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
|
||||
@@ -135,6 +136,10 @@ export enum AuditLogEvent {
|
||||
IntegrationCreate = 80,
|
||||
IntegrationUpdate,
|
||||
IntegrationDelete,
|
||||
|
||||
StageInstanceCreate = 83,
|
||||
StageInstanceUpdate,
|
||||
StageInstanceDelete,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,6 +169,9 @@ export interface APIAuditLogOptions {
|
||||
* - MESSAGE_PIN
|
||||
* - MESSAGE_UNPIN
|
||||
* - MESSAGE_DELETE
|
||||
* - STAGE_INSTANCE_CREATE
|
||||
* - STAGE_INSTANCE_UPDATE
|
||||
* - STAGE_INSTANCE_DELETE
|
||||
*/
|
||||
channel_id?: Snowflake;
|
||||
|
||||
@@ -284,7 +292,8 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyEnableEmoticons
|
||||
| APIAuditLogChangeKeyExpireBehavior
|
||||
| APIAuditLogChangeKeyExpireGracePeriod
|
||||
| APIAuditLogChangeKeyUserLimit;
|
||||
| APIAuditLogChangeKeyUserLimit
|
||||
| APIAuditLogChangeKeyPrivacyLevel;
|
||||
|
||||
/**
|
||||
* Returned when a guild's name is changed
|
||||
@@ -563,6 +572,11 @@ export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_g
|
||||
*/
|
||||
export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
|
||||
|
||||
/**
|
||||
* Returned when privacy level of a stage instance is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
|
||||
|
||||
interface AuditLogChangeData<K extends string, D extends unknown> {
|
||||
key: K;
|
||||
/**
|
||||
|
||||
@@ -15,6 +15,7 @@ import type {
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
import type { APIWebhook } from './webhook.ts';
|
||||
import type { StageInstancePrivacyLevel } from './stageInstance.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
|
||||
@@ -135,6 +136,10 @@ export enum AuditLogEvent {
|
||||
IntegrationCreate = 80,
|
||||
IntegrationUpdate,
|
||||
IntegrationDelete,
|
||||
|
||||
StageInstanceCreate = 83,
|
||||
StageInstanceUpdate,
|
||||
StageInstanceDelete,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,6 +169,9 @@ export interface APIAuditLogOptions {
|
||||
* - MESSAGE_PIN
|
||||
* - MESSAGE_UNPIN
|
||||
* - MESSAGE_DELETE
|
||||
* - STAGE_INSTANCE_CREATE
|
||||
* - STAGE_INSTANCE_UPDATE
|
||||
* - STAGE_INSTANCE_DELETE
|
||||
*/
|
||||
channel_id?: Snowflake;
|
||||
|
||||
@@ -284,7 +292,8 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyEnableEmoticons
|
||||
| APIAuditLogChangeKeyExpireBehavior
|
||||
| APIAuditLogChangeKeyExpireGracePeriod
|
||||
| APIAuditLogChangeKeyUserLimit;
|
||||
| APIAuditLogChangeKeyUserLimit
|
||||
| APIAuditLogChangeKeyPrivacyLevel;
|
||||
|
||||
/**
|
||||
* Returned when a guild's name is changed
|
||||
@@ -563,6 +572,11 @@ export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_g
|
||||
*/
|
||||
export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
|
||||
|
||||
/**
|
||||
* Returned when privacy level of a stage instance is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
|
||||
|
||||
interface AuditLogChangeData<K extends string, D extends unknown> {
|
||||
key: K;
|
||||
/**
|
||||
|
||||
@@ -15,6 +15,7 @@ import type {
|
||||
import type { APIRole } from './permissions';
|
||||
import type { APIUser } from './user';
|
||||
import type { APIWebhook } from './webhook';
|
||||
import type { StageInstancePrivacyLevel } from './stageInstance';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
|
||||
@@ -135,6 +136,10 @@ export const enum AuditLogEvent {
|
||||
IntegrationCreate = 80,
|
||||
IntegrationUpdate,
|
||||
IntegrationDelete,
|
||||
|
||||
StageInstanceCreate = 83,
|
||||
StageInstanceUpdate,
|
||||
StageInstanceDelete,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,6 +169,9 @@ export interface APIAuditLogOptions {
|
||||
* - MESSAGE_PIN
|
||||
* - MESSAGE_UNPIN
|
||||
* - MESSAGE_DELETE
|
||||
* - STAGE_INSTANCE_CREATE
|
||||
* - STAGE_INSTANCE_UPDATE
|
||||
* - STAGE_INSTANCE_DELETE
|
||||
*/
|
||||
channel_id?: Snowflake;
|
||||
|
||||
@@ -284,7 +292,8 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyEnableEmoticons
|
||||
| APIAuditLogChangeKeyExpireBehavior
|
||||
| APIAuditLogChangeKeyExpireGracePeriod
|
||||
| APIAuditLogChangeKeyUserLimit;
|
||||
| APIAuditLogChangeKeyUserLimit
|
||||
| APIAuditLogChangeKeyPrivacyLevel;
|
||||
|
||||
/**
|
||||
* Returned when a guild's name is changed
|
||||
@@ -563,6 +572,11 @@ export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_g
|
||||
*/
|
||||
export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
|
||||
|
||||
/**
|
||||
* Returned when privacy level of a stage instance is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
|
||||
|
||||
interface AuditLogChangeData<K extends string, D extends unknown> {
|
||||
key: K;
|
||||
/**
|
||||
|
||||
@@ -15,6 +15,7 @@ import type {
|
||||
import type { APIRole } from './permissions';
|
||||
import type { APIUser } from './user';
|
||||
import type { APIWebhook } from './webhook';
|
||||
import type { StageInstancePrivacyLevel } from './stageInstance';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
|
||||
@@ -135,6 +136,10 @@ export const enum AuditLogEvent {
|
||||
IntegrationCreate = 80,
|
||||
IntegrationUpdate,
|
||||
IntegrationDelete,
|
||||
|
||||
StageInstanceCreate = 83,
|
||||
StageInstanceUpdate,
|
||||
StageInstanceDelete,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,6 +169,9 @@ export interface APIAuditLogOptions {
|
||||
* - MESSAGE_PIN
|
||||
* - MESSAGE_UNPIN
|
||||
* - MESSAGE_DELETE
|
||||
* - STAGE_INSTANCE_CREATE
|
||||
* - STAGE_INSTANCE_UPDATE
|
||||
* - STAGE_INSTANCE_DELETE
|
||||
*/
|
||||
channel_id?: Snowflake;
|
||||
|
||||
@@ -284,7 +292,8 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyEnableEmoticons
|
||||
| APIAuditLogChangeKeyExpireBehavior
|
||||
| APIAuditLogChangeKeyExpireGracePeriod
|
||||
| APIAuditLogChangeKeyUserLimit;
|
||||
| APIAuditLogChangeKeyUserLimit
|
||||
| APIAuditLogChangeKeyPrivacyLevel;
|
||||
|
||||
/**
|
||||
* Returned when a guild's name is changed
|
||||
@@ -563,6 +572,11 @@ export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_g
|
||||
*/
|
||||
export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
|
||||
|
||||
/**
|
||||
* Returned when privacy level of a stage instance is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
|
||||
|
||||
interface AuditLogChangeData<K extends string, D extends unknown> {
|
||||
key: K;
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user