From 6ead98b78218830fee308a0425d9078957a662b2 Mon Sep 17 00:00:00 2001 From: Lars_und_so <46791248+Larsundso@users.noreply.github.com> Date: Wed, 14 Aug 2024 22:45:29 +0200 Subject: [PATCH] feat(RESTOAuth2): add RESTPostOAuth2TokenRevocationQuery (#1050) --- deno/rest/v10/oauth2.ts | 8 ++++++++ deno/rest/v9/oauth2.ts | 8 ++++++++ rest/v10/oauth2.ts | 8 ++++++++ rest/v9/oauth2.ts | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/deno/rest/v10/oauth2.ts b/deno/rest/v10/oauth2.ts index 323ae3127..d42021acd 100644 --- a/deno/rest/v10/oauth2.ts +++ b/deno/rest/v10/oauth2.ts @@ -40,6 +40,14 @@ export interface RESTOAuth2AuthorizationQuery { prompt?: 'consent' | 'none'; } +/** + * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example + */ +export interface RESTPostOAuth2TokenRevocationQuery { + token: string; + token_type_hint?: 'access_token' | 'refresh_token'; +} + /** * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example */ diff --git a/deno/rest/v9/oauth2.ts b/deno/rest/v9/oauth2.ts index 22a7c0637..38bf227d5 100644 --- a/deno/rest/v9/oauth2.ts +++ b/deno/rest/v9/oauth2.ts @@ -40,6 +40,14 @@ export interface RESTOAuth2AuthorizationQuery { prompt?: 'consent' | 'none'; } +/** + * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example + */ +export interface RESTPostOAuth2TokenRevocationQuery { + token: string; + token_type_hint?: 'access_token' | 'refresh_token'; +} + /** * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example */ diff --git a/rest/v10/oauth2.ts b/rest/v10/oauth2.ts index e84c059a1..17da5ecde 100644 --- a/rest/v10/oauth2.ts +++ b/rest/v10/oauth2.ts @@ -40,6 +40,14 @@ export interface RESTOAuth2AuthorizationQuery { prompt?: 'consent' | 'none'; } +/** + * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example + */ +export interface RESTPostOAuth2TokenRevocationQuery { + token: string; + token_type_hint?: 'access_token' | 'refresh_token'; +} + /** * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example */ diff --git a/rest/v9/oauth2.ts b/rest/v9/oauth2.ts index 97fd983b6..4c00e0856 100644 --- a/rest/v9/oauth2.ts +++ b/rest/v9/oauth2.ts @@ -40,6 +40,14 @@ export interface RESTOAuth2AuthorizationQuery { prompt?: 'consent' | 'none'; } +/** + * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example + */ +export interface RESTPostOAuth2TokenRevocationQuery { + token: string; + token_type_hint?: 'access_token' | 'refresh_token'; +} + /** * https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example */