mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-06-03 01:10:09 +00:00
refactor: allow omitting allow and deny in permission_overwrites (#310)
This commit is contained in:
@@ -9,7 +9,6 @@ import type {
|
||||
APIFollowedChannel,
|
||||
APIMessage,
|
||||
APIMessageReference,
|
||||
APIOverwrite,
|
||||
APIUser,
|
||||
ChannelType,
|
||||
InviteTargetType,
|
||||
@@ -19,6 +18,10 @@ import type {
|
||||
} from '../../payloads/v8/mod.ts';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';
|
||||
|
||||
export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#get-channel
|
||||
*/
|
||||
@@ -85,7 +88,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
|
||||
*
|
||||
* Channel types: all
|
||||
*/
|
||||
permission_overwrites?: APIOverwrite[] | null;
|
||||
permission_overwrites?: APIChannelPatchOverwrite[] | null;
|
||||
/**
|
||||
* ID of the new parent category for a channel
|
||||
*
|
||||
@@ -392,14 +395,18 @@ export interface RESTPutAPIChannelPermissionJSONBody {
|
||||
* The bitwise value of all allowed permissions
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*
|
||||
* @default "0"
|
||||
*/
|
||||
allow: Permissions;
|
||||
allow?: Permissions | null;
|
||||
/**
|
||||
* The bitwise value of all disallowed permissions
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*
|
||||
* @default "0"
|
||||
*/
|
||||
deny: Permissions;
|
||||
deny?: Permissions | null;
|
||||
/**
|
||||
* `0` for a role or `1` for a member
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,6 @@ import type {
|
||||
APIFollowedChannel,
|
||||
APIMessage,
|
||||
APIMessageReference,
|
||||
APIOverwrite,
|
||||
APIThreadList,
|
||||
APIThreadMember,
|
||||
APIUser,
|
||||
@@ -22,6 +21,10 @@ import type {
|
||||
} from '../../payloads/v9/mod.ts';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';
|
||||
|
||||
export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#get-channel
|
||||
*/
|
||||
@@ -88,7 +91,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
|
||||
*
|
||||
* Channel types: all excluding newsThread, publicThread, privateThread
|
||||
*/
|
||||
permission_overwrites?: APIOverwrite[] | null;
|
||||
permission_overwrites?: APIChannelPatchOverwrite[] | null;
|
||||
/**
|
||||
* ID of the new parent category for a channel
|
||||
*
|
||||
@@ -425,14 +428,18 @@ export interface RESTPutAPIChannelPermissionJSONBody {
|
||||
* The bitwise value of all allowed permissions
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*
|
||||
* @default "0"
|
||||
*/
|
||||
allow: Permissions;
|
||||
allow?: Permissions | null;
|
||||
/**
|
||||
* The bitwise value of all disallowed permissions
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*
|
||||
* @default "0"
|
||||
*/
|
||||
deny: Permissions;
|
||||
deny?: Permissions | null;
|
||||
/**
|
||||
* `0` for a role or `1` for a member
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,6 @@ import type {
|
||||
APIFollowedChannel,
|
||||
APIMessage,
|
||||
APIMessageReference,
|
||||
APIOverwrite,
|
||||
APIUser,
|
||||
ChannelType,
|
||||
InviteTargetType,
|
||||
@@ -19,6 +18,10 @@ import type {
|
||||
} from '../../payloads/v8/index';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
|
||||
|
||||
export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#get-channel
|
||||
*/
|
||||
@@ -85,7 +88,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
|
||||
*
|
||||
* Channel types: all
|
||||
*/
|
||||
permission_overwrites?: APIOverwrite[] | null;
|
||||
permission_overwrites?: APIChannelPatchOverwrite[] | null;
|
||||
/**
|
||||
* ID of the new parent category for a channel
|
||||
*
|
||||
@@ -392,14 +395,18 @@ export interface RESTPutAPIChannelPermissionJSONBody {
|
||||
* The bitwise value of all allowed permissions
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*
|
||||
* @default "0"
|
||||
*/
|
||||
allow: Permissions;
|
||||
allow?: Permissions | null;
|
||||
/**
|
||||
* The bitwise value of all disallowed permissions
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*
|
||||
* @default "0"
|
||||
*/
|
||||
deny: Permissions;
|
||||
deny?: Permissions | null;
|
||||
/**
|
||||
* `0` for a role or `1` for a member
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,6 @@ import type {
|
||||
APIFollowedChannel,
|
||||
APIMessage,
|
||||
APIMessageReference,
|
||||
APIOverwrite,
|
||||
APIThreadList,
|
||||
APIThreadMember,
|
||||
APIUser,
|
||||
@@ -22,6 +21,10 @@ import type {
|
||||
} from '../../payloads/v9/index';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
|
||||
|
||||
export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
||||
id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#get-channel
|
||||
*/
|
||||
@@ -88,7 +91,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
|
||||
*
|
||||
* Channel types: all excluding newsThread, publicThread, privateThread
|
||||
*/
|
||||
permission_overwrites?: APIOverwrite[] | null;
|
||||
permission_overwrites?: APIChannelPatchOverwrite[] | null;
|
||||
/**
|
||||
* ID of the new parent category for a channel
|
||||
*
|
||||
@@ -425,14 +428,18 @@ export interface RESTPutAPIChannelPermissionJSONBody {
|
||||
* The bitwise value of all allowed permissions
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*
|
||||
* @default "0"
|
||||
*/
|
||||
allow: Permissions;
|
||||
allow?: Permissions | null;
|
||||
/**
|
||||
* The bitwise value of all disallowed permissions
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*
|
||||
* @default "0"
|
||||
*/
|
||||
deny: Permissions;
|
||||
deny?: Permissions | null;
|
||||
/**
|
||||
* `0` for a role or `1` for a member
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user