From e9521af29aa921a19c837da0f38d7455af275aa7 Mon Sep 17 00:00:00 2001 From: Rim Date: Sat, 19 Apr 2025 22:55:11 -0400 Subject: [PATCH] fix(index.ts): fix syntax errors for source mapping --- package.json | 1 + src/js/index.d.ts | 255 ++--- src/js/index.js | 2359 ++++++++++++++++--------------------------- src/js/index.js.map | 1 + src/js/index.ts | 35 +- tsconfig.json | 22 + 6 files changed, 1026 insertions(+), 1647 deletions(-) create mode 100644 src/js/index.js.map create mode 100644 tsconfig.json diff --git a/package.json b/package.json index 4579733..8842825 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "build:linux64": "pkg . --targets node18-linux-x64 --experimental-modules --output dist/codtrackerjs-aio-linux-amd64", "start": "node app.js", "prettify": "prettier --write .", + "map": "tsc", "lint": "eslint --no-config-lookup .", "lint:fix": "eslint --no-config-lookup . --fix", "dev": "nodemon app.js" diff --git a/src/js/index.d.ts b/src/js/index.d.ts index 2277113..619c464 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -1,181 +1,123 @@ declare enum platforms { - All = 'all', - Activision = 'acti', - Battlenet = 'battle', - PSN = 'psn', - Steam = 'steam', - Uno = 'uno', - XBOX = 'xbl', - ios = 'ios', - NULL = '_', + All = "all", + Activision = "acti", + Battlenet = "battle", + PSN = "psn", + Steam = "steam", + Uno = "uno", + XBOX = "xbl", + ios = "ios", + NULL = "_" } declare enum games { - ModernWarfare = 'mw', - ModernWarfare2 = 'mw2', - Vanguard = 'vg', - ColdWar = 'cw', - NULL = '_', + ModernWarfare = "mw", + ModernWarfare2 = "mw2", + Vanguard = "vg", + ColdWar = "cw", + NULL = "_" } declare enum friendActions { - Invite = 'invite', - Uninvite = 'uninvite', - Remove = 'remove', - Block = 'block', - Unblock = 'unblock', + Invite = "invite", + Uninvite = "uninvite", + Remove = "remove", + Block = "block", + Unblock = "unblock" } declare const enableDebugMode: () => boolean; declare const disableDebugMode: () => boolean; declare const login: (ssoToken: string) => boolean; -declare const telescopeLogin: ( - username: string, - password: string -) => Promise; +declare const telescopeLogin: (username: string, password: string) => Promise; declare class WZ { - fullData: (gamertag: string, platform: platforms) => Promise; - combatHistory: (gamertag: string, platform: platforms) => Promise; - combatHistoryWithDate: ( - gamertag: string, - startTime: number, - endTime: number, - platform: platforms - ) => Promise; - breakdown: (gamertag: string, platform: platforms) => Promise; - breakdownWithDate: ( - gamertag: string, - startTime: number, - endTime: number, - platform: platforms - ) => Promise; - matchInfo: (matchId: string, platform: platforms) => Promise; - cleanGameMode: (mode: string) => Promise; + fullData: (gamertag: string, platform: platforms) => Promise; + combatHistory: (gamertag: string, platform: platforms) => Promise; + combatHistoryWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise; + breakdown: (gamertag: string, platform: platforms) => Promise; + breakdownWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise; + matchInfo: (matchId: string, platform: platforms) => Promise; + cleanGameMode: (mode: string) => Promise; } declare class MW { - fullData: (gamertag: string, platform: platforms) => Promise; - combatHistory: (gamertag: string, platform: platforms) => Promise; - combatHistoryWithDate: ( - gamertag: string, - startTime: number, - endTime: number, - platform: platforms - ) => Promise; - breakdown: (gamertag: string, platform: platforms) => Promise; - breakdownWithDate: ( - gamertag: string, - startTime: number, - endTime: number, - platform: platforms - ) => Promise; - matchInfo: (matchId: string, platform: platforms) => Promise; - matchHeatMap: (matchId: string, platform: platforms) => Promise; - seasonloot: (gamertag: string, platform: platforms) => Promise; - bpProg: (gamertag: string, platform: platforms) => Promise; - bundleInfo: (gamertag: string, platform: platforms) => Promise; - mapList: (platform: platforms) => Promise; - communityMapDataForMapMode: ( - mapId: string, - gamemode: string, - platform: platforms - ) => Promise; + fullData: (gamertag: string, platform: platforms) => Promise; + combatHistory: (gamertag: string, platform: platforms) => Promise; + combatHistoryWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise; + breakdown: (gamertag: string, platform: platforms) => Promise; + breakdownWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise; + matchInfo: (matchId: string, platform: platforms) => Promise; + matchHeatMap: (matchId: string, platform: platforms) => Promise; + seasonloot: (gamertag: string, platform: platforms) => Promise; + bpProg: (gamertag: string, platform: platforms) => Promise; + bundleInfo: (gamertag: string, platform: platforms) => Promise; + mapList: (platform: platforms) => Promise; + communityMapDataForMapMode: (mapId: string, gamemode: string, platform: platforms) => Promise; } declare class MW2 { - fullData: (unoId: string) => Promise; - matches: (unoId: string) => Promise; - matchInfo: (unoId: string, matchId: string) => Promise; + fullData: (unoId: string) => Promise; + matches: (unoId: string) => Promise; + matchInfo: (unoId: string, matchId: string) => Promise; } declare class WZ2 { - fullData: (unoId: string) => Promise; - matches: (unoId: string) => Promise; - matchInfo: (unoId: string, matchId: string) => Promise; + fullData: (unoId: string) => Promise; + matches: (unoId: string) => Promise; + matchInfo: (unoId: string, matchId: string) => Promise; } declare class MW3 { - fullData: (unoId: string) => Promise; - matches: (unoId: string) => Promise; - matchInfo: (unoId: string, matchId: string) => Promise; + fullData: (unoId: string) => Promise; + matches: (unoId: string) => Promise; + matchInfo: (unoId: string, matchId: string) => Promise; } declare class WZM { - fullData: (unoId: string) => Promise; - matches: (unoId: string) => Promise; - matchInfo: (unoId: string, matchId: string) => Promise; + fullData: (unoId: string) => Promise; + matches: (unoId: string) => Promise; + matchInfo: (unoId: string, matchId: string) => Promise; } declare class CW { - fullData: (gamertag: string, platform: platforms) => Promise; - combatHistory: (gamertag: string, platform: platforms) => Promise; - combatHistoryWithDate: ( - gamertag: string, - startTime: number, - endTime: number, - platform: platforms - ) => Promise; - breakdown: (gamertag: string, platform: platforms) => Promise; - breakdownWithDate: ( - gamertag: string, - startTime: number, - endTime: number, - platform: platforms - ) => Promise; - seasonloot: (gamertag: string, platform: platforms) => Promise; - bpProg: (gamertag: string, platform: platforms) => Promise; - bundleInfo: (gamertag: string, platform: platforms) => Promise; - mapList: (platform: platforms) => Promise; - matchInfo: (matchId: string, platform: platforms) => Promise; - matchHeatMap: (matchId: string, platform: platforms) => Promise; + fullData: (gamertag: string, platform: platforms) => Promise; + combatHistory: (gamertag: string, platform: platforms) => Promise; + combatHistoryWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise; + breakdown: (gamertag: string, platform: platforms) => Promise; + breakdownWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise; + seasonloot: (gamertag: string, platform: platforms) => Promise; + bpProg: (gamertag: string, platform: platforms) => Promise; + bundleInfo: (gamertag: string, platform: platforms) => Promise; + mapList: (platform: platforms) => Promise; + matchInfo: (matchId: string, platform: platforms) => Promise; + matchHeatMap: (matchId: string, platform: platforms) => Promise; } declare class VG { - fullData: (gamertag: string, platform: platforms) => Promise; - combatHistory: (gamertag: string, platform: platforms) => Promise; - combatHistoryWithDate: ( - gamertag: string, - startTime: number, - endTime: number, - platform: platforms - ) => Promise; - breakdown: (gamertag: string, platform: platforms) => Promise; - breakdownWithDate: ( - gamertag: string, - startTime: number, - endTime: number, - platform: platforms - ) => Promise; - seasonloot: (gamertag: string, platform: platforms) => Promise; - bpProg: (gamertag: string, platform: platforms) => Promise; - bundleInfo: (gamertag: string, platform: platforms) => Promise; - mapList: (platform: platforms) => Promise; - matchInfo: (matchId: string, platform: platforms) => Promise; - matchHeatMap: (matchId: string, platform: platforms) => Promise; + fullData: (gamertag: string, platform: platforms) => Promise; + combatHistory: (gamertag: string, platform: platforms) => Promise; + combatHistoryWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise; + breakdown: (gamertag: string, platform: platforms) => Promise; + breakdownWithDate: (gamertag: string, startTime: number, endTime: number, platform: platforms) => Promise; + seasonloot: (gamertag: string, platform: platforms) => Promise; + bpProg: (gamertag: string, platform: platforms) => Promise; + bundleInfo: (gamertag: string, platform: platforms) => Promise; + mapList: (platform: platforms) => Promise; + matchInfo: (matchId: string, platform: platforms) => Promise; + matchHeatMap: (matchId: string, platform: platforms) => Promise; } declare class SHOP { - purchasableItems: (gameId: string) => Promise; - bundleInformation: (title: string, bundleId: string) => Promise; - battlePassLoot: ( - title: games, - season: number, - platform: platforms - ) => Promise; + purchasableItems: (gameId: string) => Promise; + bundleInformation: (title: string, bundleId: string) => Promise; + battlePassLoot: (title: games, season: number, platform: platforms) => Promise; } declare class USER { - friendFeed: (gamertag: string, platform: platforms) => Promise; - eventFeed: () => Promise; - loggedInIdentities: () => Promise; - codPoints: (gamertag: string, platform: platforms) => Promise; - connectedAccounts: ( - gamertag: string, - platform: platforms - ) => Promise; - settings: (gamertag: string, platform: platforms) => Promise; - friendAction: ( - gamertag: string, - platform: platforms, - action: friendActions - ) => Promise; - userInfo: () => Promise; + friendFeed: (gamertag: string, platform: platforms) => Promise; + eventFeed: () => Promise; + loggedInIdentities: () => Promise; + userInfo: () => Promise; + codPoints: (gamertag: string, platform: platforms) => Promise; + connectedAccounts: (gamertag: string, platform: platforms) => Promise; + settings: (gamertag: string, platform: platforms) => Promise; + friendAction: (gamertag: string, platform: platforms, action: friendActions) => Promise; } declare class DB { - accolades: () => Promise; - allCDNData: () => Promise; + accolades: () => Promise; + allCDNData: () => Promise; } declare class ALT { - search: (gamertag: string, platform: platforms) => Promise; - cleanWeapon: (weapon: string) => Promise; + search: (gamertag: string, platform: platforms) => Promise; + cleanWeapon: (weapon: string) => Promise; } declare const Warzone: WZ; declare const ModernWarfare: MW; @@ -189,23 +131,4 @@ declare const Store: SHOP; declare const Me: USER; declare const CDN: DB; declare const Misc: ALT; -export { - login, - telescopeLogin, - platforms, - friendActions, - Warzone, - ModernWarfare, - ModernWarfare2, - ModernWarfare3, - WarzoneMobile, - Warzone2, - ColdWar, - Vanguard, - Store, - Me, - CDN, - Misc, - enableDebugMode, - disableDebugMode, -}; +export { CDN, ColdWar, disableDebugMode, enableDebugMode, friendActions, login, Me, Misc, ModernWarfare, ModernWarfare2, ModernWarfare3, platforms, Store, telescopeLogin, Vanguard, Warzone, Warzone2, WarzoneMobile, }; diff --git a/src/js/index.js b/src/js/index.js index 6ee9c48..bffc553 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -1,58 +1,35 @@ -'use strict'; -Object.defineProperty(exports, '__esModule', { value: true }); -exports.disableDebugMode = - exports.enableDebugMode = - exports.Misc = - exports.Me = - exports.Store = - exports.Vanguard = - exports.ColdWar = - exports.Warzone2 = - exports.WarzoneMobile = - exports.ModernWarfare3 = - exports.ModernWarfare2 = - exports.ModernWarfare = - exports.Warzone = - exports.friendActions = - exports.platforms = - exports.telescopeLogin = - exports.login = - void 0; -const tslib_1 = require('tslib'); -const undici_1 = require('undici'); -const weapon_ids_json_1 = tslib_1.__importDefault( - require('../data/weapon-ids.json') -); -const game_modes_json_1 = tslib_1.__importDefault( - require('../data/game-modes.json') -); -const userAgent = - 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36'; +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WarzoneMobile = exports.Warzone2 = exports.Warzone = exports.Vanguard = exports.telescopeLogin = exports.Store = exports.platforms = exports.ModernWarfare3 = exports.ModernWarfare2 = exports.ModernWarfare = exports.Misc = exports.Me = exports.login = exports.friendActions = exports.enableDebugMode = exports.disableDebugMode = exports.ColdWar = exports.CDN = void 0; +const tslib_1 = require("tslib"); +const undici_1 = require("undici"); +const game_modes_json_1 = tslib_1.__importDefault(require("../data/game-modes.json")); +const weapon_ids_json_1 = tslib_1.__importDefault(require("../data/weapon-ids.json")); +const userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36'; let baseCookie = 'new_SiteId=cod;ACT_SSO_LOCALE=en_US;country=US;'; let baseSsoToken = ''; let debugMode = false; let baseHeaders = { - 'content-type': 'application/json', - cookie: baseCookie, - 'user-agent': userAgent, + 'content-type': 'application/json', + cookie: baseCookie, + 'user-agent': userAgent, }; let baseTelescopeHeaders = { - accept: 'application/json, text/plain, */*', - 'accept-language': 'en-GB,en;q=0.9,en-US;q=0.8,fr;q=0.7,nl;q=0.6,et;q=0.5', - 'cache-control': 'no-cache', - pragma: 'no-cache', - 'sec-ch-ua': - '"Chromium";v="118", "Microsoft Edge";v="118", "Not=A?Brand";v="99"', - 'sec-ch-ua-mobile': '?0', - 'sec-ch-ua-platform': '"Windows"', - 'sec-fetch-dest': 'empty', - 'sec-fetch-mode': 'cors', - 'sec-fetch-site': 'same-site', + accept: 'application/json, text/plain, */*', + 'accept-language': 'en-GB,en;q=0.9,en-US;q=0.8,fr;q=0.7,nl;q=0.6,et;q=0.5', + 'cache-control': 'no-cache', + pragma: 'no-cache', + 'sec-ch-ua': '"Chromium";v="118", "Microsoft Edge";v="118", "Not=A?Brand";v="99"', + 'sec-ch-ua-mobile': '?0', + 'sec-ch-ua-platform': '"Windows"', + 'sec-fetch-dest': 'empty', + 'sec-fetch-mode': 'cors', + 'sec-fetch-site': 'same-site', }; let basePostHeaders = { - 'content-type': 'text/plain', - cookie: baseCookie, - 'user-agent': userAgent, + 'content-type': 'text/plain', + cookie: baseCookie, + 'user-agent': userAgent, }; let baseUrl = 'https://profile.callofduty.com'; let baseUrlTrunc = 'https://www.callofduty.com'; @@ -62,1511 +39,951 @@ let apiTelescopePath = '/api/ts-api'; let loggedIn = false; var platforms; (function (platforms) { - platforms['All'] = 'all'; - platforms['Activision'] = 'acti'; - platforms['Battlenet'] = 'battle'; - platforms['PSN'] = 'psn'; - platforms['Steam'] = 'steam'; - platforms['Uno'] = 'uno'; - platforms['XBOX'] = 'xbl'; - platforms['ios'] = 'ios'; - platforms['NULL'] = '_'; -})(platforms || (platforms = {})); -exports.platforms = platforms; + platforms["All"] = "all"; + platforms["Activision"] = "acti"; + platforms["Battlenet"] = "battle"; + platforms["PSN"] = "psn"; + platforms["Steam"] = "steam"; + platforms["Uno"] = "uno"; + platforms["XBOX"] = "xbl"; + platforms["ios"] = "ios"; + platforms["NULL"] = "_"; +})(platforms || (exports.platforms = platforms = {})); var games; (function (games) { - games['ModernWarfare'] = 'mw'; - games['ModernWarfare2'] = 'mw2'; - games['Vanguard'] = 'vg'; - games['ColdWar'] = 'cw'; - games['NULL'] = '_'; + games["ModernWarfare"] = "mw"; + games["ModernWarfare2"] = "mw2"; + games["Vanguard"] = "vg"; + games["ColdWar"] = "cw"; + games["NULL"] = "_"; })(games || (games = {})); var telescopeGames; (function (telescopeGames) { - telescopeGames['ModernWarfare2'] = 'mw2'; - telescopeGames['Warzone2'] = 'wz2'; - telescopeGames['ModernWarfare3'] = 'jup'; - telescopeGames['Mobile'] = 'mgl'; + telescopeGames["ModernWarfare2"] = "mw2"; + telescopeGames["Warzone2"] = "wz2"; + telescopeGames["ModernWarfare3"] = "jup"; + telescopeGames["Mobile"] = "mgl"; })(telescopeGames || (telescopeGames = {})); var modes; (function (modes) { - modes['Multiplayer'] = 'mp'; - modes['Warzone'] = 'wz'; - modes['Warzone2'] = 'wz2'; - modes['NULL'] = '_'; + modes["Multiplayer"] = "mp"; + modes["Warzone"] = "wz"; + modes["Warzone2"] = "wz2"; + modes["NULL"] = "_"; })(modes || (modes = {})); var telescopeModes; (function (telescopeModes) { - telescopeModes['Multiplayer'] = 'mp'; - telescopeModes['Outbreak'] = 'ob'; + telescopeModes["Multiplayer"] = "mp"; + telescopeModes["Outbreak"] = "ob"; })(telescopeModes || (telescopeModes = {})); var friendActions; (function (friendActions) { - friendActions['Invite'] = 'invite'; - friendActions['Uninvite'] = 'uninvite'; - friendActions['Remove'] = 'remove'; - friendActions['Block'] = 'block'; - friendActions['Unblock'] = 'unblock'; -})(friendActions || (friendActions = {})); -exports.friendActions = friendActions; + friendActions["Invite"] = "invite"; + friendActions["Uninvite"] = "uninvite"; + friendActions["Remove"] = "remove"; + friendActions["Block"] = "block"; + friendActions["Unblock"] = "unblock"; +})(friendActions || (exports.friendActions = friendActions = {})); var generics; (function (generics) { - generics['STEAM_UNSUPPORTED'] = - 'Steam platform not supported by this game. Try `battle` instead.'; - generics['UNO_NO_NUMERICAL_ID'] = - "You must use a numerical ID when using the platform 'uno'.\nIf using an Activision ID, please use the platform 'acti'."; + generics["STEAM_UNSUPPORTED"] = "Steam platform not supported by this game. Try `battle` instead."; + generics["UNO_NO_NUMERICAL_ID"] = "You must use a numerical ID when using the platform 'uno'.\nIf using an Activision ID, please use the platform 'acti'."; })(generics || (generics = {})); let telescopeUnoToken = ''; const enableDebugMode = () => (debugMode = true); exports.enableDebugMode = enableDebugMode; const disableDebugMode = () => (debugMode = false); exports.disableDebugMode = disableDebugMode; -const sendTelescopeRequest = (url) => - tslib_1.__awaiter(void 0, void 0, void 0, function* () { +const sendTelescopeRequest = (url) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { try { - if (!loggedIn) throw new Error('Not Logged In!'); - let requestUrl = `${baseTelescopeUrl}${apiTelescopePath}${url}`; - if (debugMode) console.log(`[DEBUG]`, `Request Uri: ${requestUrl}`); - baseTelescopeHeaders.authorization = `Bearer ${telescopeUnoToken}`; - const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { - headers: baseTelescopeHeaders, - }); - if (statusCode >= 500) - throw new Error( - `Received status code: '${statusCode}'. Route may be down or not exist.` - ); - let response = yield body.json(); - return response; - } catch (exception) { - throw exception; + if (!loggedIn) + throw new Error('Not Logged In!'); + let requestUrl = `${baseTelescopeUrl}${apiTelescopePath}${url}`; + if (debugMode) + console.log(`[DEBUG]`, `Request Uri: ${requestUrl}`); + baseTelescopeHeaders.authorization = `Bearer ${telescopeUnoToken}`; + const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { + headers: baseTelescopeHeaders, + }); + if (statusCode >= 500) + throw new Error(`Received status code: '${statusCode}'. Route may be down or not exist.`); + let response = yield body.json(); + return response; } - }); -const sendRequest = (url) => - tslib_1.__awaiter(void 0, void 0, void 0, function* () { + catch (exception) { + throw exception; + } +}); +const sendRequest = (url) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { try { - if (!loggedIn) throw new Error('Not Logged In.'); - let requestUrl = `${baseUrl}${apiPath}${url}`; - if (debugMode) console.log(`[DEBUG]`, `Request Uri: ${requestUrl}`); - if (debugMode) console.time('Round Trip'); - const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { - headers: baseHeaders, - }); - if (debugMode) console.timeEnd('Round Trip'); - if (statusCode >= 500) - throw new Error( - `Received status code: '${statusCode}'. Route may be down or not exist.` - ); - let response = yield body.json(); - if (debugMode) - console.log( - `[DEBUG]`, - `Body Size: ${JSON.stringify(response).length} bytes.` - ); - return response; - } catch (exception) { - throw exception; + if (!loggedIn) + throw new Error('Not Logged In.'); + let requestUrl = `${baseUrl}${apiPath}${url}`; + if (debugMode) + console.log(`[DEBUG]`, `Request Uri: ${requestUrl}`); + if (debugMode) + console.time('Round Trip'); + const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { + headers: baseHeaders, + }); + if (debugMode) + console.timeEnd('Round Trip'); + if (statusCode >= 500) + throw new Error(`Received status code: '${statusCode}'. Route may be down or not exist.`); + let response = yield body.json(); + if (debugMode) + console.log(`[DEBUG]`, `Body Size: ${JSON.stringify(response).length} bytes.`); + return response; } - }); -const sendRequestCDN = (url) => - tslib_1.__awaiter(void 0, void 0, void 0, function* () { + catch (exception) { + throw exception; + } +}); +const sendRequestCDN = (url) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { try { - if (!loggedIn) throw new Error('Not Logged In.'); - let requestUrl = `${baseUrlTrunc}${url}`; - if (debugMode) console.log(`[DEBUG]`, `Request Uri: ${requestUrl}`); - if (debugMode) console.time('Round Trip'); - const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { - headers: baseHeaders, - }); - if (debugMode) console.timeEnd('Round Trip'); - if (statusCode >= 500) - throw new Error( - `Received status code: '${statusCode}'. Route may be down or not exist.` - ); - let response = yield body.json(); - if (debugMode) - console.log( - `[DEBUG]`, - `Body Size: ${JSON.stringify(response).length} bytes.` - ); - return response; - } catch (exception) { - throw exception; + if (!loggedIn) + throw new Error('Not Logged In.'); + let requestUrl = `${baseUrl}${url}`; + if (debugMode) + console.log(`[DEBUG]`, `Request Uri: ${requestUrl}`); + if (debugMode) + console.time('Round Trip'); + const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { + headers: baseHeaders, + }); + if (debugMode) + console.timeEnd('Round Trip'); + if (statusCode >= 500) + throw new Error(`Received status code: '${statusCode}'. Route may be down or not exist.`); + let response = yield body.json(); + if (debugMode) + console.log(`[DEBUG]`, `Body Size: ${JSON.stringify(response).length} bytes.`); + return response; } - }); -const sendRequestCustom = (url) => - tslib_1.__awaiter(void 0, void 0, void 0, function* () { + catch (exception) { + throw exception; + } +}); +const sendRequestCustom = (url) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { try { - if (!loggedIn) throw new Error('Not Logged In.'); - let requestUrl = `${baseUrlTrunc}${apiPath}${url}`; - if (debugMode) console.log(`[DEBUG]`, `Request Uri: ${requestUrl}`); - if (debugMode) console.time('Round Trip'); - const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { - headers: baseHeaders, - }); - if (debugMode) console.timeEnd('Round Trip'); - if (statusCode >= 500) - throw new Error( - `Received status code: '${statusCode}'. Route may be down or not exist.` - ); - let response = yield body.json(); - if (debugMode) - console.log( - `[DEBUG]`, - `Body Size: ${JSON.stringify(response).length} bytes.` - ); - return response; - } catch (exception) { - throw exception; + if (!loggedIn) + throw new Error('Not Logged In.'); + let requestUrl = `${baseUrlTrunc}${apiPath}${url}`; + if (debugMode) + console.log(`[DEBUG]`, `Request Uri: ${requestUrl}`); + if (debugMode) + console.time('Round Trip'); + const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { + headers: baseHeaders, + }); + if (debugMode) + console.timeEnd('Round Trip'); + if (statusCode >= 500) + throw new Error(`Received status code: '${statusCode}'. Route may be down or not exist.`); + let response = yield body.json(); + if (debugMode) + console.log(`[DEBUG]`, `Body Size: ${JSON.stringify(response).length} bytes.`); + return response; } - }); -const sendRequestUserInfo = (url) => - tslib_1.__awaiter(void 0, void 0, void 0, function* () { + catch (exception) { + throw exception; + } +}); +const sendRequestUserInfo = (url) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { try { - if (!loggedIn) throw new Error('Not Logged In.'); - let requestUrl = `${baseUrl}${url}`; - if (debugMode) console.log(`[DEBUG]`, `Request Uri: ${requestUrl}`); - if (debugMode) console.time('Round Trip'); - const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { - headers: baseHeaders, - }); - if (debugMode) console.timeEnd('Round Trip'); - if (statusCode >= 500) - throw new Error( - `Received status code: '${statusCode}'. Route may be down or not exist.` - ); - - // Get the response as text first - let responseText = yield body.text(); - - // Check if this is a JSONP response (contains function wrapper) - if (responseText.startsWith('userInfo(') && responseText.endsWith(');')) { - // Extract the JSON data from between the parentheses - const jsonData = responseText.replace(/^userInfo\(|\);$/g, ''); - return JSON.parse(jsonData); - } else { - // Regular JSON response - return JSON.parse(responseText); - } - } catch (exception) { - throw exception; + if (!loggedIn) + throw new Error('Not Logged In.'); + let requestUrl = `${baseUrl}${url}`; + if (debugMode) + console.log(`[DEBUG]`, `Request Uri: ${requestUrl}`); + if (debugMode) + console.time('Round Trip'); + const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { + headers: baseHeaders, + }); + if (debugMode) + console.timeEnd('Round Trip'); + if (statusCode >= 500) + throw new Error(`Received status code: '${statusCode}'. Route may be down or not exist.`); + // Get the response as text first + let responseText = yield body.text(); + // Check if this is a JSONP response (contains function wrapper) + if (responseText.startsWith('userInfo(') && responseText.endsWith(');')) { + // Extract the JSON data from between the parentheses + const jsonData = responseText.replace(/^userInfo\(|\);$/g, ''); + return JSON.parse(jsonData); + } + else { + // Regular JSON response + return JSON.parse(responseText); + } } - }); - -const sendPostRequest = (url, data) => - tslib_1.__awaiter(void 0, void 0, void 0, function* () { + catch (exception) { + throw exception; + } +}); +const sendPostRequest = (url, data) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { try { - if (!loggedIn) throw new Error('Not Logged In.'); - let requestUrl = `${baseUrl}${apiPath}${url}`; - const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { - method: 'POST', - headers: basePostHeaders, - body: data, - }); - if (statusCode >= 500) - throw new Error( - `Received status code: '${statusCode}'. Route may be down or not exist.` - ); - let response = yield body.json(); - return response; - } catch (exception) { - throw exception; + if (!loggedIn) + throw new Error('Not Logged In.'); + let requestUrl = `${baseUrl}${apiPath}${url}`; + const { body, statusCode } = yield (0, undici_1.request)(requestUrl, { + method: 'POST', + headers: basePostHeaders, + body: data, + }); + if (statusCode >= 500) + throw new Error(`Received status code: '${statusCode}'. Route may be down or not exist.`); + let response = yield body.json(); + return response; } - }); + catch (exception) { + throw exception; + } +}); const cleanClientName = (gamertag) => { - return encodeURIComponent(gamertag); + return encodeURIComponent(gamertag); }; const login = (ssoToken) => { - if (!ssoToken || ssoToken.trim().length <= 0) return false; - let fakeXSRF = '68e8b62e-1d9d-4ce1-b93f-cbe5ff31a041'; - baseHeaders['X-XSRF-TOKEN'] = fakeXSRF; - baseHeaders['X-CSRF-TOKEN'] = fakeXSRF; - baseHeaders['Atvi-Auth'] = ssoToken; - baseHeaders['ACT_SSO_COOKIE'] = ssoToken; - baseHeaders['atkn'] = ssoToken; - baseHeaders['cookie'] = - `${baseCookie}ACT_SSO_COOKIE=${ssoToken};XSRF-TOKEN=${fakeXSRF};API_CSRF_TOKEN=${fakeXSRF};ACT_SSO_EVENT="LOGIN_SUCCESS:1644346543228";ACT_SSO_COOKIE_EXPIRY=1645556143194;comid=cod;ssoDevId=63025d09c69f47dfa2b8d5520b5b73e4;tfa_enrollment_seen=true;gtm.custom.bot.flag=human;`; - baseSsoToken = ssoToken; - basePostHeaders['X-XSRF-TOKEN'] = fakeXSRF; - basePostHeaders['X-CSRF-TOKEN'] = fakeXSRF; - basePostHeaders['Atvi-Auth'] = ssoToken; - basePostHeaders['ACT_SSO_COOKIE'] = ssoToken; - basePostHeaders['atkn'] = ssoToken; - basePostHeaders['cookie'] = - `${baseCookie}ACT_SSO_COOKIE=${ssoToken};XSRF-TOKEN=${fakeXSRF};API_CSRF_TOKEN=${fakeXSRF};ACT_SSO_EVENT="LOGIN_SUCCESS:1644346543228";ACT_SSO_COOKIE_EXPIRY=1645556143194;comid=cod;ssoDevId=63025d09c69f47dfa2b8d5520b5b73e4;tfa_enrollment_seen=true;gtm.custom.bot.flag=human;`; - loggedIn = true; - return loggedIn; + if (!ssoToken || ssoToken.trim().length <= 0) + return false; + let fakeXSRF = '68e8b62e-1d9d-4ce1-b93f-cbe5ff31a041'; + baseHeaders['X-XSRF-TOKEN'] = fakeXSRF; + baseHeaders['X-CSRF-TOKEN'] = fakeXSRF; + baseHeaders['Atvi-Auth'] = ssoToken; + baseHeaders['ACT_SSO_COOKIE'] = ssoToken; + baseHeaders['atkn'] = ssoToken; + baseHeaders['cookie'] = + `${baseCookie}ACT_SSO_COOKIE=${ssoToken};XSRF-TOKEN=${fakeXSRF};API_CSRF_TOKEN=${fakeXSRF};ACT_SSO_EVENT="LOGIN_SUCCESS:1644346543228";ACT_SSO_COOKIE_EXPIRY=1645556143194;comid=cod;ssoDevId=63025d09c69f47dfa2b8d5520b5b73e4;tfa_enrollment_seen=true;gtm.custom.bot.flag=human;`; + baseSsoToken = ssoToken; + basePostHeaders['X-XSRF-TOKEN'] = fakeXSRF; + basePostHeaders['X-CSRF-TOKEN'] = fakeXSRF; + basePostHeaders['Atvi-Auth'] = ssoToken; + basePostHeaders['ACT_SSO_COOKIE'] = ssoToken; + basePostHeaders['atkn'] = ssoToken; + basePostHeaders['cookie'] = + `${baseCookie}ACT_SSO_COOKIE=${ssoToken};XSRF-TOKEN=${fakeXSRF};API_CSRF_TOKEN=${fakeXSRF};ACT_SSO_EVENT="LOGIN_SUCCESS:1644346543228";ACT_SSO_COOKIE_EXPIRY=1645556143194;comid=cod;ssoDevId=63025d09c69f47dfa2b8d5520b5b73e4;tfa_enrollment_seen=true;gtm.custom.bot.flag=human;`; + loggedIn = true; + return loggedIn; }; exports.login = login; -const telescope_login_endpoint = - 'https://wzm-ios-loginservice.prod.demonware.net/v1/login/uno/?titleID=7100&client=shg-cod-jup-bnet'; -const telescopeLogin = (username, password) => - tslib_1.__awaiter(void 0, void 0, void 0, function* () { - if (!username || !password) return false; - const { body, statusCode } = yield (0, undici_1.request)( - telescope_login_endpoint, - { +const telescope_login_endpoint = 'https://wzm-ios-loginservice.prod.demonware.net/v1/login/uno/?titleID=7100&client=shg-cod-jup-bnet'; +const telescopeLogin = (username, password) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { + if (!username || !password) + return false; + const { body, statusCode } = yield (0, undici_1.request)(telescope_login_endpoint, { method: 'POST', headers: baseHeaders, body: JSON.stringify({ - platform: 'ios', - hardwareType: 'ios', - auth: { - email: username, - password: password, - }, - version: 1492, + platform: 'ios', + hardwareType: 'ios', + auth: { + email: username, + password: password, + }, + version: 1492, }), - } - ); + }); if (statusCode === 200) { - let response = yield body.json(); - let unoToken = response.umbrella.accessToken; - telescopeUnoToken = unoToken; - } else if (statusCode === 403) { - let errorResponse = yield body.json(); - console.error('Error Logging In:', errorResponse.error.msg); + let response = (yield body.json()); + let unoToken = response.umbrella.accessToken; + telescopeUnoToken = unoToken; + } + else if (statusCode === 403) { + let errorResponse = (yield body.json()); + console.error('Error Logging In:', errorResponse.error.msg); } loggedIn = statusCode == 200; return loggedIn; - }); +}); exports.telescopeLogin = telescopeLogin; const handleLookupType = (platform) => { - return platform === platforms.Uno ? 'id' : 'gamer'; + return platform === platforms.Uno ? 'id' : 'gamer'; }; const checkForValidPlatform = (platform, gamertag) => { - if (!Object.values(platforms).includes(platform)) - throw new Error( - `Platform '${platform}' is not valid.\nTry one of the following:\n${JSON.stringify( - Object.values(platforms), - null, - 2 - )}` - ); - if (gamertag && isNaN(Number(gamertag)) && platform === platforms.Uno) - throw new Error(generics.UNO_NO_NUMERICAL_ID); + if (!Object.values(platforms).includes(platform)) + throw new Error(`Platform '${platform}' is not valid.\nTry one of the following:\n${JSON.stringify(Object.values(platforms), null, 2)}`); + if (gamertag && isNaN(Number(gamertag)) && platform === platforms.Uno) + throw new Error(generics.UNO_NO_NUMERICAL_ID); }; const mapGamertagToPlatform = (gamertag, platform, steamSupport = false) => { - checkForValidPlatform(platform, gamertag); - const lookupType = handleLookupType(platform); - if (!steamSupport && platform === platforms.Steam) - throw new Error(generics.STEAM_UNSUPPORTED); - if ( - platform == platforms.Battlenet || - platform == platforms.Activision || - platform == platforms.Uno - ) - if (gamertag && gamertag.length > 0) gamertag = cleanClientName(gamertag); - if (platform === platforms.Uno || platform === platforms.Activision) - platform = platforms.Uno; - return { gamertag, _platform: platform, lookupType }; + checkForValidPlatform(platform, gamertag); + const lookupType = handleLookupType(platform); + if (!steamSupport && platform === platforms.Steam) + throw new Error(generics.STEAM_UNSUPPORTED); + if (platform == platforms.Battlenet || + platform == platforms.Activision || + platform == platforms.Uno) + if (gamertag && gamertag.length > 0) + gamertag = cleanClientName(gamertag); + if (platform === platforms.Uno || platform === platforms.Activision) + platform = platforms.Uno; + return { gamertag, _platform: platform, lookupType }; }; class Endpoints { - constructor(game, gamertag, platform, mode, lookupType) { - this.fullData = () => - `/stats/cod/v1/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/profile/type/${this.mode}`; - this.combatHistory = () => - `/crm/cod/v2/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/matches/${this.mode}/start/0/end/0/details`; - this.combatHistoryWithDate = (startTime, endTime) => - `/crm/cod/v2/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/matches/${this.mode}/start/${startTime}/end/${endTime}/details`; - this.breakdown = () => - `/crm/cod/v2/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/matches/${this.mode}/start/0/end/0`; - this.breakdownWithDate = (startTime, endTime) => - `/crm/cod/v2/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/matches/${this.mode}/start/${startTime}/end/${endTime}`; - this.matchInfo = (matchId) => - `/crm/cod/v2/title/${this.game}/platform/${this.platform}/fullMatch/${this.mode}/${matchId}/en`; - this.matchHeatMap = (matchId) => - `/ce/v1/title/${this.game}/platform/${this.platform}/match/${matchId}/matchMapEvents`; - this.seasonLoot = () => - `/loot/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/status/en`; - this.bpProg = () => - `/loot/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/status/en`; - this.bundleInfo = () => - `/inventory/v1/title/${this.game}/platform/${this.platform}/purchasable/${this.lookupType}/${this.gamertag}/en`; - this.mapList = () => - `/ce/v1/title/${this.game}/platform/${this.platform}/gameType/${this.mode}/communityMapData/availability`; - this.purchasableItems = (gameId) => - `/inventory/v1/title/${gameId}/platform/psn/purchasable/public/en`; - this.bundleInformation = (gameId, bundleId) => - `/inventory/v1/title/${gameId}/bundle/${bundleId}/en`; - this.battlePassLoot = (season) => - `/loot/title/${this.game}/platform/${this.platform}/list/loot_season_${season}/en`; - this.friendFeed = () => - `/userfeed/v1/friendFeed/platform/${this.platform}/${this.lookupType}/${this.gamertag}/friendFeedEvents/en`; - this.eventFeed = () => - `/userfeed/v1/friendFeed/rendered/en/${baseSsoToken}`; - this.loggedInIdentities = () => `/crm/cod/v2/identities/${baseSsoToken}`; - this.codPoints = () => - `/inventory/v1/title/mw/platform/${this.platform}/${this.lookupType}/${this.gamertag}/currency`; - this.connectedAccounts = () => - `/crm/cod/v2/accounts/platform/${this.platform}/${this.lookupType}/${this.gamertag}`; - this.settings = () => - `/preferences/v1/platform/${this.platform}/${this.lookupType}/${this.gamertag}/list`; - this.friendsList = () => `/codfriends/v1/compendium`; - this.friendAction = (action) => - `/codfriends/v1/${action}/${this.platform}/${this.lookupType}/${this.gamertag}`; - this.search = () => - `/crm/cod/v2/platform/${this.platform}/username/${this.gamertag}/search`; - this.communityMapDataForMapMode = (mapId, gamemode) => - `/ce/v1/title/${this.game}/platform/${this.platform}/gameType/${this.mode}/map/${mapId}/mode/${gamemode}/communityMapData`; - this.userInfo = () => `/cod/userInfo/${baseSsoToken}`; - this.accolades = () => `/cdn/app/configs/prod/statnames/mapping.json`; - this.allCDNData = () => - `/content/atvi/callofduty/mycod/web/en/data/json/iq-content-xweb.js`; - this.game = game; - this.gamertag = gamertag; - this.platform = platform; - this.lookupType = lookupType; - this.mode = mode; - } + constructor(game, gamertag, platform, mode, lookupType) { + this.fullData = () => `/stats/cod/v1/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/profile/type/${this.mode}`; + this.combatHistory = () => `/crm/cod/v2/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/matches/${this.mode}/start/0/end/0/details`; + this.combatHistoryWithDate = (startTime, endTime) => `/crm/cod/v2/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/matches/${this.mode}/start/${startTime}/end/${endTime}/details`; + this.breakdown = () => `/crm/cod/v2/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/matches/${this.mode}/start/0/end/0`; + this.breakdownWithDate = (startTime, endTime) => `/crm/cod/v2/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/matches/${this.mode}/start/${startTime}/end/${endTime}`; + this.matchInfo = (matchId) => `/crm/cod/v2/title/${this.game}/platform/${this.platform}/fullMatch/wz/${matchId}/en`; + this.matchHeatMap = (matchId) => `/ce/v1/title/${this.game}/platform/${this.platform}/match/${matchId}/matchMapEvents`; + this.seasonLoot = () => `/loot/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/status/en`; + this.bpProg = () => `/loot/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/status/en`; + this.bundleInfo = () => `/inventory/v1/title/${this.game}/platform/${this.platform}/purchasable/${this.lookupType}/${this.gamertag}/en`; + this.mapList = () => `/ce/v1/title/${this.game}/platform/${this.platform}/gameType/${this.mode}/communityMapData/availability`; + this.purchasableItems = (gameId) => `/inventory/v1/title/${gameId}/platform/psn/purchasable/public/en`; + this.bundleInformation = (gameId, bundleId) => `/inventory/v1/title/${gameId}/bundle/${bundleId}/en`; + this.battlePassLoot = (season) => `/loot/title/${this.game}/platform/${this.platform}/list/loot_season_${season}/en`; + this.friendFeed = () => `/userfeed/v1/friendFeed/platform/${this.platform}/${this.lookupType}/${this.gamertag}/friendFeedEvents/en`; + this.eventFeed = () => `/userfeed/v1/friendFeed/rendered/en/${baseSsoToken}`; + this.loggedInIdentities = () => `/crm/cod/v2/identities/${baseSsoToken}`; + this.codPoints = () => `/inventory/v1/title/mw/platform/${this.platform}/${this.lookupType}/${this.gamertag}/currency`; + this.connectedAccounts = () => `/crm/cod/v2/accounts/platform/${this.platform}/${this.lookupType}/${this.gamertag}`; + this.settings = () => `/preferences/v1/platform/${this.platform}/${this.lookupType}/${this.gamertag}/list`; + this.friendAction = (action) => `/codfriends/v1/${action}/${this.platform}/${this.lookupType}/${this.gamertag}`; + this.search = () => `/crm/cod/v2/platform/${this.platform}/username/${this.gamertag}/search`; + this.communityMapDataForMapMode = (mapId, gamemode) => `/ce/v1/title/${this.game}/platform/${this.platform}/gameType/${this.mode}/map/${mapId}/mode/${gamemode}/communityMapData`; + this.userInfo = () => `/cod/userInfo/${baseSsoToken}`; + this.accolades = () => `/cdn/app/configs/prod/statnames/mapping.json`; + this.allCDNData = () => `/content/atvi/callofduty/mycod/web/en/data/json/iq-content-xweb.js`; + this.game = game; + this.gamertag = gamertag; + this.platform = platform; + this.lookupType = lookupType; + this.mode = mode; + } } class TelescopeEndpoints { - constructor(game, unoId, mode) { - this.lifeTime = () => - `/cr/v1/title/${this.game}/lifetime?language=english&unoId=${this.unoId}`; - this.matches = () => - `/cr/v1/title/${this.game}/matches?language=english&unoId=${this.unoId}`; - this.match = (matchId) => - `/cr/v1/title/${this.game}/match/${matchId}?language=english&unoId=${this.unoId}`; - this.game = game; - this.unoId = unoId; - this.mode = mode; - } + constructor(game, unoId, mode) { + this.lifeTime = () => `/cr/v1/title/${this.game}/lifetime?language=english&unoId=${this.unoId}`; + this.matches = () => `/cr/v1/title/${this.game}/matches?language=english&unoId=${this.unoId}`; + this.match = (matchId) => `/cr/v1/title/${this.game}/match/${matchId}?language=english&unoId=${this.unoId}`; + this.game = game; + this.unoId = unoId; + this.mode = mode; + } } class WZ { - constructor() { - this.fullData = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Warzone, - lookupType - ); - return yield sendRequest(endpoint.fullData()); - }); - }; - this.combatHistory = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Warzone, - lookupType - ); - return yield sendRequest(endpoint.combatHistory()); - }); - }; - this.combatHistoryWithDate = (gamertag, startTime, endTime, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Warzone, - lookupType - ); - return yield sendRequest( - endpoint.combatHistoryWithDate(startTime, endTime) - ); - }); - }; - this.breakdown = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Warzone, - lookupType - ); - return yield sendRequest(endpoint.breakdown()); - }); - }; - this.breakdownWithDate = (gamertag, startTime, endTime, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Warzone, - lookupType - ); - return yield sendRequest( - endpoint.breakdownWithDate(startTime, endTime) - ); - }); - }; - this.matchInfo = (matchId, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform('', platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Warzone, - lookupType - ); - return yield sendRequest(endpoint.matchInfo(matchId)); - }); - }; - this.cleanGameMode = (mode) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - //@ts-ignore - const foundMode = game_modes_json_1.default['modes'][mode]; - if (!foundMode) return mode; - return foundMode; - }); - } + constructor() { + this.fullData = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Warzone, lookupType); + return yield sendRequest(endpoint.fullData()); + }); + this.combatHistory = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Warzone, lookupType); + return yield sendRequest(endpoint.combatHistory()); + }); + this.combatHistoryWithDate = (gamertag, startTime, endTime, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Warzone, lookupType); + return yield sendRequest(endpoint.combatHistoryWithDate(startTime, endTime)); + }); + this.breakdown = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Warzone, lookupType); + return yield sendRequest(endpoint.breakdown()); + }); + this.breakdownWithDate = (gamertag, startTime, endTime, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Warzone, lookupType); + return yield sendRequest(endpoint.breakdownWithDate(startTime, endTime)); + }); + this.matchInfo = (matchId, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform('', platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Warzone, lookupType); + return yield sendRequest(endpoint.matchInfo(matchId)); + }); + this.cleanGameMode = (mode) => tslib_1.__awaiter(this, void 0, void 0, function* () { + //@ts-ignore + const foundMode = game_modes_json_1.default['modes'][mode]; + if (!foundMode) + return mode; + return foundMode; + }); + } } class MW { - constructor() { - this.fullData = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.fullData()); - }); - }; - this.combatHistory = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.combatHistory()); - }); - }; - this.combatHistoryWithDate = (gamertag, startTime, endTime, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest( - endpoint.combatHistoryWithDate(startTime, endTime) - ); - }); - }; - this.breakdown = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.breakdown()); - }); - }; - this.breakdownWithDate = (gamertag, startTime, endTime, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest( - endpoint.breakdownWithDate(startTime, endTime) - ); - }); - }; - this.matchInfo = (matchId, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform('', platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.matchInfo(matchId)); - }); - }; - this.matchHeatMap = (matchId, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform('', platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.matchHeatMap(matchId)); - }); - }; - this.seasonloot = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.seasonLoot()); - }); - }; - this.bpProg = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.bpProg()); - }); - }; - this.bundleInfo = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.bundleInfo()); - }); - }; - this.mapList = (platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform('', platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.mapList()); - }); - }; - this.communityMapDataForMapMode = (mapId, gamemode, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform('', platform)); - const endpoint = new Endpoints( - games.ModernWarfare, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequestCustom( - endpoint.communityMapDataForMapMode(mapId, gamemode) - ); - }); - }; - } + constructor() { + this.fullData = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.fullData()); + }); + this.combatHistory = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.combatHistory()); + }); + this.combatHistoryWithDate = (gamertag, startTime, endTime, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.combatHistoryWithDate(startTime, endTime)); + }); + this.breakdown = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.breakdown()); + }); + this.breakdownWithDate = (gamertag, startTime, endTime, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.breakdownWithDate(startTime, endTime)); + }); + this.matchInfo = (matchId, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform('', platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.matchInfo(matchId)); + }); + this.matchHeatMap = (matchId, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform('', platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.matchHeatMap(matchId)); + }); + this.seasonloot = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.seasonLoot()); + }); + this.bpProg = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.bpProg()); + }); + this.bundleInfo = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.bundleInfo()); + }); + this.mapList = (platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform('', platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.mapList()); + }); + this.communityMapDataForMapMode = (mapId, gamemode, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform('', platform)); + const endpoint = new Endpoints(games.ModernWarfare, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequestCustom(endpoint.communityMapDataForMapMode(mapId, gamemode)); + }); + } } class MW2 { - constructor() { - this.fullData = (unoId) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints( - telescopeGames.ModernWarfare2, - gamertag, - telescopeModes.Multiplayer - ); - return yield sendTelescopeRequest(endpoint.lifeTime()); - }); - this.matches = (unoId) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints( - telescopeGames.ModernWarfare2, - gamertag, - telescopeModes.Multiplayer - ); - return yield sendTelescopeRequest(endpoint.matches()); - }); - this.matchInfo = (unoId, matchId) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints( - telescopeGames.ModernWarfare2, - gamertag, - telescopeModes.Multiplayer - ); - return yield sendTelescopeRequest(endpoint.match(matchId)); - }); - } + constructor() { + this.fullData = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); + const endpoint = new TelescopeEndpoints(telescopeGames.ModernWarfare2, gamertag, telescopeModes.Multiplayer); + return yield sendTelescopeRequest(endpoint.lifeTime()); + }); + this.matches = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); + const endpoint = new TelescopeEndpoints(telescopeGames.ModernWarfare2, gamertag, telescopeModes.Multiplayer); + return yield sendTelescopeRequest(endpoint.matches()); + }); + this.matchInfo = (unoId, matchId) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); + const endpoint = new TelescopeEndpoints(telescopeGames.ModernWarfare2, gamertag, telescopeModes.Multiplayer); + return yield sendTelescopeRequest(endpoint.match(matchId)); + }); + } } class WZ2 { - constructor() { - this.fullData = (unoId) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints( - telescopeGames.Warzone2, - gamertag, - telescopeModes.Multiplayer - ); - return yield sendTelescopeRequest(endpoint.lifeTime()); - }); - this.matches = (unoId) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints( - telescopeGames.Warzone2, - gamertag, - telescopeModes.Multiplayer - ); - return yield sendTelescopeRequest(endpoint.matches()); - }); - this.matchInfo = (unoId, matchId) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints( - telescopeGames.Warzone2, - gamertag, - telescopeModes.Multiplayer - ); - return yield sendTelescopeRequest(endpoint.match(matchId)); - }); - } + constructor() { + this.fullData = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); + const endpoint = new TelescopeEndpoints(telescopeGames.Warzone2, gamertag, telescopeModes.Multiplayer); + return yield sendTelescopeRequest(endpoint.lifeTime()); + }); + this.matches = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); + const endpoint = new TelescopeEndpoints(telescopeGames.Warzone2, gamertag, telescopeModes.Multiplayer); + return yield sendTelescopeRequest(endpoint.matches()); + }); + this.matchInfo = (unoId, matchId) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); + const endpoint = new TelescopeEndpoints(telescopeGames.Warzone2, gamertag, telescopeModes.Multiplayer); + return yield sendTelescopeRequest(endpoint.match(matchId)); + }); + } } class MW3 { - constructor() { - this.fullData = (unoId) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints( - telescopeGames.ModernWarfare3, - gamertag, - telescopeModes.Multiplayer - ); - return yield sendTelescopeRequest(endpoint.lifeTime()); - }); - this.matches = (unoId) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints( - telescopeGames.ModernWarfare3, - gamertag, - telescopeModes.Multiplayer - ); - return yield sendTelescopeRequest(endpoint.matches()); - }); - this.matchInfo = (unoId, matchId) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints( - telescopeGames.ModernWarfare3, - gamertag, - telescopeModes.Multiplayer - ); - return yield sendTelescopeRequest(endpoint.match(matchId)); - }); - } + constructor() { + this.fullData = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); + const endpoint = new TelescopeEndpoints(telescopeGames.ModernWarfare3, gamertag, telescopeModes.Multiplayer); + return yield sendTelescopeRequest(endpoint.lifeTime()); + }); + this.matches = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); + const endpoint = new TelescopeEndpoints(telescopeGames.ModernWarfare3, gamertag, telescopeModes.Multiplayer); + return yield sendTelescopeRequest(endpoint.matches()); + }); + this.matchInfo = (unoId, matchId) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); + const endpoint = new TelescopeEndpoints(telescopeGames.ModernWarfare3, gamertag, telescopeModes.Multiplayer); + return yield sendTelescopeRequest(endpoint.match(matchId)); + }); + } } class WZM { - constructor() { - this.fullData = (unoId) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints( - telescopeGames.Mobile, - gamertag, - telescopeModes.Multiplayer - ); - return yield sendTelescopeRequest(endpoint.lifeTime()); - }); - this.matches = (unoId) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints( - telescopeGames.Mobile, - gamertag, - telescopeModes.Multiplayer - ); - return yield sendTelescopeRequest(endpoint.matches()); - }); - this.matchInfo = (unoId, matchId) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); - const endpoint = new TelescopeEndpoints( - telescopeGames.Mobile, - gamertag, - telescopeModes.Multiplayer - ); - return yield sendTelescopeRequest(endpoint.match(matchId)); - }); - } + constructor() { + this.fullData = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); + const endpoint = new TelescopeEndpoints(telescopeGames.Mobile, gamertag, telescopeModes.Multiplayer); + return yield sendTelescopeRequest(endpoint.lifeTime()); + }); + this.matches = (unoId) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); + const endpoint = new TelescopeEndpoints(telescopeGames.Mobile, gamertag, telescopeModes.Multiplayer); + return yield sendTelescopeRequest(endpoint.matches()); + }); + this.matchInfo = (unoId, matchId) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var { gamertag } = mapGamertagToPlatform(unoId, platforms.Uno, true); + const endpoint = new TelescopeEndpoints(telescopeGames.Mobile, gamertag, telescopeModes.Multiplayer); + return yield sendTelescopeRequest(endpoint.match(matchId)); + }); + } } class CW { - constructor() { - this.fullData = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ColdWar, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.fullData()); - }); - }; - this.combatHistory = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ColdWar, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.combatHistory()); - }); - }; - this.combatHistoryWithDate = (gamertag, startTime, endTime, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ColdWar, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest( - endpoint.combatHistoryWithDate(startTime, endTime) - ); - }); - }; - this.breakdown = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ColdWar, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.breakdown()); - }); - }; - this.breakdownWithDate = (gamertag, startTime, endTime, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ColdWar, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest( - endpoint.breakdownWithDate(startTime, endTime) - ); - }); - }; - this.seasonloot = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ColdWar, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.seasonLoot()); - }); - }; - this.bpProg = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ColdWar, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.bpProg()); - }); - }; - this.bundleInfo = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.ColdWar, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.bundleInfo()); - }); - }; - this.mapList = (platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform('', platform)); - const endpoint = new Endpoints( - games.ColdWar, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.mapList()); - }); - }; - this.matchInfo = (matchId, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform('', platform)); - const endpoint = new Endpoints( - games.ColdWar, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.matchInfo(matchId)); - }); - }; - this.matchHeatMap = (matchId, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform('', platform)); - const endpoint = new Endpoints( - games.ColdWar, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.matchHeatMap(matchId)); - }); - }; - } + constructor() { + this.fullData = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.fullData()); + }); + this.combatHistory = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.combatHistory()); + }); + this.combatHistoryWithDate = (gamertag, startTime, endTime, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.combatHistoryWithDate(startTime, endTime)); + }); + this.breakdown = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.breakdown()); + }); + this.breakdownWithDate = (gamertag, startTime, endTime, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.breakdownWithDate(startTime, endTime)); + }); + this.seasonloot = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.seasonLoot()); + }); + this.bpProg = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.bpProg()); + }); + this.bundleInfo = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.bundleInfo()); + }); + this.mapList = (platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform('', platform)); + const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.mapList()); + }); + this.matchInfo = (matchId, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform('', platform)); + const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.matchInfo(matchId)); + }); + this.matchHeatMap = (matchId, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform('', platform)); + const endpoint = new Endpoints(games.ColdWar, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.matchHeatMap(matchId)); + }); + } } class VG { - constructor() { - this.fullData = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.Vanguard, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.fullData()); - }); - }; - this.combatHistory = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.Vanguard, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.combatHistory()); - }); - }; - this.combatHistoryWithDate = (gamertag, startTime, endTime, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.Vanguard, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest( - endpoint.combatHistoryWithDate(startTime, endTime) - ); - }); - }; - this.breakdown = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.Vanguard, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.breakdown()); - }); - }; - this.breakdownWithDate = (gamertag, startTime, endTime, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.Vanguard, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest( - endpoint.breakdownWithDate(startTime, endTime) - ); - }); - }; - this.seasonloot = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.Vanguard, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.seasonLoot()); - }); - }; - this.bpProg = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.Vanguard, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.bpProg()); - }); - }; - this.bundleInfo = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.Vanguard, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.bundleInfo()); - }); - }; - this.mapList = (platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform('', platform)); - const endpoint = new Endpoints( - games.Vanguard, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.mapList()); - }); - }; - this.matchInfo = (matchId, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform('', platform)); - const endpoint = new Endpoints( - games.Vanguard, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.matchInfo(matchId)); - }); - }; - this.matchHeatMap = (matchId, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform('', platform)); - const endpoint = new Endpoints( - games.Vanguard, - gamertag, - platform, - modes.Multiplayer, - lookupType - ); - return yield sendRequest(endpoint.matchHeatMap(matchId)); - }); - }; - } + constructor() { + this.fullData = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.fullData()); + }); + this.combatHistory = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.combatHistory()); + }); + this.combatHistoryWithDate = (gamertag, startTime, endTime, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.combatHistoryWithDate(startTime, endTime)); + }); + this.breakdown = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.breakdown()); + }); + this.breakdownWithDate = (gamertag, startTime, endTime, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.breakdownWithDate(startTime, endTime)); + }); + this.seasonloot = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.seasonLoot()); + }); + this.bpProg = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.bpProg()); + }); + this.bundleInfo = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.bundleInfo()); + }); + this.mapList = (platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform('', platform)); + const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.mapList()); + }); + this.matchInfo = (matchId, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform('', platform)); + const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.matchInfo(matchId)); + }); + this.matchHeatMap = (matchId, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform('', platform)); + const endpoint = new Endpoints(games.Vanguard, gamertag, platform, modes.Multiplayer, lookupType); + return yield sendRequest(endpoint.matchHeatMap(matchId)); + }); + } } class SHOP { - constructor() { - this.purchasableItems = (gameId) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - const endpoint = new Endpoints( - games.NULL, - '', - platforms.NULL, - modes.NULL, - '' - ); - return yield sendRequest(endpoint.purchasableItems(gameId)); - }); - this.bundleInformation = (title, bundleId) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - const endpoint = new Endpoints( - games.NULL, - '', - platforms.NULL, - modes.NULL, - '' - ); - return yield sendRequest(endpoint.bundleInformation(title, bundleId)); - }); - this.battlePassLoot = (title, season, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform('', platform)); - const endpoint = new Endpoints( - title, - gamertag, - platform, - modes.NULL, - lookupType - ); - return yield sendRequest(endpoint.battlePassLoot(season)); - }); - }; - } + constructor() { + this.purchasableItems = (gameId) => tslib_1.__awaiter(this, void 0, void 0, function* () { + const endpoint = new Endpoints(games.NULL, '', platforms.NULL, modes.NULL, ''); + return yield sendRequest(endpoint.purchasableItems(gameId)); + }); + this.bundleInformation = (title, bundleId) => tslib_1.__awaiter(this, void 0, void 0, function* () { + const endpoint = new Endpoints(games.NULL, '', platforms.NULL, modes.NULL, ''); + return yield sendRequest(endpoint.bundleInformation(title, bundleId)); + }); + this.battlePassLoot = (title, season, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform('', platform)); + const endpoint = new Endpoints(title, gamertag, platform, modes.NULL, lookupType); + return yield sendRequest(endpoint.battlePassLoot(season)); + }); + } } class USER { - constructor() { - this.friendFeed = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.NULL, - gamertag, - platform, - modes.NULL, - lookupType - ); - return yield sendRequest(endpoint.friendFeed()); - }); - }; - this.eventFeed = () => - tslib_1.__awaiter(this, void 0, void 0, function* () { - const endpoint = new Endpoints( - games.NULL, - '', - platforms.NULL, - modes.NULL, - '' - ); - return yield sendRequest(endpoint.eventFeed()); - }); - this.loggedInIdentities = () => - tslib_1.__awaiter(this, void 0, void 0, function* () { - const endpoint = new Endpoints( - games.NULL, - '', - platforms.NULL, - modes.NULL, - '' - ); - return yield sendRequest(endpoint.loggedInIdentities()); - }); - this.userInfo = () => - tslib_1.__awaiter(this, void 0, void 0, function* () { - const endpoint = new Endpoints( - games.NULL, - '', - platforms.NULL, - modes.NULL, - '' - ); - return yield sendRequestUserInfo(endpoint.userInfo()); - }); - this.codPoints = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.NULL, - gamertag, - platform, - modes.NULL, - lookupType - ); - return yield sendRequest(endpoint.codPoints()); - }); - }; - this.connectedAccounts = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.NULL, - gamertag, - platform, - modes.NULL, - lookupType - ); - return yield sendRequest(endpoint.connectedAccounts()); - }); - }; - this.settings = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.NULL, - gamertag, - platform, - modes.NULL, - lookupType - ); - return yield sendRequest(endpoint.settings()); - }); - }; - this.friendsList = () => - tslib_1.__awaiter(this, void 0, void 0, function* () { - const endpoint = new Endpoints( - games.NULL, - '', - platforms.NULL, - modes.NULL, - '' - ); - return yield sendRequest(endpoint.friendsList()); - }); - this.friendAction = (gamertag, platform, action) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform)); - const endpoint = new Endpoints( - games.NULL, - gamertag, - platform, - modes.NULL, - lookupType - ); - return yield sendPostRequest(endpoint.friendAction(action), '{}'); - }); - }; - } + constructor() { + this.friendFeed = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.NULL, gamertag, platform, modes.NULL, lookupType); + return yield sendRequest(endpoint.friendFeed()); + }); + this.eventFeed = () => tslib_1.__awaiter(this, void 0, void 0, function* () { + const endpoint = new Endpoints(games.NULL, '', platforms.NULL, modes.NULL, ''); + return yield sendRequest(endpoint.eventFeed()); + }); + this.loggedInIdentities = () => tslib_1.__awaiter(this, void 0, void 0, function* () { + const endpoint = new Endpoints(games.NULL, '', platforms.NULL, modes.NULL, ''); + return yield sendRequest(endpoint.loggedInIdentities()); + }); + this.userInfo = () => tslib_1.__awaiter(this, void 0, void 0, function* () { + const endpoint = new Endpoints(games.NULL, '', platforms.NULL, modes.NULL, ''); + return yield sendRequestUserInfo(endpoint.userInfo()); + }); + this.codPoints = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.NULL, gamertag, platform, modes.NULL, lookupType); + return yield sendRequest(endpoint.codPoints()); + }); + this.connectedAccounts = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.NULL, gamertag, platform, modes.NULL, lookupType); + return yield sendRequest(endpoint.connectedAccounts()); + }); + this.settings = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.NULL, gamertag, platform, modes.NULL, lookupType); + return yield sendRequest(endpoint.settings()); + }); + this.friendAction = (gamertag, platform, action) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform)); + const endpoint = new Endpoints(games.NULL, gamertag, platform, modes.NULL, lookupType); + return yield sendPostRequest(endpoint.friendAction(action), '{}'); + }); + } } - class DB { - constructor() { - this.accolades = () => - tslib_1.__awaiter(this, void 0, void 0, function* () { - const endpoint = new Endpoints( - games.NULL, - '', - platforms.NULL, - modes.NULL, - '' - ); - return yield sendRequestCDN(endpoint.accolades()); - }); - this.allCDNData = () => - tslib_1.__awaiter(this, void 0, void 0, function* () { - const endpoint = new Endpoints( - games.NULL, - '', - platforms.NULL, - modes.NULL, - '' - ); - return yield sendRequestCDN(endpoint.allCDNData()); - }); - } + constructor() { + this.accolades = () => tslib_1.__awaiter(this, void 0, void 0, function* () { + const endpoint = new Endpoints(games.NULL, '', platforms.NULL, modes.NULL, ''); + return yield sendRequestCDN(endpoint.accolades()); + }); + this.allCDNData = () => tslib_1.__awaiter(this, void 0, void 0, function* () { + const endpoint = new Endpoints(games.NULL, '', platforms.NULL, modes.NULL, ''); + return yield sendRequestCDN(endpoint.allCDNData()); + }); + } } - class ALT { - constructor() { - this.search = (gamertag, platform) => { - var gamertag, platform, lookupType; - return tslib_1.__awaiter(this, void 0, void 0, function* () { - ({ - gamertag, - _platform: platform, - lookupType, - } = mapGamertagToPlatform(gamertag, platform, true)); - const endpoint = new Endpoints( - games.NULL, - gamertag, - platform, - modes.NULL, - lookupType - ); - return yield sendRequest(endpoint.search()); - }); - }; - this.cleanWeapon = (weapon) => - tslib_1.__awaiter(this, void 0, void 0, function* () { - //@ts-ignore - const foundWeapon = weapon_ids_json_1.default['All Weapons'][weapon]; - if (!foundWeapon) return weapon; - return foundWeapon; - }); - } + constructor() { + this.search = (gamertag, platform) => tslib_1.__awaiter(this, void 0, void 0, function* () { + var gamertag, platform, lookupType; + ({ + gamertag, + _platform: platform, + lookupType + } = mapGamertagToPlatform(gamertag, platform, true)); + const endpoint = new Endpoints(games.NULL, gamertag, platform, modes.NULL, lookupType); + return yield sendRequest(endpoint.search()); + }); + this.cleanWeapon = (weapon) => tslib_1.__awaiter(this, void 0, void 0, function* () { + //@ts-ignore + const foundWeapon = weapon_ids_json_1.default['All Weapons'][weapon]; + if (!foundWeapon) + return weapon; + return foundWeapon; + }); + } } const Warzone = new WZ(); exports.Warzone = Warzone; diff --git a/src/js/index.js.map b/src/js/index.js.map new file mode 100644 index 0000000..79ffa6a --- /dev/null +++ b/src/js/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;AAIA,mCAAiC;AACjC,sFAAiD;AACjD,sFAAqD;AAErD,MAAM,SAAS,GACb,qHAAqH,CAAC;AACxH,IAAI,UAAU,GAAW,iDAAiD,CAAC;AAC3E,IAAI,YAAY,GAAW,EAAE,CAAC;AAC9B,IAAI,SAAS,GAAG,KAAK,CAAC;AAwBtB,IAAI,WAAW,GAAkB;IAC/B,cAAc,EAAE,kBAAkB;IAClC,MAAM,EAAE,UAAU;IAClB,YAAY,EAAE,SAAS;CACxB,CAAC;AAEF,IAAI,oBAAoB,GAAkB;IACxC,MAAM,EAAE,mCAAmC;IAC3C,iBAAiB,EAAE,uDAAuD;IAC1E,eAAe,EAAE,UAAU;IAC3B,MAAM,EAAE,UAAU;IAClB,WAAW,EACT,oEAAoE;IACtE,kBAAkB,EAAE,IAAI;IACxB,oBAAoB,EAAE,WAAW;IACjC,gBAAgB,EAAE,OAAO;IACzB,gBAAgB,EAAE,MAAM;IACxB,gBAAgB,EAAE,WAAW;CAC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,IAAI,EAAE,EAAE,CAAC;AASvB,0BAAO;AART,MAAM,QAAQ,GAAG,IAAI,EAAE,EAAE,CAAC;AAqBxB,4BAAQ;AApBV,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;AAkBvB,sBAAK;AAjBP,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;AAWpB,gBAAE;AAVJ,MAAM,GAAG,GAAG,IAAI,EAAE,EAAE,CAAC;AAInB,kBAAG;AAHL,MAAM,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;AAUrB,oBAAI"} \ No newline at end of file diff --git a/src/js/index.ts b/src/js/index.ts index afc6898..b2d5517 100644 --- a/src/js/index.ts +++ b/src/js/index.ts @@ -1,4 +1,7 @@ -import { IncomingHttpHeaders } from 'http'; +interface IncomingHttpHeaders { + [header: string]: string | string[] | undefined; +} + import { request } from 'undici'; import wzMappings from '../data/game-modes.json'; import weaponMappings from '../data/weapon-ids.json'; @@ -9,14 +12,26 @@ let baseCookie: string = 'new_SiteId=cod;ACT_SSO_LOCALE=en_US;country=US;'; let baseSsoToken: string = ''; let debugMode = false; -interface CustomHeaders extends IncomingHttpHeaders { - 'X-XSRF-TOKEN'?: string | undefined; - 'X-CSRF-TOKEN'?: string | undefined; - 'Atvi-Auth'?: string | undefined; - ACT_SSO_COOKIE?: string | undefined; - atkn?: string | undefined; - cookie?: string | undefined; - 'content-type'?: string | undefined; +interface CustomHeaders extends Record { + 'X-XSRF-TOKEN'?: string; + 'X-CSRF-TOKEN'?: string; + 'Atvi-Auth'?: string; + ACT_SSO_COOKIE?: string; + atkn?: string; + cookie?: string; + 'content-type'?: string; + 'user-agent'?: string; + accept?: string; + authorization?: string; + 'accept-language'?: string; + 'cache-control'?: string; + pragma?: string; + 'sec-ch-ua'?: string; + 'sec-ch-ua-mobile'?: string; + 'sec-ch-ua-platform'?: string; + 'sec-fetch-dest'?: string; + 'sec-fetch-mode'?: string; + 'sec-fetch-site'?: string; } let baseHeaders: CustomHeaders = { @@ -446,7 +461,7 @@ class Endpoints { `/crm/cod/v2/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/matches/${this.mode}/start/${startTime}/end/${endTime}`; matchInfo = (matchId: string) => `/crm/cod/v2/title/${this.game}/platform/${this.platform}/fullMatch/wz/${matchId}/en`; - matchHeatMap = (matchId) => + matchHeatMap = (matchId: string) => `/ce/v1/title/${this.game}/platform/${this.platform}/match/${matchId}/matchMapEvents`; seasonLoot = () => `/loot/title/${this.game}/platform/${this.platform}/${this.lookupType}/${this.gamertag}/status/en`; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..528c638 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "strict": true, + "forceConsistentCasingInFileNames": true, + "importHelpers": true, + "resolveJsonModule": true, + "module": "CommonJS", + "target": "es2015", + "esModuleInterop": true, + "lib": ["esnext", "dom"], + "outDir": "./src/js/dist", + "sourceMap": true, + "declaration": true, + "skipLibCheck": true, + "typeRoots": [ + "./@types", + "./node_modules/@types" + ] + }, + "include": ["src/**/*"], + "exclude": ["node_modules"] +} \ No newline at end of file