File tree Expand file tree Collapse file tree 12 files changed +44
-100
lines changed Expand file tree Collapse file tree 12 files changed +44
-100
lines changed Original file line number Diff line number Diff line change 22 * Types extracted from https://discord.com/developers/docs/resources/application
33 */
44
5- import type {
6- OAuth2PublicUserScopes ,
7- OAuth2GuildScopes ,
8- OAuth2OtherScopes ,
9- OAuth2RestrictedUserScopes ,
10- OAuth2PrivateUserScopes ,
11- } from './oauth2.ts' ;
5+ import type { OAuth2Scopes } from './oauth2.ts' ;
126import type { APITeam } from './teams.ts' ;
137import type { APIUser } from './user.ts' ;
148import type { Permissions , Snowflake } from '../../globals.ts' ;
@@ -114,13 +108,7 @@ export interface APIApplication {
114108}
115109
116110export interface APIApplicationInstallParams {
117- scopes : (
118- | OAuth2PublicUserScopes
119- | OAuth2GuildScopes
120- | OAuth2OtherScopes
121- | OAuth2RestrictedUserScopes
122- | OAuth2PrivateUserScopes
123- ) [ ] ;
111+ scopes : OAuth2Scopes [ ] ;
124112 permissions : Permissions ;
125113}
126114
Original file line number Diff line number Diff line change @@ -175,3 +175,10 @@ export enum OAuth2PrivateUserScopes {
175175 */
176176 Voice = 'voice' ,
177177}
178+
179+ export type OAuth2Scopes =
180+ | OAuth2PublicUserScopes
181+ | OAuth2GuildScopes
182+ | OAuth2OtherScopes
183+ | OAuth2RestrictedUserScopes
184+ | OAuth2PrivateUserScopes ;
Original file line number Diff line number Diff line change 22 * Types extracted from https://discord.com/developers/docs/resources/application
33 */
44
5- import type {
6- OAuth2PublicUserScopes ,
7- OAuth2GuildScopes ,
8- OAuth2OtherScopes ,
9- OAuth2RestrictedUserScopes ,
10- OAuth2PrivateUserScopes ,
11- } from './oauth2.ts' ;
5+ import type { OAuth2Scopes } from './oauth2.ts' ;
126import type { APITeam } from './teams.ts' ;
137import type { APIUser } from './user.ts' ;
148import type { Permissions , Snowflake } from '../../globals.ts' ;
@@ -114,13 +108,7 @@ export interface APIApplication {
114108}
115109
116110export interface APIApplicationInstallParams {
117- scopes : (
118- | OAuth2PublicUserScopes
119- | OAuth2GuildScopes
120- | OAuth2OtherScopes
121- | OAuth2RestrictedUserScopes
122- | OAuth2PrivateUserScopes
123- ) [ ] ;
111+ scopes : OAuth2Scopes [ ] ;
124112 permissions : Permissions ;
125113}
126114
Original file line number Diff line number Diff line change @@ -175,3 +175,10 @@ export enum OAuth2PrivateUserScopes {
175175 */
176176 Voice = 'voice' ,
177177}
178+
179+ export type OAuth2Scopes =
180+ | OAuth2PublicUserScopes
181+ | OAuth2GuildScopes
182+ | OAuth2OtherScopes
183+ | OAuth2RestrictedUserScopes
184+ | OAuth2PrivateUserScopes ;
Original file line number Diff line number Diff line change @@ -4,11 +4,8 @@ import type {
44 APIGuild ,
55 APIUser ,
66 APIWebhook ,
7- OAuth2PublicUserScopes ,
87 OAuth2GuildScopes ,
9- OAuth2OtherScopes ,
10- OAuth2RestrictedUserScopes ,
11- OAuth2PrivateUserScopes ,
8+ OAuth2Scopes ,
129} from '../../payloads/v10/mod.ts' ;
1310
1411/**
@@ -27,13 +24,7 @@ export interface RESTGetAPIOAuth2CurrentAuthorizationResult {
2724 /**
2825 * the scopes the user has authorized the application for
2926 */
30- scopes : (
31- | OAuth2PublicUserScopes
32- | OAuth2GuildScopes
33- | OAuth2OtherScopes
34- | OAuth2RestrictedUserScopes
35- | OAuth2PrivateUserScopes
36- ) [ ] ;
27+ scopes : OAuth2Scopes [ ] ;
3728 /**
3829 * when the access token expires
3930 */
Original file line number Diff line number Diff line change @@ -4,11 +4,8 @@ import type {
44 APIGuild ,
55 APIUser ,
66 APIWebhook ,
7- OAuth2PublicUserScopes ,
87 OAuth2GuildScopes ,
9- OAuth2OtherScopes ,
10- OAuth2RestrictedUserScopes ,
11- OAuth2PrivateUserScopes ,
8+ OAuth2Scopes ,
129} from '../../payloads/v10/mod.ts' ;
1310
1411/**
@@ -27,13 +24,7 @@ export interface RESTGetAPIOAuth2CurrentAuthorizationResult {
2724 /**
2825 * the scopes the user has authorized the application for
2926 */
30- scopes : (
31- | OAuth2PublicUserScopes
32- | OAuth2GuildScopes
33- | OAuth2OtherScopes
34- | OAuth2RestrictedUserScopes
35- | OAuth2PrivateUserScopes
36- ) [ ] ;
27+ scopes : OAuth2Scopes [ ] ;
3728 /**
3829 * when the access token expires
3930 */
Original file line number Diff line number Diff line change 22 * Types extracted from https://discord.com/developers/docs/resources/application
33 */
44
5- import type {
6- OAuth2PublicUserScopes ,
7- OAuth2GuildScopes ,
8- OAuth2OtherScopes ,
9- OAuth2RestrictedUserScopes ,
10- OAuth2PrivateUserScopes ,
11- } from './oauth2' ;
5+ import type { OAuth2Scopes } from './oauth2' ;
126import type { APITeam } from './teams' ;
137import type { APIUser } from './user' ;
148import type { Permissions , Snowflake } from '../../globals' ;
@@ -114,13 +108,7 @@ export interface APIApplication {
114108}
115109
116110export interface APIApplicationInstallParams {
117- scopes : (
118- | OAuth2PublicUserScopes
119- | OAuth2GuildScopes
120- | OAuth2OtherScopes
121- | OAuth2RestrictedUserScopes
122- | OAuth2PrivateUserScopes
123- ) [ ] ;
111+ scopes : OAuth2Scopes [ ] ;
124112 permissions : Permissions ;
125113}
126114
Original file line number Diff line number Diff line change @@ -175,3 +175,10 @@ export enum OAuth2PrivateUserScopes {
175175 */
176176 Voice = 'voice' ,
177177}
178+
179+ export type OAuth2Scopes =
180+ | OAuth2PublicUserScopes
181+ | OAuth2GuildScopes
182+ | OAuth2OtherScopes
183+ | OAuth2RestrictedUserScopes
184+ | OAuth2PrivateUserScopes ;
Original file line number Diff line number Diff line change 22 * Types extracted from https://discord.com/developers/docs/resources/application
33 */
44
5- import type {
6- OAuth2PublicUserScopes ,
7- OAuth2GuildScopes ,
8- OAuth2OtherScopes ,
9- OAuth2RestrictedUserScopes ,
10- OAuth2PrivateUserScopes ,
11- } from './oauth2' ;
5+ import type { OAuth2Scopes } from './oauth2' ;
126import type { APITeam } from './teams' ;
137import type { APIUser } from './user' ;
148import type { Permissions , Snowflake } from '../../globals' ;
@@ -114,13 +108,7 @@ export interface APIApplication {
114108}
115109
116110export interface APIApplicationInstallParams {
117- scopes : (
118- | OAuth2PublicUserScopes
119- | OAuth2GuildScopes
120- | OAuth2OtherScopes
121- | OAuth2RestrictedUserScopes
122- | OAuth2PrivateUserScopes
123- ) [ ] ;
111+ scopes : OAuth2Scopes [ ] ;
124112 permissions : Permissions ;
125113}
126114
Original file line number Diff line number Diff line change @@ -175,3 +175,10 @@ export enum OAuth2PrivateUserScopes {
175175 */
176176 Voice = 'voice' ,
177177}
178+
179+ export type OAuth2Scopes =
180+ | OAuth2PublicUserScopes
181+ | OAuth2GuildScopes
182+ | OAuth2OtherScopes
183+ | OAuth2RestrictedUserScopes
184+ | OAuth2PrivateUserScopes ;
You can’t perform that action at this time.
0 commit comments