File tree 12 files changed +44
-100
lines changed 12 files changed +44
-100
lines changed Original file line number Diff line number Diff line change 2
2
* Types extracted from https://discord.com/developers/docs/resources/application
3
3
*/
4
4
5
- import type {
6
- OAuth2PublicUserScopes ,
7
- OAuth2GuildScopes ,
8
- OAuth2OtherScopes ,
9
- OAuth2RestrictedUserScopes ,
10
- OAuth2PrivateUserScopes ,
11
- } from './oauth2.ts' ;
5
+ import type { OAuth2Scopes } from './oauth2.ts' ;
12
6
import type { APITeam } from './teams.ts' ;
13
7
import type { APIUser } from './user.ts' ;
14
8
import type { Permissions , Snowflake } from '../../globals.ts' ;
@@ -114,13 +108,7 @@ export interface APIApplication {
114
108
}
115
109
116
110
export interface APIApplicationInstallParams {
117
- scopes : (
118
- | OAuth2PublicUserScopes
119
- | OAuth2GuildScopes
120
- | OAuth2OtherScopes
121
- | OAuth2RestrictedUserScopes
122
- | OAuth2PrivateUserScopes
123
- ) [ ] ;
111
+ scopes : OAuth2Scopes [ ] ;
124
112
permissions : Permissions ;
125
113
}
126
114
Original file line number Diff line number Diff line change @@ -175,3 +175,10 @@ export enum OAuth2PrivateUserScopes {
175
175
*/
176
176
Voice = 'voice' ,
177
177
}
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 2
2
* Types extracted from https://discord.com/developers/docs/resources/application
3
3
*/
4
4
5
- import type {
6
- OAuth2PublicUserScopes ,
7
- OAuth2GuildScopes ,
8
- OAuth2OtherScopes ,
9
- OAuth2RestrictedUserScopes ,
10
- OAuth2PrivateUserScopes ,
11
- } from './oauth2.ts' ;
5
+ import type { OAuth2Scopes } from './oauth2.ts' ;
12
6
import type { APITeam } from './teams.ts' ;
13
7
import type { APIUser } from './user.ts' ;
14
8
import type { Permissions , Snowflake } from '../../globals.ts' ;
@@ -114,13 +108,7 @@ export interface APIApplication {
114
108
}
115
109
116
110
export interface APIApplicationInstallParams {
117
- scopes : (
118
- | OAuth2PublicUserScopes
119
- | OAuth2GuildScopes
120
- | OAuth2OtherScopes
121
- | OAuth2RestrictedUserScopes
122
- | OAuth2PrivateUserScopes
123
- ) [ ] ;
111
+ scopes : OAuth2Scopes [ ] ;
124
112
permissions : Permissions ;
125
113
}
126
114
Original file line number Diff line number Diff line change @@ -175,3 +175,10 @@ export enum OAuth2PrivateUserScopes {
175
175
*/
176
176
Voice = 'voice' ,
177
177
}
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 {
4
4
APIGuild ,
5
5
APIUser ,
6
6
APIWebhook ,
7
- OAuth2PublicUserScopes ,
8
7
OAuth2GuildScopes ,
9
- OAuth2OtherScopes ,
10
- OAuth2RestrictedUserScopes ,
11
- OAuth2PrivateUserScopes ,
8
+ OAuth2Scopes ,
12
9
} from '../../payloads/v10/mod.ts' ;
13
10
14
11
/**
@@ -27,13 +24,7 @@ export interface RESTGetAPIOAuth2CurrentAuthorizationResult {
27
24
/**
28
25
* the scopes the user has authorized the application for
29
26
*/
30
- scopes : (
31
- | OAuth2PublicUserScopes
32
- | OAuth2GuildScopes
33
- | OAuth2OtherScopes
34
- | OAuth2RestrictedUserScopes
35
- | OAuth2PrivateUserScopes
36
- ) [ ] ;
27
+ scopes : OAuth2Scopes [ ] ;
37
28
/**
38
29
* when the access token expires
39
30
*/
Original file line number Diff line number Diff line change @@ -4,11 +4,8 @@ import type {
4
4
APIGuild ,
5
5
APIUser ,
6
6
APIWebhook ,
7
- OAuth2PublicUserScopes ,
8
7
OAuth2GuildScopes ,
9
- OAuth2OtherScopes ,
10
- OAuth2RestrictedUserScopes ,
11
- OAuth2PrivateUserScopes ,
8
+ OAuth2Scopes ,
12
9
} from '../../payloads/v10/mod.ts' ;
13
10
14
11
/**
@@ -27,13 +24,7 @@ export interface RESTGetAPIOAuth2CurrentAuthorizationResult {
27
24
/**
28
25
* the scopes the user has authorized the application for
29
26
*/
30
- scopes : (
31
- | OAuth2PublicUserScopes
32
- | OAuth2GuildScopes
33
- | OAuth2OtherScopes
34
- | OAuth2RestrictedUserScopes
35
- | OAuth2PrivateUserScopes
36
- ) [ ] ;
27
+ scopes : OAuth2Scopes [ ] ;
37
28
/**
38
29
* when the access token expires
39
30
*/
Original file line number Diff line number Diff line change 2
2
* Types extracted from https://discord.com/developers/docs/resources/application
3
3
*/
4
4
5
- import type {
6
- OAuth2PublicUserScopes ,
7
- OAuth2GuildScopes ,
8
- OAuth2OtherScopes ,
9
- OAuth2RestrictedUserScopes ,
10
- OAuth2PrivateUserScopes ,
11
- } from './oauth2' ;
5
+ import type { OAuth2Scopes } from './oauth2' ;
12
6
import type { APITeam } from './teams' ;
13
7
import type { APIUser } from './user' ;
14
8
import type { Permissions , Snowflake } from '../../globals' ;
@@ -114,13 +108,7 @@ export interface APIApplication {
114
108
}
115
109
116
110
export interface APIApplicationInstallParams {
117
- scopes : (
118
- | OAuth2PublicUserScopes
119
- | OAuth2GuildScopes
120
- | OAuth2OtherScopes
121
- | OAuth2RestrictedUserScopes
122
- | OAuth2PrivateUserScopes
123
- ) [ ] ;
111
+ scopes : OAuth2Scopes [ ] ;
124
112
permissions : Permissions ;
125
113
}
126
114
Original file line number Diff line number Diff line change @@ -175,3 +175,10 @@ export enum OAuth2PrivateUserScopes {
175
175
*/
176
176
Voice = 'voice' ,
177
177
}
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 2
2
* Types extracted from https://discord.com/developers/docs/resources/application
3
3
*/
4
4
5
- import type {
6
- OAuth2PublicUserScopes ,
7
- OAuth2GuildScopes ,
8
- OAuth2OtherScopes ,
9
- OAuth2RestrictedUserScopes ,
10
- OAuth2PrivateUserScopes ,
11
- } from './oauth2' ;
5
+ import type { OAuth2Scopes } from './oauth2' ;
12
6
import type { APITeam } from './teams' ;
13
7
import type { APIUser } from './user' ;
14
8
import type { Permissions , Snowflake } from '../../globals' ;
@@ -114,13 +108,7 @@ export interface APIApplication {
114
108
}
115
109
116
110
export interface APIApplicationInstallParams {
117
- scopes : (
118
- | OAuth2PublicUserScopes
119
- | OAuth2GuildScopes
120
- | OAuth2OtherScopes
121
- | OAuth2RestrictedUserScopes
122
- | OAuth2PrivateUserScopes
123
- ) [ ] ;
111
+ scopes : OAuth2Scopes [ ] ;
124
112
permissions : Permissions ;
125
113
}
126
114
Original file line number Diff line number Diff line change @@ -175,3 +175,10 @@ export enum OAuth2PrivateUserScopes {
175
175
*/
176
176
Voice = 'voice' ,
177
177
}
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 {
4
4
APIGuild ,
5
5
APIUser ,
6
6
APIWebhook ,
7
- OAuth2PublicUserScopes ,
8
7
OAuth2GuildScopes ,
9
- OAuth2OtherScopes ,
10
- OAuth2RestrictedUserScopes ,
11
- OAuth2PrivateUserScopes ,
8
+ OAuth2Scopes ,
12
9
} from '../../payloads/v10/index' ;
13
10
14
11
/**
@@ -27,13 +24,7 @@ export interface RESTGetAPIOAuth2CurrentAuthorizationResult {
27
24
/**
28
25
* the scopes the user has authorized the application for
29
26
*/
30
- scopes : (
31
- | OAuth2PublicUserScopes
32
- | OAuth2GuildScopes
33
- | OAuth2OtherScopes
34
- | OAuth2RestrictedUserScopes
35
- | OAuth2PrivateUserScopes
36
- ) [ ] ;
27
+ scopes : OAuth2Scopes [ ] ;
37
28
/**
38
29
* when the access token expires
39
30
*/
Original file line number Diff line number Diff line change @@ -4,11 +4,8 @@ import type {
4
4
APIGuild ,
5
5
APIUser ,
6
6
APIWebhook ,
7
- OAuth2PublicUserScopes ,
8
7
OAuth2GuildScopes ,
9
- OAuth2OtherScopes ,
10
- OAuth2RestrictedUserScopes ,
11
- OAuth2PrivateUserScopes ,
8
+ OAuth2Scopes ,
12
9
} from '../../payloads/v10/index' ;
13
10
14
11
/**
@@ -27,13 +24,7 @@ export interface RESTGetAPIOAuth2CurrentAuthorizationResult {
27
24
/**
28
25
* the scopes the user has authorized the application for
29
26
*/
30
- scopes : (
31
- | OAuth2PublicUserScopes
32
- | OAuth2GuildScopes
33
- | OAuth2OtherScopes
34
- | OAuth2RestrictedUserScopes
35
- | OAuth2PrivateUserScopes
36
- ) [ ] ;
27
+ scopes : OAuth2Scopes [ ] ;
37
28
/**
38
29
* when the access token expires
39
30
*/
You can’t perform that action at this time.
0 commit comments