import type { Permissions, Snowflake } from '../../globals.ts';import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from '../../payloads/v9/mod.ts';
export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>;
export interface RESTGetAPIOAuth2CurrentAuthorizationResult { application: Partial<APIApplication>; scopes: OAuth2Scopes[]; expires: string; user?: APIUser;}
export interface RESTOAuth2AuthorizationQuery { response_type: 'code'; client_id: Snowflake; scope: string; redirect_uri?: string; state?: string; prompt?: 'consent' | 'none';}
export interface RESTOAuth2AuthorizationQueryResult { code: string; state?: string;}
export interface RESTPostOAuth2AccessTokenURLEncodedData { client_id: Snowflake; client_secret: string; grant_type: 'authorization_code'; code: string; redirect_uri?: string;}
export interface RESTPostOAuth2AccessTokenResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string;}
export interface RESTPostOAuth2RefreshTokenURLEncodedData { client_id: Snowflake; client_secret: string; grant_type: 'refresh_token'; refresh_token: string;}
export type RESTPostOAuth2RefreshTokenResult = RESTPostOAuth2AccessTokenResult;
export interface RESTOAuth2ImplicitAuthorizationQuery { response_type: 'token'; client_id: Snowflake; scope: string; redirect_uri?: string; state?: string; prompt?: 'consent' | 'none';}
export type RESTOAuth2ImplicitAuthorizationURLFragmentResult = Omit<RESTPostOAuth2AccessTokenResult, 'refresh_token'>;
export interface RESTPostOAuth2ClientCredentialsURLEncodedData { grant_type: 'client_credentials'; scope: string;}
export type RESTPostOAuth2ClientCredentialsResult = RESTOAuth2ImplicitAuthorizationURLFragmentResult;
export interface RESTOAuth2BotAuthorizationQuery { client_id: Snowflake; scope: | OAuth2Scopes.Bot | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}` | `${OAuth2Scopes.Bot}${' ' | '%20'}${string}` | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}${string}${' ' | '%20'}`; permissions?: Permissions; guild_id?: Snowflake; disable_guild_select?: boolean;}
export interface RESTOAuth2AdvancedBotAuthorizationQuery { client_id: Snowflake; scope: | OAuth2Scopes.Bot | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}` | `${OAuth2Scopes.Bot}${' ' | '%20'}${string}` | `${string}${' ' | '%20'}${OAuth2Scopes.Bot}${string}${' ' | '%20'}`; permissions?: Permissions; guild_id?: Snowflake; disable_guild_select?: boolean; response_type: string; redirect_uri?: string;}
export interface RESTOAuth2AdvancedBotAuthorizationQueryResult { code: string; state?: string; guild_id: Snowflake; permissions: Permissions;}
export interface RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string; guild: APIGuild;}
export interface RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult { access_token: string; token_type: string; expires_in: number; refresh_token: string; scope: string; webhook: APIWebhook;}
export type RESTPostOAuth2AccessTokenWithBotAndGuildsAndWebhookIncomingScopeResult = RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult & RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult;