Comparing version 1.1.1 to 1.1.2
@@ -10,4 +10,4 @@ import { RegionIdOrName, AccessToken } from '../../../../@types'; | ||
setAccessToken: () => Promise<string>; | ||
static validateAccessToken: (region: RegionIdOrName, accessToken: AccessToken) => Promise<boolean>; | ||
static validateAccessToken: (region: string | number, accessToken: string | undefined) => Promise<boolean>; | ||
} | ||
//# sourceMappingURL=BattleNetAPI.d.ts.map |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -38,5 +39,5 @@ }); | ||
} | ||
exports.default = BattleNetAPI; | ||
BattleNetAPI.validateAccessToken = (region, accessToken) => OAuthHelpers.validateAccessToken(region, accessToken); | ||
exports.default = BattleNetAPI; | ||
; | ||
//# sourceMappingURL=BattleNetAPI.js.map |
@@ -12,4 +12,4 @@ import BattleNetAPI from './abstract/BattleNetAPI'; | ||
static getAllRegionNames: () => string[]; | ||
static getRegionNameById: (regionId: import("../../../@types").RegionIdOrName) => readonly string[]; | ||
static validateRegionId: (regionId: import("../../../@types").RegionIdOrName) => boolean; | ||
static getRegionNameById: (regionId: string | number) => readonly string[]; | ||
static validateRegionId: (regionId: string | number) => boolean; | ||
static getRegionIdByName: (regionName: string) => number; | ||
@@ -19,15 +19,15 @@ static validateRegionName: (regionName: string) => boolean; | ||
static getAllLocaleNames: () => string[]; | ||
static getLocalesByRegionId: (regionId: import("../../../@types").RegionIdOrName) => readonly string[]; | ||
static getLocalesByRegionId: (regionId: string | number) => readonly string[]; | ||
static checkIfLocaleLooksValid: (locale: string) => boolean; | ||
static validateLocale: (locale: string) => boolean; | ||
static isLocaleValidForRegionId: (locale: string, regionId: import("../../../@types").RegionIdOrName) => boolean; | ||
static isLocaleValidForRegionId: (locale: string, regionId: string | number) => boolean; | ||
static getAllSc2Realms: () => Readonly<import("../../../@interfaces").RegionIdProperties<readonly number[]>>; | ||
static getAllAvailableSc2Realms: () => readonly number[]; | ||
static getSc2RealmsByRegionId: (regionId: import("../../../@types").RegionIdOrName) => readonly number[]; | ||
static checkIfSc2RealmLooksValid: (sc2Realm: import("../../../@types").RegionIdOrName) => boolean; | ||
static validateSc2Realm: (sc2Realm: import("../../../@types").RegionIdOrName) => boolean; | ||
static isSc2RealmValidForRegionId: (sc2Realm: import("../../../@types").RegionIdOrName, regionId: import("../../../@types").RegionIdOrName) => boolean; | ||
static getDefaultLocaleNameForRegionId: (regionId: import("../../../@types").RegionIdOrName) => string; | ||
static getSc2RealmsByRegionId: (regionId: string | number) => readonly number[]; | ||
static checkIfSc2RealmLooksValid: (sc2Realm: string | number) => boolean; | ||
static validateSc2Realm: (sc2Realm: string | number) => boolean; | ||
static isSc2RealmValidForRegionId: (sc2Realm: string | number, regionId: string | number) => boolean; | ||
static getDefaultLocaleNameForRegionId: (regionId: string | number) => string; | ||
static getAllDefaultLocaleNames: () => import("../../../@interfaces").RegionIdProperties<string>; | ||
} | ||
//# sourceMappingURL=BlizzAPI.d.ts.map |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -51,2 +52,3 @@ }); | ||
} | ||
exports.default = BlizzAPI; | ||
BlizzAPI.getAllRegions = utils.getAllRegions; | ||
@@ -73,3 +75,2 @@ BlizzAPI.getAllRegionIds = utils.getAllRegionIds; | ||
BlizzAPI.getAllDefaultLocaleNames = utils.getAllDefaultLocaleNames; | ||
exports.default = BlizzAPI; | ||
//# sourceMappingURL=BlizzAPI.js.map |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -31,3 +32,3 @@ }); | ||
}; | ||
exports.default = (queryOptions) => __awaiter(this, void 0, void 0, function* () { | ||
exports.default = (queryOptions) => __awaiter(void 0, void 0, void 0, function* () { | ||
const { region, accessToken } = queryOptions; | ||
@@ -34,0 +35,0 @@ const { validateAccessTokenOnEachQuery, refreshExpiredAccessToken, onAccessTokenExpired, onAccessTokenRefresh, } = queryOptions.options; |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -16,6 +17,4 @@ }); | ||
const validators_1 = require("../validators"); | ||
exports.default = (options) => __awaiter(this, void 0, void 0, function* () { | ||
console.log('hello!'); | ||
exports.default = (options) => __awaiter(void 0, void 0, void 0, function* () { | ||
const uri = encodeURI(options.uri); | ||
console.log(uri); | ||
const method = options.method || 'GET'; | ||
@@ -22,0 +21,0 @@ try { |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -16,3 +17,3 @@ }); | ||
const utils_1 = require("../../utils"); | ||
exports.default = (options) => __awaiter(this, void 0, void 0, function* () { | ||
exports.default = (options) => __awaiter(void 0, void 0, void 0, function* () { | ||
const { region, clientId, clientSecret } = options; | ||
@@ -19,0 +20,0 @@ const oauthUri = utils_1.getTokenUriByRegion(region); |
@@ -1,4 +0,3 @@ | ||
import { RegionIdOrName, AccessToken } from '../../../../@types'; | ||
declare const _default: (regionIdOrName: RegionIdOrName, accessToken: AccessToken) => Promise<boolean>; | ||
declare const _default: (regionIdOrName: string | number, accessToken: string | undefined) => Promise<boolean>; | ||
export default _default; | ||
//# sourceMappingURL=validateAccessToken.d.ts.map |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -13,3 +14,3 @@ }); | ||
const fetch_1 = require("../../helpers/fetch"); | ||
exports.default = (regionIdOrName, accessToken) => __awaiter(this, void 0, void 0, function* () { | ||
exports.default = (regionIdOrName, accessToken) => __awaiter(void 0, void 0, void 0, function* () { | ||
try { | ||
@@ -16,0 +17,0 @@ const checkTokenUri = checkTokenUris_1.getCheckTokenUriByRegion(regionIdOrName); |
@@ -1,4 +0,3 @@ | ||
import { RegionIdOrName } from '../../../../@types'; | ||
export declare const getAllApiHosts: () => Readonly<import("../../..").RegionIdProperties<string | readonly string[]>>; | ||
export declare const getApiHostByRegion: (regionIdOrName: RegionIdOrName) => string | readonly string[]; | ||
export declare const getApiHostByRegion: (regionIdOrName: string | number) => string | readonly string[]; | ||
//# sourceMappingURL=regionHosts.d.ts.map |
@@ -1,5 +0,5 @@ | ||
import { ConstantKey, RegionIdOrName } from '../../../../@types'; | ||
export declare const getConstantByRegion: (regionIdOrName: RegionIdOrName, constantKey: ConstantKey) => string | number | readonly number[] | readonly string[]; | ||
export declare const getConstantByRegionId: (regionId: RegionIdOrName, constantKey: ConstantKey) => string | number | readonly number[] | readonly string[]; | ||
export declare const getConstantByRegionName: (regionName: string, constantKey: ConstantKey) => string | number | readonly number[] | readonly string[]; | ||
import { ConstantKey } from '../../../../@types'; | ||
export declare const getConstantByRegion: (regionIdOrName: string | number, constantKey: ConstantKey) => string | number | readonly string[] | readonly number[]; | ||
export declare const getConstantByRegionId: (regionId: string | number, constantKey: ConstantKey) => string | number | readonly string[] | readonly number[]; | ||
export declare const getConstantByRegionName: (regionName: string, constantKey: ConstantKey) => string | number | readonly string[] | readonly number[]; | ||
//# sourceMappingURL=index.d.ts.map |
import { RegionIdProperties } from '../../../../@interfaces'; | ||
export declare const getAllDefaultLocaleIndexes: () => Readonly<RegionIdProperties<number>>; | ||
export declare const getDefaultLocaleIndexForRegionId: (regionId: import("../../../../@types").RegionIdOrName) => number; | ||
export declare const getDefaultLocaleNameForRegionId: (regionId: import("../../../../@types").RegionIdOrName) => string; | ||
export declare const getDefaultLocaleIndexForRegionId: (regionId: string | number) => number; | ||
export declare const getDefaultLocaleNameForRegionId: (regionId: string | number) => string; | ||
export declare const getAllDefaultLocaleNames: () => RegionIdProperties<string>; | ||
//# sourceMappingURL=defaultLocales.d.ts.map |
export declare const getAllLocales: () => Readonly<import("../../..").RegionIdProperties<readonly string[]>>; | ||
export declare const getAllLocaleNames: () => string[]; | ||
export declare const getLocalesByRegionId: (regionId: import("../../../../@types").RegionIdOrName) => readonly string[]; | ||
export declare const getLocalesByRegionId: (regionId: string | number) => readonly string[]; | ||
export declare const checkIfLocaleLooksValid: (locale: string) => boolean; | ||
export declare const validateLocale: (locale: string) => boolean; | ||
export declare const isLocaleValidForRegionId: (locale: string, regionId: import("../../../../@types").RegionIdOrName) => boolean; | ||
export declare const isLocaleValidForRegionId: (locale: string, regionId: string | number) => boolean; | ||
//# sourceMappingURL=locales.d.ts.map |
export declare const getAllRegions: () => Readonly<import("../../..").RegionIdProperties<readonly string[]>>; | ||
export declare const getAllRegionIds: () => readonly number[]; | ||
export declare const getAllRegionNames: () => string[]; | ||
export declare const getRegionNameById: (regionId: import("../../../../@types").RegionIdOrName) => readonly string[]; | ||
export declare const validateRegionId: (regionId: import("../../../../@types").RegionIdOrName) => boolean; | ||
export declare const getRegionNameById: (regionId: string | number) => readonly string[]; | ||
export declare const validateRegionId: (regionId: string | number) => boolean; | ||
export declare const getRegionIdByName: (regionName: string) => number; | ||
export declare const validateRegionName: (regionName: string) => boolean; | ||
//# sourceMappingURL=regions.d.ts.map |
export declare const getAllSc2Realms: () => Readonly<import("../../..").RegionIdProperties<readonly number[]>>; | ||
export declare const getAllAvailableSc2Realms: () => readonly number[]; | ||
export declare const getSc2RealmsByRegionId: (regionId: import("../../../../@types").RegionIdOrName) => readonly number[]; | ||
export declare const checkIfSc2RealmLooksValid: (sc2Realm: import("../../../../@types").RegionIdOrName) => boolean; | ||
export declare const validateSc2Realm: (sc2Realm: import("../../../../@types").RegionIdOrName) => boolean; | ||
export declare const isSc2RealmValidForRegionId: (sc2Realm: import("../../../../@types").RegionIdOrName, regionId: import("../../../../@types").RegionIdOrName) => boolean; | ||
export declare const getSc2RealmsByRegionId: (regionId: string | number) => readonly number[]; | ||
export declare const checkIfSc2RealmLooksValid: (sc2Realm: string | number) => boolean; | ||
export declare const validateSc2Realm: (sc2Realm: string | number) => boolean; | ||
export declare const isSc2RealmValidForRegionId: (sc2Realm: string | number, regionId: string | number) => boolean; | ||
//# sourceMappingURL=sc2Realms.d.ts.map |
@@ -1,4 +0,3 @@ | ||
import { RegionIdOrName } from '../../../../@types'; | ||
export declare const getAllAuthorizeUris: () => Readonly<import("../../..").RegionIdProperties<string>>; | ||
export declare const getAuthorizeUriByRegion: (regionIdOrName: RegionIdOrName) => string | number | readonly number[] | readonly string[]; | ||
export declare const getAuthorizeUriByRegion: (regionIdOrName: string | number) => string | number | readonly string[] | readonly number[]; | ||
//# sourceMappingURL=authorizeUris.d.ts.map |
@@ -1,4 +0,3 @@ | ||
import { RegionIdOrName } from '../../../../@types'; | ||
export declare const getAllCheckTokenUris: () => Readonly<import("../../..").RegionIdProperties<string>>; | ||
export declare const getCheckTokenUriByRegion: (regionIdOrName: RegionIdOrName) => string | number | readonly number[] | readonly string[]; | ||
export declare const getCheckTokenUriByRegion: (regionIdOrName: string | number) => string | number | readonly string[] | readonly number[]; | ||
//# sourceMappingURL=checkTokenUris.d.ts.map |
@@ -1,4 +0,3 @@ | ||
import { RegionIdOrName } from '../../../../@types'; | ||
export declare const getAllTokenUris: () => Readonly<import("../../..").RegionIdProperties<string>>; | ||
export declare const getTokenUriByRegion: (regionIdOrName: RegionIdOrName) => string; | ||
export declare const getTokenUriByRegion: (regionIdOrName: string | number) => string; | ||
//# sourceMappingURL=tokenUris.d.ts.map |
{ | ||
"name": "blizzapi", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Flexible and feature-rich Node.js library for Blizzard Battle.net API", | ||
@@ -33,3 +33,4 @@ "homepage": "https://blizzapi.lukem.net", | ||
"build": "npm run lint && npm run test && npm run clean && tsc", | ||
"dev": "tsc -w" | ||
"dev": "tsc -w", | ||
"prepublishOnly": "npm run build" | ||
}, | ||
@@ -46,8 +47,8 @@ "jest": { | ||
"@types/jest": "24.0.18", | ||
"@types/node": "12.7.2", | ||
"jest": "24.8.0", | ||
"@types/node": "12.7.4", | ||
"jest": "24.9.0", | ||
"prettier": "1.18.2", | ||
"rimraf": "3.0.0", | ||
"ts-jest": "24.0.2", | ||
"tslint": "5.18.0", | ||
"tslint": "5.19.0", | ||
"tslint-config-airbnb": "5.11.1", | ||
@@ -58,3 +59,3 @@ "tslint-config-prettier": "1.18.0", | ||
"tslint-plugin-prettier": "2.0.1", | ||
"typescript": "3.5.3" | ||
"typescript": "3.6.2" | ||
}, | ||
@@ -61,0 +62,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
88450
999