runescape
Version:
A library to interact with the non-existent RuneScape API.
1,459 lines (1,446 loc) • 45.7 kB
TypeScript
/**
* Error codes that can be used to track a specific error.
*/
declare const ErrorCode: {
/**
* The generic error when fetching a player's profile data as viewed on RuneMetrics.
*/
readonly ProfileError: "ProfileError";
/**
* This seems to be returned on banned players.
*/
readonly ProfileNotAMember: "ProfileNotAMember";
/**
* The RuneMetrics profile of this player is not public.
*/
readonly ProfilePrivate: "ProfilePrivate";
/**
* It is supposable this player does not exist.
*/
readonly ProfileNone: "ProfileNone";
};
/**
* An error returned from the API.
*/
declare class RuneScapeAPIError extends Error {
/**
* The status code of the error.
*/
readonly statusCode: number;
/**
* The fully quallified URL of the request.
*/
readonly url: string;
/**
* Constructs an error for the API.
*
* @param name - The name of this error
* @param statusCode - The status code of the error
* @param url - The fully quallified URL of the request
*/
constructor(name: Error["name"], statusCode: RuneScapeAPIError["statusCode"], url: RuneScapeAPIError["url"]);
}
/**
* A custom error from the library.
*/
declare class RuneScapeError extends Error {
/**
* The defined error code.
*/
readonly code: (typeof ErrorCode)[keyof typeof ErrorCode];
/**
* The raw error that yielded this error.
*/
readonly rawCode: string;
/**
* The fully quallified URL of the request.
*/
readonly url: string;
/**
* Constructs a defined error from the library.
*
* @param code - The defined error code
* @param rawCode - The raw error that yielded this error
* @param url - The fully quallified URL of the request
*/
constructor(code: RuneScapeError["code"], rawCode: RuneScapeError["rawCode"], url: RuneScapeError["url"]);
get name(): string;
}
/**
* Represents a rank in a clan.
*/
declare enum ClanRank {
Owner = 0,
DeputyOwner = 1,
Overseer = 2,
Coordinator = 3,
Organiser = 4,
Administrator = 5,
General = 6,
Captain = 7,
Lieutenant = 8,
Sergeant = 9,
Corporal = 10,
Recruit = 11
}
/**
* Represents a member of a clan.
*/
interface ClanMember {
/**
* The player name of the clan member.
*/
clanmate: string;
/**
* The rank of the clan member.
*/
clanRank: ClanRank;
/**
* The total amount of experience gained by the clan member during their time in the clan.
*/
totalXP: number;
/**
* Kills by this clan member.
*
* @remarks It is believed this no longer has any meaning.
*/
kills: number;
}
/**
* Options to provide for fetching clan members.
*/
interface FetchClanMembersOptions {
/**
* The name of the clan.
*/
clanName: string;
/**
* The abort signal for the fetch.
*/
abortSignal?: AbortSignal | undefined;
}
/**
* Returns the clan members of a clan.
*
* @param options - The options to provide
* @returns Clan members data.
*/
declare function fetchClanMembers({ clanName, abortSignal, }: FetchClanMembersOptions): Promise<ClanMember[]>;
/**
* Returns if a Guthixian Cache will be a full reward.
*
* @remarks The hour will be checked.
* @param timestamp - A Unix timestamp.
* @returns Whether the occurrence will be a full reward.
* @see {@link https://runescape.wiki/w/Guthixian_Cache}
*/
declare function guthixianCache(timestamp: number): boolean;
/**
* Represents the skills in RuneScape.
*/
declare enum Skill {
Agility = "Agility",
Archaeology = "Archaeology",
Attack = "Attack",
Constitution = "Constitution",
Construction = "Construction",
Cooking = "Cooking",
Crafting = "Crafting",
Defence = "Defence",
Divination = "Divination",
Dungeoneering = "Dungeoneering",
Farming = "Farming",
Firemaking = "Firemaking",
Fishing = "Fishing",
Fletching = "Fletching",
Herblore = "Herblore",
Hunter = "Hunter",
Invention = "Invention",
Magic = "Magic",
Mining = "Mining",
Prayer = "Prayer",
Ranged = "Ranged",
Runecrafting = "Runecrafting",
Slayer = "Slayer",
Smithing = "Smithing",
Strength = "Strength",
Summoning = "Summoning",
Thieving = "Thieving",
Woodcutting = "Woodcutting"
}
/**
* Represents the data of a HiScore skill.
*/
interface HiScoreSkill<T extends Skill | "Total"> {
/**
* The name of the skill.
*/
name: T;
/**
* The rank of the skill.
*/
rank: number;
/**
* The level of the skill.
*/
level: number;
/**
* The total experience of the skill.
*/
totalXP: number;
}
/**
* Represents a player's HiScore data.
*/
interface HiScore {
/**
* Total skill data.
*/
total: HiScoreSkill<"Total">;
/**
* Attack skill data.
*/
attack: HiScoreSkill<Skill.Attack>;
/**
* Defence skill data.
*/
defence: HiScoreSkill<Skill.Defence>;
/**
* Strength skill data.
*/
strength: HiScoreSkill<Skill.Strength>;
/**
* Constitution skill data.
*/
constitution: HiScoreSkill<Skill.Constitution>;
/**
* Ranged skill data.
*/
ranged: HiScoreSkill<Skill.Ranged>;
/**
* Prayer skill data.
*/
prayer: HiScoreSkill<Skill.Prayer>;
/**
* Magic skill data.
*/
magic: HiScoreSkill<Skill.Magic>;
/**
* Cooking skill data.
*/
cooking: HiScoreSkill<Skill.Cooking>;
/**
* Woodcutting skill data.
*/
woodcutting: HiScoreSkill<Skill.Woodcutting>;
/**
* Fletching skill data.
*/
fletching: HiScoreSkill<Skill.Fletching>;
/**
* Fishing skill data.
*/
fishing: HiScoreSkill<Skill.Fishing>;
/**
* Firemaking skill data.
*/
firemaking: HiScoreSkill<Skill.Firemaking>;
/**
* Crafting skill data.
*/
crafting: HiScoreSkill<Skill.Crafting>;
/**
* Smithing skill data.
*/
smithing: HiScoreSkill<Skill.Smithing>;
/**
* Mining skill data.
*/
mining: HiScoreSkill<Skill.Mining>;
/**
* Herblore skill data.
*/
herblore: HiScoreSkill<Skill.Herblore>;
/**
* Agility skill data.
*/
agility: HiScoreSkill<Skill.Agility>;
/**
* Thieving skill data.
*/
thieving: HiScoreSkill<Skill.Thieving>;
/**
* Slayer skill data.
*/
slayer: HiScoreSkill<Skill.Slayer>;
/**
* Farming skill data.
*/
farming: HiScoreSkill<Skill.Farming>;
/**
* Runecrafting skill data.
*/
runecrafting: HiScoreSkill<Skill.Runecrafting>;
/**
* Hunter skill data.
*/
hunter: HiScoreSkill<Skill.Hunter>;
/**
* Construction skill data.
*/
construction: HiScoreSkill<Skill.Construction>;
/**
* Summoning skill data.
*/
summoning: HiScoreSkill<Skill.Summoning>;
/**
* Dungeoneering skill data.
*/
dungeoneering: HiScoreSkill<Skill.Dungeoneering>;
/**
* Divination skill data.
*/
divination: HiScoreSkill<Skill.Divination>;
/**
* Invention skill data.
*/
invention: HiScoreSkill<Skill.Invention>;
/**
* Archaeology skill data.
*/
archaeology: HiScoreSkill<Skill.Archaeology>;
}
/**
* Represents the options to provide for fetching a player's HiScore data.
*/
interface HiScoreOptions {
/**
* The player's name.
*/
name: string;
/**
* The abort signal for the fetch.
*/
abortSignal?: AbortSignal | undefined;
}
/**
* Returns the player's HiScore data.
*
* @param options - The options to provide
* @returns The HiScore data of the player.
*/
declare function hiScore({ name, abortSignal }: HiScoreOptions): Promise<HiScore>;
/**
* Represents a Group Ironman's HiScore data.
*/
interface GroupIronmanContent {
/**
* The id of the group.
*/
id: number;
/**
* The name of the group.
*/
name: string;
/**
* The total experience of the group.
*/
groupTotalXp: number;
/**
* The total level of the group.
*/
groupTotalLevel: number;
/**
* The size of the group.
*/
size: number;
/**
* It's not known what this represents.
*
* @experimental
*/
toHighlight: boolean;
/**
* Whether the group is competitive.
*/
isCompetitive: boolean;
/**
* Whether the group has founder status.
*/
founder: boolean;
}
/**
* Represents a player's HiScore data.
*/
interface GroupIronman {
/**
* The total number of groups.
*/
totalElements: HiScoreSkill<"Total">;
/**
* The total number of pages.
*/
totalPages: number;
/**
* The size of the page.
*/
size: number;
/**
* The results.
*/
content: GroupIronmanContent[];
/**
* Whether the results are on the first page.
*/
first: boolean;
/**
* Whether the results are on the last page.
*/
last: boolean;
/**
* The number of results in {@link GroupIronman.content}.
*/
numberOfElements: number;
/**
* The page number.
*/
pageNumber: number;
/**
* Whether there are no results in {@link GroupIronman.content}.
*/
empty: boolean;
}
/**
* Represents the options to provide for fetching the Group Ironman HiScores.
*/
interface GroupIronmanHiScoreOptions {
/**
* The group size.
*/
groupSize: 1 | 2 | 3 | 4 | 5;
/**
* The size of the page.
*/
size?: number | undefined;
/**
* The page number.
*
* @remarks The page number is 0-indexed.
*/
page?: number | undefined;
/**
* Whether the group is competitive.
*/
isCompetitive?: boolean | undefined;
/**
* The abort signal for the fetch.
*/
abortSignal?: AbortSignal | undefined;
}
/**
* Returns the Group Ironman HiScore data.
*
* @param options - The options to provide
* @returns The Group Ironman HiScore data.
*/
declare function groupIronman({ groupSize, size, page, isCompetitive, abortSignal, }: GroupIronmanHiScoreOptions): Promise<GroupIronman>;
/**
* The two jewels behind doors.
*/
declare enum Jewel {
ApmekenAmethyst = "Apmeken Amethyst",
ScabariteCrystal = "Scabarite Crystal"
}
/**
* Returns the accessible jewel.
*
* @param timestamp - A Unix timestamp.
* @returns The accessible jewel.
*/
declare function jewel(timestamp: number): Jewel | null;
/**
* Represents the options to provide for retrieving a player's avatar.
*/
interface AvatarOptions {
/**
* The player's name.
*/
name: string;
/**
* The desired width.
*
* @remarks 100 is the maximum number the width abides by.
*/
width?: number | undefined;
/**
* The desired height.
*
* @remarks 100 is the maximum number the height abides by.
*/
height?: number | undefined;
}
/**
* Returns the avatar of a player.
*
* @param options - The options to provide
* @returns The player's avatar link.
*/
declare function avatar({ name, width, height }: AvatarOptions): string;
/**
* Represents what may provide a clan's home page.
*/
declare enum ClanPage {
RuneInfo = "RuneInfo",
RunePixels = "Runepixels",
RuneScape = "RuneScape"
}
/**
* Represents the options to provide for retrieving clan home pages.
*/
interface ClanPageOptions {
/**
* The clan.
*/
clan: string;
}
/**
* Retrieve a clan's home pages.
*
* @param options - The options to provide
* @returns An object containing sources to their links.
*/
declare function clanPage({ clan }: ClanPageOptions): {
[]: string;
};
/**
* Represents what may provide a player's page.
*/
declare enum PlayerPage {
RuneInfo = "RuneInfo",
RuneMetrics = "RuneMetrics",
RunePixels = "Runepixels",
RuneScape = "RuneScape",
RuneTracker = "RuneTracker"
}
/**
* Represents the options to provide for retrieving player pages.
*/
interface PlayerPageOptions {
/**
* The player's name.
*/
name: string;
}
/**
* Retrieves a player's pages.
*
* @param options - The options to provide
* @returns An object containing sources to their links.
*/
declare function playerPage({ name }: PlayerPageOptions): {
[]: string;
};
/**
* Represents the options to provide for fetching the player count.
*/
interface PlayerCountOptions {
/**
* The abort signal for the fetch.
*/
abortSignal?: AbortSignal | undefined;
}
/**
* Retrieves the total number of players online in RuneScape and OldSchool RuneScape.
*
* @param options - The options to provide
* @returns The number of online players.
*/
declare function playerCount({ abortSignal }?: PlayerCountOptions): Promise<number>;
/**
* Represents the data of the amount of created accounts.
*/
interface CreatedAccounts {
/**
* The amount of created accounts.
*/
accounts: number;
/**
* A string representation of {@link CreatedAccounts.accounts}, formatted with commas.
*/
accountsFormatted: string;
}
/**
* Represents the options to provide for fetching the amount of created accounts.
*/
interface CreatedAccountsOptions {
/**
* The abort signal for the fetch.
*/
abortSignal?: AbortSignal | undefined;
}
/**
* Retrieves the amount of created accounts.
*
* @param options - The options to provide
* @returns An object with the created accounts data.
*/
declare function createdAccounts({ abortSignal, }?: CreatedAccountsOptions): Promise<CreatedAccounts>;
/**
* Represents some basic information about a player.
*/
interface PlayerDetail {
/**
* The clan of the player.
*/
clan: string | null;
/**
* Whether the title is suffixed.
*
* @remarks Since {@link PlayerDetail.title} appears to always be `null`, this also appears to always be `false`.
*/
isSuffix: boolean;
/**
* The name of the player.
*/
name: string;
/**
* Whether the player's clan is set to display that they are recruiting.
*/
recruiting: boolean | null;
/**
* The title of the player.
*
* @remarks This appears to always be `null`.
*/
title: string | null;
}
/**
* Represents the options to provide for fetching player profiles.
*/
interface PlayerDetailsOptions {
/**
* An array of player names.
*/
names: string[];
/**
* The abort signal for the fetch.
*/
abortSignal?: AbortSignal | undefined;
}
/**
* Returns player details.
*
* @param options - The options to provide
* @returns An array containing the resulting player details.
*/
declare function playerDetails({ names, abortSignal, }: PlayerDetailsOptions): Promise<PlayerDetail[]>;
/**
* Returns whether a raven has spawned in Prifddinas.
*
* @param timestamp - A Unix timestamp.
* @returns Whether a raven is currently spawned.
* @see {@link https://runescape.wiki/w/Raven_(Prifddinas)}
*/
declare function raven(timestamp: number): boolean;
interface RawProfile {
magic: number;
questsstarted: number;
totalskill: number;
questscomplete: number;
questsnotstarted: number;
totalxp: number;
ranged: number;
activities: RawProfileActivity[];
skillvalues: ProfileSkills[];
name: string;
rank: string | null;
melee: number;
combatlevel: number;
loggedIn: `${boolean}`;
}
/**
* Represents the returned RuneMetrics profile activity.
*
* @internal
*/
interface RawProfileActivity {
date: string;
details: string;
text: string;
}
/**
* Represents the RuneMetrics profile activity.
*/
interface ProfileActivity {
/**
* The timestamp of the activity.
*/
timestamp: number;
/**
* The details of the activity.
*
* @example "I killed 2 tormented demons, fewer tormented souls in the world must be a good thing."
*/
details: string;
/**
* The shortened variant of the {@link ProfileActivity.details}.
*
* @example "I killed 2 tormented demons."
*/
text: string;
}
/**
* Represents the enumeration of skills as returned from the API.
*/
declare enum SkillId {
Attack = 0,
Defence = 1,
Strength = 2,
Constitution = 3,
Ranged = 4,
Prayer = 5,
Magic = 6,
Cooking = 7,
Woodcutting = 8,
Fletching = 9,
Fishing = 10,
Firemaking = 11,
Crafting = 12,
Smithing = 13,
Mining = 14,
Herblore = 15,
Agility = 16,
Thieving = 17,
Slayer = 18,
Farming = 19,
Runecrafting = 20,
Hunter = 21,
Construction = 22,
Summoning = 23,
Dungeoneering = 24,
Divination = 25,
Invention = 26,
Archaeology = 27
}
/**
* Represents data about the player's stats as returned from the RuneMetrics profile.
*/
interface ProfileSkills {
/**
* The level of the skill.
*/
level: number;
/**
* The experience of the skill.
*
* @remarks The experience is accurate to one decimal place.
* @example 200000000.0
*/
xp: number;
/**
* The rank this skill is in the HiScores.
*/
rank: number | undefined;
/**
* The id of this skill.
*
* @remarks This is the specific number belonging to a skill. The {@link SkillId} enumeration may help here.
*/
id: SkillId;
}
/**
* Represents data about player's RuneMetrics Profile.
*/
interface Profile {
/**
* It's not known what this represents.
*
* @experimental
*/
magic: RawProfile["magic"];
/**
* The amount of quests the player has started.
*/
questsStarted: RawProfile["questsstarted"];
/**
* The total level of the player.
*/
totalSkill: RawProfile["totalskill"];
/**
* The amount of quests the player has completed.
*/
questsComplete: RawProfile["questscomplete"];
/**
* The amount of quests the player has not started.
*/
questsNotStarted: RawProfile["questsnotstarted"];
/**
* The total experience of the player.
*/
totalXp: RawProfile["totalxp"];
/**
* It's not known what this represents.
*
* @experimental
*/
ranged: RawProfile["ranged"];
/**
* The activities of the player.
*
* @remarks This is the event log of the player; formerly known as the Adventurer's Log.
*/
activities: ProfileActivity[];
/**
* An array of skill values of the player.
*
* @remarks This is an array of the player's skills containing various information.
*/
skillValues: RawProfile["skillvalues"];
/**
* The name of the player.
*
* @remarks This returns the corrects the capitalisation of the player's name.
*/
name: RawProfile["name"];
/**
* The rank of the player.
*
* @remarks When not `null`, this is separated by commas.
* @example "8,181"
*/
rank: RawProfile["rank"];
/**
* It's not known what this represents.
*
* @experimental
*/
melee: RawProfile["melee"];
/**
* The combat level of the player.
*/
combatLevel: RawProfile["combatlevel"];
/**
* Whether the player is signed in to RuneMetrics.
*
* @remarks Because of how this data is retrieved, this may be assumed to always be `false`.
*/
loggedIn: boolean;
}
/**
* Represents the options to provide for fetching a RuneMetrics profile.
*/
interface ProfileOptions {
/**
* The player's name.
*/
name: string;
/**
* The maximum number of activities to return.
*
* @remarks 20 is the maximum number this limit abides by.
*/
activities?: number | undefined;
/**
* The abort signal for the fetch.
*/
abortSignal?: AbortSignal | undefined;
}
/**
* Returns the player's profile data as viewed on RuneMetrics.
*
* @param options - The options to provide
* @returns The profile of the player as described by RuneMetrics.
*/
declare function profile({ name, activities, abortSignal }: ProfileOptions): Promise<Profile>;
/**
* Represents the difficulty of a quest.
*/
declare enum QuestDifficulty {
/**
* The novice difficulty.
*/
Novice = 0,
/**
* The intermediate difficulty.
*/
Intermediate = 1,
/**
* The experienced difficulty.
*/
Experienced = 2,
/**
* The master difficulty.
*/
Master = 3,
/**
* The grandmaster difficulty.
*/
Grandmaster = 4,
/**
* The special difficulty.
*/
Special = 250
}
/**
* Represents the status of a quest.
*/
declare enum QuestStatus {
/**
* The status of a quest being completed.
*/
Completed = "COMPLETED",
/**
* The status of a quest not being started.
*/
NotStarted = "NOT_STARTED",
/**
* The status of a quest being started.
*/
Started = "STARTED"
}
/**
* Represents the title of a quest.
*/
declare enum QuestTitle {
AChristmasReunion = "A Christmas Reunion",
AClockworkSyringe = "A Clockwork Syringe",
AFairyTaleIGrowingPains = "A Fairy Tale I - Growing Pains",
AFairyTaleIICureaQueen = "A Fairy Tale II - Cure a Queen",
AFairyTaleIIIBattleatOrksRift = "A Fairy Tale III - Battle at Ork's Rift",
AGuildOfOurOwn = "A Guild of Our Own (miniquest)",
AShadowoverAshdale = "A Shadow over Ashdale",
ASoulsBane = "A Soul's Bane",
ATailOfTwoCats = "A Tail of Two Cats",
AVoidDance = "A Void Dance",
Aftermath = "Aftermath",
AllFiredUp = "All Fired Up",
AlphaVsOmega = "Alpha vs Omega",
AncientAwakening = "Ancient Awakening",
AnimalMagnetism = "Animal Magnetism",
AnotherSliceOfHAM = "Another Slice of H.A.M.",
AsaFirstResort = "As a First Resort",
AzzanadrasQuest = "Azzanadra's Quest",
BackToMyRoots = "Back to my Roots",
BackToTheFreezer = "Back to the Freezer",
BarCrawl = "Bar Crawl (miniquest)",
BattleOfForinthry = "Battle of Forinthry",
BattleOfTheMonolith = "Battle of the Monolith",
BeneathCursedTides = "Beneath Cursed Tides",
BeneathScabarasSands = "Beneath Scabaras' Sands",
BenedictsWorldTour = "Benedict's World Tour (miniquest)",
BetweenARock = "Between a Rock...",
BigChompyBirdHunting = "Big Chompy Bird Hunting",
Biohazard = "Biohazard",
BirthrightOfTheDwarves = "Birthright of the Dwarves",
BloodRunsDeep = "Blood Runs Deep",
BoricsTaskI = "Boric's Task I (miniquest)",
BoricsTaskII = "Boric's Task II (miniquest)",
BoricsTaskIII = "Boric's Task III (miniquest)",
BringingHomeTheBacon = "Bringing Home the Bacon",
BrokenHome = "Broken Home",
BuyersandCellars = "Buyers and Cellars",
CabinFever = "Cabin Fever",
CallOfTheAncestors = "Call of the Ancestors",
CarnilleanRising = "Carnillean Rising",
CatapultConstruction = "Catapult Construction",
ChefsAssistant = "Chef's Assistant",
ChildrenOfMah = "Children of Mah",
CityOfSenntisten = "City of Senntisten",
CivilWarI = "Civil War I (miniquest)",
CivilWarII = "Civil War II (miniquest)",
CivilWarIII = "Civil War III (miniquest)",
ClockTower = "Clock Tower",
ColdWar = "Cold War",
Contact = "Contact!",
CooksAssistant = "Cook's Assistant",
CreatureOfFenkenstrain = "Creature of Fenkenstrain",
CrocodileTears = "Crocodile Tears",
CurseOfTheBlackStone = "Curse of the Black Stone",
DamageControl = "Damage Control (miniquest)",
DaughterOfChaos = "Daughter of Chaos",
DeadAndBuried = "Dead and Buried",
DeadliestCatch = "Deadliest Catch",
DealingwithScabaras = "Dealing with Scabaras",
DeathPlateau = "Death Plateau",
DeathToTheDorgeshuun = "Death to the Dorgeshuun",
DefenderOfVarrock = "Defender of Varrock",
DemonSlayer = "Demon Slayer",
DesertSlayerDungeon = "Desert Slayer Dungeon (miniquest)",
DesertTreasure = "Desert Treasure",
DesperateCreatures = "Desperate Ceratures",
DesperateMeasures = "Desperate Measures",
DesperateTimes = "Desperate Times",
DeviousMinds = "Devious Minds",
DiamondInTheRough = "Diamond in the Rough",
DimensionOfDisaster = "Dimension of Disaster",
DimensionOfDisasterCoinOfTheRealm = "Dimension of Disaster: Coin of the Realm",
DimensionOfDisasterCurseOfArrav = "Dimension of Disaster: Curse of Arrav",
DimensionOfDisasterDefenderOfVarrock = "Dimension of Disaster: Defender of Varrock",
DimensionOfDisasterDemonSlayer = "Dimension of Disaster: Demon Slayer",
DimensionOfDisasterShieldOfArrav = "Dimension of Disaster: Shield of Arrav",
DishonourAmongThieves = "Dishonour among Thieves",
DoNoEvil = "Do No Evil",
DoricsTaskI = "Doric's Task I (miniquest)",
DoricsTaskII = "Doric's Task II (miniquest)",
DoricsTaskIII = "Doric's Task III (miniquest)",
DoricsTaskIV = "Doric's Task IV (miniquest)",
DoricsTaskV = "Doric's Task V (miniquest)",
DoricsTaskVI = "Doric's Task VI (miniquest)",
DoricsTaskVII = "Doric's Task VII (miniquest)",
DoricsTaskVIII = "Doric's Task VIII (miniquest)",
DragonSlayer = "Dragon Slayer",
DreamMentor = "Dream Mentor",
DruidicRitual = "Druidic Ritual",
DuckQuest = "Duck Quest",
DwarfCannon = "Dwarf Cannon",
EadgarsRuse = "Eadgar's Ruse",
EaglesPeak = "Eagles' Peak",
EclipseOfTheHeart = "Eclipse of the Heart",
ElementalWorkshopI = "Elemental Workshop I",
ElementalWorkshopII = "Elemental Workshop II",
ElementalWorkshopIII = "Elemental Workshop III",
ElementalWorkshopIV = "Elemental Workshop IV",
EnakhrasLament = "Enakhra's Lament",
EnlightenedJourney = "Enlightened Journey",
EnterTheAbyss = "Enter the Abyss (miniquest)",
ErnestTheChicken = "Ernest the Chicken",
EvilDavesBigDayOut = "Evil Dave's Big Day Out",
Extinction = "Extinction",
EyeForAnEye = "Eye for an Eye (miniquest)",
EyeOfHetI = "Eye of Het I",
EyeOfHetII = "Eye of Het II",
FamilyCrest = "Family Crest",
FateOfTheGods = "Fate of the Gods",
FatherAndSon = "Father and Son",
FieldOfScreams = "Field of Screams",
FightArena = "Fight Arena",
FinalDestination = "Final Destination (miniquest)",
Finale = "Finale",
FishingContest = "Fishing Contest",
FlagFall = "Flag Fall (miniquest)",
Flashback = "Flashback",
Foreshadowing = "Foreshadowing",
ForgettableTaleOfADrunkenDwarf = "Forgettable Tale of a Drunken Dwarf",
ForgivenessOfAChaosDwarf = "Forgiveness of a Chaos Dwarf",
Fortunes = "Fortunes",
FromTinyAcorns = "From Tiny Acorns (miniquest)",
FurNSeek = "Fur 'n Seek",
GardenOfTranquillity = "Garden of Tranquillity",
GertrudesCat = "Gertrude's Cat",
GhostsAhoy = "Ghosts Ahoy",
GhostsfromThePast = "Ghosts from the Past (miniquest)",
GloriousMemories = "Glorious Memories",
GoblinDiplomacy = "Goblin Diplomacy",
GowerQuest = "Gower Quest",
GreatEggSpectations = "Great Egg-spectations",
GrimTales = "Grim Tales",
GunnarsGround = "Gunnar's Ground",
Harbinger = "Harbinger (miniquest)",
HauntedMine = "Haunted Mine",
HazeelCult = "Hazeel Cult",
HeadOfTheFamily = "Head of the Family (miniquest)",
HeartOfStone = "Heart of Stone",
Heartstealer = "Heartstealer",
HelpingLaniakea = "Helping Laniakea",
HeroesQuest = "Heroes' Quest",
HerosWelcome = "Hero's Welcome",
HolyGrail = "Holy Grail",
HopespearsWill = "Hopespear's Will (miniquest)",
HorrorfromTheDeep = "Horror from the Deep",
HousingOfParliament = "Housing of Parliament",
HuntforRedRaktuber = "Hunt for Red Raktuber",
IcthlarinsLittleHelper = "Icthlarin's Little Helper",
ImpCatcher = "Imp Catcher",
ImpressingTheLocals = "Impressing the Locals",
InAidOfTheMyreque = "In Aid of the Myreque",
InMemoryOfTheMyreque = "In Memory of the Myreque (miniquest)",
InPyreNeed = "In Pyre Need",
InSearchOfTheMyreque = "In Search of the Myreque",
ItsSnowBother = "It's Snow Bother",
JedHunter = "Jed Hunter (miniquest)",
JunglePotion = "Jungle Potion",
KennithsConcerns = "Kennith's Concerns",
KiliRow = "Kili Row",
KindredSpirits = "Kindred Spirits",
KingOfTheDwarves = "King of the Dwarves",
KingsRansom = "King's Ransom",
KoscheisTroubles = "Koschei's Troubles (miniquest)",
LairOfTarnRazorlor = "Lair of Tarn Razorlor (miniquest)",
LandOfTheGoblins = "Land of the Goblins",
LegacyOfSeergaze = "Legacy of Seergaze",
LegendsQuest = "Legends' Quest",
LetThemEatPie = "Let Them Eat Pie",
LostCity = "Lost City",
LostHerMarbles = "Lost Her Marbles (miniquest)",
LoveStory = "Love Story",
LunarDiplomacy = "Lunar Diplomacy",
MahjarratMemories = "Mahjarrat Memories (miniquest)",
MakingHistory = "Making History",
MeetingHistory = "Meeting History",
MerlinsCrystal = "Merlin's Crystal",
MissingMyMummy = "Missing My Mummy",
MissingPresumedDeath = "Missing, Presumed Death",
MonkeyMadness = "Monkey Madness",
MonksFriend = "Monk's Friend",
MountainDaughter = "Mountain Daughter",
MourningsEndPartI = "Mourning's End Part I",
MourningsEndPartII = "Mourning's End Part II",
MurderMystery = "Murder Mystery",
MurderOnTheBorder = "Murder on the Border",
MyArmsBigAdventure = "My Arm's Big Adventure",
MythsOfTheWhiteLands = "Myths of the White Lands",
Nadir = "Nadir (saga)",
NatureSpirit = "Nature Spirit",
Necromancy = "Necromancy!",
NewFoundations = "New Foundations",
NomadsElegy = "Nomad's Elegy",
NomadsRequiem = "Nomad's Requiem",
ObservatoryQuest = "Observatory Quest",
OdeofTheDevourer = "Ode of the Devourer",
OlafsQuest = "Olaf's Quest",
OnceUponaSlime = "Once Upon a Slime",
OnceUponaTimeInGielinor = "Once Upon a Time in Gielinor",
OneFootInTheGrave = "One Foot in the Grave (miniquest)",
OneOfAKind = "One of a Kind",
OnePiercingNote = "One Piercing Note",
OneSmallFavour = "One Small Favour",
OsseousRex = "Osseous Rex",
OurManInTheNorth = "Our Man in the North",
PerilsOfIceMountain = "Perils of Ice Mountain",
PharaohsFolly = "Pharaoh's Folly",
PhiteClub = "'Phite Club",
PiecesOfHate = "Pieces of Hate",
PiratesTreasure = "Pirate's Treasure",
PlagueCity = "Plague City",
PlaguesEnd = "Plague's End",
PriestInPeril = "Priest in Peril",
PurpleCat = "Purple Cat (miniquest)",
QuietBeforeTheSwarm = "Quiet Before the Swarm",
RagandBoneMan = "Rag and Bone Man",
RakshaTheShadowColossus = "Raksha, the Shadow Colossus",
RatCatchers = "Rat Catchers",
RebuildingEdgeville = "Rebuilding Edgeville (miniquest)",
RecipeforDisaster = "Recipe for Disaster",
RecipeforDisasterAnotherCooksQuest = "Recipe for Disaster: Another Cook's Quest",
RecipeforDisasterDefeatingTheCulinaromancer = "Recipe for Disaster: Defeating the Culinaromancer",
RecipeforDisasterFreeingEvilDave = "Recipe for Disaster: Freeing Evil Dave",
RecipeforDisasterFreeingKingAwowogei = "Recipe for Disaster: Freeing King Awowogei",
RecipeforDisasterFreeingPiratePete = "Recipe for Disaster: Freeing Pirate Pete",
RecipeforDisasterFreeingSirAmikVarze = "Recipe for Disaster: Freeing Sir Amik Varze",
RecipeforDisasterFreeingSkrachUglogwee = "Recipe for Disaster: Freeing Skrach Uglogwee",
RecipeforDisasterFreeingTheGoblinGenerals = "Recipe for Disaster: Freeing the Goblin Generals",
RecipeforDisasterFreeingTheLumbridgeSage = "Recipe for Disaster: Freeing the Lumbridge Sage",
RecipeforDisasterFreeingTheMountainDwarf = "Recipe for Disaster: Freeing the Mountain Dwarf",
RecruitmentDrive = "Recruitment Drive",
Regicide = "Regicide",
RemainsOfTheNecrolord = "Remains of the Necrolord",
RequiemForADragon = "Requiem for a Dragon",
RitualOfTheMahjarrat = "Ritual of the Mahjarrat",
RiverOfBlood = "River of Blood",
RockingOut = "Rocking Out",
RovingElves = "Roving Elves",
RoyalTrouble = "Royal Trouble",
RumDeal = "Rum Deal",
RuneMechanics = "Rune Mechanics",
RuneMemories = "Rune Memories",
RuneMysteries = "Rune Mysteries",
RuneMythos = "Rune Mythos",
SaltInTheWound = "Salt in the Wound",
ScorpionCatcher = "Scorpion Catcher",
SeaSlug = "Sea Slug",
ShadesOfMortton = "Shades of Mort'ton",
ShadowOfTheStorm = "Shadow of the Storm",
SheepHerder = "Sheep Herder",
SheepShearer = "Sheep Shearer (miniquest)",
ShieldOfArrav = "Shield of Arrav",
ShiloVillage = "Shilo Village",
SinsOfTheFather = "Sins of the Father (miniquest)",
SliskesEndgame = "Sliske's Endgame",
SmokingKills = "Smoking Kills",
SomeLikeItCold = "Some Like It Cold",
SongfromTheDepths = "Song from the Depths",
SoulSearching = "Soul Searching",
SpiritOfSummer = "Spirit of Summer",
SpiritsOfTheElid = "Spirits of the Elid",
SpiritualEnlightenment = "Spiritual Enlightenment (miniquest)",
StolenHearts = "Stolen Hearts",
Succession = "Succession",
SummersEnd = "Summer's End",
SwanSong = "Swan Song",
SweptAway = "Swept Away",
TaiBwoWannaiTrio = "Tai Bwo Wannai Trio",
TalesOfNomad = "Tales of Nomad (miniquest)",
TalesOfTheGodWars = "Tales of the God Wars (miniquest)",
TearsOfGuthix = "Tears of Guthix",
TempleOfIkov = "Temple of Ikov",
ThatOldBlackMagic = "That Old Black Magic",
TheBloodPact = "The Blood Pact",
TheBranchesOfDarkmeyer = "The Branches of Darkmeyer",
TheBrinkOfExtinction = "The Brink of Extinction",
TheChosenCommander = "The Chosen Commander",
TheCurseOfArrav = "The Curse of Arrav",
TheCurseOfZaros = "The Curse of Zaros (miniquest)",
TheDarknessOfHallowvale = "The Darkness of Hallowvale",
TheDeathOfChivalry = "The Death of Chivalry",
TheDigSite = "The Dig Site",
TheElderKiln = "The Elder Kiln",
TheEyesOfGlouphrie = "The Eyes of Glouphrie",
TheFeud = "The Feud",
TheFiremakersCurse = "The Firemaker's Curse",
TheFremennikIsles = "The Fremennik Isles",
TheFremennikTrials = "The Fremennik Trials",
TheGeneralsShadow = "The General's Shadow (miniquest)",
TheGiantDwarf = "The Giant Dwarf",
TheGolem = "The Golem",
TheGrandTree = "The Grand Tree",
TheGreatBrainRobbery = "The Great Brain Robbery",
TheHandInTheSand = "The Hand in the Sand",
TheHuntforSurok = "The Hunt for Surok (miniquest)",
TheJackOfSpades = "The Jack of Spades",
TheKnightsSword = "The Knight's Sword",
TheLightWithin = "The Light Within",
TheLordOfVampyrium = "The Lord of Vampyrium",
TheLostToys = "The Lost Toys (miniquest)",
TheLostTribe = "The Lost Tribe",
TheMightyFall = "The Mighty Fall",
TheNeedleSkips = "The Needle Skips",
ThePathOfGlouphrie = "The Path of Glouphrie",
ThePrisonerOfGlouphrie = "The Prisoner of Glouphrie",
TheRestlessGhost = "The Restless Ghost",
TheSlugMenace = "The Slug Menace",
TheSpiritOfWar = "The Spirit of War",
TheTaleOfTheMuspah = "The Tale of the Muspah",
TheTempleatSenntisten = "The Temple at Senntisten",
TheTouristTrap = "The Tourist Trap",
TheVaultOfShadows = "The Vault of Shadows",
TheVoidStaresBack = "The Void Stares Back",
TheWorldWakes = "The World Wakes",
ThokItToEm = "Thok It To 'Em (saga)",
ThokYourBlockOff = "Thok Your Block Off (saga)",
ThreesCompany = "Three's Company (saga)",
ThroneOfMiscellania = "Throne of Miscellania",
TokTzKetDill = "TokTz-Ket-Dill",
TomesOfTheWarlock = "Tomes of the Warlock",
TortleCombat = "Tortle Combat (miniquest)",
TowerOfLife = "Tower of Life",
TreeGnomeVillage = "Tree Gnome Village",
TribalTotem = "Tribal Totem",
TrollRomance = "Troll Romance",
TrollStronghold = "Troll Stronghold",
TuaiLeitsOwn = "Tuai Leit's Own (miniquest)",
TwilightOfTheGods = "Twilight of the Gods",
UndergroundPass = "Underground Pass",
UnstableFoundations = "Unstable Foundations",
UnwelcomeGuests = "Unwelcome Guests",
VampyreSlayer = "Vampyre Slayer",
Vengeance = "Vengeance (saga)",
VesselOfTheHarbinger = "Vessel of the Harbinger",
VioletisBlue = "Violet is Blue",
VioletisBlueToo = "Violet is Blue Too",
WanderingGaal = "Wandering Ga'al (miniquest)",
Wanted = "Wanted!",
Watchtower = "Watchtower",
WaterfallQuest = "Waterfall Quest",
WhatLiesBelow = "What Lies Below",
WhatsMineisYours = "What's Mine is Yours",
WhileGuthixSleeps = "While Guthix Sleeps",
WitchsHouse = "Witch's House",
WitchsPotion = "Witch's Potion (miniquest)",
WithinTheLight = "Within the Light",
WolfWhistle = "Wolf Whistle",
YouAreIt = "You Are It",
ZogreFleshEaters = "Zogre Flesh Eaters"
}
/**
* Represents the data of a quest.
*/
interface Quest {
/**
* The difficulty of the quest.
*/
difficulty: QuestDifficulty;
/**
* Whether the quest requires membership.
*/
members: boolean;
/**
* The amount of quest points the quest rewards.
*/
questPoints: number;
/**
* The status of the quest.
*/
status: QuestStatus;
/**
* The title of the quest.
*/
title: QuestTitle;
/**
* Whether the player is eligible to start the quest.
*/
userEligible: boolean;
}
/**
* Represents data about a player's returned quests.
*/
interface QuestDetails {
/**
* Whether the player is signed in to RuneMetrics.
*
* @remarks Because of how this data is retrieved, this may be assumed to always be `false`.
*/
loggedIn: boolean;
/**
* An array of quests with respect to the player.
*/
quests: Quest[];
}
/**
* Represents the options to provide for fetching a player's quest data.
*/
interface QuestDetailsOptions {
/**
* The player's name.
*/
name: string;
/**
* The abort signal for the fetch.
*/
abortSignal?: AbortSignal;
}
/**
* Returns the player's quest data.
*
* @param options - The options to provide
* @returns An object containing the quest data.
*/
declare function questDetails({ name, abortSignal, }: QuestDetailsOptions): Promise<QuestDetails>;
/**
* Represents an item used in the shop.
*/
declare enum Item {
AdvancedPulseCore = "Advanced pulse core",
AnimaCrystal = "Anima crystal",
BarrelOfBait = "Barrel of bait",
BrokenFishingRod = "Broken fishing rod",
CrystalTriskelion = "Crystal triskelion",
DDTokenDaily = "D&D token (daily)",
DDTokenMonthly = "D&D token (monthly)",
DDTokenWeekly = "D&D token (weekly)",
DeathtouchedDart = "Deathtouched dart",
DragonkinLamp = "Dragonkin Lamp",
DungeoneeringWildcard = "Dungeoneering Wildcard",
GiftForTheReaper = "Gift for the Reaper",
GoebieBurialCharm = "Goebie burial charm",
HarmonicDust = "Harmonic dust",
HornOfHonour = "Horn of honour",
LargeGoebieBurialCharm = "Large goebie burial charm",
LividPlant = "Livid plant",
MenaphiteGiftOfferingLarge = "Menaphite gift offering (large)",
MenaphiteGiftOfferingMedium = "Menaphite gift offering (medium)",
MenaphiteGiftOfferingSmall = "Menaphite gift offering (small)",
MessageInABottle = "Message in a bottle",
SacredClay = "Sacred clay",
ShatteredAnima = "Shattered anima",
SilverhawkDown = "Silverhawk down",
SlayerVIPCoupon = "Slayer VIP coupon",
SmallGoebieBurialCharm = "Small goebie burial charm",
StarvedAncientEffigy = "Starved ancient effigy",
Taijitu = "Taijitu",
TangledFishbowl = "Tangled fishbowl",
UnfocusedDamageEnhancer = "Unfocused damage enhancer",
UnfocusedRewardEnhancer = "Unfocused reward enhancer",
UnstableAirRune = "Unstable air rune"
}
declare const SLOT_1_AND_2: readonly [Item.GiftForTheReaper, Item.BrokenFishingRod, Item.BarrelOfBait, Item.AnimaCrystal, Item.SmallGoebieBurialCharm, Item.GoebieBurialCharm, Item.MenaphiteGiftOfferingSmall, Item.MenaphiteGiftOfferingMedium, Item.ShatteredAnima, Item.DDTokenDaily, Item.SacredClay, Item.LividPlant, Item.SlayerVIPCoupon, Item.SilverhawkDown, Item.UnstableAirRune, Item.AdvancedPulseCore, Item.TangledFishbowl, Item.UnfocusedDamageEnhancer, Item.HornOfHonour];
declare const SLOTS: {
readonly 1: readonly [Item.GiftForTheReaper, Item.BrokenFishingRod, Item.BarrelOfBait, Item.AnimaCrystal, Item.SmallGoebieBurialCharm, Item.GoebieBurialCharm, Item.MenaphiteGiftOfferingSmall, Item.MenaphiteGiftOfferingMedium, Item.ShatteredAnima, Item.DDTokenDaily, Item.SacredClay, Item.LividPlant, Item.SlayerVIPCoupon, Item.SilverhawkDown, Item.UnstableAirRune, Item.AdvancedPulseCore, Item.TangledFishbowl, Item.UnfocusedDamageEnhancer, Item.HornOfHonour];
readonly 2: readonly [Item.GiftForTheReaper, Item.BrokenFishingRod, Item.BarrelOfBait, Item.AnimaCrystal, Item.SmallGoebieBurialCharm, Item.GoebieBurialCharm, Item.MenaphiteGiftOfferingSmall, Item.MenaphiteGiftOfferingMedium, Item.ShatteredAnima, Item.DDTokenDaily, Item.SacredClay, Item.LividPlant, Item.SlayerVIPCoupon, Item.SilverhawkDown, Item.UnstableAirRune, Item.AdvancedPulseCore, Item.TangledFishbowl, Item.UnfocusedDamageEnhancer, Item.HornOfHonour];
readonly 3: readonly [Item.Taijitu, Item.LargeGoebieBurialCharm, Item.MenaphiteGiftOfferingLarge, Item.DDTokenWeekly, Item.DDTokenMonthly, Item.DungeoneeringWildcard, Item.MessageInABottle, Item.CrystalTriskelion, Item.StarvedAncientEffigy, Item.DeathtouchedDart, Item.DragonkinLamp, Item.HarmonicDust, Item.UnfocusedRewardEnhancer];
};
/**
* Returns the stock for the travelling merchant.
*
* @param timestamp - A Unix timestamp.
* @returns An array containing the stock.
*/
declare function stock(timestamp: number): [(typeof SLOT_1_AND_2)[number], (typeof SLOT_1_AND_2)[number], (typeof SLOTS)[3][number]];
/**
* The kind of Wilderness Flash Event.
*/
declare enum WildernessFlashEvent {
/**
* @see {@link https://runescape.wiki/w/Wilderness_Flash_Events#King_Black_Dragon_Rampage}
*/
KingBlackDragonRampage = "King Black Dragon Rampage",
/**
* @see {@link https://runescape.wiki/w/Wilderness_Flash_Events#Forgotten_Soldiers}
*/
ForgottenSoldiers = "Forgotten Soldiers",
/**
* @see {@link https://runescape.wiki/w/Wilderness_Flash_Events#Surprising_Seedlings}
*/
SurprisingSeedlings = "Surprising Seedlings",
/**
* @see {@link https://runescape.wiki/w/Wilderness_Flash_Events#Hellhound_Pack}
*/
HellhoundPack = "Hellhound Pack",
/**
* @see {@link https://runescape.wiki/w/Wilderness_Flash_Events#Infernal_Star}
*/
InfernalStar = "Infernal Star",
/**
* @see {@link https://runescape.wiki/w/Wilderness_Flash_Events#Lost_Souls}
*/
LostSouls = "Lost Souls",
/**
* @see {@link https://runescape.wiki/w/Wilderness_Flash_Events#Ramokee_Incursion}
*/
RamokeeIncursion = "Ramokee Incursion",
/**
* @see {@link https://runescape.wiki/w/Wilderness_Flash_Events#Displaced_Energy}
*/
DisplacedEnergy = "Displaced Energy",
/**
* @see {@link https://runescape.wiki/w/Wilderness_Flash_Events#Evil_Bloodwood_Tree}
*/
EvilBloodwoodTree = "Evil Bloodwood Tree",
/**
* @see {@link https://runescape.wiki/w/Wilderness_Flash_Events#Spider_Swarm}
*/
SpiderSwarm = "Spider Swarm",
/**
* @see {@link https://runescape.wiki/w/Wilderness_Flash_Events#Unnatural_Outcrop}
*/
UnnaturalOutcrop = "Unnatural Outcrop",
/**
* @see {@link https://runescape.wiki/w/Wilderness_Flash_Events#Stryke_the_Wyrm}
*/
StrykeTheWyrm = "Stryke the Wyrm",
/**
* @see {@link https://runescape.wiki/w/Wilderness_Flash_Events#Demon_Stragglers}
*/
DemonStragglers = "Demon Stragglers",
/**
* @see {@link https://runescape.wiki/w/Wilderness_Flash_Events#Butterfly_Swarm}
*/
ButterflySwarm = "Butterfly Swarm"
}
/**
* Returns the Wilderness Flash Event.
*
* @remarks The hour will be checked. Results may be inaccurate before 5th February 2024 12:00 as the sequence was modified.
* @param timestamp - A Unix timestamp.
* @returns The Wilderness Flash Event.
*/
declare function wildernessFlashEvent(timestamp: number): WildernessFlashEvent;
/**
* Returns if a Wilderness Warbands camp is set up.
*
* @remarks The hour will be checked.
* @param timestamp - A Unix timestamp.
* @returns Whether a Wilderness Warbands camp is set up.
* @see {@link https://runescape.wiki/w/Wilderness_Warbands}
*/
declare function wildernessWarbands(timestamp: number): boolean;
export { type AvatarOptions, type ClanMember, ClanPage, type ClanPageOptions, ClanRank, type CreatedAccounts, type CreatedAccountsOptions, ErrorCode, type FetchClanMembersOptions, type GroupIronman, type GroupIronmanContent, type GroupIronmanHiScoreOptions, type HiScore, type HiScoreOptions, type HiScoreSkill, Item, Jewel, type PlayerCountOptions, type PlayerDetail, type PlayerDetailsOptions, PlayerPage, type PlayerPageOptions, type Profile, type ProfileActivity, type ProfileOptions, type ProfileSkills, type Quest, type QuestDetails, type QuestDetailsOptions, QuestDifficulty, QuestStatus, QuestTitle, RuneScapeAPIError, RuneScapeError, Skill, SkillId, WildernessFlashEvent, avatar, clanPage, createdAccounts, fetchClanMembers, groupIronman, guthixianCache, hiScore, jewel, playerCount, playerDetails, playerPage, profile, questDetails, raven, stock, wildernessFlashEvent, wildernessWarbands };