osrs-json-hiscores 2.22.0 → 2.24.0

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/README.md CHANGED
@@ -137,6 +137,7 @@ Activities consist of all levels of clue scrolls as well as minigames and bosses
137
137
  | Dagannoth Rex | `dagannothRex` |
138
138
  | Dagannoth Supreme | `dagannothSupreme` |
139
139
  | Deranged Archaeologist | `derangedArchaeologist` |
140
+ | Doom of Mokhaiotl | `doomOfMokhaiotl` |
140
141
  | Duke Sucellus | `dukeSucellus` |
141
142
  | General Graardor | `generalGraardor` |
142
143
  | Giant Mole | `giantMole` |
package/lib/hiscores.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- import { Player, Stats, Gamemode, SkillName, PlayerSkillRow, ActivityName, PlayerActivityRow, GetStatsOptions, HiscoresResponse } from './types';
2
+ import { Player, Stats, PlayerSkillRow, PlayerActivityRow, GetStatsOptions, HiscoresResponse } from './types';
3
+ import { Gamemode, SkillName, ActivityName } from './utils';
3
4
  /**
4
5
  * Gets a player's stats from the official OSRS JSON endpoint.
5
6
  *
package/lib/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- export type Gamemode = 'main' | 'ironman' | 'ultimate' | 'hardcore' | 'deadman' | 'seasonal' | 'tournament' | 'skiller' | 'oneDefence' | 'freshStart';
2
+ import { BHType, Boss, ClueType, Gamemode, SkillName } from './utils';
3
3
  export interface Skill {
4
4
  rank: number;
5
5
  level: number;
@@ -9,23 +9,18 @@ export interface Activity {
9
9
  rank: number;
10
10
  score: number;
11
11
  }
12
- export type SkillName = 'overall' | 'attack' | 'defence' | 'strength' | 'hitpoints' | 'ranged' | 'prayer' | 'magic' | 'cooking' | 'woodcutting' | 'fletching' | 'fishing' | 'firemaking' | 'crafting' | 'smithing' | 'mining' | 'herblore' | 'agility' | 'thieving' | 'slayer' | 'farming' | 'runecraft' | 'hunter' | 'construction';
13
12
  export type Skills = {
14
13
  [Name in SkillName]: Skill;
15
14
  };
16
- export type ClueType = 'all' | 'beginner' | 'easy' | 'medium' | 'hard' | 'elite' | 'master';
17
15
  export type Clues = {
18
16
  [Type in ClueType]: Activity;
19
17
  };
20
- export type BHType = 'rogue' | 'hunter' | 'rogueV2' | 'hunterV2';
21
18
  export type BH = {
22
19
  [Type in BHType]: Activity;
23
20
  };
24
- export type Boss = 'abyssalSire' | 'alchemicalHydra' | 'amoxliatl' | 'araxxor' | 'artio' | 'barrows' | 'bryophyta' | 'callisto' | 'calvarion' | 'cerberus' | 'chambersOfXeric' | 'chambersOfXericChallengeMode' | 'chaosElemental' | 'chaosFanatic' | 'commanderZilyana' | 'corporealBeast' | 'crazyArchaeologist' | 'dagannothPrime' | 'dagannothRex' | 'dagannothSupreme' | 'derangedArchaeologist' | 'dukeSucellus' | 'generalGraardor' | 'giantMole' | 'grotesqueGuardians' | 'hespori' | 'kalphiteQueen' | 'kingBlackDragon' | 'kraken' | 'kreeArra' | 'krilTsutsaroth' | 'lunarChests' | 'mimic' | 'nex' | 'nightmare' | 'phosanisNightmare' | 'obor' | 'phantomMuspah' | 'sarachnis' | 'scorpia' | 'scurrius' | 'skotizo' | 'solHeredit' | 'spindel' | 'tempoross' | 'gauntlet' | 'corruptedGauntlet' | 'hueycoatl' | 'leviathan' | 'royalTitans' | 'whisperer' | 'theatreOfBlood' | 'theatreOfBloodHardMode' | 'thermonuclearSmokeDevil' | 'tombsOfAmascut' | 'tombsOfAmascutExpertMode' | 'tzKalZuk' | 'tzTokJad' | 'vardorvis' | 'venenatis' | 'vetion' | 'vorkath' | 'wintertodt' | 'yama' | 'zalcano' | 'zulrah';
25
21
  export type Bosses = {
26
22
  [Type in Boss]: Activity;
27
23
  };
28
- export type ActivityName = 'leaguePoints' | 'deadmanPoints' | 'hunterBHV2' | 'rogueBHV2' | 'hunterBH' | 'rogueBH' | 'lastManStanding' | 'pvpArena' | 'soulWarsZeal' | 'riftsClosed' | 'allClues' | 'beginnerClues' | 'easyClues' | 'mediumClues' | 'hardClues' | 'eliteClues' | 'masterClues' | 'colosseumGlory' | 'collectionsLogged' | Boss;
29
24
  export interface Stats {
30
25
  skills: Skills;
31
26
  clues: Clues;
@@ -49,7 +44,7 @@ export interface Stats {
49
44
  export type Modes = {
50
45
  [M in Gamemode]?: Stats;
51
46
  };
52
- export interface Player extends Modes {
47
+ export interface Player extends Pick<Modes, 'main' | 'ironman' | 'hardcore' | 'ultimate'> {
53
48
  name: string;
54
49
  mode: Gamemode;
55
50
  dead: boolean;
@@ -1,4 +1,3 @@
1
- import { BHType, Boss, ClueType, Gamemode, SkillName, ActivityName } from '../types';
2
1
  export declare const BASE_URL = "https://secure.runescape.com/m=hiscore_oldschool";
3
2
  export declare const STATS_URL = "index_lite.ws?player=";
4
3
  export declare const JSON_STATS_URL = "index_lite.json?player=";
@@ -7,12 +6,18 @@ export type GamemodeUrl = {
7
6
  [key in Gamemode]: string;
8
7
  };
9
8
  export declare const GAMEMODE_URL: GamemodeUrl;
10
- export declare const SKILLS: SkillName[];
11
- export declare const CLUES: ClueType[];
12
- export declare const BH_MODES: BHType[];
13
- export declare const GAMEMODES: Gamemode[];
14
- export declare const BOSSES: Boss[];
15
- export declare const ACTIVITIES: ActivityName[];
9
+ export declare const SKILLS: readonly ["overall", "attack", "defence", "strength", "hitpoints", "ranged", "prayer", "magic", "cooking", "woodcutting", "fletching", "fishing", "firemaking", "crafting", "smithing", "mining", "herblore", "agility", "thieving", "slayer", "farming", "runecraft", "hunter", "construction", "sailing"];
10
+ export type SkillName = (typeof SKILLS)[number];
11
+ export declare const CLUES: readonly ["all", "beginner", "easy", "medium", "hard", "elite", "master"];
12
+ export type ClueType = (typeof CLUES)[number];
13
+ export declare const BH_MODES: readonly ["hunterV2", "rogueV2", "hunter", "rogue"];
14
+ export type BHType = (typeof BH_MODES)[number];
15
+ export declare const GAMEMODES: readonly ["main", "ironman", "hardcore", "ultimate", "deadman", "seasonal", "tournament", "skiller", "oneDefence", "freshStart"];
16
+ export type Gamemode = (typeof GAMEMODES)[number];
17
+ export declare const BOSSES: readonly ["abyssalSire", "alchemicalHydra", "amoxliatl", "araxxor", "artio", "barrows", "bryophyta", "callisto", "calvarion", "cerberus", "chambersOfXeric", "chambersOfXericChallengeMode", "chaosElemental", "chaosFanatic", "commanderZilyana", "corporealBeast", "crazyArchaeologist", "dagannothPrime", "dagannothRex", "dagannothSupreme", "derangedArchaeologist", "doomOfMokhaiotl", "dukeSucellus", "generalGraardor", "giantMole", "grotesqueGuardians", "hespori", "kalphiteQueen", "kingBlackDragon", "kraken", "kreeArra", "krilTsutsaroth", "lunarChests", "mimic", "nex", "nightmare", "phosanisNightmare", "obor", "phantomMuspah", "sarachnis", "scorpia", "scurrius", "shellbaneGryphon", "skotizo", "solHeredit", "spindel", "tempoross", "gauntlet", "corruptedGauntlet", "hueycoatl", "leviathan", "royalTitans", "whisperer", "theatreOfBlood", "theatreOfBloodHardMode", "thermonuclearSmokeDevil", "tombsOfAmascut", "tombsOfAmascutExpertMode", "tzKalZuk", "tzTokJad", "vardorvis", "venenatis", "vetion", "vorkath", "wintertodt", "yama", "zalcano", "zulrah"];
18
+ export type Boss = (typeof BOSSES)[number];
19
+ export declare const ACTIVITIES: readonly ["leaguePoints", "deadmanPoints", "hunterBHV2", "rogueBHV2", "hunterBH", "rogueBH", "allClues", "beginnerClues", "easyClues", "mediumClues", "hardClues", "eliteClues", "masterClues", "lastManStanding", "pvpArena", "soulWarsZeal", "riftsClosed", "colosseumGlory", "collectionsLogged", "abyssalSire", "alchemicalHydra", "amoxliatl", "araxxor", "artio", "barrows", "bryophyta", "callisto", "calvarion", "cerberus", "chambersOfXeric", "chambersOfXericChallengeMode", "chaosElemental", "chaosFanatic", "commanderZilyana", "corporealBeast", "crazyArchaeologist", "dagannothPrime", "dagannothRex", "dagannothSupreme", "derangedArchaeologist", "doomOfMokhaiotl", "dukeSucellus", "generalGraardor", "giantMole", "grotesqueGuardians", "hespori", "kalphiteQueen", "kingBlackDragon", "kraken", "kreeArra", "krilTsutsaroth", "lunarChests", "mimic", "nex", "nightmare", "phosanisNightmare", "obor", "phantomMuspah", "sarachnis", "scorpia", "scurrius", "shellbaneGryphon", "skotizo", "solHeredit", "spindel", "tempoross", "gauntlet", "corruptedGauntlet", "hueycoatl", "leviathan", "royalTitans", "whisperer", "theatreOfBlood", "theatreOfBloodHardMode", "thermonuclearSmokeDevil", "tombsOfAmascut", "tombsOfAmascutExpertMode", "tzKalZuk", "tzTokJad", "vardorvis", "venenatis", "vetion", "vorkath", "wintertodt", "yama", "zalcano", "zulrah"];
20
+ export type ActivityName = (typeof ACTIVITIES)[number];
16
21
  export type FormattedBossNames = {
17
22
  [key in Boss]: string;
18
23
  };
@@ -65,7 +65,8 @@ exports.SKILLS = [
65
65
  'farming',
66
66
  'runecraft',
67
67
  'hunter',
68
- 'construction'
68
+ 'construction',
69
+ 'sailing'
69
70
  ];
70
71
  exports.CLUES = [
71
72
  'all',
@@ -84,7 +85,10 @@ exports.GAMEMODES = [
84
85
  'ultimate',
85
86
  'deadman',
86
87
  'seasonal',
87
- 'tournament'
88
+ 'tournament',
89
+ 'skiller',
90
+ 'oneDefence',
91
+ 'freshStart'
88
92
  ];
89
93
  exports.BOSSES = [
90
94
  'abyssalSire',
@@ -108,6 +112,7 @@ exports.BOSSES = [
108
112
  'dagannothRex',
109
113
  'dagannothSupreme',
110
114
  'derangedArchaeologist',
115
+ 'doomOfMokhaiotl',
111
116
  'dukeSucellus',
112
117
  'generalGraardor',
113
118
  'giantMole',
@@ -128,6 +133,7 @@ exports.BOSSES = [
128
133
  'sarachnis',
129
134
  'scorpia',
130
135
  'scurrius',
136
+ 'shellbaneGryphon',
131
137
  'skotizo',
132
138
  'solHeredit',
133
139
  'spindel',
@@ -197,6 +203,7 @@ exports.FORMATTED_BOSS_NAMES = {
197
203
  dagannothRex: 'Dagannoth Rex',
198
204
  dagannothSupreme: 'Dagannoth Supreme',
199
205
  derangedArchaeologist: 'Deranged Archaeologist',
206
+ doomOfMokhaiotl: 'Doom of Mokhaiotl',
200
207
  dukeSucellus: 'Duke Sucellus',
201
208
  generalGraardor: 'General Graardor',
202
209
  giantMole: 'Giant Mole',
@@ -217,6 +224,7 @@ exports.FORMATTED_BOSS_NAMES = {
217
224
  sarachnis: 'Sarachnis',
218
225
  scorpia: 'Scorpia',
219
226
  scurrius: 'Scurrius',
227
+ shellbaneGryphon: 'Shellbane Gryphon',
220
228
  skotizo: 'Skotizo',
221
229
  solHeredit: 'Sol Heredit',
222
230
  spindel: 'Spindel',
@@ -267,7 +275,8 @@ exports.FORMATTED_SKILL_NAMES = {
267
275
  farming: 'Farming',
268
276
  runecraft: 'Runecraft',
269
277
  hunter: 'Hunter',
270
- construction: 'Construction'
278
+ construction: 'Construction',
279
+ sailing: 'Sailing'
271
280
  };
272
281
  exports.FORMATTED_CLUE_NAMES = {
273
282
  all: 'Clue Scrolls (all)',
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- import { Gamemode, SkillName, ActivityName } from '../types';
2
+ import { Gamemode, SkillName, ActivityName } from './constants';
3
3
  /**
4
4
  * Will generate a stats URL for the official OSRS API.
5
5
  *
@@ -55,7 +55,7 @@ export declare const rsnFromElement: (el: Element | null) => string;
55
55
  * @param url URL to run a `GET` request against.
56
56
  * @returns Axios response.
57
57
  */
58
- export declare const httpGet: <Response_1>(url: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<Response_1, any>>;
58
+ export declare const httpGet: <Response_1>(url: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<Response_1, any, {}>>;
59
59
  /**
60
60
  * Validates that a provided RSN has the same username restrictions as Jagex.
61
61
  * @param rsn Username to validate.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "osrs-json-hiscores",
3
- "version": "2.22.0",
3
+ "version": "2.24.0",
4
4
  "description": "The Old School Runescape API wrapper that does more!",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",