feat: add union type DiscordConnectionServices (#2458)

* add enum DiscordConnectionServices

* DiscordConnectionServices enum -> union type
This commit is contained in:
LTS20050703
2022-09-12 20:49:24 +07:00
committed by GitHub
parent 82653ec0d8
commit b502c14ffb

View File

@@ -85,15 +85,15 @@ export interface DiscordConnection {
/** The username of the connection account */
name: string;
/** The service of the connection (twitch, youtube) */
type: string;
type: DiscordConnectionServices;
/** Whether the connection is revoked */
revoked?: boolean;
/** Whether the connection is verified */
verified: boolean;
/** Whether friend sync is enabled for this connection */
friendSync: boolean;
friend_sync: boolean;
/** Whether activities related to this connection will be shown in presence updates */
showActivity: boolean;
show_activity: boolean;
/** Visibility of this connection */
visibility: VisibilityTypes;
@@ -101,6 +101,25 @@ export interface DiscordConnection {
integrations?: DiscordIntegration[];
}
/** https://discord.com/developers/docs/resources/user#connection-object-services */
export type DiscordConnectionServices =
| "battlenet"
| "ebay"
| "epicgames"
| "facebook"
| "github"
| "leagueoflegends"
| "playstation"
| "reddit"
| "riotgames"
| "spotify"
| "skype"
| "steam"
| "twitch"
| "twitter"
| "xbox"
| "youtube";
/** https://discord.com/developers/docs/resources/guild#integration-object-integration-structure */
export interface DiscordIntegration {
/** Integration Id */