oberknecht-api
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -95,2 +95,4 @@ import { jsonsplitter } from "oberknecht-jsonsplitter"; | ||
getChannelModerators: (userID?: string, first?: string, after?: string, broadcasterID?: string, customToken?: string) => Promise<import("../types/endpoints/getChannelModerators").channelModeratorsResponse>; | ||
getConduits: (customToken?: string) => Promise<import("../types/endpoints/conduits/getConduits").getConduitsResponse>; | ||
createConduits: (shardCount: number, customToken?: string) => Promise<import("../types/endpoints/conduits/getConduits").getConduitsResponse>; | ||
} |
@@ -63,2 +63,4 @@ "use strict"; | ||
const getValidAccessTokenForRT_1 = require("../functions/getValidAccessTokenForRT"); | ||
const getConduits_1 = require("../endpoints/conduits/getConduits"); | ||
const createConduits_1 = require("../endpoints/conduits/createConduits"); | ||
let clientSymNum = 0; | ||
@@ -380,3 +382,10 @@ (0, oberknecht_request_1.request)(null, null, null, { | ||
}; | ||
// Conduits | ||
getConduits = (customToken) => { | ||
return (0, getConduits_1.getConduits)(this.symbol, customToken); | ||
}; | ||
createConduits = (shardCount, customToken) => { | ||
return (0, createConduits_1.createConduits)(this.symbol, shardCount, customToken); | ||
}; | ||
} | ||
exports.oberknechtAPI = oberknechtAPI; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._getUser = void 0; | ||
exports._getUser = _getUser; | ||
const _getUsers_1 = require("./_getUsers"); | ||
@@ -18,2 +18,1 @@ function _getUser(sym, user, refreshCache) { | ||
} | ||
exports._getUser = _getUser; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._getUsers = void 0; | ||
exports._getUsers = _getUsers; | ||
const oberknecht_utils_1 = require("oberknecht-utils"); | ||
@@ -108,2 +108,1 @@ const __1 = require(".."); | ||
} | ||
exports._getUsers = _getUsers; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._refreshRefreshToken = void 0; | ||
exports._refreshRefreshToken = _refreshRefreshToken; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -25,3 +25,3 @@ const __1 = require(".."); | ||
if (e || r.status !== 200) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
let accessToken = r.data.access_token; | ||
@@ -73,2 +73,1 @@ await (0, _validatetoken_1._validatetoken)(sym, accessToken, false) | ||
} | ||
exports._refreshRefreshToken = _refreshRefreshToken; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._revoketoken = void 0; | ||
exports._revoketoken = _revoketoken; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -25,3 +25,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "revokeToken")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(); | ||
@@ -31,2 +31,1 @@ }); | ||
} | ||
exports._revoketoken = _revoketoken; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._validateRefreshTokenCode = void 0; | ||
exports._validateRefreshTokenCode = _validateRefreshTokenCode; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -85,2 +85,1 @@ const __1 = require(".."); | ||
} | ||
exports._validateRefreshTokenCode = _validateRefreshTokenCode; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._validatetoken = void 0; | ||
exports._validatetoken = _validatetoken; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -23,3 +23,3 @@ const __1 = require(".."); | ||
if (e || r.status !== 200) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
let tokenData = r.data; | ||
@@ -43,2 +43,1 @@ let accessTokenData = { | ||
} | ||
exports._validatetoken = _validatetoken; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addEventsubSubscription = void 0; | ||
exports.addEventsubSubscription = addEventsubSubscription; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -28,3 +28,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "eventsubSubscriptions")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -36,2 +36,1 @@ }); | ||
} | ||
exports.addEventsubSubscription = addEventsubSubscription; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.announce = void 0; | ||
exports.announce = announce; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -34,3 +34,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "announce")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(); | ||
@@ -40,2 +40,1 @@ }); | ||
} | ||
exports.announce = announce; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ban = void 0; | ||
exports.ban = ban; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -39,3 +39,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "bans")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -45,2 +45,1 @@ }); | ||
} | ||
exports.ban = ban; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.cancelRaid = void 0; | ||
exports.cancelRaid = cancelRaid; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -25,3 +25,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "cancelRaid")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(); | ||
@@ -31,2 +31,1 @@ }); | ||
} | ||
exports.cancelRaid = cancelRaid; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createClip = void 0; | ||
exports.createClip = createClip; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -26,3 +26,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "createClip")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -32,2 +32,1 @@ }); | ||
} | ||
exports.createClip = createClip; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createPoll = void 0; | ||
exports.createPoll = createPoll; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -32,3 +32,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "createPoll")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -38,2 +38,1 @@ }); | ||
} | ||
exports.createPoll = createPoll; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createPrediction = void 0; | ||
exports.createPrediction = createPrediction; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -30,3 +30,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "createPrediction")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -36,2 +36,1 @@ }); | ||
} | ||
exports.createPrediction = createPrediction; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.deleteEventsubSubscription = void 0; | ||
exports.deleteEventsubSubscription = deleteEventsubSubscription; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -20,3 +20,3 @@ const urls_1 = require("../variables/urls"); | ||
r.status !== urls_1.urls._code("twitch", "deleteEventsubSubscription")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(); | ||
@@ -26,2 +26,1 @@ }); | ||
} | ||
exports.deleteEventsubSubscription = deleteEventsubSubscription; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.deleteMessage = void 0; | ||
exports.deleteMessage = deleteMessage; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -26,3 +26,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "deleteMessage")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(); | ||
@@ -32,2 +32,1 @@ }); | ||
} | ||
exports.deleteMessage = deleteMessage; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.endPoll = void 0; | ||
exports.endPoll = endPoll; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -25,3 +25,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "endPoll")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -31,2 +31,1 @@ }); | ||
} | ||
exports.endPoll = endPoll; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.endPrediction = void 0; | ||
exports.endPrediction = endPrediction; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -30,3 +30,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "endPrediction")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -36,2 +36,1 @@ }); | ||
} | ||
exports.endPrediction = endPrediction; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getBroadcasterSubscriptions = void 0; | ||
exports.getBroadcasterSubscriptions = getBroadcasterSubscriptions; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -27,3 +27,3 @@ const urls_1 = require("../variables/urls"); | ||
r.status !== urls_1.urls._code("twitch", "getBroadcasterSubscriptions")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -33,2 +33,1 @@ }); | ||
} | ||
exports.getBroadcasterSubscriptions = getBroadcasterSubscriptions; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getChannelFollowers = void 0; | ||
exports.getChannelFollowers = getChannelFollowers; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -30,3 +30,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "channelFollowers")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -36,2 +36,1 @@ }); | ||
} | ||
exports.getChannelFollowers = getChannelFollowers; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getChannelModerators = void 0; | ||
exports.getChannelModerators = getChannelModerators; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -26,3 +26,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "getChannelModerators")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -32,2 +32,1 @@ }); | ||
} | ||
exports.getChannelModerators = getChannelModerators; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getChannels = void 0; | ||
exports.getChannels = getChannels; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -29,3 +29,3 @@ const __1 = require(".."); | ||
if (e || r.status !== urls_1.urls._code("twitch", "getChannels")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -35,2 +35,1 @@ }); | ||
} | ||
exports.getChannels = getChannels; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getChatSettings = void 0; | ||
exports.getChatSettings = getChatSettings; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -26,3 +26,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "getChatSettings")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -32,2 +32,1 @@ }); | ||
} | ||
exports.getChatSettings = getChatSettings; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getClips = void 0; | ||
exports.getClips = getClips; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -43,3 +43,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "getClips")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -49,2 +49,1 @@ }); | ||
} | ||
exports.getClips = getClips; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getColor = void 0; | ||
exports.getColor = getColor; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -30,3 +30,3 @@ const __1 = require(".."); | ||
if (e || r.status !== urls_1.urls._code("twitch", "getColor")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -36,2 +36,1 @@ }); | ||
} | ||
exports.getColor = getColor; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getEventsubSubscriptions = void 0; | ||
exports.getEventsubSubscriptions = getEventsubSubscriptions; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -18,3 +18,3 @@ const urls_1 = require("../variables/urls"); | ||
r.status !== urls_1.urls._code("twitch", "getEventsubSubscriptions")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -24,2 +24,1 @@ }); | ||
} | ||
exports.getEventsubSubscriptions = getEventsubSubscriptions; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getFollowedChannels = void 0; | ||
exports.getFollowedChannels = getFollowedChannels; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -26,3 +26,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "getFollowedChannels")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -32,2 +32,1 @@ }); | ||
} | ||
exports.getFollowedChannels = getFollowedChannels; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getGames = void 0; | ||
exports.getGames = getGames; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -25,3 +25,3 @@ const __1 = require(".."); | ||
if (e || r.status !== urls_1.urls._code("twitch", "getGames")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -31,2 +31,1 @@ }); | ||
} | ||
exports.getGames = getGames; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getModeratedChannels = void 0; | ||
exports.getModeratedChannels = getModeratedChannels; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -19,3 +19,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "getModeratedChannels")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -25,2 +25,1 @@ }); | ||
} | ||
exports.getModeratedChannels = getModeratedChannels; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getPolls = void 0; | ||
exports.getPolls = getPolls; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -19,3 +19,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "getPolls")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -25,2 +25,1 @@ }); | ||
} | ||
exports.getPolls = getPolls; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getPredictions = void 0; | ||
exports.getPredictions = getPredictions; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -20,3 +20,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "getPredictions")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -26,2 +26,1 @@ }); | ||
} | ||
exports.getPredictions = getPredictions; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getStreams = void 0; | ||
exports.getStreams = getStreams; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -24,3 +24,3 @@ const __1 = require(".."); | ||
if (e || r.status !== urls_1.urls._code("twitch", "getStreams")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
if (__1.i.apiclientData[sym]?._options?.saveIDs) { | ||
@@ -36,2 +36,1 @@ r.data.data.forEach(async (a) => { | ||
} | ||
exports.getStreams = getStreams; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getUsers = void 0; | ||
exports.getUsers = getUsers; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -80,2 +80,1 @@ const urls_1 = require("../variables/urls"); | ||
} | ||
exports.getUsers = getUsers; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.mod = void 0; | ||
exports.mod = mod; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -31,3 +31,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "mod")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(); | ||
@@ -37,2 +37,1 @@ }); | ||
} | ||
exports.mod = mod; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.raid = void 0; | ||
exports.raid = raid; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -31,3 +31,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "raid")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -37,2 +37,1 @@ }); | ||
} | ||
exports.raid = raid; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.shoutout = void 0; | ||
exports.shoutout = shoutout; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -32,3 +32,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "shoutout")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(); | ||
@@ -38,2 +38,1 @@ }); | ||
} | ||
exports.shoutout = shoutout; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.unban = void 0; | ||
exports.unban = unban; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -32,3 +32,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "unban")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(); | ||
@@ -38,2 +38,1 @@ }); | ||
} | ||
exports.unban = unban; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.unmod = void 0; | ||
exports.unmod = unmod; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -31,3 +31,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "unmod")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(); | ||
@@ -37,2 +37,1 @@ }); | ||
} | ||
exports.unmod = unmod; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.unvip = void 0; | ||
exports.unvip = unvip; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -31,3 +31,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "unvip")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(); | ||
@@ -37,2 +37,1 @@ }); | ||
} | ||
exports.unvip = unvip; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.updateChannel = void 0; | ||
exports.updateChannel = updateChannel; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -29,3 +29,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "updateChannel")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(); | ||
@@ -35,2 +35,1 @@ }); | ||
} | ||
exports.updateChannel = updateChannel; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.updateChatSettings = void 0; | ||
exports.updateChatSettings = updateChatSettings; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -59,3 +59,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "updateChatSettings")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(r.data); | ||
@@ -65,2 +65,1 @@ }); | ||
} | ||
exports.updateChatSettings = updateChatSettings; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.updateColor = void 0; | ||
exports.updateColor = updateColor; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -19,3 +19,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "updateColor")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(); | ||
@@ -25,2 +25,1 @@ }); | ||
} | ||
exports.updateColor = updateColor; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.vip = void 0; | ||
exports.vip = vip; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -27,3 +27,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "vip")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(); | ||
@@ -33,2 +33,1 @@ }); | ||
} | ||
exports.vip = vip; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.whisper = void 0; | ||
exports.whisper = whisper; | ||
const oberknecht_request_1 = require("oberknecht-request"); | ||
@@ -30,3 +30,3 @@ const urls_1 = require("../variables/urls"); | ||
if (e || r.status !== urls_1.urls._code("twitch", "whisper")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
return resolve(); | ||
@@ -36,2 +36,1 @@ }); | ||
} | ||
exports.whisper = whisper; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._log = void 0; | ||
exports._log = _log; | ||
function date_() { return new Date(new Date().setMinutes(new Date().getMinutes() - new Date().getTimezoneOffset())).toISOString().split("Z")[0].replace("T", " "); } | ||
@@ -34,3 +34,2 @@ ; | ||
} | ||
exports._log = _log; | ||
; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._mainpath = void 0; | ||
exports._mainpath = _mainpath; | ||
const path_1 = __importDefault(require("path")); | ||
@@ -24,3 +24,2 @@ const __1 = require(".."); | ||
} | ||
exports._mainpath = _mainpath; | ||
; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._rf = void 0; | ||
exports._rf = _rf; | ||
const _mainpath_1 = require("../functions/_mainpath"); | ||
@@ -36,3 +36,2 @@ const fs_1 = __importDefault(require("fs")); | ||
} | ||
exports._rf = _rf; | ||
; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._stackname = void 0; | ||
exports._stackname = _stackname; | ||
const _staticspacer_1 = require("./_staticspacer"); | ||
@@ -38,3 +38,2 @@ function _stackname(...args) { | ||
} | ||
exports._stackname = _stackname; | ||
; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._staticspacer = void 0; | ||
exports._staticspacer = _staticspacer; | ||
function _staticspacer(spacerwidth /* Number of tabs */, spacercontent, spacecolor) { | ||
@@ -27,3 +27,2 @@ let color = (() => { | ||
} | ||
exports._staticspacer = _staticspacer; | ||
; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._wf = void 0; | ||
exports._wf = _wf; | ||
const _mainpath_1 = require("../functions/_mainpath"); | ||
@@ -43,3 +43,2 @@ const fs_1 = __importDefault(require("fs")); | ||
} | ||
exports._wf = _wf; | ||
; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.checkParams = void 0; | ||
exports.checkParams = checkParams; | ||
const oberknecht_utils_1 = require("oberknecht-utils"); | ||
@@ -11,2 +11,1 @@ function checkParams(params, allUndefined) { | ||
} | ||
exports.checkParams = checkParams; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.checkThrowMissingParams = void 0; | ||
exports.checkThrowMissingParams = checkThrowMissingParams; | ||
const paramsMissError_1 = require("./paramsMissError"); | ||
@@ -10,2 +10,1 @@ function checkThrowMissingParams(paramValues, paramNames, allUndefined) { | ||
} | ||
exports.checkThrowMissingParams = checkThrowMissingParams; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.checkTwitchUsername = void 0; | ||
exports.checkTwitchUsername = checkTwitchUsername; | ||
const oberknecht_utils_1 = require("oberknecht-utils"); | ||
@@ -9,2 +9,1 @@ const __1 = require(".."); | ||
} | ||
exports.checkTwitchUsername = checkTwitchUsername; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getAccessTokenForRT = void 0; | ||
exports.getAccessTokenForRT = getAccessTokenForRT; | ||
const __1 = require(".."); | ||
@@ -29,2 +29,1 @@ const oberknecht_utils_1 = require("oberknecht-utils"); | ||
} | ||
exports.getAccessTokenForRT = getAccessTokenForRT; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getValidAccessTokenForRT = void 0; | ||
exports.getValidAccessTokenForRT = getValidAccessTokenForRT; | ||
const __1 = require(".."); | ||
@@ -22,2 +22,1 @@ const oberknecht_utils_1 = require("oberknecht-utils"); | ||
} | ||
exports.getValidAccessTokenForRT = getValidAccessTokenForRT; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isdebug = void 0; | ||
exports.isdebug = isdebug; | ||
const __1 = require(".."); | ||
@@ -8,3 +8,2 @@ function isdebug(sym, num) { | ||
} | ||
exports.isdebug = isdebug; | ||
; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.paramsMissError = void 0; | ||
exports.paramsMissError = paramsMissError; | ||
const oberknecht_utils_1 = require("oberknecht-utils"); | ||
@@ -18,2 +18,1 @@ function paramsMissError(paramValues, paramNames, allUndefined) { | ||
} | ||
exports.paramsMissError = paramsMissError; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.validateTokenBR = void 0; | ||
exports.validateTokenBR = validateTokenBR; | ||
const oberknecht_utils_1 = require("oberknecht-utils"); | ||
@@ -57,2 +57,1 @@ const __1 = require(".."); | ||
} | ||
exports.validateTokenBR = validateTokenBR; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.validateTokenWR = void 0; | ||
exports.validateTokenWR = validateTokenWR; | ||
const oberknecht_utils_1 = require("oberknecht-utils"); | ||
@@ -32,2 +32,1 @@ const __1 = require(".."); | ||
} | ||
exports.validateTokenWR = validateTokenWR; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.filechange = void 0; | ||
exports.filechange = filechange; | ||
const __1 = require(".."); | ||
@@ -32,3 +32,2 @@ const _log_1 = require("../functions/_log"); | ||
} | ||
exports.filechange = filechange; | ||
; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._getuser = void 0; | ||
exports._getuser = _getuser; | ||
const __1 = require(".."); | ||
@@ -42,2 +42,1 @@ const _getUsers_1 = require("../endpoints/_getUsers"); | ||
} | ||
exports._getuser = _getuser; |
import { userEntry } from "./endpoints/_getUsers"; | ||
export declare type ids = Record<string, string>; | ||
export declare type logins = Record<string, string>; | ||
export declare type details = Record<string, userEntry>; | ||
export declare type _getUsersResponse = { | ||
export type ids = Record<string, string>; | ||
export type logins = Record<string, string>; | ||
export type details = Record<string, userEntry>; | ||
export type _getUsersResponse = { | ||
ids: ids; | ||
@@ -7,0 +7,0 @@ logins: logins; |
export declare const userTypes: string[]; | ||
export declare type userTypesType = typeof userTypes[number]; | ||
export type userTypesType = typeof userTypes[number]; | ||
export declare const broadcasterTypes: string[]; | ||
export declare type broadcasterTypesType = typeof broadcasterTypes[number]; | ||
export declare type loginsEntry = { | ||
export type broadcasterTypesType = typeof broadcasterTypes[number]; | ||
export type loginsEntry = { | ||
[key: string]: string; | ||
}; | ||
export declare type idsEntry = { | ||
export type idsEntry = { | ||
[key: string]: string; | ||
}; | ||
export declare type detailsEntry = { | ||
export type detailsEntry = { | ||
[key: string]: userEntry; | ||
}; | ||
export declare type getUsersResolveType = { | ||
export type getUsersResolveType = { | ||
logins: loginsEntry; | ||
@@ -20,3 +20,3 @@ ids: idsEntry; | ||
}; | ||
export declare type userEntry = { | ||
export type userEntry = { | ||
id: string; | ||
@@ -36,4 +36,4 @@ login: string; | ||
}; | ||
export declare type getUsersResponse = { | ||
export type getUsersResponse = { | ||
data: Array<userEntry>; | ||
}; |
export declare const announcementColors: readonly ["blue", "green", "orange", "purple", "primary"]; | ||
export declare type announcementColorsType = typeof announcementColors[number]; | ||
export type announcementColorsType = typeof announcementColors[number]; |
@@ -1,2 +0,2 @@ | ||
export declare type banEntry = { | ||
export type banEntry = { | ||
broadcaster_id: string; | ||
@@ -8,4 +8,4 @@ moderator_id: string; | ||
}; | ||
export declare type banResponse = { | ||
export type banResponse = { | ||
data: Array<banEntry>; | ||
}; |
export declare const chatSettingsKeys: readonly ["emote_mode", "follower_mode", "follower_mode_duration", "non_moderator_chat_delay", "non_moderator_chat_delay_duration", "slow_mode", "slow_mode_wait_time", "subscriber_mode", "unique_chat_mode"]; | ||
export declare type chatSettingKeyType = typeof chatSettingsKeys[number]; | ||
export declare type chatSettingEntry = { | ||
export type chatSettingKeyType = typeof chatSettingsKeys[number]; | ||
export type chatSettingEntry = { | ||
broadcaster_id?: string; | ||
@@ -15,6 +15,6 @@ slow_mode?: boolean; | ||
}; | ||
export declare type chatSettingsResponse = { | ||
export type chatSettingsResponse = { | ||
data: Array<chatSettingEntry>; | ||
}; | ||
export declare type getChatSettingsResponse = chatSettingsResponse; | ||
export declare type updateChatSettingsResponse = chatSettingsResponse; | ||
export type getChatSettingsResponse = chatSettingsResponse; | ||
export type updateChatSettingsResponse = chatSettingsResponse; |
export declare const colors: readonly ["blue", "blue_violet", "cadet_blue", "chocolate", "coral", "dodger_blue", "firebrick", "golden_rod", "green", "hot_pink", "orange_red", "red", "sea_green", "spring_green", "yellow_green"]; | ||
export declare type colorsType = typeof colors[number] | string; | ||
export declare type colorEntry = { | ||
export type colorsType = typeof colors[number] | string; | ||
export type colorEntry = { | ||
user_id: string; | ||
@@ -9,4 +9,4 @@ user_name: string; | ||
}; | ||
export declare type getColorResponse = { | ||
export type getColorResponse = { | ||
data: Array<colorEntry>; | ||
}; |
@@ -1,7 +0,7 @@ | ||
export declare type createClipEntry = { | ||
export type createClipEntry = { | ||
id: string; | ||
edit_url: string; | ||
}; | ||
export declare type createClipResponse = { | ||
export type createClipResponse = { | ||
data: [createClipEntry]; | ||
}; |
export declare const eventsubSubscriptionStatus: readonly ["enabled", "webhook_callback_verification_pending", "webhook_callback_verification_failed", "notification_failures_exceeded", "authorization_revoked", "moderator_removed", "user_removed", "version_removed", "websocket_disconnected", "websocket_failed_ping_pong", "websocket_received_inbound_traffic", "websocket_connection_unused", "websocket_internal_error", "websocket_network_timeout", "websocket_network_error"]; | ||
export declare type eventsubSubscriptionStatusType = typeof eventsubSubscriptionStatus[number]; | ||
export type eventsubSubscriptionStatusType = typeof eventsubSubscriptionStatus[number]; | ||
export declare const eventsubSubscriptionTransportMethods: readonly ["webhook", "websocket"]; | ||
export declare type eventsubSubscriptionTransportMethodType = typeof eventsubSubscriptionTransportMethods[number]; | ||
export type eventsubSubscriptionTransportMethodType = typeof eventsubSubscriptionTransportMethods[number]; | ||
export declare const eventsubSubscriptionTypes: readonly ["channel.update", "channel.follow", "channel.subscribe", "channel.subscription.end", "channel.subscription.gift", "channel.subscription.message", "channel.cheer", "channel.raid", "channel.ban", "channel.unban", "channel.moderator.add", "channel.moderator.remove", "channel.guest_star_session.begin", "channel.guest_star_session.end", "channel.guest_star_guest.update", "channel.guest_star_slot.update", "channel.guest_star_settings.update", "channel.channel_points_custom_reward.add", "channel.channel_points_custom_reward.update", "channel.channel_points_custom_reward.remove", "channel.channel_points_custom_reward_redemption.add", "channel.channel_points_custom_reward_redemption.update", "channel.poll.begin", "channel.poll.progress", "channel.poll.end", "channel.prediction.begin", "channel.prediction.progress", "channel.prediction.lock", "channel.prediction.end", "channel.charity_campaign.donate", "channel.charity_campaign.start", "channel.charity_campaign.progress", "channel.charity_campaign.stop", "drop.entitlement.grant", "extension.bits_transaction.create", "channel.goal.begin", "channel.goal.progress", "channel.goal.end", "channel.hype_train.begin", "channel.hype_train.progress", "channel.hype_train.end", "channel.shield_mode.begin", "channel.shield_mode.end", "channel.shoutout.create", "channel.shoutout.receive", "stream.online", "stream.offline", "user.authorization.grant", "user.authorization.revoke", "user.update"]; | ||
export declare type eventsubSubscriptionTypesType = typeof eventsubSubscriptionTypes[number]; | ||
export type eventsubSubscriptionTypesType = typeof eventsubSubscriptionTypes[number]; | ||
export declare const eventsubSubscriptionVersions: readonly ["1", "2", "beta"]; | ||
export declare type eventsubSubscriptionVersionType = typeof eventsubSubscriptionVersions[number]; | ||
export declare type eventsubSubscriptionEntry = { | ||
export type eventsubSubscriptionVersionType = typeof eventsubSubscriptionVersions[number]; | ||
export type eventsubSubscriptionEntry = { | ||
id: string; | ||
@@ -21,3 +21,3 @@ status: eventsubSubscriptionStatusType; | ||
}; | ||
export declare type getEventsubSubscriptionsResponse = { | ||
export type getEventsubSubscriptionsResponse = { | ||
total: number; | ||
@@ -29,2 +29,2 @@ data: Array<eventsubSubscriptionEntry>; | ||
}; | ||
export declare type addEventsubSubscription = getEventsubSubscriptionsResponse; | ||
export type addEventsubSubscription = getEventsubSubscriptionsResponse; |
import { subscriptionTiersType } from "./subscription.tier"; | ||
export declare type getBroadcasterSubscriptionEntry = { | ||
export type getBroadcasterSubscriptionEntry = { | ||
broadcaster_id: string; | ||
@@ -16,3 +16,3 @@ broadcaster_login: string; | ||
}; | ||
export declare type getBroadcasterSubscriptionsResponse = { | ||
export type getBroadcasterSubscriptionsResponse = { | ||
data: Array<getBroadcasterSubscriptionEntry>; | ||
@@ -19,0 +19,0 @@ pagination: { |
@@ -1,2 +0,2 @@ | ||
export declare type channelFollowerEntry = { | ||
export type channelFollowerEntry = { | ||
user_id: string; | ||
@@ -7,3 +7,3 @@ user_name: string; | ||
}; | ||
export declare type channelFollowersResponse = { | ||
export type channelFollowersResponse = { | ||
total: number; | ||
@@ -10,0 +10,0 @@ data: Array<channelFollowerEntry>; |
@@ -1,2 +0,2 @@ | ||
export declare type channelModeratorEntry = { | ||
export type channelModeratorEntry = { | ||
user_id: string; | ||
@@ -6,3 +6,3 @@ user_name: string; | ||
}; | ||
export declare type channelModeratorsResponse = { | ||
export type channelModeratorsResponse = { | ||
total: number; | ||
@@ -9,0 +9,0 @@ data: Array<channelModeratorEntry>; |
import { streamLanguagesType } from "./getStreams"; | ||
export declare type channelEntry = { | ||
export type channelEntry = { | ||
broadcaster_id: string; | ||
@@ -13,4 +13,4 @@ broadcaster_login: string; | ||
}; | ||
export declare type getChannelsResponse = { | ||
export type getChannelsResponse = { | ||
data: Array<channelEntry>; | ||
}; |
@@ -1,2 +0,2 @@ | ||
export declare type clipEntry = { | ||
export type clipEntry = { | ||
id: string; | ||
@@ -19,4 +19,4 @@ url: string; | ||
}; | ||
export declare type getClipsResponse = { | ||
export type getClipsResponse = { | ||
data: clipEntry[]; | ||
}; |
@@ -1,2 +0,2 @@ | ||
export declare type followedChannelEntry = { | ||
export type followedChannelEntry = { | ||
broadcaster_id: string; | ||
@@ -7,3 +7,3 @@ broadcaster_login: string; | ||
}; | ||
export declare type getFollowedChannelsResponse = { | ||
export type getFollowedChannelsResponse = { | ||
total: number; | ||
@@ -10,0 +10,0 @@ data: followedChannelEntry[]; |
@@ -1,2 +0,2 @@ | ||
export declare type gameEntry = { | ||
export type gameEntry = { | ||
id: string; | ||
@@ -7,3 +7,3 @@ name: string; | ||
}; | ||
export declare type getGamesResponse = { | ||
export type getGamesResponse = { | ||
data: Array<gameEntry>; | ||
@@ -10,0 +10,0 @@ pagination: { |
@@ -1,2 +0,2 @@ | ||
export declare type moderatedChannelEntry = { | ||
export type moderatedChannelEntry = { | ||
broadcaster_id: string; | ||
@@ -6,3 +6,3 @@ broadcaster_login: string; | ||
}; | ||
export declare type getModeratedChannelsResponse = { | ||
export type getModeratedChannelsResponse = { | ||
data: moderatedChannelEntry[]; | ||
@@ -9,0 +9,0 @@ pagination: { |
@@ -1,5 +0,5 @@ | ||
export declare type streamLanguagesType = string; | ||
export type streamLanguagesType = string; | ||
export declare const streamTypes: string[]; | ||
export declare type streamTypesType = typeof streamTypes[number]; | ||
export declare type getStreamsFiltersType = { | ||
export type streamTypesType = typeof streamTypes[number]; | ||
export type getStreamsFiltersType = { | ||
user_id?: string[]; | ||
@@ -14,3 +14,3 @@ user_login?: string[]; | ||
}; | ||
export declare type streamEntry = { | ||
export type streamEntry = { | ||
id: string; | ||
@@ -32,3 +32,3 @@ user_id: string; | ||
}; | ||
export declare type getStreamsResponse = { | ||
export type getStreamsResponse = { | ||
data: Array<streamEntry>; | ||
@@ -35,0 +35,0 @@ pagination: { |
export declare const pollStatus: readonly ["TERMINATED", "ARCHIVED"]; | ||
export declare type pollStatusType = typeof pollStatus[number]; | ||
export type pollStatusType = typeof pollStatus[number]; | ||
export declare const pollChoiceStatus: readonly ["ACTIVE", "COMPLETED", "TERMINATED", "ARCHIVED", "MODERATED", "INVALID"]; | ||
export declare type pollChoiceStatusType = typeof pollChoiceStatus[number]; | ||
export declare type choiceEntry = { | ||
export type pollChoiceStatusType = typeof pollChoiceStatus[number]; | ||
export type choiceEntry = { | ||
title: string; | ||
}; | ||
export declare type choices = Array<choiceEntry>; | ||
export declare type pollEntry = { | ||
export type choices = Array<choiceEntry>; | ||
export type pollEntry = { | ||
id: string; | ||
@@ -24,3 +24,3 @@ broadcaster_id: string; | ||
}; | ||
export declare type pollResponseChoice = { | ||
export type pollResponseChoice = { | ||
id: string; | ||
@@ -32,9 +32,9 @@ title: string; | ||
}; | ||
export declare type endPollResponse = { | ||
export type endPollResponse = { | ||
data: Array<pollEntry>; | ||
}; | ||
export declare type createPollResponse = { | ||
export type createPollResponse = { | ||
data: Array<pollEntry>; | ||
}; | ||
export declare type getPollResponse = { | ||
export type getPollResponse = { | ||
data: Array<pollEntry>; | ||
@@ -41,0 +41,0 @@ pagination: {} | { |
export declare const predictionStatus: readonly ["ACTIVE", "CANCELED", "LOCKED", "RESOLVED"]; | ||
export declare type predictionStatusType = typeof predictionStatus[number]; | ||
export type predictionStatusType = typeof predictionStatus[number]; | ||
export declare const endPredictionStatus: readonly ["RESOLVED", "CANCELED", "LOCKED"]; | ||
export declare type endPredictionStatusType = typeof endPredictionStatus[number]; | ||
export declare type predictionPredictorEntry = { | ||
export type endPredictionStatusType = typeof endPredictionStatus[number]; | ||
export type predictionPredictorEntry = { | ||
user_id: string; | ||
@@ -12,3 +12,3 @@ user_name: string; | ||
}; | ||
export declare type predictionOutcomeEntry = { | ||
export type predictionOutcomeEntry = { | ||
id: string; | ||
@@ -21,7 +21,7 @@ title: string; | ||
}; | ||
export declare type createPredictionOutcomeEntry = { | ||
export type createPredictionOutcomeEntry = { | ||
title: string; | ||
}; | ||
export declare type createPredictionOutcomesType = Array<createPredictionOutcomeEntry>; | ||
export declare type predictionEntry = { | ||
export type createPredictionOutcomesType = Array<createPredictionOutcomeEntry>; | ||
export type predictionEntry = { | ||
id: string; | ||
@@ -40,3 +40,3 @@ broadcaster_id: string; | ||
}; | ||
export declare type getPredictionResponse = { | ||
export type getPredictionResponse = { | ||
data: Array<predictionEntry>; | ||
@@ -47,5 +47,5 @@ pagination: { | ||
}; | ||
export declare type createPredictionResponse = { | ||
export type createPredictionResponse = { | ||
data: Array<predictionEntry>; | ||
}; | ||
export declare type endPredictionResponse = createPredictionResponse; | ||
export type endPredictionResponse = createPredictionResponse; |
@@ -1,7 +0,7 @@ | ||
export declare type raidEntry = { | ||
export type raidEntry = { | ||
created_at: string; | ||
is_mature: boolean; | ||
}; | ||
export declare type raidResponse = { | ||
export type raidResponse = { | ||
data: Array<raidEntry>; | ||
}; |
import { validateTokenResponse } from "./validateToken"; | ||
export declare type refreshRefreshTokenResponse = validateTokenResponse & { | ||
export type refreshRefreshTokenResponse = validateTokenResponse & { | ||
refreshToken: string; | ||
accessToken: string; | ||
}; |
@@ -1,1 +0,1 @@ | ||
export declare type streamLanguagesType = string; | ||
export type streamLanguagesType = string; |
export declare const subscriptionTiers: string[]; | ||
export declare type subscriptionTiersType = typeof subscriptionTiers[number]; | ||
export type subscriptionTiersType = typeof subscriptionTiers[number]; |
@@ -1,2 +0,2 @@ | ||
export declare type channelData = { | ||
export type channelData = { | ||
game_id: string; | ||
@@ -3,0 +3,0 @@ broadcaster_language: string; |
import { validateTokenResponse } from "./validateToken"; | ||
export declare type validateRefreshTokenCodeResponse = { | ||
export type validateRefreshTokenCodeResponse = { | ||
accessToken: string; | ||
@@ -9,9 +9,9 @@ refreshToken: string; | ||
}; | ||
declare type refreshTokenData = { | ||
type refreshTokenData = { | ||
expiresAt: number; | ||
clientID: string; | ||
}; | ||
export declare type refreshAccessTokenDataType = validateTokenResponse & { | ||
export type refreshAccessTokenDataType = validateTokenResponse & { | ||
refreshToken: string; | ||
}; | ||
export {}; |
export declare const scopes: string[]; | ||
export declare type scopesType = typeof scopes[number]; | ||
export declare type validateTokenResponseOld = { | ||
export type scopesType = typeof scopes[number]; | ||
export type validateTokenResponseOld = { | ||
client_id: string; | ||
@@ -11,3 +11,3 @@ login: string; | ||
}; | ||
export declare type validateTokenResponse = { | ||
export type validateTokenResponse = { | ||
clientID: string; | ||
@@ -14,0 +14,0 @@ userLogin: string; |
import { validateTokenBRType } from "./validateTokenBR"; | ||
export declare type getAccessTokenForBRType = validateTokenBRType; | ||
export type getAccessTokenForBRType = validateTokenBRType; |
import { jsonsplitteroptions } from "oberknecht-jsonsplitter/lib-ts/types/jsonsplitter.options"; | ||
declare type clientIDType = string; | ||
declare type clientSecretType = string; | ||
export declare type oberknechtAPIOptionsType = { | ||
type clientIDType = string; | ||
type clientSecretType = string; | ||
export type oberknechtAPIOptionsType = { | ||
token?: string; | ||
@@ -6,0 +6,0 @@ refreshToken?: string; |
import { validateTokenResponse } from "./endpoints/validateToken"; | ||
export declare type validateTokenBRType = validateTokenResponse & { | ||
export type validateTokenBRType = validateTokenResponse & { | ||
refreshToken?: string; | ||
accessToken: string; | ||
}; |
import { validateTokenResponse } from "./endpoints/validateToken"; | ||
export declare type validateTokenWRType = validateTokenResponse & { | ||
export type validateTokenWRType = validateTokenResponse & { | ||
refreshToken?: string; | ||
}; |
@@ -103,2 +103,3 @@ export declare class urls { | ||
method: string; | ||
code: number; | ||
}; | ||
@@ -160,2 +161,12 @@ getBroadcasterSubscriptions: { | ||
}; | ||
conduits: { | ||
new (): {}; | ||
getConduits: { | ||
endpoint: string; | ||
}; | ||
createConduits: { | ||
endpoint: string; | ||
method: string; | ||
}; | ||
}; | ||
}; | ||
@@ -162,0 +173,0 @@ static ivrfitwitch: { |
@@ -118,2 +118,3 @@ "use strict"; | ||
method: "DELETE", | ||
code: 204, | ||
}; | ||
@@ -175,2 +176,11 @@ static getBroadcasterSubscriptions = { | ||
}; | ||
static conduits = class { | ||
static getConduits = { | ||
endpoint: "/eventsub/conduits", | ||
}; | ||
static createConduits = { | ||
endpoint: "/eventsub/conduits", | ||
method: "POST", | ||
}; | ||
}; | ||
}; | ||
@@ -177,0 +187,0 @@ static ivrfitwitch = class { |
@@ -74,2 +74,4 @@ import { i } from "../index"; | ||
import { getValidAccessTokenForRT } from "../functions/getValidAccessTokenForRT"; | ||
import { getConduits } from "../endpoints/conduits/getConduits"; | ||
import { createConduits } from "../endpoints/conduits/createConduits"; | ||
let clientSymNum = 0; | ||
@@ -286,7 +288,7 @@ | ||
return this.tokenSplitter.getKeySync(["accessToken", accessToken]); | ||
} | ||
}; | ||
_validateTokenWR = (accessOrRefreshToken?: string) => { | ||
return validateTokenWR(this.symbol, accessOrRefreshToken); | ||
} | ||
}; | ||
@@ -769,2 +771,12 @@ _revoketoken = (token: string, clientID?: string) => { | ||
}; | ||
// Conduits | ||
getConduits = (customToken?: string) => { | ||
return getConduits(this.symbol, customToken); | ||
}; | ||
createConduits = (shardCount: number, customToken?: string) => { | ||
return createConduits(this.symbol, shardCount, customToken); | ||
}; | ||
} |
@@ -37,3 +37,3 @@ import { request } from "oberknecht-request"; | ||
async (e, r) => { | ||
if (e || r.status !== 200) return reject(Error(e.stack ?? r.data)); | ||
if (e || r.status !== 200) return reject(Error(e?.stack ?? r?.data)); | ||
@@ -40,0 +40,0 @@ let accessToken = r.data.access_token; |
@@ -35,3 +35,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "revokeToken")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -38,0 +38,0 @@ return resolve(); |
@@ -39,3 +39,3 @@ import { request } from "oberknecht-request"; | ||
(e, r) => { | ||
if (e || r.status !== 200) return reject(Error(e.stack ?? r.data)); | ||
if (e || r.status !== 200) return reject(Error(e?.stack ?? r?.data)); | ||
@@ -42,0 +42,0 @@ let tokenData = r.data; |
@@ -45,3 +45,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "eventsubSubscriptions")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -48,0 +48,0 @@ return resolve(r.data); |
@@ -54,3 +54,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "announce")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -57,0 +57,0 @@ return resolve(); |
@@ -61,3 +61,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "bans")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -64,0 +64,0 @@ return resolve(r.data); |
@@ -44,3 +44,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "cancelRaid")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -47,0 +47,0 @@ return resolve(); |
@@ -45,3 +45,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "createClip")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -48,0 +48,0 @@ return resolve(r.data); |
@@ -55,3 +55,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "createPoll")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -58,0 +58,0 @@ return resolve(r.data); |
@@ -48,3 +48,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "createPrediction")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -51,0 +51,0 @@ return resolve(r.data); |
@@ -35,3 +35,3 @@ import { request } from "oberknecht-request"; | ||
) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -38,0 +38,0 @@ return resolve(); |
@@ -43,3 +43,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "deleteMessage")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -46,0 +46,0 @@ return resolve(); |
@@ -39,3 +39,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "endPoll")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -42,0 +42,0 @@ return resolve(r.data); |
@@ -47,3 +47,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "endPrediction")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -50,0 +50,0 @@ return resolve(r.data); |
@@ -51,3 +51,3 @@ import { request } from "oberknecht-request"; | ||
) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -54,0 +54,0 @@ return resolve(r.data); |
@@ -50,3 +50,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "channelFollowers")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -53,0 +53,0 @@ return resolve(r.data); |
@@ -47,3 +47,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "getChannelModerators")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -50,0 +50,0 @@ return resolve(r.data); |
@@ -49,3 +49,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "getChannels")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -52,0 +52,0 @@ return resolve(r.data); |
@@ -43,3 +43,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "getChatSettings")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -46,0 +46,0 @@ return resolve(r.data); |
@@ -79,3 +79,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "getClips")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -82,0 +82,0 @@ return resolve(r.data); |
@@ -53,3 +53,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "getColor")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -56,0 +56,0 @@ return resolve(r.data); |
@@ -31,3 +31,3 @@ import { request } from "oberknecht-request"; | ||
) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -34,0 +34,0 @@ return resolve(r.data); |
@@ -47,3 +47,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "getFollowedChannels")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -50,0 +50,0 @@ return resolve(r.data); |
@@ -44,3 +44,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "getGames")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -47,0 +47,0 @@ return resolve(r.data); |
@@ -37,3 +37,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "getModeratedChannels")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -40,0 +40,0 @@ return resolve(r.data); |
@@ -38,3 +38,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "getPolls")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -41,0 +41,0 @@ return resolve(r.data); |
@@ -44,3 +44,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "getPredictions")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -47,0 +47,0 @@ return resolve(r.data); |
@@ -42,3 +42,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "getStreams")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -45,0 +45,0 @@ if (i.apiclientData[sym]?._options?.saveIDs) { |
@@ -50,3 +50,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "mod")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -53,0 +53,0 @@ return resolve(); |
@@ -55,3 +55,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "raid")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -58,0 +58,0 @@ return resolve(r.data); |
@@ -52,3 +52,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "shoutout")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -55,0 +55,0 @@ return resolve(); |
@@ -51,3 +51,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "unban")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -54,0 +54,0 @@ return resolve(); |
@@ -50,3 +50,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "unmod")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -53,0 +53,0 @@ return resolve(); |
@@ -50,3 +50,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "unvip")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -53,0 +53,0 @@ return resolve(); |
@@ -47,3 +47,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "updateChannel")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -50,0 +50,0 @@ return resolve(); |
@@ -91,3 +91,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "updateChatSettings")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -94,0 +94,0 @@ return resolve(r.data); |
@@ -34,3 +34,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "updateColor")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -37,0 +37,0 @@ return resolve(); |
@@ -45,3 +45,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "vip")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -48,0 +48,0 @@ return resolve(); |
@@ -48,3 +48,3 @@ import { request } from "oberknecht-request"; | ||
if (e || r.status !== urls._code("twitch", "whisper")) | ||
return reject(Error(e.stack ?? r.data)); | ||
return reject(Error(e?.stack ?? r?.data)); | ||
@@ -51,0 +51,0 @@ return resolve(); |
@@ -145,2 +145,3 @@ import { i } from ".."; | ||
method: "DELETE", | ||
code: 204, | ||
}; | ||
@@ -217,2 +218,13 @@ | ||
}; | ||
static conduits = class { | ||
static getConduits = { | ||
endpoint: "/eventsub/conduits", | ||
}; | ||
static createConduits = { | ||
endpoint: "/eventsub/conduits", | ||
method: "POST", | ||
}; | ||
}; | ||
}; | ||
@@ -219,0 +231,0 @@ |
{ | ||
"name": "oberknecht-api", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "A client for easy usage of the Twitch API (Helix)", | ||
@@ -5,0 +5,0 @@ "main": "./export", |
360217
305
8324