mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-30 23:40:09 +00:00
feat(OAuth2): add /oauth2/@me route (#73)
This commit is contained in:
@@ -564,6 +564,14 @@ export const Routes = {
|
||||
return `/oauth2/applications/@me`;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/oauth2/@me`
|
||||
*/
|
||||
oauth2CurrentAuthorization() {
|
||||
return `/oauth2/@me`;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/commands`
|
||||
|
||||
@@ -1,11 +1,33 @@
|
||||
import type { Permissions, Snowflake } from '../../common/index';
|
||||
import type { APIApplication, APIGuild, APIWebhook, OAuth2Scopes } from '../payloads/index';
|
||||
import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from '../payloads/index';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#get-current-application-information
|
||||
*/
|
||||
export type RESTGetAPIOauth2CurrentApplicationResult = Omit<APIApplication, 'flags'>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information
|
||||
*/
|
||||
export interface RESTGetAPIOauth2CurrentAuthorizationResult {
|
||||
/**
|
||||
* the current application
|
||||
*/
|
||||
application: Partial<APIApplication>;
|
||||
/**
|
||||
* the scopes the user has authorized the application for
|
||||
*/
|
||||
scopes: OAuth2Scopes[];
|
||||
/**
|
||||
* when the access token expires
|
||||
*/
|
||||
expires: string;
|
||||
/**
|
||||
* the user who has authorized, if the user has authorized with the `identify` scope
|
||||
*/
|
||||
user?: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user