UNPKG

@hewmen/passport-twitch

Version:

Twitch authentication strategy using Helix for Passport. Supports the April 2020 Twitch changes!

228 lines 8.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Strategy = exports.OAuth2Strategy = exports.Scope = void 0; /** * Module dependencies. */ const oauth2_1 = require("./oauth2"); Object.defineProperty(exports, "OAuth2Strategy", { enumerable: true, get: function () { return oauth2_1.Strategy; } }); Object.defineProperty(exports, "Strategy", { enumerable: true, get: function () { return oauth2_1.Strategy; } }); /** * An enum to provide quick access to the various OAuth scopes. * refer to [Twitch Developer](https://dev.twitch.tv/docs/authentication#scopes) */ var Scope; (function (Scope) { /** * View analytics data for the Twitch Extensions owned by the authenticated account. * @type {Scope.AnalyticsReadExtensions} */ Scope["AnalyticsReadExtensions"] = "analytics:read:extensions"; /** * View analytics data for the games owned by the authenticated account. * @type {Scope.AnalyticsReadGames} */ Scope["AnalyticsReadGames"] = "analytics:read:games"; /** * View Bits information for a channel. * @type {Scope.BitsRead} */ Scope["BitsRead"] = "bits:read"; /** * Run commercials on a channel. * @type {Scope.ChannelEditCommercial} */ Scope["ChannelEditCommercial"] = "channel:edit:commercial"; /** * Manage a channel’s broadcast configuration, including updating channel configuration and managing stream markers and stream tags. * @type {Scope.ChannelManageBroadcast} */ Scope["ChannelManageBroadcast"] = "channel:manage:broadcast"; /** * Manage a channel’s Extension configuration, including activating Extensions. * @type {Scope.ChannelManageExtensions} */ Scope["ChannelManageExtensions"] = "channel:manage:extensions"; /** * Manage a channel’s polls. * @type {Scope.ChannelManagePolls} */ Scope["ChannelManagePolls"] = "channel:manage:polls"; /** * Manage of channel’s Channel Points Predictions * @type {Scope.ChannelManagePredictions} */ Scope["ChannelManagePredictions"] = "channel:manage:predictions"; /** * Manage Channel Points custom rewards and their redemptions on a channel. * @type {Scope.ChannelManageRedemptions} */ Scope["ChannelManageRedemptions"] = "channel:manage:redemptions"; /** * Manage a channel’s stream schedule. * @type {Scope.ChannelManageSchedule} */ Scope["ChannelManageSchedule"] = "channel:manage:schedule"; /** * Manage a channel’s videos, including deleting videos. * @type {Scope.ChannelManageVideos} */ Scope["ChannelManageVideos"] = "channel:manage:videos"; /** * View a list of users with the editor role for a channel. * @type {Scope.ChannelReadEditors} */ Scope["ChannelReadEditors"] = "channel:read:editors"; /** * View Creator Goals for a channel. * @type {Scope.ChannelReadGoals} */ Scope["ChannelReadGoals"] = "channel:read:goals"; /** * View Hype Train information for a channel. * @type {Scope.ChannelReadHypetrain} */ Scope["ChannelReadHypetrain"] = "channel:read:hype_train"; /** * View a channel’s polls. * @type {Scope.ChannelReadPolls} */ Scope["ChannelReadPolls"] = "channel:read:polls"; /** * View a channel’s Channel Points Predictions. * @type {Scope.ChannelReadPredictions} */ Scope["ChannelReadPredictions"] = "channel:read:predictions"; /** * View Channel Points custom rewards and their redemptions on a channel. * @type {Scope.ChannelReadRedemptions} */ Scope["ChannelReadRedemptions"] = "channel:read:redemptions"; /** * View an authorized user’s stream key. * @type {Scope.ChannelReadStreamKey} */ Scope["ChannelReadStreamKey"] = "channel:read:stream_key"; /** * View a list of all subscribers to a channel and check if a user is subscribed to a channel. * @type {Scope.ChannelReadSubscriptions} */ Scope["ChannelReadSubscriptions"] = "channel:read:subscriptions"; /** * Manage Clips for a channel. * @type {Scope.ClipsEdit} */ Scope["ClipsEdit"] = "clips:edit"; /** * View a channel’s moderation data including Moderators, Bans, Timeouts, and Automod settings. * @type {Scope.ModerationRead} */ Scope["ModerationRead"] = "moderation:read"; /** * Ban and unban users. * @type {Scope.ModeratorManageBannedUsers} */ Scope["ModeratorManageBannedUsers"] = "moderator:manage:banned_users"; /** * View a broadcaster’s list of blocked terms. * @type {Scope.ModeratorReadBlockedTerms} */ Scope["ModeratorReadBlockedTerms"] = "moderator:read:blocked_terms"; /** * Manage a broadcaster’s list of blocked terms. * @type {Scope.ModeratorManageBlockedTerms} */ Scope["ModeratorManageBlockedTerms"] = "moderator:manage:blocked_terms"; /** * Manage messages held for review by AutoMod in channels where you are a moderator. * @type {Scope.ModeratorManageAutomod} */ Scope["ModeratorManageAutomod"] = "moderator:manage:automod"; /** * View a broadcaster’s AutoMod settings. * @type {Scope.ModeratorReadAutomodSettings} */ Scope["ModeratorReadAutomodSettings"] = "moderator:read:automod_settings"; /** * Manage a broadcaster’s AutoMod settings. * @type {Scope.ModeratorManageAutmodSettings} */ Scope["ModeratorManageAutmodSettings"] = "moderator:manage:automod_settings"; /** * View a broadcaster’s chat room settings. * @type {Scope.ModeratorReadChatSettings} */ Scope["ModeratorReadChatSettings"] = "moderator:read:chat_settings"; /** * Manage a broadcaster’s chat room settings. * @type {Scope.ModeratorManageChatSettings} */ Scope["ModeratorManageChatSettings"] = "moderator:manage:chat_settings"; /** * Manage a user object. * @type {Scope.UserEdit} */ Scope["UserEdit"] = "user:edit"; /** * @deprecated * Deprecated. Was previously used for “Create User Follows” and “Delete User Follows.” * @type {Scope.UserEditFollows} */ Scope["UserEditFollows"] = "user:edit:follows"; /** * Manage the block list of a user. * @type {Scope.UserManageBlockedUsers} */ Scope["UserManageBlockedUsers"] = "user:manage:blocked_users"; /** * View the block list of a user. * @type {Scope.UserReadBlockedUsers} */ Scope["UserReadBlockedUsers"] = "user:read:blocked_users"; /** * View a user’s broadcasting configuration, including Extension configurations. * @type {Scope.UserReadBroadcast} */ Scope["UserReadBroadcast"] = "user:read:broadcast"; /** * View a user’s email address. * @type {Scope.UserReadEmail} */ Scope["UserReadEmail"] = "user:read:email"; /** * View the list of channels a user follows. * @type {Scope.UserReadFollows} */ Scope["UserReadFollows"] = "user:read:follows"; /** * View if an authorized user is subscribed to specific channels. * @type {Scope.UserReadSubscriptions} */ Scope["UserReadSubscriptions"] = "user:read:subscriptions"; /** * Perform moderation actions in a channel. The user requesting the scope must be a moderator in the channel. * @type {Scope.ChannelModerate} */ Scope["ChannelModerate"] = "channel:moderate"; /** * Send live stream chat and rooms messages. * @type {Scope.ChatEdit} */ Scope["ChatEdit"] = "chat:edit"; /** * View live stream chat and rooms messages. * @type {Scope.ChatRead} */ Scope["ChatRead"] = "chat:read"; /** * View your whisper messages. * @type {Scope.WhispersRead} */ Scope["WhispersRead"] = "whispers:read"; /** * Send whisper messages. * @type {Scope.WhispersEdit} */ Scope["WhispersEdit"] = "whispers:edit"; })(Scope = exports.Scope || (exports.Scope = {})); //# sourceMappingURL=index.js.map