From 93eab113cdcfd3bdd868f1d86bb4bc2a5247d844 Mon Sep 17 00:00:00 2001 From: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com> Date: Tue, 29 Mar 2022 14:27:55 -0400 Subject: [PATCH] feat(APIApplication): app authorization links and tags (#239) Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com> --- deno/payloads/v10/application.ts | 20 +++++++++++++++++++- deno/payloads/v8/application.ts | 20 +++++++++++++++++++- deno/payloads/v9/application.ts | 20 +++++++++++++++++++- payloads/v10/application.ts | 20 +++++++++++++++++++- payloads/v8/application.ts | 20 +++++++++++++++++++- payloads/v9/application.ts | 20 +++++++++++++++++++- 6 files changed, 114 insertions(+), 6 deletions(-) diff --git a/deno/payloads/v10/application.ts b/deno/payloads/v10/application.ts index 306c919c3..8f1ecb0a2 100644 --- a/deno/payloads/v10/application.ts +++ b/deno/payloads/v10/application.ts @@ -2,7 +2,8 @@ * Types extracted from https://discord.com/developers/docs/resources/application */ -import type { Snowflake } from '../../globals.ts'; +import type { Permissions, Snowflake } from '../../globals.ts'; +import type { OAuth2Scopes } from './oauth2.ts'; import type { APITeam } from './teams.ts'; import type { APIUser } from './user.ts'; @@ -93,6 +94,23 @@ export interface APIApplication { * See https://discord.com/developers/docs/resources/application#application-object-application-flags */ flags: ApplicationFlags; + /** + * Up to 5 tags describing the content and functionality of the application + */ + tags?: [string, string?, string?, string?, string?]; + /** + * Settings for the application's default in-app authorization link, if enabled + */ + install_params?: APIApplicationInstallParams; + /** + * The application's default custom authorization link, if enabled + */ + custom_install_url?: string; +} + +export interface APIApplicationInstallParams { + scopes: OAuth2Scopes[]; + permissions: Permissions; } /** diff --git a/deno/payloads/v8/application.ts b/deno/payloads/v8/application.ts index 5a22d7d47..4ba45127e 100644 --- a/deno/payloads/v8/application.ts +++ b/deno/payloads/v8/application.ts @@ -2,7 +2,8 @@ * Types extracted from https://discord.com/developers/docs/resources/application */ -import type { Snowflake } from '../../globals.ts'; +import type { Permissions, Snowflake } from '../../globals.ts'; +import type { OAuth2Scopes } from './oauth2.ts'; import type { APITeam } from './teams.ts'; import type { APIUser } from './user.ts'; @@ -94,6 +95,23 @@ export interface APIApplication { * See https://discord.com/developers/docs/resources/application#application-object-application-flags */ flags: ApplicationFlags; + /** + * Up to 5 tags describing the content and functionality of the application + */ + tags?: [string, string?, string?, string?, string?]; + /** + * Settings for the application's default in-app authorization link, if enabled + */ + install_params?: APIApplicationInstallParams; + /** + * The application's default custom authorization link, if enabled + */ + custom_install_url?: string; +} + +export interface APIApplicationInstallParams { + scopes: OAuth2Scopes[]; + permissions: Permissions; } /** diff --git a/deno/payloads/v9/application.ts b/deno/payloads/v9/application.ts index 306c919c3..8f1ecb0a2 100644 --- a/deno/payloads/v9/application.ts +++ b/deno/payloads/v9/application.ts @@ -2,7 +2,8 @@ * Types extracted from https://discord.com/developers/docs/resources/application */ -import type { Snowflake } from '../../globals.ts'; +import type { Permissions, Snowflake } from '../../globals.ts'; +import type { OAuth2Scopes } from './oauth2.ts'; import type { APITeam } from './teams.ts'; import type { APIUser } from './user.ts'; @@ -93,6 +94,23 @@ export interface APIApplication { * See https://discord.com/developers/docs/resources/application#application-object-application-flags */ flags: ApplicationFlags; + /** + * Up to 5 tags describing the content and functionality of the application + */ + tags?: [string, string?, string?, string?, string?]; + /** + * Settings for the application's default in-app authorization link, if enabled + */ + install_params?: APIApplicationInstallParams; + /** + * The application's default custom authorization link, if enabled + */ + custom_install_url?: string; +} + +export interface APIApplicationInstallParams { + scopes: OAuth2Scopes[]; + permissions: Permissions; } /** diff --git a/payloads/v10/application.ts b/payloads/v10/application.ts index 97780f503..14481fe7b 100644 --- a/payloads/v10/application.ts +++ b/payloads/v10/application.ts @@ -2,7 +2,8 @@ * Types extracted from https://discord.com/developers/docs/resources/application */ -import type { Snowflake } from '../../globals'; +import type { Permissions, Snowflake } from '../../globals'; +import type { OAuth2Scopes } from './oauth2'; import type { APITeam } from './teams'; import type { APIUser } from './user'; @@ -93,6 +94,23 @@ export interface APIApplication { * See https://discord.com/developers/docs/resources/application#application-object-application-flags */ flags: ApplicationFlags; + /** + * Up to 5 tags describing the content and functionality of the application + */ + tags?: [string, string?, string?, string?, string?]; + /** + * Settings for the application's default in-app authorization link, if enabled + */ + install_params?: APIApplicationInstallParams; + /** + * The application's default custom authorization link, if enabled + */ + custom_install_url?: string; +} + +export interface APIApplicationInstallParams { + scopes: OAuth2Scopes[]; + permissions: Permissions; } /** diff --git a/payloads/v8/application.ts b/payloads/v8/application.ts index 39052a460..6a36d03e1 100644 --- a/payloads/v8/application.ts +++ b/payloads/v8/application.ts @@ -2,7 +2,8 @@ * Types extracted from https://discord.com/developers/docs/resources/application */ -import type { Snowflake } from '../../globals'; +import type { Permissions, Snowflake } from '../../globals'; +import type { OAuth2Scopes } from './oauth2'; import type { APITeam } from './teams'; import type { APIUser } from './user'; @@ -94,6 +95,23 @@ export interface APIApplication { * See https://discord.com/developers/docs/resources/application#application-object-application-flags */ flags: ApplicationFlags; + /** + * Up to 5 tags describing the content and functionality of the application + */ + tags?: [string, string?, string?, string?, string?]; + /** + * Settings for the application's default in-app authorization link, if enabled + */ + install_params?: APIApplicationInstallParams; + /** + * The application's default custom authorization link, if enabled + */ + custom_install_url?: string; +} + +export interface APIApplicationInstallParams { + scopes: OAuth2Scopes[]; + permissions: Permissions; } /** diff --git a/payloads/v9/application.ts b/payloads/v9/application.ts index 97780f503..14481fe7b 100644 --- a/payloads/v9/application.ts +++ b/payloads/v9/application.ts @@ -2,7 +2,8 @@ * Types extracted from https://discord.com/developers/docs/resources/application */ -import type { Snowflake } from '../../globals'; +import type { Permissions, Snowflake } from '../../globals'; +import type { OAuth2Scopes } from './oauth2'; import type { APITeam } from './teams'; import type { APIUser } from './user'; @@ -93,6 +94,23 @@ export interface APIApplication { * See https://discord.com/developers/docs/resources/application#application-object-application-flags */ flags: ApplicationFlags; + /** + * Up to 5 tags describing the content and functionality of the application + */ + tags?: [string, string?, string?, string?, string?]; + /** + * Settings for the application's default in-app authorization link, if enabled + */ + install_params?: APIApplicationInstallParams; + /** + * The application's default custom authorization link, if enabled + */ + custom_install_url?: string; +} + +export interface APIApplicationInstallParams { + scopes: OAuth2Scopes[]; + permissions: Permissions; } /**