@wise-old-man/utils 2.0.0-beta.4 → 2.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +299 -304
- package/dist/index.js +136 -124
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -388,6 +388,7 @@ export type Prisma_Base_Snapshot = {
|
|
|
388
388
|
|
|
389
389
|
|
|
390
390
|
|
|
391
|
+
import { AxiosInstance } from 'axios';
|
|
391
392
|
|
|
392
393
|
/**
|
|
393
394
|
* Prisma currently seems to ignore the @map() in enum declarations.
|
|
@@ -458,20 +459,20 @@ declare const Skill: {
|
|
|
458
459
|
};
|
|
459
460
|
declare type Skill = typeof Skill[keyof typeof Skill];
|
|
460
461
|
declare const Activity: {
|
|
461
|
-
LEAGUE_POINTS:
|
|
462
|
-
BOUNTY_HUNTER_HUNTER:
|
|
463
|
-
BOUNTY_HUNTER_ROGUE:
|
|
464
|
-
CLUE_SCROLLS_ALL:
|
|
465
|
-
CLUE_SCROLLS_BEGINNER:
|
|
466
|
-
CLUE_SCROLLS_EASY:
|
|
467
|
-
CLUE_SCROLLS_MEDIUM:
|
|
468
|
-
CLUE_SCROLLS_HARD:
|
|
469
|
-
CLUE_SCROLLS_ELITE:
|
|
470
|
-
CLUE_SCROLLS_MASTER:
|
|
471
|
-
LAST_MAN_STANDING:
|
|
472
|
-
PVP_ARENA:
|
|
473
|
-
SOUL_WARS_ZEAL:
|
|
474
|
-
GUARDIANS_OF_THE_RIFT:
|
|
462
|
+
readonly LEAGUE_POINTS: "league_points";
|
|
463
|
+
readonly BOUNTY_HUNTER_HUNTER: "bounty_hunter_hunter";
|
|
464
|
+
readonly BOUNTY_HUNTER_ROGUE: "bounty_hunter_rogue";
|
|
465
|
+
readonly CLUE_SCROLLS_ALL: "clue_scrolls_all";
|
|
466
|
+
readonly CLUE_SCROLLS_BEGINNER: "clue_scrolls_beginner";
|
|
467
|
+
readonly CLUE_SCROLLS_EASY: "clue_scrolls_easy";
|
|
468
|
+
readonly CLUE_SCROLLS_MEDIUM: "clue_scrolls_medium";
|
|
469
|
+
readonly CLUE_SCROLLS_HARD: "clue_scrolls_hard";
|
|
470
|
+
readonly CLUE_SCROLLS_ELITE: "clue_scrolls_elite";
|
|
471
|
+
readonly CLUE_SCROLLS_MASTER: "clue_scrolls_master";
|
|
472
|
+
readonly LAST_MAN_STANDING: "last_man_standing";
|
|
473
|
+
readonly PVP_ARENA: "pvp_arena";
|
|
474
|
+
readonly SOUL_WARS_ZEAL: "soul_wars_zeal";
|
|
475
|
+
readonly GUARDIANS_OF_THE_RIFT: "guardians_of_the_rift";
|
|
475
476
|
};
|
|
476
477
|
declare type Activity = typeof Activity[keyof typeof Activity];
|
|
477
478
|
declare const Boss: {
|
|
@@ -585,20 +586,20 @@ declare const Metric: {
|
|
|
585
586
|
readonly WINTERTODT: "wintertodt";
|
|
586
587
|
readonly ZALCANO: "zalcano";
|
|
587
588
|
readonly ZULRAH: "zulrah";
|
|
588
|
-
readonly LEAGUE_POINTS:
|
|
589
|
-
readonly BOUNTY_HUNTER_HUNTER:
|
|
590
|
-
readonly BOUNTY_HUNTER_ROGUE:
|
|
591
|
-
readonly CLUE_SCROLLS_ALL:
|
|
592
|
-
readonly CLUE_SCROLLS_BEGINNER:
|
|
593
|
-
readonly CLUE_SCROLLS_EASY:
|
|
594
|
-
readonly CLUE_SCROLLS_MEDIUM:
|
|
595
|
-
readonly CLUE_SCROLLS_HARD:
|
|
596
|
-
readonly CLUE_SCROLLS_ELITE:
|
|
597
|
-
readonly CLUE_SCROLLS_MASTER:
|
|
598
|
-
readonly LAST_MAN_STANDING:
|
|
599
|
-
readonly PVP_ARENA:
|
|
600
|
-
readonly SOUL_WARS_ZEAL:
|
|
601
|
-
readonly GUARDIANS_OF_THE_RIFT:
|
|
589
|
+
readonly LEAGUE_POINTS: "league_points";
|
|
590
|
+
readonly BOUNTY_HUNTER_HUNTER: "bounty_hunter_hunter";
|
|
591
|
+
readonly BOUNTY_HUNTER_ROGUE: "bounty_hunter_rogue";
|
|
592
|
+
readonly CLUE_SCROLLS_ALL: "clue_scrolls_all";
|
|
593
|
+
readonly CLUE_SCROLLS_BEGINNER: "clue_scrolls_beginner";
|
|
594
|
+
readonly CLUE_SCROLLS_EASY: "clue_scrolls_easy";
|
|
595
|
+
readonly CLUE_SCROLLS_MEDIUM: "clue_scrolls_medium";
|
|
596
|
+
readonly CLUE_SCROLLS_HARD: "clue_scrolls_hard";
|
|
597
|
+
readonly CLUE_SCROLLS_ELITE: "clue_scrolls_elite";
|
|
598
|
+
readonly CLUE_SCROLLS_MASTER: "clue_scrolls_master";
|
|
599
|
+
readonly LAST_MAN_STANDING: "last_man_standing";
|
|
600
|
+
readonly PVP_ARENA: "pvp_arena";
|
|
601
|
+
readonly SOUL_WARS_ZEAL: "soul_wars_zeal";
|
|
602
|
+
readonly GUARDIANS_OF_THE_RIFT: "guardians_of_the_rift";
|
|
602
603
|
readonly OVERALL: "overall";
|
|
603
604
|
readonly ATTACK: "attack";
|
|
604
605
|
readonly DEFENCE: "defence";
|
|
@@ -1186,233 +1187,6 @@ declare const Country: {
|
|
|
1186
1187
|
};
|
|
1187
1188
|
declare type Country = typeof Country[keyof typeof Country];
|
|
1188
1189
|
|
|
1189
|
-
declare enum CompetitionStatus {
|
|
1190
|
-
UPCOMING = "upcoming",
|
|
1191
|
-
ONGOING = "ongoing",
|
|
1192
|
-
FINISHED = "finished"
|
|
1193
|
-
}
|
|
1194
|
-
declare type CompetitionStatusPropsMap = {
|
|
1195
|
-
[status in CompetitionStatus]: {
|
|
1196
|
-
name: string;
|
|
1197
|
-
};
|
|
1198
|
-
};
|
|
1199
|
-
declare type CompetitionTypePropsMap = {
|
|
1200
|
-
[type in CompetitionType]: {
|
|
1201
|
-
name: string;
|
|
1202
|
-
};
|
|
1203
|
-
};
|
|
1204
|
-
declare const CompetitionTypeProps: CompetitionTypePropsMap;
|
|
1205
|
-
declare const CompetitionStatusProps: CompetitionStatusPropsMap;
|
|
1206
|
-
declare const COMPETITION_TYPES: ("classic" | "team")[];
|
|
1207
|
-
declare const COMPETITION_STATUSES: CompetitionStatus[];
|
|
1208
|
-
declare function isCompetitionType(typeString: string): typeString is CompetitionType;
|
|
1209
|
-
declare function isCompetitionStatus(statusString: string): statusString is CompetitionStatus;
|
|
1210
|
-
|
|
1211
|
-
interface CountryDetails {
|
|
1212
|
-
code: Country;
|
|
1213
|
-
name: string;
|
|
1214
|
-
}
|
|
1215
|
-
declare type CountryPropsMap = {
|
|
1216
|
-
[c in Country]: CountryDetails;
|
|
1217
|
-
};
|
|
1218
|
-
declare const CountryProps: CountryPropsMap;
|
|
1219
|
-
declare const COUNTRY_CODES: ("AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW")[];
|
|
1220
|
-
declare function isCountry(countryCodeString: string): countryCodeString is Country;
|
|
1221
|
-
declare function findCountry(countryIdentifier: string): CountryDetails | undefined;
|
|
1222
|
-
declare function findCountryByName(countryName: string): CountryDetails | undefined;
|
|
1223
|
-
declare function findCountryByCode(countryCode: string): CountryDetails | undefined;
|
|
1224
|
-
|
|
1225
|
-
declare const MAX_LEVEL = 99;
|
|
1226
|
-
declare const MAX_VIRTUAL_LEVEL = 126;
|
|
1227
|
-
declare const MAX_SKILL_EXP = 200000000;
|
|
1228
|
-
declare const SKILL_EXP_AT_99 = 13034431;
|
|
1229
|
-
declare const CAPPED_MAX_TOTAL_XP: number;
|
|
1230
|
-
declare function getExpForLevel(level: number): number;
|
|
1231
|
-
declare function getLevel(exp: number, virtual?: boolean): number;
|
|
1232
|
-
declare function getCombatLevel(attack: number, strength: number, defence: number, ranged: number, magic: number, hitpoints: number, prayer: number): number;
|
|
1233
|
-
|
|
1234
|
-
declare const GROUP_ROLES: ("magic" | "slayer" | "hunter" | "achiever" | "adamant" | "adept" | "administrator" | "admiral" | "adventurer" | "air" | "anchor" | "apothecary" | "archer" | "armadylean" | "artillery" | "artisan" | "asgarnian" | "assassin" | "assistant" | "astral" | "athlete" | "attacker" | "bandit" | "bandosian" | "barbarian" | "battlemage" | "beast" | "berserker" | "blisterwood" | "blood" | "blue" | "bob" | "body" | "brassican" | "brawler" | "brigadier" | "brigand" | "bronze" | "bruiser" | "bulwark" | "burglar" | "burnt" | "cadet" | "captain" | "carry" | "champion" | "chaos" | "cleric" | "collector" | "colonel" | "commander" | "competitor" | "completionist" | "constructor" | "cook" | "coordinator" | "corporal" | "cosmic" | "councillor" | "crafter" | "crew" | "crusader" | "cutpurse" | "death" | "defender" | "defiler" | "deputy_owner" | "destroyer" | "diamond" | "diseased" | "doctor" | "dogsbody" | "dragon" | "dragonstone" | "druid" | "duellist" | "earth" | "elite" | "emerald" | "enforcer" | "epic" | "executive" | "expert" | "explorer" | "farmer" | "feeder" | "fighter" | "fire" | "firemaker" | "firestarter" | "fisher" | "fletcher" | "forager" | "fremennik" | "gamer" | "gatherer" | "general" | "gnome_child" | "gnome_elder" | "goblin" | "gold" | "goon" | "green" | "grey" | "guardian" | "guthixian" | "harpoon" | "healer" | "hellcat" | "helper" | "herbologist" | "hero" | "holy" | "hoarder" | "ignitor" | "illusionist" | "imp" | "infantry" | "inquisitor" | "iron" | "jade" | "justiciar" | "kandarin" | "karamjan" | "kharidian" | "kitten" | "knight" | "labourer" | "law" | "leader" | "learner" | "legacy" | "legend" | "legionnaire" | "lieutenant" | "looter" | "lumberjack" | "magician" | "major" | "maple" | "marshal" | "master" | "maxed" | "mediator" | "medic" | "mentor" | "member" | "merchant" | "mind" | "miner" | "minion" | "misthalinian" | "mithril" | "moderator" | "monarch" | "morytanian" | "mystic" | "myth" | "natural" | "nature" | "necromancer" | "ninja" | "noble" | "novice" | "nurse" | "oak" | "officer" | "onyx" | "opal" | "oracle" | "orange" | "owner" | "page" | "paladin" | "pawn" | "pilgrim" | "pine" | "pink" | "prefect" | "priest" | "private" | "prodigy" | "proselyte" | "prospector" | "protector" | "pure" | "purple" | "pyromancer" | "quester" | "racer" | "raider" | "ranger" | "record_chaser" | "recruit" | "recruiter" | "red_topaz" | "red" | "rogue" | "ruby" | "rune" | "runecrafter" | "sage" | "sapphire" | "saradominist" | "saviour" | "scavenger" | "scholar" | "scourge" | "scout" | "scribe" | "seer" | "senator" | "sentry" | "serenist" | "sergeant" | "shaman" | "sheriff" | "short_green_guy" | "skiller" | "skulled" | "smiter" | "smith" | "smuggler" | "sniper" | "soul" | "specialist" | "speed_runner" | "spellcaster" | "squire" | "staff" | "steel" | "strider" | "striker" | "summoner" | "superior" | "supervisor" | "teacher" | "templar" | "therapist" | "thief" | "tirannian" | "trialist" | "trickster" | "tzkal" | "tztok" | "unholy" | "vagrant" | "vanguard" | "walker" | "wanderer" | "warden" | "warlock" | "warrior" | "water" | "wild" | "willow" | "wily" | "wintumber" | "witch" | "wizard" | "worker" | "wrath" | "xerician" | "yellow" | "yew" | "zamorakian" | "zarosian" | "zealot" | "zenyte")[];
|
|
1235
|
-
declare const PRIVELEGED_GROUP_ROLES: GroupRole[];
|
|
1236
|
-
declare type GroupRolePropsMap = {
|
|
1237
|
-
[role in GroupRole]: {
|
|
1238
|
-
name: string;
|
|
1239
|
-
isPriveleged: boolean;
|
|
1240
|
-
};
|
|
1241
|
-
};
|
|
1242
|
-
declare const GroupRoleProps: GroupRolePropsMap;
|
|
1243
|
-
declare function findGroupRole(roleName: string): GroupRole | null;
|
|
1244
|
-
declare function isGroupRole(roleString: string): roleString is GroupRole;
|
|
1245
|
-
|
|
1246
|
-
declare enum MetricType {
|
|
1247
|
-
SKILL = "skill",
|
|
1248
|
-
BOSS = "boss",
|
|
1249
|
-
ACTIVITY = "activity",
|
|
1250
|
-
COMPUTED = "computed"
|
|
1251
|
-
}
|
|
1252
|
-
declare enum MetricMeasure {
|
|
1253
|
-
EXPERIENCE = "experience",
|
|
1254
|
-
KILLS = "kills",
|
|
1255
|
-
SCORE = "score",
|
|
1256
|
-
VALUE = "value"
|
|
1257
|
-
}
|
|
1258
|
-
interface SkillProperties {
|
|
1259
|
-
name: string;
|
|
1260
|
-
isCombat: boolean;
|
|
1261
|
-
isMembers: boolean;
|
|
1262
|
-
type: MetricType;
|
|
1263
|
-
measure: MetricMeasure;
|
|
1264
|
-
}
|
|
1265
|
-
interface BossProperties {
|
|
1266
|
-
name: string;
|
|
1267
|
-
minimumKc: number;
|
|
1268
|
-
isMembers: boolean;
|
|
1269
|
-
type: MetricType;
|
|
1270
|
-
measure: MetricMeasure;
|
|
1271
|
-
}
|
|
1272
|
-
interface ComputedMetricProperties {
|
|
1273
|
-
name: string;
|
|
1274
|
-
type: MetricType;
|
|
1275
|
-
measure: MetricMeasure;
|
|
1276
|
-
}
|
|
1277
|
-
declare const MetricProps: {
|
|
1278
|
-
ehp: ComputedMetricProperties;
|
|
1279
|
-
ehb: ComputedMetricProperties;
|
|
1280
|
-
abyssal_sire: BossProperties;
|
|
1281
|
-
alchemical_hydra: BossProperties;
|
|
1282
|
-
barrows_chests: BossProperties;
|
|
1283
|
-
bryophyta: BossProperties;
|
|
1284
|
-
callisto: BossProperties;
|
|
1285
|
-
cerberus: BossProperties;
|
|
1286
|
-
chambers_of_xeric: BossProperties;
|
|
1287
|
-
chambers_of_xeric_challenge_mode: BossProperties;
|
|
1288
|
-
chaos_elemental: BossProperties;
|
|
1289
|
-
chaos_fanatic: BossProperties;
|
|
1290
|
-
commander_zilyana: BossProperties;
|
|
1291
|
-
corporeal_beast: BossProperties;
|
|
1292
|
-
crazy_archaeologist: BossProperties;
|
|
1293
|
-
dagannoth_prime: BossProperties;
|
|
1294
|
-
dagannoth_rex: BossProperties;
|
|
1295
|
-
dagannoth_supreme: BossProperties;
|
|
1296
|
-
deranged_archaeologist: BossProperties;
|
|
1297
|
-
general_graardor: BossProperties;
|
|
1298
|
-
giant_mole: BossProperties;
|
|
1299
|
-
grotesque_guardians: BossProperties;
|
|
1300
|
-
hespori: BossProperties;
|
|
1301
|
-
kalphite_queen: BossProperties;
|
|
1302
|
-
king_black_dragon: BossProperties;
|
|
1303
|
-
kraken: BossProperties;
|
|
1304
|
-
kreearra: BossProperties;
|
|
1305
|
-
kril_tsutsaroth: BossProperties;
|
|
1306
|
-
mimic: BossProperties;
|
|
1307
|
-
nex: BossProperties;
|
|
1308
|
-
nightmare: BossProperties;
|
|
1309
|
-
phosanis_nightmare: BossProperties;
|
|
1310
|
-
obor: BossProperties;
|
|
1311
|
-
sarachnis: BossProperties;
|
|
1312
|
-
scorpia: BossProperties;
|
|
1313
|
-
skotizo: BossProperties;
|
|
1314
|
-
tempoross: BossProperties;
|
|
1315
|
-
the_gauntlet: BossProperties;
|
|
1316
|
-
the_corrupted_gauntlet: BossProperties;
|
|
1317
|
-
theatre_of_blood: BossProperties;
|
|
1318
|
-
theatre_of_blood_hard_mode: BossProperties;
|
|
1319
|
-
thermonuclear_smoke_devil: BossProperties;
|
|
1320
|
-
tombs_of_amascut: BossProperties;
|
|
1321
|
-
tombs_of_amascut_expert: BossProperties;
|
|
1322
|
-
tzkal_zuk: BossProperties;
|
|
1323
|
-
tztok_jad: BossProperties;
|
|
1324
|
-
venenatis: BossProperties;
|
|
1325
|
-
vetion: BossProperties;
|
|
1326
|
-
vorkath: BossProperties;
|
|
1327
|
-
wintertodt: BossProperties;
|
|
1328
|
-
zalcano: BossProperties;
|
|
1329
|
-
zulrah: BossProperties;
|
|
1330
|
-
overall: SkillProperties;
|
|
1331
|
-
attack: SkillProperties;
|
|
1332
|
-
defence: SkillProperties;
|
|
1333
|
-
strength: SkillProperties;
|
|
1334
|
-
hitpoints: SkillProperties;
|
|
1335
|
-
ranged: SkillProperties;
|
|
1336
|
-
prayer: SkillProperties;
|
|
1337
|
-
magic: SkillProperties;
|
|
1338
|
-
cooking: SkillProperties;
|
|
1339
|
-
woodcutting: SkillProperties;
|
|
1340
|
-
fletching: SkillProperties;
|
|
1341
|
-
fishing: SkillProperties;
|
|
1342
|
-
firemaking: SkillProperties;
|
|
1343
|
-
crafting: SkillProperties;
|
|
1344
|
-
smithing: SkillProperties;
|
|
1345
|
-
mining: SkillProperties;
|
|
1346
|
-
herblore: SkillProperties;
|
|
1347
|
-
agility: SkillProperties;
|
|
1348
|
-
thieving: SkillProperties;
|
|
1349
|
-
slayer: SkillProperties;
|
|
1350
|
-
farming: SkillProperties;
|
|
1351
|
-
runecrafting: SkillProperties;
|
|
1352
|
-
hunter: SkillProperties;
|
|
1353
|
-
construction: SkillProperties;
|
|
1354
|
-
};
|
|
1355
|
-
declare const METRICS: string[];
|
|
1356
|
-
declare const SKILLS: ("overall" | "attack" | "defence" | "strength" | "hitpoints" | "ranged" | "prayer" | "magic" | "cooking" | "woodcutting" | "fletching" | "fishing" | "firemaking" | "crafting" | "smithing" | "mining" | "herblore" | "agility" | "thieving" | "slayer" | "farming" | "runecrafting" | "hunter" | "construction")[];
|
|
1357
|
-
declare const BOSSES: ("abyssal_sire" | "alchemical_hydra" | "barrows_chests" | "bryophyta" | "callisto" | "cerberus" | "chambers_of_xeric" | "chambers_of_xeric_challenge_mode" | "chaos_elemental" | "chaos_fanatic" | "commander_zilyana" | "corporeal_beast" | "crazy_archaeologist" | "dagannoth_prime" | "dagannoth_rex" | "dagannoth_supreme" | "deranged_archaeologist" | "general_graardor" | "giant_mole" | "grotesque_guardians" | "hespori" | "kalphite_queen" | "king_black_dragon" | "kraken" | "kreearra" | "kril_tsutsaroth" | "mimic" | "nex" | "nightmare" | "phosanis_nightmare" | "obor" | "sarachnis" | "scorpia" | "skotizo" | "tempoross" | "the_gauntlet" | "the_corrupted_gauntlet" | "theatre_of_blood" | "theatre_of_blood_hard_mode" | "thermonuclear_smoke_devil" | "tombs_of_amascut" | "tombs_of_amascut_expert" | "tzkal_zuk" | "tztok_jad" | "venenatis" | "vetion" | "vorkath" | "wintertodt" | "zalcano" | "zulrah")[];
|
|
1358
|
-
declare const ACTIVITIES: string[];
|
|
1359
|
-
declare const COMPUTED_METRICS: ("ehp" | "ehb")[];
|
|
1360
|
-
declare const REAL_SKILLS: ("overall" | "attack" | "defence" | "strength" | "hitpoints" | "ranged" | "prayer" | "magic" | "cooking" | "woodcutting" | "fletching" | "fishing" | "firemaking" | "crafting" | "smithing" | "mining" | "herblore" | "agility" | "thieving" | "slayer" | "farming" | "runecrafting" | "hunter" | "construction")[];
|
|
1361
|
-
declare const F2P_BOSSES: ("abyssal_sire" | "alchemical_hydra" | "barrows_chests" | "bryophyta" | "callisto" | "cerberus" | "chambers_of_xeric" | "chambers_of_xeric_challenge_mode" | "chaos_elemental" | "chaos_fanatic" | "commander_zilyana" | "corporeal_beast" | "crazy_archaeologist" | "dagannoth_prime" | "dagannoth_rex" | "dagannoth_supreme" | "deranged_archaeologist" | "general_graardor" | "giant_mole" | "grotesque_guardians" | "hespori" | "kalphite_queen" | "king_black_dragon" | "kraken" | "kreearra" | "kril_tsutsaroth" | "mimic" | "nex" | "nightmare" | "phosanis_nightmare" | "obor" | "sarachnis" | "scorpia" | "skotizo" | "tempoross" | "the_gauntlet" | "the_corrupted_gauntlet" | "theatre_of_blood" | "theatre_of_blood_hard_mode" | "thermonuclear_smoke_devil" | "tombs_of_amascut" | "tombs_of_amascut_expert" | "tzkal_zuk" | "tztok_jad" | "venenatis" | "vetion" | "vorkath" | "wintertodt" | "zalcano" | "zulrah")[];
|
|
1362
|
-
declare const MEMBER_SKILLS: ("overall" | "attack" | "defence" | "strength" | "hitpoints" | "ranged" | "prayer" | "magic" | "cooking" | "woodcutting" | "fletching" | "fishing" | "firemaking" | "crafting" | "smithing" | "mining" | "herblore" | "agility" | "thieving" | "slayer" | "farming" | "runecrafting" | "hunter" | "construction")[];
|
|
1363
|
-
declare const COMBAT_SKILLS: ("overall" | "attack" | "defence" | "strength" | "hitpoints" | "ranged" | "prayer" | "magic" | "cooking" | "woodcutting" | "fletching" | "fishing" | "firemaking" | "crafting" | "smithing" | "mining" | "herblore" | "agility" | "thieving" | "slayer" | "farming" | "runecrafting" | "hunter" | "construction")[];
|
|
1364
|
-
declare function findMetric(metricName: string): Metric | null;
|
|
1365
|
-
declare function isMetric(metricString: string): metricString is Metric;
|
|
1366
|
-
declare function isSkill(metric: Metric | string): metric is Skill;
|
|
1367
|
-
declare function isActivity(metric: Metric | string): metric is Activity;
|
|
1368
|
-
declare function isBoss(metric: Metric | string): metric is Boss;
|
|
1369
|
-
declare function isComputedMetric(metric: Metric | string): metric is ComputedMetric;
|
|
1370
|
-
declare function getMetricRankKey(metric: Metric): string;
|
|
1371
|
-
declare function getMetricValueKey(metric: Metric): string;
|
|
1372
|
-
declare function getMetricMeasure(metric: Metric): any;
|
|
1373
|
-
declare function getMetricName(metric: Metric): any;
|
|
1374
|
-
declare function getMinimumBossKc(metric: Metric): number;
|
|
1375
|
-
declare function getParentEfficiencyMetric(metric: Metric): "ehp" | "ehb";
|
|
1376
|
-
declare function parseMetricAbbreviation(abbreviation: string): string | null;
|
|
1377
|
-
|
|
1378
|
-
declare type PeriodPropsMap = {
|
|
1379
|
-
[period in Period]: {
|
|
1380
|
-
name: string;
|
|
1381
|
-
milliseconds: number;
|
|
1382
|
-
};
|
|
1383
|
-
};
|
|
1384
|
-
declare const PeriodProps: PeriodPropsMap;
|
|
1385
|
-
declare const PERIODS: ("five_min" | "day" | "week" | "month" | "year")[];
|
|
1386
|
-
declare function findPeriod(periodName: string): Period | null;
|
|
1387
|
-
declare function isPeriod(periodString: string): periodString is Period;
|
|
1388
|
-
declare function parsePeriodExpression(periodExpression: string): {
|
|
1389
|
-
expression: string;
|
|
1390
|
-
durationMs: number;
|
|
1391
|
-
};
|
|
1392
|
-
|
|
1393
|
-
declare type PlayerTypePropsMap = {
|
|
1394
|
-
[playerType in PlayerType]: {
|
|
1395
|
-
name: string;
|
|
1396
|
-
};
|
|
1397
|
-
};
|
|
1398
|
-
declare type PlayerBuildPropsMap = {
|
|
1399
|
-
[playerBuild in PlayerBuild]: {
|
|
1400
|
-
name: string;
|
|
1401
|
-
};
|
|
1402
|
-
};
|
|
1403
|
-
declare const PlayerTypeProps: PlayerTypePropsMap;
|
|
1404
|
-
declare const PlayerBuildProps: PlayerBuildPropsMap;
|
|
1405
|
-
declare const PLAYER_TYPES: ("unknown" | "regular" | "ironman" | "hardcore" | "ultimate")[];
|
|
1406
|
-
declare const PLAYER_BUILDS: ("main" | "f2p" | "lvl3" | "zerker" | "def1" | "hp10")[];
|
|
1407
|
-
declare function isPlayerType(typeString: string): typeString is PlayerType;
|
|
1408
|
-
declare function isPlayerBuild(buildString: string): buildString is PlayerBuild;
|
|
1409
|
-
declare function findPlayerType(typeName: string): PlayerType | null;
|
|
1410
|
-
declare function findPlayerBuild(buildName: string): PlayerBuild | null;
|
|
1411
|
-
|
|
1412
|
-
declare function formatNumber(num: number, withLetters?: boolean): string | -1;
|
|
1413
|
-
declare function padNumber(value: number): string;
|
|
1414
|
-
declare function round(num: number, cases: number): number;
|
|
1415
|
-
|
|
1416
1190
|
declare type Achievement = Omit<Prisma_Base_Achievement, 'threshold'> & {
|
|
1417
1191
|
threshold: number;
|
|
1418
1192
|
};
|
|
@@ -1485,18 +1259,10 @@ interface PlayerDeltasArray {
|
|
|
1485
1259
|
computed: Array<ComputedMetricDelta>;
|
|
1486
1260
|
}
|
|
1487
1261
|
interface PlayerDeltasMap {
|
|
1488
|
-
skills:
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
[boss in Boss]?: BossDelta;
|
|
1493
|
-
};
|
|
1494
|
-
activities: {
|
|
1495
|
-
[activity in Activity]?: ActivityDelta;
|
|
1496
|
-
};
|
|
1497
|
-
computed: {
|
|
1498
|
-
[computedMetric in ComputedMetric]?: ComputedMetricDelta;
|
|
1499
|
-
};
|
|
1262
|
+
skills: MapOf<Skill, SkillDelta>;
|
|
1263
|
+
bosses: MapOf<Boss, BossDelta>;
|
|
1264
|
+
activities: MapOf<Activity, ActivityDelta>;
|
|
1265
|
+
computed: MapOf<ComputedMetric, ComputedMetricDelta>;
|
|
1500
1266
|
}
|
|
1501
1267
|
interface DeltaLeaderboardEntry {
|
|
1502
1268
|
player: Player;
|
|
@@ -1540,18 +1306,10 @@ interface FormattedSnapshot {
|
|
|
1540
1306
|
createdAt: Date;
|
|
1541
1307
|
importedAt: Date | null;
|
|
1542
1308
|
data: {
|
|
1543
|
-
skills:
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
[boss in Boss]?: BossValue;
|
|
1548
|
-
};
|
|
1549
|
-
activities: {
|
|
1550
|
-
[activity in Activity]?: ActivityValue;
|
|
1551
|
-
};
|
|
1552
|
-
computed: {
|
|
1553
|
-
[computed in ComputedMetric]?: ComputedMetric;
|
|
1554
|
-
};
|
|
1309
|
+
skills: MapOf<Skill, SkillValue>;
|
|
1310
|
+
bosses: MapOf<Boss, BossValue>;
|
|
1311
|
+
activities: MapOf<Activity, ActivityValue>;
|
|
1312
|
+
computed: MapOf<ComputedMetric, ComputedMetricValue>;
|
|
1555
1313
|
};
|
|
1556
1314
|
}
|
|
1557
1315
|
|
|
@@ -1645,15 +1403,9 @@ declare type Top5ProgressResult = Array<{
|
|
|
1645
1403
|
}>;
|
|
1646
1404
|
}>;
|
|
1647
1405
|
|
|
1648
|
-
declare type ExperienceMap =
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
declare type KillcountMap = {
|
|
1652
|
-
[boss in Boss]?: number;
|
|
1653
|
-
};
|
|
1654
|
-
declare type EfficiencyMap = {
|
|
1655
|
-
[m in Skill | Boss]?: number;
|
|
1656
|
-
};
|
|
1406
|
+
declare type ExperienceMap = MapOf<Skill, number>;
|
|
1407
|
+
declare type KillcountMap = MapOf<Boss, number>;
|
|
1408
|
+
declare type EfficiencyMap = ExperienceMap & KillcountMap;
|
|
1657
1409
|
declare enum BonusType {
|
|
1658
1410
|
START = 0,
|
|
1659
1411
|
END = 1
|
|
@@ -1698,9 +1450,7 @@ interface EfficiencyAlgorithm {
|
|
|
1698
1450
|
calculateSkillEHP(skill: Skill, experienceMap: ExperienceMap): number;
|
|
1699
1451
|
calculateBossEHB(boss: Boss, killcountMap: KillcountMap): number;
|
|
1700
1452
|
}
|
|
1701
|
-
declare type AlgorithmCache =
|
|
1702
|
-
[a in EfficiencyAlgorithmType]: EfficiencyAlgorithm;
|
|
1703
|
-
};
|
|
1453
|
+
declare type AlgorithmCache = MapOf<EfficiencyAlgorithmType, EfficiencyAlgorithm>;
|
|
1704
1454
|
|
|
1705
1455
|
declare type NameChangeDetails = {
|
|
1706
1456
|
nameChange: NameChange;
|
|
@@ -1728,6 +1478,237 @@ declare type RecordLeaderboardEntry = Record & {
|
|
|
1728
1478
|
player: Player;
|
|
1729
1479
|
};
|
|
1730
1480
|
|
|
1481
|
+
declare type MapOf<K extends keyof any, T> = {
|
|
1482
|
+
[P in K]: T;
|
|
1483
|
+
};
|
|
1484
|
+
|
|
1485
|
+
declare enum CompetitionStatus {
|
|
1486
|
+
UPCOMING = "upcoming",
|
|
1487
|
+
ONGOING = "ongoing",
|
|
1488
|
+
FINISHED = "finished"
|
|
1489
|
+
}
|
|
1490
|
+
declare const CompetitionTypeProps: MapOf<CompetitionType, {
|
|
1491
|
+
name: string;
|
|
1492
|
+
}>;
|
|
1493
|
+
declare const CompetitionStatusProps: MapOf<CompetitionStatus, {
|
|
1494
|
+
name: string;
|
|
1495
|
+
}>;
|
|
1496
|
+
declare const COMPETITION_TYPES: ("classic" | "team")[];
|
|
1497
|
+
declare const COMPETITION_STATUSES: CompetitionStatus[];
|
|
1498
|
+
declare function isCompetitionType(typeString: string): typeString is CompetitionType;
|
|
1499
|
+
declare function isCompetitionStatus(statusString: string): statusString is CompetitionStatus;
|
|
1500
|
+
|
|
1501
|
+
interface CountryDetails {
|
|
1502
|
+
code: Country;
|
|
1503
|
+
name: string;
|
|
1504
|
+
}
|
|
1505
|
+
declare const CountryProps: MapOf<Country, CountryDetails>;
|
|
1506
|
+
declare const COUNTRY_CODES: ("AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW")[];
|
|
1507
|
+
declare function isCountry(countryCodeString: string): countryCodeString is Country;
|
|
1508
|
+
declare function findCountry(countryIdentifier: string): CountryDetails | undefined;
|
|
1509
|
+
declare function findCountryByName(countryName: string): CountryDetails | undefined;
|
|
1510
|
+
declare function findCountryByCode(countryCode: string): CountryDetails | undefined;
|
|
1511
|
+
|
|
1512
|
+
declare const MAX_LEVEL = 99;
|
|
1513
|
+
declare const MAX_VIRTUAL_LEVEL = 126;
|
|
1514
|
+
declare const MAX_SKILL_EXP = 200000000;
|
|
1515
|
+
declare const SKILL_EXP_AT_99 = 13034431;
|
|
1516
|
+
declare const CAPPED_MAX_TOTAL_XP: number;
|
|
1517
|
+
declare function getExpForLevel(level: number): number;
|
|
1518
|
+
declare function getLevel(exp: number, virtual?: boolean): number;
|
|
1519
|
+
declare function getCombatLevel(attack: number, strength: number, defence: number, ranged: number, magic: number, hitpoints: number, prayer: number): number;
|
|
1520
|
+
|
|
1521
|
+
declare const GROUP_ROLES: ("magic" | "slayer" | "hunter" | "achiever" | "adamant" | "adept" | "administrator" | "admiral" | "adventurer" | "air" | "anchor" | "apothecary" | "archer" | "armadylean" | "artillery" | "artisan" | "asgarnian" | "assassin" | "assistant" | "astral" | "athlete" | "attacker" | "bandit" | "bandosian" | "barbarian" | "battlemage" | "beast" | "berserker" | "blisterwood" | "blood" | "blue" | "bob" | "body" | "brassican" | "brawler" | "brigadier" | "brigand" | "bronze" | "bruiser" | "bulwark" | "burglar" | "burnt" | "cadet" | "captain" | "carry" | "champion" | "chaos" | "cleric" | "collector" | "colonel" | "commander" | "competitor" | "completionist" | "constructor" | "cook" | "coordinator" | "corporal" | "cosmic" | "councillor" | "crafter" | "crew" | "crusader" | "cutpurse" | "death" | "defender" | "defiler" | "deputy_owner" | "destroyer" | "diamond" | "diseased" | "doctor" | "dogsbody" | "dragon" | "dragonstone" | "druid" | "duellist" | "earth" | "elite" | "emerald" | "enforcer" | "epic" | "executive" | "expert" | "explorer" | "farmer" | "feeder" | "fighter" | "fire" | "firemaker" | "firestarter" | "fisher" | "fletcher" | "forager" | "fremennik" | "gamer" | "gatherer" | "general" | "gnome_child" | "gnome_elder" | "goblin" | "gold" | "goon" | "green" | "grey" | "guardian" | "guthixian" | "harpoon" | "healer" | "hellcat" | "helper" | "herbologist" | "hero" | "holy" | "hoarder" | "ignitor" | "illusionist" | "imp" | "infantry" | "inquisitor" | "iron" | "jade" | "justiciar" | "kandarin" | "karamjan" | "kharidian" | "kitten" | "knight" | "labourer" | "law" | "leader" | "learner" | "legacy" | "legend" | "legionnaire" | "lieutenant" | "looter" | "lumberjack" | "magician" | "major" | "maple" | "marshal" | "master" | "maxed" | "mediator" | "medic" | "mentor" | "member" | "merchant" | "mind" | "miner" | "minion" | "misthalinian" | "mithril" | "moderator" | "monarch" | "morytanian" | "mystic" | "myth" | "natural" | "nature" | "necromancer" | "ninja" | "noble" | "novice" | "nurse" | "oak" | "officer" | "onyx" | "opal" | "oracle" | "orange" | "owner" | "page" | "paladin" | "pawn" | "pilgrim" | "pine" | "pink" | "prefect" | "priest" | "private" | "prodigy" | "proselyte" | "prospector" | "protector" | "pure" | "purple" | "pyromancer" | "quester" | "racer" | "raider" | "ranger" | "record_chaser" | "recruit" | "recruiter" | "red_topaz" | "red" | "rogue" | "ruby" | "rune" | "runecrafter" | "sage" | "sapphire" | "saradominist" | "saviour" | "scavenger" | "scholar" | "scourge" | "scout" | "scribe" | "seer" | "senator" | "sentry" | "serenist" | "sergeant" | "shaman" | "sheriff" | "short_green_guy" | "skiller" | "skulled" | "smiter" | "smith" | "smuggler" | "sniper" | "soul" | "specialist" | "speed_runner" | "spellcaster" | "squire" | "staff" | "steel" | "strider" | "striker" | "summoner" | "superior" | "supervisor" | "teacher" | "templar" | "therapist" | "thief" | "tirannian" | "trialist" | "trickster" | "tzkal" | "tztok" | "unholy" | "vagrant" | "vanguard" | "walker" | "wanderer" | "warden" | "warlock" | "warrior" | "water" | "wild" | "willow" | "wily" | "wintumber" | "witch" | "wizard" | "worker" | "wrath" | "xerician" | "yellow" | "yew" | "zamorakian" | "zarosian" | "zealot" | "zenyte")[];
|
|
1522
|
+
declare const PRIVELEGED_GROUP_ROLES: GroupRole[];
|
|
1523
|
+
declare type GroupRolePropsMap = MapOf<GroupRole, {
|
|
1524
|
+
name: string;
|
|
1525
|
+
isPriveleged: boolean;
|
|
1526
|
+
}>;
|
|
1527
|
+
declare const GroupRoleProps: GroupRolePropsMap;
|
|
1528
|
+
declare function findGroupRole(roleName: string): GroupRole | null;
|
|
1529
|
+
declare function isGroupRole(roleString: string): roleString is GroupRole;
|
|
1530
|
+
|
|
1531
|
+
declare enum MetricType {
|
|
1532
|
+
SKILL = "skill",
|
|
1533
|
+
BOSS = "boss",
|
|
1534
|
+
ACTIVITY = "activity",
|
|
1535
|
+
COMPUTED = "computed"
|
|
1536
|
+
}
|
|
1537
|
+
declare enum MetricMeasure {
|
|
1538
|
+
EXPERIENCE = "experience",
|
|
1539
|
+
KILLS = "kills",
|
|
1540
|
+
SCORE = "score",
|
|
1541
|
+
VALUE = "value"
|
|
1542
|
+
}
|
|
1543
|
+
interface SkillProperties {
|
|
1544
|
+
name: string;
|
|
1545
|
+
isCombat: boolean;
|
|
1546
|
+
isMembers: boolean;
|
|
1547
|
+
type: MetricType;
|
|
1548
|
+
measure: MetricMeasure;
|
|
1549
|
+
}
|
|
1550
|
+
interface BossProperties {
|
|
1551
|
+
name: string;
|
|
1552
|
+
minimumKc: number;
|
|
1553
|
+
isMembers: boolean;
|
|
1554
|
+
type: MetricType;
|
|
1555
|
+
measure: MetricMeasure;
|
|
1556
|
+
}
|
|
1557
|
+
interface ActivityProperties {
|
|
1558
|
+
name: string;
|
|
1559
|
+
type: MetricType;
|
|
1560
|
+
measure: MetricMeasure;
|
|
1561
|
+
}
|
|
1562
|
+
interface ComputedMetricProperties {
|
|
1563
|
+
name: string;
|
|
1564
|
+
type: MetricType;
|
|
1565
|
+
measure: MetricMeasure;
|
|
1566
|
+
}
|
|
1567
|
+
declare const MetricProps: {
|
|
1568
|
+
readonly ehp: ComputedMetricProperties;
|
|
1569
|
+
readonly ehb: ComputedMetricProperties;
|
|
1570
|
+
readonly league_points: ActivityProperties;
|
|
1571
|
+
readonly bounty_hunter_hunter: ActivityProperties;
|
|
1572
|
+
readonly bounty_hunter_rogue: ActivityProperties;
|
|
1573
|
+
readonly clue_scrolls_all: ActivityProperties;
|
|
1574
|
+
readonly clue_scrolls_beginner: ActivityProperties;
|
|
1575
|
+
readonly clue_scrolls_easy: ActivityProperties;
|
|
1576
|
+
readonly clue_scrolls_medium: ActivityProperties;
|
|
1577
|
+
readonly clue_scrolls_hard: ActivityProperties;
|
|
1578
|
+
readonly clue_scrolls_elite: ActivityProperties;
|
|
1579
|
+
readonly clue_scrolls_master: ActivityProperties;
|
|
1580
|
+
readonly last_man_standing: ActivityProperties;
|
|
1581
|
+
readonly pvp_arena: ActivityProperties;
|
|
1582
|
+
readonly soul_wars_zeal: ActivityProperties;
|
|
1583
|
+
readonly guardians_of_the_rift: ActivityProperties;
|
|
1584
|
+
readonly abyssal_sire: BossProperties;
|
|
1585
|
+
readonly alchemical_hydra: BossProperties;
|
|
1586
|
+
readonly barrows_chests: BossProperties;
|
|
1587
|
+
readonly bryophyta: BossProperties;
|
|
1588
|
+
readonly callisto: BossProperties;
|
|
1589
|
+
readonly cerberus: BossProperties;
|
|
1590
|
+
readonly chambers_of_xeric: BossProperties;
|
|
1591
|
+
readonly chambers_of_xeric_challenge_mode: BossProperties;
|
|
1592
|
+
readonly chaos_elemental: BossProperties;
|
|
1593
|
+
readonly chaos_fanatic: BossProperties;
|
|
1594
|
+
readonly commander_zilyana: BossProperties;
|
|
1595
|
+
readonly corporeal_beast: BossProperties;
|
|
1596
|
+
readonly crazy_archaeologist: BossProperties;
|
|
1597
|
+
readonly dagannoth_prime: BossProperties;
|
|
1598
|
+
readonly dagannoth_rex: BossProperties;
|
|
1599
|
+
readonly dagannoth_supreme: BossProperties;
|
|
1600
|
+
readonly deranged_archaeologist: BossProperties;
|
|
1601
|
+
readonly general_graardor: BossProperties;
|
|
1602
|
+
readonly giant_mole: BossProperties;
|
|
1603
|
+
readonly grotesque_guardians: BossProperties;
|
|
1604
|
+
readonly hespori: BossProperties;
|
|
1605
|
+
readonly kalphite_queen: BossProperties;
|
|
1606
|
+
readonly king_black_dragon: BossProperties;
|
|
1607
|
+
readonly kraken: BossProperties;
|
|
1608
|
+
readonly kreearra: BossProperties;
|
|
1609
|
+
readonly kril_tsutsaroth: BossProperties;
|
|
1610
|
+
readonly mimic: BossProperties;
|
|
1611
|
+
readonly nex: BossProperties;
|
|
1612
|
+
readonly nightmare: BossProperties;
|
|
1613
|
+
readonly phosanis_nightmare: BossProperties;
|
|
1614
|
+
readonly obor: BossProperties;
|
|
1615
|
+
readonly sarachnis: BossProperties;
|
|
1616
|
+
readonly scorpia: BossProperties;
|
|
1617
|
+
readonly skotizo: BossProperties;
|
|
1618
|
+
readonly tempoross: BossProperties;
|
|
1619
|
+
readonly the_gauntlet: BossProperties;
|
|
1620
|
+
readonly the_corrupted_gauntlet: BossProperties;
|
|
1621
|
+
readonly theatre_of_blood: BossProperties;
|
|
1622
|
+
readonly theatre_of_blood_hard_mode: BossProperties;
|
|
1623
|
+
readonly thermonuclear_smoke_devil: BossProperties;
|
|
1624
|
+
readonly tombs_of_amascut: BossProperties;
|
|
1625
|
+
readonly tombs_of_amascut_expert: BossProperties;
|
|
1626
|
+
readonly tzkal_zuk: BossProperties;
|
|
1627
|
+
readonly tztok_jad: BossProperties;
|
|
1628
|
+
readonly venenatis: BossProperties;
|
|
1629
|
+
readonly vetion: BossProperties;
|
|
1630
|
+
readonly vorkath: BossProperties;
|
|
1631
|
+
readonly wintertodt: BossProperties;
|
|
1632
|
+
readonly zalcano: BossProperties;
|
|
1633
|
+
readonly zulrah: BossProperties;
|
|
1634
|
+
readonly overall: SkillProperties;
|
|
1635
|
+
readonly attack: SkillProperties;
|
|
1636
|
+
readonly defence: SkillProperties;
|
|
1637
|
+
readonly strength: SkillProperties;
|
|
1638
|
+
readonly hitpoints: SkillProperties;
|
|
1639
|
+
readonly ranged: SkillProperties;
|
|
1640
|
+
readonly prayer: SkillProperties;
|
|
1641
|
+
readonly magic: SkillProperties;
|
|
1642
|
+
readonly cooking: SkillProperties;
|
|
1643
|
+
readonly woodcutting: SkillProperties;
|
|
1644
|
+
readonly fletching: SkillProperties;
|
|
1645
|
+
readonly fishing: SkillProperties;
|
|
1646
|
+
readonly firemaking: SkillProperties;
|
|
1647
|
+
readonly crafting: SkillProperties;
|
|
1648
|
+
readonly smithing: SkillProperties;
|
|
1649
|
+
readonly mining: SkillProperties;
|
|
1650
|
+
readonly herblore: SkillProperties;
|
|
1651
|
+
readonly agility: SkillProperties;
|
|
1652
|
+
readonly thieving: SkillProperties;
|
|
1653
|
+
readonly slayer: SkillProperties;
|
|
1654
|
+
readonly farming: SkillProperties;
|
|
1655
|
+
readonly runecrafting: SkillProperties;
|
|
1656
|
+
readonly hunter: SkillProperties;
|
|
1657
|
+
readonly construction: SkillProperties;
|
|
1658
|
+
};
|
|
1659
|
+
declare const METRICS: Metric[];
|
|
1660
|
+
declare const SKILLS: Skill[];
|
|
1661
|
+
declare const BOSSES: Boss[];
|
|
1662
|
+
declare const ACTIVITIES: Activity[];
|
|
1663
|
+
declare const COMPUTED_METRICS: ComputedMetric[];
|
|
1664
|
+
declare const REAL_SKILLS: Skill[];
|
|
1665
|
+
declare const F2P_BOSSES: Boss[];
|
|
1666
|
+
declare const MEMBER_SKILLS: Skill[];
|
|
1667
|
+
declare const COMBAT_SKILLS: Skill[];
|
|
1668
|
+
declare function findMetric(metricName: string): Metric | null;
|
|
1669
|
+
declare function isMetric(metricString: string): metricString is Metric;
|
|
1670
|
+
declare function isSkill(metric: Metric | string): metric is Skill;
|
|
1671
|
+
declare function isActivity(metric: Metric | string): metric is Activity;
|
|
1672
|
+
declare function isBoss(metric: Metric | string): metric is Boss;
|
|
1673
|
+
declare function isComputedMetric(metric: Metric | string): metric is ComputedMetric;
|
|
1674
|
+
declare function getMetricRankKey(metric: Metric): string;
|
|
1675
|
+
declare function getMetricValueKey(metric: Metric): string;
|
|
1676
|
+
declare function getMetricMeasure(metric: Metric): MetricMeasure;
|
|
1677
|
+
declare function getMetricName(metric: Metric): string;
|
|
1678
|
+
declare function getMinimumBossKc(metric: Metric): number;
|
|
1679
|
+
declare function getParentEfficiencyMetric(metric: Metric): "ehp" | "ehb";
|
|
1680
|
+
declare function parseMetricAbbreviation(abbreviation: string): string | null;
|
|
1681
|
+
|
|
1682
|
+
declare type PeriodPropsMap = MapOf<Period, {
|
|
1683
|
+
name: string;
|
|
1684
|
+
milliseconds: number;
|
|
1685
|
+
}>;
|
|
1686
|
+
declare const PeriodProps: PeriodPropsMap;
|
|
1687
|
+
declare const PERIODS: ("five_min" | "day" | "week" | "month" | "year")[];
|
|
1688
|
+
declare function findPeriod(periodName: string): Period | null;
|
|
1689
|
+
declare function isPeriod(periodString: string): periodString is Period;
|
|
1690
|
+
declare function parsePeriodExpression(periodExpression: string): {
|
|
1691
|
+
expression: string;
|
|
1692
|
+
durationMs: number;
|
|
1693
|
+
};
|
|
1694
|
+
|
|
1695
|
+
declare const PlayerTypeProps: MapOf<PlayerType, {
|
|
1696
|
+
name: string;
|
|
1697
|
+
}>;
|
|
1698
|
+
declare const PlayerBuildProps: MapOf<PlayerBuild, {
|
|
1699
|
+
name: string;
|
|
1700
|
+
}>;
|
|
1701
|
+
declare const PLAYER_TYPES: ("unknown" | "regular" | "ironman" | "hardcore" | "ultimate")[];
|
|
1702
|
+
declare const PLAYER_BUILDS: ("main" | "f2p" | "lvl3" | "zerker" | "def1" | "hp10")[];
|
|
1703
|
+
declare function isPlayerType(typeString: string): typeString is PlayerType;
|
|
1704
|
+
declare function isPlayerBuild(buildString: string): buildString is PlayerBuild;
|
|
1705
|
+
declare function findPlayerType(typeName: string): PlayerType | null;
|
|
1706
|
+
declare function findPlayerBuild(buildName: string): PlayerBuild | null;
|
|
1707
|
+
|
|
1708
|
+
declare function formatNumber(num: number, withLetters?: boolean): string | -1;
|
|
1709
|
+
declare function padNumber(value: number): string;
|
|
1710
|
+
declare function round(num: number, cases: number): number;
|
|
1711
|
+
|
|
1731
1712
|
interface GenericCountMessageResponse {
|
|
1732
1713
|
count: number;
|
|
1733
1714
|
message: string;
|
|
@@ -1854,7 +1835,16 @@ interface DeltaLeaderboardFilter extends BasePlayerFilter {
|
|
|
1854
1835
|
period: Period | string;
|
|
1855
1836
|
}
|
|
1856
1837
|
|
|
1857
|
-
declare class
|
|
1838
|
+
declare class BaseAPIClient {
|
|
1839
|
+
private axiosInstance;
|
|
1840
|
+
constructor(axiosInstance: AxiosInstance);
|
|
1841
|
+
postRequest<T>(path: string, body?: unknown): Promise<T>;
|
|
1842
|
+
putRequest<T>(path: string, body?: unknown): Promise<T>;
|
|
1843
|
+
deleteRequest<T>(path: string, body?: unknown): Promise<T>;
|
|
1844
|
+
getRequest<T>(path: string, params?: unknown): Promise<T>;
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
declare class DeltasClient extends BaseAPIClient {
|
|
1858
1848
|
/**
|
|
1859
1849
|
* Fetches the current top leaderboard for a specific metric, period, playerType, playerBuild and country.
|
|
1860
1850
|
* @returns A list of deltas, with their respective players, values and dates included.
|
|
@@ -1862,12 +1852,12 @@ declare class DeltasClient {
|
|
|
1862
1852
|
getDeltaLeaderboard(filter: DeltaLeaderboardFilter): Promise<DeltaLeaderboardEntry[]>;
|
|
1863
1853
|
}
|
|
1864
1854
|
|
|
1865
|
-
|
|
1866
|
-
limit
|
|
1867
|
-
offset
|
|
1868
|
-
}
|
|
1855
|
+
interface PaginationOptions {
|
|
1856
|
+
limit?: number;
|
|
1857
|
+
offset?: number;
|
|
1858
|
+
}
|
|
1869
1859
|
|
|
1870
|
-
declare class GroupsClient {
|
|
1860
|
+
declare class GroupsClient extends BaseAPIClient {
|
|
1871
1861
|
/**
|
|
1872
1862
|
* Searches for groups that match a partial name.
|
|
1873
1863
|
* @returns A list of groups.
|
|
@@ -1946,7 +1936,7 @@ declare class GroupsClient {
|
|
|
1946
1936
|
getGroupStatistics(id: number): Promise<GroupStatistics>;
|
|
1947
1937
|
}
|
|
1948
1938
|
|
|
1949
|
-
declare class PlayersClient {
|
|
1939
|
+
declare class PlayersClient extends BaseAPIClient {
|
|
1950
1940
|
/**
|
|
1951
1941
|
* Searches players by partial username.
|
|
1952
1942
|
* @returns A list of players.
|
|
@@ -2019,7 +2009,7 @@ declare class PlayersClient {
|
|
|
2019
2009
|
getPlayerNames(player: PlayerResolvable): Promise<NameChange[]>;
|
|
2020
2010
|
}
|
|
2021
2011
|
|
|
2022
|
-
declare class RecordsClient {
|
|
2012
|
+
declare class RecordsClient extends BaseAPIClient {
|
|
2023
2013
|
/**
|
|
2024
2014
|
* Fetches the current records leaderboard for a specific metric, period, playerType, playerBuild and country.
|
|
2025
2015
|
* @returns A list of records, with their respective players, dates and values included.
|
|
@@ -2027,7 +2017,7 @@ declare class RecordsClient {
|
|
|
2027
2017
|
getRecordLeaderboard(filter: RecordLeaderboardFilter): Promise<RecordLeaderboardEntry[]>;
|
|
2028
2018
|
}
|
|
2029
2019
|
|
|
2030
|
-
declare class EfficiencyClient {
|
|
2020
|
+
declare class EfficiencyClient extends BaseAPIClient {
|
|
2031
2021
|
/**
|
|
2032
2022
|
* Fetches the current efficiency leaderboard for a specific efficiency metric, playerType, playerBuild and country.
|
|
2033
2023
|
* @returns A list of players.
|
|
@@ -2045,7 +2035,7 @@ declare class EfficiencyClient {
|
|
|
2045
2035
|
getEHBRates(algorithmType: EfficiencyAlgorithmTypeUnion): Promise<BossMetaConfig[]>;
|
|
2046
2036
|
}
|
|
2047
2037
|
|
|
2048
|
-
declare class NameChangesClient {
|
|
2038
|
+
declare class NameChangesClient extends BaseAPIClient {
|
|
2049
2039
|
/**
|
|
2050
2040
|
* Searches for name changes that match a name and/or status filter.
|
|
2051
2041
|
* @returns A list of name changes.
|
|
@@ -2063,7 +2053,7 @@ declare class NameChangesClient {
|
|
|
2063
2053
|
getNameChangeDetails(id: number): Promise<NameChangeDetails>;
|
|
2064
2054
|
}
|
|
2065
2055
|
|
|
2066
|
-
declare class CompetitionsClient {
|
|
2056
|
+
declare class CompetitionsClient extends BaseAPIClient {
|
|
2067
2057
|
/**
|
|
2068
2058
|
* Searches for competitions that match a title, type, metric and status filter.
|
|
2069
2059
|
* @returns A list of competitions.
|
|
@@ -2122,6 +2112,11 @@ declare class CompetitionsClient {
|
|
|
2122
2112
|
updateAll(id: number, verificationCode: string): Promise<GenericCountMessageResponse>;
|
|
2123
2113
|
}
|
|
2124
2114
|
|
|
2115
|
+
interface WOMClientOptions {
|
|
2116
|
+
apiKey?: string;
|
|
2117
|
+
userAgent?: string;
|
|
2118
|
+
baseAPIUrl?: string;
|
|
2119
|
+
}
|
|
2125
2120
|
declare class WOMClient {
|
|
2126
2121
|
deltas: DeltasClient;
|
|
2127
2122
|
groups: GroupsClient;
|
|
@@ -2130,7 +2125,7 @@ declare class WOMClient {
|
|
|
2130
2125
|
efficiency: EfficiencyClient;
|
|
2131
2126
|
nameChanges: NameChangesClient;
|
|
2132
2127
|
competitions: CompetitionsClient;
|
|
2133
|
-
constructor();
|
|
2128
|
+
constructor(options?: WOMClientOptions);
|
|
2134
2129
|
}
|
|
2135
2130
|
|
|
2136
|
-
export { ACTIVITIES, Achievement, AchievementDefinition, AchievementProgress, AchievementTemplate, Activity, ActivityDelta, ActivityValue, AlgorithmCache, AssertPlayerTypeResponse, BOSSES, Bonus, BonusType, Boss, BossDelta, BossMetaConfig, BossValue, CAPPED_MAX_TOTAL_XP, CMLGroupData, COMBAT_SKILLS, COMPETITION_STATUSES, COMPETITION_TYPES, COMPUTED_METRICS, COUNTRY_CODES, ChangeMemberRolePayload, CompetitionDetails, CompetitionListItem, CompetitionStatus, CompetitionStatusProps, CompetitionType, CompetitionTypeProps, CompetitionWithParticipations, CompetitionsSearchFilter, ComputedMetric, ComputedMetricDelta, ComputedMetricValue, Country, CountryDetails, CountryProps, CreateCompetitionPayload, CreateCompetitionResponse, CreateGroupPayload, CreateGroupResponse, DeltaLeaderboardEntry, DeltaLeaderboardFilter, EditCompetitionPayload, EditGroupPayload, EfficiencyAlgorithm, EfficiencyAlgorithmType, EfficiencyAlgorithmTypeUnion, EfficiencyLeaderboardsFilter, EfficiencyMap, ExperienceMap, ExtendedAchievement, F2P_BOSSES, FormattedSnapshot, GROUP_ROLES, GenericCountMessageResponse, GenericMessageResponse, GetGroupGainsFilter, GetPlayerGainsResponse, GroupDetails, GroupHiscoresActivityItem, GroupHiscoresBossItem, GroupHiscoresComputedMetricItem, GroupHiscoresEntry, GroupHiscoresSkillItem, GroupListItem, GroupMemberFragment, GroupRecordsFilter, GroupRole, GroupRoleProps, GroupStatistics, KillcountMap, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, METRICS, MeasuredDeltaProgress, MemberInput, MembershipWithGroup, MembershipWithPlayer, Metric, MetricMeasure, MetricProps, MetricType, MigrationDataSource, NameChangeDetails, NameChangeStatus, NameChangesSearchFilter, PERIODS, PLAYER_BUILDS, PLAYER_TYPES, PRIVELEGED_GROUP_ROLES, ParticipationWithCompetition, ParticipationWithPlayer, ParticipationWithPlayerAndProgress, Period, PeriodProps, Player, PlayerBuild, PlayerBuildProps, PlayerDeltasArray, PlayerDeltasMap, PlayerDetails, PlayerRecordsFilter, PlayerResolvable, PlayerType, PlayerTypeProps, REAL_SKILLS, Record, RecordLeaderboardEntry, RecordLeaderboardFilter, SKILLS, SKILL_EXP_AT_99, Skill, SkillDelta, SkillMetaConfig, SkillValue, Snapshot, SnapshotDataSource, SnapshotFragment, Team, TempleGroupData, TimeRangeFilter, Top5ProgressResult, WOMClient, findCountry, findCountryByCode, findCountryByName, findGroupRole, findMetric, findPeriod, findPlayerBuild, findPlayerType, formatNumber, getCombatLevel, getExpForLevel, getLevel, getMetricMeasure, getMetricName, getMetricRankKey, getMetricValueKey, getMinimumBossKc, getParentEfficiencyMetric, isActivity, isBoss, isCompetitionStatus, isCompetitionType, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerType, isSkill, padNumber, parseMetricAbbreviation, parsePeriodExpression, round };
|
|
2131
|
+
export { ACTIVITIES, Achievement, AchievementDefinition, AchievementProgress, AchievementTemplate, Activity, ActivityDelta, ActivityValue, AlgorithmCache, AssertPlayerTypeResponse, BOSSES, Bonus, BonusType, Boss, BossDelta, BossMetaConfig, BossValue, CAPPED_MAX_TOTAL_XP, CMLGroupData, COMBAT_SKILLS, COMPETITION_STATUSES, COMPETITION_TYPES, COMPUTED_METRICS, COUNTRY_CODES, ChangeMemberRolePayload, CompetitionDetails, CompetitionListItem, CompetitionStatus, CompetitionStatusProps, CompetitionType, CompetitionTypeProps, CompetitionWithParticipations, CompetitionsSearchFilter, ComputedMetric, ComputedMetricDelta, ComputedMetricValue, Country, CountryDetails, CountryProps, CreateCompetitionPayload, CreateCompetitionResponse, CreateGroupPayload, CreateGroupResponse, DeltaLeaderboardEntry, DeltaLeaderboardFilter, EditCompetitionPayload, EditGroupPayload, EfficiencyAlgorithm, EfficiencyAlgorithmType, EfficiencyAlgorithmTypeUnion, EfficiencyLeaderboardsFilter, EfficiencyMap, ExperienceMap, ExtendedAchievement, F2P_BOSSES, FormattedSnapshot, GROUP_ROLES, GenericCountMessageResponse, GenericMessageResponse, GetGroupGainsFilter, GetPlayerGainsResponse, GroupDetails, GroupHiscoresActivityItem, GroupHiscoresBossItem, GroupHiscoresComputedMetricItem, GroupHiscoresEntry, GroupHiscoresSkillItem, GroupListItem, GroupMemberFragment, GroupRecordsFilter, GroupRole, GroupRoleProps, GroupStatistics, KillcountMap, MAX_LEVEL, MAX_SKILL_EXP, MAX_VIRTUAL_LEVEL, MEMBER_SKILLS, METRICS, MapOf, MeasuredDeltaProgress, MemberInput, MembershipWithGroup, MembershipWithPlayer, Metric, MetricMeasure, MetricProps, MetricType, MigrationDataSource, NameChangeDetails, NameChangeStatus, NameChangesSearchFilter, PERIODS, PLAYER_BUILDS, PLAYER_TYPES, PRIVELEGED_GROUP_ROLES, ParticipationWithCompetition, ParticipationWithPlayer, ParticipationWithPlayerAndProgress, Period, PeriodProps, Player, PlayerBuild, PlayerBuildProps, PlayerDeltasArray, PlayerDeltasMap, PlayerDetails, PlayerRecordsFilter, PlayerResolvable, PlayerType, PlayerTypeProps, REAL_SKILLS, Record, RecordLeaderboardEntry, RecordLeaderboardFilter, SKILLS, SKILL_EXP_AT_99, Skill, SkillDelta, SkillMetaConfig, SkillValue, Snapshot, SnapshotDataSource, SnapshotFragment, Team, TempleGroupData, TimeRangeFilter, Top5ProgressResult, WOMClient, findCountry, findCountryByCode, findCountryByName, findGroupRole, findMetric, findPeriod, findPlayerBuild, findPlayerType, formatNumber, getCombatLevel, getExpForLevel, getLevel, getMetricMeasure, getMetricName, getMetricRankKey, getMetricValueKey, getMinimumBossKc, getParentEfficiencyMetric, isActivity, isBoss, isCompetitionStatus, isCompetitionType, isComputedMetric, isCountry, isGroupRole, isMetric, isPeriod, isPlayerBuild, isPlayerType, isSkill, padNumber, parseMetricAbbreviation, parsePeriodExpression, round };
|