diff --git a/deno/payloads/v10/application.ts b/deno/payloads/v10/application.ts index 2ef940a8b..e90bb8a31 100644 --- a/deno/payloads/v10/application.ts +++ b/deno/payloads/v10/application.ts @@ -41,6 +41,10 @@ export interface APIApplication { * When `true` the app's bot will only join upon completion of the full oauth2 code grant flow */ bot_require_code_grant: boolean; + /** + * Partial user object for the bot user associated with the application + */ + bot?: APIUser; /** * The url of the application's terms of service */ @@ -60,7 +64,7 @@ export interface APIApplication { * * @deprecated This field will be removed in v11 */ - summary: string; + summary: ''; /** * The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function * @@ -77,6 +81,10 @@ export interface APIApplication { * If this application is a game sold on Discord, this field will be the guild to which it has been linked */ guild_id?: Snowflake; + /** + * A partial object of the associated guild + */ + guild?: APIPartialGuild; /** * If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists */ @@ -96,30 +104,34 @@ export interface APIApplication { */ flags: ApplicationFlags; /** - * Up to 5 tags describing the content and functionality of the application + * Approximate count of guilds the application has been added to */ - tags?: [string, string?, string?, string?, string?]; + approximate_guild_count?: number; /** - * Settings for the application's default in-app authorization link, if enabled + * Array of redirect URIs for the application */ - install_params?: APIApplicationInstallParams; + redirect_uris?: string[]; /** - * The application's default custom authorization link, if enabled + * The interactions endpoint URL for the application */ - custom_install_url?: string; + interactions_endpoint_url?: string; /** * The application's role connection verification entry point, * which when configured will render the app as a verification method in the guild role verification configuration */ role_connections_verification_url?: string; /** - * An approximate count of the app's guild membership + * Up to 5 tags of max 20 characters each describing the content and functionality of the application */ - approximate_guild_count?: number; + tags?: [string, string?, string?, string?, string?]; /** - * A partial object of the associated guild + * Settings for the application's default in-app authorization link, if enabled */ - guild?: APIPartialGuild; + install_params?: APIApplicationInstallParams; + /** + * The application's default custom authorization link, if enabled + */ + custom_install_url?: string; } export interface APIApplicationInstallParams { diff --git a/deno/payloads/v9/application.ts b/deno/payloads/v9/application.ts index 28dd55dc3..e90bb8a31 100644 --- a/deno/payloads/v9/application.ts +++ b/deno/payloads/v9/application.ts @@ -41,6 +41,10 @@ export interface APIApplication { * When `true` the app's bot will only join upon completion of the full oauth2 code grant flow */ bot_require_code_grant: boolean; + /** + * Partial user object for the bot user associated with the application + */ + bot?: APIUser; /** * The url of the application's terms of service */ @@ -60,7 +64,7 @@ export interface APIApplication { * * @deprecated This field will be removed in v11 */ - summary: string; + summary: ''; /** * The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function * @@ -77,6 +81,10 @@ export interface APIApplication { * If this application is a game sold on Discord, this field will be the guild to which it has been linked */ guild_id?: Snowflake; + /** + * A partial object of the associated guild + */ + guild?: APIPartialGuild; /** * If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists */ @@ -96,31 +104,34 @@ export interface APIApplication { */ flags: ApplicationFlags; /** - * Up to 5 tags describing the content and functionality of the application + * Approximate count of guilds the application has been added to */ - tags?: [string, string?, string?, string?, string?]; + approximate_guild_count?: number; /** - * Settings for the application's default in-app authorization link, if enabled + * Array of redirect URIs for the application */ - install_params?: APIApplicationInstallParams; + redirect_uris?: string[]; /** - * The application's default custom authorization link, if enabled + * The interactions endpoint URL for the application */ - custom_install_url?: string; + interactions_endpoint_url?: string; /** * The application's role connection verification entry point, * which when configured will render the app as a verification method in the guild role verification configuration */ role_connections_verification_url?: string; /** - * An approximate count of the app's guild membership - * s + * Up to 5 tags of max 20 characters each describing the content and functionality of the application */ - approximate_guild_count?: number; + tags?: [string, string?, string?, string?, string?]; /** - * A partial object of the associated guild + * Settings for the application's default in-app authorization link, if enabled */ - guild?: APIPartialGuild; + install_params?: APIApplicationInstallParams; + /** + * The application's default custom authorization link, if enabled + */ + custom_install_url?: string; } export interface APIApplicationInstallParams { diff --git a/deno/rest/v10/application.ts b/deno/rest/v10/application.ts index 5f4c05978..e20aecd11 100644 --- a/deno/rest/v10/application.ts +++ b/deno/rest/v10/application.ts @@ -1,4 +1,5 @@ import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v10/application.ts'; +import type { Nullable, StrictPartial } from '../../utils/internals.ts'; /** * https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records @@ -19,3 +20,25 @@ export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRo * https://discord.com/developers/docs/resources/application#get-current-application */ export type RESTGetCurrentApplicationResult = APIApplication; + +/** + * https://discord.com/developers/docs/resources/application#edit-current-application + */ +export type RESTPatchCurrentApplicationJSONBody = StrictPartial< + Pick< + APIApplication, + | 'custom_install_url' + | 'description' + | 'flags' + | 'role_connections_verification_url' + | 'install_params' + | 'interactions_endpoint_url' + | 'tags' + > & + Nullable> +>; + +/** + * https://discord.com/developers/docs/resources/application#edit-current-application + */ +export type RESTPatchCurrentApplicationResult = APIApplication; diff --git a/deno/rest/v10/mod.ts b/deno/rest/v10/mod.ts index 6c7bfe8d3..95f75faea 100644 --- a/deno/rest/v10/mod.ts +++ b/deno/rest/v10/mod.ts @@ -902,6 +902,7 @@ export const Routes = { /** * Route for: * - GET `/applications/@me` + * - PATCH `/applications/@me` */ currentApplication() { return '/applications/@me' as const; diff --git a/deno/rest/v9/application.ts b/deno/rest/v9/application.ts index 3e2d53fc9..cf29fd022 100644 --- a/deno/rest/v9/application.ts +++ b/deno/rest/v9/application.ts @@ -1,4 +1,5 @@ import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v9/application.ts'; +import type { StrictPartial, Nullable } from '../../utils/internals.ts'; /** * https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records @@ -19,3 +20,25 @@ export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRo * https://discord.com/developers/docs/resources/application#get-current-application */ export type RESTGetCurrentApplicationResult = APIApplication; + +/** + * https://discord.com/developers/docs/resources/application#edit-current-application + */ +export type RESTPatchCurrentApplicationJSONBody = StrictPartial< + Pick< + APIApplication, + | 'custom_install_url' + | 'description' + | 'flags' + | 'role_connections_verification_url' + | 'install_params' + | 'interactions_endpoint_url' + | 'tags' + > & + Nullable> +>; + +/** + * https://discord.com/developers/docs/resources/application#edit-current-application + */ +export type RESTPatchCurrentApplicationResult = APIApplication; diff --git a/deno/rest/v9/mod.ts b/deno/rest/v9/mod.ts index e4465fc5d..944cc456a 100644 --- a/deno/rest/v9/mod.ts +++ b/deno/rest/v9/mod.ts @@ -911,6 +911,7 @@ export const Routes = { /** * Route for: * - GET `/applications/@me` + * - PATCH `/applications/@me` */ currentApplication() { return '/applications/@me' as const; diff --git a/payloads/v10/application.ts b/payloads/v10/application.ts index 8467fe888..c5e510c9e 100644 --- a/payloads/v10/application.ts +++ b/payloads/v10/application.ts @@ -41,6 +41,10 @@ export interface APIApplication { * When `true` the app's bot will only join upon completion of the full oauth2 code grant flow */ bot_require_code_grant: boolean; + /** + * Partial user object for the bot user associated with the application + */ + bot?: APIUser; /** * The url of the application's terms of service */ @@ -60,7 +64,7 @@ export interface APIApplication { * * @deprecated This field will be removed in v11 */ - summary: string; + summary: ''; /** * The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function * @@ -77,6 +81,10 @@ export interface APIApplication { * If this application is a game sold on Discord, this field will be the guild to which it has been linked */ guild_id?: Snowflake; + /** + * A partial object of the associated guild + */ + guild?: APIPartialGuild; /** * If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists */ @@ -96,30 +104,34 @@ export interface APIApplication { */ flags: ApplicationFlags; /** - * Up to 5 tags describing the content and functionality of the application + * Approximate count of guilds the application has been added to */ - tags?: [string, string?, string?, string?, string?]; + approximate_guild_count?: number; /** - * Settings for the application's default in-app authorization link, if enabled + * Array of redirect URIs for the application */ - install_params?: APIApplicationInstallParams; + redirect_uris?: string[]; /** - * The application's default custom authorization link, if enabled + * The interactions endpoint URL for the application */ - custom_install_url?: string; + interactions_endpoint_url?: string; /** * The application's role connection verification entry point, * which when configured will render the app as a verification method in the guild role verification configuration */ role_connections_verification_url?: string; /** - * An approximate count of the app's guild membership + * Up to 5 tags of max 20 characters each describing the content and functionality of the application */ - approximate_guild_count?: number; + tags?: [string, string?, string?, string?, string?]; /** - * A partial object of the associated guild + * Settings for the application's default in-app authorization link, if enabled */ - guild?: APIPartialGuild; + install_params?: APIApplicationInstallParams; + /** + * The application's default custom authorization link, if enabled + */ + custom_install_url?: string; } export interface APIApplicationInstallParams { diff --git a/payloads/v9/application.ts b/payloads/v9/application.ts index c4fde92fe..c5e510c9e 100644 --- a/payloads/v9/application.ts +++ b/payloads/v9/application.ts @@ -41,6 +41,10 @@ export interface APIApplication { * When `true` the app's bot will only join upon completion of the full oauth2 code grant flow */ bot_require_code_grant: boolean; + /** + * Partial user object for the bot user associated with the application + */ + bot?: APIUser; /** * The url of the application's terms of service */ @@ -60,7 +64,7 @@ export interface APIApplication { * * @deprecated This field will be removed in v11 */ - summary: string; + summary: ''; /** * The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function * @@ -77,6 +81,10 @@ export interface APIApplication { * If this application is a game sold on Discord, this field will be the guild to which it has been linked */ guild_id?: Snowflake; + /** + * A partial object of the associated guild + */ + guild?: APIPartialGuild; /** * If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists */ @@ -96,31 +104,34 @@ export interface APIApplication { */ flags: ApplicationFlags; /** - * Up to 5 tags describing the content and functionality of the application + * Approximate count of guilds the application has been added to */ - tags?: [string, string?, string?, string?, string?]; + approximate_guild_count?: number; /** - * Settings for the application's default in-app authorization link, if enabled + * Array of redirect URIs for the application */ - install_params?: APIApplicationInstallParams; + redirect_uris?: string[]; /** - * The application's default custom authorization link, if enabled + * The interactions endpoint URL for the application */ - custom_install_url?: string; + interactions_endpoint_url?: string; /** * The application's role connection verification entry point, * which when configured will render the app as a verification method in the guild role verification configuration */ role_connections_verification_url?: string; /** - * An approximate count of the app's guild membership - * s + * Up to 5 tags of max 20 characters each describing the content and functionality of the application */ - approximate_guild_count?: number; + tags?: [string, string?, string?, string?, string?]; /** - * A partial object of the associated guild + * Settings for the application's default in-app authorization link, if enabled */ - guild?: APIPartialGuild; + install_params?: APIApplicationInstallParams; + /** + * The application's default custom authorization link, if enabled + */ + custom_install_url?: string; } export interface APIApplicationInstallParams { diff --git a/rest/v10/application.ts b/rest/v10/application.ts index 48078caa8..a4879fda2 100644 --- a/rest/v10/application.ts +++ b/rest/v10/application.ts @@ -1,4 +1,5 @@ import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v10/application'; +import type { Nullable, StrictPartial } from '../../utils/internals'; /** * https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records @@ -19,3 +20,25 @@ export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRo * https://discord.com/developers/docs/resources/application#get-current-application */ export type RESTGetCurrentApplicationResult = APIApplication; + +/** + * https://discord.com/developers/docs/resources/application#edit-current-application + */ +export type RESTPatchCurrentApplicationJSONBody = StrictPartial< + Pick< + APIApplication, + | 'custom_install_url' + | 'description' + | 'flags' + | 'role_connections_verification_url' + | 'install_params' + | 'interactions_endpoint_url' + | 'tags' + > & + Nullable> +>; + +/** + * https://discord.com/developers/docs/resources/application#edit-current-application + */ +export type RESTPatchCurrentApplicationResult = APIApplication; diff --git a/rest/v10/index.ts b/rest/v10/index.ts index 674fb3462..ea3b7dd2a 100644 --- a/rest/v10/index.ts +++ b/rest/v10/index.ts @@ -902,6 +902,7 @@ export const Routes = { /** * Route for: * - GET `/applications/@me` + * - PATCH `/applications/@me` */ currentApplication() { return '/applications/@me' as const; diff --git a/rest/v9/application.ts b/rest/v9/application.ts index 67b3f5398..6e50d0d3c 100644 --- a/rest/v9/application.ts +++ b/rest/v9/application.ts @@ -1,4 +1,5 @@ import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v9/application'; +import type { StrictPartial, Nullable } from '../../utils/internals'; /** * https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records @@ -19,3 +20,25 @@ export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRo * https://discord.com/developers/docs/resources/application#get-current-application */ export type RESTGetCurrentApplicationResult = APIApplication; + +/** + * https://discord.com/developers/docs/resources/application#edit-current-application + */ +export type RESTPatchCurrentApplicationJSONBody = StrictPartial< + Pick< + APIApplication, + | 'custom_install_url' + | 'description' + | 'flags' + | 'role_connections_verification_url' + | 'install_params' + | 'interactions_endpoint_url' + | 'tags' + > & + Nullable> +>; + +/** + * https://discord.com/developers/docs/resources/application#edit-current-application + */ +export type RESTPatchCurrentApplicationResult = APIApplication; diff --git a/rest/v9/index.ts b/rest/v9/index.ts index bd663d5f3..b31ed87eb 100644 --- a/rest/v9/index.ts +++ b/rest/v9/index.ts @@ -911,6 +911,7 @@ export const Routes = { /** * Route for: * - GET `/applications/@me` + * - PATCH `/applications/@me` */ currentApplication() { return '/applications/@me' as const;