Skip to content

Commit

Permalink
feat: add some missing REST types (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Oct 20, 2022
1 parent df1452d commit 8d25f23
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deno/rest/v10/guild.ts
Expand Up @@ -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
*/
Expand Down
18 changes: 18 additions & 0 deletions deno/rest/v10/interactions.ts
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand Down
5 changes: 5 additions & 0 deletions deno/rest/v9/guild.ts
Expand Up @@ -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
*/
Expand Down
18 changes: 18 additions & 0 deletions deno/rest/v9/interactions.ts
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand Down
5 changes: 5 additions & 0 deletions rest/v10/guild.ts
Expand Up @@ -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
*/
Expand Down
18 changes: 18 additions & 0 deletions rest/v10/interactions.ts
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand Down
5 changes: 5 additions & 0 deletions rest/v9/guild.ts
Expand Up @@ -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
*/
Expand Down
18 changes: 18 additions & 0 deletions rest/v9/interactions.ts
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand Down

1 comment on commit 8d25f23

@vercel
Copy link

@vercel vercel bot commented on 8d25f23 Oct 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.