twitch-ebs-tools
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -1,16 +0,15 @@ | ||
import { TwitchToken, TwitchPayload, TwitchChannelId, TwitchRole, TwitchRoles } from './types.d'; | ||
declare const _default: { | ||
new (secret: string): { | ||
readonly secret: string; | ||
validateToken(token: TwitchToken, ignoreExpiration?: boolean | undefined): TwitchPayload | Error; | ||
validatePermission(token: TwitchToken, channelId: TwitchChannelId, roles: TwitchRole | TwitchRoles, ignoreExpiration?: boolean | undefined): boolean; | ||
}; | ||
verifyChannelId(payload: TwitchPayload, channelId: TwitchChannelId): boolean; | ||
verifyTokenNotExpired(payload: TwitchPayload): boolean; | ||
verifyRole(payload: TwitchPayload, role: TwitchRole): boolean; | ||
verifyChannelIdAndRole(payload: TwitchPayload, channelId: TwitchChannelId, role: TwitchRole): boolean; | ||
verifyBroadcaster(payload: TwitchPayload): boolean; | ||
verifyViewerOrBroadcaster(payload: TwitchPayload): boolean; | ||
}; | ||
export = _default; | ||
import { TwitchToken, TwitchPayload, TwitchChannelId, TwitchRole, TwitchRoles } from './types'; | ||
export { TwitchToken, TwitchPayload, TwitchChannelId, TwitchRole, TwitchRoles, }; | ||
export default class TwitchEbsTools { | ||
readonly secret: string; | ||
constructor(secret: string); | ||
validateToken(token: TwitchToken, ignoreExpiration?: boolean): TwitchPayload | Error; | ||
static verifyChannelId(payload: TwitchPayload, channelId: TwitchChannelId): boolean; | ||
static verifyTokenNotExpired(payload: TwitchPayload): boolean; | ||
static verifyRole(payload: TwitchPayload, role: TwitchRole): boolean; | ||
static verifyChannelIdAndRole(payload: TwitchPayload, channelId: TwitchChannelId, role: TwitchRole): boolean; | ||
static verifyBroadcaster(payload: TwitchPayload): boolean; | ||
static verifyViewerOrBroadcaster(payload: TwitchPayload): boolean; | ||
validatePermission(token: TwitchToken, channelId: TwitchChannelId, roles: TwitchRole | TwitchRoles, ignoreExpiration?: boolean): boolean; | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
@@ -5,4 +5,5 @@ "use strict"; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken")); | ||
module.exports = class TwitchEbsTools { | ||
class TwitchEbsTools { | ||
constructor(secret) { | ||
@@ -63,3 +64,4 @@ this.secret = secret; | ||
} | ||
}; | ||
} | ||
exports.default = TwitchEbsTools; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "twitch-ebs-tools", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Utility functions for Twitch Extension Backend Services (EBS)", | ||
"main": "dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"scripts": { | ||
@@ -7,0 +8,0 @@ "test": "jest", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
18486
11
95