Skip to content

Commit

Permalink
feat(APIConnection): add ConnectionService to type (#491)
Browse files Browse the repository at this point in the history
* feat: add `ConnectionService` to `APIConnection#type`

* feat: add `epicgames`

* feat: add old connections

* refactor: capitalization

* feat: add missing `SamsungGalaxy`
  • Loading branch information
vvito7 committed Jul 15, 2022
1 parent 59e2477 commit 4577ac2
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 4 deletions.
22 changes: 21 additions & 1 deletion deno/payloads/v10/user.ts
Expand Up @@ -178,8 +178,10 @@ export interface APIConnection {
name: string;
/**
* The service of the connection
*
* See https://discord.com/developers/docs/resources/user#connection-object-services
*/
type: string;
type: ConnectionService;
/**
* Whether the connection is revoked
*/
Expand Down Expand Up @@ -210,6 +212,24 @@ export interface APIConnection {
visibility: ConnectionVisibility;
}

export enum ConnectionService {
BattleNet = 'battlenet',
EpicGames = 'epicgames',
Facebook = 'facebook',
GitHub = 'github',
LeagueOfLegends = 'leagueoflegends',
PlayStationNetwork = 'playstation',
Reddit = 'reddit',
SamsungGalaxy = 'samsunggalaxy',
Spotify = 'spotify',
Skype = 'skype',
Steam = 'steam',
Twitch = 'twitch',
Twitter = 'twitter',
Xbox = 'xbox',
YouTube = 'youtube',
}

export enum ConnectionVisibility {
/**
* Invisible to everyone except the user themselves
Expand Down
22 changes: 21 additions & 1 deletion deno/payloads/v9/user.ts
Expand Up @@ -178,8 +178,10 @@ export interface APIConnection {
name: string;
/**
* The service of the connection
*
* See https://discord.com/developers/docs/resources/user#connection-object-services
*/
type: string;
type: ConnectionService;
/**
* Whether the connection is revoked
*/
Expand Down Expand Up @@ -210,6 +212,24 @@ export interface APIConnection {
visibility: ConnectionVisibility;
}

export enum ConnectionService {
BattleNet = 'battlenet',
EpicGames = 'epicgames',
Facebook = 'facebook',
GitHub = 'github',
LeagueOfLegends = 'leagueoflegends',
PlayStationNetwork = 'playstation',
Reddit = 'reddit',
SamsungGalaxy = 'samsunggalaxy',
Spotify = 'spotify',
Skype = 'skype',
Steam = 'steam',
Twitch = 'twitch',
Twitter = 'twitter',
Xbox = 'xbox',
YouTube = 'youtube',
}

export enum ConnectionVisibility {
/**
* Invisible to everyone except the user themselves
Expand Down
22 changes: 21 additions & 1 deletion payloads/v10/user.ts
Expand Up @@ -178,8 +178,10 @@ export interface APIConnection {
name: string;
/**
* The service of the connection
*
* See https://discord.com/developers/docs/resources/user#connection-object-services
*/
type: string;
type: ConnectionService;
/**
* Whether the connection is revoked
*/
Expand Down Expand Up @@ -210,6 +212,24 @@ export interface APIConnection {
visibility: ConnectionVisibility;
}

export enum ConnectionService {
BattleNet = 'battlenet',
EpicGames = 'epicgames',
Facebook = 'facebook',
GitHub = 'github',
LeagueOfLegends = 'leagueoflegends',
PlayStationNetwork = 'playstation',
Reddit = 'reddit',
SamsungGalaxy = 'samsunggalaxy',
Spotify = 'spotify',
Skype = 'skype',
Steam = 'steam',
Twitch = 'twitch',
Twitter = 'twitter',
Xbox = 'xbox',
YouTube = 'youtube',
}

export enum ConnectionVisibility {
/**
* Invisible to everyone except the user themselves
Expand Down
22 changes: 21 additions & 1 deletion payloads/v9/user.ts
Expand Up @@ -178,8 +178,10 @@ export interface APIConnection {
name: string;
/**
* The service of the connection
*
* See https://discord.com/developers/docs/resources/user#connection-object-services
*/
type: string;
type: ConnectionService;
/**
* Whether the connection is revoked
*/
Expand Down Expand Up @@ -210,6 +212,24 @@ export interface APIConnection {
visibility: ConnectionVisibility;
}

export enum ConnectionService {
BattleNet = 'battlenet',
EpicGames = 'epicgames',
Facebook = 'facebook',
GitHub = 'github',
LeagueOfLegends = 'leagueoflegends',
PlayStationNetwork = 'playstation',
Reddit = 'reddit',
SamsungGalaxy = 'samsunggalaxy',
Spotify = 'spotify',
Skype = 'skype',
Steam = 'steam',
Twitch = 'twitch',
Twitter = 'twitter',
Xbox = 'xbox',
YouTube = 'youtube',
}

export enum ConnectionVisibility {
/**
* Invisible to everyone except the user themselves
Expand Down

1 comment on commit 4577ac2

@vercel
Copy link

@vercel vercel bot commented on 4577ac2 Jul 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.