feat(APIGuildForumChannel): add default_forum_layout (#658)

* feat(APIGuildForumChannel): add `default_forum_layout`

* chore: use official names and text
This commit is contained in:
advaith
2022-12-15 07:19:15 +02:00
committed by GitHub
parent 2b75d13b39
commit 190242a59d
12 changed files with 128 additions and 8 deletions
+23 -1
View File
@@ -294,6 +294,24 @@ export enum SortOrderType {
CreationDate,
}
/**
* https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types
*/
export enum ForumLayoutType {
/**
* No default has been set for forum channel
*/
NotSet,
/**
* Display posts as a list
*/
ListView,
/**
* Display posts as a collection of tiles
*/
GalleryView,
}
export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
/**
* The set of tags that can be used in a forum channel
@@ -304,9 +322,13 @@ export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.Gu
*/
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
/**
* The default sort order type used to order posts in forum channels
* The default sort order type used to order posts in a forum channel
*/
default_sort_order: SortOrderType | null;
/**
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
*/
default_forum_layout: ForumLayoutType;
}
/**
+23 -1
View File
@@ -290,6 +290,24 @@ export enum SortOrderType {
CreationDate,
}
/**
* https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types
*/
export enum ForumLayoutType {
/**
* No default has been set for forum channel
*/
NotSet,
/**
* Display posts as a list
*/
ListView,
/**
* Display posts as a collection of tiles
*/
GalleryView,
}
export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
/**
* The set of tags that can be used in a forum channel
@@ -300,9 +318,13 @@ export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.Gu
*/
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
/**
* The default sort order type used to order posts in forum channels
* The default sort order type used to order posts in a forum channel
*/
default_sort_order: SortOrderType | null;
/**
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
*/
default_forum_layout: ForumLayoutType;
}
/**
+8 -1
View File
@@ -22,6 +22,7 @@ import type {
APIGuildForumTag,
APIGuildForumDefaultReactionEmoji,
SortOrderType,
ForumLayoutType,
} from '../../payloads/v10/mod.ts';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';
@@ -164,11 +165,17 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
*/
default_thread_rate_limit_per_user?: number | null;
/**
* The default sort order type used to order posts in forum channels
* The default sort order type used to order posts in a forum channel
*
* Channel types: forum
*/
default_sort_order?: SortOrderType | null;
/**
* The default layout type used to display posts in a forum channel
*
* Channel types: forum
*/
default_forum_layout?: ForumLayoutType;
}>;
/**
+1
View File
@@ -56,6 +56,7 @@ export type APIGuildCreatePartialChannel = StrictPartial<
| 'default_reaction_emoji'
| 'available_tags'
| 'default_sort_order'
| 'default_forum_layout'
>
> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{
+8 -1
View File
@@ -22,6 +22,7 @@ import type {
APIGuildForumTag,
APIGuildForumDefaultReactionEmoji,
SortOrderType,
ForumLayoutType,
} from '../../payloads/v9/mod.ts';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';
@@ -164,11 +165,17 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
*/
default_thread_rate_limit_per_user?: number | null;
/**
* The default sort order type used to order posts in forum channels
* The default sort order type used to order posts in a forum channel
*
* Channel types: forum
*/
default_sort_order?: SortOrderType | null;
/**
* The default layout type used to display posts in a forum channel
*
* Channel types: forum
*/
default_forum_layout?: ForumLayoutType;
}>;
/**
+1
View File
@@ -56,6 +56,7 @@ export type APIGuildCreatePartialChannel = StrictPartial<
| 'default_reaction_emoji'
| 'available_tags'
| 'default_sort_order'
| 'default_forum_layout'
>
> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{
+23 -1
View File
@@ -294,6 +294,24 @@ export enum SortOrderType {
CreationDate,
}
/**
* https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types
*/
export enum ForumLayoutType {
/**
* No default has been set for forum channel
*/
NotSet,
/**
* Display posts as a list
*/
ListView,
/**
* Display posts as a collection of tiles
*/
GalleryView,
}
export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
/**
* The set of tags that can be used in a forum channel
@@ -304,9 +322,13 @@ export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.Gu
*/
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
/**
* The default sort order type used to order posts in forum channels
* The default sort order type used to order posts in a forum channel
*/
default_sort_order: SortOrderType | null;
/**
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
*/
default_forum_layout: ForumLayoutType;
}
/**
+23 -1
View File
@@ -290,6 +290,24 @@ export enum SortOrderType {
CreationDate,
}
/**
* https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types
*/
export enum ForumLayoutType {
/**
* No default has been set for forum channel
*/
NotSet,
/**
* Display posts as a list
*/
ListView,
/**
* Display posts as a collection of tiles
*/
GalleryView,
}
export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
/**
* The set of tags that can be used in a forum channel
@@ -300,9 +318,13 @@ export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.Gu
*/
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
/**
* The default sort order type used to order posts in forum channels
* The default sort order type used to order posts in a forum channel
*/
default_sort_order: SortOrderType | null;
/**
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
*/
default_forum_layout: ForumLayoutType;
}
/**
+8 -1
View File
@@ -22,6 +22,7 @@ import type {
APIGuildForumTag,
APIGuildForumDefaultReactionEmoji,
SortOrderType,
ForumLayoutType,
} from '../../payloads/v10/index';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
@@ -164,11 +165,17 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
*/
default_thread_rate_limit_per_user?: number | null;
/**
* The default sort order type used to order posts in forum channels
* The default sort order type used to order posts in a forum channel
*
* Channel types: forum
*/
default_sort_order?: SortOrderType | null;
/**
* The default layout type used to display posts in a forum channel
*
* Channel types: forum
*/
default_forum_layout?: ForumLayoutType;
}>;
/**
+1
View File
@@ -56,6 +56,7 @@ export type APIGuildCreatePartialChannel = StrictPartial<
| 'default_reaction_emoji'
| 'available_tags'
| 'default_sort_order'
| 'default_forum_layout'
>
> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{
+8 -1
View File
@@ -22,6 +22,7 @@ import type {
APIGuildForumTag,
APIGuildForumDefaultReactionEmoji,
SortOrderType,
ForumLayoutType,
} from '../../payloads/v9/index';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
@@ -164,11 +165,17 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
*/
default_thread_rate_limit_per_user?: number | null;
/**
* The default sort order type used to order posts in forum channels
* The default sort order type used to order posts in a forum channel
*
* Channel types: forum
*/
default_sort_order?: SortOrderType | null;
/**
* The default layout type used to display posts in a forum channel
*
* Channel types: forum
*/
default_forum_layout?: ForumLayoutType;
}>;
/**
+1
View File
@@ -56,6 +56,7 @@ export type APIGuildCreatePartialChannel = StrictPartial<
| 'default_reaction_emoji'
| 'available_tags'
| 'default_sort_order'
| 'default_forum_layout'
>
> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<{