From e6e07a721031ea9ea61a71568dec900f25193012 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Thu, 27 Aug 2026 20:09:22 +0100 Subject: [PATCH] fix(interactions): omit respective properties (#1777) --- deno/rest/v10/interactions.ts | 47 +++++++++++++++++++++++------------ deno/rest/v9/interactions.ts | 47 +++++++++++++++++++++++------------ rest/v10/interactions.ts | 47 +++++++++++++++++++++++------------ rest/v9/interactions.ts | 47 +++++++++++++++++++++++------------ 4 files changed, 124 insertions(+), 64 deletions(-) diff --git a/deno/rest/v10/interactions.ts b/deno/rest/v10/interactions.ts index fd7478bf..91d8319b 100644 --- a/deno/rest/v10/interactions.ts +++ b/deno/rest/v10/interactions.ts @@ -135,52 +135,67 @@ export type RESTGetAPIApplicationGuildCommandsQuery = RESTGetAPIApplicationComma /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} */ -export type RESTGetAPIApplicationGuildCommandsResult = Omit[]; +export type RESTGetAPIApplicationGuildCommandsResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} */ -export type RESTGetAPIApplicationGuildCommandResult = Omit; +export type RESTGetAPIApplicationGuildCommandResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command} */ export type RESTPostAPIApplicationGuildCommandsJSONBody = - | Omit - | Omit; + | Omit + | Omit; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command} */ -export type RESTPostAPIApplicationGuildCommandsResult = Omit; - -/** - * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} - */ -export type RESTPatchAPIApplicationGuildCommandJSONBody = _StrictPartial< - | Omit - | Omit +export type RESTPostAPIApplicationGuildCommandsResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' >; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} */ -export type RESTPatchAPIApplicationGuildCommandResult = Omit; +export type RESTPatchAPIApplicationGuildCommandJSONBody = _StrictPartial< + | Omit + | Omit +>; + +/** + * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} + */ +export type RESTPatchAPIApplicationGuildCommandResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands} */ export type RESTPutAPIApplicationGuildCommandsJSONBody = ( - | (Omit & + | (Omit & Pick, 'id'>) - | (Omit & + | (Omit & Pick, 'id'>) )[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands} */ -export type RESTPutAPIApplicationGuildCommandsResult = Omit[]; +export type RESTPutAPIApplicationGuildCommandsResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>[]; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} diff --git a/deno/rest/v9/interactions.ts b/deno/rest/v9/interactions.ts index be1efa5d..1c93189f 100644 --- a/deno/rest/v9/interactions.ts +++ b/deno/rest/v9/interactions.ts @@ -135,52 +135,67 @@ export type RESTGetAPIApplicationGuildCommandsQuery = RESTGetAPIApplicationComma /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} */ -export type RESTGetAPIApplicationGuildCommandsResult = Omit[]; +export type RESTGetAPIApplicationGuildCommandsResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} */ -export type RESTGetAPIApplicationGuildCommandResult = Omit; +export type RESTGetAPIApplicationGuildCommandResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command} */ export type RESTPostAPIApplicationGuildCommandsJSONBody = - | Omit - | Omit; + | Omit + | Omit; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command} */ -export type RESTPostAPIApplicationGuildCommandsResult = Omit; - -/** - * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} - */ -export type RESTPatchAPIApplicationGuildCommandJSONBody = _StrictPartial< - | Omit - | Omit +export type RESTPostAPIApplicationGuildCommandsResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' >; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} */ -export type RESTPatchAPIApplicationGuildCommandResult = Omit; +export type RESTPatchAPIApplicationGuildCommandJSONBody = _StrictPartial< + | Omit + | Omit +>; + +/** + * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} + */ +export type RESTPatchAPIApplicationGuildCommandResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands} */ export type RESTPutAPIApplicationGuildCommandsJSONBody = ( - | (Omit & + | (Omit & Pick, 'id'>) - | (Omit & + | (Omit & Pick, 'id'>) )[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands} */ -export type RESTPutAPIApplicationGuildCommandsResult = Omit[]; +export type RESTPutAPIApplicationGuildCommandsResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>[]; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} diff --git a/rest/v10/interactions.ts b/rest/v10/interactions.ts index 1016379e..8e54b329 100644 --- a/rest/v10/interactions.ts +++ b/rest/v10/interactions.ts @@ -135,52 +135,67 @@ export type RESTGetAPIApplicationGuildCommandsQuery = RESTGetAPIApplicationComma /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} */ -export type RESTGetAPIApplicationGuildCommandsResult = Omit[]; +export type RESTGetAPIApplicationGuildCommandsResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} */ -export type RESTGetAPIApplicationGuildCommandResult = Omit; +export type RESTGetAPIApplicationGuildCommandResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command} */ export type RESTPostAPIApplicationGuildCommandsJSONBody = - | Omit - | Omit; + | Omit + | Omit; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command} */ -export type RESTPostAPIApplicationGuildCommandsResult = Omit; - -/** - * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} - */ -export type RESTPatchAPIApplicationGuildCommandJSONBody = _StrictPartial< - | Omit - | Omit +export type RESTPostAPIApplicationGuildCommandsResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' >; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} */ -export type RESTPatchAPIApplicationGuildCommandResult = Omit; +export type RESTPatchAPIApplicationGuildCommandJSONBody = _StrictPartial< + | Omit + | Omit +>; + +/** + * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} + */ +export type RESTPatchAPIApplicationGuildCommandResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands} */ export type RESTPutAPIApplicationGuildCommandsJSONBody = ( - | (Omit & + | (Omit & Pick, 'id'>) - | (Omit & + | (Omit & Pick, 'id'>) )[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands} */ -export type RESTPutAPIApplicationGuildCommandsResult = Omit[]; +export type RESTPutAPIApplicationGuildCommandsResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>[]; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} diff --git a/rest/v9/interactions.ts b/rest/v9/interactions.ts index afcb88e2..d6b27892 100644 --- a/rest/v9/interactions.ts +++ b/rest/v9/interactions.ts @@ -135,52 +135,67 @@ export type RESTGetAPIApplicationGuildCommandsQuery = RESTGetAPIApplicationComma /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} */ -export type RESTGetAPIApplicationGuildCommandsResult = Omit[]; +export type RESTGetAPIApplicationGuildCommandsResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} */ -export type RESTGetAPIApplicationGuildCommandResult = Omit; +export type RESTGetAPIApplicationGuildCommandResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command} */ export type RESTPostAPIApplicationGuildCommandsJSONBody = - | Omit - | Omit; + | Omit + | Omit; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command} */ -export type RESTPostAPIApplicationGuildCommandsResult = Omit; - -/** - * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} - */ -export type RESTPatchAPIApplicationGuildCommandJSONBody = _StrictPartial< - | Omit - | Omit +export type RESTPostAPIApplicationGuildCommandsResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' >; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} */ -export type RESTPatchAPIApplicationGuildCommandResult = Omit; +export type RESTPatchAPIApplicationGuildCommandJSONBody = _StrictPartial< + | Omit + | Omit +>; + +/** + * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} + */ +export type RESTPatchAPIApplicationGuildCommandResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands} */ export type RESTPutAPIApplicationGuildCommandsJSONBody = ( - | (Omit & + | (Omit & Pick, 'id'>) - | (Omit & + | (Omit & Pick, 'id'>) )[]; /** * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands} */ -export type RESTPutAPIApplicationGuildCommandsResult = Omit[]; +export type RESTPutAPIApplicationGuildCommandsResult = Omit< + APIApplicationCommand, + 'contexts' | 'dm_permission' | 'integration_types' +>[]; /** * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}