From 8d25f233a5366f1d43de942f465e696c73f26c86 Mon Sep 17 00:00:00 2001 From: Almeida Date: Thu, 20 Oct 2022 22:54:10 +0100 Subject: [PATCH] feat: add some missing REST types (#612) --- deno/rest/v10/guild.ts | 5 +++++ deno/rest/v10/interactions.ts | 18 ++++++++++++++++++ deno/rest/v9/guild.ts | 5 +++++ deno/rest/v9/interactions.ts | 18 ++++++++++++++++++ rest/v10/guild.ts | 5 +++++ rest/v10/interactions.ts | 18 ++++++++++++++++++ rest/v9/guild.ts | 5 +++++ rest/v9/interactions.ts | 18 ++++++++++++++++++ 8 files changed, 92 insertions(+) diff --git a/deno/rest/v10/guild.ts b/deno/rest/v10/guild.ts index eee777ae1..b3bf8b80f 100644 --- a/deno/rest/v10/guild.ts +++ b/deno/rest/v10/guild.ts @@ -894,6 +894,11 @@ export type RESTPatchAPIGuildVoiceStateUserJSONBody = AddUndefinedToPossiblyUnde suppress?: boolean; }>; +/** + * https://discord.com/developers/docs/resources/guild#modify-user-voice-state + */ +export type RESTPatchAPIGuildVoiceStateUserResult = never; + /** * https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen */ diff --git a/deno/rest/v10/interactions.ts b/deno/rest/v10/interactions.ts index e927950cf..1191adbbf 100644 --- a/deno/rest/v10/interactions.ts +++ b/deno/rest/v10/interactions.ts @@ -16,6 +16,19 @@ import type { } from '../../payloads/v10/mod.ts'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts'; +/** + * https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands + */ +export interface RESTGetAPIApplicationCommandsQuery { + /** + * Whether to include full localization dictionaries (name_localizations and description_localizations) + * in the returned objects, instead of the name_localized and description_localized fields. + * + * @default false + */ + with_localizations?: boolean; +} + /** * https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */ @@ -90,6 +103,11 @@ export type RESTPutAPIApplicationCommandsJSONBody = RESTPostAPIApplicationComman */ export type RESTPutAPIApplicationCommandsResult = APIApplicationCommand[]; +/** + * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands + */ +export type RESTGetAPIApplicationGuildCommandsQuery = RESTGetAPIApplicationCommandsQuery; + /** * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */ diff --git a/deno/rest/v9/guild.ts b/deno/rest/v9/guild.ts index 40a9dc318..72b4bd331 100644 --- a/deno/rest/v9/guild.ts +++ b/deno/rest/v9/guild.ts @@ -900,6 +900,11 @@ export type RESTPatchAPIGuildVoiceStateUserJSONBody = AddUndefinedToPossiblyUnde suppress?: boolean; }>; +/** + * https://discord.com/developers/docs/resources/guild#modify-user-voice-state + */ +export type RESTPatchAPIGuildVoiceStateUserResult = never; + /** * https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen */ diff --git a/deno/rest/v9/interactions.ts b/deno/rest/v9/interactions.ts index 72d1cdcb5..2dda23400 100644 --- a/deno/rest/v9/interactions.ts +++ b/deno/rest/v9/interactions.ts @@ -16,6 +16,19 @@ import type { } from '../../payloads/v9/mod.ts'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts'; +/** + * https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands + */ +export interface RESTGetAPIApplicationCommandsQuery { + /** + * Whether to include full localization dictionaries (name_localizations and description_localizations) + * in the returned objects, instead of the name_localized and description_localized fields. + * + * @default false + */ + with_localizations?: boolean; +} + /** * https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */ @@ -90,6 +103,11 @@ export type RESTPutAPIApplicationCommandsJSONBody = RESTPostAPIApplicationComman */ export type RESTPutAPIApplicationCommandsResult = APIApplicationCommand[]; +/** + * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands + */ +export type RESTGetAPIApplicationGuildCommandsQuery = RESTGetAPIApplicationCommandsQuery; + /** * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */ diff --git a/rest/v10/guild.ts b/rest/v10/guild.ts index 415d3a8f8..cf38e9be3 100644 --- a/rest/v10/guild.ts +++ b/rest/v10/guild.ts @@ -894,6 +894,11 @@ export type RESTPatchAPIGuildVoiceStateUserJSONBody = AddUndefinedToPossiblyUnde suppress?: boolean; }>; +/** + * https://discord.com/developers/docs/resources/guild#modify-user-voice-state + */ +export type RESTPatchAPIGuildVoiceStateUserResult = never; + /** * https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen */ diff --git a/rest/v10/interactions.ts b/rest/v10/interactions.ts index 15fceec86..e40ffc75b 100644 --- a/rest/v10/interactions.ts +++ b/rest/v10/interactions.ts @@ -16,6 +16,19 @@ import type { } from '../../payloads/v10/index'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals'; +/** + * https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands + */ +export interface RESTGetAPIApplicationCommandsQuery { + /** + * Whether to include full localization dictionaries (name_localizations and description_localizations) + * in the returned objects, instead of the name_localized and description_localized fields. + * + * @default false + */ + with_localizations?: boolean; +} + /** * https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */ @@ -90,6 +103,11 @@ export type RESTPutAPIApplicationCommandsJSONBody = RESTPostAPIApplicationComman */ export type RESTPutAPIApplicationCommandsResult = APIApplicationCommand[]; +/** + * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands + */ +export type RESTGetAPIApplicationGuildCommandsQuery = RESTGetAPIApplicationCommandsQuery; + /** * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */ diff --git a/rest/v9/guild.ts b/rest/v9/guild.ts index 70d6f0993..9ebb69edf 100644 --- a/rest/v9/guild.ts +++ b/rest/v9/guild.ts @@ -900,6 +900,11 @@ export type RESTPatchAPIGuildVoiceStateUserJSONBody = AddUndefinedToPossiblyUnde suppress?: boolean; }>; +/** + * https://discord.com/developers/docs/resources/guild#modify-user-voice-state + */ +export type RESTPatchAPIGuildVoiceStateUserResult = never; + /** * https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen */ diff --git a/rest/v9/interactions.ts b/rest/v9/interactions.ts index d4dee8c5e..2fbafbbcc 100644 --- a/rest/v9/interactions.ts +++ b/rest/v9/interactions.ts @@ -16,6 +16,19 @@ import type { } from '../../payloads/v9/index'; import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals'; +/** + * https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands + */ +export interface RESTGetAPIApplicationCommandsQuery { + /** + * Whether to include full localization dictionaries (name_localizations and description_localizations) + * in the returned objects, instead of the name_localized and description_localized fields. + * + * @default false + */ + with_localizations?: boolean; +} + /** * https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */ @@ -90,6 +103,11 @@ export type RESTPutAPIApplicationCommandsJSONBody = RESTPostAPIApplicationComman */ export type RESTPutAPIApplicationCommandsResult = APIApplicationCommand[]; +/** + * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands + */ +export type RESTGetAPIApplicationGuildCommandsQuery = RESTGetAPIApplicationCommandsQuery; + /** * https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */